Defesa de Tese de Doutorado N.º 37 - Everton Leandro Galdino Alves, em 07/04, às 08hs

postado em 12 de mar de 2015 13:37 por Franklin de Souza Ramalho
Candidato: Everton Leandro Galdino Alves
Título do trabalho: Early Detection of Manual Refactoring Faults
Orientador(es): Patricia Duarte de Lima Machado e  Tiago Lima Massoni

Data: 7/4/2015
Horário: 8h
Local: SPLAB

Banca examinadora: Patricia Duarte de Lima Machado e  Tiago Lima Massoni (orientadores), Roberta Souza Coelho (UFRN), Paulo Henrique Monteiro Borba (UFPE), Franklin de Souza Ramalho (UFCG), Rohit Gheyi (UFCG).

Resumo: A recent study states that about 90% of refactorings are done manually. Manual refactoring edits are error prone, as refactoring requires developers to coordinate related transformations and to understand the complex inter-relationship between affected files, variables, and methods. In this context, regression tests suites are often used assafety net for decreasing the chances of introducing behavior changes while refactoring. However, due to the high costs related to handling massive test suites, there is a need for optimizing the testing execution. Test case prioritization techniques propose new test execution orders fostering early fault detection. However, existing general-purpose prioritization techniques are not specifically designed for detecting refactoring-related faults. In this work we propose a refactoringaware strategy – RBA (Refactoring-Based Approach) – for prioritizing regression test case execution. RBA reorders an existing test suite, according to a set of proposed Refactoring Fault Models (RFMs), which comprise the impact locations certain refactoring edits. Although being the most used refactoring validation strategy in practice, regression suites are often inadequate. Inadequate test suites may prevent developers from initiating or performing refactorings due to the risk of introducing bugs. To complement the testing validation we propose RefDistiller, a static analysis approach for detecting missing and extra edits that deviate from pure refactoring and thus may affect a program’s behavior. Both strategies (RBA and RefDistiller) focus on Java/JUnit systems and on a set of the most common refactoring types. Our evaluation shows show that RBA improves by 71% the position of the first faultrevealing test case, also providing a better grouping rate (73% higher) for test cases in the prioritized sequence, when compared to well-known general purpose techniques. Regarding RefDistiller, it detects 97% of all faults from our data set with seeded refactoring faults, of which 24% are not detected by generated test suites. Moreover, in a study with open source projects, RefDistiller detects 22.1 times more anomalies than testing, with 94% precision on average. Those results show that (i) RBA can considerably improve prioritization during perfective evolution, both by increasing fault-detection rates as well as by helping to pinpoint defects introduced by an incorrect application of refactoring; and (ii) RefDisitller effectively complements dynamic analysis by finding additional anomalies, while providing extra information that help fault debugging/fixing.