Litcius/Paper detail

Enhancing Source Code Refactoring Detection with Explanations from Commit Messages

Rrezarta Krasniqi, Jane Cleland‐Huang

202018 citationsDOI

Abstract

We investigate the extent to which code commit summaries provide rationales and descriptions of code refactorings. We present a refactoring description detection tool CMMiner that detects code commit messages containing refactoring information and differentiates between twelve different refactoring types. We further explore whether refactoring information mined from commit messages using CMMiner, can be combined with refactoring descriptions mined from source code using the well-known RMiner tool. For six refactoring types covered by both CMMiner and RMiner, we observed 21.96% to 38.59% overlap in refactorings detected across four diverse open-source systems. RMiner identified approximately 49.13% to 60.29% of refactorings missed by CMMiner, primarily because developers often failed to describe code refactorings that occurred alongside other code changes. However, CMMiner identified 10.30% to 19.51% of refactorings missed by RMiner, primarily when refactorings occurred across multiple commits. Our results suggest that integrating both approaches can enhance the completeness of refactoring detection and provide refactoring rationales.

Topics & Concepts

Code refactoringCommitComputer scienceCode (set theory)Source codeProgramming languageCode smellSoftware engineeringSoftware qualitySoftwareDatabaseSoftware developmentSet (abstract data type)Software Engineering ResearchAdvanced Malware Detection TechniquesSoftware System Performance and Reliability