Supporting Automatic Code Review via Design

Jiantao He, Linzhang Wang, Jianhua Zhao
{"title":"Supporting Automatic Code Review via Design","authors":"Jiantao He, Linzhang Wang, Jianhua Zhao","doi":"10.1109/SERE-C.2013.37","DOIUrl":null,"url":null,"abstract":"Code review is a very important means to ensure the quality of code in practice. It has been widely used in industry since it was proposed. Nowadays code review is still mainly done by manual work in industry. However, increasing scale of the software challenges manual reviewing. So automating the code review process is highly desired. Design patterns are a set of summaries of code design experiences that are widely used repeatedly, and well classified. Programmers need to correctly implement code based on design patterns. To ensure that the code is implemented as expected, this paper proposes an approach to automatically review code in the view of specified design patterns. Firstly, we identify the design patterns that are specified in the design models. Second, we construct a set of review rules by extracting design constraints from identified design patterns. Last, the code is checked against the generated review rules, and inconsistencies are reported as result. A supporting tool was developed, and two experiments were conducted to demonstrate the applicability of our approach.","PeriodicalId":150535,"journal":{"name":"2013 IEEE Seventh International Conference on Software Security and Reliability Companion","volume":"29 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2013-06-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2013 IEEE Seventh International Conference on Software Security and Reliability Companion","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SERE-C.2013.37","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

Abstract

Code review is a very important means to ensure the quality of code in practice. It has been widely used in industry since it was proposed. Nowadays code review is still mainly done by manual work in industry. However, increasing scale of the software challenges manual reviewing. So automating the code review process is highly desired. Design patterns are a set of summaries of code design experiences that are widely used repeatedly, and well classified. Programmers need to correctly implement code based on design patterns. To ensure that the code is implemented as expected, this paper proposes an approach to automatically review code in the view of specified design patterns. Firstly, we identify the design patterns that are specified in the design models. Second, we construct a set of review rules by extracting design constraints from identified design patterns. Last, the code is checked against the generated review rules, and inconsistencies are reported as result. A supporting tool was developed, and two experiments were conducted to demonstrate the applicability of our approach.
通过设计支持自动代码审查
在实践中,代码审查是保证代码质量的重要手段。自提出以来,已在工业上得到广泛应用。目前,在工业上,代码审查仍然主要是由人工完成的。然而,随着软件规模的扩大,人工评审也面临挑战。因此,自动化代码审查过程是非常必要的。设计模式是一组代码设计经验的总结,被广泛重复使用,并且分类良好。程序员需要根据设计模式正确地实现代码。为了确保代码按照预期实现,本文提出了一种从指定设计模式的角度自动审查代码的方法。首先,我们确定在设计模型中指定的设计模式。其次,我们通过从已识别的设计模式中提取设计约束来构建一组评审规则。最后,根据生成的评审规则检查代码,结果报告不一致的地方。开发了一个辅助工具,并进行了两个实验来证明我们的方法的适用性。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信