2018 · 59 citations · 43 references
ComputingComputer ScienceQuality EngineeringQuality ImprovementSoftware EngineeringQuality MetricsSoftware DesignSoftware MetricsSoftware Quality AssuranceSoftware RefactoringCode Quality ImprovementCode ReadabilityCode Smell DetectionCode Smell MetricsCode SmellsReadabilityRefactoring Recommendation SystemsSoftware Quality Attributes
Code quality metrics are widely used to identify design flaws (e.g., code smells) as well as to act as fitness functions for refactoring recommenders. Both these applications imply a strong assumption: quality metrics are able to assess code quality as perceived by developers. Indeed, code smell detectors and refactoring recommenders should be able to identify design flaws/recommend refactorings that are meaningful from the developer's point-of-view. While such an assumption might look reasonable, there is limited empirical evidence supporting it. We aim at bridging this gap by empirically investigating whether quality metrics are able to capture code quality improvement as perceived by developers. While previous studies surveyed developers to investigate whether metrics align with their perception of code quality, we mine commits in which developers clearly state in the commit message their aim of improving one of four quality attributes: cohesion, coupling, code readability, and code complexity. Then, we use state-of-the-art metrics to assess the change brought by each of those commits to the specific quality attribute it targets. We found that, more often than not the considered quality metrics were not able to capture the quality improvement as perceived by developers (e.g., the developer states "improved the cohesion of class C", but no quality metric captures such an improvement).
43
Indexing by latent semantic analysis
Scott Deerwester, Susan Dumais, George W. Furnas et al. · Journal of the American Society for Information Science · 1990 · 12.8K citations
Thomas J. McCabe · IEEE Transactions on Software Engineering · 1976 · 5.8K citations
Refactoring improving the design of existing code
Mauricio A. Saca · 2017 · 2.1K citations
W. P. Stevens, G. J. Myers, Larry L. Constantine · IBM Systems Journal · 1974 · 1.2K citations