Using FCA to Suggest Refactorings to Correct Design Defects
Design defects are poor design choices resulting in a hard-to- maintain software, hence their detection and correction are key steps of a disciplined software process aimed at yielding high-quality software artifacts. While modern structure- and metric-based techniques enable precise detection of design defects, the correction of the discovered defects, e.g., by means of refactorings, remains a manual, hence error-prone, activity. As many of the refactorings amount to re-distributing class members over a (possibly extended) set of classes, formal concept analysis (FCA) has been successfully applied in the past as a formal framework for refactoring exploration. Here we propose a novel approach for defect removal in object-oriented programs that combines the effectiveness of metrics with the theoretical strength of FCA. A case study of a specific defect, the Blob, drawn from the Azureus project illustrates our approach.
KeywordsDesign Defects Formal Concept Analysis Refactoring
Unable to display preview. Download preview PDF.
- 1.Nierstrasz, O., Ducasse, S., Arévalo, G.: Lessons Learned in Applying Formal Concept Analysis to Reverse Engineering. In: Ganter, B., Godin, R. (eds.) ICFCA 2005. LNCS (LNAI), vol. 3403, pp. 95–112. Springer, Heidelberg (2005)Google Scholar
- 2.Brown, W.J., Malveau, R.C., Brown, W.H., McCormick III, H.W., Mowbray, T.J.: Anti Patterns: Refactoring Software, Architectures, and Projects in Crisis, 1st edn. John Wiley and Sons, Chichester (1998)Google Scholar
- 3.Fenton, N., Pfleeger, S.L.: Software metrics: A rigorous and practical approach, 2nd edn. PWS Publishing Co., Boston (1997)Google Scholar
- 4.Fowler, M.: Refactoring – Improving the Design of Existing Code, 1st edn. Addison-Wesley, Reading (1999)Google Scholar
- 5.Guéhéneuc, Y.-G.: A reverse engineering tool for precise class diagrams. In: Singer, J., Lutfiyya, H. (eds.) Proceedings of the 14th IBM Centers for Advanced Studies Conference, pp. 28–41. ACM Press, New York (2004)Google Scholar
- 6.Huchard, M., Leblanc, H.: Computing interfaces in java. In: ASE, pp. 317–320 (2000)Google Scholar
- 8.Open source project. Azureus (June 2003)Google Scholar