Detecting Design Flaws In Code

  • Roper, Marc (Principal Investigator)
  • Wood, Murray (Co-investigator)

Project: Research

Project Details


Refactoring is a technique for improving the design of existing code by applying a number of defined code-level transformations to address identified software design flaws. Refactoring has a significant role to play in software development by increasing the flexibility of an existing design to accommodate the next stage of design or a maintenance change. A key challenge in the refactoring process is the identification of the points at which these refactorings may be applied – the design flaws. Some are relatively easy to spot but the majority are concerned with subtle relationships between attributes of the code and are not easily identified. While human experience and intuition undoubtedly play a significant role in identifying these design flaws, searching for a large range of potential problems in a sizeable system is a daunting task that cries out for some form of automated support. The aim of this project was to investigate, evaluate and develop techniques for automatically detecting design flaws.

Layman's description

Software is by no means perfect, and software design is particularly difficult to get right. Like many designs, software is a balance between competing forces: functionality, flexibility, maintainability etc. There are a well-recognised set of problems that are commonly found in even the best software that may be indicative of deeper problems and therefore should be fixed - these are known as design flaws. However, these are described at a very abstract level and finding them within very large projects is time-consuming and difficult. The aim of this project was to be able to spot concrete instances of these high-level problems in software and bring them to the attention of the software engineer to address.

Key findings

The primary outcome of the project was a software tool which automatically detects violations of encapsulation in software. The tool has been developed as a plug-in for the Eclipse IDE and uses heuristic descriptions of common design flaws such as data and god classes to detect areas of poor encapsulation within a system. The approach has been evaluated in a controlled study on two large open source systems which provided some valuable insights into the strengths and weaknesses of the approaches, mainly centred around the precise definition of design flaws and how this may be improved.
StatusNot started


Explore the research topics touched on by this project. These labels are generated based on the underlying awards/grants. Together they form a unique fingerprint.
  • A heuristic-based approach to code-smell detection

    Kirk, D., Roper, M. & Wood, M., 2007, 1st workshop on refactoring tools (WRT'07) proceedings. p. 54-56 3 p.

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

    Open Access
    486 Downloads (Pure)
  • Using attribute slicing to refactor large classes

    Kirk, D., Roper, M. & Walkinshaw, N., 2006, Beyond Program Slicing. Binkley, D. W., Harman, M. & Krinke, J. (eds.). 12 p.

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