-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CallGraphAlgorithm.addClass(..) implementation #783
Conversation
swissiety
commented
Dec 21, 2023
•
edited
Loading
edited
- in case of non-existing methods in the CG it threw:
- don't fail if nothing new was added (or a subtask was already calculated before)
- return more convenient Signature from JavaSootClass.getType()
168668f
to
4dfe87f
Compare
4dfe87f
to
54191f1
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #783 +/- ##
=============================================
- Coverage 63.78% 63.78% -0.01%
- Complexity 3385 3386 +1
=============================================
Files 315 315
Lines 15017 15022 +5
Branches 2534 2535 +1
=============================================
+ Hits 9579 9582 +3
Misses 4545 4545
- Partials 893 895 +2 ☔ View full report in Codecov by Sentry. |
updated.addCall(callingMethodSig, overridingMethodSig); | ||
if (updated.containsMethod(overriddenMethodSig)) { | ||
for (MethodSignature callingMethodSig : updated.callsTo(overriddenMethodSig)) { | ||
updated.addCall(callingMethodSig, overridingMethodSig); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only true for CHA algorithm or for the RTA (if the given classtype is instantiated)
If we want to actually support this function the abstaractcallgraphalgorithm has to be abstract and this method has to be developed for each algorithm.
additionally if this class was already in the view all edges are already included.
I think the only reason for this method if you want to force the call graph to contain the class, even when the algorithm would say it is not contained, and then we could do it like this (like CHA)