albertogoffi / toradocu

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

Condition being generated on receiver of constructor #88

Closed bjkeller closed 7 years ago

bjkeller commented 7 years ago

When run on net.sf.freecol.client.gui.panel.InPortPanel of https://github.com/randoop/FreeCol get the condition class

// net.sf.freecol.client.gui.panel.InPortPanel.InPortPanel(net.sf.freecol.client.gui.panel.PortPanel portPanel,java.lang.String name,boolean editable)
    public static boolean m0_p2(net.sf.freecol.client.gui.panel.PortPanel portPanel, java.lang.String name, boolean editable) {
        // @param editable Is this panel editable? ==> target.isEditable()
        return receiver0_p2.isEditable();
    }

that doesn't compile.

The issue is that constructors don't have receivers

mernst commented 7 years ago

Constructors of inner classes have receivers, but constructors of outer classes (which are most classes) do not.

bjkeller commented 7 years ago

Good point. I would guess that the condition method output doesn't account for this, which is a different issue.

So, restated: the issue is that the condition has no connection to the signature of the condition method.

bjkeller commented 7 years ago

We moved responsibility for condition methods to Randoop, so I think this is a non-issue for Toradocu.