Domino effect: Move more methods once a method is moved

Hui Liu, Yuting Wu, Wenmei Liu, Qiurong Liu, Chao Li

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

11 Citations (Scopus)

Abstract

Software refactoring is a popular technology to improve the design of existing source code, and thus it is widely used to facilitate software evolution. Moving methods is one of the most popular refactorings. It helps to reduce coupling between classes and to improve cohesion of involved classes. However, it is difficult to manually identify such methods that should be moved. Consequently, a number of approaches and tools have been proposed to identify such methods based on source code metrics, change history, and textual information. In this paper we propose a new way to identify methods that should be moved. Whenever a method is moved, the approach checks other methods within the same class, and suggests to move the one with the greatest similarity and strongest relationship with the moved method. The rational is that similar and closely related methods should be moved together. The approach has been evaluated on open-source applications by comparing the recommended move method refactorings against refactoring histories of the involved applications. Our evaluation results show that the approach is accurate in recommending methods to be moved (average precision 76%) and in recommending destinations for such methods (average precision 83%). Our evaluation results also show that for a substantial percentage (27%) of move method refactorings, the proposed approach succeeds in identifying additional refactoring opportunities.

Original languageEnglish
Title of host publication2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016
PublisherInstitute of Electrical and Electronics Engineers Inc.
ISBN (Electronic)9781509018550
DOIs
Publication statusPublished - 20 May 2016
Event23rd IEEE International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016 - Suita, Osaka, Japan
Duration: 14 Mar 201618 Mar 2016

Publication series

Name2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016
Volume1

Conference

Conference23rd IEEE International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016
Country/TerritoryJapan
CitySuita, Osaka
Period14/03/1618/03/16

Fingerprint

Dive into the research topics of 'Domino effect: Move more methods once a method is moved'. Together they form a unique fingerprint.

Cite this