tsantalis / JDeodorant

JDeodorant
https://marketplace.eclipse.org/content/jdeodorant
MIT License
139 stars 59 forks source link

Stackoverflow error when running JDeodorant on OpenMap #80

Closed jaslatendresse closed 4 years ago

jaslatendresse commented 4 years ago

Whenever I run JDeodorant on OpenMap, I get the following error:

Capture d’écran, le 2020-09-25 à 12 00 20

that is for any code smell detection.

IDE: Eclipse JEE-2020-09

Commit: 9532b118358cb28d0cc022cc29cc4109485bfd22

Steps to the error:

  1. Select God Class from code smell tab
  2. Select OpenMap project from the project explorer
  3. Click on the find code smells button from JDeodorant div

This error is also obtained with any other code smell by reproducing the steps mentioned above.

tsantalis commented 4 years ago

@jaslatendresse How did you build the project? Does it have compilation errors when you run the code smell detection?

tsantalis commented 4 years ago

java.lang.StackOverflowError at gr.uom.java.ast.TypeObject.equals(TypeObject.java:85) at gr.uom.java.ast.AbstractMethodInvocationObject.equals(AbstractMethodInvocationObject.java:100) at java.util.HashMap.getNode(HashMap.java:572) at java.util.LinkedHashMap.get(LinkedHashMap.java:440) at gr.uom.java.ast.SystemObject.containsDelegate(SystemObject.java:140) at gr.uom.java.distance.MyAbstractExpression.recurseDelegations(MyAbstractExpression.java:81) at gr.uom.java.distance.MyAbstractExpression.recurseDelegations(MyAbstractExpression.java:82)

tsantalis commented 4 years ago

Wow, they have a function that calls itself ! The definition of infinite recursion

public boolean isPlotable(double lat, double lon) {
    return isPlotable(lat, lon);
}