stg-tud / MUDetect

Mozilla Public License 2.0
24 stars 8 forks source link

Referencing final variables in anonymous classes #10

Closed nguyenhoan closed 6 years ago

nguyenhoan commented 6 years ago

http://mubench.svamann.de/fse18-ext/private/experiments/2/detectors/MuDetect_180301_1_LabelVisitor/projects/testng/versions/677302c/misuses/finding-14/reviewers/hoan?origin=/fse18-ext/private/experiments/2/detectors/MuDetect_180301_1_LabelVisitor/runs&ex2_review_size=20

salsolatragus commented 6 years ago

What do you have in mind here? The violation is actually correct. The pattern comes from the methods that take a message as a third parameter, and this message is passed to both the constructor and the call in the anonymous inner class. Whereas in the violation we have the delta as third parameter, which is only used in the anonymous class. Admittedly, this is difficult to grasp from the output, because we match all data nodes, such that the String node in the pattern becomes an int node in the display...

nguyenhoan commented 6 years ago

Ok. I got it now. I thought AUG building could not figure out one of the final parameter was used in the call inside anonymous class. But you we are right. Both parameters of that call are there.