Abstract

Refactoring is performed to improve software quality while leaving the behaviour of the software unchanged. Identifying refactorings applied to a software system is an important activity that leads to a better understanding of the evolution of the software system, and several techniques have been proposed and implemented to address this issue. The vast majority of existing refactoring detection techniques are language-specific, including the accepted state of the art, RMiner, which is exclusively Java-based. Although impressive performance has been achieved to date, there is scope for improvement in refactoring detection and such improvement would enhance both refactoring research and practice. In this paper, we propose a novel, language-neutral technique to identify refactorings in commit histories. Our approach is motivated by a desire to explore the use of string alignment algorithms in refactoring detection, and to determine if such approaches are competitive with the state of the art. The proposed approach has been implemented in a tool called RefDetect, evaluated, and compared with the current state-of-the-art refactoring detection tool: RMiner. In experiments we applied RefDetect to 514 commits of 185 Java applications containing 5,058 true refactoring instances, achieving an f-score slightly better than that achieved by RMiner (87.3% vs. 86%). RefDetect clearly outperformed RMiner in method and class based refactorings, achieving f-scores respectively of 87.7% vs. 81.7% for method-level refactorings and 92.1% vs. 86.9% for class-level refactorings. To demonstrate the language-independence of RefDetect, we conducted a further study with four C++ applications, achieving high values for both precision (96.1%) and recall (94.1%). The achieved results indicate that RefDetect performs better than the current state of the art in refactoring detection and is demonstrably capable of handling different programming languages.

Highlights

  • Refactoring is a key practice in contemporary software development

  • (3) We compare RefDetect with the current state-of-the-art refactoring detection tool: RMiner [3], where an extensive empirical study on 514 commits from 185 open source Java repositories including 5,058 true refactorings are performed (Section IV-C). (4) We compare the memory consumption and execution time of our tool with RMiner [3], where the results show that RefDetect is efficient and performs better than RMiner in a number of key ways (Section IV-C4). (5) We evaluate our tool with four C++ applications including 305 true refactorings where 96.1% precision, and 94.1% recall achieved (Section IV-D)

  • 2) RESULTS FOR RQ1 & RQ2 IN JAVA APPLICATIONS Table 5 presents a comparison of precision and recall in Java applications between RefDetect and RMiner based on the dataset described in the previous section

Read more

Summary

Introduction

In Agile development, where little upfront design is performed, it is the practice that enables the design of the software to evolve It plays a central role in Test-Driven Development and is regarded as an essential practice in keeping the codebase ‘‘clean’’ and amenable to further development. It has attracted considerable interest from researcher, with a recent survey paper [1] finding over 3,000 papers on refactoring topics including refactoring at different levels (from architecture to code), applied in many domains e.g. cloud computing, mobile development, web. Development, and applied for many purposes including to improve software design (the most common goal of refactoring), and to improve software performance, software security, and most recently to reduce the energy consumption of software.

Objectives
Results
Conclusion
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.