Methodbook: Recommending Move Method Refactorings via Relational Topic Models

被引:111
作者
Bavota, Gabriele [1 ]
Oliveto, Rocco [2 ,3 ]
Gethers, Malcom [4 ]
Poshyvanyk, Denys [5 ]
De Lucia, Andrea [6 ]
机构
[1] Univ Sannio, Dept Engn, Benevento, Italy
[2] Univ Molise, Dept Biosci & Terr, Pesche, IS, Italy
[3] Univ Molise, Lab Comp Sci & Sci Computat, Pesche, IS, Italy
[4] Univ Maryland Baltimore Cty, Dept Informat Syst, Baltimore, MD 21250 USA
[5] Coll William & Mary, Williamsburg, VA 23185 USA
[6] Univ Salerno, Dept Management & Informat Technol, Fisciano, SA, Italy
关键词
Refactoring; relational topic models; empirical studies; COHESION; VALIDATION; METRICS;
D O I
10.1109/TSE.2013.60
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
During software maintenance and evolution the internal structure of the software system undergoes continuous changes. These modifications drift the source code away from its original design, thus deteriorating its quality, including cohesion and coupling of classes. Several refactoring methods have been proposed to overcome this problem. In this paper we propose a novel technique to identify Move Method refactoring opportunities and remove the Feature Envy bad smell from source code. Our approach, coined as Methodbook, is based on relational topic models (RTM), a probabilistic technique for representing and modeling topics, documents (in our case methods) and known relationships among these. Methodbook uses RTM to analyze both structural and textual information gleaned from software to better support move method refactoring. We evaluated Methodbook in two case studies. The first study has been executed on six software systems to analyze if the move method operations suggested by Methodbook help to improve the design quality of the systems as captured by quality metrics. The second study has been conducted with eighty developers that evaluated the refactoring recommendations produced by Methodbook. The achieved results indicate that Methodbook provides accurate and meaningful recommendations for move method refactoring operations.
引用
收藏
页码:671 / 694
页数:24
相关论文
共 58 条
  • [1] Abadi A., 2009, P 3 WORKSH REF TOOLS
  • [2] [Anonymous], PRACTICAL NONPARAMET
  • [3] [Anonymous], 2007, Proceedings of the IEEE/ACM International Conference on Automated Software Engineering
  • [4] [Anonymous], 1998, AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis
  • [5] [Anonymous], 2010, IEEE INT C SOFTWARE
  • [6] [Anonymous], 2006, P 2006 INT WORKSH MI
  • [7] [Anonymous], P 1 INT SOFTW METR S
  • [8] [Anonymous], 2010, ASE 10 P IEEE ACM IN, DOI DOI 10.1145/1858996.1859024
  • [9] [Anonymous], 1999, Modern Information Retrieval
  • [10] Evaluating the effect of a delegated versus centralized control style on the maintainability of object-oriented software
    Arisholm, E
    Sjoberg, DIK
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2004, 30 (08) : 521 - 534