/** Use getXField instead */ @Deprecated public FieldAnnotation getFieldAnnotation() { return FieldAnnotation.fromXField(getXField()); }
public static FieldAnnotation findFieldAnnotationFromValueNumber(Method method, Location location, ValueNumber valueNumber, ValueNumberFrame vnaFrame) { XField field = ValueNumberSourceInfo.findXFieldFromValueNumber(method, location, valueNumber, vnaFrame); if (field == null) { return null; } return FieldAnnotation.fromXField(field); }
public static @CheckForNull BugAnnotation getFieldOrMethodValueSource(@CheckForNull OpcodeStack.Item item) { if (item == null) { return null; } XField xField = item.getXField(); if (xField != null) { FieldAnnotation a = FieldAnnotation.fromXField(xField); a.setDescription(FieldAnnotation.LOADED_FROM_ROLE); return a; } XMethod xMethod = item.getReturnValueOf(); if (xMethod != null) { MethodAnnotation a = MethodAnnotation.fromXMethod(xMethod); a.setDescription(MethodAnnotation.METHOD_RETURN_VALUE_OF); return a; } return null; }
XField f = pu.getNonNullField(); if (f != null) { storedField = FieldAnnotation.fromXField(f); bugType = "NP_STORE_INTO_NONNULL_FIELD"; } else {
FieldInstruction fins = (FieldInstruction) ins; XField referencedField = XFactory.createXField(fins, cpg); cause = FieldAnnotation.fromXField(referencedField);
FieldAnnotation fieldAnnotation = null; if (field != null) { fieldAnnotation = FieldAnnotation.fromXField(field); fieldAnnotation.setDescription(FieldAnnotation.LOADED_FROM_ROLE);
public static FieldAnnotation findFieldAnnotationFromValueNumber(Method method, Location location, ValueNumber valueNumber, ValueNumberFrame vnaFrame) { XField field = ValueNumberSourceInfo.findXFieldFromValueNumber(method, location, valueNumber, vnaFrame); if (field == null) { return null; } return FieldAnnotation.fromXField(field); }
/** Use getXField instead */ @Deprecated public FieldAnnotation getFieldAnnotation() { return FieldAnnotation.fromXField(getXField()); }
public static @CheckForNull BugAnnotation getFieldOrMethodValueSource(@CheckForNull OpcodeStack.Item item) { if (item == null) { return null; } XField xField = item.getXField(); if (xField != null) { FieldAnnotation a = FieldAnnotation.fromXField(xField); a.setDescription(FieldAnnotation.LOADED_FROM_ROLE); return a; } XMethod xMethod = item.getReturnValueOf(); if (xMethod != null) { MethodAnnotation a = MethodAnnotation.fromXMethod(xMethod); a.setDescription(MethodAnnotation.METHOD_RETURN_VALUE_OF); return a; } return null; }
XField f = pu.getNonNullField(); if (f != null) { storedField = FieldAnnotation.fromXField(f); bugType = "NP_STORE_INTO_NONNULL_FIELD"; } else {
FieldInstruction fins = (FieldInstruction) ins; XField referencedField = XFactory.createXField(fins, cpg); cause = FieldAnnotation.fromXField(referencedField);
FieldAnnotation fieldAnnotation = null; if (field != null) { fieldAnnotation = FieldAnnotation.fromXField(field); fieldAnnotation.setDescription(FieldAnnotation.LOADED_FROM_ROLE);