albertogoffi / toradocu

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

Unable to separate sentences in comments with parenthesis #106

Open khaeghar opened 7 years ago

khaeghar commented 7 years ago

At PrecisionRecallCommonsMath3#testArithmeticUtils

Given the comment "Exponent (must be positive or zero)"

The expected condition is "args[1]>=0"

Received empty condition instead.

-> Exponent/VBZ (root) -> positive/JJ (dep) -> -LRB-/-LRB- (punct) -> e/SYM (dep) -> must/MD (aux) -> be/VB (cop) -> or/CC (cc) -> zero/VB (conj:or) -> -RRB-/-RRB- (punct) -> zero/VB (dep) -> ./. (punct)

Exponent is the root, but since there are a big distance between the parameter "e" and "Exponent", there's no subject match. Also, with the solution provided for this kind of translations, the ideal situation would be to have "must be positive or zero" in a different sentence, so we can get the translation for "e must be positive or zero"