Searcharxiv⌕ Search

arXiv subjects

Pooja Rani

Publications and source records attributed to Pooja Rani.

27 records · Page 2Linked to original sources

Do Comments follow Commenting Conventions? A Case Study in Java and Python

Assessing code comment quality is known to be a difficult problem. A number of coding style guidelines have been created with the aim to encourage writing of informative, readable, and consistent comments. However, it is not clear from the research to date which specific aspects of comments the guidelines cover (e.g., syntax, content, structure). Furthermore, the extent to which developers follow these guidelines while writing code comments is unknown. We analyze various style guidelines in Java and Python and uncover that the majority of them address more the content aspect of the comments rather than syntax or formatting, but when considering the different types of information developers embed in comments and the concerns they raise on various online platforms about the commenting practices, existing comment conventions are not yet specified clearly enough, nor do they adequately cover important concerns. We also analyze commenting practices of developers in diverse projects to see the extent to which they follow the guidelines. Our results highlight the mismatch between developer commenting practices and style guidelines, and provide several focal points for the design and improvement of comment quality checking tools.

cs.SE↗

What Do Developers Discuss about Code Comments?

Code comments are important for program comprehension, development, and maintenance tasks. Given the varying standards for code comments, and their unstructured or semi-structured nature, developers get easily confused (especially novice developers) about which convention(s) to follow, or what tools to use while writing code documentation. Thus, they post related questions on external online sources to seek better commenting practices. In this paper, we analyze code comment discussions on online sources such as Stack Overflow (SO) and Quora to shed some light on the questions developers ask about commenting practices. We apply Latent Dirichlet Allocation (LDA) to identify emerging topics concerning code comments. Then we manually analyze a statistically significant sample set of posts to derive a taxonomy that provides an overview of the developer questions about commenting practices. Our results highlight that on SO nearly 40% of the questions mention how to write or process comments in documentation tools and environments, and nearly 20% of the questions are about potential limitations and possibilities of documentation tools to add automatically and consistently more information in comments. On the other hand, on Quora, developer questions focus more on background information (35% of the questions) or asking opinions (16% of the questions) about code comments. We found that (i) not all aspects of comments are covered in coding style guidelines, e.g., how to add a specific type of information, (ii) developers need support in learning the syntax and format conventions to add various types of information in comments, and (iii) developers are interested in various automated strategies for comments such as detection of bad comments, or verify comment style automatically, but lack tool support to do that.

cs.SE↗

How to Identify Class Comment Types? A Multi-language Approach for Class Comment Classification

Most software maintenance and evolution tasks require developers to understand the source code of their software systems. Software developers usually inspect class comments to gain knowledge about program behavior, regardless of the programming language they are using. Unfortunately, (i) different programming languages present language-specific code commenting notations/guidelines; and (ii) the source code of software projects often lacks comments that adequately describe the class behavior, which complicates program comprehension and evolution activities. To handle these challenges, this paper investigates the different language-specific class commenting practices of three programming languages: Python, Java, and Smalltalk. In particular, we systematically analyze the similarities and differences of the information types found in class comments of projects developed in these languages. We propose an approach that leverages two techniques, namely Natural Language Processing and Text Analysis, to automatically identify various types of information from class comments i.e., the specific types of semantic information found in class comments. To the best of our knowledge, no previous work has provided a comprehensive taxonomy of class comment types for these three programming languages with the help of a common automated approach. Our results confirm that our approach can classify frequent class comment information types with high accuracy for Python, Java, and Smalltalk programming languages. We believe this work can help to monitor and assess the quality and evolution of code comments in different program languages, and thus support maintenance and evolution tasks.

cs.SE↗

What do class comments tell us? An investigation of comment evolution and practices in Pharo Smalltalk

Previous studies have characterized code comments in various programming languages to support better program comprehension activities and maintenance tasks. However, very few studies have focused on understanding developer practices to write comments. None of them has compared such developer practices to the standard comment guidelines to study the extent to which developers follow the guidelines. This paper reports the first empirical study investigating commenting practices in Pharo Smalltalk. First, we analyze class comment evolution over seven Pharo versions. Then, we investigate the information types embedded in class comments. Finally, we study the adherence of developer commenting practices to the official class comment template over Pharo versions. The results of this study show that there is a rapid increase in class comments in the initial three Pharo versions, while in subsequent versions developers added comments to both new and old classes, thus maintaining a similar code to comment ratio. We furthermore found three times as many information types in class comments as those suggested by the template. However, the information types suggested by the template tend to be present more often than other types of information. Additionally, we find that a substantial proportion of comments follow the writing style of the template in writing these information types, but they are written and formatted in a non-uniform way.This suggests the need to standardize the commenting guidelines for formatting the text, and to provide headers for the different information types to ensure a consistent style and to identify the information easily. Given the importance of high-quality code comments, we draw numerous implications for developers and researchers to improve the support for comment quality assessment tools.

cs.SE↗

Speculative Analysis for Quality Assessment of Code Comments

Previous studies have shown that high-quality code comments assist developers in program comprehension and maintenance tasks. However, the semi-structured nature of comments, unclear conventions for writing good comments, and the lack of quality assessment tools for all aspects of comments make their evaluation and maintenance a non-trivial problem. To achieve high-quality comments, we need a deeper understanding of code comment characteristics and the practices developers follow. In this thesis, we approach the problem of assessing comment quality from three different perspectives: what developers ask about commenting practices, what they write in comments, and how researchers support them in assessing comment quality. Our preliminary findings show that developers embed various kinds of information in class comments across programming languages. Still, they face problems in locating relevant guidelines to write consistent and informative comments, verifying the adherence of their comments to the guidelines, and evaluating the overall state of comment quality. To help developers and researchers in building comment quality assessment tools, we provide: (i) an empirically validated taxonomy of comment convention-related questions from various community forums, (ii) an empirically validated taxonomy of comment information types from various programming languages, (iii) a language-independent approach to automatically identify the information types, and (iv) a comment quality taxonomy prepared from a systematic literature review.

cs.SE↗

On the Variability of Critical Size for Homogeneous Nucleation in a Solid-State Diffusional Transformation

In a solid-state diffusional phase transformation involving nucleation and growth, the size of the critical nucleus for a homogeneous process (r*homo=r* ) has been assumed to be a time invariant constant of the transformation. The strain associated with the process has a positive energy contribution and leads to an increase in the value of r*, with respect to that for nucleation from a liquid. With the progress of such a transformation, the strain energy stored in the matrix increases and nuclei forming at a later stage encounter a strained matrix. Using devitrification of a bulk metallic glass as a model system, we demonstrate that r* is not a cardinal time invariant constant for homogeneous nucleation and can increase or decrease depending on the strain energy penalty. We show that the assumption regarding the constancy of r* is true only in the early stages of the transformation and establish that the progress of the transformation leads to an altered magnitude of r*, which is a function of the microstructural details, geometrical variables and physical parameters. With the aid of high-resolution lattice fringe imaging and computations of r*, we further argue that, 'liquid-like' homogeneous nucleation can occur and that the conclusions are applicable to a broad set of solid-state diffusional transformations. The above effect 'opens up' a lower barrier transformation pathway arising purely from the internal variables of the system.

cond-mat.mtrl-sci↗

Thermodynamic properties of pure and doped (B, N) graphene

Ab-initio density functional perturbation theory (DFPT) has been employed to study thermodynamical properties of pure and doped graphene sheet and the results have been compared with available theoretical and experimental data. The concentration of B and N has been varied upto 50% of the carbon atoms in graphene. Phonon frequencies are essential ingredients entering into such a calculation, which have been computed by using the dynamical matrix provided by VASP software in combination with phonopy code in the harmonic approximation. This easily provides us the Helmholtz free energy and leads us to numerical estimates of various thermodynamical properties. The results for specific heat are in good agreement with various theoretical and experimental studies obtained earlier for pure graphene. Interesting new results have been reported for B and N substituted structure. It has been observed that specific heat decreases with the increase in concentration of doping while the entropy increases. Further, large doping concentrations result in unstable sheets resulting in imaginary frequencies in the transverse directions. The instability needs to be compensated by external strains and that has been assumed while carrying out Brilluoin summations. These results will be useful for calculation of thermal conductivity of doped graphene and thus feasibility of using these for device applications. Our preliminary results for thermal expansion have indicated negative thermal expansion behavior of pure graphene at low temperatures which needs investigation on doped graphene as well.

cond-mat.mes-hall↗

DFT study of optical properties of pure and doped Graphene

Ab-initio calculations based on density functional theory (DFT) have been performed to study the optical properties of pure graphene and have been compared to that of individual boron (B), nitrogen (N) and BN co-doped graphene sheet. The effect of doping has been investigated by varying the concentrations of dopants from 3.125 % (one atom of the dopant in 32 host atoms) to 6.25 % (six dopant atoms in 50 host atoms) for individual B and N doping and from 37.5 % (one B/N pair in 32 host atoms) to 18.75 % for BN co-doping. Positions of the dopants have also been varied for the same concentration of substitution doping. The dielectric matrix has been calculated within the random phase approximation (RPA) using VASP (Vienna ab-initio Simulation Package) code. The dielectric function, absorption spectrum and energy loss-function of single layer graphene sheet have been calculated for light polarization parallel and perpendicular to the plane of graphene sheet and compared with doping graphene. The calculated dielectric functions and energy-loss spectra are in reasonable agreement with the available theoretical and experimental results for pure graphene. It has been found that individual B and N doping does not significantly affect the imaginary dielectric function and hence the absorption spectra. However, significant red shift in absorption towards visible range of the radiation at high doping is found to occur for the B/N co-doping. The results can be used to tailor the optical properties of graphene in visible region.

cond-mat.mes-hall↗

Designing band gap of graphene by B and N dopant atoms

Ab-initio calculations have been performed to study the geometry and electronic structure of boron (B) and nitrogen (N) doped graphene sheet. The effect of doping has been investigated by varying the concentrations of dopants from 2 % (one atom of the dopant in 50 host atoms) to 12 % (six dopant atoms in 50 atoms host atoms) and also by considering different doping sites for the same concentration of substitutional doping. All the calculations have been performed by using VASP (Vienna Ab-initio Simulation Package) based on density functional theory. By B and N doping p-type and n-type doping is induced respectively in the graphene sheet. While the planar structure of the graphene sheet remains unaffected on doping, the electronic properties change from semimetal to semiconductor with increasing number of dopants. It has been observed that isomers formed differ significantly in the stability, bond length and band gap introduced. The band gap is maximum when dopants are placed at same sublattice points of graphene due to combined effect of symmetry breaking of sub lattices and the band gap is closed when dopants are placed at adjacent positions (alternate sublattice positions). These interesting results provide the possibility of tuning the band gap of graphene as required and its application in electronic devices such as replacements to Pt based catalysts in Polymer Electrolytic Fuel Cell (PEFC).

cond-mat.mes-hall↗