id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
59,800
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.isSubtype
public boolean isSubtype(ObjectType type, ObjectType possibleSupertype) throws ClassNotFoundException { if (DEBUG_QUERIES) { System.out.println("isSubtype: check " + type + " subtype of " + possibleSupertype); } if (type.equals(possibleSupertype)) { if (DEBUG_QUERIES) { ...
java
public boolean isSubtype(ObjectType type, ObjectType possibleSupertype) throws ClassNotFoundException { if (DEBUG_QUERIES) { System.out.println("isSubtype: check " + type + " subtype of " + possibleSupertype); } if (type.equals(possibleSupertype)) { if (DEBUG_QUERIES) { ...
[ "public", "boolean", "isSubtype", "(", "ObjectType", "type", ",", "ObjectType", "possibleSupertype", ")", "throws", "ClassNotFoundException", "{", "if", "(", "DEBUG_QUERIES", ")", "{", "System", ".", "out", ".", "println", "(", "\"isSubtype: check \"", "+", "type"...
Determine whether or not a given ObjectType is a subtype of another. Throws ClassNotFoundException if the question cannot be answered definitively due to a missing class. @param type a ReferenceType @param possibleSupertype another Reference type @return true if <code>type</code> is a subtype of <code>possibleSupertyp...
[ "Determine", "whether", "or", "not", "a", "given", "ObjectType", "is", "a", "subtype", "of", "another", ".", "Throws", "ClassNotFoundException", "if", "the", "question", "cannot", "be", "answered", "definitively", "due", "to", "a", "missing", "class", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L508-L523
59,801
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.computeFirstCommonSuperclassOfSameDimensionArrays
private ReferenceType computeFirstCommonSuperclassOfSameDimensionArrays(ArrayType aArrType, ArrayType bArrType) throws ClassNotFoundException { assert aArrType.getDimensions() == bArrType.getDimensions(); Type aBaseType = aArrType.getBasicType(); Type bBaseType = bArrType.getBasicTy...
java
private ReferenceType computeFirstCommonSuperclassOfSameDimensionArrays(ArrayType aArrType, ArrayType bArrType) throws ClassNotFoundException { assert aArrType.getDimensions() == bArrType.getDimensions(); Type aBaseType = aArrType.getBasicType(); Type bBaseType = bArrType.getBasicTy...
[ "private", "ReferenceType", "computeFirstCommonSuperclassOfSameDimensionArrays", "(", "ArrayType", "aArrType", ",", "ArrayType", "bArrType", ")", "throws", "ClassNotFoundException", "{", "assert", "aArrType", ".", "getDimensions", "(", ")", "==", "bArrType", ".", "getDime...
Get first common supertype of arrays with the same number of dimensions. @param aArrType an ArrayType @param bArrType another ArrayType with the same number of dimensions @return first common supertype @throws ClassNotFoundException
[ "Get", "first", "common", "supertype", "of", "arrays", "with", "the", "same", "number", "of", "dimensions", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L598-L631
59,802
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.computeFirstCommonSuperclassOfDifferentDimensionArrays
private ReferenceType computeFirstCommonSuperclassOfDifferentDimensionArrays(ArrayType aArrType, ArrayType bArrType) { assert aArrType.getDimensions() != bArrType.getDimensions(); boolean aBaseTypeIsPrimitive = (aArrType.getBasicType() instanceof BasicType); boolean bBaseTypeIsPrimitive = (bArr...
java
private ReferenceType computeFirstCommonSuperclassOfDifferentDimensionArrays(ArrayType aArrType, ArrayType bArrType) { assert aArrType.getDimensions() != bArrType.getDimensions(); boolean aBaseTypeIsPrimitive = (aArrType.getBasicType() instanceof BasicType); boolean bBaseTypeIsPrimitive = (bArr...
[ "private", "ReferenceType", "computeFirstCommonSuperclassOfDifferentDimensionArrays", "(", "ArrayType", "aArrType", ",", "ArrayType", "bArrType", ")", "{", "assert", "aArrType", ".", "getDimensions", "(", ")", "!=", "bArrType", ".", "getDimensions", "(", ")", ";", "bo...
Get the first common superclass of arrays with different numbers of dimensions. @param aArrType an ArrayType @param bArrType another ArrayType @return ReferenceType representing first common superclass
[ "Get", "the", "first", "common", "superclass", "of", "arrays", "with", "different", "numbers", "of", "dimensions", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L643-L680
59,803
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.hasSubtypes
public boolean hasSubtypes(ClassDescriptor classDescriptor) throws ClassNotFoundException { Set<ClassDescriptor> subtypes = getDirectSubtypes(classDescriptor); if (DEBUG) { System.out.println("Direct subtypes of " + classDescriptor + " are " + subtypes); } return !subtypes.is...
java
public boolean hasSubtypes(ClassDescriptor classDescriptor) throws ClassNotFoundException { Set<ClassDescriptor> subtypes = getDirectSubtypes(classDescriptor); if (DEBUG) { System.out.println("Direct subtypes of " + classDescriptor + " are " + subtypes); } return !subtypes.is...
[ "public", "boolean", "hasSubtypes", "(", "ClassDescriptor", "classDescriptor", ")", "throws", "ClassNotFoundException", "{", "Set", "<", "ClassDescriptor", ">", "subtypes", "=", "getDirectSubtypes", "(", "classDescriptor", ")", ";", "if", "(", "DEBUG", ")", "{", "...
Determine whether or not the given class has any known subtypes. @param classDescriptor ClassDescriptor naming a class @return true if the class has subtypes, false if it has no subtypes @throws ClassNotFoundException
[ "Determine", "whether", "or", "not", "the", "given", "class", "has", "any", "known", "subtypes", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L842-L848
59,804
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.getDirectSubtypes
public Set<ClassDescriptor> getDirectSubtypes(ClassDescriptor classDescriptor) throws ClassNotFoundException { ClassVertex startVertex = resolveClassVertex(classDescriptor); Set<ClassDescriptor> result = new HashSet<>(); Iterator<InheritanceEdge> i = graph.incomingEdgeIterator(startVertex); ...
java
public Set<ClassDescriptor> getDirectSubtypes(ClassDescriptor classDescriptor) throws ClassNotFoundException { ClassVertex startVertex = resolveClassVertex(classDescriptor); Set<ClassDescriptor> result = new HashSet<>(); Iterator<InheritanceEdge> i = graph.incomingEdgeIterator(startVertex); ...
[ "public", "Set", "<", "ClassDescriptor", ">", "getDirectSubtypes", "(", "ClassDescriptor", "classDescriptor", ")", "throws", "ClassNotFoundException", "{", "ClassVertex", "startVertex", "=", "resolveClassVertex", "(", "classDescriptor", ")", ";", "Set", "<", "ClassDescr...
Get known subtypes of given class. @param classDescriptor ClassDescriptor naming a class @return Set of ClassDescriptors which are the known subtypes of the class @throws ClassNotFoundException
[ "Get", "known", "subtypes", "of", "given", "class", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L858-L870
59,805
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.getTransitiveCommonSubtypes
public Set<ClassDescriptor> getTransitiveCommonSubtypes(ClassDescriptor classDescriptor1, ClassDescriptor classDescriptor2) throws ClassNotFoundException { Set<ClassDescriptor> subtypes1 = getSubtypes(classDescriptor1); Set<ClassDescriptor> result = new HashSet<>(subtypes1); Set<Clas...
java
public Set<ClassDescriptor> getTransitiveCommonSubtypes(ClassDescriptor classDescriptor1, ClassDescriptor classDescriptor2) throws ClassNotFoundException { Set<ClassDescriptor> subtypes1 = getSubtypes(classDescriptor1); Set<ClassDescriptor> result = new HashSet<>(subtypes1); Set<Clas...
[ "public", "Set", "<", "ClassDescriptor", ">", "getTransitiveCommonSubtypes", "(", "ClassDescriptor", "classDescriptor1", ",", "ClassDescriptor", "classDescriptor2", ")", "throws", "ClassNotFoundException", "{", "Set", "<", "ClassDescriptor", ">", "subtypes1", "=", "getSub...
Get the set of common subtypes of the two given classes. @param classDescriptor1 a ClassDescriptor naming a class @param classDescriptor2 a ClassDescriptor naming another class @return Set containing all common transitive subtypes of the two classes @throws ClassNotFoundException
[ "Get", "the", "set", "of", "common", "subtypes", "of", "the", "two", "given", "classes", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L882-L889
59,806
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.traverseSupertypes
public void traverseSupertypes(ClassDescriptor start, InheritanceGraphVisitor visitor) throws ClassNotFoundException { LinkedList<SupertypeTraversalPath> workList = new LinkedList<>(); ClassVertex startVertex = resolveClassVertex(start); workList.addLast(new SupertypeTraversalPath(startVertex))...
java
public void traverseSupertypes(ClassDescriptor start, InheritanceGraphVisitor visitor) throws ClassNotFoundException { LinkedList<SupertypeTraversalPath> workList = new LinkedList<>(); ClassVertex startVertex = resolveClassVertex(start); workList.addLast(new SupertypeTraversalPath(startVertex))...
[ "public", "void", "traverseSupertypes", "(", "ClassDescriptor", "start", ",", "InheritanceGraphVisitor", "visitor", ")", "throws", "ClassNotFoundException", "{", "LinkedList", "<", "SupertypeTraversalPath", ">", "workList", "=", "new", "LinkedList", "<>", "(", ")", ";...
Starting at the class or interface named by the given ClassDescriptor, traverse the inheritance graph, exploring all paths from the class or interface to java.lang.Object. @param start ClassDescriptor naming the class where the traversal should start @param visitor an InheritanceGraphVisitor @throws ClassNotFoundExcep...
[ "Starting", "at", "the", "class", "or", "interface", "named", "by", "the", "given", "ClassDescriptor", "traverse", "the", "inheritance", "graph", "exploring", "all", "paths", "from", "the", "class", "or", "interface", "to", "java", ".", "lang", ".", "Object", ...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L959-L995
59,807
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.traverseSupertypesDepthFirst
public void traverseSupertypesDepthFirst(ClassDescriptor start, SupertypeTraversalVisitor visitor) throws ClassNotFoundException { this.traverseSupertypesDepthFirstHelper(start, visitor, new HashSet<ClassDescriptor>()); }
java
public void traverseSupertypesDepthFirst(ClassDescriptor start, SupertypeTraversalVisitor visitor) throws ClassNotFoundException { this.traverseSupertypesDepthFirstHelper(start, visitor, new HashSet<ClassDescriptor>()); }
[ "public", "void", "traverseSupertypesDepthFirst", "(", "ClassDescriptor", "start", ",", "SupertypeTraversalVisitor", "visitor", ")", "throws", "ClassNotFoundException", "{", "this", ".", "traverseSupertypesDepthFirstHelper", "(", "start", ",", "visitor", ",", "new", "Hash...
Starting at the class or interface named by the given ClassDescriptor, traverse the inheritance graph depth first, visiting each class only once. This is much faster than traversing all paths in certain circumstances. @param start ClassDescriptor naming the class where the traversal should start @param visitor an Inhe...
[ "Starting", "at", "the", "class", "or", "interface", "named", "by", "the", "given", "ClassDescriptor", "traverse", "the", "inheritance", "graph", "depth", "first", "visiting", "each", "class", "only", "once", ".", "This", "is", "much", "faster", "than", "trave...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L1010-L1012
59,808
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.computeKnownSubtypes
private Set<ClassDescriptor> computeKnownSubtypes(ClassDescriptor classDescriptor) throws ClassNotFoundException { LinkedList<ClassVertex> workList = new LinkedList<>(); ClassVertex startVertex = resolveClassVertex(classDescriptor); workList.addLast(startVertex); Set<ClassDescriptor> r...
java
private Set<ClassDescriptor> computeKnownSubtypes(ClassDescriptor classDescriptor) throws ClassNotFoundException { LinkedList<ClassVertex> workList = new LinkedList<>(); ClassVertex startVertex = resolveClassVertex(classDescriptor); workList.addLast(startVertex); Set<ClassDescriptor> r...
[ "private", "Set", "<", "ClassDescriptor", ">", "computeKnownSubtypes", "(", "ClassDescriptor", "classDescriptor", ")", "throws", "ClassNotFoundException", "{", "LinkedList", "<", "ClassVertex", ">", "workList", "=", "new", "LinkedList", "<>", "(", ")", ";", "ClassVe...
Compute set of known subtypes of class named by given ClassDescriptor. @param classDescriptor a ClassDescriptor @throws ClassNotFoundException
[ "Compute", "set", "of", "known", "subtypes", "of", "class", "named", "by", "given", "ClassDescriptor", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L1090-L1118
59,809
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.getSupertypeQueryResults
public SupertypeQueryResults getSupertypeQueryResults(ClassDescriptor classDescriptor) { SupertypeQueryResults supertypeQueryResults = supertypeSetMap.get(classDescriptor); if (supertypeQueryResults == null) { supertypeQueryResults = computeSupertypes(classDescriptor); supertypeS...
java
public SupertypeQueryResults getSupertypeQueryResults(ClassDescriptor classDescriptor) { SupertypeQueryResults supertypeQueryResults = supertypeSetMap.get(classDescriptor); if (supertypeQueryResults == null) { supertypeQueryResults = computeSupertypes(classDescriptor); supertypeS...
[ "public", "SupertypeQueryResults", "getSupertypeQueryResults", "(", "ClassDescriptor", "classDescriptor", ")", "{", "SupertypeQueryResults", "supertypeQueryResults", "=", "supertypeSetMap", ".", "get", "(", "classDescriptor", ")", ";", "if", "(", "supertypeQueryResults", "=...
Look up or compute the SupertypeQueryResults for class named by given ClassDescriptor. @param classDescriptor a ClassDescriptor @return SupertypeQueryResults for the class named by the ClassDescriptor
[ "Look", "up", "or", "compute", "the", "SupertypeQueryResults", "for", "class", "named", "by", "given", "ClassDescriptor", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L1195-L1202
59,810
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.computeSupertypes
private SupertypeQueryResults computeSupertypes(ClassDescriptor classDescriptor) // throws // ClassNotFoundException { if (DEBUG_QUERIES) { System.out.println("Computing supertypes for " + classDescriptor.toDottedClassName()); } // Try to fully resolve the class and its supe...
java
private SupertypeQueryResults computeSupertypes(ClassDescriptor classDescriptor) // throws // ClassNotFoundException { if (DEBUG_QUERIES) { System.out.println("Computing supertypes for " + classDescriptor.toDottedClassName()); } // Try to fully resolve the class and its supe...
[ "private", "SupertypeQueryResults", "computeSupertypes", "(", "ClassDescriptor", "classDescriptor", ")", "// throws", "// ClassNotFoundException", "{", "if", "(", "DEBUG_QUERIES", ")", "{", "System", ".", "out", ".", "println", "(", "\"Computing supertypes for \"", "+", ...
Compute supertypes for class named by given ClassDescriptor. @param classDescriptor a ClassDescriptor @return SupertypeQueryResults containing known supertypes of the class
[ "Compute", "supertypes", "for", "class", "named", "by", "given", "ClassDescriptor", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L1211-L1252
59,811
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.resolveClassVertex
private ClassVertex resolveClassVertex(ClassDescriptor classDescriptor) throws ClassNotFoundException { ClassVertex typeVertex = optionallyResolveClassVertex(classDescriptor); if (!typeVertex.isResolved()) { ClassDescriptor.throwClassNotFoundException(classDescriptor); } as...
java
private ClassVertex resolveClassVertex(ClassDescriptor classDescriptor) throws ClassNotFoundException { ClassVertex typeVertex = optionallyResolveClassVertex(classDescriptor); if (!typeVertex.isResolved()) { ClassDescriptor.throwClassNotFoundException(classDescriptor); } as...
[ "private", "ClassVertex", "resolveClassVertex", "(", "ClassDescriptor", "classDescriptor", ")", "throws", "ClassNotFoundException", "{", "ClassVertex", "typeVertex", "=", "optionallyResolveClassVertex", "(", "classDescriptor", ")", ";", "if", "(", "!", "typeVertex", ".", ...
Resolve a class named by given ClassDescriptor and return its resolved ClassVertex. @param classDescriptor a ClassDescriptor @return resolved ClassVertex representing the class in the InheritanceGraph @throws ClassNotFoundException if the class named by the ClassDescriptor does not exist
[ "Resolve", "a", "class", "named", "by", "given", "ClassDescriptor", "and", "return", "its", "resolved", "ClassVertex", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L1265-L1274
59,812
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.addSupertypeEdges
private void addSupertypeEdges(ClassVertex vertex, LinkedList<XClass> workList) { XClass xclass = vertex.getXClass(); // Direct superclass ClassDescriptor superclassDescriptor = xclass.getSuperclassDescriptor(); if (superclassDescriptor != null) { addInheritanceEdge(vertex, ...
java
private void addSupertypeEdges(ClassVertex vertex, LinkedList<XClass> workList) { XClass xclass = vertex.getXClass(); // Direct superclass ClassDescriptor superclassDescriptor = xclass.getSuperclassDescriptor(); if (superclassDescriptor != null) { addInheritanceEdge(vertex, ...
[ "private", "void", "addSupertypeEdges", "(", "ClassVertex", "vertex", ",", "LinkedList", "<", "XClass", ">", "workList", ")", "{", "XClass", "xclass", "=", "vertex", ".", "getXClass", "(", ")", ";", "// Direct superclass", "ClassDescriptor", "superclassDescriptor", ...
Add supertype edges to the InheritanceGraph for given ClassVertex. If any direct supertypes have not been processed, add them to the worklist. @param vertex a ClassVertex whose supertype edges need to be added @param workList work list of ClassVertexes that need to have their supertype edges added
[ "Add", "supertype", "edges", "to", "the", "InheritanceGraph", "for", "given", "ClassVertex", ".", "If", "any", "direct", "supertypes", "have", "not", "been", "processed", "add", "them", "to", "the", "worklist", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L1307-L1320
59,813
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.addClassVertexForMissingClass
private ClassVertex addClassVertexForMissingClass(ClassDescriptor missingClassDescriptor, boolean isInterfaceEdge) { ClassVertex missingClassVertex = ClassVertex.createMissingClassVertex(missingClassDescriptor, isInterfaceEdge); missingClassVertex.setFinished(true); addVertexToGraph(missingClass...
java
private ClassVertex addClassVertexForMissingClass(ClassDescriptor missingClassDescriptor, boolean isInterfaceEdge) { ClassVertex missingClassVertex = ClassVertex.createMissingClassVertex(missingClassDescriptor, isInterfaceEdge); missingClassVertex.setFinished(true); addVertexToGraph(missingClass...
[ "private", "ClassVertex", "addClassVertexForMissingClass", "(", "ClassDescriptor", "missingClassDescriptor", ",", "boolean", "isInterfaceEdge", ")", "{", "ClassVertex", "missingClassVertex", "=", "ClassVertex", ".", "createMissingClassVertex", "(", "missingClassDescriptor", ","...
Add a ClassVertex representing a missing class. @param missingClassDescriptor ClassDescriptor naming a missing class @param isInterfaceEdge @return the ClassVertex representing the missing class
[ "Add", "a", "ClassVertex", "representing", "a", "missing", "class", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L1381-L1390
59,814
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindUnrelatedTypesInGenericContainer.java
FindUnrelatedTypesInGenericContainer.prescreen
public boolean prescreen(ClassContext classContext, Method method) { BitSet bytecodeSet = classContext.getBytecodeSet(method); return bytecodeSet != null && (bytecodeSet.get(Const.INVOKEINTERFACE) || bytecodeSet.get(Const.INVOKEVIRTUAL) || bytecodeSet.get(Const.IN...
java
public boolean prescreen(ClassContext classContext, Method method) { BitSet bytecodeSet = classContext.getBytecodeSet(method); return bytecodeSet != null && (bytecodeSet.get(Const.INVOKEINTERFACE) || bytecodeSet.get(Const.INVOKEVIRTUAL) || bytecodeSet.get(Const.IN...
[ "public", "boolean", "prescreen", "(", "ClassContext", "classContext", ",", "Method", "method", ")", "{", "BitSet", "bytecodeSet", "=", "classContext", ".", "getBytecodeSet", "(", "method", ")", ";", "return", "bytecodeSet", "!=", "null", "&&", "(", "bytecodeSet...
Use this to screen out methods that do not contain invocations.
[ "Use", "this", "to", "screen", "out", "methods", "that", "do", "not", "contain", "invocations", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindUnrelatedTypesInGenericContainer.java#L278-L284
59,815
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindUnrelatedTypesInGenericContainer.java
FindUnrelatedTypesInGenericContainer.isSynthetic
private boolean isSynthetic(Method m) { if ((m.getAccessFlags() & Const.ACC_SYNTHETIC) != 0) { return true; } Attribute[] attrs = m.getAttributes(); for (Attribute attr : attrs) { if (attr instanceof Synthetic) { return true; } ...
java
private boolean isSynthetic(Method m) { if ((m.getAccessFlags() & Const.ACC_SYNTHETIC) != 0) { return true; } Attribute[] attrs = m.getAttributes(); for (Attribute attr : attrs) { if (attr instanceof Synthetic) { return true; } ...
[ "private", "boolean", "isSynthetic", "(", "Method", "m", ")", "{", "if", "(", "(", "m", ".", "getAccessFlags", "(", ")", "&", "Const", ".", "ACC_SYNTHETIC", ")", "!=", "0", ")", "{", "return", "true", ";", "}", "Attribute", "[", "]", "attrs", "=", ...
Methods marked with the "Synthetic" attribute do not appear in the source code
[ "Methods", "marked", "with", "the", "Synthetic", "attribute", "do", "not", "appear", "in", "the", "source", "code" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindUnrelatedTypesInGenericContainer.java#L290-L301
59,816
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindUnrelatedTypesInGenericContainer.java
FindUnrelatedTypesInGenericContainer.compareTypesOld
private boolean compareTypesOld(Type parmType, Type argType) { // XXX equality not implemented for GenericObjectType // if (parmType.equals(argType)) return true; // Compare type signatures instead if (GenericUtilities.getString(parmType).equals(GenericUtilities.getString(argType))) { ...
java
private boolean compareTypesOld(Type parmType, Type argType) { // XXX equality not implemented for GenericObjectType // if (parmType.equals(argType)) return true; // Compare type signatures instead if (GenericUtilities.getString(parmType).equals(GenericUtilities.getString(argType))) { ...
[ "private", "boolean", "compareTypesOld", "(", "Type", "parmType", ",", "Type", "argType", ")", "{", "// XXX equality not implemented for GenericObjectType", "// if (parmType.equals(argType)) return true;", "// Compare type signatures instead", "if", "(", "GenericUtilities", ".", ...
old version of compare types
[ "old", "version", "of", "compare", "types" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindUnrelatedTypesInGenericContainer.java#L857-L901
59,817
spotbugs/spotbugs
spotbugs/src/tools/edu/umd/cs/findbugs/tools/xml/CheckMessages.java
CheckMessages.checkMessages
public void checkMessages(XMLFile messagesDoc) throws DocumentException { // Detector elements must all have a class attribute // and details child element. for (Iterator<Node> i = messagesDoc.xpathIterator("/MessageCollection/Detector"); i.hasNext();) { Node node = i.next(); ...
java
public void checkMessages(XMLFile messagesDoc) throws DocumentException { // Detector elements must all have a class attribute // and details child element. for (Iterator<Node> i = messagesDoc.xpathIterator("/MessageCollection/Detector"); i.hasNext();) { Node node = i.next(); ...
[ "public", "void", "checkMessages", "(", "XMLFile", "messagesDoc", ")", "throws", "DocumentException", "{", "// Detector elements must all have a class attribute", "// and details child element.", "for", "(", "Iterator", "<", "Node", ">", "i", "=", "messagesDoc", ".", "xpa...
Check given messages file for validity. @throws DocumentException if the messages file is invalid
[ "Check", "given", "messages", "file", "for", "validity", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/tools/edu/umd/cs/findbugs/tools/xml/CheckMessages.java#L160-L196
59,818
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/CheckBcel.java
CheckBcel.check
public static boolean check() { Class<?> objectType; Class<?> type; Class<?> constants; Class<?> emptyVis; Class<?> repository; try { objectType = Class.forName(ORG_APACHE_BCEL_GENERIC_OBJECT_TYPE); type = Class.forName(ORG_APACHE_BCEL_GENERIC_...
java
public static boolean check() { Class<?> objectType; Class<?> type; Class<?> constants; Class<?> emptyVis; Class<?> repository; try { objectType = Class.forName(ORG_APACHE_BCEL_GENERIC_OBJECT_TYPE); type = Class.forName(ORG_APACHE_BCEL_GENERIC_...
[ "public", "static", "boolean", "check", "(", ")", "{", "Class", "<", "?", ">", "objectType", ";", "Class", "<", "?", ">", "type", ";", "Class", "<", "?", ">", "constants", ";", "Class", "<", "?", ">", "emptyVis", ";", "Class", "<", "?", ">", "rep...
Check that the BCEL classes present seem to be the right ones. Specifically, we check whether the ones extended in FindBugs code are non-final. @return true iff all checks passed
[ "Check", "that", "the", "BCEL", "classes", "present", "seem", "to", "be", "the", "right", "ones", ".", "Specifically", "we", "check", "whether", "the", "ones", "extended", "in", "FindBugs", "code", "are", "non", "-", "final", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/CheckBcel.java#L99-L138
59,819
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFactory.java
ValueNumberFactory.forNumber
public ValueNumber forNumber(int number) { if (number >= getNumValuesAllocated()) { throw new IllegalArgumentException("Value " + number + " has not been allocated"); } return allocatedValueList.get(number); }
java
public ValueNumber forNumber(int number) { if (number >= getNumValuesAllocated()) { throw new IllegalArgumentException("Value " + number + " has not been allocated"); } return allocatedValueList.get(number); }
[ "public", "ValueNumber", "forNumber", "(", "int", "number", ")", "{", "if", "(", "number", ">=", "getNumValuesAllocated", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Value \"", "+", "number", "+", "\" has not been allocated\"", ")", "...
Return a previously allocated value.
[ "Return", "a", "previously", "allocated", "value", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFactory.java#L63-L68
59,820
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugsMessageFormat.java
FindBugsMessageFormat.format
public String format(BugAnnotation[] args, ClassAnnotation primaryClass, boolean abridgedMessages) { String pat = pattern; StringBuilder result = new StringBuilder(); while (pat.length() > 0) { int subst = pat.indexOf('{'); if (subst < 0) { result.append(...
java
public String format(BugAnnotation[] args, ClassAnnotation primaryClass, boolean abridgedMessages) { String pat = pattern; StringBuilder result = new StringBuilder(); while (pat.length() > 0) { int subst = pat.indexOf('{'); if (subst < 0) { result.append(...
[ "public", "String", "format", "(", "BugAnnotation", "[", "]", "args", ",", "ClassAnnotation", "primaryClass", ",", "boolean", "abridgedMessages", ")", "{", "String", "pat", "=", "pattern", ";", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ...
Format the message using the given array of BugAnnotations as arguments to bind to the placeholders in the pattern string. @param args the BugAnnotations used as arguments @param primaryClass TODO @return the formatted message
[ "Format", "the", "message", "using", "the", "given", "array", "of", "BugAnnotations", "as", "arguments", "to", "bind", "to", "the", "placeholders", "in", "the", "pattern", "string", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugsMessageFormat.java#L70-L140
59,821
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/FieldAnnotation.java
FieldAnnotation.fromVisitedField
public static FieldAnnotation fromVisitedField(PreorderVisitor visitor) { return new FieldAnnotation(visitor.getDottedClassName(), visitor.getFieldName(), visitor.getFieldSig(), visitor.getFieldIsStatic()); }
java
public static FieldAnnotation fromVisitedField(PreorderVisitor visitor) { return new FieldAnnotation(visitor.getDottedClassName(), visitor.getFieldName(), visitor.getFieldSig(), visitor.getFieldIsStatic()); }
[ "public", "static", "FieldAnnotation", "fromVisitedField", "(", "PreorderVisitor", "visitor", ")", "{", "return", "new", "FieldAnnotation", "(", "visitor", ".", "getDottedClassName", "(", ")", ",", "visitor", ".", "getFieldName", "(", ")", ",", "visitor", ".", "...
Factory method. Class name, field name, and field signatures are taken from the given visitor, which is visiting the field. @param visitor the visitor which is visiting the field @return the FieldAnnotation object
[ "Factory", "method", ".", "Class", "name", "field", "name", "and", "field", "signatures", "are", "taken", "from", "the", "given", "visitor", "which", "is", "visiting", "the", "field", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/FieldAnnotation.java#L130-L133
59,822
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/FieldAnnotation.java
FieldAnnotation.fromFieldDescriptor
public static FieldAnnotation fromFieldDescriptor(FieldDescriptor fieldDescriptor) { return new FieldAnnotation(fieldDescriptor.getClassDescriptor().getDottedClassName(), fieldDescriptor.getName(), fieldDescriptor.getSignature(), fieldDescriptor.isStatic()); }
java
public static FieldAnnotation fromFieldDescriptor(FieldDescriptor fieldDescriptor) { return new FieldAnnotation(fieldDescriptor.getClassDescriptor().getDottedClassName(), fieldDescriptor.getName(), fieldDescriptor.getSignature(), fieldDescriptor.isStatic()); }
[ "public", "static", "FieldAnnotation", "fromFieldDescriptor", "(", "FieldDescriptor", "fieldDescriptor", ")", "{", "return", "new", "FieldAnnotation", "(", "fieldDescriptor", ".", "getClassDescriptor", "(", ")", ".", "getDottedClassName", "(", ")", ",", "fieldDescriptor...
Factory method. Construct from a FieldDescriptor. @param fieldDescriptor the FieldDescriptor @return the FieldAnnotation
[ "Factory", "method", ".", "Construct", "from", "a", "FieldDescriptor", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/FieldAnnotation.java#L183-L186
59,823
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/FieldAnnotation.java
FieldAnnotation.isRead
public static FieldAnnotation isRead(Instruction ins, ConstantPoolGen cpg) { if (ins instanceof GETFIELD || ins instanceof GETSTATIC) { FieldInstruction fins = (FieldInstruction) ins; String className = fins.getClassName(cpg); return new FieldAnnotation(className, fins.getNam...
java
public static FieldAnnotation isRead(Instruction ins, ConstantPoolGen cpg) { if (ins instanceof GETFIELD || ins instanceof GETSTATIC) { FieldInstruction fins = (FieldInstruction) ins; String className = fins.getClassName(cpg); return new FieldAnnotation(className, fins.getNam...
[ "public", "static", "FieldAnnotation", "isRead", "(", "Instruction", "ins", ",", "ConstantPoolGen", "cpg", ")", "{", "if", "(", "ins", "instanceof", "GETFIELD", "||", "ins", "instanceof", "GETSTATIC", ")", "{", "FieldInstruction", "fins", "=", "(", "FieldInstruc...
Is the given instruction a read of a field? @param ins the Instruction to check @param cpg ConstantPoolGen of the method containing the instruction @return the Field if the instruction is a read of a field, null otherwise
[ "Is", "the", "given", "instruction", "a", "read", "of", "a", "field?" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/FieldAnnotation.java#L231-L239
59,824
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/FieldAnnotation.java
FieldAnnotation.isWrite
public static FieldAnnotation isWrite(Instruction ins, ConstantPoolGen cpg) { if (ins instanceof PUTFIELD || ins instanceof PUTSTATIC) { FieldInstruction fins = (FieldInstruction) ins; String className = fins.getClassName(cpg); return new FieldAnnotation(className, fins.getNa...
java
public static FieldAnnotation isWrite(Instruction ins, ConstantPoolGen cpg) { if (ins instanceof PUTFIELD || ins instanceof PUTSTATIC) { FieldInstruction fins = (FieldInstruction) ins; String className = fins.getClassName(cpg); return new FieldAnnotation(className, fins.getNa...
[ "public", "static", "FieldAnnotation", "isWrite", "(", "Instruction", "ins", ",", "ConstantPoolGen", "cpg", ")", "{", "if", "(", "ins", "instanceof", "PUTFIELD", "||", "ins", "instanceof", "PUTSTATIC", ")", "{", "FieldInstruction", "fins", "=", "(", "FieldInstru...
Is the instruction a write of a field? @param ins the Instruction to check @param cpg ConstantPoolGen of the method containing the instruction @return the Field if instruction is a write of a field, null otherwise
[ "Is", "the", "instruction", "a", "write", "of", "a", "field?" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/FieldAnnotation.java#L250-L258
59,825
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/util/Util.java
Util.isClassFile
public static boolean isClassFile(IJavaElement elt) { if (elt == null) { return false; } return elt instanceof IClassFile || elt instanceof ICompilationUnit; }
java
public static boolean isClassFile(IJavaElement elt) { if (elt == null) { return false; } return elt instanceof IClassFile || elt instanceof ICompilationUnit; }
[ "public", "static", "boolean", "isClassFile", "(", "IJavaElement", "elt", ")", "{", "if", "(", "elt", "==", "null", ")", "{", "return", "false", ";", "}", "return", "elt", "instanceof", "IClassFile", "||", "elt", "instanceof", "ICompilationUnit", ";", "}" ]
Checks whether the given java element is a Java class file. @param elt The resource to check. @return <code>true</code> if the given resource is a class file, <code>false</code> otherwise.
[ "Checks", "whether", "the", "given", "java", "element", "is", "a", "Java", "class", "file", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/util/Util.java#L108-L114
59,826
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/util/Util.java
Util.copyToClipboard
public static void copyToClipboard(String content) { if (content == null) { return; } Clipboard cb = null; try { cb = new Clipboard(Display.getDefault()); cb.setContents(new String[] { content }, new TextTransfer[] { TextTransfer.getInstance() }); ...
java
public static void copyToClipboard(String content) { if (content == null) { return; } Clipboard cb = null; try { cb = new Clipboard(Display.getDefault()); cb.setContents(new String[] { content }, new TextTransfer[] { TextTransfer.getInstance() }); ...
[ "public", "static", "void", "copyToClipboard", "(", "String", "content", ")", "{", "if", "(", "content", "==", "null", ")", "{", "return", ";", "}", "Clipboard", "cb", "=", "null", ";", "try", "{", "cb", "=", "new", "Clipboard", "(", "Display", ".", ...
Copies given string to the system clipboard @param content non null String
[ "Copies", "given", "string", "to", "the", "system", "clipboard" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/util/Util.java#L180-L193
59,827
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/util/Util.java
Util.sortIMarkers
public static void sortIMarkers(IMarker[] markers) { Arrays.sort(markers, new Comparator<IMarker>() { @Override public int compare(IMarker arg0, IMarker arg1) { IResource resource0 = arg0.getResource(); IResource resource1 = arg1.getResource(); ...
java
public static void sortIMarkers(IMarker[] markers) { Arrays.sort(markers, new Comparator<IMarker>() { @Override public int compare(IMarker arg0, IMarker arg1) { IResource resource0 = arg0.getResource(); IResource resource1 = arg1.getResource(); ...
[ "public", "static", "void", "sortIMarkers", "(", "IMarker", "[", "]", "markers", ")", "{", "Arrays", ".", "sort", "(", "markers", ",", "new", "Comparator", "<", "IMarker", ">", "(", ")", "{", "@", "Override", "public", "int", "compare", "(", "IMarker", ...
Sorts an array of IMarkers based on their underlying resource name @param markers
[ "Sorts", "an", "array", "of", "IMarkers", "based", "on", "their", "underlying", "resource", "name" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/util/Util.java#L215-L233
59,828
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/npe/IsNullConditionDecision.java
IsNullConditionDecision.getDecision
public @CheckForNull IsNullValue getDecision(int edgeType) { switch (edgeType) { case EdgeTypes.IFCMP_EDGE: return ifcmpDecision; case EdgeTypes.FALL_THROUGH_EDGE: return fallThroughDecision; default: throw new IllegalArgumentException("Bad edge ty...
java
public @CheckForNull IsNullValue getDecision(int edgeType) { switch (edgeType) { case EdgeTypes.IFCMP_EDGE: return ifcmpDecision; case EdgeTypes.FALL_THROUGH_EDGE: return fallThroughDecision; default: throw new IllegalArgumentException("Bad edge ty...
[ "public", "@", "CheckForNull", "IsNullValue", "getDecision", "(", "int", "edgeType", ")", "{", "switch", "(", "edgeType", ")", "{", "case", "EdgeTypes", ".", "IFCMP_EDGE", ":", "return", "ifcmpDecision", ";", "case", "EdgeTypes", ".", "FALL_THROUGH_EDGE", ":", ...
Get the decision reached about the value on outgoing edge of given type. @param edgeType the type of edge; must be IFCMP_EDGE or FALL_THROUGH_EDGE @return the IsNullValue representing the decision, or null if the edge is infeasible
[ "Get", "the", "decision", "reached", "about", "the", "value", "on", "outgoing", "edge", "of", "given", "type", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/npe/IsNullConditionDecision.java#L124-L134
59,829
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/detect/NoiseNullDeref.java
NoiseNullDeref.findPreviouslyDeadBlocks
private BitSet findPreviouslyDeadBlocks() throws DataflowAnalysisException, CFGBuilderException { BitSet deadBlocks = new BitSet(); ValueNumberDataflow vnaDataflow = classContext.getValueNumberDataflow(method); for (Iterator<BasicBlock> i = vnaDataflow.getCFG().blockIterator(); i.hasNext();) { ...
java
private BitSet findPreviouslyDeadBlocks() throws DataflowAnalysisException, CFGBuilderException { BitSet deadBlocks = new BitSet(); ValueNumberDataflow vnaDataflow = classContext.getValueNumberDataflow(method); for (Iterator<BasicBlock> i = vnaDataflow.getCFG().blockIterator(); i.hasNext();) { ...
[ "private", "BitSet", "findPreviouslyDeadBlocks", "(", ")", "throws", "DataflowAnalysisException", ",", "CFGBuilderException", "{", "BitSet", "deadBlocks", "=", "new", "BitSet", "(", ")", ";", "ValueNumberDataflow", "vnaDataflow", "=", "classContext", ".", "getValueNumbe...
Find set of blocks which were known to be dead before doing the null pointer analysis. @return set of previously dead blocks, indexed by block id @throws CFGBuilderException @throws DataflowAnalysisException
[ "Find", "set", "of", "blocks", "which", "were", "known", "to", "be", "dead", "before", "doing", "the", "null", "pointer", "analysis", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/NoiseNullDeref.java#L213-L225
59,830
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/detect/StreamResourceTracker.java
StreamResourceTracker.addStreamEscape
public void addStreamEscape(Stream source, Location target) { StreamEscape streamEscape = new StreamEscape(source, target); streamEscapeSet.add(streamEscape); if (FindOpenStream.DEBUG) { System.out.println("Adding potential stream escape " + streamEscape); } }
java
public void addStreamEscape(Stream source, Location target) { StreamEscape streamEscape = new StreamEscape(source, target); streamEscapeSet.add(streamEscape); if (FindOpenStream.DEBUG) { System.out.println("Adding potential stream escape " + streamEscape); } }
[ "public", "void", "addStreamEscape", "(", "Stream", "source", ",", "Location", "target", ")", "{", "StreamEscape", "streamEscape", "=", "new", "StreamEscape", "(", "source", ",", "target", ")", ";", "streamEscapeSet", ".", "add", "(", "streamEscape", ")", ";",...
Indicate that a stream escapes at the given target Location. @param source the Stream that is escaping @param target the target Location (where the stream escapes)
[ "Indicate", "that", "a", "stream", "escapes", "at", "the", "given", "target", "Location", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/StreamResourceTracker.java#L118-L124
59,831
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/detect/StreamResourceTracker.java
StreamResourceTracker.addStreamOpenLocation
public void addStreamOpenLocation(Location streamOpenLocation, Stream stream) { if (FindOpenStream.DEBUG) { System.out.println("Stream open location at " + streamOpenLocation); } streamOpenLocationMap.put(streamOpenLocation, stream); if (stream.isUninteresting()) { ...
java
public void addStreamOpenLocation(Location streamOpenLocation, Stream stream) { if (FindOpenStream.DEBUG) { System.out.println("Stream open location at " + streamOpenLocation); } streamOpenLocationMap.put(streamOpenLocation, stream); if (stream.isUninteresting()) { ...
[ "public", "void", "addStreamOpenLocation", "(", "Location", "streamOpenLocation", ",", "Stream", "stream", ")", "{", "if", "(", "FindOpenStream", ".", "DEBUG", ")", "{", "System", ".", "out", ".", "println", "(", "\"Stream open location at \"", "+", "streamOpenLoc...
Indicate that a stream is constructed at this Location. @param streamOpenLocation the Location @param stream the Stream opened at this Location
[ "Indicate", "that", "a", "stream", "is", "constructed", "at", "this", "Location", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/StreamResourceTracker.java#L208-L216
59,832
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindNullDeref.java
FindNullDeref.getMethodNullnessAnnotation
private NullnessAnnotation getMethodNullnessAnnotation() { if (method.getSignature().indexOf(")L") >= 0 || method.getSignature().indexOf(")[") >= 0) { if (DEBUG_NULLRETURN) { System.out.println("Checking return annotation for " + SignatureConverter.convertMet...
java
private NullnessAnnotation getMethodNullnessAnnotation() { if (method.getSignature().indexOf(")L") >= 0 || method.getSignature().indexOf(")[") >= 0) { if (DEBUG_NULLRETURN) { System.out.println("Checking return annotation for " + SignatureConverter.convertMet...
[ "private", "NullnessAnnotation", "getMethodNullnessAnnotation", "(", ")", "{", "if", "(", "method", ".", "getSignature", "(", ")", ".", "indexOf", "(", "\")L\"", ")", ">=", "0", "||", "method", ".", "getSignature", "(", ")", ".", "indexOf", "(", "\")[\"", ...
See if the currently-visited method declares a @NonNull annotation, or overrides a method which declares a @NonNull annotation.
[ "See", "if", "the", "currently", "-", "visited", "method", "declares", "a" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindNullDeref.java#L324-L336
59,833
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindNullDeref.java
FindNullDeref.checkNonNullParam
private void checkNonNullParam(Location location, ConstantPoolGen cpg, TypeDataflow typeDataflow, InvokeInstruction invokeInstruction, BitSet nullArgSet, BitSet definitelyNullArgSet) { if (inExplicitCatchNullBlock(location)) { return; } boolean caught = inIndirectCatchNu...
java
private void checkNonNullParam(Location location, ConstantPoolGen cpg, TypeDataflow typeDataflow, InvokeInstruction invokeInstruction, BitSet nullArgSet, BitSet definitelyNullArgSet) { if (inExplicitCatchNullBlock(location)) { return; } boolean caught = inIndirectCatchNu...
[ "private", "void", "checkNonNullParam", "(", "Location", "location", ",", "ConstantPoolGen", "cpg", ",", "TypeDataflow", "typeDataflow", ",", "InvokeInstruction", "invokeInstruction", ",", "BitSet", "nullArgSet", ",", "BitSet", "definitelyNullArgSet", ")", "{", "if", ...
We have a method invocation in which a possibly or definitely null parameter is passed. Check it against the library of nonnull annotations. @param location @param cpg @param typeDataflow @param invokeInstruction @param nullArgSet @param definitelyNullArgSet
[ "We", "have", "a", "method", "invocation", "in", "which", "a", "possibly", "or", "definitely", "null", "parameter", "is", "passed", ".", "Check", "it", "against", "the", "library", "of", "nonnull", "annotations", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindNullDeref.java#L841-L909
59,834
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindNullDeref.java
FindNullDeref.isGoto
private boolean isGoto(Instruction instruction) { return instruction.getOpcode() == Const.GOTO || instruction.getOpcode() == Const.GOTO_W; }
java
private boolean isGoto(Instruction instruction) { return instruction.getOpcode() == Const.GOTO || instruction.getOpcode() == Const.GOTO_W; }
[ "private", "boolean", "isGoto", "(", "Instruction", "instruction", ")", "{", "return", "instruction", ".", "getOpcode", "(", ")", "==", "Const", ".", "GOTO", "||", "instruction", ".", "getOpcode", "(", ")", "==", "Const", ".", "GOTO_W", ";", "}" ]
Determine whether or not given instruction is a goto. @param instruction the instruction @return true if the instruction is a goto, false otherwise
[ "Determine", "whether", "or", "not", "given", "instruction", "is", "a", "goto", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindNullDeref.java#L1331-L1333
59,835
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/impl/AnalysisCache.java
AnalysisCache.dispose
public void dispose(){ classAnalysisMap.clear(); classAnalysisEngineMap.clear(); analysisLocals.clear(); databaseFactoryMap.clear(); databaseMap.clear(); methodAnalysisEngineMap.clear(); }
java
public void dispose(){ classAnalysisMap.clear(); classAnalysisEngineMap.clear(); analysisLocals.clear(); databaseFactoryMap.clear(); databaseMap.clear(); methodAnalysisEngineMap.clear(); }
[ "public", "void", "dispose", "(", ")", "{", "classAnalysisMap", ".", "clear", "(", ")", ";", "classAnalysisEngineMap", ".", "clear", "(", ")", ";", "analysisLocals", ".", "clear", "(", ")", ";", "databaseFactoryMap", ".", "clear", "(", ")", ";", "databaseM...
Cleans up all cached data
[ "Cleans", "up", "all", "cached", "data" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/impl/AnalysisCache.java#L205-L212
59,836
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/impl/AnalysisCache.java
AnalysisCache.reuseClassAnalysis
public <E> void reuseClassAnalysis(Class<E> analysisClass, Map<ClassDescriptor, Object> map) { Map<ClassDescriptor, Object> myMap = classAnalysisMap.get(analysisClass); if (myMap != null) { myMap.putAll(map); } else { myMap = createMap(classAnalysisEngineMap, analysisClas...
java
public <E> void reuseClassAnalysis(Class<E> analysisClass, Map<ClassDescriptor, Object> map) { Map<ClassDescriptor, Object> myMap = classAnalysisMap.get(analysisClass); if (myMap != null) { myMap.putAll(map); } else { myMap = createMap(classAnalysisEngineMap, analysisClas...
[ "public", "<", "E", ">", "void", "reuseClassAnalysis", "(", "Class", "<", "E", ">", "analysisClass", ",", "Map", "<", "ClassDescriptor", ",", "Object", ">", "map", ")", "{", "Map", "<", "ClassDescriptor", ",", "Object", ">", "myMap", "=", "classAnalysisMap...
Adds the data for given analysis type from given map to the cache @param analysisClass non null analysis type @param map non null, pre-filled map with analysis data for given type
[ "Adds", "the", "data", "for", "given", "analysis", "type", "from", "given", "map", "to", "the", "cache" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/impl/AnalysisCache.java#L227-L236
59,837
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/impl/AnalysisCache.java
AnalysisCache.analyzeMethod
@SuppressWarnings("unchecked") private <E> E analyzeMethod(ClassContext classContext, Class<E> analysisClass, MethodDescriptor methodDescriptor) throws CheckedAnalysisException { IMethodAnalysisEngine<E> engine = (IMethodAnalysisEngine<E>) methodAnalysisEngineMap.get(analysisClass); if (...
java
@SuppressWarnings("unchecked") private <E> E analyzeMethod(ClassContext classContext, Class<E> analysisClass, MethodDescriptor methodDescriptor) throws CheckedAnalysisException { IMethodAnalysisEngine<E> engine = (IMethodAnalysisEngine<E>) methodAnalysisEngineMap.get(analysisClass); if (...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "<", "E", ">", "E", "analyzeMethod", "(", "ClassContext", "classContext", ",", "Class", "<", "E", ">", "analysisClass", ",", "MethodDescriptor", "methodDescriptor", ")", "throws", "CheckedAnalysisExcepti...
Analyze a method. @param classContext ClassContext storing method analysis objects for method's class @param analysisClass class the method analysis object should belong to @param methodDescriptor method descriptor identifying the method to analyze @return the computed analysis object for the method @throws CheckedAna...
[ "Analyze", "a", "method", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/impl/AnalysisCache.java#L359-L373
59,838
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/impl/AnalysisCache.java
AnalysisCache.findOrCreateDescriptorMap
private static <DescriptorType> Map<DescriptorType, Object> findOrCreateDescriptorMap( final Map<Class<?>, Map<DescriptorType, Object>> analysisClassToDescriptorMapMap, final Map<Class<?>, ? extends IAnalysisEngine<DescriptorType, ?>> engineMap, final Class<?> analysisClass) ...
java
private static <DescriptorType> Map<DescriptorType, Object> findOrCreateDescriptorMap( final Map<Class<?>, Map<DescriptorType, Object>> analysisClassToDescriptorMapMap, final Map<Class<?>, ? extends IAnalysisEngine<DescriptorType, ?>> engineMap, final Class<?> analysisClass) ...
[ "private", "static", "<", "DescriptorType", ">", "Map", "<", "DescriptorType", ",", "Object", ">", "findOrCreateDescriptorMap", "(", "final", "Map", "<", "Class", "<", "?", ">", ",", "Map", "<", "DescriptorType", ",", "Object", ">", ">", "analysisClassToDescri...
Find or create a descriptor to analysis object map. @param <DescriptorType> type of descriptor used as the map's key type (ClassDescriptor or MethodDescriptor) @param analysisClassToDescriptorMapMap analysis class to descriptor map map @param engineMap analysis class to analysis engine map @param analysisClass the ana...
[ "Find", "or", "create", "a", "descriptor", "to", "analysis", "object", "map", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/impl/AnalysisCache.java#L416-L426
59,839
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/xml/Dom4JXMLOutput.java
Dom4JXMLOutput.writeElementList
public void writeElementList(String tagName, Collection<String> listValues) { for (String listValue : listValues) { openTag(tagName); writeText(listValue); closeTag(tagName); } }
java
public void writeElementList(String tagName, Collection<String> listValues) { for (String listValue : listValues) { openTag(tagName); writeText(listValue); closeTag(tagName); } }
[ "public", "void", "writeElementList", "(", "String", "tagName", ",", "Collection", "<", "String", ">", "listValues", ")", "{", "for", "(", "String", "listValue", ":", "listValues", ")", "{", "openTag", "(", "tagName", ")", ";", "writeText", "(", "listValue",...
Add a list of Strings to document as elements with given tag name to the tree. @param tagName the tag name @param listValues Collection of String values to add
[ "Add", "a", "list", "of", "Strings", "to", "document", "as", "elements", "with", "given", "tag", "name", "to", "the", "tree", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/xml/Dom4JXMLOutput.java#L131-L137
59,840
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/obl/ObligationFactory.java
ObligationFactory.isObligationType
public boolean isObligationType(ClassDescriptor classDescriptor) { try { return getObligationByType(BCELUtil.getObjectTypeInstance(classDescriptor.toDottedClassName())) != null; } catch (ClassNotFoundException e) { Global.getAnalysisCache().getErrorLogger().reportMissingClass(e);...
java
public boolean isObligationType(ClassDescriptor classDescriptor) { try { return getObligationByType(BCELUtil.getObjectTypeInstance(classDescriptor.toDottedClassName())) != null; } catch (ClassNotFoundException e) { Global.getAnalysisCache().getErrorLogger().reportMissingClass(e);...
[ "public", "boolean", "isObligationType", "(", "ClassDescriptor", "classDescriptor", ")", "{", "try", "{", "return", "getObligationByType", "(", "BCELUtil", ".", "getObjectTypeInstance", "(", "classDescriptor", ".", "toDottedClassName", "(", ")", ")", ")", "!=", "nul...
Determine whether class named by given ClassDescriptor is an Obligation type. @param classDescriptor a class @return true if the class is an Obligation type, false otherwise
[ "Determine", "whether", "class", "named", "by", "given", "ClassDescriptor", "is", "an", "Obligation", "type", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/obl/ObligationFactory.java#L81-L88
59,841
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/obl/ObligationFactory.java
ObligationFactory.getParameterObligationTypes
public Obligation[] getParameterObligationTypes(XMethod xmethod) { Type[] paramTypes = Type.getArgumentTypes(xmethod.getSignature()); Obligation[] result = new Obligation[paramTypes.length]; for (int i = 0; i < paramTypes.length; i++) { if (!(paramTypes[i] instanceof ObjectType)) { ...
java
public Obligation[] getParameterObligationTypes(XMethod xmethod) { Type[] paramTypes = Type.getArgumentTypes(xmethod.getSignature()); Obligation[] result = new Obligation[paramTypes.length]; for (int i = 0; i < paramTypes.length; i++) { if (!(paramTypes[i] instanceof ObjectType)) { ...
[ "public", "Obligation", "[", "]", "getParameterObligationTypes", "(", "XMethod", "xmethod", ")", "{", "Type", "[", "]", "paramTypes", "=", "Type", ".", "getArgumentTypes", "(", "xmethod", ".", "getSignature", "(", ")", ")", ";", "Obligation", "[", "]", "resu...
Get array of Obligation types corresponding to the parameters of the given method. @param xmethod a method @return array of Obligation types for each of the method's parameters; a null element means the corresponding parameter is not an Obligation type
[ "Get", "array", "of", "Obligation", "types", "corresponding", "to", "the", "parameters", "of", "the", "given", "method", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/obl/ObligationFactory.java#L151-L165
59,842
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AbstractDataflowAnalysis.java
AbstractDataflowAnalysis.getFactAfterLocation
@Override public Fact getFactAfterLocation(Location location) throws DataflowAnalysisException { BasicBlock basicBlock = location.getBasicBlock(); InstructionHandle handle = location.getHandle(); if (handle == (isForwards() ? basicBlock.getLastInstruction() : basicBlock.getFirstInstruction(...
java
@Override public Fact getFactAfterLocation(Location location) throws DataflowAnalysisException { BasicBlock basicBlock = location.getBasicBlock(); InstructionHandle handle = location.getHandle(); if (handle == (isForwards() ? basicBlock.getLastInstruction() : basicBlock.getFirstInstruction(...
[ "@", "Override", "public", "Fact", "getFactAfterLocation", "(", "Location", "location", ")", "throws", "DataflowAnalysisException", "{", "BasicBlock", "basicBlock", "=", "location", ".", "getBasicBlock", "(", ")", ";", "InstructionHandle", "handle", "=", "location", ...
Get the dataflow fact representing the point just after given Location. Note "after" is meant in the logical sense, so for backward analyses, after means before the location in the control flow sense. @param location the location @return the fact at the point just after the location
[ "Get", "the", "dataflow", "fact", "representing", "the", "point", "just", "after", "given", "Location", ".", "Note", "after", "is", "meant", "in", "the", "logical", "sense", "so", "for", "backward", "analyses", "after", "means", "before", "the", "location", ...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AbstractDataflowAnalysis.java#L97-L107
59,843
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/detect/StaticCalendarDetector.java
StaticCalendarDetector.visit
@Override public void visit(JavaClass someObj) { currentClass = someObj.getClassName(); currentMethod = null; currentCFG = null; currentLockDataFlow = null; sawDateClass = false; }
java
@Override public void visit(JavaClass someObj) { currentClass = someObj.getClassName(); currentMethod = null; currentCFG = null; currentLockDataFlow = null; sawDateClass = false; }
[ "@", "Override", "public", "void", "visit", "(", "JavaClass", "someObj", ")", "{", "currentClass", "=", "someObj", ".", "getClassName", "(", ")", ";", "currentMethod", "=", "null", ";", "currentCFG", "=", "null", ";", "currentLockDataFlow", "=", "null", ";",...
Remembers the class name and resets temporary fields.
[ "Remembers", "the", "class", "name", "and", "resets", "temporary", "fields", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/StaticCalendarDetector.java#L126-L134
59,844
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/TextUICommandLine.java
TextUICommandLine.addAuxClassPathEntries
private void addAuxClassPathEntries(String argument) { StringTokenizer tok = new StringTokenizer(argument, File.pathSeparator); while (tok.hasMoreTokens()) { project.addAuxClasspathEntry(tok.nextToken()); } }
java
private void addAuxClassPathEntries(String argument) { StringTokenizer tok = new StringTokenizer(argument, File.pathSeparator); while (tok.hasMoreTokens()) { project.addAuxClasspathEntry(tok.nextToken()); } }
[ "private", "void", "addAuxClassPathEntries", "(", "String", "argument", ")", "{", "StringTokenizer", "tok", "=", "new", "StringTokenizer", "(", "argument", ",", "File", ".", "pathSeparator", ")", ";", "while", "(", "tok", ".", "hasMoreTokens", "(", ")", ")", ...
Parse the argument as auxclasspath entries and add them @param argument
[ "Parse", "the", "argument", "as", "auxclasspath", "entries", "and", "add", "them" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/TextUICommandLine.java#L569-L574
59,845
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/TextUICommandLine.java
TextUICommandLine.choose
private void choose(String argument, String desc, Chooser chooser) { StringTokenizer tok = new StringTokenizer(argument, ","); while (tok.hasMoreTokens()) { String what = tok.nextToken().trim(); if (!what.startsWith("+") && !what.startsWith("-")) { throw new Illeg...
java
private void choose(String argument, String desc, Chooser chooser) { StringTokenizer tok = new StringTokenizer(argument, ","); while (tok.hasMoreTokens()) { String what = tok.nextToken().trim(); if (!what.startsWith("+") && !what.startsWith("-")) { throw new Illeg...
[ "private", "void", "choose", "(", "String", "argument", ",", "String", "desc", ",", "Chooser", "chooser", ")", "{", "StringTokenizer", "tok", "=", "new", "StringTokenizer", "(", "argument", ",", "\",\"", ")", ";", "while", "(", "tok", ".", "hasMoreTokens", ...
Common handling code for -chooseVisitors and -choosePlugins options. @param argument the list of visitors or plugins to be chosen @param desc String describing what is being chosen @param chooser callback object to selectively choose list members
[ "Common", "handling", "code", "for", "-", "chooseVisitors", "and", "-", "choosePlugins", "options", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/TextUICommandLine.java#L586-L596
59,846
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/TextUICommandLine.java
TextUICommandLine.handleXArgs
public void handleXArgs() throws IOException { if (getXargs()) { try (BufferedReader in = UTF8.bufferedReader(System.in)) { while (true) { String s = in.readLine(); if (s == null) { break; } ...
java
public void handleXArgs() throws IOException { if (getXargs()) { try (BufferedReader in = UTF8.bufferedReader(System.in)) { while (true) { String s = in.readLine(); if (s == null) { break; } ...
[ "public", "void", "handleXArgs", "(", ")", "throws", "IOException", "{", "if", "(", "getXargs", "(", ")", ")", "{", "try", "(", "BufferedReader", "in", "=", "UTF8", ".", "bufferedReader", "(", "System", ".", "in", ")", ")", "{", "while", "(", "true", ...
Handle -xargs command line option by reading jar file names from standard input and adding them to the project. @throws IOException
[ "Handle", "-", "xargs", "command", "line", "option", "by", "reading", "jar", "file", "names", "from", "standard", "input", "and", "adding", "them", "to", "the", "project", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/TextUICommandLine.java#L712-L724
59,847
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/TextUICommandLine.java
TextUICommandLine.handleAuxClassPathFromFile
private void handleAuxClassPathFromFile(String filePath) throws IOException { try (BufferedReader in = new BufferedReader(UTF8.fileReader(filePath))) { while (true) { String s = in.readLine(); if (s == null) { break; } ...
java
private void handleAuxClassPathFromFile(String filePath) throws IOException { try (BufferedReader in = new BufferedReader(UTF8.fileReader(filePath))) { while (true) { String s = in.readLine(); if (s == null) { break; } ...
[ "private", "void", "handleAuxClassPathFromFile", "(", "String", "filePath", ")", "throws", "IOException", "{", "try", "(", "BufferedReader", "in", "=", "new", "BufferedReader", "(", "UTF8", ".", "fileReader", "(", "filePath", ")", ")", ")", "{", "while", "(", ...
Handle -readAuxFromFile command line option by reading classpath entries from a file and adding them to the project. @throws IOException
[ "Handle", "-", "readAuxFromFile", "command", "line", "option", "by", "reading", "classpath", "entries", "from", "a", "file", "and", "adding", "them", "to", "the", "project", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/TextUICommandLine.java#L732-L742
59,848
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/TextUICommandLine.java
TextUICommandLine.handleAnalyzeFromFile
private void handleAnalyzeFromFile(String filePath) throws IOException { try (BufferedReader in = new BufferedReader(UTF8.fileReader(filePath))) { while (true) { String s = in.readLine(); if (s == null) { break; } pr...
java
private void handleAnalyzeFromFile(String filePath) throws IOException { try (BufferedReader in = new BufferedReader(UTF8.fileReader(filePath))) { while (true) { String s = in.readLine(); if (s == null) { break; } pr...
[ "private", "void", "handleAnalyzeFromFile", "(", "String", "filePath", ")", "throws", "IOException", "{", "try", "(", "BufferedReader", "in", "=", "new", "BufferedReader", "(", "UTF8", ".", "fileReader", "(", "filePath", ")", ")", ")", "{", "while", "(", "tr...
Handle -analyzeFromFile command line option by reading jar file names from a file and adding them to the project. @throws IOException
[ "Handle", "-", "analyzeFromFile", "command", "line", "option", "by", "reading", "jar", "file", "names", "from", "a", "file", "and", "adding", "them", "to", "the", "project", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/TextUICommandLine.java#L750-L760
59,849
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java
Project.duplicate
public Project duplicate() { Project dup = new Project(); dup.currentWorkingDirectoryList.addAll(this.currentWorkingDirectoryList); dup.projectName = this.projectName; dup.analysisTargets.addAll(this.analysisTargets); dup.srcDirList.addAll(this.srcDirList); dup.auxClasspa...
java
public Project duplicate() { Project dup = new Project(); dup.currentWorkingDirectoryList.addAll(this.currentWorkingDirectoryList); dup.projectName = this.projectName; dup.analysisTargets.addAll(this.analysisTargets); dup.srcDirList.addAll(this.srcDirList); dup.auxClasspa...
[ "public", "Project", "duplicate", "(", ")", "{", "Project", "dup", "=", "new", "Project", "(", ")", ";", "dup", ".", "currentWorkingDirectoryList", ".", "addAll", "(", "this", ".", "currentWorkingDirectoryList", ")", ";", "dup", ".", "projectName", "=", "thi...
Return an exact copy of this Project.
[ "Return", "an", "exact", "copy", "of", "this", "Project", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java#L172-L182
59,850
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java
Project.add
public void add(Project project2) { analysisTargets = appendWithoutDuplicates(analysisTargets, project2.analysisTargets); srcDirList = appendWithoutDuplicates(srcDirList, project2.srcDirList); auxClasspathEntryList = appendWithoutDuplicates(auxClasspathEntryList, project2.auxClasspathEntryList);...
java
public void add(Project project2) { analysisTargets = appendWithoutDuplicates(analysisTargets, project2.analysisTargets); srcDirList = appendWithoutDuplicates(srcDirList, project2.srcDirList); auxClasspathEntryList = appendWithoutDuplicates(auxClasspathEntryList, project2.auxClasspathEntryList);...
[ "public", "void", "add", "(", "Project", "project2", ")", "{", "analysisTargets", "=", "appendWithoutDuplicates", "(", "analysisTargets", ",", "project2", ".", "analysisTargets", ")", ";", "srcDirList", "=", "appendWithoutDuplicates", "(", "srcDirList", ",", "projec...
add information from project2 to this project
[ "add", "information", "from", "project2", "to", "this", "project" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java#L198-L202
59,851
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java
Project.addSourceDirs
public boolean addSourceDirs(Collection<String> sourceDirs) { boolean isNew = false; if (sourceDirs == null || sourceDirs.isEmpty()) { return isNew; } for (String dirName : sourceDirs) { for (String dir : makeAbsoluteCwdCandidates(dirName)) { isN...
java
public boolean addSourceDirs(Collection<String> sourceDirs) { boolean isNew = false; if (sourceDirs == null || sourceDirs.isEmpty()) { return isNew; } for (String dirName : sourceDirs) { for (String dir : makeAbsoluteCwdCandidates(dirName)) { isN...
[ "public", "boolean", "addSourceDirs", "(", "Collection", "<", "String", ">", "sourceDirs", ")", "{", "boolean", "isNew", "=", "false", ";", "if", "(", "sourceDirs", "==", "null", "||", "sourceDirs", ".", "isEmpty", "(", ")", ")", "{", "return", "isNew", ...
Add source directories to the project. @param sourceDirs The source directories to add. These can be either absolute paths or relative to any of the working directories in this project object. @return true if a source directory was added or false if all source directories were already present
[ "Add", "source", "directories", "to", "the", "project", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java#L267-L282
59,852
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java
Project.addWorkingDir
public boolean addWorkingDir(String dirName) { if (dirName == null) { throw new NullPointerException(); } return addToListInternal(currentWorkingDirectoryList, new File(dirName)); }
java
public boolean addWorkingDir(String dirName) { if (dirName == null) { throw new NullPointerException(); } return addToListInternal(currentWorkingDirectoryList, new File(dirName)); }
[ "public", "boolean", "addWorkingDir", "(", "String", "dirName", ")", "{", "if", "(", "dirName", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "return", "addToListInternal", "(", "currentWorkingDirectoryList", ",", "new", "...
Add a working directory to the project. @param dirName the directory to add @return true if the working directory was added, or false if the working directory was already present
[ "Add", "a", "working", "directory", "to", "the", "project", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java#L292-L297
59,853
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java
Project.removeSourceDir
public void removeSourceDir(int num) { srcDirList.remove(num); IO.close(sourceFinder); sourceFinder = new SourceFinder(this); isModified = true; }
java
public void removeSourceDir(int num) { srcDirList.remove(num); IO.close(sourceFinder); sourceFinder = new SourceFinder(this); isModified = true; }
[ "public", "void", "removeSourceDir", "(", "int", "num", ")", "{", "srcDirList", ".", "remove", "(", "num", ")", ";", "IO", ".", "close", "(", "sourceFinder", ")", ";", "sourceFinder", "=", "new", "SourceFinder", "(", "this", ")", ";", "isModified", "=", ...
Remove source directory at given index. @param num index of the source directory to remove
[ "Remove", "source", "directory", "at", "given", "index", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java#L363-L368
59,854
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java
Project.write
@Deprecated public void write(String outputFile, boolean useRelativePaths, String relativeBase) throws IOException { PrintWriter writer = UTF8.printWriter(outputFile); try { writer.println(JAR_FILES_KEY); for (String jarFile : analysisTargets) { if (useRelativ...
java
@Deprecated public void write(String outputFile, boolean useRelativePaths, String relativeBase) throws IOException { PrintWriter writer = UTF8.printWriter(outputFile); try { writer.println(JAR_FILES_KEY); for (String jarFile : analysisTargets) { if (useRelativ...
[ "@", "Deprecated", "public", "void", "write", "(", "String", "outputFile", ",", "boolean", "useRelativePaths", ",", "String", "relativeBase", ")", "throws", "IOException", "{", "PrintWriter", "writer", "=", "UTF8", ".", "printWriter", "(", "outputFile", ")", ";"...
Save the project to an output file. @param outputFile name of output file @param useRelativePaths true if the project should be written using only relative paths @param relativeBase if useRelativePaths is true, this file is taken as the base directory in terms of which all files should be made relative @throws IOExcep...
[ "Save", "the", "project", "to", "an", "output", "file", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java#L637-L675
59,855
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java
Project.readProject
public static Project readProject(String argument) throws IOException { String projectFileName = argument; File projectFile = new File(projectFileName); if (projectFileName.endsWith(".xml") || projectFileName.endsWith(".fbp")) { try { return Project.readXML(projectF...
java
public static Project readProject(String argument) throws IOException { String projectFileName = argument; File projectFile = new File(projectFileName); if (projectFileName.endsWith(".xml") || projectFileName.endsWith(".fbp")) { try { return Project.readXML(projectF...
[ "public", "static", "Project", "readProject", "(", "String", "argument", ")", "throws", "IOException", "{", "String", "projectFileName", "=", "argument", ";", "File", "projectFile", "=", "new", "File", "(", "projectFileName", ")", ";", "if", "(", "projectFileNam...
Read Project from named file. @param argument command line argument containing project file name @return the Project @throws IOException
[ "Read", "Project", "from", "named", "file", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java#L730-L745
59,856
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java
Project.convertToRelative
private String convertToRelative(String srcFile, String base) { String slash = SystemProperties.getProperty("file.separator"); if (FILE_IGNORE_CASE) { srcFile = srcFile.toLowerCase(); base = base.toLowerCase(); } if (base.equals(srcFile)) { return "....
java
private String convertToRelative(String srcFile, String base) { String slash = SystemProperties.getProperty("file.separator"); if (FILE_IGNORE_CASE) { srcFile = srcFile.toLowerCase(); base = base.toLowerCase(); } if (base.equals(srcFile)) { return "....
[ "private", "String", "convertToRelative", "(", "String", "srcFile", ",", "String", "base", ")", "{", "String", "slash", "=", "SystemProperties", ".", "getProperty", "(", "\"file.separator\"", ")", ";", "if", "(", "FILE_IGNORE_CASE", ")", "{", "srcFile", "=", "...
Converts a full path to a relative path if possible @param srcFile path to convert @return the converted filename
[ "Converts", "a", "full", "path", "to", "a", "relative", "path", "if", "possible" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java#L879-L938
59,857
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java
Project.makeAbsoluteCWD
private String makeAbsoluteCWD(String fileName) { List<String> candidates = makeAbsoluteCwdCandidates(fileName); return candidates.get(0); }
java
private String makeAbsoluteCWD(String fileName) { List<String> candidates = makeAbsoluteCwdCandidates(fileName); return candidates.get(0); }
[ "private", "String", "makeAbsoluteCWD", "(", "String", "fileName", ")", "{", "List", "<", "String", ">", "candidates", "=", "makeAbsoluteCwdCandidates", "(", "fileName", ")", ";", "return", "candidates", ".", "get", "(", "0", ")", ";", "}" ]
Make the given filename absolute relative to the current working directory.
[ "Make", "the", "given", "filename", "absolute", "relative", "to", "the", "current", "working", "directory", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java#L971-L974
59,858
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java
Project.makeAbsoluteCwdCandidates
private List<String> makeAbsoluteCwdCandidates(String fileName) { List<String> candidates = new ArrayList<>(); boolean hasProtocol = (URLClassPath.getURLProtocol(fileName) != null); if (hasProtocol) { candidates.add(fileName); return candidates; } if (ne...
java
private List<String> makeAbsoluteCwdCandidates(String fileName) { List<String> candidates = new ArrayList<>(); boolean hasProtocol = (URLClassPath.getURLProtocol(fileName) != null); if (hasProtocol) { candidates.add(fileName); return candidates; } if (ne...
[ "private", "List", "<", "String", ">", "makeAbsoluteCwdCandidates", "(", "String", "fileName", ")", "{", "List", "<", "String", ">", "candidates", "=", "new", "ArrayList", "<>", "(", ")", ";", "boolean", "hasProtocol", "=", "(", "URLClassPath", ".", "getURLP...
Make the given filename absolute relative to the current working directory candidates. If the given filename exists in more than one of the working directories, a list of these existing absolute paths is returned. The returned list is guaranteed to be non-empty. The returned paths might exist or not exist and might b...
[ "Make", "the", "given", "filename", "absolute", "relative", "to", "the", "current", "working", "directory", "candidates", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java#L988-L1014
59,859
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java
Project.addToListInternal
private <T> boolean addToListInternal(Collection<T> list, T value) { if (!list.contains(value)) { list.add(value); isModified = true; return true; } else { return false; } }
java
private <T> boolean addToListInternal(Collection<T> list, T value) { if (!list.contains(value)) { list.add(value); isModified = true; return true; } else { return false; } }
[ "private", "<", "T", ">", "boolean", "addToListInternal", "(", "Collection", "<", "T", ">", "list", ",", "T", "value", ")", "{", "if", "(", "!", "list", ".", "contains", "(", "value", ")", ")", "{", "list", ".", "add", "(", "value", ")", ";", "is...
Add a value to given list, making the Project modified if the value is not already present in the list. @param list the list @param value the value to be added @return true if the value was not already present in the list, false otherwise
[ "Add", "a", "value", "to", "given", "list", "making", "the", "Project", "modified", "if", "the", "value", "is", "not", "already", "present", "in", "the", "list", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java#L1027-L1035
59,860
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java
ValueNumberFrameModelingVisitor.doRedundantLoadElimination
private boolean doRedundantLoadElimination() { if (!REDUNDANT_LOAD_ELIMINATION) { return false; } XField xfield = loadedFieldSet.getField(handle); if (xfield == null) { return false; } // TODO: support two-slot fields return !(xfield.getS...
java
private boolean doRedundantLoadElimination() { if (!REDUNDANT_LOAD_ELIMINATION) { return false; } XField xfield = loadedFieldSet.getField(handle); if (xfield == null) { return false; } // TODO: support two-slot fields return !(xfield.getS...
[ "private", "boolean", "doRedundantLoadElimination", "(", ")", "{", "if", "(", "!", "REDUNDANT_LOAD_ELIMINATION", ")", "{", "return", "false", ";", "}", "XField", "xfield", "=", "loadedFieldSet", ".", "getField", "(", "handle", ")", ";", "if", "(", "xfield", ...
Determine whether redundant load elimination should be performed for the heap location referenced by the current instruction. @return true if we should do redundant load elimination for the current instruction, false if not
[ "Determine", "whether", "redundant", "load", "elimination", "should", "be", "performed", "for", "the", "heap", "location", "referenced", "by", "the", "current", "instruction", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java#L156-L168
59,861
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java
ValueNumberFrameModelingVisitor.doForwardSubstitution
private boolean doForwardSubstitution() { if (!REDUNDANT_LOAD_ELIMINATION) { return false; } XField xfield = loadedFieldSet.getField(handle); if (xfield == null) { return false; } if(xfield.getSignature().equals("D") || xfield.getSignature().equa...
java
private boolean doForwardSubstitution() { if (!REDUNDANT_LOAD_ELIMINATION) { return false; } XField xfield = loadedFieldSet.getField(handle); if (xfield == null) { return false; } if(xfield.getSignature().equals("D") || xfield.getSignature().equa...
[ "private", "boolean", "doForwardSubstitution", "(", ")", "{", "if", "(", "!", "REDUNDANT_LOAD_ELIMINATION", ")", "{", "return", "false", ";", "}", "XField", "xfield", "=", "loadedFieldSet", ".", "getField", "(", "handle", ")", ";", "if", "(", "xfield", "==",...
Determine whether forward substitution should be performed for the heap location referenced by the current instruction. @return true if we should do forward substitution for the current instruction, false if not
[ "Determine", "whether", "forward", "substitution", "should", "be", "performed", "for", "the", "heap", "location", "referenced", "by", "the", "current", "instruction", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java#L177-L194
59,862
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java
ValueNumberFrameModelingVisitor.modelNormalInstruction
@Override public void modelNormalInstruction(Instruction ins, int numWordsConsumed, int numWordsProduced) { int flags = 0; if (ins instanceof InvokeInstruction) { flags = ValueNumber.RETURN_VALUE; } else if (ins instanceof ArrayInstruction) { flags = ValueNumber.ARRA...
java
@Override public void modelNormalInstruction(Instruction ins, int numWordsConsumed, int numWordsProduced) { int flags = 0; if (ins instanceof InvokeInstruction) { flags = ValueNumber.RETURN_VALUE; } else if (ins instanceof ArrayInstruction) { flags = ValueNumber.ARRA...
[ "@", "Override", "public", "void", "modelNormalInstruction", "(", "Instruction", "ins", ",", "int", "numWordsConsumed", ",", "int", "numWordsProduced", ")", "{", "int", "flags", "=", "0", ";", "if", "(", "ins", "instanceof", "InvokeInstruction", ")", "{", "fla...
This is the default instruction modeling method.
[ "This", "is", "the", "default", "instruction", "modeling", "method", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java#L221-L247
59,863
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java
ValueNumberFrameModelingVisitor.popInputValues
private ValueNumber[] popInputValues(int numWordsConsumed) { ValueNumberFrame frame = getFrame(); ValueNumber[] inputValueList = allocateValueNumberArray(numWordsConsumed); // Pop off the input operands. try { frame.getTopStackWords(inputValueList); while (numWor...
java
private ValueNumber[] popInputValues(int numWordsConsumed) { ValueNumberFrame frame = getFrame(); ValueNumber[] inputValueList = allocateValueNumberArray(numWordsConsumed); // Pop off the input operands. try { frame.getTopStackWords(inputValueList); while (numWor...
[ "private", "ValueNumber", "[", "]", "popInputValues", "(", "int", "numWordsConsumed", ")", "{", "ValueNumberFrame", "frame", "=", "getFrame", "(", ")", ";", "ValueNumber", "[", "]", "inputValueList", "=", "allocateValueNumberArray", "(", "numWordsConsumed", ")", "...
Pop the input values for the given instruction from the current frame.
[ "Pop", "the", "input", "values", "for", "the", "given", "instruction", "from", "the", "current", "frame", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java#L595-L610
59,864
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java
ValueNumberFrameModelingVisitor.pushOutputValues
private void pushOutputValues(ValueNumber[] outputValueList) { ValueNumberFrame frame = getFrame(); for (ValueNumber aOutputValueList : outputValueList) { frame.pushValue(aOutputValueList); } }
java
private void pushOutputValues(ValueNumber[] outputValueList) { ValueNumberFrame frame = getFrame(); for (ValueNumber aOutputValueList : outputValueList) { frame.pushValue(aOutputValueList); } }
[ "private", "void", "pushOutputValues", "(", "ValueNumber", "[", "]", "outputValueList", ")", "{", "ValueNumberFrame", "frame", "=", "getFrame", "(", ")", ";", "for", "(", "ValueNumber", "aOutputValueList", ":", "outputValueList", ")", "{", "frame", ".", "pushVal...
Push given output values onto the current frame.
[ "Push", "given", "output", "values", "onto", "the", "current", "frame", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java#L615-L620
59,865
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java
ValueNumberFrameModelingVisitor.loadInstanceField
private void loadInstanceField(XField instanceField, Instruction obj) { if (RLE_DEBUG) { System.out.println("[loadInstanceField for field " + instanceField + " in instruction " + handle); } ValueNumberFrame frame = getFrame(); try { ValueNumber reference = frame...
java
private void loadInstanceField(XField instanceField, Instruction obj) { if (RLE_DEBUG) { System.out.println("[loadInstanceField for field " + instanceField + " in instruction " + handle); } ValueNumberFrame frame = getFrame(); try { ValueNumber reference = frame...
[ "private", "void", "loadInstanceField", "(", "XField", "instanceField", ",", "Instruction", "obj", ")", "{", "if", "(", "RLE_DEBUG", ")", "{", "System", ".", "out", ".", "println", "(", "\"[loadInstanceField for field \"", "+", "instanceField", "+", "\" in instruc...
Load an instance field. @param instanceField the field @param obj the Instruction loading the field
[ "Load", "an", "instance", "field", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java#L685-L726
59,866
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java
ValueNumberFrameModelingVisitor.loadStaticField
private void loadStaticField(XField staticField, Instruction obj) { if (RLE_DEBUG) { System.out.println("[loadStaticField for field " + staticField + " in instruction " + handle); } ValueNumberFrame frame = getFrame(); AvailableLoad availableLoad = new AvailableLoad(staticF...
java
private void loadStaticField(XField staticField, Instruction obj) { if (RLE_DEBUG) { System.out.println("[loadStaticField for field " + staticField + " in instruction " + handle); } ValueNumberFrame frame = getFrame(); AvailableLoad availableLoad = new AvailableLoad(staticF...
[ "private", "void", "loadStaticField", "(", "XField", "staticField", ",", "Instruction", "obj", ")", "{", "if", "(", "RLE_DEBUG", ")", "{", "System", ".", "out", ".", "println", "(", "\"[loadStaticField for field \"", "+", "staticField", "+", "\" in instruction \""...
Load a static field. @param staticField the field @param obj the Instruction loading the field
[ "Load", "a", "static", "field", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java#L736-L767
59,867
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java
ValueNumberFrameModelingVisitor.storeInstanceField
private void storeInstanceField(XField instanceField, Instruction obj, boolean pushStoredValue) { if (RLE_DEBUG) { System.out.println("[storeInstanceField for field " + instanceField + " in instruction " + handle); } ValueNumberFrame frame = getFrame(); int numWordsConsumed...
java
private void storeInstanceField(XField instanceField, Instruction obj, boolean pushStoredValue) { if (RLE_DEBUG) { System.out.println("[storeInstanceField for field " + instanceField + " in instruction " + handle); } ValueNumberFrame frame = getFrame(); int numWordsConsumed...
[ "private", "void", "storeInstanceField", "(", "XField", "instanceField", ",", "Instruction", "obj", ",", "boolean", "pushStoredValue", ")", "{", "if", "(", "RLE_DEBUG", ")", "{", "System", ".", "out", ".", "println", "(", "\"[storeInstanceField for field \"", "+",...
Store an instance field. @param instanceField the field @param obj the instruction which stores the field @param pushStoredValue push the stored value onto the stack (because we are modeling an inner-class field access method)
[ "Store", "an", "instance", "field", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java#L780-L818
59,868
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java
ValueNumberFrameModelingVisitor.storeStaticField
private void storeStaticField(XField staticField, Instruction obj, boolean pushStoredValue) { if (RLE_DEBUG) { System.out.println("[storeStaticField for field " + staticField + " in instruction " + handle); } ValueNumberFrame frame = getFrame(); AvailableLoad availableLoad ...
java
private void storeStaticField(XField staticField, Instruction obj, boolean pushStoredValue) { if (RLE_DEBUG) { System.out.println("[storeStaticField for field " + staticField + " in instruction " + handle); } ValueNumberFrame frame = getFrame(); AvailableLoad availableLoad ...
[ "private", "void", "storeStaticField", "(", "XField", "staticField", ",", "Instruction", "obj", ",", "boolean", "pushStoredValue", ")", "{", "if", "(", "RLE_DEBUG", ")", "{", "System", ".", "out", ".", "println", "(", "\"[storeStaticField for field \"", "+", "st...
Store a static field. @param staticField the static field @param obj the instruction which stores the field @param pushStoredValue push the stored value onto the stack (because we are modeling an inner-class field access method)
[ "Store", "a", "static", "field", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrameModelingVisitor.java#L831-L860
59,869
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/visitclass/DismantleBytecode.java
DismantleBytecode.getDottedClassConstantOperand
@SuppressFBWarnings("ES_COMPARING_STRINGS_WITH_EQ") public String getDottedClassConstantOperand() { if (dottedClassConstantOperand != null) { assert dottedClassConstantOperand != NOT_AVAILABLE; return dottedClassConstantOperand; } if (classConstantOperand == NOT_AVAIL...
java
@SuppressFBWarnings("ES_COMPARING_STRINGS_WITH_EQ") public String getDottedClassConstantOperand() { if (dottedClassConstantOperand != null) { assert dottedClassConstantOperand != NOT_AVAILABLE; return dottedClassConstantOperand; } if (classConstantOperand == NOT_AVAIL...
[ "@", "SuppressFBWarnings", "(", "\"ES_COMPARING_STRINGS_WITH_EQ\"", ")", "public", "String", "getDottedClassConstantOperand", "(", ")", "{", "if", "(", "dottedClassConstantOperand", "!=", "null", ")", "{", "assert", "dottedClassConstantOperand", "!=", "NOT_AVAILABLE", ";"...
If the current opcode has a class operand, get the associated class constant, dot-formatted
[ "If", "the", "current", "opcode", "has", "a", "class", "operand", "get", "the", "associated", "class", "constant", "dot", "-", "formatted" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/visitclass/DismantleBytecode.java#L269-L280
59,870
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/visitclass/DismantleBytecode.java
DismantleBytecode.getRefConstantOperand
@Deprecated @SuppressFBWarnings("ES_COMPARING_STRINGS_WITH_EQ") public String getRefConstantOperand() { if (refConstantOperand == NOT_AVAILABLE) { throw new IllegalStateException("getRefConstantOperand called but value not available"); } if (refConstantOperand == null) { ...
java
@Deprecated @SuppressFBWarnings("ES_COMPARING_STRINGS_WITH_EQ") public String getRefConstantOperand() { if (refConstantOperand == NOT_AVAILABLE) { throw new IllegalStateException("getRefConstantOperand called but value not available"); } if (refConstantOperand == null) { ...
[ "@", "Deprecated", "@", "SuppressFBWarnings", "(", "\"ES_COMPARING_STRINGS_WITH_EQ\"", ")", "public", "String", "getRefConstantOperand", "(", ")", "{", "if", "(", "refConstantOperand", "==", "NOT_AVAILABLE", ")", "{", "throw", "new", "IllegalStateException", "(", "\"g...
If the current opcode has a reference constant operand, get its string representation
[ "If", "the", "current", "opcode", "has", "a", "reference", "constant", "operand", "get", "its", "string", "representation" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/visitclass/DismantleBytecode.java#L286-L301
59,871
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/visitclass/DismantleBytecode.java
DismantleBytecode.getPrevOpcode
public int getPrevOpcode(int offset) { if (offset < 0) { throw new IllegalArgumentException("offset (" + offset + ") must be nonnegative"); } if (offset >= prevOpcode.length || offset > sizePrevOpcodeBuffer) { return Const.NOP; } int pos = currentPosInPrev...
java
public int getPrevOpcode(int offset) { if (offset < 0) { throw new IllegalArgumentException("offset (" + offset + ") must be nonnegative"); } if (offset >= prevOpcode.length || offset > sizePrevOpcodeBuffer) { return Const.NOP; } int pos = currentPosInPrev...
[ "public", "int", "getPrevOpcode", "(", "int", "offset", ")", "{", "if", "(", "offset", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"offset (\"", "+", "offset", "+", "\") must be nonnegative\"", ")", ";", "}", "if", "(", "offset", ...
return previous opcode; @param offset 0 for current opcode, 1 for one before that, etc.
[ "return", "previous", "opcode", ";" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/visitclass/DismantleBytecode.java#L418-L430
59,872
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/plan/AnalysisPass.java
AnalysisPass.append
public void append(DetectorFactory factory) { if (!memberSet.contains(factory)) { throw new IllegalArgumentException("Detector " + factory.getFullName() + " appended to pass it doesn't belong to"); } this.orderedFactoryList.addLast(factory); }
java
public void append(DetectorFactory factory) { if (!memberSet.contains(factory)) { throw new IllegalArgumentException("Detector " + factory.getFullName() + " appended to pass it doesn't belong to"); } this.orderedFactoryList.addLast(factory); }
[ "public", "void", "append", "(", "DetectorFactory", "factory", ")", "{", "if", "(", "!", "memberSet", ".", "contains", "(", "factory", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Detector \"", "+", "factory", ".", "getFullName", "(", "...
Append the given DetectorFactory to the end of the ordered detector list. The factory must be a member of the pass. @param factory a DetectorFactory
[ "Append", "the", "given", "DetectorFactory", "to", "the", "end", "of", "the", "ordered", "detector", "list", ".", "The", "factory", "must", "be", "a", "member", "of", "the", "pass", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/plan/AnalysisPass.java#L75-L80
59,873
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/plan/AnalysisPass.java
AnalysisPass.getUnpositionedMembers
public Set<DetectorFactory> getUnpositionedMembers() { HashSet<DetectorFactory> result = new HashSet<>(memberSet); result.removeAll(orderedFactoryList); return result; }
java
public Set<DetectorFactory> getUnpositionedMembers() { HashSet<DetectorFactory> result = new HashSet<>(memberSet); result.removeAll(orderedFactoryList); return result; }
[ "public", "Set", "<", "DetectorFactory", ">", "getUnpositionedMembers", "(", ")", "{", "HashSet", "<", "DetectorFactory", ">", "result", "=", "new", "HashSet", "<>", "(", "memberSet", ")", ";", "result", ".", "removeAll", "(", "orderedFactoryList", ")", ";", ...
Get Set of pass members which haven't been assigned a position in the pass.
[ "Get", "Set", "of", "pass", "members", "which", "haven", "t", "been", "assigned", "a", "position", "in", "the", "pass", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/plan/AnalysisPass.java#L95-L99
59,874
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/FrameDataflowAnalysis.java
FrameDataflowAnalysis.mergeInto
protected void mergeInto(FrameType other, FrameType result) throws DataflowAnalysisException { // Handle if result Frame or the other Frame is the special "TOP" value. if (result.isTop()) { // Result is the identity element, so copy the other Frame result.copyFrom(other); ...
java
protected void mergeInto(FrameType other, FrameType result) throws DataflowAnalysisException { // Handle if result Frame or the other Frame is the special "TOP" value. if (result.isTop()) { // Result is the identity element, so copy the other Frame result.copyFrom(other); ...
[ "protected", "void", "mergeInto", "(", "FrameType", "other", ",", "FrameType", "result", ")", "throws", "DataflowAnalysisException", "{", "// Handle if result Frame or the other Frame is the special \"TOP\" value.", "if", "(", "result", ".", "isTop", "(", ")", ")", "{", ...
Merge one frame into another. @param other the frame to merge with the result @param result the result frame, which is modified to be the merge of the two frames
[ "Merge", "one", "frame", "into", "another", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/FrameDataflowAnalysis.java#L184-L219
59,875
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/LockChecker.java
LockChecker.getFactAtLocation
public LockSet getFactAtLocation(Location location) throws DataflowAnalysisException { if (lockDataflow != null) { return lockDataflow.getFactAtLocation(location); } else { LockSet lockSet = cache.get(location); if (lockSet == null) { lockSet = new Loc...
java
public LockSet getFactAtLocation(Location location) throws DataflowAnalysisException { if (lockDataflow != null) { return lockDataflow.getFactAtLocation(location); } else { LockSet lockSet = cache.get(location); if (lockSet == null) { lockSet = new Loc...
[ "public", "LockSet", "getFactAtLocation", "(", "Location", "location", ")", "throws", "DataflowAnalysisException", "{", "if", "(", "lockDataflow", "!=", "null", ")", "{", "return", "lockDataflow", ".", "getFactAtLocation", "(", "location", ")", ";", "}", "else", ...
Get LockSet at given Location. @param location the Location @return the LockSet at that Location @throws DataflowAnalysisException
[ "Get", "LockSet", "at", "given", "Location", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/LockChecker.java#L101-L120
59,876
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ClassContext.java
ClassContext.getMethodAnalysis
public Object getMethodAnalysis(Class<?> analysisClass, MethodDescriptor methodDescriptor) { Map<MethodDescriptor, Object> objectMap = getObjectMap(analysisClass); return objectMap.get(methodDescriptor); }
java
public Object getMethodAnalysis(Class<?> analysisClass, MethodDescriptor methodDescriptor) { Map<MethodDescriptor, Object> objectMap = getObjectMap(analysisClass); return objectMap.get(methodDescriptor); }
[ "public", "Object", "getMethodAnalysis", "(", "Class", "<", "?", ">", "analysisClass", ",", "MethodDescriptor", "methodDescriptor", ")", "{", "Map", "<", "MethodDescriptor", ",", "Object", ">", "objectMap", "=", "getObjectMap", "(", "analysisClass", ")", ";", "r...
Retrieve a method analysis object. @param analysisClass class the method analysis object should belong to @param methodDescriptor method descriptor identifying the analyzed method @return the analysis object
[ "Retrieve", "a", "method", "analysis", "object", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ClassContext.java#L169-L172
59,877
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ClassContext.java
ClassContext.purgeMethodAnalyses
public void purgeMethodAnalyses(MethodDescriptor methodDescriptor) { Set<Map.Entry<Class<?>, Map<MethodDescriptor, Object>>> entrySet = methodAnalysisObjectMap.entrySet(); for (Iterator<Map.Entry<Class<?>, Map<MethodDescriptor, Object>>> i = entrySet.iterator(); i.hasNext();) { Map.Entry<Cla...
java
public void purgeMethodAnalyses(MethodDescriptor methodDescriptor) { Set<Map.Entry<Class<?>, Map<MethodDescriptor, Object>>> entrySet = methodAnalysisObjectMap.entrySet(); for (Iterator<Map.Entry<Class<?>, Map<MethodDescriptor, Object>>> i = entrySet.iterator(); i.hasNext();) { Map.Entry<Cla...
[ "public", "void", "purgeMethodAnalyses", "(", "MethodDescriptor", "methodDescriptor", ")", "{", "Set", "<", "Map", ".", "Entry", "<", "Class", "<", "?", ">", ",", "Map", "<", "MethodDescriptor", ",", "Object", ">", ">", ">", "entrySet", "=", "methodAnalysisO...
Purge all CFG-based method analyses for given method. @param methodDescriptor method descriptor identifying method to purge
[ "Purge", "all", "CFG", "-", "based", "method", "analyses", "for", "given", "method", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ClassContext.java#L184-L202
59,878
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ClassContext.java
ClassContext.getMethod
public Method getMethod(MethodGen methodGen) { Method[] methodList = jclass.getMethods(); for (Method method : methodList) { if (method.getName().equals(methodGen.getName()) && method.getSignature().equals(methodGen.getSignature()) && method.getAccessFlags() == methodGen....
java
public Method getMethod(MethodGen methodGen) { Method[] methodList = jclass.getMethods(); for (Method method : methodList) { if (method.getName().equals(methodGen.getName()) && method.getSignature().equals(methodGen.getSignature()) && method.getAccessFlags() == methodGen....
[ "public", "Method", "getMethod", "(", "MethodGen", "methodGen", ")", "{", "Method", "[", "]", "methodList", "=", "jclass", ".", "getMethods", "(", ")", ";", "for", "(", "Method", "method", ":", "methodList", ")", "{", "if", "(", "method", ".", "getName",...
Look up the Method represented by given MethodGen. @param methodGen a MethodGen @return the Method represented by the MethodGen
[ "Look", "up", "the", "Method", "represented", "by", "given", "MethodGen", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ClassContext.java#L226-L235
59,879
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ClassContext.java
ClassContext.getBytecodeSet
@CheckForNull static public BitSet getBytecodeSet(JavaClass clazz, Method method) { XMethod xmethod = XFactory.createXMethod(clazz, method); if (cachedBitsets().containsKey(xmethod)) { return cachedBitsets().get(xmethod); } Code code = method.getCode(); if (code ...
java
@CheckForNull static public BitSet getBytecodeSet(JavaClass clazz, Method method) { XMethod xmethod = XFactory.createXMethod(clazz, method); if (cachedBitsets().containsKey(xmethod)) { return cachedBitsets().get(xmethod); } Code code = method.getCode(); if (code ...
[ "@", "CheckForNull", "static", "public", "BitSet", "getBytecodeSet", "(", "JavaClass", "clazz", ",", "Method", "method", ")", "{", "XMethod", "xmethod", "=", "XFactory", ".", "createXMethod", "(", "clazz", ",", "method", ")", ";", "if", "(", "cachedBitsets", ...
Get a BitSet representing the bytecodes that are used in the given method. This is useful for prescreening a method for the existence of particular instructions. Because this step doesn't require building a MethodGen, it is very fast and memory-efficient. It may allow a Detector to avoid some very expensive analysis, w...
[ "Get", "a", "BitSet", "representing", "the", "bytecodes", "that", "are", "used", "in", "the", "given", "method", ".", "This", "is", "useful", "for", "prescreening", "a", "method", "for", "the", "existence", "of", "particular", "instructions", ".", "Because", ...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ClassContext.java#L428-L456
59,880
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionSet.java
ExceptionSet.duplicate
public ExceptionSet duplicate() { ExceptionSet dup = factory.createExceptionSet(); dup.exceptionSet.clear(); dup.exceptionSet.or(this.exceptionSet); dup.explicitSet.clear(); dup.explicitSet.or(this.explicitSet); dup.size = this.size; dup.universalHandler = this.un...
java
public ExceptionSet duplicate() { ExceptionSet dup = factory.createExceptionSet(); dup.exceptionSet.clear(); dup.exceptionSet.or(this.exceptionSet); dup.explicitSet.clear(); dup.explicitSet.or(this.explicitSet); dup.size = this.size; dup.universalHandler = this.un...
[ "public", "ExceptionSet", "duplicate", "(", ")", "{", "ExceptionSet", "dup", "=", "factory", ".", "createExceptionSet", "(", ")", ";", "dup", ".", "exceptionSet", ".", "clear", "(", ")", ";", "dup", ".", "exceptionSet", ".", "or", "(", "this", ".", "exce...
Return an exact copy of this object.
[ "Return", "an", "exact", "copy", "of", "this", "object", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionSet.java#L123-L134
59,881
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionSet.java
ExceptionSet.isSingleton
public boolean isSingleton(String exceptionName) { if (size != 1) { return false; } ObjectType e = iterator().next(); return e.toString().equals(exceptionName); }
java
public boolean isSingleton(String exceptionName) { if (size != 1) { return false; } ObjectType e = iterator().next(); return e.toString().equals(exceptionName); }
[ "public", "boolean", "isSingleton", "(", "String", "exceptionName", ")", "{", "if", "(", "size", "!=", "1", ")", "{", "return", "false", ";", "}", "ObjectType", "e", "=", "iterator", "(", ")", ".", "next", "(", ")", ";", "return", "e", ".", "toString...
Checks to see if the exception set is a singleton set containing just the named exception @param exceptionName (in dotted format) @return true if it is
[ "Checks", "to", "see", "if", "the", "exception", "set", "is", "a", "singleton", "set", "containing", "just", "the", "named", "exception" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionSet.java#L214-L221
59,882
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionSet.java
ExceptionSet.add
public void add(ObjectType type, boolean explicit) { int index = factory.getIndexOfType(type); if (!exceptionSet.get(index)) { ++size; } exceptionSet.set(index); if (explicit) { explicitSet.set(index); } commonSupertype = null; }
java
public void add(ObjectType type, boolean explicit) { int index = factory.getIndexOfType(type); if (!exceptionSet.get(index)) { ++size; } exceptionSet.set(index); if (explicit) { explicitSet.set(index); } commonSupertype = null; }
[ "public", "void", "add", "(", "ObjectType", "type", ",", "boolean", "explicit", ")", "{", "int", "index", "=", "factory", ".", "getIndexOfType", "(", "type", ")", ";", "if", "(", "!", "exceptionSet", ".", "get", "(", "index", ")", ")", "{", "++", "si...
Add an exception. @param type the exception type @param explicit true if the exception is explicitly declared or thrown, false if implicit
[ "Add", "an", "exception", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionSet.java#L252-L263
59,883
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionSet.java
ExceptionSet.addAll
public void addAll(ExceptionSet other) { exceptionSet.or(other.exceptionSet); explicitSet.or(other.explicitSet); size = countBits(exceptionSet); commonSupertype = null; }
java
public void addAll(ExceptionSet other) { exceptionSet.or(other.exceptionSet); explicitSet.or(other.explicitSet); size = countBits(exceptionSet); commonSupertype = null; }
[ "public", "void", "addAll", "(", "ExceptionSet", "other", ")", "{", "exceptionSet", ".", "or", "(", "other", ".", "exceptionSet", ")", ";", "explicitSet", ".", "or", "(", "other", ".", "explicitSet", ")", ";", "size", "=", "countBits", "(", "exceptionSet",...
Add all exceptions in the given set. @param other the set
[ "Add", "all", "exceptions", "in", "the", "given", "set", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionSet.java#L271-L277
59,884
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionSet.java
ExceptionSet.clear
public void clear() { exceptionSet.clear(); explicitSet.clear(); universalHandler = false; commonSupertype = null; size = 0; }
java
public void clear() { exceptionSet.clear(); explicitSet.clear(); universalHandler = false; commonSupertype = null; size = 0; }
[ "public", "void", "clear", "(", ")", "{", "exceptionSet", ".", "clear", "(", ")", ";", "explicitSet", ".", "clear", "(", ")", ";", "universalHandler", "=", "false", ";", "commonSupertype", "=", "null", ";", "size", "=", "0", ";", "}" ]
Remove all exceptions from the set.
[ "Remove", "all", "exceptions", "from", "the", "set", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionSet.java#L292-L298
59,885
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionSet.java
ExceptionSet.containsCheckedExceptions
public boolean containsCheckedExceptions() throws ClassNotFoundException { for (ThrownExceptionIterator i = iterator(); i.hasNext();) { ObjectType type = i.next(); if (!Hierarchy.isUncheckedException(type)) { return true; } } return false; ...
java
public boolean containsCheckedExceptions() throws ClassNotFoundException { for (ThrownExceptionIterator i = iterator(); i.hasNext();) { ObjectType type = i.next(); if (!Hierarchy.isUncheckedException(type)) { return true; } } return false; ...
[ "public", "boolean", "containsCheckedExceptions", "(", ")", "throws", "ClassNotFoundException", "{", "for", "(", "ThrownExceptionIterator", "i", "=", "iterator", "(", ")", ";", "i", ".", "hasNext", "(", ")", ";", ")", "{", "ObjectType", "type", "=", "i", "."...
Return whether or not the set contains any checked exceptions.
[ "Return", "whether", "or", "not", "the", "set", "contains", "any", "checked", "exceptions", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionSet.java#L319-L327
59,886
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionSet.java
ExceptionSet.containsExplicitExceptions
public boolean containsExplicitExceptions() { for (ThrownExceptionIterator i = iterator(); i.hasNext();) { i.next(); if (i.isExplicit()) { return true; } } return false; }
java
public boolean containsExplicitExceptions() { for (ThrownExceptionIterator i = iterator(); i.hasNext();) { i.next(); if (i.isExplicit()) { return true; } } return false; }
[ "public", "boolean", "containsExplicitExceptions", "(", ")", "{", "for", "(", "ThrownExceptionIterator", "i", "=", "iterator", "(", ")", ";", "i", ".", "hasNext", "(", ")", ";", ")", "{", "i", ".", "next", "(", ")", ";", "if", "(", "i", ".", "isExpli...
Return whether or not the set contains any explicit exceptions.
[ "Return", "whether", "or", "not", "the", "set", "contains", "any", "explicit", "exceptions", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionSet.java#L332-L340
59,887
spotbugs/spotbugs
spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/GUISaveState.java
GUISaveState.fileReused
public void fileReused(File f) { if (!recentFiles.contains(f)) { throw new IllegalStateException("Selected a recent project that doesn't exist?"); } else { recentFiles.remove(f); recentFiles.add(f); } }
java
public void fileReused(File f) { if (!recentFiles.contains(f)) { throw new IllegalStateException("Selected a recent project that doesn't exist?"); } else { recentFiles.remove(f); recentFiles.add(f); } }
[ "public", "void", "fileReused", "(", "File", "f", ")", "{", "if", "(", "!", "recentFiles", ".", "contains", "(", "f", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Selected a recent project that doesn't exist?\"", ")", ";", "}", "else", "{", ...
This should be the method called to add a reused file for the recent menu.
[ "This", "should", "be", "the", "method", "called", "to", "add", "a", "reused", "file", "for", "the", "recent", "menu", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/GUISaveState.java#L318-L325
59,888
spotbugs/spotbugs
spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/GUISaveState.java
GUISaveState.fileNotFound
public void fileNotFound(File f) { if (!recentFiles.contains(f)) { throw new IllegalStateException("Well no wonder it wasn't found, its not in the list."); } else { recentFiles.remove(f); } }
java
public void fileNotFound(File f) { if (!recentFiles.contains(f)) { throw new IllegalStateException("Well no wonder it wasn't found, its not in the list."); } else { recentFiles.remove(f); } }
[ "public", "void", "fileNotFound", "(", "File", "f", ")", "{", "if", "(", "!", "recentFiles", ".", "contains", "(", "f", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Well no wonder it wasn't found, its not in the list.\"", ")", ";", "}", "else"...
Call to remove a file from the list. @param f
[ "Call", "to", "remove", "a", "file", "from", "the", "list", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/GUISaveState.java#L352-L359
59,889
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Edge.java
Edge.compareTo
@Override public int compareTo(Edge other) { int cmp = super.compareTo(other); if (cmp != 0) { return cmp; } return type - other.type; }
java
@Override public int compareTo(Edge other) { int cmp = super.compareTo(other); if (cmp != 0) { return cmp; } return type - other.type; }
[ "@", "Override", "public", "int", "compareTo", "(", "Edge", "other", ")", "{", "int", "cmp", "=", "super", ".", "compareTo", "(", "other", ")", ";", "if", "(", "cmp", "!=", "0", ")", "{", "return", "cmp", ";", "}", "return", "type", "-", "other", ...
Compare with other edge.
[ "Compare", "with", "other", "edge", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Edge.java#L148-L155
59,890
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Edge.java
Edge.formatAsString
public String formatAsString(boolean reverse) { BasicBlock source = getSource(); BasicBlock target = getTarget(); StringBuilder buf = new StringBuilder(); buf.append(reverse ? "REVERSE_EDGE(" : "EDGE("); buf.append(getLabel()); buf.append(") type "); buf.append(e...
java
public String formatAsString(boolean reverse) { BasicBlock source = getSource(); BasicBlock target = getTarget(); StringBuilder buf = new StringBuilder(); buf.append(reverse ? "REVERSE_EDGE(" : "EDGE("); buf.append(getLabel()); buf.append(") type "); buf.append(e...
[ "public", "String", "formatAsString", "(", "boolean", "reverse", ")", "{", "BasicBlock", "source", "=", "getSource", "(", ")", ";", "BasicBlock", "target", "=", "getTarget", "(", ")", ";", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", ...
Return a string representation of the edge.
[ "Return", "a", "string", "representation", "of", "the", "edge", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Edge.java#L195-L235
59,891
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Edge.java
Edge.stringToEdgeType
public static @Type int stringToEdgeType(String s) { s = s.toUpperCase(Locale.ENGLISH); if ("FALL_THROUGH".equals(s)) { return FALL_THROUGH_EDGE; } else if ("IFCMP".equals(s)) { return IFCMP_EDGE; } else if ("SWITCH".equals(s)) { return SWITCH_EDG...
java
public static @Type int stringToEdgeType(String s) { s = s.toUpperCase(Locale.ENGLISH); if ("FALL_THROUGH".equals(s)) { return FALL_THROUGH_EDGE; } else if ("IFCMP".equals(s)) { return IFCMP_EDGE; } else if ("SWITCH".equals(s)) { return SWITCH_EDG...
[ "public", "static", "@", "Type", "int", "stringToEdgeType", "(", "String", "s", ")", "{", "s", "=", "s", ".", "toUpperCase", "(", "Locale", ".", "ENGLISH", ")", ";", "if", "(", "\"FALL_THROUGH\"", ".", "equals", "(", "s", ")", ")", "{", "return", "FA...
Get numeric edge type from string representation.
[ "Get", "numeric", "edge", "type", "from", "string", "representation", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Edge.java#L277-L312
59,892
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/JavaVersion.java
JavaVersion.isSameOrNewerThan
public boolean isSameOrNewerThan(JavaVersion other) { return this.major > other.major || (this.major == other.major && this.minor >= other.minor); }
java
public boolean isSameOrNewerThan(JavaVersion other) { return this.major > other.major || (this.major == other.major && this.minor >= other.minor); }
[ "public", "boolean", "isSameOrNewerThan", "(", "JavaVersion", "other", ")", "{", "return", "this", ".", "major", ">", "other", ".", "major", "||", "(", "this", ".", "major", "==", "other", ".", "major", "&&", "this", ".", "minor", ">=", "other", ".", "...
Return whether the Java version represented by this object is at least as recent as the one given. @param other another JavaVersion @return true if this Java version is at least as recent as the one given
[ "Return", "whether", "the", "Java", "version", "represented", "by", "this", "object", "is", "at", "least", "as", "recent", "as", "the", "one", "given", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/JavaVersion.java#L155-L157
59,893
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierAnnotationLookupResult.java
TypeQualifierAnnotationLookupResult.getEffectiveTypeQualifierAnnotation
public @CheckForNull TypeQualifierAnnotation getEffectiveTypeQualifierAnnotation() { boolean firstPartialResult = true; TypeQualifierAnnotation effective = null; for (PartialResult partialResult : partialResultList) { if (firstPartialResult) { effective = partial...
java
public @CheckForNull TypeQualifierAnnotation getEffectiveTypeQualifierAnnotation() { boolean firstPartialResult = true; TypeQualifierAnnotation effective = null; for (PartialResult partialResult : partialResultList) { if (firstPartialResult) { effective = partial...
[ "public", "@", "CheckForNull", "TypeQualifierAnnotation", "getEffectiveTypeQualifierAnnotation", "(", ")", "{", "boolean", "firstPartialResult", "=", "true", ";", "TypeQualifierAnnotation", "effective", "=", "null", ";", "for", "(", "PartialResult", "partialResult", ":", ...
Get the effective TypeQualifierAnnotation. @return the effective TypeQualifierAnnotation, or null if no effective TypeQualifierAnnotation can be found
[ "Get", "the", "effective", "TypeQualifierAnnotation", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierAnnotationLookupResult.java#L95-L110
59,894
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java
FindBugs2.clearCaches
protected void clearCaches() { DescriptorFactory.clearInstance(); ObjectTypeFactory.clearInstance(); TypeQualifierApplications.clearInstance(); TypeQualifierAnnotation.clearInstance(); TypeQualifierValue.clearInstance(); // Make sure the codebases on the classpath are clo...
java
protected void clearCaches() { DescriptorFactory.clearInstance(); ObjectTypeFactory.clearInstance(); TypeQualifierApplications.clearInstance(); TypeQualifierAnnotation.clearInstance(); TypeQualifierValue.clearInstance(); // Make sure the codebases on the classpath are clo...
[ "protected", "void", "clearCaches", "(", ")", "{", "DescriptorFactory", ".", "clearInstance", "(", ")", ";", "ObjectTypeFactory", ".", "clearInstance", "(", ")", ";", "TypeQualifierApplications", ".", "clearInstance", "(", ")", ";", "TypeQualifierAnnotation", ".", ...
Protected to allow Eclipse plugin remember some cache data for later reuse
[ "Protected", "to", "allow", "Eclipse", "plugin", "remember", "some", "cache", "data", "for", "later", "reuse" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java#L312-L322
59,895
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java
FindBugs2.registerBuiltInAnalysisEngines
public static void registerBuiltInAnalysisEngines(IAnalysisCache analysisCache) { new edu.umd.cs.findbugs.classfile.engine.EngineRegistrar().registerAnalysisEngines(analysisCache); new edu.umd.cs.findbugs.classfile.engine.asm.EngineRegistrar().registerAnalysisEngines(analysisCache); new edu.umd....
java
public static void registerBuiltInAnalysisEngines(IAnalysisCache analysisCache) { new edu.umd.cs.findbugs.classfile.engine.EngineRegistrar().registerAnalysisEngines(analysisCache); new edu.umd.cs.findbugs.classfile.engine.asm.EngineRegistrar().registerAnalysisEngines(analysisCache); new edu.umd....
[ "public", "static", "void", "registerBuiltInAnalysisEngines", "(", "IAnalysisCache", "analysisCache", ")", "{", "new", "edu", ".", "umd", ".", "cs", ".", "findbugs", ".", "classfile", ".", "engine", ".", "EngineRegistrar", "(", ")", ".", "registerAnalysisEngines",...
Register the "built-in" analysis engines with given IAnalysisCache. @param analysisCache an IAnalysisCache
[ "Register", "the", "built", "-", "in", "analysis", "engines", "with", "given", "IAnalysisCache", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java#L606-L610
59,896
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java
FindBugs2.registerPluginAnalysisEngines
public static void registerPluginAnalysisEngines(DetectorFactoryCollection detectorFactoryCollection, IAnalysisCache analysisCache) throws IOException { for (Iterator<Plugin> i = detectorFactoryCollection.pluginIterator(); i.hasNext();) { Plugin plugin = i.next(); Class<? ex...
java
public static void registerPluginAnalysisEngines(DetectorFactoryCollection detectorFactoryCollection, IAnalysisCache analysisCache) throws IOException { for (Iterator<Plugin> i = detectorFactoryCollection.pluginIterator(); i.hasNext();) { Plugin plugin = i.next(); Class<? ex...
[ "public", "static", "void", "registerPluginAnalysisEngines", "(", "DetectorFactoryCollection", "detectorFactoryCollection", ",", "IAnalysisCache", "analysisCache", ")", "throws", "IOException", "{", "for", "(", "Iterator", "<", "Plugin", ">", "i", "=", "detectorFactoryCol...
Register all of the analysis engines defined in the plugins contained in a DetectorFactoryCollection with an IAnalysisCache. @param detectorFactoryCollection a DetectorFactoryCollection @param analysisCache an IAnalysisCache @throws IOException
[ "Register", "all", "of", "the", "analysis", "engines", "defined", "in", "the", "plugins", "contained", "in", "a", "DetectorFactoryCollection", "with", "an", "IAnalysisCache", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java#L622-L645
59,897
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java
FindBugs2.buildClassPath
private void buildClassPath() throws InterruptedException, IOException, CheckedAnalysisException { IClassPathBuilder builder = classFactory.createClassPathBuilder(bugReporter); { HashSet<String> seen = new HashSet<>(); for (String path : project.getFileArray()) { ...
java
private void buildClassPath() throws InterruptedException, IOException, CheckedAnalysisException { IClassPathBuilder builder = classFactory.createClassPathBuilder(bugReporter); { HashSet<String> seen = new HashSet<>(); for (String path : project.getFileArray()) { ...
[ "private", "void", "buildClassPath", "(", ")", "throws", "InterruptedException", ",", "IOException", ",", "CheckedAnalysisException", "{", "IClassPathBuilder", "builder", "=", "classFactory", ".", "createClassPathBuilder", "(", "bugReporter", ")", ";", "{", "HashSet", ...
Build the classpath from project codebases and system codebases. @throws InterruptedException if the analysis thread is interrupted @throws IOException if an I/O error occurs @throws CheckedAnalysisException
[ "Build", "the", "classpath", "from", "project", "codebases", "and", "system", "codebases", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java#L656-L702
59,898
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java
FindBugs2.configureAnalysisFeatures
private void configureAnalysisFeatures() { for (AnalysisFeatureSetting setting : analysisOptions.analysisFeatureSettingList) { setting.configure(AnalysisContext.currentAnalysisContext()); } AnalysisContext.currentAnalysisContext().setBoolProperty(AnalysisFeatures.MERGE_SIMILAR_WARNIN...
java
private void configureAnalysisFeatures() { for (AnalysisFeatureSetting setting : analysisOptions.analysisFeatureSettingList) { setting.configure(AnalysisContext.currentAnalysisContext()); } AnalysisContext.currentAnalysisContext().setBoolProperty(AnalysisFeatures.MERGE_SIMILAR_WARNIN...
[ "private", "void", "configureAnalysisFeatures", "(", ")", "{", "for", "(", "AnalysisFeatureSetting", "setting", ":", "analysisOptions", ".", "analysisFeatureSettingList", ")", "{", "setting", ".", "configure", "(", "AnalysisContext", ".", "currentAnalysisContext", "(", ...
Configure analysis feature settings.
[ "Configure", "analysis", "feature", "settings", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java#L883-L889
59,899
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java
FindBugs2.createExecutionPlan
private void createExecutionPlan() throws OrderingConstraintException { executionPlan = new ExecutionPlan(); // Use user preferences to decide which detectors are enabled. DetectorFactoryChooser detectorFactoryChooser = new DetectorFactoryChooser() { HashSet<DetectorFactory> forcedE...
java
private void createExecutionPlan() throws OrderingConstraintException { executionPlan = new ExecutionPlan(); // Use user preferences to decide which detectors are enabled. DetectorFactoryChooser detectorFactoryChooser = new DetectorFactoryChooser() { HashSet<DetectorFactory> forcedE...
[ "private", "void", "createExecutionPlan", "(", ")", "throws", "OrderingConstraintException", "{", "executionPlan", "=", "new", "ExecutionPlan", "(", ")", ";", "// Use user preferences to decide which detectors are enabled.", "DetectorFactoryChooser", "detectorFactoryChooser", "="...
Create an execution plan. @throws OrderingConstraintException if the detector ordering constraints are inconsistent
[ "Create", "an", "execution", "plan", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java#L897-L943