Domino Effect: Move More Methods Once A Method Is Moved

被引:107
作者
Liu, Hui [1 ]
Wu, Yuting [1 ]
Liu, Wenmei [1 ]
Liu, Qiurong [1 ]
Li, Chao [1 ]
机构
[1] Beijing Inst Technol, Sch Comp Sci & Technol, Beijing 100081, Peoples R China
来源
2016 IEEE 23RD INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), VOL 1 | 2016年
关键词
METHOD REFACTORING OPPORTUNITIES; IDENTIFICATION; VALIDATION;
D O I
10.1109/SANER.2016.14
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:1 / 12
页数:12
相关论文
共 38 条
  • [1] [Anonymous], SEQUENCES, DOI DOI 10.1109/SEQUEN.1997.666900
  • [2] A validation of object-oriented design metrics as quality indicators
    Basili, VR
    Briand, LC
    Melo, WL
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1996, 22 (10) : 751 - 761
  • [3] Methodbook: Recommending Move Method Refactorings via Relational Topic Models
    Bavota, Gabriele
    Oliveto, Rocco
    Gethers, Malcom
    Poshyvanyk, Denys
    De Lucia, Andrea
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2014, 40 (07) : 671 - 694
  • [4] Identifying Extract Class refactoring opportunities using structural and semantic cohesion measures
    Bavota, Gabriele
    De Lucia, Andrea
    Oliveto, Rocco
    [J]. JOURNAL OF SYSTEMS AND SOFTWARE, 2011, 84 (03) : 397 - 414
  • [5] Bavota Gabriele., 2010, Proceedings of the IEEE International Conference on Software Maintenance ICSM, P1
  • [6] Validation of the coupling dependency metric as a predictor of run-time failures and maintenance measures
    Binkley, AB
    Schach, SR
    [J]. PROCEEDINGS OF THE 1998 INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, 1998, : 452 - 455
  • [7] Butler S, 2011, LECT NOTES COMPUT SC, V6813, P130, DOI 10.1007/978-3-642-22655-7_7
  • [8] Dallal J. A., 2014, INFORM SOFTWARE TECH
  • [9] Demeyer S, 2000, ACM SIGPLAN NOTICES, V35, P166, DOI 10.1145/354222.353183
  • [10] Dig D, 2006, LECT NOTES COMPUT SC, V4067, P404