{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,6,30]],"date-time":"2026-06-30T19:16:26Z","timestamp":1782846986474,"version":"3.54.5"},"reference-count":54,"publisher":"Association for Computing Machinery (ACM)","issue":"FSE","license":[{"start":{"date-parts":[[2026,6,30]],"date-time":"2026-06-30T00:00:00Z","timestamp":1782777600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/legalcode"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. ACM Softw. Eng."],"published-print":{"date-parts":[[2026,6,30]]},"abstract":"<jats:p>Smart contracts have attracted rapid development and widespread application. Due to the complexity of real-world smart contracts, it is error-prone to correctly enforce all intended functionalities in code implementations, resulting in unintended functional behaviors and security issues in practice. Code-comment inconsistency detection has emerged as an important solution to these issues, which leverages the redundant functional specifications in comments to detect code implementations that violate developers' intentions. However, existing inconsistency detection solutions are typically pattern-based and limited to fixed types of inconsistencies, which prevents them from detecting the diverse inconsistencies between real-world code implementations and casually written comments. To bridge the gap, this paper presents SmartComment, the first technique that combines LLMs with program analysis techniques for detecting code-comment inconsistencies in smart contracts. SmartComment introduces an LLM-driven workflow which simulates real-world interactions between code reviewers and developers to identify inconsistencies. It incorporates various program analysis techniques into the workflow, including comment propagation and code context extraction for generating input context for inconsistency detection, as well as program variant generation and differential analysis for inconsistency confirmation. Our evaluation results show that SmartComment detects 203 valid inconsistencies from a dataset of 1,000 real-world contracts with a precision of 79.9%, highlighting its effectiveness in detecting prevalent and diverse real-world inconsistencies. Compared to previous work, SmartComment achieves both higher precision and recall, detecting over 90% of inconsistencies that existing methods fail to identify. Furthermore, an ablation experiment demonstrates the effectiveness of incorporating program analysis techniques into SmartComment, improving the F1-score from 58.7% to 81.3%.<\/jats:p>","DOI":"10.1145\/3808112","type":"journal-article","created":{"date-parts":[[2026,6,30]],"date-time":"2026-06-30T17:06:14Z","timestamp":1782839174000},"page":"2350-2372","source":"Crossref","is-referenced-by-count":0,"title":["Detecting Code-Comment Inconsistencies in Smart Contracts by Combining LLM and Program Analysis"],"prefix":"10.1145","volume":"3","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-8140-9208","authenticated-orcid":false,"given":"Jiashuo","family":"Zhang","sequence":"first","affiliation":[{"name":"Peking University, School of Computer Science, Beijing, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-0192-9992","authenticated-orcid":false,"given":"Jiachi","family":"Chen","sequence":"additional","affiliation":[{"name":"Zhejiang University, Hangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0004-3151-1396","authenticated-orcid":false,"given":"Ting","family":"Zhang","sequence":"additional","affiliation":[{"name":"Peking University, School of Computer Science, Beijing, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4137-619X","authenticated-orcid":false,"given":"Yue","family":"Li","sequence":"additional","affiliation":[{"name":"Taiyuan University of Technology, Taiyuan, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-3752-0718","authenticated-orcid":false,"given":"Daoyuan","family":"Wu","sequence":"additional","affiliation":[{"name":"Lingnan University, Hongkong, Hong Kong"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7761-7269","authenticated-orcid":false,"given":"Yanlin","family":"Wang","sequence":"additional","affiliation":[{"name":"Sun Yat-sen University, Zhuhai, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-6760-5552","authenticated-orcid":false,"given":"Jianbo","family":"Gao","sequence":"additional","affiliation":[{"name":"Beijing Jiaotong University, Beijing, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9165-8331","authenticated-orcid":false,"given":"Ting","family":"Chen","sequence":"additional","affiliation":[{"name":"University of Electronic Science and Technology of China, Chengdu, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-5785-2912","authenticated-orcid":false,"given":"Zhong","family":"Chen","sequence":"additional","affiliation":[{"name":"Peking University, School of Computer Science, Beijing, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2026,6,30]]},"reference":[{"key":"e_1_2_1_1_1","unstructured":"Anonymous. 2025. Online Supplement Material. https:\/\/github.com\/SmartComment-Tool\/Artifact"},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/3597503.3623302"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/3398071"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1109\/ase51524.2021.9678888"},{"key":"e_1_2_1_5_1","volume-title":"Retrieved","year":"2025","unstructured":"Crytic. 2025. Echidna: A Fast Smart Contract Fuzzer. Retrieved May 17, 2025 from https:\/\/github.com\/crytic\/echidna"},{"key":"e_1_2_1_6_1","volume-title":"Do you still need a manual smart contract audit? arXiv preprint arXiv:2306.12338","author":"David Isaac","year":"2023","unstructured":"Isaac David, Liyi Zhou, Kaihua Qin, Dawn Song, Lorenzo Cavallaro, and Arthur Gervais. 2023. Do you still need a manual smart contract audit? arXiv preprint arXiv:2306.12338 (2023)."},{"key":"e_1_2_1_7_1","volume-title":"Retrieved","author":"Documentation Solidity","year":"2024","unstructured":"Solidity Documentation. 2024. Source Mappings. Retrieved May 17, 2025 from https:\/\/docs.soliditylang.org\/en\/latest\/ internals\/source_mappings.html"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/3377811.3380364"},{"key":"e_1_2_1_9_1","volume-title":"Retrieved","year":"2025","unstructured":"Ethereum. 2025. The Solidity Contract-Oriented Programming Language. Retrieved May 17, 2025 from https: \/\/github.com\/ethereum\/solidity"},{"key":"e_1_2_1_10_1","volume-title":"Retrieved","year":"2023","unstructured":"Etherscan. 2023. The Ethereum Blockchain Explorer. Retrieved May 17, 2025 from https:\/\/etherscan.io\/"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/3712005"},{"key":"e_1_2_1_12_1","unstructured":"Daya Guo Dejian Yang Haowei Zhang Junxiao Song Ruoyu Zhang Runxin Xu Qihao Zhu Shirong Ma Peiyi Wang Xiao Bi et al. 2025. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948 (2025)."},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1109\/ase56229.2023.00142"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1145\/3695988"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/3593293"},{"key":"e_1_2_1_16_1","unstructured":"Aaron Jaech Adam Kalai Adam Lerer Adam Richardson Ahmed El-Kishky Aiden Low Alec Helyar Aleksander Madry Alex Beutel Alex Carney et al. 2024. Openai o1 system card. arXiv preprint arXiv:2412.16720 (2024)."},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1109\/icse55347.2025.00010"},{"key":"e_1_2_1_18_1","volume-title":"Retrieved","author":"Josselin Feist","year":"2023","unstructured":"Feist Josselin. 2023. Detector Documentation of Slither. Retrieved May 17, 2025 from https:\/\/github.com\/crytic\/slither\/ wiki\/Detector-Documentation"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/3660772"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/3611643.3616342"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1109\/ase56229.2023.00089"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/3183440.3183495"},{"key":"e_1_2_1_23_1","volume-title":"Llm-powered test case generation for detecting tricky bugs. arXiv preprint arXiv:2404.10304","author":"Liu Kaibo","year":"2024","unstructured":"Kaibo Liu, Yiyang Liu, Zhenpeng Chen, Jie M Zhang, Yudong Han, Yun Ma, Ge Li, and Gang Huang. 2024. Llm-powered test case generation for detecting tricky bugs. arXiv preprint arXiv:2404.10304 (2024)."},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1162\/tacl_a_00638"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1109\/SpaCCS63173.2024.00013"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/3533767.3534372"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/2976749.2978309"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1109\/icse55347.2025.00027"},{"key":"e_1_2_1_29_1","volume-title":"Retrieved","author":"AI.","year":"2025","unstructured":"OpenAI. 2025. Best practices for prompt engineering with the OpenAI API. Retrieved May 17, 2025 from https: \/\/en.bitcoin.it\/wiki\/Secp256k1"},{"key":"e_1_2_1_30_1","volume-title":"Retrieved","year":"2023","unstructured":"Openzepplin. 2023. The standard for secure blockchain applications. Retrieved May 17, 2025 from https:\/\/www. openzeppelin.com\/"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/3756681.3756988"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/3387904.3389286"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2022.111515"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3597926.3598059"},{"key":"e_1_2_1_35_1","volume-title":"Retrieved","year":"2025","unstructured":"Solidity. 2025. NatSpec Format. Retrieved May 17, 2025 from https:\/\/docs.soliditylang.org\/en\/latest\/natspec-format.html"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/3597503.3639117"},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1109\/icse55347.2025.00134"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.1145\/1323293.1294276"},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.1109\/icst.2012.106"},{"key":"e_1_2_1_40_1","doi-asserted-by":"publisher","DOI":"10.1109\/icse43902.2021.00127"},{"key":"e_1_2_1_41_1","doi-asserted-by":"publisher","DOI":"10.1109\/QRS-C55045.2021.00105"},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","DOI":"10.1109\/icpc.2019.00019"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC.2019.00019"},{"key":"e_1_2_1_44_1","volume-title":"Ethereum: A secure decentralised generalised transaction ledger. Ethereum project yellow paper 151","author":"Gavin Wood","year":"2014","unstructured":"Gavin Wood et al. 2014. Ethereum: A secure decentralised generalised transaction ledger. Ethereum project yellow paper 151, 2014 (2014), 1-32."},{"key":"e_1_2_1_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/3597503.3639152"},{"key":"e_1_2_1_46_1","volume-title":"Auditgpt: Auditing smart contracts with chatgpt. arXiv preprint arXiv:2404.04306","author":"Xia Shihao","year":"2024","unstructured":"Shihao Xia, Shuai Shao, Mengting He, Tingting Yu, Linhai Song, and Yiying Zhang. 2024. Auditgpt: Auditing smart contracts with chatgpt. arXiv preprint arXiv:2404.04306 (2024)."},{"key":"e_1_2_1_47_1","doi-asserted-by":"publisher","DOI":"10.1145\/3597926"},{"key":"e_1_2_1_48_1","doi-asserted-by":"publisher","DOI":"10.1145\/3534117"},{"key":"e_1_2_1_49_1","doi-asserted-by":"publisher","DOI":"10.1145\/3660783"},{"key":"e_1_2_1_50_1","doi-asserted-by":"publisher","DOI":"10.1109\/icse55347.2025.00096"},{"key":"e_1_2_1_51_1","doi-asserted-by":"publisher","DOI":"10.1109\/tse.2025.3551776"},{"key":"e_1_2_1_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/3691620.3695010"},{"key":"e_1_2_1_53_1","doi-asserted-by":"publisher","unstructured":"Zhuo Zhang Brian Zhang Wen Xu and Zhiqiang Lin. 2023. Demystifying Exploitable Bugs in Smart Contracts. ICSE. doi:10.1109\/icse48619.2023.00061 10.1109\/icse48619.2023.00061","DOI":"10.1109\/icse48619.2023.00061"},{"key":"e_1_2_1_54_1","doi-asserted-by":"publisher","DOI":"10.1109\/sp46215.2023.10179435"}],"container-title":["Proceedings of the ACM on Software Engineering"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3808112","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,6,30]],"date-time":"2026-06-30T18:40:30Z","timestamp":1782844830000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3808112"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,6,30]]},"references-count":54,"journal-issue":{"issue":"FSE","published-print":{"date-parts":[[2026,6,30]]}},"alternative-id":["10.1145\/3808112"],"URL":"https:\/\/doi.org\/10.1145\/3808112","relation":{},"ISSN":["2994-970X"],"issn-type":[{"value":"2994-970X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,6,30]]}}}