stg-tud / MUDetect

Mozilla Public License 2.0
24 stars 8 forks source link

Missing calls on receiver #7

Open salsolatragus opened 6 years ago

salsolatragus commented 6 years ago

Sometimes we’re missing calls on a receiver, e.g., this violation says there’s no doFinal() call on the Cipher, but I see it in line 142. I’ve seen several examples like this, all involving try statements. Is this a limitation of our analysis or a bug?

salsolatragus commented 6 years ago

Here's another case. The unlock() call in the finally should have the same receiver as the lock() call in the try.

nguyenhoan commented 6 years ago

This is a bug. I am looking into it.

nguyenhoan commented 6 years ago

I fixed the bug https://github.com/stg-tud/MUDetect/commit/0fc81e2be5d836012b946decfa6daa71f3ed8f33

nguyenhoan commented 6 years ago

I also need to create an empty catch block for the case when no exception is thrown https://github.com/stg-tud/MUDetect/commit/c0af7ff73a307c0f92ec8e9e3084620f22c0ca3f

update test cases with examples from issues https://github.com/stg-tud/MUDetect/commit/fbfdb029a16461fe3dea1d95b0fb6c2956bafd2c