Talk by Rohit Gheyi on Aug 31, 2017

"Automated Testing of Refactoring Engines"
Speaker: Rohit Gheyi, Federal University of Campina Grande (UFCG), Brazil.
Time: 09:30 - 10:30
Room: 4A05

Defining and implementing refactorings is a nontrivial task since it is difficult to define preconditions to guarantee that the transformation preserves the program behavior. Therefore, refactoring engines may have overly weak preconditions, overly strong preconditions, and transformation issues related to the refactoring definition. In practice, developers manually write test cases to check their refactoring implementations. We find that 84% of the test suites of Eclipse and JRRT are concerned with identifying these kinds of bugs. However, bugs are still present. Researchers have proposed a number of techniques for testing refactoring engines. Nevertheless, they may have limitations related to the bug type, program generation, time consumption, and number of refactoring engines necessary to evaluate the implementations. In this work, we propose a technique to scale testing of refactoring engines by extending a previous technique. It automatically generates programs as test inputs using Dolly, a Java and C program generator. Our technique uses SafeRefactor to identify failures related to behavioral changes. Also, we propose a new oracle to evaluate whether refactoring preconditions are overly strong by disabling a subset of them. Finally, we present a technique to identify transformation issues related to the refactoring definition. We evaluate our technique in 28 refactoring implementations of Java (Eclipse and JRRT) and C (Eclipse) and find more than 120 bugs related to compilation errors, behavioral changes, overly strong preconditions, and transformation issues.

(A talk by Alexander Serebrenik will follow directly.)(At 13:00, in Aud 4, Jean Melo will defend his Ph.D. thesis.)