Investigating and Recommending Co-Changed Entities for JavaScript Programs
Zijian Jiang, Hao Zhong, Na Meng

TL;DR
This paper studies co-changed entities in JavaScript programs, identifies common patterns, and develops a machine learning approach to recommend related code changes, improving maintenance efficiency.
Contribution
It introduces a novel ML-based method, CoRec, that leverages co-change patterns and code features to recommend entities for editing during software maintenance.
Findings
Identified three recurring co-change patterns across projects.
80-90% of co-changed function pairs share invocation, variable access, or similar statements.
CoRec achieved 73-78% accuracy, outperforming existing tools.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Software Reliability and Analysis Research
