arrow
Return

Automatic method change suggestion to complement multi-entity edits

delete2020-01-01
delete5
delete
OA
AI
Z
Zijian Jiang
Y
Ye Wang
H
Hao Zhong
N
Na Meng *
DOI:10.1016/j.jss.2019.110441delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
When maintaining software, developers sometimes change multiple program entities (i.e., classes, methods, and fields) to fulfill one maintenance task. We call such complex changes multi-entity edits. Consistently and completely applying multi-entity edits can be challenging, because (1) the changes scatter in different entities and (2) the incorrectly edited code may not trigger any compilation or runtime error. This paper introduces CMSuggester, an approach to suggest complementary changes for multi-entity edits. Given a multi-entity edit that (i) adds a new field or method and (ii) modifies one or more methods to access the field or invoke the method, CMSuggester suggests other methods to co-change for the new field access or method invocation. The design of CMSuggester is motivated by our preliminary study, which reveals that co-changed methods usually access existing fields or invoke existing methods in common. Our evaluation shows that based on common field accesses, CMSuggester recommended method changes in 463 of 685 tasks with 70% suggestion accuracy; based on common method invocations, CMSuggester handled 557 of 692 tasks with 70% accuracy. Compared with prior work ROSE, TARMAQ, and Transitive Association Rules (TAR), CMSuggester recommended more method changes with higher accuracy. Our research can help developers correctly apply multi-entity edits. (C) 2019 Elsevier Inc. All rights reserved.
Keywords:
Multi-entity edit
Common field access
Common method invocation
Change suggestion
AI Summary

AI Summary

Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.

Journal

Journal of Systems and Software cover
Journal of Systems and Software
IF:
4.1
Papers:
5.5K
Citations:
8.4K

Organization

S
shanghai jiao tong university
Scholars:
15.7W
Papers: 11.7W
Citations: 159
Cited Papers

Cited Papers

errShare
errSave
GenProg: A Generic Method for Automatic Software Repair
err2012-01-01
err594
PREAI
errLe Goues, Claire; ThanhVu Nguyen; Forrest, Stephanie; Weimer, Westley
errShare
errSave
Aggregating Association Rules to Improve Change Recommendation
err2017-12-01
err13
PREAI
errRolfsnes, Thomas; Moonen, Leon; Di Alesio, Stefano; Behjati, Razieh; Binkley, Dave
errShare
errSave
Predicting source code changes by mining change history
err2004-09-01
err359
errOAAI
errYing, ATT; Murphy, GC; Ng, R; Chu-Carroll, MC
errShare
errSave
errShare
errSave
no more