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
partition
stringclasses
1 value
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java
FindBugs2.logRecoverableException
private void logRecoverableException(ClassDescriptor classDescriptor, Detector2 detector, Throwable e) { bugReporter.logError( "Exception analyzing " + classDescriptor.toDottedClassName() + " using detector " + detector.getDetectorClassName(), e); }
java
private void logRecoverableException(ClassDescriptor classDescriptor, Detector2 detector, Throwable e) { bugReporter.logError( "Exception analyzing " + classDescriptor.toDottedClassName() + " using detector " + detector.getDetectorClassName(), e); }
[ "private", "void", "logRecoverableException", "(", "ClassDescriptor", "classDescriptor", ",", "Detector2", "detector", ",", "Throwable", "e", ")", "{", "bugReporter", ".", "logError", "(", "\"Exception analyzing \"", "+", "classDescriptor", ".", "toDottedClassName", "("...
Report an exception that occurred while analyzing a class with a detector. @param classDescriptor class being analyzed @param detector detector doing the analysis @param e the exception
[ "Report", "an", "exception", "that", "occurred", "while", "analyzing", "a", "class", "with", "a", "detector", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java#L1159-L1163
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/util/Util.java
Util.newSetFromMap
public static <E> Set<E> newSetFromMap(Map<E, Boolean> m) { return new SetFromMap<>(m); }
java
public static <E> Set<E> newSetFromMap(Map<E, Boolean> m) { return new SetFromMap<>(m); }
[ "public", "static", "<", "E", ">", "Set", "<", "E", ">", "newSetFromMap", "(", "Map", "<", "E", ",", "Boolean", ">", "m", ")", "{", "return", "new", "SetFromMap", "<>", "(", "m", ")", ";", "}" ]
Duplication 1.6 functionality of Collections.newSetFromMap
[ "Duplication", "1", ".", "6", "functionality", "of", "Collections", ".", "newSetFromMap" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/util/Util.java#L474-L476
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/graph/AbstractDepthFirstSearch.java
AbstractDepthFirstSearch.getNextSearchTreeRoot
protected VertexType getNextSearchTreeRoot() { // FIXME: slow linear search, should improve for (Iterator<VertexType> i = graph.vertexIterator(); i.hasNext();) { VertexType vertex = i.next(); if (visitMe(vertex)) { return vertex; } } re...
java
protected VertexType getNextSearchTreeRoot() { // FIXME: slow linear search, should improve for (Iterator<VertexType> i = graph.vertexIterator(); i.hasNext();) { VertexType vertex = i.next(); if (visitMe(vertex)) { return vertex; } } re...
[ "protected", "VertexType", "getNextSearchTreeRoot", "(", ")", "{", "// FIXME: slow linear search, should improve", "for", "(", "Iterator", "<", "VertexType", ">", "i", "=", "graph", ".", "vertexIterator", "(", ")", ";", "i", ".", "hasNext", "(", ")", ";", ")", ...
Choose the next search tree root. By default, this method just scans for a WHITE vertex. Subclasses may override this method in order to choose which vertices are used as search tree roots. @return the next search tree root
[ "Choose", "the", "next", "search", "tree", "root", ".", "By", "default", "this", "method", "just", "scans", "for", "a", "WHITE", "vertex", ".", "Subclasses", "may", "override", "this", "method", "in", "order", "to", "choose", "which", "vertices", "are", "u...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/graph/AbstractDepthFirstSearch.java#L137-L146
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/graph/AbstractDepthFirstSearch.java
AbstractDepthFirstSearch.classifyUnknownEdges
private void classifyUnknownEdges() { Iterator<EdgeType> edgeIter = graph.edgeIterator(); while (edgeIter.hasNext()) { EdgeType edge = edgeIter.next(); int dfsEdgeType = getDFSEdgeType(edge); if (dfsEdgeType == UNKNOWN_EDGE) { int srcDiscoveryTime = ge...
java
private void classifyUnknownEdges() { Iterator<EdgeType> edgeIter = graph.edgeIterator(); while (edgeIter.hasNext()) { EdgeType edge = edgeIter.next(); int dfsEdgeType = getDFSEdgeType(edge); if (dfsEdgeType == UNKNOWN_EDGE) { int srcDiscoveryTime = ge...
[ "private", "void", "classifyUnknownEdges", "(", ")", "{", "Iterator", "<", "EdgeType", ">", "edgeIter", "=", "graph", ".", "edgeIterator", "(", ")", ";", "while", "(", "edgeIter", ".", "hasNext", "(", ")", ")", "{", "EdgeType", "edge", "=", "edgeIter", "...
Classify CROSS and FORWARD edges
[ "Classify", "CROSS", "and", "FORWARD", "edges" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/graph/AbstractDepthFirstSearch.java#L364-L386
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/TypeFrameModelingVisitor.java
TypeFrameModelingVisitor.consumeStack
protected void consumeStack(Instruction ins) { ConstantPoolGen cpg = getCPG(); TypeFrame frame = getFrame(); int numWordsConsumed = ins.consumeStack(cpg); if (numWordsConsumed == Const.UNPREDICTABLE) { throw new InvalidBytecodeException("Unpredictable stack consumption for "...
java
protected void consumeStack(Instruction ins) { ConstantPoolGen cpg = getCPG(); TypeFrame frame = getFrame(); int numWordsConsumed = ins.consumeStack(cpg); if (numWordsConsumed == Const.UNPREDICTABLE) { throw new InvalidBytecodeException("Unpredictable stack consumption for "...
[ "protected", "void", "consumeStack", "(", "Instruction", "ins", ")", "{", "ConstantPoolGen", "cpg", "=", "getCPG", "(", ")", ";", "TypeFrame", "frame", "=", "getFrame", "(", ")", ";", "int", "numWordsConsumed", "=", "ins", ".", "consumeStack", "(", "cpg", ...
Consume stack. This is a convenience method for instructions where the types of popped operands can be ignored.
[ "Consume", "stack", ".", "This", "is", "a", "convenience", "method", "for", "instructions", "where", "the", "types", "of", "popped", "operands", "can", "be", "ignored", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/TypeFrameModelingVisitor.java#L214-L232
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/TypeFrameModelingVisitor.java
TypeFrameModelingVisitor.pushReturnType
protected void pushReturnType(InvokeInstruction ins) { ConstantPoolGen cpg = getCPG(); Type type = ins.getType(cpg); if (type.getType() != Const.T_VOID) { pushValue(type); } }
java
protected void pushReturnType(InvokeInstruction ins) { ConstantPoolGen cpg = getCPG(); Type type = ins.getType(cpg); if (type.getType() != Const.T_VOID) { pushValue(type); } }
[ "protected", "void", "pushReturnType", "(", "InvokeInstruction", "ins", ")", "{", "ConstantPoolGen", "cpg", "=", "getCPG", "(", ")", ";", "Type", "type", "=", "ins", ".", "getType", "(", "cpg", ")", ";", "if", "(", "type", ".", "getType", "(", ")", "!=...
Helper for pushing the return type of an invoke instruction.
[ "Helper", "for", "pushing", "the", "return", "type", "of", "an", "invoke", "instruction", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/TypeFrameModelingVisitor.java#L258-L264
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/TypeFrameModelingVisitor.java
TypeFrameModelingVisitor.modelNormalInstruction
@Override public void modelNormalInstruction(Instruction ins, int numWordsConsumed, int numWordsProduced) { if (VERIFY_INTEGRITY) { if (numWordsProduced > 0) { throw new InvalidBytecodeException("missing visitor method for " + ins); } } super.modelNorm...
java
@Override public void modelNormalInstruction(Instruction ins, int numWordsConsumed, int numWordsProduced) { if (VERIFY_INTEGRITY) { if (numWordsProduced > 0) { throw new InvalidBytecodeException("missing visitor method for " + ins); } } super.modelNorm...
[ "@", "Override", "public", "void", "modelNormalInstruction", "(", "Instruction", "ins", ",", "int", "numWordsConsumed", ",", "int", "numWordsProduced", ")", "{", "if", "(", "VERIFY_INTEGRITY", ")", "{", "if", "(", "numWordsProduced", ">", "0", ")", "{", "throw...
This is overridden only to ensure that we don't rely on the base class to handle instructions that produce stack operands.
[ "This", "is", "overridden", "only", "to", "ensure", "that", "we", "don", "t", "rely", "on", "the", "base", "class", "to", "handle", "instructions", "that", "produce", "stack", "operands", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/TypeFrameModelingVisitor.java#L270-L278
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Dataflow.java
Dataflow.logicalPredecessorEdgeIterator
private Iterator<Edge> logicalPredecessorEdgeIterator(BasicBlock block) { return isForwards ? cfg.incomingEdgeIterator(block) : cfg.outgoingEdgeIterator(block); }
java
private Iterator<Edge> logicalPredecessorEdgeIterator(BasicBlock block) { return isForwards ? cfg.incomingEdgeIterator(block) : cfg.outgoingEdgeIterator(block); }
[ "private", "Iterator", "<", "Edge", ">", "logicalPredecessorEdgeIterator", "(", "BasicBlock", "block", ")", "{", "return", "isForwards", "?", "cfg", ".", "incomingEdgeIterator", "(", "block", ")", ":", "cfg", ".", "outgoingEdgeIterator", "(", "block", ")", ";", ...
Return an Iterator over edges that connect given block to its logical predecessors. For forward analyses, this is the incoming edges. For backward analyses, this is the outgoing edges.
[ "Return", "an", "Iterator", "over", "edges", "that", "connect", "given", "block", "to", "its", "logical", "predecessors", ".", "For", "forward", "analyses", "this", "is", "the", "incoming", "edges", ".", "For", "backward", "analyses", "this", "is", "the", "o...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Dataflow.java#L549-L551
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/detect/DumbMethods.java
DumbMethods.stackEntryThatMustBeNonnegative
private int stackEntryThatMustBeNonnegative(int seen) { switch (seen) { case Const.INVOKEINTERFACE: if ("java/util/List".equals(getClassConstantOperand())) { return getStackEntryOfListCallThatMustBeNonnegative(); } break; case Const.INVOKEVIRTU...
java
private int stackEntryThatMustBeNonnegative(int seen) { switch (seen) { case Const.INVOKEINTERFACE: if ("java/util/List".equals(getClassConstantOperand())) { return getStackEntryOfListCallThatMustBeNonnegative(); } break; case Const.INVOKEVIRTU...
[ "private", "int", "stackEntryThatMustBeNonnegative", "(", "int", "seen", ")", "{", "switch", "(", "seen", ")", "{", "case", "Const", ".", "INVOKEINTERFACE", ":", "if", "(", "\"java/util/List\"", ".", "equals", "(", "getClassConstantOperand", "(", ")", ")", ")"...
Return index of stack entry that must be nonnegative. Return -1 if no stack entry is required to be nonnegative.
[ "Return", "index", "of", "stack", "entry", "that", "must", "be", "nonnegative", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/DumbMethods.java#L1427-L1461
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/detect/DumbMethods.java
DumbMethods.flush
private void flush() { if (pendingAbsoluteValueBug != null) { absoluteValueAccumulator.accumulateBug(pendingAbsoluteValueBug, pendingAbsoluteValueBugSourceLine); pendingAbsoluteValueBug = null; pendingAbsoluteValueBugSourceLine = null; } accumulator.reportAcc...
java
private void flush() { if (pendingAbsoluteValueBug != null) { absoluteValueAccumulator.accumulateBug(pendingAbsoluteValueBug, pendingAbsoluteValueBugSourceLine); pendingAbsoluteValueBug = null; pendingAbsoluteValueBugSourceLine = null; } accumulator.reportAcc...
[ "private", "void", "flush", "(", ")", "{", "if", "(", "pendingAbsoluteValueBug", "!=", "null", ")", "{", "absoluteValueAccumulator", ".", "accumulateBug", "(", "pendingAbsoluteValueBug", ",", "pendingAbsoluteValueBugSourceLine", ")", ";", "pendingAbsoluteValueBug", "=",...
Flush out cached state at the end of a method.
[ "Flush", "out", "cached", "state", "at", "the", "end", "of", "a", "method", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/DumbMethods.java#L1519-L1563
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BasicBlock.java
BasicBlock.isNullCheck
public boolean isNullCheck() { // Null check blocks must be exception throwers, // and are always empty. (The only kind of non-empty // exception throwing block is one terminated by an ATHROW). if (!isExceptionThrower() || getFirstInstruction() != null) { return false; ...
java
public boolean isNullCheck() { // Null check blocks must be exception throwers, // and are always empty. (The only kind of non-empty // exception throwing block is one terminated by an ATHROW). if (!isExceptionThrower() || getFirstInstruction() != null) { return false; ...
[ "public", "boolean", "isNullCheck", "(", ")", "{", "// Null check blocks must be exception throwers,", "// and are always empty. (The only kind of non-empty", "// exception throwing block is one terminated by an ATHROW).", "if", "(", "!", "isExceptionThrower", "(", ")", "||", "getFir...
Return whether or not this block is a null check.
[ "Return", "whether", "or", "not", "this", "block", "is", "a", "null", "check", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BasicBlock.java#L177-L186
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BasicBlock.java
BasicBlock.getSuccessorOf
public @CheckForNull InstructionHandle getSuccessorOf(InstructionHandle handle) { if (VERIFY_INTEGRITY && !containsInstruction(handle)) { throw new IllegalStateException(); } return handle == lastInstruction ? null : handle.getNext(); }
java
public @CheckForNull InstructionHandle getSuccessorOf(InstructionHandle handle) { if (VERIFY_INTEGRITY && !containsInstruction(handle)) { throw new IllegalStateException(); } return handle == lastInstruction ? null : handle.getNext(); }
[ "public", "@", "CheckForNull", "InstructionHandle", "getSuccessorOf", "(", "InstructionHandle", "handle", ")", "{", "if", "(", "VERIFY_INTEGRITY", "&&", "!", "containsInstruction", "(", "handle", ")", ")", "{", "throw", "new", "IllegalStateException", "(", ")", ";...
Get the successor of given instruction within the basic block. @param handle the instruction @return the instruction's successor, or null if the instruction is the last in the basic block
[ "Get", "the", "successor", "of", "given", "instruction", "within", "the", "basic", "block", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BasicBlock.java#L210-L216
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BasicBlock.java
BasicBlock.getPredecessorOf
public InstructionHandle getPredecessorOf(InstructionHandle handle) { if (VERIFY_INTEGRITY && !containsInstruction(handle)) { throw new IllegalStateException(); } return handle == firstInstruction ? null : handle.getPrev(); }
java
public InstructionHandle getPredecessorOf(InstructionHandle handle) { if (VERIFY_INTEGRITY && !containsInstruction(handle)) { throw new IllegalStateException(); } return handle == firstInstruction ? null : handle.getPrev(); }
[ "public", "InstructionHandle", "getPredecessorOf", "(", "InstructionHandle", "handle", ")", "{", "if", "(", "VERIFY_INTEGRITY", "&&", "!", "containsInstruction", "(", "handle", ")", ")", "{", "throw", "new", "IllegalStateException", "(", ")", ";", "}", "return", ...
Get the predecessor of given instruction within the basic block. @param handle the instruction @return the instruction's predecessor, or null if the instruction is the first in the basic block
[ "Get", "the", "predecessor", "of", "given", "instruction", "within", "the", "basic", "block", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BasicBlock.java#L226-L231
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BasicBlock.java
BasicBlock.addInstruction
public void addInstruction(InstructionHandle handle) { if (firstInstruction == null) { firstInstruction = lastInstruction = handle; } else { if (VERIFY_INTEGRITY && handle != lastInstruction.getNext()) { throw new IllegalStateException("Adding non-consecutive inst...
java
public void addInstruction(InstructionHandle handle) { if (firstInstruction == null) { firstInstruction = lastInstruction = handle; } else { if (VERIFY_INTEGRITY && handle != lastInstruction.getNext()) { throw new IllegalStateException("Adding non-consecutive inst...
[ "public", "void", "addInstruction", "(", "InstructionHandle", "handle", ")", "{", "if", "(", "firstInstruction", "==", "null", ")", "{", "firstInstruction", "=", "lastInstruction", "=", "handle", ";", "}", "else", "{", "if", "(", "VERIFY_INTEGRITY", "&&", "han...
Add an InstructionHandle to the basic block. @param handle the InstructionHandle
[ "Add", "an", "InstructionHandle", "to", "the", "basic", "block", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BasicBlock.java#L239-L248
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BasicBlock.java
BasicBlock.containsInstruction
public boolean containsInstruction(InstructionHandle handle) { Iterator<InstructionHandle> i = instructionIterator(); while (i.hasNext()) { if (i.next() == handle) { return true; } } return false; }
java
public boolean containsInstruction(InstructionHandle handle) { Iterator<InstructionHandle> i = instructionIterator(); while (i.hasNext()) { if (i.next() == handle) { return true; } } return false; }
[ "public", "boolean", "containsInstruction", "(", "InstructionHandle", "handle", ")", "{", "Iterator", "<", "InstructionHandle", ">", "i", "=", "instructionIterator", "(", ")", ";", "while", "(", "i", ".", "hasNext", "(", ")", ")", "{", "if", "(", "i", ".",...
Return whether or not the basic block contains the given instruction. @param handle the instruction @return true if the block contains the instruction, false otherwise
[ "Return", "whether", "or", "not", "the", "basic", "block", "contains", "the", "given", "instruction", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BasicBlock.java#L430-L438
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BasicBlock.java
BasicBlock.containsInstructionWithOffset
public boolean containsInstructionWithOffset(int offset) { Iterator<InstructionHandle> i = instructionIterator(); while (i.hasNext()) { if (i.next().getPosition() == offset) { return true; } } return false; }
java
public boolean containsInstructionWithOffset(int offset) { Iterator<InstructionHandle> i = instructionIterator(); while (i.hasNext()) { if (i.next().getPosition() == offset) { return true; } } return false; }
[ "public", "boolean", "containsInstructionWithOffset", "(", "int", "offset", ")", "{", "Iterator", "<", "InstructionHandle", ">", "i", "=", "instructionIterator", "(", ")", ";", "while", "(", "i", ".", "hasNext", "(", ")", ")", "{", "if", "(", "i", ".", "...
Return whether or not the basic block contains the instruction with the given bytecode offset. @param offset the bytecode offset @return true if the block contains an instruction with the given offset, false if it does not
[ "Return", "whether", "or", "not", "the", "basic", "block", "contains", "the", "instruction", "with", "the", "given", "bytecode", "offset", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BasicBlock.java#L449-L457
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/io/IO.java
IO.writeFile
public static void writeFile(IFile file, final FileOutput output, IProgressMonitor monitor) throws CoreException { try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); output.writeFile(bos); ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); ...
java
public static void writeFile(IFile file, final FileOutput output, IProgressMonitor monitor) throws CoreException { try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); output.writeFile(bos); ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); ...
[ "public", "static", "void", "writeFile", "(", "IFile", "file", ",", "final", "FileOutput", "output", ",", "IProgressMonitor", "monitor", ")", "throws", "CoreException", "{", "try", "{", "ByteArrayOutputStream", "bos", "=", "new", "ByteArrayOutputStream", "(", ")",...
Write the contents of a file in the Eclipse workspace. @param file the file to write to @param output the FileOutput object responsible for generating the data @param monitor a progress monitor (or null if none) @throws CoreException
[ "Write", "the", "contents", "of", "a", "file", "in", "the", "Eclipse", "workspace", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/io/IO.java#L58-L74
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/io/IO.java
IO.writeFile
public static void writeFile(final File file, final FileOutput output, final IProgressMonitor monitor) throws CoreException { try (FileOutputStream fout = new FileOutputStream(file); BufferedOutputStream bout = new BufferedOutputStream(fout)) { if (monitor != null) { ...
java
public static void writeFile(final File file, final FileOutput output, final IProgressMonitor monitor) throws CoreException { try (FileOutputStream fout = new FileOutputStream(file); BufferedOutputStream bout = new BufferedOutputStream(fout)) { if (monitor != null) { ...
[ "public", "static", "void", "writeFile", "(", "final", "File", "file", ",", "final", "FileOutput", "output", ",", "final", "IProgressMonitor", "monitor", ")", "throws", "CoreException", "{", "try", "(", "FileOutputStream", "fout", "=", "new", "FileOutputStream", ...
Write the contents of a java.io.File @param file the file to write to @param output the FileOutput object responsible for generating the data
[ "Write", "the", "contents", "of", "a", "java", ".", "io", ".", "File" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/io/IO.java#L104-L116
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java
MarkerUtil.createMarkers
public static void createMarkers(final IJavaProject javaProject, final SortedBugCollection theCollection, final ISchedulingRule rule, IProgressMonitor monitor) { if (monitor.isCanceled()) { return; } final List<MarkerParameter> bugParameters = createBugParameters(javaProject, theColl...
java
public static void createMarkers(final IJavaProject javaProject, final SortedBugCollection theCollection, final ISchedulingRule rule, IProgressMonitor monitor) { if (monitor.isCanceled()) { return; } final List<MarkerParameter> bugParameters = createBugParameters(javaProject, theColl...
[ "public", "static", "void", "createMarkers", "(", "final", "IJavaProject", "javaProject", ",", "final", "SortedBugCollection", "theCollection", ",", "final", "ISchedulingRule", "rule", ",", "IProgressMonitor", "monitor", ")", "{", "if", "(", "monitor", ".", "isCance...
Create an Eclipse marker for given BugInstance. @param javaProject the project @param monitor
[ "Create", "an", "Eclipse", "marker", "for", "given", "BugInstance", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java#L119-L145
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java
MarkerUtil.createBugParameters
public static List<MarkerParameter> createBugParameters(IJavaProject project, BugCollection theCollection, IProgressMonitor monitor) { List<MarkerParameter> bugParameters = new ArrayList<>(); if (project == null) { FindbugsPlugin.getDefault().logException(new NullPointerException...
java
public static List<MarkerParameter> createBugParameters(IJavaProject project, BugCollection theCollection, IProgressMonitor monitor) { List<MarkerParameter> bugParameters = new ArrayList<>(); if (project == null) { FindbugsPlugin.getDefault().logException(new NullPointerException...
[ "public", "static", "List", "<", "MarkerParameter", ">", "createBugParameters", "(", "IJavaProject", "project", ",", "BugCollection", "theCollection", ",", "IProgressMonitor", "monitor", ")", "{", "List", "<", "MarkerParameter", ">", "bugParameters", "=", "new", "Ar...
As a side-effect this method updates missing line information for some bugs stored in the given bug collection @param project @param theCollection @return never null
[ "As", "a", "side", "-", "effect", "this", "method", "updates", "missing", "line", "information", "for", "some", "bugs", "stored", "in", "the", "given", "bug", "collection" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java#L155-L175
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java
MarkerUtil.removeMarkers
public static void removeMarkers(IResource res) throws CoreException { // remove any markers added by our builder // This triggers resource update on IResourceChangeListener's // (BugTreeView) res.deleteMarkers(FindBugsMarker.NAME, true, IResource.DEPTH_INFINITE); if (res instanc...
java
public static void removeMarkers(IResource res) throws CoreException { // remove any markers added by our builder // This triggers resource update on IResourceChangeListener's // (BugTreeView) res.deleteMarkers(FindBugsMarker.NAME, true, IResource.DEPTH_INFINITE); if (res instanc...
[ "public", "static", "void", "removeMarkers", "(", "IResource", "res", ")", "throws", "CoreException", "{", "// remove any markers added by our builder", "// This triggers resource update on IResourceChangeListener's", "// (BugTreeView)", "res", ".", "deleteMarkers", "(", "FindBug...
Remove all FindBugs problem markers for given resource. If the given resource is project, will also clear bug collection. @param res the resource
[ "Remove", "all", "FindBugs", "problem", "markers", "for", "given", "resource", ".", "If", "the", "given", "resource", "is", "project", "will", "also", "clear", "bug", "collection", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java#L520-L529
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java
MarkerUtil.redisplayMarkers
public static void redisplayMarkers(final IJavaProject javaProject) { final IProject project = javaProject.getProject(); FindBugsJob job = new FindBugsJob("Refreshing SpotBugs markers", project) { @Override protected void runWithProgress(IProgressMonitor monitor) throws CoreExcep...
java
public static void redisplayMarkers(final IJavaProject javaProject) { final IProject project = javaProject.getProject(); FindBugsJob job = new FindBugsJob("Refreshing SpotBugs markers", project) { @Override protected void runWithProgress(IProgressMonitor monitor) throws CoreExcep...
[ "public", "static", "void", "redisplayMarkers", "(", "final", "IJavaProject", "javaProject", ")", "{", "final", "IProject", "project", "=", "javaProject", ".", "getProject", "(", ")", ";", "FindBugsJob", "job", "=", "new", "FindBugsJob", "(", "\"Refreshing SpotBug...
Attempt to redisplay FindBugs problem markers for given project. @param javaProject the project
[ "Attempt", "to", "redisplay", "FindBugs", "problem", "markers", "for", "given", "project", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java#L552-L571
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java
MarkerUtil.findBugInstanceForMarker
public static @CheckForNull BugInstance findBugInstanceForMarker(IMarker marker) { BugCollectionAndInstance bci = findBugCollectionAndInstanceForMarker(marker); if (bci == null) { return null; } return bci.bugInstance; }
java
public static @CheckForNull BugInstance findBugInstanceForMarker(IMarker marker) { BugCollectionAndInstance bci = findBugCollectionAndInstanceForMarker(marker); if (bci == null) { return null; } return bci.bugInstance; }
[ "public", "static", "@", "CheckForNull", "BugInstance", "findBugInstanceForMarker", "(", "IMarker", "marker", ")", "{", "BugCollectionAndInstance", "bci", "=", "findBugCollectionAndInstanceForMarker", "(", "marker", ")", ";", "if", "(", "bci", "==", "null", ")", "{"...
Find the BugInstance associated with given FindBugs marker. @param marker a FindBugs marker @return the BugInstance associated with the marker, or null if we can't find the BugInstance
[ "Find", "the", "BugInstance", "associated", "with", "given", "FindBugs", "marker", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java#L734-L741
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java
MarkerUtil.findBugCollectionAndInstanceForMarker
public static @CheckForNull BugCollectionAndInstance findBugCollectionAndInstanceForMarker(IMarker marker) { IResource resource = marker.getResource(); IProject project = resource.getProject(); if (project == null) { // Also shouldn't happen. FindbugsPlugin.getDefaul...
java
public static @CheckForNull BugCollectionAndInstance findBugCollectionAndInstanceForMarker(IMarker marker) { IResource resource = marker.getResource(); IProject project = resource.getProject(); if (project == null) { // Also shouldn't happen. FindbugsPlugin.getDefaul...
[ "public", "static", "@", "CheckForNull", "BugCollectionAndInstance", "findBugCollectionAndInstanceForMarker", "(", "IMarker", "marker", ")", "{", "IResource", "resource", "=", "marker", ".", "getResource", "(", ")", ";", "IProject", "project", "=", "resource", ".", ...
Find the BugCollectionAndInstance associated with given FindBugs marker. @param marker a FindBugs marker @return the BugInstance associated with the marker, or null if we can't find the BugInstance
[ "Find", "the", "BugCollectionAndInstance", "associated", "with", "given", "FindBugs", "marker", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java#L751-L809
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java
MarkerUtil.getMarkerFromSelection
public static Set<IMarker> getMarkerFromSelection(ISelection selection) { Set<IMarker> markers = new HashSet<>(); if (!(selection instanceof IStructuredSelection)) { return markers; } IStructuredSelection sSelection = (IStructuredSelection) selection; for (Iterator<?>...
java
public static Set<IMarker> getMarkerFromSelection(ISelection selection) { Set<IMarker> markers = new HashSet<>(); if (!(selection instanceof IStructuredSelection)) { return markers; } IStructuredSelection sSelection = (IStructuredSelection) selection; for (Iterator<?>...
[ "public", "static", "Set", "<", "IMarker", ">", "getMarkerFromSelection", "(", "ISelection", "selection", ")", "{", "Set", "<", "IMarker", ">", "markers", "=", "new", "HashSet", "<>", "(", ")", ";", "if", "(", "!", "(", "selection", "instanceof", "IStructu...
Fish an IMarker out of given selection. @param selection the selection @return the selected IMarker, or null if we can't find an IMarker in the selection
[ "Fish", "an", "IMarker", "out", "of", "given", "selection", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java#L823-L834
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java
MarkerUtil.getMarkerFromEditor
public static IMarker getMarkerFromEditor(ITextSelection selection, IEditorPart editor) { IResource resource = (IResource) editor.getEditorInput().getAdapter(IFile.class); IMarker[] allMarkers; if (resource != null) { allMarkers = getMarkers(resource, IResource.DEPTH_ZERO); }...
java
public static IMarker getMarkerFromEditor(ITextSelection selection, IEditorPart editor) { IResource resource = (IResource) editor.getEditorInput().getAdapter(IFile.class); IMarker[] allMarkers; if (resource != null) { allMarkers = getMarkers(resource, IResource.DEPTH_ZERO); }...
[ "public", "static", "IMarker", "getMarkerFromEditor", "(", "ITextSelection", "selection", ",", "IEditorPart", "editor", ")", "{", "IResource", "resource", "=", "(", "IResource", ")", "editor", ".", "getEditorInput", "(", ")", ".", "getAdapter", "(", "IFile", "."...
Tries to retrieve right bug marker for given selection. If there are many markers for given editor, and text selection doesn't match any of them, return null. If there is only one marker for given editor, returns this marker in any case. @param selection @param editor @return may return null
[ "Tries", "to", "retrieve", "right", "bug", "marker", "for", "given", "selection", ".", "If", "there", "are", "many", "markers", "for", "given", "editor", "and", "text", "selection", "doesn", "t", "match", "any", "of", "them", "return", "null", ".", "If", ...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java#L881-L908
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java
MarkerUtil.getMarkers
@Nonnull public static IMarker[] getMarkers(IResource fileOrFolder, int depth) { if(fileOrFolder.getType() == IResource.PROJECT) { if(!fileOrFolder.isAccessible()) { // user just closed the project decorator is working on, avoid exception here return EMPTY; ...
java
@Nonnull public static IMarker[] getMarkers(IResource fileOrFolder, int depth) { if(fileOrFolder.getType() == IResource.PROJECT) { if(!fileOrFolder.isAccessible()) { // user just closed the project decorator is working on, avoid exception here return EMPTY; ...
[ "@", "Nonnull", "public", "static", "IMarker", "[", "]", "getMarkers", "(", "IResource", "fileOrFolder", ",", "int", "depth", ")", "{", "if", "(", "fileOrFolder", ".", "getType", "(", ")", "==", "IResource", ".", "PROJECT", ")", "{", "if", "(", "!", "f...
Retrieves all the FB markers from given resource and all its descendants @param fileOrFolder @return never null (empty array if nothing there or exception happens). Exception will be logged
[ "Retrieves", "all", "the", "FB", "markers", "from", "given", "resource", "and", "all", "its", "descendants" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/reporter/MarkerUtil.java#L992-L1006
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/classify/SeverityClassificationPulldownAction.java
SeverityClassificationPulldownAction.syncMenu
private void syncMenu() { if (bugInstance != null) { BugProperty severityProperty = bugInstance.lookupProperty(BugProperty.SEVERITY); if (severityProperty != null) { try { int severity = severityProperty.getValueAsInt(); if (severit...
java
private void syncMenu() { if (bugInstance != null) { BugProperty severityProperty = bugInstance.lookupProperty(BugProperty.SEVERITY); if (severityProperty != null) { try { int severity = severityProperty.getValueAsInt(); if (severit...
[ "private", "void", "syncMenu", "(", ")", "{", "if", "(", "bugInstance", "!=", "null", ")", "{", "BugProperty", "severityProperty", "=", "bugInstance", ".", "lookupProperty", "(", "BugProperty", ".", "SEVERITY", ")", ";", "if", "(", "severityProperty", "!=", ...
Synchronize the menu with the current BugInstance.
[ "Synchronize", "the", "menu", "with", "the", "current", "BugInstance", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/classify/SeverityClassificationPulldownAction.java#L130-L153
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/classify/SeverityClassificationPulldownAction.java
SeverityClassificationPulldownAction.selectSeverity
private void selectSeverity(int severity) { // Severity is 1-based, but the menu item list is 0-based int index = severity - 1; for (int i = 0; i < severityItemList.length; ++i) { MenuItem menuItem = severityItemList[i]; menuItem.setEnabled(true); menuItem.se...
java
private void selectSeverity(int severity) { // Severity is 1-based, but the menu item list is 0-based int index = severity - 1; for (int i = 0; i < severityItemList.length; ++i) { MenuItem menuItem = severityItemList[i]; menuItem.setEnabled(true); menuItem.se...
[ "private", "void", "selectSeverity", "(", "int", "severity", ")", "{", "// Severity is 1-based, but the menu item list is 0-based", "int", "index", "=", "severity", "-", "1", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "severityItemList", ".", "length"...
Set the menu to given severity level. @param severity the severity level (1..5)
[ "Set", "the", "menu", "to", "given", "severity", "level", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/classify/SeverityClassificationPulldownAction.java#L161-L170
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/classify/SeverityClassificationPulldownAction.java
SeverityClassificationPulldownAction.resetMenuItems
private void resetMenuItems(boolean enable) { for (int i = 0; i < severityItemList.length; ++i) { MenuItem menuItem = severityItemList[i]; menuItem.setEnabled(enable); menuItem.setSelection(false); } }
java
private void resetMenuItems(boolean enable) { for (int i = 0; i < severityItemList.length; ++i) { MenuItem menuItem = severityItemList[i]; menuItem.setEnabled(enable); menuItem.setSelection(false); } }
[ "private", "void", "resetMenuItems", "(", "boolean", "enable", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "severityItemList", ".", "length", ";", "++", "i", ")", "{", "MenuItem", "menuItem", "=", "severityItemList", "[", "i", "]", ";", ...
Reset menu items so they are unchecked. @param enable true if menu items should be enabled, false if they should be disabled
[ "Reset", "menu", "items", "so", "they", "are", "unchecked", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/classify/SeverityClassificationPulldownAction.java#L179-L185
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberCache.java
ValueNumberCache.lookupOutputValues
public ValueNumber[] lookupOutputValues(Entry entry) { if (DEBUG) { System.out.println("VN cache lookup: " + entry); } ValueNumber[] result = entryToOutputMap.get(entry); if (DEBUG) { System.out.println(" result ==> " + Arrays.toString(result)); } ...
java
public ValueNumber[] lookupOutputValues(Entry entry) { if (DEBUG) { System.out.println("VN cache lookup: " + entry); } ValueNumber[] result = entryToOutputMap.get(entry); if (DEBUG) { System.out.println(" result ==> " + Arrays.toString(result)); } ...
[ "public", "ValueNumber", "[", "]", "lookupOutputValues", "(", "Entry", "entry", ")", "{", "if", "(", "DEBUG", ")", "{", "System", ".", "out", ".", "println", "(", "\"VN cache lookup: \"", "+", "entry", ")", ";", "}", "ValueNumber", "[", "]", "result", "=...
Look up cached output values for given entry. @param entry the entry @return the list of output values, or null if there is no matching entry in the cache
[ "Look", "up", "cached", "output", "values", "for", "given", "entry", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberCache.java#L120-L129
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/bcp/BindingSet.java
BindingSet.lookup
public Binding lookup(String varName) { if (varName.equals(binding.getVarName())) { return binding; } return parent != null ? parent.lookup(varName) : null; }
java
public Binding lookup(String varName) { if (varName.equals(binding.getVarName())) { return binding; } return parent != null ? parent.lookup(varName) : null; }
[ "public", "Binding", "lookup", "(", "String", "varName", ")", "{", "if", "(", "varName", ".", "equals", "(", "binding", ".", "getVarName", "(", ")", ")", ")", "{", "return", "binding", ";", "}", "return", "parent", "!=", "null", "?", "parent", ".", "...
Look for a Binding for given variable. @param varName name of the variable @return the Binding, or null if no such Binding is present in the set
[ "Look", "for", "a", "Binding", "for", "given", "variable", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/bcp/BindingSet.java#L55-L60
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/npe/IsNullValueAnalysis.java
IsNullValueAnalysis.replaceValues
private IsNullValueFrame replaceValues(IsNullValueFrame origFrame, IsNullValueFrame frame, ValueNumber replaceMe, ValueNumberFrame prevVnaFrame, ValueNumberFrame targetVnaFrame, IsNullValue replacementValue) { if (!targetVnaFrame.isValid()) { throw new IllegalArgumentException("Invalid ...
java
private IsNullValueFrame replaceValues(IsNullValueFrame origFrame, IsNullValueFrame frame, ValueNumber replaceMe, ValueNumberFrame prevVnaFrame, ValueNumberFrame targetVnaFrame, IsNullValue replacementValue) { if (!targetVnaFrame.isValid()) { throw new IllegalArgumentException("Invalid ...
[ "private", "IsNullValueFrame", "replaceValues", "(", "IsNullValueFrame", "origFrame", ",", "IsNullValueFrame", "frame", ",", "ValueNumber", "replaceMe", ",", "ValueNumberFrame", "prevVnaFrame", ",", "ValueNumberFrame", "targetVnaFrame", ",", "IsNullValue", "replacementValue",...
Update is-null information at a branch target based on information gained at a null comparison branch. @param origFrame the original is-null frame at entry to basic block @param frame the modified version of the is-null entry frame; null if the entry frame has not been modified yet @param replaceMe the ValueNumber in ...
[ "Update", "is", "-", "null", "information", "at", "a", "branch", "target", "based", "on", "information", "gained", "at", "a", "null", "comparison", "branch", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/npe/IsNullValueAnalysis.java#L841-L913
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/actions/MarkerRulerAction.java
MarkerRulerAction.obtainFindBugsMarkers
protected void obtainFindBugsMarkers() { // Delete old markers markers.clear(); if (editor == null || ruler == null) { return; } // Obtain all markers in the editor IResource resource = (IResource) editor.getEditorInput().getAdapter(IFile.class); if(r...
java
protected void obtainFindBugsMarkers() { // Delete old markers markers.clear(); if (editor == null || ruler == null) { return; } // Obtain all markers in the editor IResource resource = (IResource) editor.getEditorInput().getAdapter(IFile.class); if(r...
[ "protected", "void", "obtainFindBugsMarkers", "(", ")", "{", "// Delete old markers", "markers", ".", "clear", "(", ")", ";", "if", "(", "editor", "==", "null", "||", "ruler", "==", "null", ")", "{", "return", ";", "}", "// Obtain all markers in the editor", "...
Fills markers field with all of the FindBugs markers associated with the current line in the text editor's ruler marign.
[ "Fills", "markers", "field", "with", "all", "of", "the", "FindBugs", "markers", "associated", "with", "the", "current", "line", "in", "the", "text", "editor", "s", "ruler", "marign", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/actions/MarkerRulerAction.java#L142-L168
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/actions/MarkerRulerAction.java
MarkerRulerAction.includesRulerLine
protected boolean includesRulerLine(Position position, IDocument document) { if (position != null && ruler != null) { try { int markerLine = document.getLineOfOffset(position.getOffset()); int line = ruler.getLineOfLastMouseButtonActivity(); if (line =...
java
protected boolean includesRulerLine(Position position, IDocument document) { if (position != null && ruler != null) { try { int markerLine = document.getLineOfOffset(position.getOffset()); int line = ruler.getLineOfLastMouseButtonActivity(); if (line =...
[ "protected", "boolean", "includesRulerLine", "(", "Position", "position", ",", "IDocument", "document", ")", "{", "if", "(", "position", "!=", "null", "&&", "ruler", "!=", "null", ")", "{", "try", "{", "int", "markerLine", "=", "document", ".", "getLineOfOff...
Checks a Position in a document to see whether the line of last mouse activity falls within this region. @param position Position of the marker @param document the Document the marker resides in @return true if the last mouse click falls on the same line as the marker
[ "Checks", "a", "Position", "in", "a", "document", "to", "see", "whether", "the", "line", "of", "last", "mouse", "activity", "falls", "within", "this", "region", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/actions/MarkerRulerAction.java#L194-L207
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/actions/MarkerRulerAction.java
MarkerRulerAction.getModel
@CheckForNull protected AbstractMarkerAnnotationModel getModel() { if(editor == null) { return null; } IDocumentProvider provider = editor.getDocumentProvider(); IAnnotationModel model = provider.getAnnotationModel(editor.getEditorInput()); if (model instanceof Ab...
java
@CheckForNull protected AbstractMarkerAnnotationModel getModel() { if(editor == null) { return null; } IDocumentProvider provider = editor.getDocumentProvider(); IAnnotationModel model = provider.getAnnotationModel(editor.getEditorInput()); if (model instanceof Ab...
[ "@", "CheckForNull", "protected", "AbstractMarkerAnnotationModel", "getModel", "(", ")", "{", "if", "(", "editor", "==", "null", ")", "{", "return", "null", ";", "}", "IDocumentProvider", "provider", "=", "editor", ".", "getDocumentProvider", "(", ")", ";", "I...
Retrieves the AbstractMarkerAnnontationsModel from the editor. @return AbstractMarkerAnnotatiosnModel from the editor
[ "Retrieves", "the", "AbstractMarkerAnnontationsModel", "from", "the", "editor", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/actions/MarkerRulerAction.java#L214-L225
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/actions/MarkerRulerAction.java
MarkerRulerAction.getDocument
protected IDocument getDocument() { Assert.isNotNull(editor); IDocumentProvider provider = editor.getDocumentProvider(); return provider.getDocument(editor.getEditorInput()); }
java
protected IDocument getDocument() { Assert.isNotNull(editor); IDocumentProvider provider = editor.getDocumentProvider(); return provider.getDocument(editor.getEditorInput()); }
[ "protected", "IDocument", "getDocument", "(", ")", "{", "Assert", ".", "isNotNull", "(", "editor", ")", ";", "IDocumentProvider", "provider", "=", "editor", ".", "getDocumentProvider", "(", ")", ";", "return", "provider", ".", "getDocument", "(", "editor", "."...
Retrieves the document from the editor. @return the document from the editor
[ "Retrieves", "the", "document", "from", "the", "editor", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/actions/MarkerRulerAction.java#L232-L236
train
spotbugs/spotbugs
spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/MainFrame.java
MainFrame.setProjectChanged
public void setProjectChanged(boolean b) { if (curProject == null) { return; } if (projectChanged == b) { return; } projectChanged = b; mainFrameMenu.setSaveMenu(this); getRootPane().putClientProperty(WINDOW_MODIFIED, b); }
java
public void setProjectChanged(boolean b) { if (curProject == null) { return; } if (projectChanged == b) { return; } projectChanged = b; mainFrameMenu.setSaveMenu(this); getRootPane().putClientProperty(WINDOW_MODIFIED, b); }
[ "public", "void", "setProjectChanged", "(", "boolean", "b", ")", "{", "if", "(", "curProject", "==", "null", ")", "{", "return", ";", "}", "if", "(", "projectChanged", "==", "b", ")", "{", "return", ";", "}", "projectChanged", "=", "b", ";", "mainFrame...
Called when something in the project is changed and the change needs to be saved. This method should be called instead of using projectChanged = b.
[ "Called", "when", "something", "in", "the", "project", "is", "changed", "and", "the", "change", "needs", "to", "be", "saved", ".", "This", "method", "should", "be", "called", "instead", "of", "using", "projectChanged", "=", "b", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/MainFrame.java#L254-L268
train
spotbugs/spotbugs
spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/MainFrame.java
MainFrame.callOnClose
void callOnClose() { if (projectChanged && !SystemProperties.getBoolean("findbugs.skipSaveChangesWarning")) { Object[] options = { L10N.getLocalString("dlg.save_btn", "Save"), L10N.getLocalString("dlg.dontsave_btn", "Don't Save"), L10N.getL...
java
void callOnClose() { if (projectChanged && !SystemProperties.getBoolean("findbugs.skipSaveChangesWarning")) { Object[] options = { L10N.getLocalString("dlg.save_btn", "Save"), L10N.getLocalString("dlg.dontsave_btn", "Don't Save"), L10N.getL...
[ "void", "callOnClose", "(", ")", "{", "if", "(", "projectChanged", "&&", "!", "SystemProperties", ".", "getBoolean", "(", "\"findbugs.skipSaveChangesWarning\"", ")", ")", "{", "Object", "[", "]", "options", "=", "{", "L10N", ".", "getLocalString", "(", "\"dlg....
This method is called when the application is closing. This is either by the exit menuItem or by clicking on the window's system menu.
[ "This", "method", "is", "called", "when", "the", "application", "is", "closing", ".", "This", "is", "either", "by", "the", "exit", "menuItem", "or", "by", "clicking", "on", "the", "window", "s", "system", "menu", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/MainFrame.java#L345-L376
train
spotbugs/spotbugs
spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/MainFrame.java
MainFrame.openAnalysis
public boolean openAnalysis(File f, SaveType saveType) { if (!f.exists() || !f.canRead()) { throw new IllegalArgumentException("Can't read " + f.getPath()); } mainFrameLoadSaveHelper.prepareForFileLoad(f, saveType); mainFrameLoadSaveHelper.loadAnalysis(f); return tr...
java
public boolean openAnalysis(File f, SaveType saveType) { if (!f.exists() || !f.canRead()) { throw new IllegalArgumentException("Can't read " + f.getPath()); } mainFrameLoadSaveHelper.prepareForFileLoad(f, saveType); mainFrameLoadSaveHelper.loadAnalysis(f); return tr...
[ "public", "boolean", "openAnalysis", "(", "File", "f", ",", "SaveType", "saveType", ")", "{", "if", "(", "!", "f", ".", "exists", "(", ")", "||", "!", "f", ".", "canRead", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Can't re...
Opens the analysis. Also clears the source and summary panes. Makes comments enabled false. Sets the saveType and adds the file to the recent menu. @param f @return whether the operation was successful
[ "Opens", "the", "analysis", ".", "Also", "clears", "the", "source", "and", "summary", "panes", ".", "Makes", "comments", "enabled", "false", ".", "Sets", "the", "saveType", "and", "adds", "the", "file", "to", "the", "recent", "menu", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/MainFrame.java#L392-L401
train
spotbugs/spotbugs
spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/MainFrame.java
MainFrame.updateTitle
public void updateTitle() { Project project = getProject(); String name = project.getProjectName(); if ((name == null || "".equals(name.trim())) && saveFile != null) { name = saveFile.getAbsolutePath(); } if (name == null) { name = "";//Project.UNNAMED_PRO...
java
public void updateTitle() { Project project = getProject(); String name = project.getProjectName(); if ((name == null || "".equals(name.trim())) && saveFile != null) { name = saveFile.getAbsolutePath(); } if (name == null) { name = "";//Project.UNNAMED_PRO...
[ "public", "void", "updateTitle", "(", ")", "{", "Project", "project", "=", "getProject", "(", ")", ";", "String", "name", "=", "project", ".", "getProjectName", "(", ")", ";", "if", "(", "(", "name", "==", "null", "||", "\"\"", ".", "equals", "(", "n...
Changes the title based on curProject and saveFile.
[ "Changes", "the", "title", "based", "on", "curProject", "and", "saveFile", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/MainFrame.java#L642-L657
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugsCommandLine.java
FindBugsCommandLine.loadProject
public void loadProject(String arg) throws IOException { Project newProject = Project.readProject(arg); newProject.setConfiguration(project.getConfiguration()); project = newProject; projectLoadedFromFile = true; }
java
public void loadProject(String arg) throws IOException { Project newProject = Project.readProject(arg); newProject.setConfiguration(project.getConfiguration()); project = newProject; projectLoadedFromFile = true; }
[ "public", "void", "loadProject", "(", "String", "arg", ")", "throws", "IOException", "{", "Project", "newProject", "=", "Project", ".", "readProject", "(", "arg", ")", ";", "newProject", ".", "setConfiguration", "(", "project", ".", "getConfiguration", "(", ")...
Load given project file. @param arg name of project file @throws java.io.IOException
[ "Load", "given", "project", "file", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugsCommandLine.java#L169-L174
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/AddMessages.java
AddMessages.execute
public void execute() { Iterator<?> elementIter = XMLUtil.selectNodes(document, "/BugCollection/BugInstance").iterator(); Iterator<BugInstance> bugInstanceIter = bugCollection.iterator(); Set<String> bugTypeSet = new HashSet<>(); Set<String> bugCategorySet = new HashSet<>(); Set...
java
public void execute() { Iterator<?> elementIter = XMLUtil.selectNodes(document, "/BugCollection/BugInstance").iterator(); Iterator<BugInstance> bugInstanceIter = bugCollection.iterator(); Set<String> bugTypeSet = new HashSet<>(); Set<String> bugCategorySet = new HashSet<>(); Set...
[ "public", "void", "execute", "(", ")", "{", "Iterator", "<", "?", ">", "elementIter", "=", "XMLUtil", ".", "selectNodes", "(", "document", ",", "\"/BugCollection/BugInstance\"", ")", ".", "iterator", "(", ")", ";", "Iterator", "<", "BugInstance", ">", "bugIn...
Add messages to the dom4j tree.
[ "Add", "messages", "to", "the", "dom4j", "tree", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/AddMessages.java#L65-L106
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/AddMessages.java
AddMessages.addBugCategories
private void addBugCategories(Set<String> bugCategorySet) { Element root = document.getRootElement(); for (String category : bugCategorySet) { Element element = root.addElement("BugCategory"); element.addAttribute("category", category); Element description = element.a...
java
private void addBugCategories(Set<String> bugCategorySet) { Element root = document.getRootElement(); for (String category : bugCategorySet) { Element element = root.addElement("BugCategory"); element.addAttribute("category", category); Element description = element.a...
[ "private", "void", "addBugCategories", "(", "Set", "<", "String", ">", "bugCategorySet", ")", "{", "Element", "root", "=", "document", ".", "getRootElement", "(", ")", ";", "for", "(", "String", "category", ":", "bugCategorySet", ")", "{", "Element", "elemen...
Add BugCategory elements. @param bugCategorySet all bug categories referenced in the BugCollection
[ "Add", "BugCategory", "elements", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/AddMessages.java#L114-L136
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/AddMessages.java
AddMessages.addBugCodes
private void addBugCodes(Set<String> bugCodeSet) { Element root = document.getRootElement(); for (String bugCode : bugCodeSet) { Element element = root.addElement("BugCode"); element.addAttribute("abbrev", bugCode); Element description = element.addElement("Descriptio...
java
private void addBugCodes(Set<String> bugCodeSet) { Element root = document.getRootElement(); for (String bugCode : bugCodeSet) { Element element = root.addElement("BugCode"); element.addAttribute("abbrev", bugCode); Element description = element.addElement("Descriptio...
[ "private", "void", "addBugCodes", "(", "Set", "<", "String", ">", "bugCodeSet", ")", "{", "Element", "root", "=", "document", ".", "getRootElement", "(", ")", ";", "for", "(", "String", "bugCode", ":", "bugCodeSet", ")", "{", "Element", "element", "=", "...
Add BugCode elements. @param bugCodeSet all bug codes (abbrevs) referenced in the BugCollection
[ "Add", "BugCode", "elements", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/AddMessages.java#L144-L152
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/constant/Constant.java
Constant.merge
public static Constant merge(Constant a, Constant b) { if (!a.isConstant() || !b.isConstant()) { return NOT_CONSTANT; } if (a.value.getClass() != b.value.getClass() || !a.value.equals(b.value)) { return NOT_CONSTANT; } return a; }
java
public static Constant merge(Constant a, Constant b) { if (!a.isConstant() || !b.isConstant()) { return NOT_CONSTANT; } if (a.value.getClass() != b.value.getClass() || !a.value.equals(b.value)) { return NOT_CONSTANT; } return a; }
[ "public", "static", "Constant", "merge", "(", "Constant", "a", ",", "Constant", "b", ")", "{", "if", "(", "!", "a", ".", "isConstant", "(", ")", "||", "!", "b", ".", "isConstant", "(", ")", ")", "{", "return", "NOT_CONSTANT", ";", "}", "if", "(", ...
Merge two Constnts. @param a a StaticConstant @param b another StaticConstant @return the merge (dataflow meet) of the two Constants
[ "Merge", "two", "Constnts", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/constant/Constant.java#L105-L113
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/properties/ReportConfigurationTab.java
ReportConfigurationTab.createBugCategoriesGroup
private void createBugCategoriesGroup(Composite parent, final IProject project) { Group checkBoxGroup = new Group(parent, SWT.SHADOW_ETCHED_OUT); checkBoxGroup.setText(getMessage("property.categoriesGroup")); checkBoxGroup.setLayout(new GridLayout(1, true)); checkBoxGroup.setLayoutData(n...
java
private void createBugCategoriesGroup(Composite parent, final IProject project) { Group checkBoxGroup = new Group(parent, SWT.SHADOW_ETCHED_OUT); checkBoxGroup.setText(getMessage("property.categoriesGroup")); checkBoxGroup.setLayout(new GridLayout(1, true)); checkBoxGroup.setLayoutData(n...
[ "private", "void", "createBugCategoriesGroup", "(", "Composite", "parent", ",", "final", "IProject", "project", ")", "{", "Group", "checkBoxGroup", "=", "new", "Group", "(", "parent", ",", "SWT", ".", "SHADOW_ETCHED_OUT", ")", ";", "checkBoxGroup", ".", "setText...
Build list of bug categories to be enabled or disabled. Populates chkEnableBugCategoryList and bugCategoryList fields. @param parent control checkboxes should be added to @param project the project being configured
[ "Build", "list", "of", "bug", "categories", "to", "be", "enabled", "or", "disabled", ".", "Populates", "chkEnableBugCategoryList", "and", "bugCategoryList", "fields", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/properties/ReportConfigurationTab.java#L244-L273
train
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/properties/ReportConfigurationTab.java
ReportConfigurationTab.syncSelectedCategories
protected void syncSelectedCategories() { ProjectFilterSettings filterSettings = getCurrentProps().getFilterSettings(); for (Button checkBox : chkEnableBugCategoryList) { String category = (String) checkBox.getData(); if (checkBox.getSelection()) { filterSettings....
java
protected void syncSelectedCategories() { ProjectFilterSettings filterSettings = getCurrentProps().getFilterSettings(); for (Button checkBox : chkEnableBugCategoryList) { String category = (String) checkBox.getData(); if (checkBox.getSelection()) { filterSettings....
[ "protected", "void", "syncSelectedCategories", "(", ")", "{", "ProjectFilterSettings", "filterSettings", "=", "getCurrentProps", "(", ")", ".", "getFilterSettings", "(", ")", ";", "for", "(", "Button", "checkBox", ":", "chkEnableBugCategoryList", ")", "{", "String",...
Synchronize selected bug category checkboxes with the current user preferences.
[ "Synchronize", "selected", "bug", "category", "checkboxes", "with", "the", "current", "user", "preferences", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/properties/ReportConfigurationTab.java#L279-L290
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/util/ClassName.java
ClassName.toSlashedClassName
@SlashedClassName @SuppressFBWarnings("TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_ALWAYS_SINK") public static String toSlashedClassName(@SlashedClassName(when = When.UNKNOWN) String className) { if (className.indexOf('.') >= 0) { return className.replace('.', '/'); } return cla...
java
@SlashedClassName @SuppressFBWarnings("TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_ALWAYS_SINK") public static String toSlashedClassName(@SlashedClassName(when = When.UNKNOWN) String className) { if (className.indexOf('.') >= 0) { return className.replace('.', '/'); } return cla...
[ "@", "SlashedClassName", "@", "SuppressFBWarnings", "(", "\"TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_ALWAYS_SINK\"", ")", "public", "static", "String", "toSlashedClassName", "(", "@", "SlashedClassName", "(", "when", "=", "When", ".", "UNKNOWN", ")", "String", "className"...
Convert class name to slashed format. If the class name is already in slashed format, it is returned unmodified. @param className a class name @return the same class name in slashed format
[ "Convert", "class", "name", "to", "slashed", "format", ".", "If", "the", "class", "name", "is", "already", "in", "slashed", "format", "it", "is", "returned", "unmodified", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/util/ClassName.java#L113-L120
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/util/ClassName.java
ClassName.toDottedClassName
@DottedClassName @SuppressFBWarnings("TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_NEVER_SINK") public static String toDottedClassName(@SlashedClassName(when = When.UNKNOWN) String className) { if (className.indexOf('/') >= 0) { return className.replace('/', '.'); } return classN...
java
@DottedClassName @SuppressFBWarnings("TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_NEVER_SINK") public static String toDottedClassName(@SlashedClassName(when = When.UNKNOWN) String className) { if (className.indexOf('/') >= 0) { return className.replace('/', '.'); } return classN...
[ "@", "DottedClassName", "@", "SuppressFBWarnings", "(", "\"TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_NEVER_SINK\"", ")", "public", "static", "String", "toDottedClassName", "(", "@", "SlashedClassName", "(", "when", "=", "When", ".", "UNKNOWN", ")", "String", "className", ...
Convert class name to dotted format. If the class name is already in dotted format, it is returned unmodified. @param className a class name @return the same class name in dotted format
[ "Convert", "class", "name", "to", "dotted", "format", ".", "If", "the", "class", "name", "is", "already", "in", "dotted", "format", "it", "is", "returned", "unmodified", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/util/ClassName.java#L130-L137
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/util/ClassName.java
ClassName.isAnonymous
public static boolean isAnonymous(String className) { int i = className.lastIndexOf('$'); if (i >= 0 && ++i < className.length()) { while(i < className.length()) { if(!Character.isDigit(className.charAt(i))) { return false; } ...
java
public static boolean isAnonymous(String className) { int i = className.lastIndexOf('$'); if (i >= 0 && ++i < className.length()) { while(i < className.length()) { if(!Character.isDigit(className.charAt(i))) { return false; } ...
[ "public", "static", "boolean", "isAnonymous", "(", "String", "className", ")", "{", "int", "i", "=", "className", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if", "(", "i", ">=", "0", "&&", "++", "i", "<", "className", ".", "length", "(", ")", ")...
Does a class name appear to designate an anonymous class? Only the name is analyzed. No classes are loaded or looked up. @param className class name, slashed or dotted, fully qualified or unqualified @return true if className is the name of an anonymous class
[ "Does", "a", "class", "name", "appear", "to", "designate", "an", "anonymous", "class?", "Only", "the", "name", "is", "analyzed", ".", "No", "classes", "are", "loaded", "or", "looked", "up", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/util/ClassName.java#L209-L221
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/util/ClassName.java
ClassName.extractClassName
public static @SlashedClassName String extractClassName(String originalName) { String name = originalName; if (name.charAt(0) != '[' && name.charAt(name.length() - 1) != ';') { return name; } while (name.charAt(0) == '[') { name = name.substring(1); } ...
java
public static @SlashedClassName String extractClassName(String originalName) { String name = originalName; if (name.charAt(0) != '[' && name.charAt(name.length() - 1) != ';') { return name; } while (name.charAt(0) == '[') { name = name.substring(1); } ...
[ "public", "static", "@", "SlashedClassName", "String", "extractClassName", "(", "String", "originalName", ")", "{", "String", "name", "=", "originalName", ";", "if", "(", "name", ".", "charAt", "(", "0", ")", "!=", "'", "'", "&&", "name", ".", "charAt", ...
Extract a slashed classname from a JVM classname or signature. @param originalName JVM classname or signature @return a slashed classname
[ "Extract", "a", "slashed", "classname", "from", "a", "JVM", "classname", "or", "signature", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/util/ClassName.java#L230-L246
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierAnnotation.java
TypeQualifierAnnotation.combineReturnTypeAnnotations
public static @CheckForNull TypeQualifierAnnotation combineReturnTypeAnnotations(TypeQualifierAnnotation a, TypeQualifierAnnotation b) { return combineAnnotations(a, b, combineReturnValueMatrix); }
java
public static @CheckForNull TypeQualifierAnnotation combineReturnTypeAnnotations(TypeQualifierAnnotation a, TypeQualifierAnnotation b) { return combineAnnotations(a, b, combineReturnValueMatrix); }
[ "public", "static", "@", "CheckForNull", "TypeQualifierAnnotation", "combineReturnTypeAnnotations", "(", "TypeQualifierAnnotation", "a", ",", "TypeQualifierAnnotation", "b", ")", "{", "return", "combineAnnotations", "(", "a", ",", "b", ",", "combineReturnValueMatrix", ")"...
Combine return type annotations. @param a a TypeQualifierAnnotation used on a return value @param b another TypeQualifierAnnotation used on a return value @return combined return type annotation that is at least as narrow as both <code>a</code> or <code>b</code>, or null if no such TypeQualifierAnnotation exists
[ "Combine", "return", "type", "annotations", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierAnnotation.java#L120-L123
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/PackageMemberAnnotation.java
PackageMemberAnnotation.getPackageName
public final @DottedClassName String getPackageName() { int lastDot = className.lastIndexOf('.'); if (lastDot < 0) { return ""; } else { return className.substring(0, lastDot); } }
java
public final @DottedClassName String getPackageName() { int lastDot = className.lastIndexOf('.'); if (lastDot < 0) { return ""; } else { return className.substring(0, lastDot); } }
[ "public", "final", "@", "DottedClassName", "String", "getPackageName", "(", ")", "{", "int", "lastDot", "=", "className", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if", "(", "lastDot", "<", "0", ")", "{", "return", "\"\"", ";", "}", "else", "{", ...
Get the package name.
[ "Get", "the", "package", "name", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/PackageMemberAnnotation.java#L117-L125
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/PackageMemberAnnotation.java
PackageMemberAnnotation.removePackageName
protected static String removePackageName(String typeName) { int index = typeName.lastIndexOf('.'); if (index >= 0) { typeName = typeName.substring(index + 1); } return typeName; }
java
protected static String removePackageName(String typeName) { int index = typeName.lastIndexOf('.'); if (index >= 0) { typeName = typeName.substring(index + 1); } return typeName; }
[ "protected", "static", "String", "removePackageName", "(", "String", "typeName", ")", "{", "int", "index", "=", "typeName", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if", "(", "index", ">=", "0", ")", "{", "typeName", "=", "typeName", ".", "substring...
Shorten a type name by removing the package name
[ "Shorten", "a", "type", "name", "by", "removing", "the", "package", "name" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/PackageMemberAnnotation.java#L193-L199
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/npe/IsNullValueFrame.java
IsNullValueFrame.downgradeOnControlSplit
public void downgradeOnControlSplit() { final int numSlots = getNumSlots(); for (int i = 0; i < numSlots; ++i) { IsNullValue value = getValue(i); value = value.downgradeOnControlSplit(); setValue(i, value); } if (knownValueMap != null) { f...
java
public void downgradeOnControlSplit() { final int numSlots = getNumSlots(); for (int i = 0; i < numSlots; ++i) { IsNullValue value = getValue(i); value = value.downgradeOnControlSplit(); setValue(i, value); } if (knownValueMap != null) { f...
[ "public", "void", "downgradeOnControlSplit", "(", ")", "{", "final", "int", "numSlots", "=", "getNumSlots", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "numSlots", ";", "++", "i", ")", "{", "IsNullValue", "value", "=", "getValue", ...
Downgrade all NSP values in frame. Should be called when a non-exception control split occurs.
[ "Downgrade", "all", "NSP", "values", "in", "frame", ".", "Should", "be", "called", "when", "a", "non", "-", "exception", "control", "split", "occurs", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/npe/IsNullValueFrame.java#L294-L307
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/visitclass/PrintClass.java
PrintClass.printCode
public static void printCode(Method[] methods) { for (Method m : methods) { System.out.println(m); Code code = m.getCode(); if (code != null) { System.out.println(code); } } }
java
public static void printCode(Method[] methods) { for (Method m : methods) { System.out.println(m); Code code = m.getCode(); if (code != null) { System.out.println(code); } } }
[ "public", "static", "void", "printCode", "(", "Method", "[", "]", "methods", ")", "{", "for", "(", "Method", "m", ":", "methods", ")", "{", "System", ".", "out", ".", "println", "(", "m", ")", ";", "Code", "code", "=", "m", ".", "getCode", "(", "...
Dump the disassembled code of all methods in the class.
[ "Dump", "the", "disassembled", "code", "of", "all", "methods", "in", "the", "class", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/visitclass/PrintClass.java#L173-L182
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/StandardTypeMerger.java
StandardTypeMerger.isReferenceType
protected boolean isReferenceType(byte type) { return type == Const.T_OBJECT || type == Const.T_ARRAY || type == T_NULL || type == T_EXCEPTION; }
java
protected boolean isReferenceType(byte type) { return type == Const.T_OBJECT || type == Const.T_ARRAY || type == T_NULL || type == T_EXCEPTION; }
[ "protected", "boolean", "isReferenceType", "(", "byte", "type", ")", "{", "return", "type", "==", "Const", ".", "T_OBJECT", "||", "type", "==", "Const", ".", "T_ARRAY", "||", "type", "==", "T_NULL", "||", "type", "==", "T_EXCEPTION", ";", "}" ]
Determine if the given typecode refers to a reference type. This implementation just checks that the type code is T_OBJECT, T_ARRAY, T_NULL, or T_EXCEPTION. Subclasses should override this if they have defined new object types with different type codes.
[ "Determine", "if", "the", "given", "typecode", "refers", "to", "a", "reference", "type", ".", "This", "implementation", "just", "checks", "that", "the", "type", "code", "is", "T_OBJECT", "T_ARRAY", "T_NULL", "or", "T_EXCEPTION", ".", "Subclasses", "should", "o...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/StandardTypeMerger.java#L119-L121
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/StandardTypeMerger.java
StandardTypeMerger.mergeReferenceTypes
protected ReferenceType mergeReferenceTypes(ReferenceType aRef, ReferenceType bRef) throws DataflowAnalysisException { if (aRef.equals(bRef)) { return aRef; } byte aType = aRef.getType(); byte bType = bRef.getType(); try { // Special case: ExceptionObjectT...
java
protected ReferenceType mergeReferenceTypes(ReferenceType aRef, ReferenceType bRef) throws DataflowAnalysisException { if (aRef.equals(bRef)) { return aRef; } byte aType = aRef.getType(); byte bType = bRef.getType(); try { // Special case: ExceptionObjectT...
[ "protected", "ReferenceType", "mergeReferenceTypes", "(", "ReferenceType", "aRef", ",", "ReferenceType", "bRef", ")", "throws", "DataflowAnalysisException", "{", "if", "(", "aRef", ".", "equals", "(", "bRef", ")", ")", "{", "return", "aRef", ";", "}", "byte", ...
Default implementation of merging reference types. This just returns the first common superclass, which is compliant with the JVM Spec. Subclasses may override this method in order to implement extended type rules. @param aRef a ReferenceType @param bRef a ReferenceType @return the merged Type
[ "Default", "implementation", "of", "merging", "reference", "types", ".", "This", "just", "returns", "the", "first", "common", "superclass", "which", "is", "compliant", "with", "the", "JVM", "Spec", ".", "Subclasses", "may", "override", "this", "method", "in", ...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/StandardTypeMerger.java#L160-L232
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java
UserPreferences.read
public void read() { File prefFile = new File(SystemProperties.getProperty("user.home"), PREF_FILE_NAME); if (!prefFile.exists() || !prefFile.isFile()) { return; } try { read(new FileInputStream(prefFile)); } catch (IOException e) { // Ignore -...
java
public void read() { File prefFile = new File(SystemProperties.getProperty("user.home"), PREF_FILE_NAME); if (!prefFile.exists() || !prefFile.isFile()) { return; } try { read(new FileInputStream(prefFile)); } catch (IOException e) { // Ignore -...
[ "public", "void", "read", "(", ")", "{", "File", "prefFile", "=", "new", "File", "(", "SystemProperties", ".", "getProperty", "(", "\"user.home\"", ")", ",", "PREF_FILE_NAME", ")", ";", "if", "(", "!", "prefFile", ".", "exists", "(", ")", "||", "!", "p...
Read persistent global UserPreferences from file in the user's home directory.
[ "Read", "persistent", "global", "UserPreferences", "from", "file", "in", "the", "user", "s", "home", "directory", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java#L157-L167
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java
UserPreferences.write
public void write() { try { File prefFile = new File(SystemProperties.getProperty("user.home"), PREF_FILE_NAME); write(new FileOutputStream(prefFile)); } catch (IOException e) { if (FindBugs.DEBUG) { e.printStackTrace(); // Ignore } ...
java
public void write() { try { File prefFile = new File(SystemProperties.getProperty("user.home"), PREF_FILE_NAME); write(new FileOutputStream(prefFile)); } catch (IOException e) { if (FindBugs.DEBUG) { e.printStackTrace(); // Ignore } ...
[ "public", "void", "write", "(", ")", "{", "try", "{", "File", "prefFile", "=", "new", "File", "(", "SystemProperties", ".", "getProperty", "(", "\"user.home\"", ")", ",", "PREF_FILE_NAME", ")", ";", "write", "(", "new", "FileOutputStream", "(", "prefFile", ...
Write persistent global UserPreferences to file in user's home directory.
[ "Write", "persistent", "global", "UserPreferences", "to", "file", "in", "user", "s", "home", "directory", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java#L269-L278
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java
UserPreferences.useProject
public void useProject(String projectName) { removeProject(projectName); recentProjectsList.addFirst(projectName); while (recentProjectsList.size() > MAX_RECENT_FILES) { recentProjectsList.removeLast(); } }
java
public void useProject(String projectName) { removeProject(projectName); recentProjectsList.addFirst(projectName); while (recentProjectsList.size() > MAX_RECENT_FILES) { recentProjectsList.removeLast(); } }
[ "public", "void", "useProject", "(", "String", "projectName", ")", "{", "removeProject", "(", "projectName", ")", ";", "recentProjectsList", ".", "addFirst", "(", "projectName", ")", ";", "while", "(", "recentProjectsList", ".", "size", "(", ")", ">", "MAX_REC...
Add given project filename to the front of the recently-used project list. @param projectName project filename
[ "Add", "given", "project", "filename", "to", "the", "front", "of", "the", "recently", "-", "used", "project", "list", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java#L350-L356
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java
UserPreferences.removeProject
public void removeProject(String projectName) { // It should only be in list once (usually in slot 0) but check entire // list... Iterator<String> it = recentProjectsList.iterator(); while (it.hasNext()) { // LinkedList, so remove() via iterator is faster than // ...
java
public void removeProject(String projectName) { // It should only be in list once (usually in slot 0) but check entire // list... Iterator<String> it = recentProjectsList.iterator(); while (it.hasNext()) { // LinkedList, so remove() via iterator is faster than // ...
[ "public", "void", "removeProject", "(", "String", "projectName", ")", "{", "// It should only be in list once (usually in slot 0) but check entire", "// list...", "Iterator", "<", "String", ">", "it", "=", "recentProjectsList", ".", "iterator", "(", ")", ";", "while", "...
Remove project filename from the recently-used project list. @param projectName project filename
[ "Remove", "project", "filename", "from", "the", "recently", "-", "used", "project", "list", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java#L364-L375
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java
UserPreferences.enableAllDetectors
public void enableAllDetectors(boolean enable) { detectorEnablementMap.clear(); Collection<Plugin> allPlugins = Plugin.getAllPlugins(); for (Plugin plugin : allPlugins) { for (DetectorFactory factory : plugin.getDetectorFactories()) { detectorEnablementMap.put(factor...
java
public void enableAllDetectors(boolean enable) { detectorEnablementMap.clear(); Collection<Plugin> allPlugins = Plugin.getAllPlugins(); for (Plugin plugin : allPlugins) { for (DetectorFactory factory : plugin.getDetectorFactories()) { detectorEnablementMap.put(factor...
[ "public", "void", "enableAllDetectors", "(", "boolean", "enable", ")", "{", "detectorEnablementMap", ".", "clear", "(", ")", ";", "Collection", "<", "Plugin", ">", "allPlugins", "=", "Plugin", ".", "getAllPlugins", "(", ")", ";", "for", "(", "Plugin", "plugi...
Enable or disable all known Detectors. @param enable true if all detectors should be enabled, false if they should all be disabled
[ "Enable", "or", "disable", "all", "known", "Detectors", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java#L417-L426
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java
UserPreferences.readProperties
private static Map<String, Boolean> readProperties(Properties props, String keyPrefix) { Map<String, Boolean> filters = new TreeMap<>(); int counter = 0; boolean keyFound = true; while (keyFound) { String property = props.getProperty(keyPrefix + counter); if (prop...
java
private static Map<String, Boolean> readProperties(Properties props, String keyPrefix) { Map<String, Boolean> filters = new TreeMap<>(); int counter = 0; boolean keyFound = true; while (keyFound) { String property = props.getProperty(keyPrefix + counter); if (prop...
[ "private", "static", "Map", "<", "String", ",", "Boolean", ">", "readProperties", "(", "Properties", "props", ",", "String", "keyPrefix", ")", "{", "Map", "<", "String", ",", "Boolean", ">", "filters", "=", "new", "TreeMap", "<>", "(", ")", ";", "int", ...
Helper method to read array of strings out of the properties file, using a Findbugs style format. @param props The properties file to read the array from. @param keyPrefix The key prefix of the array. @return The array of Strings, or an empty array if no values exist.
[ "Helper", "method", "to", "read", "array", "of", "strings", "out", "of", "the", "properties", "file", "using", "a", "Findbugs", "style", "format", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java#L659-L681
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java
UserPreferences.writeProperties
private static void writeProperties(Properties props, String keyPrefix, Map<String, Boolean> filters) { int counter = 0; Set<Entry<String, Boolean>> entrySet = filters.entrySet(); for (Entry<String, Boolean> entry : entrySet) { props.setProperty(keyPrefix + counter, entry.getKey() + ...
java
private static void writeProperties(Properties props, String keyPrefix, Map<String, Boolean> filters) { int counter = 0; Set<Entry<String, Boolean>> entrySet = filters.entrySet(); for (Entry<String, Boolean> entry : entrySet) { props.setProperty(keyPrefix + counter, entry.getKey() + ...
[ "private", "static", "void", "writeProperties", "(", "Properties", "props", ",", "String", "keyPrefix", ",", "Map", "<", "String", ",", "Boolean", ">", "filters", ")", "{", "int", "counter", "=", "0", ";", "Set", "<", "Entry", "<", "String", ",", "Boolea...
Helper method to write array of strings out of the properties file, using a Findbugs style format. @param props The properties file to write the array to. @param keyPrefix The key prefix of the array. @param filters The filters array to write to the properties.
[ "Helper", "method", "to", "write", "array", "of", "strings", "out", "of", "the", "properties", "file", "using", "a", "Findbugs", "style", "format", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java#L694-L712
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java
UserPreferences.getAnalysisFeatureSettings
public AnalysisFeatureSetting[] getAnalysisFeatureSettings() { if (EFFORT_DEFAULT.equals(effort)) { return FindBugs.DEFAULT_EFFORT; } else if (EFFORT_MIN.equals(effort)) { return FindBugs.MIN_EFFORT; } return FindBugs.MAX_EFFORT; }
java
public AnalysisFeatureSetting[] getAnalysisFeatureSettings() { if (EFFORT_DEFAULT.equals(effort)) { return FindBugs.DEFAULT_EFFORT; } else if (EFFORT_MIN.equals(effort)) { return FindBugs.MIN_EFFORT; } return FindBugs.MAX_EFFORT; }
[ "public", "AnalysisFeatureSetting", "[", "]", "getAnalysisFeatureSettings", "(", ")", "{", "if", "(", "EFFORT_DEFAULT", ".", "equals", "(", "effort", ")", ")", "{", "return", "FindBugs", ".", "DEFAULT_EFFORT", ";", "}", "else", "if", "(", "EFFORT_MIN", ".", ...
Returns the effort level as an array of feature settings as expected by FindBugs. @return The array of feature settings corresponding to the current effort setting.
[ "Returns", "the", "effort", "level", "as", "an", "array", "of", "feature", "settings", "as", "expected", "by", "FindBugs", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java#L721-L728
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/RepositoryClassParser.java
RepositoryClassParser.parse
public JavaClass parse() throws IOException { JavaClass jclass = classParser.parse(); Repository.addClass(jclass); return jclass; }
java
public JavaClass parse() throws IOException { JavaClass jclass = classParser.parse(); Repository.addClass(jclass); return jclass; }
[ "public", "JavaClass", "parse", "(", ")", "throws", "IOException", "{", "JavaClass", "jclass", "=", "classParser", ".", "parse", "(", ")", ";", "Repository", ".", "addClass", "(", "jclass", ")", ";", "return", "jclass", ";", "}" ]
Parse the class file into a JavaClass object. If successful, the new JavaClass is entered into the Repository. @return the parsed JavaClass @throws IOException if the class cannot be parsed
[ "Parse", "the", "class", "file", "into", "a", "JavaClass", "object", ".", "If", "successful", "the", "new", "JavaClass", "is", "entered", "into", "the", "Repository", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/RepositoryClassParser.java#L79-L83
train
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/SourceFinder.java
SourceFinder.setSourceBaseList
void setSourceBaseList(Iterable<String> sourceBaseList) { for (String repos : sourceBaseList) { if (repos.endsWith(".zip") || repos.endsWith(".jar") || repos.endsWith(".z0p.gz")) { // Zip or jar archive try { if (repos.startsWith("http:") || repos....
java
void setSourceBaseList(Iterable<String> sourceBaseList) { for (String repos : sourceBaseList) { if (repos.endsWith(".zip") || repos.endsWith(".jar") || repos.endsWith(".z0p.gz")) { // Zip or jar archive try { if (repos.startsWith("http:") || repos....
[ "void", "setSourceBaseList", "(", "Iterable", "<", "String", ">", "sourceBaseList", ")", "{", "for", "(", "String", "repos", ":", "sourceBaseList", ")", "{", "if", "(", "repos", ".", "endsWith", "(", "\".zip\"", ")", "||", "repos", ".", "endsWith", "(", ...
Set the list of source directories.
[ "Set", "the", "list", "of", "source", "directories", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/SourceFinder.java#L403-L428
train