CCGIR: Information retrieval-based code comment generation method for smart contracts
作者:
Highlights:
•
摘要
A smart contract is a computer program, which is intended to automatically execute, control or document legally relevant events and actions according to the terms of a contract. About 10% of the security vulnerabilities in smart contracts are caused by misuse of codes without comments. Therefore, there is a need to design effective automatic code comment generation methods for smart contracts. In this study, we propose an information retrieval-based code comment generation method CCGIR for smart contracts. Since code clones are common in smart contract development, CCGIR finds the most similar code in the code repository and reuses its comment through an information retrieval approach from three aspects: semantic similarity, lexical similarity, and syntactic similarity of smart contract codes. We select a corpus, which contains 57,676 unique pairs of
论文关键词:Code comment generation,Smart contract,Information retrieval,Empirical study,Human study
论文评审过程:Received 12 August 2021, Revised 28 October 2021, Accepted 2 December 2021, Available online 9 December 2021, Version of Record 15 December 2021.
论文官网地址:https://doi.org/10.1016/j.knosys.2021.107858