Making refactoring safer through impact analysis

被引:20
作者
Mongiovi, Melina [1 ]
Gheyi, Rohit [1 ]
Soares, Gustavo [1 ]
Teixeira, Leopoldo [2 ]
Borba, Paulo [2 ]
机构
[1] Univ Fed Campina Grande, Dept Comp & Syst, BR-58429900 Campina Grande, PB, Brazil
[2] Univ Fed Pernambuco, Informat Ctr, BR-50740540 Recife, PE, Brazil
关键词
Refactoring; Change impact analysis; OBJECT-ORIENTED CODE; !text type='JAVA']JAVA[!/text; TOOL;
D O I
10.1016/j.scico.2013.11.001
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Currently most developers have to apply manual steps and use test suites to improve confidence that transformations applied to object-oriented (OO) and aspect-oriented (AO) programs are correct. However, it is not simple to do manual reasoning, due to the nontrivial semantics of OO and AO languages. Moreover, most refactoring implementations contain a number of bugs since it is difficult to establish all conditions required for a transformation to be behavior preserving. In this article, we propose a tool (SAFEREFACTORIMPACT) that analyzes the transformation and generates tests only for the methods impacted by a transformation identified by our change impact analyzer (SAFIRA). We compare SAFEREFACTORIMPACT with our previous tool (SAFEREFACTOR) with respect to correctness, performance, number of methods passed to the automatic test suite generator, change coverage, and number of relevant tests generated in 45 transformations. SAFEREFACTORIMPACT identifies behavioral changes undetected by SAFEREFACTOR. Moreover, it reduces the number of methods passed to the test suite generator. Finally, SAFEREFACTORIMPACT has a better change coverage in larger subjects, and generates more relevant tests than SAFEREFACTOR. (C) 2013 Elsevier B.V. All rights reserved.
引用
收藏
页码:39 / 64
页数:26
相关论文
共 71 条
  • [1] [Anonymous], 2005, DESIGN PATTERNS ELEM
  • [2] [Anonymous], 2012, SOFTWARE TESTING VER
  • [3] [Anonymous], 1987, Statist Sci, DOI 10.1214/ss/1177013437
  • [4] Refactoring support for class library migration
    Balaban, I
    Tip, F
    Fuhrer, R
    [J]. ACM SIGPLAN NOTICES, 2005, 40 (10) : 265 - 279
  • [5] Baresi L., 2010, 2010 32nd International Conference on Software Engineering (ICSE), P281, DOI 10.1145/1810295.1810353
  • [6] EXPERIMENTATION IN SOFTWARE ENGINEERING
    BASILI, VR
    SELBY, RW
    HUTCHENS, DH
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1986, 12 (07) : 733 - 743
  • [7] Binkley D, 2005, PROC IEEE INT CONF S, P27
  • [8] Tool-supported refactoring of existing object-oriented code into aspects
    Binkley, David
    Ceccato, Mariano
    Harman, Mark
    Ricca, Filippo
    Tonella, Paolo
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2006, 32 (09) : 698 - 717
  • [9] Algebraic reasoning for object-oriented programming
    Borba, P
    Sampaio, A
    Cavalcanti, A
    Cornélio, M
    [J]. SCIENCE OF COMPUTER PROGRAMMING, 2004, 52 (1-3) : 53 - 100
  • [10] Coelho R, 2008, LECT NOTES COMPUT SC, V5142, P207, DOI 10.1007/978-3-540-70592-5_10