TemCon: An Approach to Fixing Concurrency Bugs by Extracting Templates

Concurrency bugs occur due to the uncertainty of thread scheduling within concurrent programs. Most of the existing concurrency bug fixing approaches fix concurrency bugs by serializing the execution of all threads involved in concurrency bugs. However, they face the threats of introducing new deadlocks and lead to high runtime overhead while fixing the concurrency bugs. On the other hand, most of the approaches are biased toward fixing only one type of concurrency bug, e.g. data races, deadlocks, or atomicity violations. In this paper, we propose TemCon, a template-based concurrency bug fixing approach that constructs fine-grained semantic change graphs on patch files based on Abstract Syntax Trees (ASTs) to mine accurate fixing templates. First, it constructs fine-grained semantic change graphs on patch files and splits the graphs into three subgraphs (i.e. attribute graphs, operation graphs and text graphs). Then, the fixing templates are extracted by clustering the same graph pairs. Finally, the buggy programs are matched with the fixing templates to generate the patches for fixing concurrency bugs. We constructed a new concurrency bug dataset with 1830 concurrency bug fixing patches and compared our approach with the state-of-the-arts in our experiments. The experimental results show that our approach can correctly fix 887 concurrency bugs without introducing new deadlocks, which is 684 and 93 more than Grail and PFix, respectively. TemCon can achieve a fixing accuracy of 48.47%, which is 5.08–37.38% higher than that of the state-of-the-art approaches.

Authors

Institutions

Publication Details

Journal
International Journal of Software Engineering and Knowledge Engineering
Published
2025-10-17
DOI
https://doi.org/10.1142/s0218194025500822
Primary Topic
Software Testing and Debugging Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

TemCon: An Approach to Fixing Concurrency Bugs by Extracting Templates

Lili Bo, Guofeng Zhang, Yun Yang, Md Mahfuzur Rahman et al.
International Journal of Software Engineering and Knowledge Engineering
Software Testing and Debugging Techniques
article

TemCon: An Approach to Fixing Concurrency Bugs by Extracting Templates

Lili Bo, Guofeng Zhang, Yun Yang, Md Mahfuzur Rahman, Md. Nazmus Sakib, Yanchi Yuan
article en

Abstract

Concurrency bugs occur due to the uncertainty of thread scheduling within concurrent programs. Most of the existing concurrency bug fixing approaches fix concurrency bugs by serializing the execution of all threads involved in concurrency bugs. However, they face the threats of introducing new deadlocks and lead to high runtime overhead while fixing the concurrency bugs. On the other hand, most of the approaches are biased toward fixing only one type of concurrency bug, e.g. data races, deadlocks, or atomicity violations. In this paper, we propose TemCon, a template-based concurrency bug fixing approach that constructs fine-grained semantic change graphs on patch files based on Abstract Syntax Trees (ASTs) to mine accurate fixing templates. First, it constructs fine-grained semantic change graphs on patch files and splits the graphs into three subgraphs (i.e. attribute graphs, operation graphs and text graphs). Then, the fixing templates are extracted by clustering the same graph pairs. Finally, the buggy programs are matched with the fixing templates to generate the patches for fixing concurrency bugs. We constructed a new concurrency bug dataset with 1830 concurrency bug fixing patches and compared our approach with the state-of-the-arts in our experiments. The experimental results show that our approach can correctly fix 887 concurrency bugs without introducing new deadlocks, which is 684 and 93 more than Grail and PFix, respectively. TemCon can achieve a fixing accuracy of 48.47%, which is 5.08–37.38% higher than that of the state-of-the-art approaches.

International Journal of Software Engineering and Knowledge EngineeringVol. 36(04)
Yunnan University (CN), Yangzhou University (CN)
Openalex Percentile: Top 69%
Software Testing and Debugging Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.