← Latest papers
💻 computer science

An Event-Driven Tool for Context-Aware Code Smell Detection Using SmellDSL

This paper presents SmellHunter, an event-driven, context-aware tool that integrates static code metrics with project and team metadata via a domain-specific language (SmellDSL) to detect code smells and provide actionable, location-based insights for informed refactoring decisions within the Eclipse environment.

Original authors: Matheus dos Santos Viegas, Adrian Gabriel Keller dos Santos, Kleinner Farias, Robson Keemps da Silva

Published 2026-05-21
📖 4 min read☕ Coffee break read

Original authors: Matheus dos Santos Viegas, Adrian Gabriel Keller dos Santos, Kleinner Farias, Robson Keemps da Silva

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are managing a massive, ever-growing library. Over time, books get messy: some have pages torn out, others are written in confusing handwriting, and some are stuffed with too many unrelated stories. In the world of software, these messes are called "code smells." They aren't necessarily broken code, but they are warning signs that the design is getting sloppy, which makes the software harder to fix and update later.

For a long time, tools used to find these messes have been like strict librarians with a single, unchangeable rulebook. They scan the books and shout, "This book has too many pages!" or "This chapter is too long!" regardless of who wrote the book, where the library is located, or what the librarian's team thinks is actually important. This often leads to false alarms or ignores real problems that a specific team cares about.

SmellHunter is a new, smarter tool designed to fix this. Here is how it works, using simple analogies:

1. The Custom Rulebook (SmellDSL)

Instead of a rigid, one-size-fits-all rulebook, SmellHunter lets teams write their own custom rulebooks using a special language called SmellDSL.

  • The Analogy: Imagine a team of architects who decide that for their specific building project, having a room with 50 windows is fine, but having a door that opens into a wall is a disaster. SmellHunter allows them to write these specific rules down. It doesn't just look for generic "messiness"; it looks for the specific messiness that this particular team cares about.

2. The "Event-Driven" Delivery System

Traditional tools often work like a batch mail sorter: they wait until the end of the day to sort all the mail at once, which can be slow and disruptive. SmellHunter works like a high-speed, automated courier network.

  • The Analogy: As soon as a developer sends a request to check their code, it's like dropping a package into a smart conveyor belt (called the Smell Bus).
    • Station 1 (Validation): A robot checks if the package is sealed correctly and the address is real.
    • Station 2 (Interpretation): Another robot reads the custom rulebook and checks the code against it.
    • Station 3 (Storage): A third robot files the results in a cloud database.
  • Because these stations work independently and asynchronously, the developer doesn't have to wait around. They can keep working while the "couriers" do the heavy lifting in the background.

3. Adding Context: The "Where" and "Who"

This is the most unique part. Old tools just say, "There is a smell here." SmellHunter says, "There is a smell here, in this specific city, on this specific project, handled by this specific team."

  • The Analogy: Imagine a map of the library. Instead of just marking "Messy Book," SmellHunter marks "Messy Book in the New York Branch, written by Team Alpha, during the Winter Rush."
  • This helps teams realize, "Oh, the messy books are only happening in the New York branch during the winter." They can then send a specialist (a "Smell Hunter") to that specific location to fix the root cause, rather than trying to fix every book in the whole world.

4. The Dashboard and Mobile App

The tool connects to the developers' computers (via an Eclipse plugin) and their phones (via a mobile app).

  • The Analogy: It's like having a smart thermostat for your code. You can see the temperature (quality) of your code on your computer screen while you work. If a problem pops up, you get a notification. Later, you can pull out your phone to see a heat map of where the "hot spots" (bad smells) are located across different teams and locations, helping you decide where to send your best fixers.

Why Does This Matter?

The paper claims that SmellHunter changes the game by moving from static, universal rules to dynamic, team-specific context.

  • It acknowledges that what is a "bad smell" for one team might be fine for another.
  • It treats code quality not just as a technical problem, but as a human and organizational problem that varies by location and team culture.
  • It allows teams to act like detectives, hunting down specific patterns of decay in their own environment rather than following a generic checklist.

In short, SmellHunter is a context-aware, event-driven detective that helps software teams find and fix their specific design messes without stopping their daily work, using custom rules and real-world location data to guide the way.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →