Reducing Subjectivity in Code Smells Detection: Experimenting with the Long Method

Sérgio Bryton, Fernando Brito e Abreu, Miguel P. Monteiro · 2010

Guidelines for refactoring are meant to improve software systems internal quality and are widely acknowledged as among software’s best practices. However, such guidelines remain mostly qualitative in nature. As a result, judgments on how to conduct refactoring processes remain mostly subjective and therefore non-automatable, prone to errors and unrepeatable. The detection of the Long Method code smell is an example. To address this problem, this paper proposes a technique to detect Long Method objectively and automatically, using a Binary Logistic Regression model calibrated by expert’s knowledge. The results of an experiment illustrating the use of this technique are reported.

Read the paper · More papers on PaperTik