Publication | Closed Access
GEMS: An Extract Method Refactoring Recommender
26
Citations
24
References
2017
Year
Unknown Venue
Software MaintenanceEngineeringSoftware EngineeringSource Code AnalysisSoftware AnalysisText MiningNatural Language ProcessingInformation RetrievalData ScienceData MiningSoftware MiningCode GenerationKnowledge DiscoveryExtract MethodComputer ScienceMethod ExtractionCold-start ProblemCode RepresentationSoftware DesignCode RefactoringInformation Filtering SystemOpen Source RepositoriesProgram AnalysisSoftware TestingCollaborative Filtering
Extract Method is a widely used refactoring operation to improve method comprehension and maintenance. Much research has been done to extract codefragments within the method body to form a new method. Criteria used for identifying extractable code is usually centered around degrees of cohesiveness, coupling and length of the method. However, automatic method extraction techniques have not been highly successful, since it can be hard to concretizethe criteria. In this work, we present a novel system that learns these criteria for Extract Method refactorings from open source repositories. We extractstructural and functional features, which encode the concepts of complexity, cohesion and coupling in our learning model, and train it to extract suitablecode fragments from a given source of a method. Our tool, GEMS, recommends a ranked list of code fragments with high accuracy and greatspeed. We evaluated our approach on several open source repositories and compared it against three state-of-the-art approaches-SEMI, JExtract andJDeodorant. The results on these open-source data show the superiority of our machine-learning-based approach in terms of effectiveness. We develop GEMS asan Eclipse plugin, with the intention to support software reliability through method extraction.
| Year | Citations | |
|---|---|---|
Page 1
Page 1