Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added an example with screenshots

...

This rule detects duplicate expressions per module, considering all modules in scope. This is an indication that expressions have to be maintained in multiple places which is bad for maintainability reasons.

Possible

...

improvement

Duplicate expressions cause maintainability issues in your model, as changes in your business rules have to be implemented in several locations. Think about making reusable expressions in a shared module or storing the result in an attribute.

Example

In this model, three reusable expressions exist (each in a different module) for the same expression.

Image Added

That causes this code smell:

Image Added