Two level dynamic approach for Feature Envy detection

S. Pradeep Kumar, Jitender Kumar Chhabra · 2014

Refactoring leads to more maintainable software. To refactor the code, it must be known which part of code needs to be refactored. For this purpose code smells are used. Detecting code smells in itself is a challenging task. In this paper we propose a technique based on dynamic analysis for the detection of Feature Envy code smell. Feature envy is a method level smell and occurs when a method is more interested in another class than its own class. Previous approaches detects feature envy by analyzing each method in the system, which incurs an overhead as those methods which are closely bounded to their classes are included in the detection mechanism. To tackle this problem, we have devised a two level mechanism. First level filters out the methods which are suspects of being feature envious and second level analyzes those suspects to identify the actual culprits. The proposed technique has been evaluated and compared with existing techniques.

Read the paper · More papers on PaperTik