SpaghettiCode.htm
Click here to get the file
Size
2.0 kB
-
File type
text/html
File contents
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Nikos Tsantalis">
<title>Detection
Rules of the Spaghetti Code</title></head>
<body>
<div id="toptabs">
<p> </p>
</div>
<div id="container">
<div id="logo">
<!--<h1>Design Defect Detection</h1>-->
</div>
<h3>Description</h3>
The Spaghetti Code is an antipattern that is characteristic of procedural thinking in object-oriented
programming. Spaghetti Code is revealed by classes with no structure, declaring long methods with
no parameters, and utilising class or global variables. Names of classes and methods may suggest
procedural programming. Spaghetti Code does not exploit and prevents the use of object-orientation
mechanisms, polymorphism and inheritance.</p>
<h3>Detection Rules</h3>
RULE_CARD : SpaghettiCode { <br><br>
<span class="marge">RULE : SpaghettiCode {INTER NoInheritanceClassGlobalVariable LongMethodMethodNoParameter };<br><br></span>
<span class="marge">RULE : LongMethodMethodNoParameter {INTER LongMethod MethodNoParameter }; <br><br></span>
<span class="marge">RULE : LongMethod { (METRIC: METHOD_LOC, VERY_HIGH, 0) };<br><br></span>
<span class="marge">RULE : MethodNoParameter {(STRUCT: METHOD_NO_PARAM) };<br><br></span>
<span class="marge">RULE : NoInheritanceClassGlobalVariable {INTER NoInheritance ClassGlobalVariable };<br><br></span>
<span class="marge">RULE : NoInheritance {(METRIC: DIT, INF_EQ, 2, 0) };<br><br></span>
<span class="marge">RULE : ClassGlobalVariable {(STRUCT: GLOBAL_VARIABLE, 1) };<br><br></span>
};
</body>
<form method="post">
<p align="center"><input type="button" name="B1" value="Close" onClick="window.close()"></p>
</form>
</html>
Created by
mohanaou
Last modified
2010-02-19 12:33