BugAnnotation annotation = FindNullDeref.findAnnotationFromValueNumber(methodGen.getMethod(), location, v0, frame); if (annotation == null) return; if (annotation instanceof FieldAnnotation) { FieldAnnotation f = (FieldAnnotation) annotation; XField xf = XFactory.createXField(f); if (xf.isVolatile()) return; }
XField field = FindNullDeref.findXFieldFromValueNumber(methodGen.getMethod(), location, v0, frame); if (field != null && field.isVolatile()) return; BugAnnotation annotation = FindNullDeref.findLocalAnnotationFromValueNumber(methodGen.getMethod(), location, v0, frame); if ((annotation == null || !((LocalVariableAnnotation)annotation).isSignificant() ) && field != null) annotation =  FieldAnnotation.fromXField(field);
    private void checkForSelfOperation(ClassContext classContext, Location location, ValueNumberDataflow valueNumberDataflow, String op, MethodGen methodGen, String sourceFile) throws DataflowAnalysisException {        ValueNumberFrame frame = valueNumberDataflow.getFactAtLocation(location);        if (!frame.isValid())  return;        Instruction ins = location.getHandle().getInstruction();        int opcode = ins.getOpcode();        int offset = 1;        if (opcode == LCMP || opcode == LXOR || opcode == LAND || opcode == LOR || opcode == LSUB)            offset = 2;        ValueNumber v0 = frame.getStackValue(0);        ValueNumber v1 = frame.getStackValue(offset);        if (!v1.equals(v0)) return;        int priority = HIGH_PRIORITY;        if (opcode == ISUB || opcode == LSUB || opcode == INVOKEINTERFACE || opcode == INVOKEVIRTUAL)            priority = NORMAL_PRIORITY;        BugAnnotation annotation = FindNullDeref.findAnnotationFromValueNumber(methodGen.getMethod(), location, v0, frame);        if (annotation == null) return;        if (annotation instanceof FieldAnnotation) {            FieldAnnotation f = (FieldAnnotation) annotation;            XField xf = XFactory.createXField(f);            if (xf.isVolatile()) return;        }        String prefix = "SA_LOCAL_SELF_" ;        if (annotation instanceof FieldAnnotation)            prefix = "SA_FIELD_SELF_";        BugInstance bug = new BugInstance(this, "SA_LOCAL_SELF_" + op, priority).addClassAndMethod(methodGen, sourceFile)        .add(annotation).addSourceLine(classContext, methodGen, sourceFile, location.getHandle());        bugReporter.reportBug(bug);    }