Identification of Move Method Refactoring Opportunities

被引:266
|
作者
Tsantalis, Nikolaos [1 ]
Chatzigeorgiou, Alexander [1 ]
机构
[1] Univ Macedonia, Dept Appl Math, Thessaloniki 54006, Greece
关键词
Move Method refactoring; Feature Envy; object-oriented design; Jaccard distance; design quality; SOFTWARE; METRICS;
D O I
10.1109/TSE.2009.1
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Placement of attributes/methods within classes in an object-oriented system is usually guided by conceptual criteria and aided by appropriate metrics. Moving state and behavior between classes can help reduce coupling and increase cohesion, but it is nontrivial to identify where such refactorings should be applied. In this paper, we propose a methodology for the identification of Move Method refactoring opportunities that constitute a way for solving many common Feature Envy bad smells. An algorithm that employs the notion of distance between system entities (attributes/methods) and classes extracts a list of behavior-preserving refactorings based on the examination of a set of preconditions. In practice, a software system may exhibit such problems in many different places. Therefore, our approach measures the effect of all refactoring suggestions based on a novel Entity Placement metric that quantifies how well entities have been placed in system classes. The proposed methodology can be regarded as a semi-automatic approach since the designer will eventually decide whether a suggested refactoring should be applied or not based on conceptual or other design quality criteria. The evaluation of the proposed approach has been performed considering qualitative, metric, conceptual, and efficiency aspects of the suggested refactorings in a number of open-source projects.
引用
收藏
页码:347 / 367
页数:21
相关论文
共 50 条
  • [1] Identification of opportunities for move method refactoring using decision theory
    Boonkwan, Siriwan
    Muenchaisri, Pornsiri
    Lecture Notes in Electrical Engineering, 2015, 339 : 877 - 884
  • [2] c-JRefRec: Change-Based Identification of Move Method Refactoring Opportunities
    Ujihara, Naoya
    Ouni, Ali
    Ishio, Takashi
    Inoue, Katsuro
    2017 IEEE 24TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), 2017, : 482 - 486
  • [3] Identification of Extract Method Refactoring Opportunities
    Tsantalis, Nikolaos
    Chatzigeorgiou, Alexander
    13TH EUROPEAN CONFERENCE ON SOFTWARE MAINTENANCE AND REENGINEERING: CSMR 2009, PROCEEDINGS, 2009, : 119 - 128
  • [4] Identifying the move method refactoring opportunities based on evolutionary algorithm
    Pan, Wei-Feng
    Wang, Jing
    Wang, Mu-Chou
    INTERNATIONAL JOURNAL OF MODELLING IDENTIFICATION AND CONTROL, 2013, 18 (02) : 182 - 189
  • [5] JMove: A novel heuristic and tool to detect move method refactoring opportunities
    Terra, Ricardo
    Valente, Marco Tulio
    Miranda, Sergio
    Sales, Vitor
    JOURNAL OF SYSTEMS AND SOFTWARE, 2018, 138 : 19 - 36
  • [6] Predicting move method refactoring opportunities in object-oriented code
    Al Dallal, Jehad
    INFORMATION AND SOFTWARE TECHNOLOGY, 2017, 92 : 105 - 120
  • [7] Identification of extract method refactoring opportunities for the decomposition of methods
    Tsantalis, Nikolaos
    Chatzigeorgiou, Alexander
    JOURNAL OF SYSTEMS AND SOFTWARE, 2011, 84 (10) : 1757 - 1782
  • [8] Identification of generalization refactoring opportunities
    Hui Liu
    Zhendong Niu
    Zhiyi Ma
    Weizhong Shao
    Automated Software Engineering, 2013, 20 : 81 - 110
  • [9] Identification of generalization refactoring opportunities
    Liu, Hui
    Niu, Zhendong
    Ma, Zhiyi
    Shao, Weizhong
    AUTOMATED SOFTWARE ENGINEERING, 2013, 20 (01) : 81 - 110
  • [10] RMove: Recommending Move Method Refactoring Opportunities using Structural and Semantic Representations of Code
    Cui, Di
    Wang, Siqi
    Luo, Yong
    Li, Xingyu
    Dai, Jie
    Wang, Lu
    Li, Qingshan
    2022 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2022), 2022, : 281 - 292