Dynamic Ranking of Refactoring Menu Items for Integrated Development Environment

Software refactoring is popular and thus most mainstream IDEs, e.g., Eclipse, provide a top level menu, especially for refactoring activities. The refactoring menu is designed to facilitate refactorings, and it has become one of the most commonly used menus. However, to support a large number of ref...

Full description

Bibliographic Details
Main Authors: Thida Oo, Hui Liu, Bridget Nyirongo
Format: Article
Language:English
Published: IEEE 2018-01-01
Series:IEEE Access
Subjects:
Online Access:https://ieeexplore.ieee.org/document/8552339/
_version_ 1818875953926897664
author Thida Oo
Hui Liu
Bridget Nyirongo
author_facet Thida Oo
Hui Liu
Bridget Nyirongo
author_sort Thida Oo
collection DOAJ
description Software refactoring is popular and thus most mainstream IDEs, e.g., Eclipse, provide a top level menu, especially for refactoring activities. The refactoring menu is designed to facilitate refactorings, and it has become one of the most commonly used menus. However, to support a large number of refactoring types, the refactoring menu contains a long list of menu items. As a result, it is tedious to select the intended menu item from the lengthy menu. To facilitate the menu selection, in this paper, we propose an approach to dynamic ranking of refactoring menu items for IDE. We put the most likely refactoring menu item on the top of the refactoring menu according to developers' source code selection and code smells associated with the selected source code. The ranking is dynamic because it changes frequently according to the context. First, we collect the refactoring history of the open source applications and detect the code smells. Based on the refactoring history, we design questionnaires and analyze the responses from developers to discover the source code selection patterns for different refactoring types. Subsequently, we analyze the relationship between code smells associated with the refactoring software entities and the corresponding refactoring types. Finally, based on the preceding analysis, we calculate the likelihood of different refactoring types to be applied when a specific part of source code is selected, and rank the menu items according to the resulting likelihood. We conduct a case study to evaluate the proposed approach. Evaluation results suggest that the proposed approach is accurate, and in most cases (95.69%), it can put the intended refactoring menu item on the top of the menu.
first_indexed 2024-12-19T13:34:41Z
format Article
id doaj.art-034ce0bbc4df4ac49f1be3700af7a6f9
institution Directory Open Access Journal
issn 2169-3536
language English
last_indexed 2024-12-19T13:34:41Z
publishDate 2018-01-01
publisher IEEE
record_format Article
series IEEE Access
spelling doaj.art-034ce0bbc4df4ac49f1be3700af7a6f92022-12-21T20:19:15ZengIEEEIEEE Access2169-35362018-01-016760257603510.1109/ACCESS.2018.28837698552339Dynamic Ranking of Refactoring Menu Items for Integrated Development EnvironmentThida Oo0https://orcid.org/0000-0002-8215-9407Hui Liu1Bridget Nyirongo2School of Computer Science and Technology, Beijing Institute of Technology, Beijing, ChinaSchool of Computer Science and Technology, Beijing Institute of Technology, Beijing, ChinaSchool of Computer Science and Technology, Beijing Institute of Technology, Beijing, ChinaSoftware refactoring is popular and thus most mainstream IDEs, e.g., Eclipse, provide a top level menu, especially for refactoring activities. The refactoring menu is designed to facilitate refactorings, and it has become one of the most commonly used menus. However, to support a large number of refactoring types, the refactoring menu contains a long list of menu items. As a result, it is tedious to select the intended menu item from the lengthy menu. To facilitate the menu selection, in this paper, we propose an approach to dynamic ranking of refactoring menu items for IDE. We put the most likely refactoring menu item on the top of the refactoring menu according to developers' source code selection and code smells associated with the selected source code. The ranking is dynamic because it changes frequently according to the context. First, we collect the refactoring history of the open source applications and detect the code smells. Based on the refactoring history, we design questionnaires and analyze the responses from developers to discover the source code selection patterns for different refactoring types. Subsequently, we analyze the relationship between code smells associated with the refactoring software entities and the corresponding refactoring types. Finally, based on the preceding analysis, we calculate the likelihood of different refactoring types to be applied when a specific part of source code is selected, and rank the menu items according to the resulting likelihood. We conduct a case study to evaluate the proposed approach. Evaluation results suggest that the proposed approach is accurate, and in most cases (95.69%), it can put the intended refactoring menu item on the top of the menu.https://ieeexplore.ieee.org/document/8552339/Software developmentsoftware refactoringmenu rankingIDE
spellingShingle Thida Oo
Hui Liu
Bridget Nyirongo
Dynamic Ranking of Refactoring Menu Items for Integrated Development Environment
IEEE Access
Software development
software refactoring
menu ranking
IDE
title Dynamic Ranking of Refactoring Menu Items for Integrated Development Environment
title_full Dynamic Ranking of Refactoring Menu Items for Integrated Development Environment
title_fullStr Dynamic Ranking of Refactoring Menu Items for Integrated Development Environment
title_full_unstemmed Dynamic Ranking of Refactoring Menu Items for Integrated Development Environment
title_short Dynamic Ranking of Refactoring Menu Items for Integrated Development Environment
title_sort dynamic ranking of refactoring menu items for integrated development environment
topic Software development
software refactoring
menu ranking
IDE
url https://ieeexplore.ieee.org/document/8552339/
work_keys_str_mv AT thidaoo dynamicrankingofrefactoringmenuitemsforintegrateddevelopmentenvironment
AT huiliu dynamicrankingofrefactoringmenuitemsforintegrateddevelopmentenvironment
AT bridgetnyirongo dynamicrankingofrefactoringmenuitemsforintegrateddevelopmentenvironment