diff --git a/com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/ipa/callgraph/PythonSSAPropagationCallGraphBuilder.java b/com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/ipa/callgraph/PythonSSAPropagationCallGraphBuilder.java index e6947b1ab..66989c9ae 100644 --- a/com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/ipa/callgraph/PythonSSAPropagationCallGraphBuilder.java +++ b/com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/ipa/callgraph/PythonSSAPropagationCallGraphBuilder.java @@ -222,7 +222,7 @@ protected void processCallingConstraints( // If we are looking at the implicit parameter of a callable. if (call.getCallSite().isDispatch() && i == 0 && isCallable(rval)) { // Ensure that lval's variable refers to the callable method instead of callable object. - IClass callable = getCallable(target); + IClass callable = target.getMethod().getDeclaringClass(); IntSet instanceKeysForCallable = this.getSystem().getInstanceKeysForClass(callable); for (IntIterator it = instanceKeysForCallable.intIterator(); it.hasNext(); ) { @@ -292,18 +292,6 @@ protected void processCallingConstraints( } } - private IClass getCallable(CGNode target) { - IMethod method = target.getMethod(); - IClass declaringClass = method.getDeclaringClass(); - TypeName declaringClassName = declaringClass.getName(); - - TypeReference typeReference = - TypeReference.findOrCreate( - declaringClass.getClassLoader().getReference(), declaringClassName); - - return this.getClassHierarchy().lookupClass(typeReference); - } - protected boolean isCallable(PointerKey rval) { PointerAnalysis pointerAnalysis = this.getPointerAnalysis(); OrdinalSet pointsToSet = pointerAnalysis.getPointsToSet(rval);