{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,17]],"date-time":"2026-11-17T23:57:08Z","timestamp":1794959828729,"version":"4.9.1"},"reference-count":59,"publisher":"MDPI AG","issue":"12","license":[{"start":{"date-parts":[[2025,12,15]],"date-time":"2025-12-15T00:00:00Z","timestamp":1765756800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100001809","name":"National Natural Science Foundation of China","doi-asserted-by":"publisher","award":["92582104"],"award-info":[{"award-number":["92582104"]}],"id":[{"id":"10.13039\/501100001809","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Future Internet"],"abstract":"<jats:p>Concurrency bugs originate from complex and improper synchronization of shared resources, presenting a significant challenge for detection. Traditional static analysis relies heavily on expert knowledge and frequently fails when code is non-compilable. Conversely, large language models struggle with semantic sparsity, inadequate comprehension of concurrent semantics, and the tendency to hallucinate. To address the limitations of static analysis in capturing complex concurrency semantics and the hallucination risks associated with large language models, this study proposes ConSynergy. This novel framework integrates the structural rigor of static analysis with the semantic reasoning capabilities of large language models. The core design employs a robust task decomposition strategy that decomposes concurrency bug detection into a four-stage pipeline: shared resource identification, concurrency-aware slicing, data-flow reasoning, and formal verification. This approach fundamentally mitigates hallucinations from large language models caused by insufficient program context. First, the framework identifies shared resources and applies a concurrency-aware program slicing technique to precisely extract concurrency-related structural features, thereby alleviating semantic sparsity. Second, to enhance the large language model\u2019s comprehension of concurrent semantics, we design a concurrency data-flow analysis based on Chain-of-Thought prompting. Third, the framework incorporates a Satisfiability Modulo Theories solver to ensure the reliability of detection results, alongside an iterative repair mechanism based on large language models that dramatically reduces dependency on code compilability. Extensive experiments on three mainstream concurrency bug datasets, including DataRaceBench, the concurrency subset of Juliet, and DeepRace, demonstrate that ConSynergy achieves an average precision and recall of 80.0% and 87.1%, respectively. ConSynergy outperforms state-of-the-art baselines by 10.9% to 68.2% in average F1 score, demonstrating significant potential for practical application.<\/jats:p>","DOI":"10.3390\/fi17120578","type":"journal-article","created":{"date-parts":[[2025,12,15]],"date-time":"2025-12-15T15:52:59Z","timestamp":1765813979000},"page":"578","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":1,"title":["Concurrency Bug Detection via Static Analysis and Large Language Models"],"prefix":"10.3390","volume":"17","author":[{"ORCID":"https:\/\/orcid.org\/0009-0003-6695-3533","authenticated-orcid":false,"given":"Zuocheng","family":"Feng","sequence":"first","affiliation":[{"name":"School of Computer Science and Technology, Tongji University, Shanghai 201804, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0007-7021-365X","authenticated-orcid":false,"given":"Yiming","family":"Chen","sequence":"additional","affiliation":[{"name":"School of Computer Science and Technology, Tongji University, Shanghai 201804, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4573-8968","authenticated-orcid":false,"given":"Kaiwen","family":"Zhang","sequence":"additional","affiliation":[{"name":"School of Computer Science and Technology, Tongji University, Shanghai 201804, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0002-8805-665X","authenticated-orcid":false,"given":"Xiaofeng","family":"Li","sequence":"additional","affiliation":[{"name":"Beijing Institute of Control Engineering, Beijing 100190, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-7523-4827","authenticated-orcid":false,"given":"Guanjun","family":"Liu","sequence":"additional","affiliation":[{"name":"School of Computer Science and Technology, Tongji University, Shanghai 201804, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2025,12,15]]},"reference":[{"key":"ref_1","first-page":"191","article-title":"A survey of race bug detection techniques for multithreaded programmes","volume":"25","author":"Hong","year":"2015","journal-title":"Softw. Test."},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"474","DOI":"10.1145\/3649828","article-title":"Enhancing Static Analysis for Practical Bug Detection: An LLM-Integrated Approach","volume":"8","author":"Li","year":"2024","journal-title":"Proc. ACM Program. Lang."},{"key":"ref_3","unstructured":"Jiang, X., Dong, Y., Tao, Y., Liu, H., Jin, Z., and Li, G. (May, January 27). ROCODE: Integrating Backtracking Mechanism and Program Analysis in Large Language Models for Code Generation. Proceedings of the IEEE\/ACM 47th International Conference on Software Engineering, Ottawa, ON, Canada."},{"key":"ref_4","unstructured":"Wang, C., Huang, K., Zhang, J., Feng, Y., Zhang, L., Liu, Y., and Peng, X. (May, January 27). LLMs Meet Library Evolution: Evaluating Deprecated API Usage in LLM-Based Code Completion. Proceedings of the IEEE\/ACM 47th International Conference on Software Engineering, Ottawa, ON, Canada."},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"1616","DOI":"10.1145\/3729315","article-title":"Scalable, Validated Code Translation of Entire Projects using Large Language Models","volume":"9","author":"Zhang","year":"2025","journal-title":"Proc. ACM Program. Lang."},{"key":"ref_6","doi-asserted-by":"crossref","unstructured":"Liao, C., Lin, P.H., Asplund, J., Schordan, M., and Karlin, I. (2017, January 12\u201317). DataRaceBench: A Benchmark Suite for Systematic Evaluation of Data Race Detection Tools. Proceedings of the SC17: International Conference for High Performance Computing, Networking, Storage and Analysis, Denver, CO, USA.","DOI":"10.1145\/3126908.3126958"},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"88","DOI":"10.1109\/MC.2012.345","article-title":"Juliet 1.1 C\/C++ and Java Test Suite","volume":"45","author":"Boland","year":"2012","journal-title":"Computer"},{"key":"ref_8","doi-asserted-by":"crossref","unstructured":"TehraniJamsaz, A., Khaleel, M., Akbari, R., and Jannesari, A. (2021, January 12\u201316). DeepRace: A learning-based data race detector. Proceedings of the 2021 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW), Virtual.","DOI":"10.1109\/ICSTW52544.2021.00046"},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Engler, D.R., and Ashcraft, K. (2003, January 19\u201322). RacerX: Effective, static detection of race conditions and deadlocks. Proceedings of the Symposium on Operating Systems Principles, New York, NY, USA.","DOI":"10.1145\/945445.945468"},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Liu, G. (2022). Petri Nets: Theoretical Models and Analysis Methods for Concurrent Systems, Springer Nature.","DOI":"10.1007\/978-981-19-6309-4"},{"key":"ref_11","unstructured":"Zhang, K., and Liu, G. (2022). Automatically Transform Rust Source to Petri Nets for Checking Deadlocks. arXiv."},{"key":"ref_12","unstructured":"La Torre, S., Madhusudan, P., and Parlato, G. (2020, January 15\u201319). Model-checking parameterized concurrent programs using linear interfaces. Proceedings of the International Conference on Computer Aided Verification, Edinburgh, UK."},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Cohen, E., Dahlweid, M., Hillebrand, M.A., Leinenbach, D., Moskal, M., Santen, T., Schulte, W., and Tobies, S. (2009, January 17\u201320). VCC: A Practical System for Verifying Concurrent C. Proceedings of the International Conference on Theorem Proving in Higher Order Logics, Munich, Germany.","DOI":"10.1007\/978-3-642-03359-9_2"},{"key":"ref_14","doi-asserted-by":"crossref","unstructured":"Serebryany, K., and Iskhodzhanov, T. (2009, January 12). ThreadSanitizer: Data race detection in practice. Proceedings of the Workshop on Binary Instrumentation and Applications (WBIA \u201909), New York, NY, USA.","DOI":"10.1145\/1791194.1791203"},{"key":"ref_15","unstructured":"Valgrind-Project (2025, June 07). Helgrind: A Data-Race Detector. Available online: https:\/\/www.cs.cmu.edu\/afs\/cs.cmu.edu\/project\/cmt-40\/Nice\/RuleRefinement\/bin\/valgrind-3.2.0\/docs\/html\/hg-manual.html."},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"104171","DOI":"10.1016\/j.cose.2024.104171","article-title":"Thread-sensitive fuzzing for concurrency bug detection","volume":"148","author":"Zhao","year":"2024","journal-title":"Comput. Secur."},{"key":"ref_17","first-page":"1","article-title":"Learning-based controlled concurrency testing","volume":"4","author":"Mukherjee","year":"2020","journal-title":"Proc. ACM Program. Lang."},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"1503","DOI":"10.1007\/s00500-023-08382-8","article-title":"Nature-inspired metaheuristic methods in software testing","volume":"28","author":"Khoshniat","year":"2023","journal-title":"Soft Comput."},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"2244","DOI":"10.1109\/TDSC.2021.3051525","article-title":"SySeVR: A Framework for Using Deep Learning to Detect Software Vulnerabilities","volume":"19","author":"Li","year":"2018","journal-title":"IEEE Trans. Dependable Secur. Comput."},{"key":"ref_20","unstructured":"Zhou, Y., Liu, S., Siow, J., Du, X., and Liu, Y. (2019, January 8\u201314). Devign: Effective vulnerability identification by learning comprehensive program semantics via graph neural networks. Proceedings of the Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, Vancouver, BC, Canada."},{"key":"ref_21","doi-asserted-by":"crossref","unstructured":"Fu, M., and Tantithamthavorn, C.K. (2022, January 23\u201324). LineVul: A Transformer-based Line-Level Vulnerability Prediction. Proceedings of the 2022 IEEE\/ACM 19th International Conference on Mining Software Repositories (MSR), Pittsburgh, PA, USA.","DOI":"10.1145\/3524842.3528452"},{"key":"ref_22","first-page":"1914","article-title":"Data Race Detection Method Based on Deep Learning","volume":"59","author":"Zhang","year":"2022","journal-title":"J. Comput. Res. Dev."},{"key":"ref_23","doi-asserted-by":"crossref","unstructured":"Li, Z., Zou, D., Xu, S., Ou, X., Jin, H., Wang, S., Deng, Z., and Zhong, Y. (2018, January 18\u201321). VulDeePecker: A Deep Learning-Based System for Vulnerability Detection. Proceedings of the Network and Distributed System Security Symposium (NDSS), San Diego, CA, USA.","DOI":"10.14722\/ndss.2018.23158"},{"key":"ref_24","doi-asserted-by":"crossref","first-page":"83","DOI":"10.1145\/3649814","article-title":"A Learning-Based Approach to Static Program Slicing","volume":"8","author":"Yadavally","year":"2024","journal-title":"Proc. ACM Program. Lang."},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Steenhoek, B., Le, W., and Gao, H. (2022, January 14\u201320). Dataflow Analysis-Inspired Deep Learning for Efficient Vulnerability Detection. Proceedings of the 2024 IEEE\/ACM 46th International Conference on Software Engineering (ICSE), Lisbon, Portugal.","DOI":"10.1145\/3597503.3623345"},{"key":"ref_26","doi-asserted-by":"crossref","first-page":"129695","DOI":"10.1016\/j.neucom.2025.129695","article-title":"Two-tier deep and machine learning approach optimized by adaptive multi-population firefly algorithm for software defects prediction","volume":"630","author":"Villoth","year":"2025","journal-title":"Neurocomputing"},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Feng, Z., Guo, D., Tang, D., Duan, N., Feng, X., Gong, M., Shou, L., Qin, B., Liu, T., and Jiang, D. (2020). CodeBERT: A Pre-Trained Model for Programming and Natural Languages. arXiv.","DOI":"10.18653\/v1\/2020.findings-emnlp.139"},{"key":"ref_28","unstructured":"Rozi\u00e8re, B., Gehring, J., Gloeckle, F., Sootla, S., Gat, I., Tan, X., Adi, Y., Liu, J., Remez, T., and Rapin, J. (2023). Code Llama: Open Foundation Models for Code. arXiv."},{"key":"ref_29","unstructured":"Hurst, O.A., Lerer, A., Goucher, A.P., Perelman, A., Ramesh, A., Clark, A., Ostrow, A., Welihinda, A., Hayes, A., and Radford, A. (2024). GPT-4o System Card. arXiv."},{"key":"ref_30","doi-asserted-by":"crossref","unstructured":"Hanif, H., and Maffeis, S. (2022, January 18\u201323). VulBERTa: Simplified Source Code Pre-Training for Vulnerability Detection. Proceedings of the 2022 International Joint Conference on Neural Networks (IJCNN), Padova, Italy.","DOI":"10.1109\/IJCNN55064.2022.9892280"},{"key":"ref_31","unstructured":"Ceka, I., Qiao, F., Dey, A., Valechia, A., Kaiser, G.E., and Ray, B. (2024). Can LLM Prompting Serve as a Proxy for Static Analysis in Vulnerability Detection. arXiv."},{"key":"ref_32","doi-asserted-by":"crossref","unstructured":"Chen, L., Ding, X., Emani, M.K., Vanderbruggen, T., Lin, P.H., and Liao, C. (2023, January 12\u201317). Data Race Detection Using Large Language Models. Proceedings of the SC \u201923 Workshops of the International Conference on High Performance Computing, Network, Storage, and Analysis, Denver, CO, USA.","DOI":"10.1145\/3624062.3624088"},{"key":"ref_33","doi-asserted-by":"crossref","unstructured":"Li, H., Hao, Y., and Qian, Z. (2023, January 3\u20139). Assisting Static Analysis with Large Language Models: A ChatGPT Experiment. Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, San Francisco, CA, USA.","DOI":"10.1145\/3611643.3613078"},{"key":"ref_34","unstructured":"Wang, C., Gao, Y., Zhang, W., Liu, X., Shi, Q., and Zhang, X. (2024). LLMSA: A Compositional Neuro-Symbolic Approach to Compilation-free and Customizable Static Analysis. arXiv."},{"key":"ref_35","doi-asserted-by":"crossref","first-page":"1140","DOI":"10.1016\/j.csbj.2025.03.026","article-title":"Artificial intelligence-large language models (AI-LLMs) for reliable and accurate cardiotocography (CTG) interpretation in obstetric practice","volume":"27","author":"Gumilar","year":"2024","journal-title":"Comput. Struct. Biotechnol. J."},{"key":"ref_36","unstructured":"Steenhoek, B., Sivaraman, K., Gonzalez, R.S., Mohylevskyy, Y., Moghaddam, R.Z., and Le, W. (May, January 26). Closing the Gap: A User Study on the Real-World Usefulness of AI-Powered Vulnerability Detection & Repair in the IDE. Proceedings of the IEEE\/ACM 47th International Conference on Software Engineering, Ottawa, ON, Canada."},{"key":"ref_37","unstructured":"Wang, C., Zhang, W., Su, Z., Xu, X., Xie, X., and Zhang, X. (2024, January 10\u201315). LLMDFA: Analyzing dataflow in code with large language models. Proceedings of the 38th International Conference on Neural Information Processing Systems (NIPS \u201924), Red Hook, NY, USA."},{"key":"ref_38","doi-asserted-by":"crossref","unstructured":"Shim, J., Mahmud, Q.I., and Jannesari, A. (2025, January 1\u20133). Data Race Satisfiability on Array Elements. Proceedings of the International Workshop on OpenMP, Charlotte, NC, USA.","DOI":"10.1007\/978-3-032-06343-4_8"},{"key":"ref_39","doi-asserted-by":"crossref","first-page":"3148","DOI":"10.1145\/3763163","article-title":"Large Language Model Powered Symbolic Execution","volume":"9","author":"Li","year":"2025","journal-title":"Proc. ACM Program. Lang."},{"key":"ref_40","unstructured":"Wang, W., Liu, K., Chen, A.R., Li, G., Jin, Z., Huang, G., and Ma, L. (2024). Python Symbolic Execution with LLM-powered Code Generation. arXiv."},{"key":"ref_41","doi-asserted-by":"crossref","first-page":"1943","DOI":"10.1109\/TIFS.2020.3044773","article-title":"Combining Graph-Based Learning with Automated Data Collection for Code Vulnerability Detection","volume":"16","author":"Wang","year":"2021","journal-title":"IEEE Trans. Inf. Forensics Secur."},{"key":"ref_42","unstructured":"Guo, D., Ren, S., Lu, S., Feng, Z., Tang, D., Liu, S., Zhou, L., Duan, N., Yin, J., and Jiang, D. (2021, January 3\u20137). GraphCodeBERT: Pre-training Code Representations with Data Flow. Proceedings of the International Conference on Learning Representations (ICLR 2021), Virtual."},{"key":"ref_43","doi-asserted-by":"crossref","unstructured":"Wang, Y., Wang, W., Joty, S.R., and Hoi, S.C.H. (2021, January 7\u201311). CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation. Proceedings of the EMNLP. Association for Computational Linguistics, Virtual.","DOI":"10.18653\/v1\/2021.emnlp-main.685"},{"key":"ref_44","doi-asserted-by":"crossref","unstructured":"Nguyen, V.A., Nguyen, D.Q., Nguyen, V., Le, T., Tran, Q.H., and Phung, D. (2022, January 22\u201327). ReGVD: Revisiting graph neural networks for vulnerability detection. Proceedings of the ACM\/IEEE 44th International Conference on Software Engineering: Companion Proceedings (ICSE \u201922), New York, NY, USA.","DOI":"10.1145\/3510454.3516865"},{"key":"ref_45","unstructured":"Jiang, X., Wu, L., Sun, S., Li, J., Xue, J., Wang, Y., Wu, T., and Liu, M. (2024). Investigating Large Language Models for Code Vulnerability Detection: An Experimental Study. arXiv."},{"key":"ref_46","doi-asserted-by":"crossref","unstructured":"Cai, Y., Zhu, B., Meng, R., Yun, H., He, L., Su, P., and Liang, B. (2019, January 26\u201330). Detecting concurrency memory corruption vulnerabilities. Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC\/FSE 2019), New York, NY, USA.","DOI":"10.1145\/3338906.3338927"},{"key":"ref_47","unstructured":"Meta Platforms, Inc. (2025, July 04). Infer Static Analyzer. [EB\/OL]. Available online: https:\/\/fbinfer.com\/."},{"key":"ref_48","unstructured":"MathWorks (2025). Polyspace Static Analysis Tool. Polyspace Products Provide Static Analysis and Code Verification for C, C++, and Ada Code, The MathWorks, Inc."},{"key":"ref_49","unstructured":"GitHub, OpenAI, and Microsoft (2025, December 01). GitHub Copilot: Your AI Pair Programmer. AI-Powered Code Completion and Chat Assistant with Agent Mode. Available online: https:\/\/github.com\/features\/copilot."},{"key":"ref_50","unstructured":"(2025, December 01). AI Code Inspector. Automated Code Debug Tool with LangGraph and Ollama. Available online: https:\/\/github.com\/nehru\/ai-code-inspector."},{"key":"ref_51","unstructured":"NVD (2025, December 01). CVE-2023-31083, Available online: https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2023-31083."},{"key":"ref_52","unstructured":"NVD (2025, December 01). CVE-2024-42111, Available online: https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2024-42111."},{"key":"ref_53","unstructured":"NVD (2025, December 01). CVE-2024-44941, Available online: https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2024-44941."},{"key":"ref_54","unstructured":"NVD (2025, December 01). CVE-2024-49903, Available online: https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2024-49903."},{"key":"ref_55","unstructured":"NVD (2025, December 01). CVE-2024-50125, Available online: https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2024-50125."},{"key":"ref_56","unstructured":"NVD (2025, December 01). CVE-2024-57900, Available online: https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2024-57900."},{"key":"ref_57","doi-asserted-by":"crossref","unstructured":"Yuan, T., Li, G., Lu, J., Liu, C., Li, L., and Xue, J. (March, January 27). GoBench: A benchmark suite of real-world go concurrency bugs. Proceedings of the 2021 IEEE\/ACM International Symposium on Code Generation and Optimization (CGO \u201921), Virtual.","DOI":"10.1109\/CGO51591.2021.9370317"},{"key":"ref_58","doi-asserted-by":"crossref","unstructured":"Yamaguchi, F., Golde, N., Arp, D., and Rieck, K. (2014, January 18\u201321). Modeling and Discovering Vulnerabilities with Code Property Graphs. Proceedings of the 2014 IEEE Symposium on Security and Privacy, San Jose, CA, USA.","DOI":"10.1109\/SP.2014.44"},{"key":"ref_59","unstructured":"GitHub (2025, December 01). CodeQL Documentation. Available online: https:\/\/codeql.github.com\/docs\/."}],"container-title":["Future Internet"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1999-5903\/17\/12\/578\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,12,17]],"date-time":"2025-12-17T10:50:15Z","timestamp":1765968615000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1999-5903\/17\/12\/578"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,12,15]]},"references-count":59,"journal-issue":{"issue":"12","published-online":{"date-parts":[[2025,12]]}},"alternative-id":["fi17120578"],"URL":"https:\/\/doi.org\/10.3390\/fi17120578","relation":{},"ISSN":["1999-5903"],"issn-type":[{"value":"1999-5903","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,12,15]]}}}