ABSTRACT
In many cases it is not sufficient to perform a refactoring only at one location of a software project. For example, refactorings may have to be performed consistently to several classes in the inheritance hierarchy, e.g. subclasses or implementing classes, to preserve equal behavior.In this paper we show how to detect incomplete refactorings - which can cause long standing bugs because some of them do not cause compiler errors - by analyzing software archives. To this end we reconstruct the class inheritance hierarchies, as well as refactorings on the level of methods. Then, we relate these refactorings to the corresponding hierarchy in order to find missing refactorings and thus, errors and inconsistencies that have been introduced in a software project at some point of the history.Finally. we demonstrate our approach by case studies on two open source projects.
- P. Cederqvist. Version Management with CVS. http://www.cvshome.org/docs/manual/.Google Scholar
- M. Fowler, K. Beck, J. Brant, W. Opdyke, and D. Roberts. Refactoring: Improving the Design of Existing Code. Addison-Wesley, 2001. Google ScholarDigital Library
- C. Görg and P. Weißgerber. Detecting and Visualizing Refactorings from Software Archives. In Proceedings of the 13th International Workshop on Program Comprehension (IWPC 2005), St. Louis, Missouri, U.S., 2005. Google ScholarDigital Library
- T. J. McCabe. A Complexity Measure. IEEE Transactions on Software Engineering, Vol. 2, 1976.Google Scholar
- T. J. Ostrand and E. J. Weyuker. A Tool for Mining Defect-Tracking Systems to Predict Fault-Prone Files. In Proc. International Workshop on Mining Software Repositories (MSR 2004), Edinburgh, Scotland, U.K., 2004.Google ScholarCross Ref
- O. N. Serge Demeyer, Stéphane Ducasse. Finding Refactorings via Change Metrics. In Proceedings of ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2000), Minneapolis, Minnesota, U.S., 2000. Google ScholarDigital Library
- The Eclipse Foundation. Eclipse Homepage. http://www.eclipse.org.Google Scholar
- T. Zimmermann and P. Weißgerber. Preprocessing CVS Data for Fine-Grained Analysis. In Proc. International Workshop on Mining Software Repositories (MSR 2004), Edinburgh, Scotland, U.K., 2004.Google ScholarDigital Library
Index Terms
- Error detection by refactoring reconstruction
Recommendations
Error detection by refactoring reconstruction
In many cases it is not sufficient to perform a refactoring only at one location of a software project. For example, refactorings may have to be performed consistently to several classes in the inheritance hierarchy, e.g. subclasses or implementing ...
Interaction awareness for aspect refactoring
AOAsia '13: Proceedings of the 8th international workshop on Advanced modularization techniquesAspect Refactoring includes two phases: aspect mining and aspect extraction. Aspect mining is used to identify crosscutting concerns from the OO program. Aspect extraction extracts the identified crosscutting concerns from the OO program and refactors ...
Comments