发现异常代码

S. Reiss
{"title":"发现异常代码","authors":"S. Reiss","doi":"10.1109/ICSM.2007.4362616","DOIUrl":null,"url":null,"abstract":"We describe an automated approach to finding code fragments that are unusual and hence might represent potential problems. Many potential problems in programs arise in code that is uncommon either because it represents rarely used constructs and hence is unfamiliar to the programmer, or because it represents a mistyping or other error that still happens to be legal code, albeit not very common. We present an approach that first finds what is \"unusual\" by reading a corpus of code and building a library of common patterns. The approach can then take any existing program and check if it contains any unusual patterns. We have run the system using a large corpus and have identified problems in a number of sample projects with otherwise working code.","PeriodicalId":263470,"journal":{"name":"2007 IEEE International Conference on Software Maintenance","volume":"299 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2007-10-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"7","resultStr":"{\"title\":\"Finding Unusual Code\",\"authors\":\"S. Reiss\",\"doi\":\"10.1109/ICSM.2007.4362616\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We describe an automated approach to finding code fragments that are unusual and hence might represent potential problems. Many potential problems in programs arise in code that is uncommon either because it represents rarely used constructs and hence is unfamiliar to the programmer, or because it represents a mistyping or other error that still happens to be legal code, albeit not very common. We present an approach that first finds what is \\\"unusual\\\" by reading a corpus of code and building a library of common patterns. The approach can then take any existing program and check if it contains any unusual patterns. We have run the system using a large corpus and have identified problems in a number of sample projects with otherwise working code.\",\"PeriodicalId\":263470,\"journal\":{\"name\":\"2007 IEEE International Conference on Software Maintenance\",\"volume\":\"299 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2007-10-22\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"7\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2007 IEEE International Conference on Software Maintenance\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICSM.2007.4362616\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2007 IEEE International Conference on Software Maintenance","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICSM.2007.4362616","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 7

摘要

我们描述了一种自动化的方法来查找不寻常的代码片段,因此可能代表潜在的问题。程序中的许多潜在问题出现在不常见的代码中,或者因为它表示很少使用的结构,因此程序员不熟悉,或者因为它表示错误的输入或其他错误,这些错误仍然是合法的代码,尽管不是很常见。我们提出了一种方法,首先通过阅读代码语料库并构建公共模式库来发现什么是“不寻常的”。然后,该方法可以使用任何现有程序并检查它是否包含任何异常模式。我们使用大型语料库运行系统,并在许多示例项目中发现了问题,其他工作代码。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Finding Unusual Code
We describe an automated approach to finding code fragments that are unusual and hence might represent potential problems. Many potential problems in programs arise in code that is uncommon either because it represents rarely used constructs and hence is unfamiliar to the programmer, or because it represents a mistyping or other error that still happens to be legal code, albeit not very common. We present an approach that first finds what is "unusual" by reading a corpus of code and building a library of common patterns. The approach can then take any existing program and check if it contains any unusual patterns. We have run the system using a large corpus and have identified problems in a number of sample projects with otherwise working code.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术文献互助群
群 号:481959085
Book学术官方微信