A heuristic-based approach to code-smell detection

D. Kirk, M. Roper, M. Wood

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

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
LanguageEnglish
Title of host publication1st workshop on refactoring tools (WRT'07) proceedings
Pages54-56
Number of pages3
Publication statusPublished - 2007

Fingerprint

Encapsulation
Decomposition

Keywords

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

Cite this

Kirk, D., Roper, M., & Wood, M. (2007). A heuristic-based approach to code-smell detection. In 1st workshop on refactoring tools (WRT'07) proceedings (pp. 54-56)
Kirk, D. ; Roper, M. ; Wood, M. / A heuristic-based approach to code-smell detection. 1st workshop on refactoring tools (WRT'07) proceedings. 2007. pp. 54-56
@inproceedings{340edc7499a24440a923daf24099a25f,
title = "A heuristic-based approach to code-smell detection",
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 poorencapsulation which can then have serious implications for a number of system qualities. It is often hard to identify such encapsulation problems withinlarge 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",
keywords = "heuristic-based , code-smell detection, encapsulation , data hiding",
author = "D. Kirk and M. Roper and M. Wood",
year = "2007",
language = "English",
pages = "54--56",
booktitle = "1st workshop on refactoring tools (WRT'07) proceedings",

}

Kirk, D, Roper, M & Wood, M 2007, A heuristic-based approach to code-smell detection. in 1st workshop on refactoring tools (WRT'07) proceedings. pp. 54-56.

A heuristic-based approach to code-smell detection. / Kirk, D.; Roper, M.; Wood, M.

1st workshop on refactoring tools (WRT'07) proceedings. 2007. p. 54-56.

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

TY - GEN

T1 - A heuristic-based approach to code-smell detection

AU - Kirk, D.

AU - Roper, M.

AU - Wood, M.

PY - 2007

Y1 - 2007

N2 - 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 poorencapsulation which can then have serious implications for a number of system qualities. It is often hard to identify such encapsulation problems withinlarge 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

AB - 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 poorencapsulation which can then have serious implications for a number of system qualities. It is often hard to identify such encapsulation problems withinlarge 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

KW - heuristic-based

KW - code-smell detection

KW - encapsulation

KW - data hiding

M3 - Conference contribution book

SP - 54

EP - 56

BT - 1st workshop on refactoring tools (WRT'07) proceedings

ER -

Kirk D, Roper M, Wood M. A heuristic-based approach to code-smell detection. In 1st workshop on refactoring tools (WRT'07) proceedings. 2007. p. 54-56