albertogoffi / toradocu

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

not recognizing quantifier over elements of array #66

Closed bjkeller closed 7 years ago

bjkeller commented 7 years ago

Toradocu generates the following condition method

// double org.apache.commons.math3.analysis.differentiation.DerivativeStructure.getPartialDerivative(int[] orders)
    public static boolean m12_p0(org.apache.commons.math3.analysis.differentiation.DerivativeStructure receiver12_p0, int[] orders) {
        // @param orders derivation orders with respect to each variable (if all orders are 0, the value is returned) ==> args[0]==0
        return orders == 0;
    }

for org.apache.commons.math3.analysis.differentiation.DerivativeStructure.getPartialDerivative

The @param comment indicates that the condition should be orders[i]==0 for all i, but the condition is testing if the whole array is zero.

This relates somewhat to issue #65 where Toradocu is also generating a condition where the types are not compatible.