Antipattern Visualization

Antipattern Visualization technique helps user to understand this antipattern in a graphical representation format.

How to view Antipattern Visualization?

  1. Go to Project and open your desired repository.
  2. The Antipattern visualization can be accessed from the Component Explorer present at the top navigation bar next to the duplication tab.
  3. Clicking on this Component explorer icon will open the insights of that specific component. Antipatterns can be visualized via 2 ways:
    1. Click on anti-pattern icon OR
    2. Click on the antipattern tag present on the left side of the code.
  4. Visualization for that specific antipattern will be opened.
  5. On the right side navigation pane, a short description of that antipattern with the link to associated documentation will be available.
  6. At the bottom of the visualization, detailed information about why this method is an antipattern will be displayed.

Use of Antipattern Visualization

This visualization technique is to represent each antipattern in a pictorial format instead of a detailed description. The layout of the visualized report is stored in JSON format.

Following details will be displayed:

  • Visualization patterns will change for every antipattern.
  • There may be incoming or outgoing dependencies among different classes and methods.
  • On the right side pane, there will be a static text “Why you should care” with the link to the associated documentation.
  • Why this method is an antipattern will be displayed at the bottom of visualization.
  • If the same line of code has one or more antipatterns, the user can navigate by clicking on the arrow button present on the right side corner. The number (E.g. 2/4) tells the user which antipattern is currently being viewed.


Below is the elaborated example of “Dispersed Coupling“:

  • From the visualization image, the box displayed in the center of the image is basically a class and has a method inside the class.
  • Outgoing arrows have numbers that represent dependencies. Each number tells how many methods are present inside each class.
  • An overview of the Dispersed Coupling antipattern is mentioned as a static text on the right-side panel. Clicking on the link of “read more” will allow the user to view detailed documentation.
  • The text at the bottom “Why it is Dispersed Coupling” will let the user know about the minute details of that specific antipattern such as how many methods, related or unrelated classes are present in this antipattern.

Antipatterns supported currently:

Here is the list of antipatterns that are depicted in visualized format:

  1. Feature Envy
  2. Dispersed Coupling
  3. Intensive Coupling
Suggest Edit