Standard

Recommendation of Move Method Refactoring Using Path-Based Representation of Code. / Kurbatova, Zarina; Veselov, Ivan; Golubev, Yaroslav; Bryksin, Timofey.

2020. 315-322.

Research output: Contribution to conferencePaperpeer-review

Harvard

APA

Vancouver

Author

BibTeX

@conference{6a5010b607af49b9b11a07fc95fda5ce,
title = "Recommendation of Move Method Refactoring Using Path-Based Representation of Code",
abstract = "Software refactoring plays an important role in increasing code quality. One of the most popular refactoring types is the Move Method refactoring. It is usually applied when a method depends more on members of other classes than on its own original class. Several approaches have been proposed to recommend Move Method refactoring automatically. Most of them are based on heuristics and have certain limitations (e.g., they depend on the selection of metrics and manually-defined thresholds). In this paper, we propose an approach to recommend Move Method refactoring based on a path-based representation of code called code2vec that is able to capture the syntactic structure and semantic information of a code fragment. We use this code representation to train a machine learning classifier suggesting to move methods to more appropriate classes. We evaluate the approach on two publicly available datasets: a manually compiled dataset of well-known open-source projects and a synthetic dataset with automatically injected code smell instances. The results show that our approach is capable of recommending accurate refactoring opportunities and outperforms JDeodorant and JMove, which are state of the art tools in this field.",
keywords = "Automatic Refactoring Recommendation, Code Smells, Feature Envy, Move Method Refactoring, Path-based Representation",
author = "Zarina Kurbatova and Ivan Veselov and Yaroslav Golubev and Timofey Bryksin",
year = "2020",
month = jun,
day = "27",
doi = "10.1145/3387940.3392191",
language = "English",
pages = "315--322",

}

RIS

TY - CONF

T1 - Recommendation of Move Method Refactoring Using Path-Based Representation of Code

AU - Kurbatova, Zarina

AU - Veselov, Ivan

AU - Golubev, Yaroslav

AU - Bryksin, Timofey

PY - 2020/6/27

Y1 - 2020/6/27

N2 - Software refactoring plays an important role in increasing code quality. One of the most popular refactoring types is the Move Method refactoring. It is usually applied when a method depends more on members of other classes than on its own original class. Several approaches have been proposed to recommend Move Method refactoring automatically. Most of them are based on heuristics and have certain limitations (e.g., they depend on the selection of metrics and manually-defined thresholds). In this paper, we propose an approach to recommend Move Method refactoring based on a path-based representation of code called code2vec that is able to capture the syntactic structure and semantic information of a code fragment. We use this code representation to train a machine learning classifier suggesting to move methods to more appropriate classes. We evaluate the approach on two publicly available datasets: a manually compiled dataset of well-known open-source projects and a synthetic dataset with automatically injected code smell instances. The results show that our approach is capable of recommending accurate refactoring opportunities and outperforms JDeodorant and JMove, which are state of the art tools in this field.

AB - Software refactoring plays an important role in increasing code quality. One of the most popular refactoring types is the Move Method refactoring. It is usually applied when a method depends more on members of other classes than on its own original class. Several approaches have been proposed to recommend Move Method refactoring automatically. Most of them are based on heuristics and have certain limitations (e.g., they depend on the selection of metrics and manually-defined thresholds). In this paper, we propose an approach to recommend Move Method refactoring based on a path-based representation of code called code2vec that is able to capture the syntactic structure and semantic information of a code fragment. We use this code representation to train a machine learning classifier suggesting to move methods to more appropriate classes. We evaluate the approach on two publicly available datasets: a manually compiled dataset of well-known open-source projects and a synthetic dataset with automatically injected code smell instances. The results show that our approach is capable of recommending accurate refactoring opportunities and outperforms JDeodorant and JMove, which are state of the art tools in this field.

KW - Automatic Refactoring Recommendation

KW - Code Smells

KW - Feature Envy

KW - Move Method Refactoring

KW - Path-based Representation

UR - https://www.mendeley.com/catalogue/bc15ff7c-f740-3b2b-931c-5f5fff8abcf3/

UR - https://arxiv.org/abs/2002.06392

UR - http://www.scopus.com/inward/record.url?scp=85093099001&partnerID=8YFLogxK

U2 - 10.1145/3387940.3392191

DO - 10.1145/3387940.3392191

M3 - Paper

SP - 315

EP - 322

ER -

ID: 64761887