RADAR: An Approach for the Detection of Antipatternsin UML Class Diagrams

University essay from Göteborgs universitet/Institutionen för data- och informationsteknik

Abstract: Anti-patterns in UML designs, alias bad design choices that areclaimed as due to the incompetent participation of the designer to Object-Oriented (OO)system could lead to later issues regarding to its maintenance. That is why the earlycaptureof those is a common desirability and emphasized as it would be a highlyimportant action for the prevention of issues. However, the discovery of anti-patterns isa difficult procedure in case of working with a large scale and complex OO system.There are existing metric based solutions in which the detection of anti-patterns isautomatized, however, none of those operates on UML class diagrams. In this paper, weintroduce our approach called RADAR, which is a solution to detect inter alia, ComplexClass, Large Class, Lazy Class, and ManyFieldAttributesButNotComplex (MFABNC) inUML class diagrams and returns warnings of the results. Essentially, RADAR uses acombination of some existing software design (SD) metrics and rules of the anti-patterns,moreover provides a flexible algorithmic procedure. Since each class diagrams arestructured uniquely, meaning that those consists of a different number of classes; whereeach classes are variedly sized; and sometimes the classes are purposely implementslarge number of attributes and operations, thereby causing hasty judgements in thedetection procedure due to the characteristics of some anti-patterns, which can bedetected specifically by the large number of attributes and operations of a class.Therefore, we are providing a supplementation for the detection algorithms to comparethe size of each classes inside the diagrams with the calculations of quartiles andaverage. The purpose of this approach is not only the detection of anti-patterns, but themeasurement of significance. The computations are used to analyze each classes in aclass diagram, where the resulted values will be unique for every diagrams. Taking theseuniquenesses into the detection rules, we enabled a more accurate decision-making forour algorithms in RADAR, such as the measurement of significance whether thesuspected element is still considerable as an anti-pattern after the comparisons madeagainst to the other classes. Hence, as the name of our approach indicates, RADAR“sees” the size of the suspects, but only “warns” in case of necessity. This research wascarried out by the application of design research methodology with the induction ofstatistical analysis made on the test results compared to Ptidej tool suite v5.8.1. The testwas performed on the same test materials and anti-pattern types, whereas themeasurement- regarding to the test coverage from the aspect of what percentage can ourRADAR approach locate from those classes per anti-pattern categories that Ptidej doesresultedto the average of 26% accuracy for RADAR in the detection of Complex Class,and 61% for the detection of Lazy Class symptoms. Unfortunately, this measurementcould not be made for Large Class and MFABNC anti-patterns based on the reason thatPtidej tool could not detect those. We claimed this problem as due to code generationprocedure by the software we used regarding to the arbitrarily generated lines of code(LOC), which is if is long, is actually one of the main symptom of the latter mentionedtwo anti-patterns. To compensate the deficiencies of the measurement regarding to thedetection accuracy of the four anti-patterns, we requested a review for RADAR fromvarious people in the person of PhD students. Based on their feedback, the accuracy ofRADAR in the detection of Large Class is between the averages of 38%-75%, and 55%-80% for MFABNC. Regarding to the average accuracy of the other two anti-patterns,the detection of Complex Class is determined as between 68%-70%, and 80%-99% forLazy Class.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)