albertogoffi / toradocu

Toradocu - automated generation of test oracles from Javadoc documentation
Other
42 stars 21 forks source link

bad condition using instanceof #113

Open bjkeller opened 7 years ago

bjkeller commented 7 years ago

The condition targetinstanceofEurope is being generated for the FreeCol method net.sf.freecol.common.model.Player.canMoveToEurope() that has a @return tag with text return True if this player has an instance of Europe.

The condition target instanceof Europe would also be wrong, since the Player class is not a subtype of Europe. The condition that matches the method would be target.getEurope() != null, but I'm not sure how you would determine that was correct out of context.