{"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}
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.