11 research outputs found
Evaluating the relation between changeability decay and the characteristics of clones and methods
In this paper we propose a methodology to evaluate if there is a relation between two code characteristics. The methodology is based on relative risk, an epidemiology formula used to analyze the effect of toxic agents in developing diseases. We present a metaphor in which the disease is changeability decay, measured at method level, and the toxic agent is a source code characteristic considered harmful. However, the formula assesses the strength of the relation between any toxic agent and any disease. We apply the methodology to explore cloning as a toxic agent that increases the risk of changeability decay. Cloning is a good agent to analyze given that although there is some evidence of maintainability issues caused by clones, we do not know which clones are harmful, or to what extent. We compare cloning with other possible 'toxic agents', like having high complexity or having high fan-in. We also use the technique to evaluate which clone characteristics (like clone size) may indicate harmful clones, by testing such characteristics as toxic agents. We found that cloning is one of the method characteristics that affects the least changeability decay, and that none of the clone characteristics analyzed are related with changeability decay
Recommended from our members
Assessing the effect of clones on changeability
To prioritize software maintenance activities, it is important to identify which programming flaws impact most on an application's evolution. Recent empirical studies on such a flaw, code clones, have focused on one of the arguments to consider clones harmful, namely, that related clones are not updated consistently. We believe that a wider notion is needed to assess the effect of cloning on evolution. This paper compares measures of the maintenance effort on methods with clones against those without. Statistical and graphical analysis suggests that having a clone may increase the maintenance effort of changing a method. The effort seems to increase depending on the percentage of the system affected whenever the methods that share the clone are modified. We also found that some methods seem to increase significantly their maintenance effort when a clone was present. However, the characteristics analyzed in these methods did not reveal any systematic relation between cloning and such maintenance effort increase
Automatic Detection of GUI Design Smells: The Case of Blob Listener
International audienceGraphical User Interfaces (GUIs) intensively rely on event-driven programming: widgets send GUI events, which capture users' interactions, to dedicated objects called controllers. Controllers implement several GUI listeners that handle these events to produce GUI commands. In this work, we conducted an empirical study on 13 large Java Swing open-source software systems. We study to what extent the number of GUI commands that a GUI listener can produce has an impact on the change-and fault-proneness of the GUI listener code. We identify a new type of design smell, called Blob listener that characterizes GUI listeners that can produce more than two GUI commands. We show that 21 % of the analyzed GUI controllers are Blob listeners. We propose a systematic static code analysis procedure that searches for Blob listener that we implement in InspectorGuidget. We conducted experiments on six software systems for which we manually identified 37 instances of Blob listener. InspectorGuidget successfully detected 36 Blob listeners out of 37. The results exhibit a precision of 97.37 % and a recall of 97.59 %. Finally, we propose coding practices to avoid the use of Blob listeners
Using Word Embedding and Convolution Neural Network for Bug Triaging by Considering Design Flaws
Resolving bugs in the maintenance phase of software is a complicated task.
Bug assignment is one of the main tasks for resolving bugs. Some Bugs cannot be
fixed properly without making design decisions and have to be assigned to
designers, rather than programmers, to avoid emerging bad smells that may cause
subsequent bug reports. Hence, it is important to refer some bugs to the
designer to check the possible design flaws. Based on our best knowledge, there
are a few works that have considered referring bugs to designers. Hence, this
issue is considered in this work. In this paper, a dataset is created, and a
CNN-based model is proposed to predict the need for assigning a bug to a
designer by learning the peculiarities of bug reports effective in creating bad
smells in the code. The features of each bug are extracted from CNN based on
its textual features, such as a summary and description. The number of bad
samples added to it in the fixing process using the PMD tool determines the bug
tag. The summary and description of the new bug are given to the model and the
model predicts the need to refer to the designer. The accuracy of 75% (or more)
was achieved for datasets with a sufficient number of samples for deep
learning-based model training. A model is proposed to predict bug referrals to
the designer. The efficiency of the model in predicting referrals to the
designer at the time of receiving the bug report was demonstrated by testing
the model on 10 projects
Further Investigation of the Survivability of Code Technical Debt Items
Context: Technical Debt (TD) discusses the negative impact of sub-optimal
decisions to cope with the need-for-speed in software development. Code
Technical Debt Items (TDI) are atomic elements of TD that can be observed in
code artefacts. Empirical results on open-source systems demonstrated how
code-smells, which are just one type of TDIs, are introduced and "survive"
during release cycles. However, little is known about whether the results on
the survivability of code-smells hold for other types of code TDIs (i.e., bugs
and vulnerabilities) and in industrial settings. Goal: Understanding the
survivability of code TDIs by conducting an empirical study analysing two
industrial cases and 31 open-source systems from Apache Foundation. Method: We
analysed 133,670 code TDIs (35,703 from the industrial systems) detected by
SonarQube (in 193,196 commits) to assess their survivability using
survivability models. Results: In general, code TDIs tend to remain and linger
for long periods in open-source systems, whereas they are removed faster in
industrial systems. Code TDIs that survive over a certain threshold tend to
remain much longer, which confirms previous results. Our results also suggest
that bugs tend to be removed faster, while code smells and vulnerabilities tend
to survive longer.Comment: Submitted to the Journal of Software: Evolution and Process (JSME
Mining Version Histories for Detecting Code Smells
Code smells are symptoms of poor design and implementation choices that may hinder code comprehension, and possibly increase change-and fault-proneness. While most of the detection techniques just rely on structural information, many code smells are intrinsically characterized by how code elements change over time. In this paper, we propose Historical Information for Smell deTection (HIST), an approach exploiting change history information to detect instances of five different code smells, namely Divergent Change, Shotgun Surgery, Parallel Inheritance, Blob, and Feature Envy. We evaluate HIST in two empirical studies. The first, conducted on 20 open source projects, aimed at assessing the accuracy of HIST in detecting instances of the code smells mentioned above. The results indicate that the precision of HIST ranges between 72 and 86 percent, and its recall ranges between 58 and 100 percent. Also, results of the first study indicate that HIST is able to identify code smells that cannot be identified by competitive approaches solely based on code analysis of a single system\u27s snapshot. Then, we conducted a second study aimed at investigating to what extent the code smells detected by HIST (and by competitive code analysis techniques) reflect developers\u27 perception of poor design and implementation choices. We involved 12 developers of four open source projects that recognized more than 75 percent of the code smell instances identified by HIST as actual design/implementation problems
Assessing the effect of source code characteristics on changeability
Maintenance is the phase of the software lifecycle that comprises any modification after the delivery of an application. Modifications during this phase include correcting faults, improving internal attributes, as well as adapting the application to different environments. As application knowledge and architectural integrity degrade over time, so does the facility with which changes to the application are introduced. Thus, eliminating source code that presents characteristics that hamper maintenance becomes necessary if the application is to evolve. We group these characteristics under the term Source Code Issues. Even though there is support for detecting Source Code Issues, the extent of their harmfulness for maintenance remains unknown.
One of the most studied Source Code Issue is cloning. Clones are duplicated code, usually created as programmers copy, paste, and customize existing source code. However, there is no agreement on the harmfulness of clones.
This thesis proposes and follows a novel methodology to assess the effect of clones on the changeability of methods. Changeability is the ease with which a source code entity is modified. It is assessed through metrics calculated from the history of changes of the methods. The impact of clones on the changeability of methods is measured by comparing the metrics of methods that contain clones to those that do not. Source code characteristics are then tested to establish whether they are endemic of methods whose changeability decay increase when cloned.
In addition to findings on the harmfulness of cloning, this thesis contributes a methodology that can be applied to assess the harmfulness of other Source Code Issues.
The contributions of this thesis are twofold. First, the findings answer the question about the harmfulness of clones on changeability by showing that cloned methods are more likely to change, and that some cloned methods have significantly higher changeability decay when cloned. Furthermore, it offers a characterization of such harmful clones. Second, the methodology provides a guide to analyze the effect of Source Code Characteristics in changeability; and therefore, can be adapted for other Source Code Issues
Classes-Chave em sistemas orientados a objetos: detecção e uso
Several object-oriented systems, such as Lucene, Tomcat, Javac have their respective design documented using key-classes, defined as important/central classes to understand the object-oriented design. Considering this fact, and considering that, in general, software architecture is not formally documented to help developers understanding and assessing software design, Keecle is proposed as an approach based on dynamic and static analysis for detection of key classes in a semi-automatic way.
The application of filtering mechanisms on the search space of the dynamic data is proposed in order to obtain a reduced set of key classes. The approach is evaluated with fourteen proprietary and open source systems in order to verify that the found classes correspond to the key classes of the ground-truth, which is defined from the documentation or defined by the developers. The results were analyzed in terms of precision and recall, and have shown to be superior to the state-of-the-art approach.
The role of key classes in assessing design has also been investigated. The organization of the key classes in a dependency graph, which highlights explicit dependency relations in the source code, was evaluated to be adequate for design comprehension and assessment. Key classes were evaluated whether they are more prone to bad smells, and whether specific types of bad smells are associated with different levels of cohesion and coupling metrics. In addition, the ownership of key classes was shown to be more concentrated in a reduced set of developers.
Finally, we conducted an experimental study with students and a survey with developers to evaluate documentation based on key classes. The results indicate that the documentation based on key classes are a feasible alternative for use as complementary documentation to the existing one, or for use as main documentation in environments where documentation is not available.FAPEG - Fundação de Amparo à Pesquisa do Estado de GoiásTese (Doutorado)Vários sistemas orientados a objetos, tais como Lucene, Tomcat, Javac tem seus respectivos projetos (designs) documentados usando classes-chave, definidas como sendo classes importantes/centrais para compreender o projeto de sistemas orientados a objetos. Considerando este fato, e considerando que geralmente a arquitetura não é formalmente documentada para auxiliar os desenvolvedores a entenderem e avaliarem o projeto do software, é proposta Keecle, uma abordagem baseada em análise dinâmica e estática para detecção de classes-chave de maneira semi-automática. É proposta a aplicação de mecanismos de filtragem no espaço de busca dos dados dinâmicos, para obter um conjunto reduzido de classes-chave. A abordagem é avaliada com quatorze sistemas de código aberto e proprietários, a fim de verificar se as classes encontradas correspondem às classes-chave definidas na documentação ou definidas pelos desenvolvedores. Os resultados foram analisados em termos de precisão e recall e são superiores às abordagens da literatura. O papel das classes-chave para avaliar o projeto também foi investigado. Foi avaliado se a organização das classes-chave em um grafo de dependências, o qual destaca relações de dependência explícitas no código fonte, é um mecanismo adequado para avaliar o design. Foi analisado estatisticamente, se classes-chave são mais propensas a bad smells, e se tipos específicos de bad smells estão associados a diferentes níveis de métricas de coesão e acoplamento. Além disso, a propriedade (ownership) das classes-chave foi analisada, indicando concentração em um conjunto reduzido de desenvolvedores.
Por fim, foram conduzidos um estudo experimental com estudantes e um survey com desenvolvedores para avaliar a documentação baseada em classes-chave. Os resultados demonstram que a documentação baseada em classes-chave apresenta resultados que indicam a viabilidade de uso como documentação complementar à existente ou como documentação principal em ambientes onde a documentação não está disponível