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.
- A. A. Andrews, M. C. Ohlsson, and C. Wohlin, "Deriving fault architectures from defect history," J. of Software Maintenance: Research and Practice, Vol. 12, No. 5, pp. 287 - 304, Sept.-Oct. 2000. Google ScholarDigital Library
- S. G. Eick, T. L. Graves, A. F. Karr, J. S. Marron, and A. Mockus, "Does code decay? Assessing the evidence from change management data," IEEE Trans. on Software Engineering, Vol. 27, No. 1, pp. 1 - 12, Jan. 2001. Google ScholarDigital Library
- M. Fowler, "Refactoring: Improving the design of existing code", Addison-Wesley, 1999. Google ScholarDigital Library
- T. L. Graves, A. F. Karr, J. S. Marron, and H. Siy, "Predicting fault incidence using software change history," IEEE Trans. on Software Engineering, Vol. 26, No. 7, pp. 653 - 661, July 2000. Google ScholarDigital Library
- C. P. Hollocker, "Software reviews and audit handbook," p. 162, John Wiley & Sons, 1990. Google ScholarDigital Library
- W. S. Humphrey, "A discipline for software engineering," Addison-Wesley, 1995. Google ScholarDigital Library
- T. M. Khoshgoftaar, E. B. Allen, W. D. Jones, and J. P. Hudepohl, "Data mining for predictors of software quality," Int'l J. of Software Engineering and Knowledge Engineering, Vol. 9, No. 5, pp. 547 - 563, 1999.Google ScholarCross Ref
- F. Macdonald, and J. Miller, "A comparison of tool-based and paper-based software inspection," Empirical Software Engineering, Vol. 3, No. 3, Autumn 1998. Google ScholarDigital Library
- A. Monden, S. Sato, K. Matsumoto, and K. Inoue, "Modeling and analysis of software aging process," F. Bomarius and M. Oivo (Eds), Lecture Notes in Computer Science, Vol. 1840, pp. 140 - 153, 2000. Google ScholarDigital Library
- A. Monden, S. Sato, and K. Matsumoto, "Capturing industrial experiences of software maintenance using product metrics," Proc. 5th World Multi-Conference on Systemics, Cybernetics and Informatics, Vol. 2, pp. 394 - 399, July 2001.Google Scholar
- G. J. Myers, "The art of software testing," John Wiley, New York, 1979. Google ScholarDigital Library
- S. Paul, and A. Prakash, "A framework for source code search using program patterns," IEEE Trans. on Software Engineering, Vol. 20, No. 6, pp. 463 - 475, June 1994. Google ScholarDigital Library
- E. Regelson and A. Anderson, "Debugging practices for complex legacy software systems," Proc. International Conference on Software Maintenance, pp. 137-143, Sept. 1994. Google ScholarDigital Library
- N. F. Schneidewind and C. Ebert, "Preserve or redesign legacy systems?," IEEE Software, Vol. 15, No. 4, pp. 14 - 17, July/Aug. 1998. Google ScholarDigital Library
Index Terms
- A method for detecting faulty code violating implicit coding rules
Recommendations
The Detection of Faulty Code Violating Implicit Coding Rules
ISESE '02: Proceedings of the 2002 International Symposium on Empirical Software EngineeringIn the field of legacy software maintenance, there unexpectedly arises a large number of implicit coding rules, which we regard as a cancer in software evolution. Since such rules are usually undocumented and each of them is recognized only by a few ...
Code Clone Graph Metrics for Detecting Diffused Code Clones
APSEC '09: Proceedings of the 2009 16th Asia-Pacific Software Engineering ConferenceCode clones (duplicated source code in a software system) are one of the major factors in decreasing maintainability. Many code clone detection methods have been proposed to find code clones automatically from large-scale software. However, it is still ...
Detecting and managing code smells: research and practice
ICSE '18: Proceedings of the 40th International Conference on Software Engineering: Companion ProceeedingsCode smells indicate the presence of quality problems that make the software hard to maintain and evolve. A software development team can keep their software maintainable by identifying smells and refactor them. In the first part of the session, we ...
Comments