Extract Method Refactoring by Successive Edge Contraction
Omkarendra Tiwari, Rushikesh K. Joshi

TL;DR
This paper introduces a novel segmentation approach for extract method refactoring using successive edge contraction on the Structure Dependence Graph, enabling language-independent identification of distinct functionalities within code.
Contribution
It presents a new method leveraging edge contractions on SDGs for automatic extraction of code functionalities, advancing refactoring techniques.
Findings
Effective in identifying functionalities in case studies
Language-independent approach demonstrated
Potential to improve automated refactoring tools
Abstract
Segmentation, a new approach based on successive edge contraction is introduced for extract method refactoring. It targets identification of distinct functionalities implemented within a method. Segmentation builds upon data and control dependencies among statements to extract functionalities from code by successive contraction of edges in the Structure Dependence Graph (SDG). Three edge contractions are explored, namely structural control edge contraction, exclusive data dependence edge contraction, and sequential data dependence edge contraction. The SDG is first constructed from the program, which is then collapsed into a segment graph that captures dependence between subtasks. An intermediate representation for data and control dependencies among statements keeps the technique language independent. The approach is evaluated on four case studies, including three from the open source…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Software Reliability and Analysis Research
