Identification of generalization refactoring opportunities

  • Authors:
  • Hui Liu;Zhendong Niu;Zhiyi Ma;Weizhong Shao

  • Affiliations:
  • School of Computer Science and Technology, Beijing Institute of Technology, Beijing, China 100081;School of Computer Science and Technology, Beijing Institute of Technology, Beijing, China 100081;Key Laboratory of High Confidence Software Technologies, Peking University, Ministry of Education, Beijing, China 100871;Key Laboratory of High Confidence Software Technologies, Peking University, Ministry of Education, Beijing, China 100871

  • Venue:
  • Automated Software Engineering
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Generalization refactoring helps relate classes and share functions, including both interfaces and implementation, by inheritance. To apply generalization refactoring, developers should first identify potential generalization refactoring opportunities, i.e., software entities that might benefit from generalization refactoring. For non-trivial software systems, manual identification of these opportunities is challenging and time-consuming. However, to the best of our knowledge, no existing tools have been specifically designed for this task. As a result, people have to identify these opportunities manually or with the help of tools designed for other purposes, e.g., clone detectors. To this end, we propose a tool GenReferee (Generalization Referee) to identify potential refactoring opportunities according to conceptual relationship, implementation similarity, structural correspondence, and inheritance hierarchies. It was first calibrated on two non-trivial open source applications, and then evaluated on another three. Evaluation results suggest that the proposed approach is effective and efficient.