Toradocu produces wrong translations for comments that are inherited in overriding methods.
Consider the method org.apache.commons.math3.complex.Complex#divide(Complex).
Toradocu extracts the following tag:
{
"exception": {
"qualifiedName": "org.apache.commons.math3.exception.MathArithmeticException",
"name": "MathArithmeticException",
"isArray": false
},
"codeTags": [
"a"
],
"comment": "if a is zero",
"kind": "THROWS",
"condition": "target.add()==0 || target.abs()==0 || target.tan()==0"
}
The translation is wrong. The problem is due to the fact that the comment written by developers if a is zero has a meaning when applied to the supertype method. The supertype method is overridden and the parameter, originally named a in the supertype, is renamed to divisor in the subtype. Since Toradocu uses the parameter list of the method in the subtype, there is no match between a and divisor. As a consequence, the translated condition is wrong.
Toradocu no longer inherits methods and comments, i.e., it produces procedure specifications for the methods and the comments that are present in the target class.
Toradocu produces wrong translations for comments that are inherited in overriding methods. Consider the method
org.apache.commons.math3.complex.Complex#divide(Complex)
. Toradocu extracts the following tag:The translation is wrong. The problem is due to the fact that the comment written by developers
if a is zero
has a meaning when applied to the supertype method. The supertype method is overridden and the parameter, originally nameda
in the supertype, is renamed todivisor
in the subtype. Since Toradocu uses the parameter list of the method in the subtype, there is no match betweena
anddivisor
. As a consequence, the translated condition is wrong.