Making Refactoring Safer through Impact Analysis

  • Melina Mongiovi UFCG
  • Rohit Gheyi UFCG

Resumo


Developers use regression tests and refactoring tools to ensure that the refactoring preserves the behavior of the program. However, refactoring tools may have bugs. In addition, some studies revealed that in real projects the test suite may be inappropriate to test refactorings. We propose an approach for evaluating whether a transformation is behavior preserving by automatically generating tests for the entities impacted by the change. We evaluate it in a set of 45 transformations and to a technique to test refactoring implementations. We identify behavioral changes previously undetected in transformations applied to real systems (from 20 LOC to 79 KLOC). Furthermore, we reduce on average 60% the total time to test 18 refactoring implementations of Eclipse and JRRT.

Referências

[Borba et al. 2004] Borba, P., Sampaio, A., Cavalcanti, A., and Cornélio, M. (2004). Algebraic reasoning for object-oriented programming. SCP, 52:53–100.

[Mongiovi 2011] Mongiovi, M. (2011). Safira: A tool for evaluating behavior preservation. Student Research Competition at SPLASH, pages 213–214.

[Mongiovi et al. 2013] Mongiovi, M., Gheyi, R., Soares, G., Teixeira, L., and Borba, P. (2013). Making refactoring safer through impact analysis. SCP. In press.

[Murphy-Hill et al. 2012] Murphy-Hill, E., Parnin, C., and Black, A. (2012). How we refactor, and how we know it. IEEE TSE, 38(1):5–18.

[Opdyke 1992] Opdyke, W. (1992). Refactoring Object-Oriented frameworks. PhD thesis, University of Illinois at Urbana-Champaign.

[Pacheco et al. 2007] Pacheco, C., Lahiri, S. K., Ernst, M., and Ball, T. (2007). Feedbackdirected random test generation. ICSE, pages 75–84.

[Rachatasumrit and Kim 2012] Rachatasumrit, N. and Kim, M. (2012). An empirical investigation into the impact of refactoring on regression testing. ICSM, pages 357–366.

[Ren et al. 2004] Ren, X., Shah, F., Tip, F., Ryder, B. G., and Chesley, O. (2004). Chianti: a tool for change impact analysis of Java programs. OOPSLA, pages 432–448.

[Schäfer and de Moor 2010] Schäfer, M. and de Moor, O. (2010). Specifying and implementing refactorings. OOPSLA, pages 286–301.

[Silva et al. 2008] Silva, L., Sampaio, A., and Liu, Z. (2008). Laws of object-orientation with reference semantics. SEFM, pages 217–226.

[Soares et al. 2013a] Soares, G., Gheyi, R., and Massoni, T. (2013a). Automated behavioral testing of refactoring engines. IEEE TSE, 39:147–162.

[Soares et al. 2013b] Soares, G., Gheyi, R., Murphy-Hill, E., and Johnson, B. (2013b). Comparing approaches to analyze refactoring activity on software repositories. JSS, 86:1006–1022.

[Soares et al. 2010] Soares, G., Gheyi, R., Serey, D., and Massoni, T. (2010). Making program refactoring safer. IEEE Software, 27:52–57.

[Soares et al. 2011] Soares, G., Mongiovi, M., and Gheyi, R. (2011). Identifying overly strong conditions in refactoring implementations. ICSM, pages 173–182.

[Steimann and Thies 2009] Steimann, F. and Thies, A. (2009). From public to private to absent: Refactoring Java programs under constrained accessibility. ECOOP, pages 419–443.

[Zhang et al. 2012] Zhang, L., Kim, M., and Khurshid, S. (2012). FaultTracer: a change impact and regression fault analysis tool for evolving Java programs. FSE, pages 40:1– 40:4.
Publicado
28/07/2014
Como Citar

Selecione um Formato
MONGIOVI, Melina; GHEYI, Rohit. Making Refactoring Safer through Impact Analysis. In: CONCURSO DE TESES E DISSERTAÇÕES (CTD), 27. , 2014, Brasília. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2014 . p. 79-84. ISSN 2763-8820.