1,228 research outputs found
What to Fix? Distinguishing between design and non-design rules in automated tools
Technical debt---design shortcuts taken to optimize for delivery speed---is a
critical part of long-term software costs. Consequently, automatically
detecting technical debt is a high priority for software practitioners.
Software quality tool vendors have responded to this need by positioning their
tools to detect and manage technical debt. While these tools bundle a number of
rules, it is hard for users to understand which rules identify design issues,
as opposed to syntactic quality. This is important, since previous studies have
revealed the most significant technical debt is related to design issues. Other
research has focused on comparing these tools on open source projects, but
these comparisons have not looked at whether the rules were relevant to design.
We conducted an empirical study using a structured categorization approach, and
manually classify 466 software quality rules from three industry tools---CAST,
SonarQube, and NDepend. We found that most of these rules were easily labeled
as either not design (55%) or design (19%). The remainder (26%) resulted in
disagreements among the labelers. Our results are a first step in formalizing a
definition of a design rule, in order to support automatic detection.Comment: Long version of accepted short paper at International Conference on
Software Architecture 2017 (Gothenburg, SE
A heuristic-based approach to code-smell detection
Encapsulation and data hiding are central tenets of the object oriented paradigm. Deciding what data and behaviour to form into a class and where to draw the line between its public and private details can make the difference between a class that is an understandable, flexible and reusable abstraction and one which is not. This decision is a difficult one and may easily result in poor encapsulation which can then have serious implications for a number of system qualities. It is often hard to identify such encapsulation problems within large software systems until they cause a maintenance problem (which is usually too late) and attempting to perform such analysis manually can also be tedious and error prone. Two of the common encapsulation problems that can arise as a consequence of this decomposition process are data classes and god classes. Typically, these two problems occur together – data classes are lacking in functionality that has typically been sucked into an over-complicated and domineering god class. This paper describes the architecture of a tool which automatically detects data and god classes that has been developed as a plug-in for the Eclipse IDE. The technique has been evaluated in a controlled study on two large open source systems which compare the tool results to similar work by Marinescu, who employs a metrics-based approach to detecting such features. The study provides some valuable insights into the strengths and weaknesses of the two approache
PROGRAM INSPECTION AND TESTING TECHNIQUES FOR CODE CLONES AND REFACTORINGS IN EVOLVING SOFTWARE
Developers often perform copy-and-paste activities. This practice causes the similar code fragment (aka code clones) to be scattered throughout a code base. Refactoring for clone removal is beneficial, preventing clones from having negative effects on software quality, such as hidden bug propagation and unintentional inconsistent changes. However, recent research has provided evidence that factoring out clones does not always reduce the risk of introducing defects, and it is often difficult or impossible to remove clones using standard refactoring techniques. To investigate which or how clones can be refactored, developers typically spend a significant amount of their time managing individual clone instances or clone groups scattered across a large code base.
To address the problem, this research proposes two techniques to inspect and validate refactoring changes. First, we propose a technique for managing clone refactorings, Pattern-based clone Refactoring Inspection (PRI), using refactoring pattern templates. By matching the refactoring pattern templates against a code base, it summarizes refactoring changes of clones, and detects the clone instances not consistently factored out as potential anomalies. Second, we propose Refactoring Investigation and Testing technique, called RIT. RIT improves the testing efficiency for validating refactoring changes. RIT uses PRI to identify refactorings by analyzing original and edited versions of a program. It then uses the semantic impact of a set of identified refactoring changes to detect tests whose behavior may have been affected and modified by refactoring edits. Given each failed asserts, RIT helps developers focus their attention on logically related program statements by applying program slicing for minimizing each test. For debugging purposes, RIT determines specific failure-inducing refactoring edits, separating from other changes that only affect other asserts or tests
Towards using fluctuations in internal quality metrics to find design intents
Le contrôle de version est la pierre angulaire des processus de développement de logiciels modernes. Tout en
construisant des logiciels de plus en plus complexes, les développeurs doivent comprendre des sous-systèmes de code
source qui leur sont peu familier. Alors que la compréhension de la logique d'un code étranger est relativement simple,
la compréhension de sa conception et de sa genèse est plus compliquée. Elle n'est souvent possible que par les
descriptions des révisions et de la documentation du projet qui sont dispersées et peu fiables -- quand elles existent.
Ainsi, les développeurs ont besoin d'une base de référence fiable et pertinente pour comprendre l'historique des projets
logiciels. Dans cette thèse, nous faisons les premiers pas vers la compréhension des motifs de changement dans les
historiques de révision. Nous étudions les changements prenant place dans les métriques logicielles durant l'évolution
d'un projet.
Au travers de multiples études exploratoires, nous réalisons des expériences quantitatives et qualitatives sur plusieurs
jeux de données extraits à partir d'un ensemble de 13 projets. Nous extrayons les changements dans les métriques
logicielles de chaque commit et construisons un jeu de donnée annoté manuellement comme vérité de base.
Nous avons identifié plusieurs catégories en analysant ces changements. Un motif en particulier nommé "compromis", dans
lequel certaines métriques peuvent s'améliorer au détriment d'autres, s'est avéré être un indicateur prometteur de
changements liés à la conception -- dans certains cas, il laisse également entrevoir une intention de conception
consciente de la part des auteurs des changements. Pour démontrer les observations de nos études exploratoires, nous
construisons un modèle général pour identifier l'application d'un ensemble bien connu de principes de conception dans de
nouveaux projets.
Nos résultats suggèrent que les fluctuations de métriques ont le potentiel d'être des indicateurs pertinents pour gagner
des aperçus macroscopiques sur l'évolution de la conception dans l'historique de développement d'un projet.Version control is the backbone of the modern software development workflow. While building more and more complex
systems, developers have to understand unfamiliar subsystems of source code. Understanding the logic of unfamiliar code
is relatively straightforward. However, understanding its design and its genesis is often only possible through
scattered and unreliable commit messages and project documentation -- when they exist.
Thus, developers need a reliable and relevant baseline to understand the history of software projects. In this thesis,
we take the first steps towards understanding change patterns in commit histories. We study the changes in software
metrics through the evolution of projects.
Through multiple exploratory studies, we conduct quantitative and qualitative experiments on several datasets extracted
from a pool of 13 projects. We mine the changes in software metrics for each commit of the respective projects and
manually build oracles to represent ground truth.
We identified several categories by analyzing these changes. One pattern, in particular, dubbed "tradeoffs", where some
metrics may improve at the expense of others, proved to be a promising indicator of design-related changes -- in some
cases, also hinting at a conscious design intent from the authors of the changes. Demonstrating the findings of our
exploratory studies, we build a general model to identify the application of a well-known set of design principles in
new projects.
Our overall results suggest that metric fluctuations have the potential to be relevant indicators for valuable
macroscopic insights about the design evolution in a project's development history
- …