Beta 1


Title Measuring Complexity in X++ Code
Author Sørensen, Anders Tind
Supervisor Christensen, Knud Smed (Department of Informatics and Mathematical Modeling, Technical University of Denmark, DTU, DK-2800 Kgs. Lyngby, Denmark)
Institution Technical University of Denmark, DTU, DK-2800 Kgs. Lyngby, Denmark
Thesis level Bachelor thesis
Year 2006
Abstract Almost from the beginning of software development there has been a wish of being able to measure the quality of the program code. One aspect that affects several areas of software quality is the complexity of the code. Limiting the code complexity can lead to more testable code, provides faster bug-fixing and makes it easier to implement new features. The purpose of this project has been to find and implement relevant complexity metrics for the programming language X++, which is a part of the Microsoft Dynamics AX ERP system. After some investigation the following ten metrics were selected: Source Lines Of Code, Comment Percentage, Cyclomatic Complexity, Weighted Methods per Class, Depth of Inheritance Tree, Number Of Children, Coupling Between Objects, Response For Class, Lack of Cohesion in Methods and Fan In. They represent some of the most established measures available and are a combination of traditional metrics and metrics designed specifically for object-oriented languages. Each of the chosen metrics was implemented as stipulated in the theory. Since X++ contains special language features (e.g. embedded SQL) that the original authors did not describe, it was necessary to find out what the original intend of the metric was, an then derive a reasonable solution. The metrics has been integrated into the existing Best Practice tool, which allows developers to check that their code adheres to certain non-syntax rules. This way they can immediately determine if the complexity values of their code is outside acceptable ranges and hence may need changes to reduce complexity. In addition to the Best Practice checks, the metric values can be extracted as raw data for statistical purposes. It is also possible to directly generate statistics on a team/module level.
Imprint Department of Informatics and Mathematical Modeling, Technical University of Denmark, DTU : DK-2800 Kgs. Lyngby, Denmark
Pages 175
Fulltext
Original PDF imm4708.pdf (1.00 MB)
Admin Creation date: 2006-10-06    Update date: 2012-12-18    Source: dtu    ID: 191768    Original MXD