Zhenting Guo

dblp:366/2809 · DBLP profile ↗
← Back
2ranked-venue papers
1as first author
2since 2021 · last 2024
0009-0000-4519-1494ORCID · corroborated

Domains — the database's venue-derived domains; a paper can count in several

Software engineering, systems software and programming languages · 2 · 1 first-author · 2 since 2021
YearPublicationVenuePosition
2024 Method-Level Test-to-Code Traceability Link Construction by Semantic Correlation Learning
abstract
Test-to-code traceability links (TCTLs) establish links between test artifacts and code artifacts. These links enable developers and testers to quickly identify the specific pieces of code tested by particular test cases, thus facilitating more efficient debugging, regression testing, and maintenance activities. Various approaches, based on distinct concepts, have been proposed to establish method-level TCTLs, specifically linking unit tests to corresponding focal methods. Static methods, such as naming-convention-based methods, use heuristic- and similarity-based strategies. However, such methods face the following challenges: ① Developers, driven by specific scenarios and development requirements, may deviate from naming conventions, leading to TCTL identification failures. ② Static methods often overlook the rich semantics embedded within tests, leading to erroneous associations between tests and semantically unrelated code fragments. Although dynamic methods achieve promising results, they require the project to be compilable and the tests to be executable, limiting their usability. This limitation is significant for downstream tasks requiring massive test-code pairs, as not all projects can meet these requirements. To tackle the abovementioned limitations, we propose a novel static method-level TCTL approach, namedTestLinker. For the first challenge of existing static approaches,TestLinkerintroduces a two-phase TCTL framework to accommodate different project types in a triage manner. As for the second challenge, we employ thesemantic correlation learning, which learns and establishes the semantic correlations between tests and focal methods based on Pre-trained Code Models (PCMs).TestLinkerfurther establishes mapping rules to accurately link the recommended function name to the concrete production function declaration. Empirical evaluation on a meticulously labeled dataset reveals thatTestLinkersignificantly outperforms traditional static techniques, showing average F1-score improvements ranging from 73.48% to 202.00%. Moreover, compared to state-of-the-art dynamic methods,TestLinker, which only leverages static information, demonstrates comparable or even better performance, with an average F1-score increase of 37.40%.
Weifeng Sun 0004, Zhenting Guo, Meng Yan 0001, Zhongxin Liu 0002, Yan Lei 0005, Hongyu Zhang 0002
IEEE Trans. Software Eng.2
2023 Just-In-Time Method Name Updating With Heuristics and Neural Model
abstract
Ensuring the quality and conciseness of method names is pivotal for the readability and maintainability of source code. However, for developers, it often presents challenges, particularly during the course of code evolution. Throughout this process, developers sometimes may neglect to update the method name, resulting in inconsistency which could potentially mislead developers and introduce future bugs. In this paper, we propose the task of “Just-In-Time (JIT) Method Name Updating” which automatically performs method name updates to avoid inconsistent names and fix them before being introduced into code bases. Specifically, we propose an approach that combines heuristic rules and a neural model. The heuristic rule-based component mainly focuses on the single-token changes for our empirical findings that the proportion of single-token modifications is extensive, and often corresponds to code-indicative updates. The neural model-based component is a customized Seq2seq model considering code changes and the new method body’s token type. To evaluate our approach, we conduct extensive experiments on the collected dataset with over 108K method name-body co-change samples from popular Java projects. The results show that our method outperforms the three baselines on all metrics. In particular, our approach achieves a significant improvement in Accuracy and improves method generation baseline by 23.5%.
Zhenting Guo, Meng Yan 0001, Zhezhe Chen, Weifeng Sun 0004
QRS1