A heuristic-based approach to code-smell detection

D. Kirk, M. Roper, M. Wood

Research output: Chapter in Book/Report/Conference proceedingConference contribution book

526 Downloads (Pure)

Abstract

Encapsulation and data hiding are central tenets of the object oriented paradigm. Deciding what data and behaviour to form into a class and where to draw the line between its public and private details can make the difference between a class that is an understandable, flexible and reusable abstraction and one which is not. This decision is a difficult one and may easily result in poor
encapsulation which can then have serious implications for a number of system qualities. It is often hard to identify such encapsulation problems within
large software systems until they cause a maintenance problem (which is usually too late) and attempting to perform such analysis manually can also be tedious and error prone. Two of the common encapsulation problems that can arise as a consequence of this decomposition process are data classes and god classes.
Typically, these two problems occur together – data classes are lacking in functionality that has typically been sucked into an over-complicated and domineering god class. This paper describes the architecture of a tool which automatically detects data and god classes that has been developed as a plug-in for the Eclipse IDE. The technique has been evaluated in a controlled study on two large open source systems which compare the tool results to similar work by Marinescu, who employs a metrics-based approach to detecting such features. The study provides some valuable insights into the strengths and weaknesses of the two approaches
Original languageEnglish
Title of host publication1st workshop on refactoring tools (WRT'07) proceedings
Pages54-56
Number of pages3
Publication statusPublished - 2007

Keywords

  • heuristic-based
  • code-smell detection
  • encapsulation
  • data hiding

Fingerprint

Dive into the research topics of 'A heuristic-based approach to code-smell detection'. Together they form a unique fingerprint.
  • Detecting Design Flaws In Code

    Roper, M. (Principal Investigator) & Wood, M. (Co-investigator)

    Project: Research

Cite this