{"title":"一种检测违反隐式编码规则的错误代码的方法","authors":"Tomoko Matsumura, Akito Monden, Ken-ichi Matsumoto","doi":"10.1145/512035.512040","DOIUrl":null,"url":null,"abstract":"In the field of legacy software maintenance, there unexpectedly arise a large number of implicit coding rules --- which are seldom written down in specification documents or design documents --- as software becomes more complicated than it used be. Since not all the members in a maintenance team realize each of implicit coding rules, a maintainer who is not aware of a rule often violates the rule while doing various maintenance activities such as adding new functionality and repairing faults. The problem here is not only such a violation causes injection of a new fault into software but also this violation will be repeated again and again in the future by different maintainers. Indeed, we found that 32.7% of faults of certain legacy software were due to such violations.This paper proposes a method for detecting code fragments that violate implicit coding rules. In the method, an expert maintainer firstly investigates the causes, situations, and code fragments of each fault described in bug reports; and, identifies implicit coding rules as much as possible. Then, code patterns violating the rules (which we call bug code patterns) are described in a pattern description language. Finally, potential faulty code fragments are extracted by a pattern matching technique.","PeriodicalId":321820,"journal":{"name":"International Workshop on Principles of Software Evolution","volume":"73 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2002-05-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"13","resultStr":"{\"title\":\"A method for detecting faulty code violating implicit coding rules\",\"authors\":\"Tomoko Matsumura, Akito Monden, Ken-ichi Matsumoto\",\"doi\":\"10.1145/512035.512040\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"In the field of legacy software maintenance, there unexpectedly arise a large number of implicit coding rules --- which are seldom written down in specification documents or design documents --- as software becomes more complicated than it used be. Since not all the members in a maintenance team realize each of implicit coding rules, a maintainer who is not aware of a rule often violates the rule while doing various maintenance activities such as adding new functionality and repairing faults. The problem here is not only such a violation causes injection of a new fault into software but also this violation will be repeated again and again in the future by different maintainers. Indeed, we found that 32.7% of faults of certain legacy software were due to such violations.This paper proposes a method for detecting code fragments that violate implicit coding rules. In the method, an expert maintainer firstly investigates the causes, situations, and code fragments of each fault described in bug reports; and, identifies implicit coding rules as much as possible. Then, code patterns violating the rules (which we call bug code patterns) are described in a pattern description language. Finally, potential faulty code fragments are extracted by a pattern matching technique.\",\"PeriodicalId\":321820,\"journal\":{\"name\":\"International Workshop on Principles of Software Evolution\",\"volume\":\"73 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2002-05-19\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"13\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"International Workshop on Principles of Software Evolution\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/512035.512040\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Workshop on Principles of Software Evolution","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/512035.512040","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
A method for detecting faulty code violating implicit coding rules
In the field of legacy software maintenance, there unexpectedly arise a large number of implicit coding rules --- which are seldom written down in specification documents or design documents --- as software becomes more complicated than it used be. Since not all the members in a maintenance team realize each of implicit coding rules, a maintainer who is not aware of a rule often violates the rule while doing various maintenance activities such as adding new functionality and repairing faults. The problem here is not only such a violation causes injection of a new fault into software but also this violation will be repeated again and again in the future by different maintainers. Indeed, we found that 32.7% of faults of certain legacy software were due to such violations.This paper proposes a method for detecting code fragments that violate implicit coding rules. In the method, an expert maintainer firstly investigates the causes, situations, and code fragments of each fault described in bug reports; and, identifies implicit coding rules as much as possible. Then, code patterns violating the rules (which we call bug code patterns) are described in a pattern description language. Finally, potential faulty code fragments are extracted by a pattern matching technique.