DECOR: Detection of Design Defects

  1. Description
  2. Related Papers
  3. Links
  4. Installation
  5. Usage
  6. Material
  7. Acknowledgments
  8. Results

Description

DECOR is a tool that allows the specification and the detection of defects such as code smells and antipatterns using a unified vocabulary and a dedicated language. Ptidej is the front-end to the tool suite for evaluating and improving the quality of object-oriented programs, reverse-engineering object-oriented programs (AOL, C/C++, Java), and promoting patterns. Ptidej integrates DECOR as well as visualisations algorithms to ease the understanding of detected defects.

Related Papers

Links

Installation

Usage

Material

Acknowledgments

Results of the Detection

Detection Results in several systems

Results in Eclipse v3.1.2

Recall in Xerces v2.7.0

Examples of Detected Design Defects in Xerces v2.7.0
Design Defect Name Suspicious Class LOC, Name of the long method
Spaghetti Code
org.apache.xerces.impl.xs.models.XSDFACM 426 LOC, buildDFA(CMNode)
org.apache.xerces.dom.DOMNormalizer 946 LOC, normalizeNode(Node)
org.apache.xerces.impl.xs.traversers.XSAttributeChecker 862 LOC, validate(Object, String, String, int, XSDocumentInfo)
org.apache.xerces.util.URI 285 LOC, initializePath(String, int)
org.apache.xerces.impl.XMLScanner 486 LOC, scanAttributeValue(XMLString, XMLString, String, boolean, String)
Design Defect Name Suspicious Class Number of methods and attributes declared,
Data classes
Blob
org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl 127
javax.xml.datatype.DatatypeConstants
javax.xml.namespace.QName
org.apache.xerces.parsers.XML11DTDConfiguration 95
org.apache.xerces.xni.parser.XMLInputSource
org.apache.xerces.impl.dv.DTDDVFactory
org.apache.xerces.impl.validation.ValidationManager
org.apache.xerces.impl.dtd.DTDGrammar 184
org.apache.xerces.impl.dtd.XMLDTDDescription
org.apache.xerces.xni.XMLString
org.apache.xerces.impl.dtd.XMLContentSpec
org.apache.xerces.xni.QName
org.apache.xerces.xinclude.XIncludeHandler 222
org.apache.xerces.util.SecurityManager
org.apache.xerces.xni.XMLString
org.apache.xerces.util.XMLSymbols
org.apache.xerces.util.HTTPInputSource
org.apache.xerces.dom.DOMNormalizer 92
org.apache.xerces.impl.dtd.XMLDTDDescription
org.apache.xerces.xni.XMLString
org.apache.xerces.util.XMLSymbols
org.apache.xerces.xni.QName
Design Defect Name Suspicious Class Keywords
Functional Decomposition
org.apache.xerces.impl.xs.models.CMNodeFactory end, handle, traverse, copy, init, reset, modify, check, prepare, create, parse, validate, start, configure, process, report
org.apache.xerces.util.ParserConfigurationSettings idem
org.apache.xerces.impl.dv.xs.TimeDV idem
org.apache.xerces.impl.xs.identity.XPathMatcher idem
org.apache.xerces.impl.xs.traversers.XSAttributeChecker idem
Design Defect Name Suspicious Class Multiple Interfaces
Swiss Army Knife
org.apache.xerces.dom.NodeImpl org.w3c.dom.Node
org.w3c.dom.events.EventTarget
org.w3c.dom.NodeList
org.apache.xerces.jaxp.validation.ValidatorHandlerImpl org.apache.xerces.xs.PSVIProvider
org.apache.xerces.impl.validation.EntityState
org.xml.sax.DTDHandler
org.apache.xerces.jaxp.validation.ValidatorHelper
org.apache.xerces.xni.XMLDocumentHandler
org.xml.sax.helpers.XMLFilterImpl org.xml.sax.ContentHandler
org.xml.sax.ErrorHandler
org.xml.sax.XMLFilter
org.xml.sax.EntityResolver
org.xml.sax.DTDHandler
org.xml.sax.HandlerBase org.xml.sax.ErrorHandler
org.xml.sax.DTDHandler
org.xml.sax.EntityResolver
org.xml.sax.DocumentHandler
org.apache.xml.serialize.BaseMarkupSerializer org.xml.sax.DocumentHandler
org.xml.sax.DTDHandler
org.xml.sax.ext.LexicalHandler
org.apache.xml.serialize.Serializer
org.xml.sax.ContentHandler
org.apache.xml.serialize.DOMSerializer
org.xml.sax.ext.DeclHandler