Identifying method friendships to remove the feature envy bad smell (NIER track)

  • Authors:
  • Rocco Oliveto;Malcom Gethers;Gabriele Bavota;Denys Poshyvanyk;Andrea De Lucia

  • Affiliations:
  • University of Molise, Pesche, Italy;The College of William and Mary, Williamsburg, VA, USA;University of Salerno, Fisciano, Italy;The College of William and Mary, Williamsburg, VA, USA;University of Salerno, Fisciano, Italy

  • Venue:
  • Proceedings of the 33rd International Conference on Software Engineering
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

We propose a novel approach to identify Move Method refactoring opportunities and remove the Feature Envy bad smell from source code. The proposed approach analyzes both structural and conceptual relationships between methods and uses Relational Topic Models to identify sets of methods that share several responsabilities, i.e., 'friend methods'. The analysis of method friendships of a given method can be used to pinpoint the target class (envied class) where the method should be moved in. The results of a preliminary empirical evaluation indicate that the proposed approach provides meaningful refactoring opportunities.