Investigating and Recommending Co-Changed Entities for JavaScript Programs

02/15/2021
by   Zijian Jiang, et al.
0

JavaScript (JS) is one of the most popular programming languages due to its flexibility and versatility, but maintaining JS code is tedious and error-prone. In our research, we conducted an empirical study to characterize the relationship between co-changed software entities (e.g., functions and variables), and built a machine learning (ML)-based approach to recommend additional entity to edit given developers' code changes. Specifically, we first crawled 14,747 commits in 10 open-source projects; for each commit, we created one or more change dependency graphs (CDGs) to model the referencer-referencee relationship between co-changed entities. Next, we extracted the common subgraphs between CDGs to locate recurring co-change patterns between entities. Finally, based on those patterns, we extracted code features from co-changed entities and trained an ML model that recommends entities-to-change given a program commit. According to our empirical investigation, (1) three recurring patterns commonly exist in all projects; (2) 80 access the same variable(s), or contain similar statement(s); (3) our ML-based approach CoRec recommended entity changes with high accuracy (73 complements prior work because it suggests changes based on program syntax, textual similarity, as well as software history; it achieved higher accuracy than two existing tools in our evaluation.

READ FULL TEXT
research
05/22/2020

DevReplay: Automatic Repair with Editable Fix Pattern

Static analysis tools, or linters, detect violation of source code conve...
research
07/27/2023

Multilingual Code Co-Evolution Using Large Language Models

Many software projects implement APIs and algorithms in multiple program...
research
10/11/2021

Graph-Based Machine Learning Improves Just-in-Time Defect Prediction

The increasing complexity of today's software requires the contribution ...
research
08/10/2017

More Accurate Recommendations for Method-Level Changes

During the life span of large software projects, developers often apply ...
research
01/25/2022

Leveraging Structural Properties of Source Code Graphs for Just-In-Time Bug Prediction

The most common use of data visualization is to minimize the complexity ...
research
09/07/2023

Identifying Defect-Inducing Changes in Visual Code

Defects, or bugs, often form during software development. Identifying th...
research
12/15/2022

A Data Source Dependency Analysis Framework for Large Scale Data Science Projects

Dependency hell is a well-known pain point in the development of large s...

Please sign up or login with your details

Forgot password? Click here to reset