Identification of Extract Method Refactoring Opportunities
Extract method has been recognized as one of the most important refactorings, since it decomposes large methods and can be used in combination with other refactorings for fixing a variety of design problems. However, existing tools and methodologies support extraction of methods based on a set of st...
Saved in:
Published in | 2009 13th European Conference on Software Maintenance and Reengineering pp. 119 - 128 |
---|---|
Main Authors | , |
Format | Conference Proceeding |
Language | English |
Published |
IEEE
01.01.2009
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | Extract method has been recognized as one of the most important refactorings, since it decomposes large methods and can be used in combination with other refactorings for fixing a variety of design problems. However, existing tools and methodologies support extraction of methods based on a set of statements selected by the user in the original method. The goal of the proposed methodology is to automatically identify extract method refactoring opportunities and present them as suggestions to the designer of an object-oriented system. The suggested refactorings adhere to three principles: the extracted code should contain the complete computation of a given variable declared in the original method, the behavior of the program should be preserved after the application of the refactoring, and the extracted code should not be excessively duplicated in the original method. The proposed approach is based on the union of static slices that result from the application of a block-based slicing technique. The soundness of the identified refactoring opportunities has been evaluated by an independent designer on the system that he developed. |
---|---|
ISBN: | 1424437555 0769535895 9781424437559 9780769535890 |
ISSN: | 1534-5351 2640-7574 |
DOI: | 10.1109/CSMR.2009.23 |