Title :
Scaling Testing of Refactoring Engines
Author :
Mongiovi, Melina ; Mendes, Gilson ; Gheyi, Rohit ; Soares, Gustavo ; Ribeiro, Manoel
Author_Institution :
Fed. Univ. of Campina Grande, Campina Grande, Brazil
fDate :
Sept. 29 2014-Oct. 3 2014
Abstract :
Proving refactoring sound with respect to a formal semantics is considered a challenge. In practice, developers write test cases to check their refactoring implementations. However, it is difficult and time consuming to have a good test suite since it requires complex inputs (programs) and an oracle to check whether it is possible to apply the transformation. If it is possible, the resulting program must preserve the observable behavior. There are some automated techniques for testing refactoring engines. Nevertheless, they may have limitations related to the program generator (exhaustiveness, setup, expressiveness), automation (types of oracles, bug categorization), time consumption or kinds of refactorings that can be tested. In this paper, we extend our previous technique to test refactoring engines. We improve expressiveness of the program generator for testing more kinds of refactorings, such as Extract Function. Moreover, developers just need to specify the input´s structure in a declarative language. They may also set the technique to skip some consecutive test inputs to improve performance. We evaluate our technique in 18 refactoring implementations of Java (Eclipse and JRRT) and C (Eclipse). We identify 76 bugs (53 new bugs) related to compilation errors, behavioral changes, and overly strong conditions. We also compare the impact of the skip on the time consumption and bug detection in our technique. By using a skip of 25 in the program generator, it reduces in 96% the time to test the refactoring implementations while missing only 3.9% of the bugs. In a few seconds, it finds the first failure related to compilation error or behavioral change.
Keywords :
C language; Java; automatic programming; program compilers; program debugging; program testing; software maintenance; C language; Eclipse; JRRT; Java language; automated techniques; behavioral changes; bug categorization; compilation errors; complex inputs; consecutive test inputs; declarative language; extract function; formal semantics; input structure; oracle types; performance improvement; program automation; program exhaustiveness; program generator expressiveness improvement; program setup; refactoring engine testing; refactoring implementations; refactoring types; scaling testing; test suite; test time reduction; time consumption; Automatic programming; Automation; Computer bugs; Engines; Java; Metals; Testing; Refactoring; automated testing; program generation;
Conference_Titel :
Software Maintenance and Evolution (ICSME), 2014 IEEE International Conference on
Conference_Location :
Victoria, BC
DOI :
10.1109/ICSME.2014.59