.fromVisitedInstruction(methodGen,
.fromVisitedInstruction(classContext, methodGen,
	private void analyzeMethod(ClassContext classContext, Method method)			throws CFGBuilderException, DataflowAnalysisException {		CFG cfg = classContext.getCFG(method);		ConstantDataflow constantDataflow = classContext				.getConstantDataflow(method);		ConstantPoolGen cpg = classContext.getConstantPoolGen();		MethodGen methodGen = classContext.getMethodGen(method);		String sourceFile = classContext.getJavaClass().getSourceFileName();		for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {			Location location = i.next();			Instruction ins = location.getHandle().getInstruction();			if (!(ins instanceof InvokeInstruction))				continue;			InvokeInstruction iins = (InvokeInstruction) ins;			ConstantFrame frame = constantDataflow.getFactAtLocation(location);			if (!frame.isValid()) {				// This basic block is probably dead				continue;			}			if (iins.getName(cpg).equals("substring")					&& iins.getSignature(cpg).equals("(I)Ljava/lang/String;")					&& iins.getClassName(cpg).equals("java.lang.String")) {				Constant operandValue = frame.getTopValue();				if (!operandValue.isConstantInteger())					continue;				int v = operandValue.getConstantInt();				if (v == 0)					bugReporter.reportBug(new BugInstance(this,							"DMI_USELESS_SUBSTRING", NORMAL_PRIORITY)							.addClassAndMethod(methodGen, sourceFile)							.addSourceLine(									SourceLineAnnotation											.fromVisitedInstruction(methodGen,													sourceFile, location															.getHandle())));			}		}	}