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
相关论文
共 50 条
  • [1] Recommending Move Method Refactorings using Dependency Sets
    Sales, Vitor
    Terra, Ricardo
    Miranda, Luis Fernando
    Valente, Marco Tulio
    2013 20TH WORKING CONFERENCE ON REVERSE ENGINEERING (WCRE), 2013, : 232 - 241
  • [2] Recommending refactorings via commit message analysis
    Rebai, Soumaya
    Kessentini, Marouane
    Alizadeh, Vahid
    Ben Sghaier, Oussama
    Kazman, Rick
    INFORMATION AND SOFTWARE TECHNOLOGY, 2020, 126
  • [3] Constrained Relational Topic Models
    Terragni, Silvia
    Fersini, Elisabetta
    Messina, Enza
    INFORMATION SCIENCES, 2020, 512 (581-594) : 581 - 594
  • [4] Discriminative Relational Topic Models
    Chen, Ning
    Zhu, Jun
    Xia, Fei
    Zhang, Bo
    IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, 2015, 37 (05) : 973 - 986
  • [5] Code Transformation Issues in Move-Instance-Method Refactorings
    Kim, Jongwook
    Batory, Don
    Gligoric, Milos
    2019 IEEE/ACM 3RD INTERNATIONAL WORKSHOP ON REFACTORING (IWOR 2019), 2019, : 17 - 22
  • [6] A Quality-oriented Approach to Recommend Move Method Refactorings
    Souza Couto, Christian Marlon
    Rocha, Henrique
    Terra, Ricardo
    PROCEEDINGS OF THE 17TH BRAZILIAN SYMPOSIUM ON SOFTWARE QUALITY (SBQS), 2015, : 11 - 20
  • [7] A Quality-oriented Approach to Recommend Move Method Refactorings
    Souza Couto, Christian Marlon
    Terra, Ricardo
    SBQS: PROCEEDINGS OF THE 18TH BRAZILIAN SYMPOSIUM ON SOFTWARE QUALITY, 2019, : 315 - 315
  • [8] Evaluation of Move Method refactorings recommendation algorithms: are we doing it right?
    Novozhilov, Evgenii
    Veselov, Ivan
    Pravilov, Mikhail
    Bryksin, Timofey
    2019 IEEE/ACM 3RD INTERNATIONAL WORKSHOP ON REFACTORING (IWOR 2019), 2019, : 23 - 26
  • [9] Recommendation of Move Method Refactorings Using Coupling, Cohesion and Contextual Similarity
    Rahman, Md. Masudur
    Riyadh, Rashed Rubby
    Rahman, Md. Rayhanur
    2017 IEEE INTERNATIONAL CONFERENCE ON IMAGING, VISION & PATTERN RECOGNITION (ICIVPR), 2017,
  • [10] A Topic Model for Recommending Movies via Linked Open Data
    Kabutoya, Yutaka
    Sumi, Robert
    Iwata, Tomoharu
    Uchiyama, Toshio
    Uchiyama, Tadasu
    2012 IEEE/WIC/ACM INTERNATIONAL CONFERENCE ON WEB INTELLIGENCE AND INTELLIGENT AGENT TECHNOLOGY (WI-IAT 2012), VOL 1, 2012, : 625 - 630