@Test public void testRemoveAll1() { removeThroughIterator(b.propertyIterator(), "A"); checkPropertyIterator(b.propertyIterator(), new String[] { "B", "C" }, new String[] { "b", "c" }); removeThroughIterator(b.propertyIterator(), "B"); checkPropertyIterator(b.propertyIterator(), new String[] { "C" }, new String[] { "c" }); removeThroughIterator(b.propertyIterator(), "C"); checkPropertyIterator(b.propertyIterator(), new String[0], new String[0]); }
public Iterator<BugProperty> propertyIterator() { return new BugPropertyIterator(); }
BugInstance implements Comparable<BugInstance>, XMLWriteable, Cloneable { public Iterator<BugProperty> propertyIterator() { return new BugPropertyIterator(); } }
BugInstance implements Comparable<BugInstance>, XMLWriteable, Cloneable { public Iterator<BugProperty> propertyIterator() { return new BugPropertyIterator(); } BugInstance(String type, int priority);  BugInstance(Detector detector, String type, int priority);  BugInstance(Detector2 detector, String type, int priority); }
BugInstance implements Comparable<BugInstance>, XMLWriteable, Cloneable { public Iterator<BugProperty> propertyIterator() { return new BugPropertyIterator(); } BugInstance(String type, int priority);  BugInstance(Detector detector, String type, int priority);  BugInstance(Detector2 detector, String type, int priority); static DateFormat firstSeenXMLFormat(); @Override Object clone(); void adjustForDetector(String detectorName); static void setAdjustExperimental(boolean adjust); String getType(); @Nonnull BugPattern getBugPattern(); int getPriority(); int getBugRank(); BugRankCategory getBugRankCategory(); String getPriorityTypeString(); String getPriorityTypeAbbreviation(); String getCategoryAbbrev(); String getPriorityString(); String getPriorityAbbreviation(); void setPriority(int p); void raisePriority(); void lowerPriority(); void lowerPriorityALot(); boolean isExperimental(); ClassAnnotation getPrimaryClass(); @CheckForNull TypeAnnotation getPrimaryType(); @CheckForNull MethodAnnotation getPrimaryMethod(); @CheckForNull FieldAnnotation getPrimaryField(); @Nonnull BugInstance lowerPriorityIfDeprecated(); LocalVariableAnnotation getPrimaryLocalVariableAnnotation(); @Nonnull SourceLineAnnotation getPrimarySourceLineAnnotation(); Collection<? extends SourceLineAnnotation> getAnotherInstanceSourceLineAnnotations(); String getInstanceKey(); Iterator<BugAnnotation> annotationIterator(); List<? extends BugAnnotation> getAnnotations(); @CheckForNull A getAnnotationWithRole(Class<A> c, String role); String getAbbrev(); String getProperty(String name); String getProperty(String name, String defaultValue); Iterator<BugProperty> propertyIterator(); @Nonnull BugInstance setProperty(String name, String value); BugProperty lookupProperty(String name); boolean deleteProperty(String name); @Nonnull BugInstance addAnnotations(Collection<? extends BugAnnotation> annotationCollection); @Nonnull BugInstance addClassAndMethod(MethodDescriptor methodDescriptor); BugInstance addClassAndMethod(XMethod xMethod); @Nonnull BugInstance addClassAndMethod(PreorderVisitor visitor); @Nonnull BugInstance addClassAndMethod(MethodAnnotation methodAnnotation); @Nonnull BugInstance addClassAndMethod(MethodGen methodGen, String sourceFile); @Nonnull BugInstance addClassAndMethod(JavaClass javaClass, Method method); @Nonnull BugInstance addClass(String className, String sourceFileName); @Nonnull BugInstance addClass(@SlashedClassName(when = When.UNKNOWN) String className); @Nonnull BugInstance addClass(ClassNode classNode); @Nonnull BugInstance addClass(ClassDescriptor classDescriptor); @Nonnull BugInstance addClass(JavaClass jclass); @Nonnull BugInstance addClass(PreorderVisitor visitor); @Nonnull BugInstance addSuperclass(PreorderVisitor visitor); @Nonnull BugInstance addType(String typeDescriptor); @Nonnull BugInstance addType(Type type); @Nonnull BugInstance addFoundAndExpectedType(Type foundType, Type expectedType); @Nonnull BugInstance addFoundAndExpectedType(String foundType, String expectedType); @Nonnull BugInstance addEqualsMethodUsed(ClassDescriptor expectedClass); @Nonnull BugInstance addEqualsMethodUsed(@CheckForNull Collection<XMethod> equalsMethods); @Nonnull BugInstance addTypeOfNamedClass(@DottedClassName String typeName); @Nonnull BugInstance addType(ClassDescriptor c); @Nonnull BugInstance addField(String className, String fieldName, String fieldSig, boolean isStatic); @Nonnull BugInstance addField(String className, String fieldName, String fieldSig, int accessFlags); @Nonnull BugInstance addField(PreorderVisitor visitor); @Nonnull BugInstance addField(FieldAnnotation fieldAnnotation); @Nonnull BugInstance addField(FieldVariable field); @Nonnull BugInstance addOptionalField(@CheckForNull XField xfield); @Nonnull BugInstance addField(XField xfield); @Nonnull BugInstance addField(FieldDescriptor fieldDescriptor); @Nonnull BugInstance addReferencedField(DismantleBytecode visitor); @Nonnull BugInstance addReferencedField(FieldAnnotation fa); @Nonnull BugInstance addVisitedField(PreorderVisitor visitor); @Nonnull BugInstance addOptionalLocalVariable(DismantleBytecode dbc, OpcodeStack.Item item); @Nonnull BugInstance addMethod(String className, String methodName, String methodSig, boolean isStatic); @Nonnull BugInstance addMethod(@SlashedClassName String className, String methodName, String methodSig, int accessFlags); @Nonnull BugInstance addMethod(MethodGen methodGen, String sourceFile); @Nonnull BugInstance addMethod(JavaClass javaClass, Method method); @Nonnull BugInstance addMethod(JavaClassAndMethod classAndMethod); @Nonnull BugInstance addMethod(PreorderVisitor visitor); @Nonnull BugInstance addCalledMethod(DismantleBytecode visitor); @Nonnull BugInstance addCalledMethod(XMethod m); @Nonnull BugInstance addCalledMethod(String className, String methodName, String methodSig, boolean isStatic); @Nonnull BugInstance addCalledMethod(ConstantPoolGen cpg, InvokeInstruction inv); @Nonnull BugInstance addCalledMethod(MethodGen methodGen, InvokeInstruction inv); @Nonnull BugInstance addMethod(XMethod xmethod); @Nonnull BugInstance addMethod(MethodDescriptor method); @Nonnull BugInstance addMethod(MethodAnnotation methodAnnotation); @Nonnull BugInstance addInt(int value); @Nonnull BugInstance addParameterAnnotation(int index, String role); @Nonnull BugInstance addString(String value); @Nonnull BugInstance addString(char c); @Nonnull BugInstance addSourceLine(SourceLineAnnotation sourceLine); @Nonnull BugInstance addSourceLine(BytecodeScanningDetector visitor, int pc); @Nonnull BugInstance addSourceLine(ClassContext classContext, PreorderVisitor visitor, int pc); @Nonnull BugInstance addSourceLine(ClassContext classContext, MethodGen methodGen, String sourceFile,
            @Nonnull InstructionHandle handle); @Nonnull BugInstance addSourceLine(ClassContext classContext, MethodGen methodGen, String sourceFile, InstructionHandle start,
            InstructionHandle end); @Nonnull BugInstance addSourceLine(ClassContext classContext, Method method, Location location); @Nonnull BugInstance addSourceLine(MethodDescriptor methodDescriptor, Location location); @Nonnull BugInstance addSourceLine(ClassContext classContext, Method method, InstructionHandle handle); @Nonnull BugInstance addSourceLineRange(BytecodeScanningDetector visitor, int startPC, int endPC); @Nonnull BugInstance addSourceLineRange(ClassContext classContext, PreorderVisitor visitor, int startPC, int endPC); @Nonnull BugInstance addSourceLine(BytecodeScanningDetector visitor); @Nonnull BugInstance addUnknownSourceLine(String className, String sourceFile); @Nonnull String getMessageWithoutPrefix(); String getAbridgedMessage(); String getMessage(); String getMessageWithPriorityType(); String getMessageWithPriorityTypeAbbreviation(); @Nonnull BugInstance describe(String description); @Override String toString(); @Override void writeXML(XMLOutput xmlOutput); int getCWEid(); void writeXML(XMLOutput xmlOutput, BugCollection bugCollection, boolean addMessages); BugInstance addOptionalAnnotation(@CheckForNull BugAnnotation annotation); BugInstance addOptionalAnnotation(@CheckForNull BugAnnotation annotation, String role); BugInstance add(@Nonnull BugAnnotation annotation); BugInstance addSomeSourceForTopTwoStackValues(ClassContext classContext, Method method, Location location); BugInstance addSourceForTopStackValue(ClassContext classContext, Method method, Location location); static @CheckForNull BugAnnotation getSourceForTopStackValue(ClassContext classContext, Method method, Location location); static @CheckForNull BugAnnotation getSourceForStackValue(ClassContext classContext, Method method, Location location, int depth); static @CheckForNull BugAnnotation getSomeSource(ClassContext classContext, Method method, Location location, OpcodeStack stack,
            int stackPos); static @CheckForNull BugAnnotation getValueSource(OpcodeStack.Item item, Method method, int pc); BugInstance addValueSource(@CheckForNull OpcodeStack.Item item, DismantleBytecode dbc); BugInstance addValueSource(OpcodeStack.Item item, Method method, int pc); BugInstance addFieldOrMethodValueSource(OpcodeStack.Item item); BugInstance addOptionalUniqueAnnotations(BugAnnotation... annotations); boolean tryAddingOptionalUniqueAnnotations(BugAnnotation... annotations); BugInstance addOptionalUniqueAnnotationsWithFallback(BugAnnotation fallback, BugAnnotation... annotations); static @CheckForNull BugAnnotation getFieldOrMethodValueSource(@CheckForNull OpcodeStack.Item item); @Override int hashCode(); @Override boolean equals(Object o); @Override int compareTo(BugInstance other); void setFirstVersion(long firstVersion); void clearHistory(); long getFirstVersion(); void setHistory(BugInstance from); void setLastVersion(long lastVersion); void setLive(); long getLastVersion(); boolean isDead(); void setIntroducedByChangeOfExistingClass(boolean introducedByChangeOfExistingClass); boolean isIntroducedByChangeOfExistingClass(); void setRemovedByChangeOfPersistingClass(boolean removedByChangeOfPersistingClass); boolean isRemovedByChangeOfPersistingClass(); void setInstanceHash(String instanceHash); void setOldInstanceHash(String oldInstanceHash); String getInstanceHash(); boolean isInstanceHashConsistent(); void setInstanceOccurrenceNum(int instanceOccurrenceNum); int getInstanceOccurrenceNum(); void setInstanceOccurrenceMax(int instanceOccurrenceMax); int getInstanceOccurrenceMax(); @CheckForNull DetectorFactory getDetectorFactory(); List<BugAnnotation> getAnnotationsForMessage(boolean showContext); }
BugInstance implements Comparable<BugInstance>, XMLWriteable, Cloneable { public Iterator<BugProperty> propertyIterator() { return new BugPropertyIterator(); } BugInstance(String type, int priority);  BugInstance(Detector detector, String type, int priority);  BugInstance(Detector2 detector, String type, int priority); static DateFormat firstSeenXMLFormat(); @Override Object clone(); void adjustForDetector(String detectorName); static void setAdjustExperimental(boolean adjust); String getType(); @Nonnull BugPattern getBugPattern(); int getPriority(); int getBugRank(); BugRankCategory getBugRankCategory(); String getPriorityTypeString(); String getPriorityTypeAbbreviation(); String getCategoryAbbrev(); String getPriorityString(); String getPriorityAbbreviation(); void setPriority(int p); void raisePriority(); void lowerPriority(); void lowerPriorityALot(); boolean isExperimental(); ClassAnnotation getPrimaryClass(); @CheckForNull TypeAnnotation getPrimaryType(); @CheckForNull MethodAnnotation getPrimaryMethod(); @CheckForNull FieldAnnotation getPrimaryField(); @Nonnull BugInstance lowerPriorityIfDeprecated(); LocalVariableAnnotation getPrimaryLocalVariableAnnotation(); @Nonnull SourceLineAnnotation getPrimarySourceLineAnnotation(); Collection<? extends SourceLineAnnotation> getAnotherInstanceSourceLineAnnotations(); String getInstanceKey(); Iterator<BugAnnotation> annotationIterator(); List<? extends BugAnnotation> getAnnotations(); @CheckForNull A getAnnotationWithRole(Class<A> c, String role); String getAbbrev(); String getProperty(String name); String getProperty(String name, String defaultValue); Iterator<BugProperty> propertyIterator(); @Nonnull BugInstance setProperty(String name, String value); BugProperty lookupProperty(String name); boolean deleteProperty(String name); @Nonnull BugInstance addAnnotations(Collection<? extends BugAnnotation> annotationCollection); @Nonnull BugInstance addClassAndMethod(MethodDescriptor methodDescriptor); BugInstance addClassAndMethod(XMethod xMethod); @Nonnull BugInstance addClassAndMethod(PreorderVisitor visitor); @Nonnull BugInstance addClassAndMethod(MethodAnnotation methodAnnotation); @Nonnull BugInstance addClassAndMethod(MethodGen methodGen, String sourceFile); @Nonnull BugInstance addClassAndMethod(JavaClass javaClass, Method method); @Nonnull BugInstance addClass(String className, String sourceFileName); @Nonnull BugInstance addClass(@SlashedClassName(when = When.UNKNOWN) String className); @Nonnull BugInstance addClass(ClassNode classNode); @Nonnull BugInstance addClass(ClassDescriptor classDescriptor); @Nonnull BugInstance addClass(JavaClass jclass); @Nonnull BugInstance addClass(PreorderVisitor visitor); @Nonnull BugInstance addSuperclass(PreorderVisitor visitor); @Nonnull BugInstance addType(String typeDescriptor); @Nonnull BugInstance addType(Type type); @Nonnull BugInstance addFoundAndExpectedType(Type foundType, Type expectedType); @Nonnull BugInstance addFoundAndExpectedType(String foundType, String expectedType); @Nonnull BugInstance addEqualsMethodUsed(ClassDescriptor expectedClass); @Nonnull BugInstance addEqualsMethodUsed(@CheckForNull Collection<XMethod> equalsMethods); @Nonnull BugInstance addTypeOfNamedClass(@DottedClassName String typeName); @Nonnull BugInstance addType(ClassDescriptor c); @Nonnull BugInstance addField(String className, String fieldName, String fieldSig, boolean isStatic); @Nonnull BugInstance addField(String className, String fieldName, String fieldSig, int accessFlags); @Nonnull BugInstance addField(PreorderVisitor visitor); @Nonnull BugInstance addField(FieldAnnotation fieldAnnotation); @Nonnull BugInstance addField(FieldVariable field); @Nonnull BugInstance addOptionalField(@CheckForNull XField xfield); @Nonnull BugInstance addField(XField xfield); @Nonnull BugInstance addField(FieldDescriptor fieldDescriptor); @Nonnull BugInstance addReferencedField(DismantleBytecode visitor); @Nonnull BugInstance addReferencedField(FieldAnnotation fa); @Nonnull BugInstance addVisitedField(PreorderVisitor visitor); @Nonnull BugInstance addOptionalLocalVariable(DismantleBytecode dbc, OpcodeStack.Item item); @Nonnull BugInstance addMethod(String className, String methodName, String methodSig, boolean isStatic); @Nonnull BugInstance addMethod(@SlashedClassName String className, String methodName, String methodSig, int accessFlags); @Nonnull BugInstance addMethod(MethodGen methodGen, String sourceFile); @Nonnull BugInstance addMethod(JavaClass javaClass, Method method); @Nonnull BugInstance addMethod(JavaClassAndMethod classAndMethod); @Nonnull BugInstance addMethod(PreorderVisitor visitor); @Nonnull BugInstance addCalledMethod(DismantleBytecode visitor); @Nonnull BugInstance addCalledMethod(XMethod m); @Nonnull BugInstance addCalledMethod(String className, String methodName, String methodSig, boolean isStatic); @Nonnull BugInstance addCalledMethod(ConstantPoolGen cpg, InvokeInstruction inv); @Nonnull BugInstance addCalledMethod(MethodGen methodGen, InvokeInstruction inv); @Nonnull BugInstance addMethod(XMethod xmethod); @Nonnull BugInstance addMethod(MethodDescriptor method); @Nonnull BugInstance addMethod(MethodAnnotation methodAnnotation); @Nonnull BugInstance addInt(int value); @Nonnull BugInstance addParameterAnnotation(int index, String role); @Nonnull BugInstance addString(String value); @Nonnull BugInstance addString(char c); @Nonnull BugInstance addSourceLine(SourceLineAnnotation sourceLine); @Nonnull BugInstance addSourceLine(BytecodeScanningDetector visitor, int pc); @Nonnull BugInstance addSourceLine(ClassContext classContext, PreorderVisitor visitor, int pc); @Nonnull BugInstance addSourceLine(ClassContext classContext, MethodGen methodGen, String sourceFile,
            @Nonnull InstructionHandle handle); @Nonnull BugInstance addSourceLine(ClassContext classContext, MethodGen methodGen, String sourceFile, InstructionHandle start,
            InstructionHandle end); @Nonnull BugInstance addSourceLine(ClassContext classContext, Method method, Location location); @Nonnull BugInstance addSourceLine(MethodDescriptor methodDescriptor, Location location); @Nonnull BugInstance addSourceLine(ClassContext classContext, Method method, InstructionHandle handle); @Nonnull BugInstance addSourceLineRange(BytecodeScanningDetector visitor, int startPC, int endPC); @Nonnull BugInstance addSourceLineRange(ClassContext classContext, PreorderVisitor visitor, int startPC, int endPC); @Nonnull BugInstance addSourceLine(BytecodeScanningDetector visitor); @Nonnull BugInstance addUnknownSourceLine(String className, String sourceFile); @Nonnull String getMessageWithoutPrefix(); String getAbridgedMessage(); String getMessage(); String getMessageWithPriorityType(); String getMessageWithPriorityTypeAbbreviation(); @Nonnull BugInstance describe(String description); @Override String toString(); @Override void writeXML(XMLOutput xmlOutput); int getCWEid(); void writeXML(XMLOutput xmlOutput, BugCollection bugCollection, boolean addMessages); BugInstance addOptionalAnnotation(@CheckForNull BugAnnotation annotation); BugInstance addOptionalAnnotation(@CheckForNull BugAnnotation annotation, String role); BugInstance add(@Nonnull BugAnnotation annotation); BugInstance addSomeSourceForTopTwoStackValues(ClassContext classContext, Method method, Location location); BugInstance addSourceForTopStackValue(ClassContext classContext, Method method, Location location); static @CheckForNull BugAnnotation getSourceForTopStackValue(ClassContext classContext, Method method, Location location); static @CheckForNull BugAnnotation getSourceForStackValue(ClassContext classContext, Method method, Location location, int depth); static @CheckForNull BugAnnotation getSomeSource(ClassContext classContext, Method method, Location location, OpcodeStack stack,
            int stackPos); static @CheckForNull BugAnnotation getValueSource(OpcodeStack.Item item, Method method, int pc); BugInstance addValueSource(@CheckForNull OpcodeStack.Item item, DismantleBytecode dbc); BugInstance addValueSource(OpcodeStack.Item item, Method method, int pc); BugInstance addFieldOrMethodValueSource(OpcodeStack.Item item); BugInstance addOptionalUniqueAnnotations(BugAnnotation... annotations); boolean tryAddingOptionalUniqueAnnotations(BugAnnotation... annotations); BugInstance addOptionalUniqueAnnotationsWithFallback(BugAnnotation fallback, BugAnnotation... annotations); static @CheckForNull BugAnnotation getFieldOrMethodValueSource(@CheckForNull OpcodeStack.Item item); @Override int hashCode(); @Override boolean equals(Object o); @Override int compareTo(BugInstance other); void setFirstVersion(long firstVersion); void clearHistory(); long getFirstVersion(); void setHistory(BugInstance from); void setLastVersion(long lastVersion); void setLive(); long getLastVersion(); boolean isDead(); void setIntroducedByChangeOfExistingClass(boolean introducedByChangeOfExistingClass); boolean isIntroducedByChangeOfExistingClass(); void setRemovedByChangeOfPersistingClass(boolean removedByChangeOfPersistingClass); boolean isRemovedByChangeOfPersistingClass(); void setInstanceHash(String instanceHash); void setOldInstanceHash(String oldInstanceHash); String getInstanceHash(); boolean isInstanceHashConsistent(); void setInstanceOccurrenceNum(int instanceOccurrenceNum); int getInstanceOccurrenceNum(); void setInstanceOccurrenceMax(int instanceOccurrenceMax); int getInstanceOccurrenceMax(); @CheckForNull DetectorFactory getDetectorFactory(); List<BugAnnotation> getAnnotationsForMessage(boolean showContext);  }