@Override public void visitClassContext(ClassContext classContext) { JavaClass javaClass = classContext.getJavaClass(); Method[] methodList = javaClass.getMethods(); for (Method method : methodList) { MethodGen methodGen = classContext.getMethodGen(method); if (methodGen == null) { continue; } if (!prescreen(classContext, method)) { continue; } try { analyzeMethod(classContext, method); } catch (DataflowAnalysisException e) { bugReporter.logError("Error analyzing " + method.toString(), e); } catch (CFGBuilderException e) { bugReporter.logError("Error analyzing " + method.toString(), e); } } }
bugReporter.logError("Error analyzing " + method.toString(), e);
@Override public void visitClassContext(ClassContext classContext) { this.classContext = classContext; JavaClass jclass = classContext.getJavaClass(); Method[] methodList = jclass.getMethods(); for (Method method : methodList) { MethodGen methodGen = classContext.getMethodGen(method); if (methodGen == null) { continue; } // Prescreening - must have IF_ACMPEQ, IF_ACMPNE, // or an invocation of an instance method BitSet bytecodeSet = classContext.getBytecodeSet(method); if (bytecodeSet == null || !bytecodeSet.intersects(prescreenSet)) { continue; } if (DEBUG) { System.out.println("FindRefComparison: analyzing " + SignatureConverter.convertMethodSignature(methodGen)); } try { analyzeMethod(classContext, method); } catch (CFGBuilderException e) { bugReporter.logError("Error analyzing " + method.toString(), e); } catch (DataflowAnalysisException e) { // bugReporter.logError("Error analyzing " + method.toString(), // e); } bugAccumulator.reportAccumulatedBugs(); } }
@Override public void visitClassContext(ClassContext classContext) { JavaClass javaClass = classContext.getJavaClass(); Method[] methodList = javaClass.getMethods(); for (Method method : methodList) { MethodGen methodGen = classContext.getMethodGen(method); if (methodGen == null) { continue; } if (!prescreen(classContext, method)) { continue; } try { analyzeMethod(classContext, method); } catch (DataflowAnalysisException e) { bugReporter.logError("Error analyzing " + method.toString(), e); } catch (CFGBuilderException e) { bugReporter.logError("Error analyzing " + method.toString(), e); } } }
bugReporter.logError("Error analyzing " + method.toString(), e);
private void compare(final String name, final Method m) { // System.out.println("Method: " + m); final Code c = m.getCode(); if (c == null) { return; // e.g. abstract method } final byte[] src = c.getCode(); final InstructionList il = new InstructionList(src); final byte[] out = il.getByteCode(); if (src.length == out.length) { assertArrayEquals(name + ": " + m.toString(), src, out); } else { System.out.println(name + ": " + m.toString() + " " + src.length + " " + out.length); System.out.println(bytesToHex(src)); System.out.println(bytesToHex(out)); for (final InstructionHandle ih : il) { System.out.println(ih.toString(false)); } fail("Array comparison failure"); } }
methodnames[i] = jc.getMethods()[i].toString().replace('\n', ' ').replace('\t', ' ');
@Override public void visitClassContext(ClassContext classContext) { this.classContext = classContext; JavaClass jclass = classContext.getJavaClass(); Method[] methodList = jclass.getMethods(); for (Method method : methodList) { MethodGen methodGen = classContext.getMethodGen(method); if (methodGen == null) { continue; } // Prescreening - must have IF_ACMPEQ, IF_ACMPNE, // or an invocation of an instance method BitSet bytecodeSet = classContext.getBytecodeSet(method); if (bytecodeSet == null || !bytecodeSet.intersects(prescreenSet)) { continue; } if (DEBUG) { System.out.println("FindRefComparison: analyzing " + SignatureConverter.convertMethodSignature(methodGen)); } try { analyzeMethod(classContext, method); } catch (CFGBuilderException e) { bugReporter.logError("Error analyzing " + method.toString(), e); } catch (DataflowAnalysisException e) { // bugReporter.logError("Error analyzing " + method.toString(), // e); } bugAccumulator.reportAccumulatedBugs(); } }
methodnames[i] = jc.getMethods()[i].toString().replace('\n',' ').replace('\t',' ');