One solution to prevent the quality erosion of a software product is to maintain its quality by continuous refac- toring. However, refactoring is not always easy. Developers need to identify the piece of code that should be improved and decide how to rewrite it. Furthermore, refactoring can also be risky; that is, the modified code needs to be re-tested, so developers can see if they broke something. Many IDEs offer a range of refactorings to support so-called automatic refactoring, but tools which are really able to automatically refactor code smells are still under research. In this paper we introduce FaultBuster, a refactoring toolset which is able to support automatic refactoring: identifying the problematic code parts via static code analysis, running automatic algorithms to fix selected code smells, and executing integrated testing tools. In the heart of the toolset lies a refactoring framework to control the analysis and the execution of automatic algorithms. FaultBuster provides IDE plugins to interact with developers via popular IDEs (Eclipse, Netbeans and IntelliJ IDEA). All the tools were developed and tested in a 2-year project with 6 software development companies where thousands of code smells were identified and fixed in 5 systems having altogether over 5 million lines of code. Index Terms—Automatic refactoring, code smells, coding is- sues, antipatterns, SourceMeter, Columbus
[1]
Martin Fowler,et al.
Refactoring - Improving the Design of Existing Code
,
1999,
Addison Wesley object technology series.
[2]
Louis Wasserman.
Scalable, example-based refactorings with refaster
,
2013,
WRT '13.
[3]
Joshua Kerievsky,et al.
Refactoring to Patterns
,
2004,
XP/Agile Universe.
[4]
Tom Mens,et al.
A survey of software refactoring
,
2004,
IEEE Transactions on Software Engineering.
[5]
Fernando Kamei,et al.
What programmers say about refactoring tools?: an empirical investigation of stack overflow
,
2013,
WRT '13.
[6]
William F. Opdyke,et al.
Refactoring object-oriented frameworks
,
1992
.
[7]
Francesca Arcelli Fontana,et al.
On experimenting refactoring tools to remove code smells
,
2015,
XP Workshops.
[8]
Tibor Gyimóthy,et al.
A cost model based on software maintainability
,
2012,
2012 28th IEEE International Conference on Software Maintenance (ICSM).
[9]
Oscar Nierstrasz,et al.
Object-oriented reengineering patterns
,
2004,
Proceedings. 26th International Conference on Software Engineering.
[10]
Yania Crespo,et al.
Perspectives on automated correction of bad smells
,
2009,
IWPSE-Evol '09.
[11]
Serge Demeyer,et al.
A study of quality improvements by refactoring
,
2006
.