Strathprints logo
Strathprints Home | Open Access | Browse | Search | User area | Copyright | Help | Library Home | SUPrimo

A heuristic-based approach to code-smell detection

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

WRT_Proceedings.pdf - Published Version

Download (3MB) | Preview


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

Item type: Book Section
ID code: 42227
Keywords: heuristic-based , code-smell detection, encapsulation , data hiding , Electronic computers. Computer science
Subjects: Science > Mathematics > Electronic computers. Computer science
Department: Faculty of Science > Computer and Information Sciences
Depositing user: Pure Administrator
Date Deposited: 29 Nov 2012 14:16
Last modified: 21 Jul 2015 19:48

Actions (login required)

View Item View Item