Identification and application of Extract Class refactorings in object-oriented systems

被引:92
作者
Fokaefs, Marios [1 ]
Tsantalis, Nikolaos [1 ]
Stroulia, Eleni [1 ]
Chatzigeorgiou, Alexander [2 ]
机构
[1] Univ Alberta, Dept Comp Sci, Edmonton, AB, Canada
[2] Univ Macedonia, Dept Appl Informat, Thessaloniki, Greece
关键词
Refactoring; Software reengineering; Object-oriented programming; Clustering; COHESION;
D O I
10.1016/j.jss.2012.04.013
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Refactoring is recognized as an essential practice in the context of evolutionary and agile software development. Recognizing the importance of the practice, modern IDEs provide some support for low-level refactorings. A notable exception in the list of supported refactorings is the "Extract Class" refactoring. which is conceived to simplify large, complex, unwieldy and less cohesive classes. In this work, we describe a method and a tool, implemented as an Eclipse plugin, designed to fulfill exactly this need. Our method involves three steps: (a) recognition of Extract Class opportunities. (b) ranking of the identified opportunities in terms of the improvement each one is anticipated to bring about to the system design, and (c) fully automated application of the refactoring chosen by the developer. The first step relies on an agglomerative clustering algorithm, which identifies cohesive sets of class members within the system classes. The second step relies on the Entity Placement metric as a measure of design quality. Through a set of experiments we have shown that the tool is able to identify and extract new classes that developers recognize as "coherent concepts" and improve the design quality of the underlying system. (C) 2012 Elsevier Inc. All rights reserved.
引用
收藏
页码:2241 / 2260
页数:20
相关论文
共 50 条
[1]  
[Anonymous], 2003, ALAN APT SERIES
[2]  
Anquetil N., 1999, 6 WORK C REV ENG
[3]  
Bavota G., 2010, EARLY RES ACHIEVEMEN
[4]   Identifying Extract Class refactoring opportunities using structural and semantic cohesion measures [J].
Bavota, Gabriele ;
De Lucia, Andrea ;
Oliveto, Rocco .
JOURNAL OF SYSTEMS AND SOFTWARE, 2011, 84 (03) :397-414
[5]  
Bavota Gabriele., P IEEEACM INT C AUTO, DOI DOI 10.1145/1858996.1859024
[6]   A Unified Framework for Cohesion Measurement in Object-Oriented Systems [J].
Briand L.C. ;
Daly J.W. ;
Wüst J. .
Empirical Software Engineering, 1998, 3 (1) :65-117
[7]   Evaluating object-oriented designs with link analysis [J].
Chatzigeorgiou, A ;
Xanthos, S ;
Stephanides, G .
ICSE 2004: 26TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, PROCEEDINGS, 2004, :656-665
[8]   Mathematical assessment of object-oriented design quality [J].
Chatzigeorgiou, A .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2003, 29 (11) :1050-1053
[9]  
Cormen T., 2001, Introduction to Algorithms
[10]   The Complexity of Computing a Nash Equilibrium [J].
Daskalakis, Constantinos ;
Goldberg, Paul W. ;
Papadimitriou, Christos H. .
COMMUNICATIONS OF THE ACM, 2009, 52 (02) :89-97