Supporting Automatic Code Review via Design

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]  Thomas Gantner,et al.  Experiences on defining and evaluating an adapted review process , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[2]  Federico Bergenti IMPROVING UML DESIGNS USING AUTOMATIC DESIGN PATTERN DETECTION , 2001 .

[3]  Yann-Gaël Guéhéneuc,et al.  Instantiating and detecting design patterns: putting bits and pieces together , 2001, Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001).

[4]  Alexander Chatzigeorgiou,et al.  A Novel Approach to Automated Design Pattern Detection , 2005 .

[5]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[6]  Kevin Chan,et al.  An agent-based approach to computer assisted code inspections , 2001, Proceedings 2001 Australian Software Engineering Conference.

[7]  Michael Fagan Design and Code Inspections to Reduce Errors in Program Development , 1976, IBM Syst. J..

[8]  Mirko Conrad,et al.  Experiences with model and autocode reviews in model-based software development , 2006, SEAS '06.

[9]  John Mylopoulos,et al.  RULE-BASED DETECTION OF INCONSISTENCY IN UML MODELS , 2002 .

[10]  Hiroshi Watanabe,et al.  Efficiency analysis of model-based review in actual software design , 2006, ICSE.

[11]  Mario Luca Bernardi,et al.  Model-driven detection of Design Patterns , 2010, 2010 IEEE International Conference on Software Maintenance.

[12]  Ronald A. Olsson,et al.  Reverse Engineering of Design Patterns from Java Source Code , 2006, 21st IEEE/ACM International Conference on Automated Software Engineering (ASE'06).

[13]  Ingo Stürmer,et al.  Using Model and Code Reviews in Model-based Development of ECU Software , 2006 .

[14]  Ronald A. Olsson,et al.  Reverse Engineering of Design Patterns for High Performance Computing , 2005 .