检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:白杨 张丽萍 BAI Yang;ZHANG Liping(College of Computer Science and Technology,Inner Mongolia Normal University,Hohhot 010022,China)
机构地区:[1]内蒙古师范大学计算机科学技术学院,呼和浩特010022
出 处:《计算机工程与应用》2020年第10期246-253,共8页Computer Engineering and Applications
基 金:国家自然科学基金(No.61462071);内蒙古自然科学基金(No.2018MS06009);内蒙古教育厅资助项目(No.NJZY18025)。
摘 要:针对大多数软件代码注释数量少、质量低的问题,提出了一种自动生成代码注释的方法。利用Nicad检测出克隆代码,提取出这些代码以及相应的注释,对代码和注释分别进行精简优化,将注释与代码匹配映射,为代码自动生成注释。对5款软件中的代码注释进行手动验证并评估注释结果,实验结果发现28%的代码注释是良好的,同时将注释报告给5位专家,专家评估结果为两款软件的代码注释为良好。实验结果及用户调研表明,该方法对于自动生成代码注释是可行、有效的。Low number of comments and low quality for most software code comments, a method for automatically generating code comments is proposed. Firstly, the clone code is detected by Nicad, and the code and corresponding comments are extracted, then the code and comments are separately optimized and streamlined. Finally, the comment is matched to the code mapping to generate a comment for the code. The code comments in five projects are manually verified in the experiment, and then results are evaluated as well. The experiment finds that 28% code comments are good.And the comments are reported to five experts with the feedback that the comments of two projects have favorable performance. Experimental results and user surveys show the feasibility and effectiveness of this method for automatically generating code comments.
关 键 词:克隆代码 克隆检测 代码注释 注释优化 自动生成注释
分 类 号:TP311.5[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.171