private void logException(ClassContext classContext, Method method, Exception ex) { bugReporter.logError("Exception while analyzing " + classContext.getFullyQualifiedMethodName(method), ex); }
public boolean isDuplicated(WarningPropertySet<WarningProperty> propertySet, int pc, boolean isConsistent) { boolean duplicated = false; if (!isConsistent) { if (propertySet.containsProperty(NullDerefProperty.DEREFS_ARE_CLONED)) { duplicated = true; } else { try { CFG cfg = classContext.getCFG(method); if (cfg.getLocationsContainingInstructionWithOffset(pc).size() > 1) { propertySet.addProperty(NullDerefProperty.DEREFS_ARE_INLINED_FINALLY_BLOCKS); duplicated = true; } } catch (CFGBuilderException e) { AnalysisContext.logError("Error while analyzing " + classContext.getFullyQualifiedMethodName(method), e); } } } return duplicated; }
@Override public void visitClassContext(ClassContext classContext) { JavaClass javaClass = classContext.getJavaClass(); if(!PreorderVisitor.hasInterestingMethod(javaClass.getConstantPool(), allMethods)) { return; } Method[] methodList = javaClass.getMethods(); for (Method method : methodList) { MethodGen methodGen = classContext.getMethodGen(method); if (methodGen == null) { continue; } try { analyzeMethod(classContext, method); } catch (DataflowAnalysisException e) { bugReporter.logError( "FindSqlInjection caught exception while analyzing " + classContext.getFullyQualifiedMethodName(method), e); } catch (CFGBuilderException e) { bugReporter.logError( "FindSqlInjection caught exception while analyzing " + classContext.getFullyQualifiedMethodName(method), e); } catch (RuntimeException e) { bugReporter.logError( "FindSqlInjection caught exception while analyzing " + classContext.getFullyQualifiedMethodName(method), e); } } }
|| refJavaClass.isFinal() || castJavaClass.isFinal(); if (DEBUG) { System.out.println(" In " + classContext.getFullyQualifiedMethodName(method)); System.out.println("At pc: " + handle.getPosition()); System.out.println("cast from " + refName + " to " + castName);
AnalysisContext.logError( "Error looking for previous instruction to " + where + " in " + classContext.getFullyQualifiedMethodName(method), e);
foundDeadClassInitialization = true; } else { AnalysisContext.logError("LDC loaded " + value + "at " + location.getHandle().getPosition() + " in " + classContext.getFullyQualifiedMethodName(method));
private void logException(ClassContext classContext, Method method, Exception ex) { bugReporter.logError("Exception while analyzing " + classContext.getFullyQualifiedMethodName(method), ex); }
public boolean isDuplicated(WarningPropertySet<WarningProperty> propertySet, int pc, boolean isConsistent) { boolean duplicated = false; if (!isConsistent) { if (propertySet.containsProperty(NullDerefProperty.DEREFS_ARE_CLONED)) { duplicated = true; } else { try { CFG cfg = classContext.getCFG(method); if (cfg.getLocationsContainingInstructionWithOffset(pc).size() > 1) { propertySet.addProperty(NullDerefProperty.DEREFS_ARE_INLINED_FINALLY_BLOCKS); duplicated = true; } } catch (CFGBuilderException e) { AnalysisContext.logError("Error while analyzing " + classContext.getFullyQualifiedMethodName(method), e); } } } return duplicated; }
@Override public void visitClassContext(ClassContext classContext) { JavaClass javaClass = classContext.getJavaClass(); if(!PreorderVisitor.hasInterestingMethod(javaClass.getConstantPool(), allMethods)) { return; } Method[] methodList = javaClass.getMethods(); for (Method method : methodList) { MethodGen methodGen = classContext.getMethodGen(method); if (methodGen == null) { continue; } try { analyzeMethod(classContext, method); } catch (DataflowAnalysisException e) { bugReporter.logError( "FindSqlInjection caught exception while analyzing " + classContext.getFullyQualifiedMethodName(method), e); } catch (CFGBuilderException e) { bugReporter.logError( "FindSqlInjection caught exception while analyzing " + classContext.getFullyQualifiedMethodName(method), e); } catch (RuntimeException e) { bugReporter.logError( "FindSqlInjection caught exception while analyzing " + classContext.getFullyQualifiedMethodName(method), e); } } }
|| refJavaClass.isFinal() || castJavaClass.isFinal(); if (DEBUG) { System.out.println(" In " + classContext.getFullyQualifiedMethodName(method)); System.out.println("At pc: " + handle.getPosition()); System.out.println("cast from " + refName + " to " + castName);
AnalysisContext.logError( "Error looking for previous instruction to " + where + " in " + classContext.getFullyQualifiedMethodName(method), e);
foundDeadClassInitialization = true; } else { AnalysisContext.logError("LDC loaded " + value + "at " + location.getHandle().getPosition() + " in " + classContext.getFullyQualifiedMethodName(method));