Adapt IdentityValidator with test cases#867
Adapt IdentityValidator with test cases#867JonasKlauke merged 6 commits intosoot-oss:developfrom Momo-Not-Emo:identity-validator
Conversation
JonasKlauke
left a comment
There was a problem hiding this comment.
Thanks for the help 👍
I spotted two improvements. It would be nice if you could include them
| List<ValidationException> exceptions = new ArrayList<>(); | ||
|
|
||
| boolean hasThisLocal = false; | ||
| SootMethod method = view.getMethod(body.getMethodSignature()).get(); |
There was a problem hiding this comment.
handle the case in which the method can not be found in the given view.
There was a problem hiding this comment.
handle the case in which the method can not be found in the given view.
what's the expected behaviour when the method does not present in the given view? Skip this validator or throw an exception?
There was a problem hiding this comment.
We should not fail - just abort - we can't say anything about it and in this case we should not complain as we could be in in a partial analysis situation - i.e. SootUp should do the most of the available information
sootup.core/src/main/java/sootup/core/validation/IdentityValidator.java
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #867 +/- ##
=============================================
+ Coverage 68.57% 68.59% +0.01%
- Complexity 3892 3904 +12
=============================================
Files 311 311
Lines 15192 15234 +42
Branches 2586 2597 +11
=============================================
+ Hits 10418 10449 +31
- Misses 3874 3882 +8
- Partials 900 903 +3 ☔ View full report in Codecov by Sentry. |
@JonasKlauke I have made changes according to your review. Could you review the changes? Thx~ |
|
Always run the fmt:format plugin before commiting or pushing 😄 I have also created so many fmt commits 😆 |
The Identity Validator, based on Soot code, now includes added test cases covering all branches, except for cases where "parameterRef" is out-of-index. This omission is intentional, as it prevents the jimple file from being unloaded due to such jimple methods.