id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
59,600
spotbugs/spotbugs
spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/BugTreeModel.java
BugTreeModel.rebuild
public void rebuild() { if (TRACE) { System.out.println("rebuilding bug tree model"); } NewFilterFromBug.closeAll(); // If this thread is not interrupting a previous thread, set the paths // to be opened when the new tree is complete // If the thread is inte...
java
public void rebuild() { if (TRACE) { System.out.println("rebuilding bug tree model"); } NewFilterFromBug.closeAll(); // If this thread is not interrupting a previous thread, set the paths // to be opened when the new tree is complete // If the thread is inte...
[ "public", "void", "rebuild", "(", ")", "{", "if", "(", "TRACE", ")", "{", "System", ".", "out", ".", "println", "(", "\"rebuilding bug tree model\"", ")", ";", "}", "NewFilterFromBug", ".", "closeAll", "(", ")", ";", "// If this thread is not interrupting a prev...
Swaps in a new BugTreeModel and a new JTree
[ "Swaps", "in", "a", "new", "BugTreeModel", "and", "a", "new", "JTree" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/BugTreeModel.java#L348-L394
59,601
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierValue.java
TypeQualifierValue.getComplementaryExclusiveTypeQualifierValue
public static Collection<TypeQualifierValue<?>> getComplementaryExclusiveTypeQualifierValue(TypeQualifierValue<?> tqv) { assert tqv.isExclusiveQualifier(); LinkedList<TypeQualifierValue<?>> result = new LinkedList<>(); for (TypeQualifierValue<?> t : instance.get().allKnownTypeQualifiers) { ...
java
public static Collection<TypeQualifierValue<?>> getComplementaryExclusiveTypeQualifierValue(TypeQualifierValue<?> tqv) { assert tqv.isExclusiveQualifier(); LinkedList<TypeQualifierValue<?>> result = new LinkedList<>(); for (TypeQualifierValue<?> t : instance.get().allKnownTypeQualifiers) { ...
[ "public", "static", "Collection", "<", "TypeQualifierValue", "<", "?", ">", ">", "getComplementaryExclusiveTypeQualifierValue", "(", "TypeQualifierValue", "<", "?", ">", "tqv", ")", "{", "assert", "tqv", ".", "isExclusiveQualifier", "(", ")", ";", "LinkedList", "<...
Get the "complementary" TypeQualifierValues for given exclusive type qualifier. @param tqv a type qualifier (which must be exclusive) @return Collection of complementary exclusive type qualifiers
[ "Get", "the", "complementary", "TypeQualifierValues", "for", "given", "exclusive", "type", "qualifier", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierValue.java#L324-L341
59,602
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/detect/BadSyntaxForRegularExpression.java
BadSyntaxForRegularExpression.getIntValue
private int getIntValue(int stackDepth, int defaultValue) { if (stack.getStackDepth() < stackDepth) { return defaultValue; } OpcodeStack.Item it = stack.getStackItem(stackDepth); Object value = it.getConstant(); if (!(value instanceof Integer)) { return de...
java
private int getIntValue(int stackDepth, int defaultValue) { if (stack.getStackDepth() < stackDepth) { return defaultValue; } OpcodeStack.Item it = stack.getStackItem(stackDepth); Object value = it.getConstant(); if (!(value instanceof Integer)) { return de...
[ "private", "int", "getIntValue", "(", "int", "stackDepth", ",", "int", "defaultValue", ")", "{", "if", "(", "stack", ".", "getStackDepth", "(", ")", "<", "stackDepth", ")", "{", "return", "defaultValue", ";", "}", "OpcodeStack", ".", "Item", "it", "=", "...
return an int on the stack, or 'defaultValue' if can't determine
[ "return", "an", "int", "on", "the", "stack", "or", "defaultValue", "if", "can", "t", "determine" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/BadSyntaxForRegularExpression.java#L119-L129
59,603
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/DetectorsExtensionHelper.java
DetectorsExtensionHelper.getContributedDetectors
public static synchronized SortedMap<String, String> getContributedDetectors() { if (contributedDetectors != null) { return new TreeMap<>(contributedDetectors); } TreeMap<String, String> set = new TreeMap<>(); IExtensionRegistry registry = Platform.getExtensionRegistry(); ...
java
public static synchronized SortedMap<String, String> getContributedDetectors() { if (contributedDetectors != null) { return new TreeMap<>(contributedDetectors); } TreeMap<String, String> set = new TreeMap<>(); IExtensionRegistry registry = Platform.getExtensionRegistry(); ...
[ "public", "static", "synchronized", "SortedMap", "<", "String", ",", "String", ">", "getContributedDetectors", "(", ")", "{", "if", "(", "contributedDetectors", "!=", "null", ")", "{", "return", "new", "TreeMap", "<>", "(", "contributedDetectors", ")", ";", "}...
key is the plugin id, value is the plugin library path
[ "key", "is", "the", "plugin", "id", "value", "is", "the", "plugin", "library", "path" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/DetectorsExtensionHelper.java#L60-L72
59,604
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/DetectorsExtensionHelper.java
DetectorsExtensionHelper.resolvePluginClassesDir
@CheckForNull private static String resolvePluginClassesDir(String bundleName, File sourceDir) { if (sourceDir.listFiles() == null) { FindbugsPlugin.getDefault().logException(new IllegalStateException("No files in the bundle!"), "Failed to create temporary detector package f...
java
@CheckForNull private static String resolvePluginClassesDir(String bundleName, File sourceDir) { if (sourceDir.listFiles() == null) { FindbugsPlugin.getDefault().logException(new IllegalStateException("No files in the bundle!"), "Failed to create temporary detector package f...
[ "@", "CheckForNull", "private", "static", "String", "resolvePluginClassesDir", "(", "String", "bundleName", ",", "File", "sourceDir", ")", "{", "if", "(", "sourceDir", ".", "listFiles", "(", ")", "==", "null", ")", "{", "FindbugsPlugin", ".", "getDefault", "("...
Used for Eclipse instances running inside debugger. During development Eclipse plugins are just directories. The code below tries to locate plugin's "bin" directory. It doesn't work if the plugin build.properties are not existing or contain invalid content
[ "Used", "for", "Eclipse", "instances", "running", "inside", "debugger", ".", "During", "development", "Eclipse", "plugins", "are", "just", "directories", ".", "The", "code", "below", "tries", "to", "locate", "plugin", "s", "bin", "directory", ".", "It", "doesn...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/DetectorsExtensionHelper.java#L154-L183
59,605
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/LocalVariableAnnotation.java
LocalVariableAnnotation.getParameterLocalVariableAnnotation
public static LocalVariableAnnotation getParameterLocalVariableAnnotation(Method method, int local) { LocalVariableAnnotation lva = getLocalVariableAnnotation(method, local, 0, 0); if (lva.isNamed()) { lva.setDescription(LocalVariableAnnotation.PARAMETER_NAMED_ROLE); } else { ...
java
public static LocalVariableAnnotation getParameterLocalVariableAnnotation(Method method, int local) { LocalVariableAnnotation lva = getLocalVariableAnnotation(method, local, 0, 0); if (lva.isNamed()) { lva.setDescription(LocalVariableAnnotation.PARAMETER_NAMED_ROLE); } else { ...
[ "public", "static", "LocalVariableAnnotation", "getParameterLocalVariableAnnotation", "(", "Method", "method", ",", "int", "local", ")", "{", "LocalVariableAnnotation", "lva", "=", "getLocalVariableAnnotation", "(", "method", ",", "local", ",", "0", ",", "0", ")", "...
Get a local variable annotation describing a parameter. @param method a Method @param local the local variable containing the parameter @return LocalVariableAnnotation describing the parameter
[ "Get", "a", "local", "variable", "annotation", "describing", "a", "parameter", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/LocalVariableAnnotation.java#L179-L187
59,606
spotbugs/spotbugs
spotbugs/src/gui/main/edu/umd/cs/findbugs/sourceViewer/DocumentCharacterIterator.java
DocumentCharacterIterator.next
@Override public char next() { ++docPos; if (docPos < segmentEnd || segmentEnd >= doc.getLength()) { return text.next(); } try { doc.getText(segmentEnd, doc.getLength() - segmentEnd, text); } catch (BadLocationException e) { throw new Runti...
java
@Override public char next() { ++docPos; if (docPos < segmentEnd || segmentEnd >= doc.getLength()) { return text.next(); } try { doc.getText(segmentEnd, doc.getLength() - segmentEnd, text); } catch (BadLocationException e) { throw new Runti...
[ "@", "Override", "public", "char", "next", "(", ")", "{", "++", "docPos", ";", "if", "(", "docPos", "<", "segmentEnd", "||", "segmentEnd", ">=", "doc", ".", "getLength", "(", ")", ")", "{", "return", "text", ".", "next", "(", ")", ";", "}", "try", ...
Increments the iterator's index by one and returns the character at the new index. @return the character at the new position, or DONE if the new position is off the end
[ "Increments", "the", "iterator", "s", "index", "by", "one", "and", "returns", "the", "character", "at", "the", "new", "index", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/sourceViewer/DocumentCharacterIterator.java#L98-L111
59,607
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/model/ClassNameRewriterUtil.java
ClassNameRewriterUtil.rewriteMethodSignature
public static String rewriteMethodSignature(ClassNameRewriter classNameRewriter, String methodSignature) { if (classNameRewriter != IdentityClassNameRewriter.instance()) { SignatureParser parser = new SignatureParser(methodSignature); StringBuilder buf = new StringBuilder(); ...
java
public static String rewriteMethodSignature(ClassNameRewriter classNameRewriter, String methodSignature) { if (classNameRewriter != IdentityClassNameRewriter.instance()) { SignatureParser parser = new SignatureParser(methodSignature); StringBuilder buf = new StringBuilder(); ...
[ "public", "static", "String", "rewriteMethodSignature", "(", "ClassNameRewriter", "classNameRewriter", ",", "String", "methodSignature", ")", "{", "if", "(", "classNameRewriter", "!=", "IdentityClassNameRewriter", ".", "instance", "(", ")", ")", "{", "SignatureParser", ...
Rewrite a method signature. @param classNameRewriter a ClassNameRewriter @param methodSignature a method signature @return the rewritten method signature
[ "Rewrite", "a", "method", "signature", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/model/ClassNameRewriterUtil.java#L44-L62
59,608
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/model/ClassNameRewriterUtil.java
ClassNameRewriterUtil.rewriteSignature
public static String rewriteSignature(ClassNameRewriter classNameRewriter, String signature) { if (classNameRewriter != IdentityClassNameRewriter.instance() && signature.startsWith("L")) { String className = signature.substring(1, signature.length() - 1).replace('/', '.'); className = c...
java
public static String rewriteSignature(ClassNameRewriter classNameRewriter, String signature) { if (classNameRewriter != IdentityClassNameRewriter.instance() && signature.startsWith("L")) { String className = signature.substring(1, signature.length() - 1).replace('/', '.'); className = c...
[ "public", "static", "String", "rewriteSignature", "(", "ClassNameRewriter", "classNameRewriter", ",", "String", "signature", ")", "{", "if", "(", "classNameRewriter", "!=", "IdentityClassNameRewriter", ".", "instance", "(", ")", "&&", "signature", ".", "startsWith", ...
Rewrite a signature. @param classNameRewriter a ClassNameRewriter @param signature a signature (parameter, return type, or field) @return rewritten signature with class name updated if required
[ "Rewrite", "a", "signature", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/model/ClassNameRewriterUtil.java#L73-L83
59,609
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/model/ClassNameRewriterUtil.java
ClassNameRewriterUtil.convertMethodAnnotation
public static MethodAnnotation convertMethodAnnotation(ClassNameRewriter classNameRewriter, MethodAnnotation annotation) { if (classNameRewriter != IdentityClassNameRewriter.instance()) { annotation = new MethodAnnotation(classNameRewriter.rewriteClassName(annotation.getClassName()), ...
java
public static MethodAnnotation convertMethodAnnotation(ClassNameRewriter classNameRewriter, MethodAnnotation annotation) { if (classNameRewriter != IdentityClassNameRewriter.instance()) { annotation = new MethodAnnotation(classNameRewriter.rewriteClassName(annotation.getClassName()), ...
[ "public", "static", "MethodAnnotation", "convertMethodAnnotation", "(", "ClassNameRewriter", "classNameRewriter", ",", "MethodAnnotation", "annotation", ")", "{", "if", "(", "classNameRewriter", "!=", "IdentityClassNameRewriter", ".", "instance", "(", ")", ")", "{", "an...
Rewrite a MethodAnnotation to update the class name, and any class names mentioned in the method signature. @param classNameRewriter a ClassNameRewriter @param annotation a MethodAnnotation @return the possibly-rewritten MethodAnnotation
[ "Rewrite", "a", "MethodAnnotation", "to", "update", "the", "class", "name", "and", "any", "class", "names", "mentioned", "in", "the", "method", "signature", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/model/ClassNameRewriterUtil.java#L95-L103
59,610
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/model/ClassNameRewriterUtil.java
ClassNameRewriterUtil.convertFieldAnnotation
public static FieldAnnotation convertFieldAnnotation(ClassNameRewriter classNameRewriter, FieldAnnotation annotation) { if (classNameRewriter != IdentityClassNameRewriter.instance()) { annotation = new FieldAnnotation(classNameRewriter.rewriteClassName(annotation.getClassName()), ...
java
public static FieldAnnotation convertFieldAnnotation(ClassNameRewriter classNameRewriter, FieldAnnotation annotation) { if (classNameRewriter != IdentityClassNameRewriter.instance()) { annotation = new FieldAnnotation(classNameRewriter.rewriteClassName(annotation.getClassName()), ...
[ "public", "static", "FieldAnnotation", "convertFieldAnnotation", "(", "ClassNameRewriter", "classNameRewriter", ",", "FieldAnnotation", "annotation", ")", "{", "if", "(", "classNameRewriter", "!=", "IdentityClassNameRewriter", ".", "instance", "(", ")", ")", "{", "annot...
Rewrite a FieldAnnotation to update the class name and field signature, if needed. @param classNameRewriter a ClassNameRewriter @param annotation a FieldAnnotation @return the possibly-rewritten FieldAnnotation
[ "Rewrite", "a", "FieldAnnotation", "to", "update", "the", "class", "name", "and", "field", "signature", "if", "needed", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/model/ClassNameRewriterUtil.java#L115-L123
59,611
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/detect/BuildInterproceduralCallGraph.java
BuildInterproceduralCallGraph.findVertex
private InterproceduralCallGraphVertex findVertex(XMethod xmethod) { InterproceduralCallGraphVertex vertex; vertex = callGraph.lookupVertex(xmethod.getMethodDescriptor()); if (vertex == null) { vertex = new InterproceduralCallGraphVertex(); vertex.setXmethod(xmethod); ...
java
private InterproceduralCallGraphVertex findVertex(XMethod xmethod) { InterproceduralCallGraphVertex vertex; vertex = callGraph.lookupVertex(xmethod.getMethodDescriptor()); if (vertex == null) { vertex = new InterproceduralCallGraphVertex(); vertex.setXmethod(xmethod); ...
[ "private", "InterproceduralCallGraphVertex", "findVertex", "(", "XMethod", "xmethod", ")", "{", "InterproceduralCallGraphVertex", "vertex", ";", "vertex", "=", "callGraph", ".", "lookupVertex", "(", "xmethod", ".", "getMethodDescriptor", "(", ")", ")", ";", "if", "(...
Find the InterproceduralCallGraphVertex for given XMethod. @param xmethod an XMethod @return the XMethod's InterproceduralCallGraphVertex
[ "Find", "the", "InterproceduralCallGraphVertex", "for", "given", "XMethod", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/BuildInterproceduralCallGraph.java#L102-L111
59,612
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Path.java
Path.hasComponent
public boolean hasComponent(int blockId) { for (int i = 0; i < length; i++) { if (blockIdList[i] == blockId) { return true; } } return false; }
java
public boolean hasComponent(int blockId) { for (int i = 0; i < length; i++) { if (blockIdList[i] == blockId) { return true; } } return false; }
[ "public", "boolean", "hasComponent", "(", "int", "blockId", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "if", "(", "blockIdList", "[", "i", "]", "==", "blockId", ")", "{", "return", "true", ";", ...
Determine whether or not the id of the given BasicBlock appears anywhere in the path. @param blockId the id (label) of a BasicBlock @return true if the BasicBlock's id appears in the path, false if not
[ "Determine", "whether", "or", "not", "the", "id", "of", "the", "given", "BasicBlock", "appears", "anywhere", "in", "the", "path", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Path.java#L72-L79
59,613
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Path.java
Path.copyFrom
public void copyFrom(Path other) { grow(other.length - 1); System.arraycopy(other.blockIdList, 0, this.blockIdList, 0, other.length); this.length = other.length; this.cachedHashCode = other.cachedHashCode; }
java
public void copyFrom(Path other) { grow(other.length - 1); System.arraycopy(other.blockIdList, 0, this.blockIdList, 0, other.length); this.length = other.length; this.cachedHashCode = other.cachedHashCode; }
[ "public", "void", "copyFrom", "(", "Path", "other", ")", "{", "grow", "(", "other", ".", "length", "-", "1", ")", ";", "System", ".", "arraycopy", "(", "other", ".", "blockIdList", ",", "0", ",", "this", ".", "blockIdList", ",", "0", ",", "other", ...
Make this Path identical to the given one. @param other a Path to which this object should be made identical
[ "Make", "this", "Path", "identical", "to", "the", "given", "one", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Path.java#L119-L124
59,614
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Path.java
Path.acceptVisitor
public void acceptVisitor(CFG cfg, PathVisitor visitor) { if (getLength() > 0) { BasicBlock startBlock = cfg.lookupBlockByLabel(getBlockIdAt(0)); acceptVisitorStartingFromLocation(cfg, visitor, startBlock, startBlock.getFirstInstruction()); } }
java
public void acceptVisitor(CFG cfg, PathVisitor visitor) { if (getLength() > 0) { BasicBlock startBlock = cfg.lookupBlockByLabel(getBlockIdAt(0)); acceptVisitorStartingFromLocation(cfg, visitor, startBlock, startBlock.getFirstInstruction()); } }
[ "public", "void", "acceptVisitor", "(", "CFG", "cfg", ",", "PathVisitor", "visitor", ")", "{", "if", "(", "getLength", "(", ")", ">", "0", ")", "{", "BasicBlock", "startBlock", "=", "cfg", ".", "lookupBlockByLabel", "(", "getBlockIdAt", "(", "0", ")", ")...
Accept a PathVisitor. @param cfg the control flow graph @param visitor a PathVisitor
[ "Accept", "a", "PathVisitor", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Path.java#L134-L139
59,615
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Path.java
Path.acceptVisitorStartingFromLocation
public void acceptVisitorStartingFromLocation(CFG cfg, PathVisitor visitor, BasicBlock startBlock, InstructionHandle startHandle) { // Find the start block in the path int index; for (index = 0; index < getLength(); index++) { if (getBlockIdAt(index) == startBlock.getLabe...
java
public void acceptVisitorStartingFromLocation(CFG cfg, PathVisitor visitor, BasicBlock startBlock, InstructionHandle startHandle) { // Find the start block in the path int index; for (index = 0; index < getLength(); index++) { if (getBlockIdAt(index) == startBlock.getLabe...
[ "public", "void", "acceptVisitorStartingFromLocation", "(", "CFG", "cfg", ",", "PathVisitor", "visitor", ",", "BasicBlock", "startBlock", ",", "InstructionHandle", "startHandle", ")", "{", "// Find the start block in the path", "int", "index", ";", "for", "(", "index", ...
Accept a PathVisitor, starting from a given BasicBlock and InstructionHandle. @param cfg the control flow graph @param visitor a PathVisitor @param startBlock BasicBlock where traversal should start @param startHandle InstructionHandle within the start block where traversal should start
[ "Accept", "a", "PathVisitor", "starting", "from", "a", "given", "BasicBlock", "and", "InstructionHandle", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Path.java#L155-L205
59,616
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Path.java
Path.isPrefixOf
public boolean isPrefixOf(Path path) { if (this.getLength() > path.getLength()) { return false; } for (int i = 0; i < getLength(); i++) { if (this.getBlockIdAt(i) != path.getBlockIdAt(i)) { return false; } } return true; }
java
public boolean isPrefixOf(Path path) { if (this.getLength() > path.getLength()) { return false; } for (int i = 0; i < getLength(); i++) { if (this.getBlockIdAt(i) != path.getBlockIdAt(i)) { return false; } } return true; }
[ "public", "boolean", "isPrefixOf", "(", "Path", "path", ")", "{", "if", "(", "this", ".", "getLength", "(", ")", ">", "path", ".", "getLength", "(", ")", ")", "{", "return", "false", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "g...
Determine whether or not given Path is a prefix of this one. @param path another Path @return true if this Path is a prefix of the other Path, false otherwise
[ "Determine", "whether", "or", "not", "given", "Path", "is", "a", "prefix", "of", "this", "one", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Path.java#L214-L224
59,617
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/npe/IsNullValueFrameModelingVisitor.java
IsNullValueFrameModelingVisitor.produce
private void produce(IsNullValue value) { IsNullValueFrame frame = getFrame(); frame.pushValue(value); newValueOnTOS(); }
java
private void produce(IsNullValue value) { IsNullValueFrame frame = getFrame(); frame.pushValue(value); newValueOnTOS(); }
[ "private", "void", "produce", "(", "IsNullValue", "value", ")", "{", "IsNullValueFrame", "frame", "=", "getFrame", "(", ")", ";", "frame", ".", "pushValue", "(", "value", ")", ";", "newValueOnTOS", "(", ")", ";", "}" ]
to produce different values in each of the control successors.
[ "to", "produce", "different", "values", "in", "each", "of", "the", "control", "successors", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/npe/IsNullValueFrameModelingVisitor.java#L160-L164
59,618
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/npe/IsNullValueFrameModelingVisitor.java
IsNullValueFrameModelingVisitor.handleInvoke
private void handleInvoke(InvokeInstruction obj) { if (obj instanceof INVOKEDYNAMIC) { // should not happen return; } Type returnType = obj.getReturnType(getCPG()); Location location = getLocation(); if (trackValueNumbers) { try { ...
java
private void handleInvoke(InvokeInstruction obj) { if (obj instanceof INVOKEDYNAMIC) { // should not happen return; } Type returnType = obj.getReturnType(getCPG()); Location location = getLocation(); if (trackValueNumbers) { try { ...
[ "private", "void", "handleInvoke", "(", "InvokeInstruction", "obj", ")", "{", "if", "(", "obj", "instanceof", "INVOKEDYNAMIC", ")", "{", "// should not happen", "return", ";", "}", "Type", "returnType", "=", "obj", ".", "getReturnType", "(", "getCPG", "(", ")"...
Handle method invocations. Generally, we want to get rid of null information following a call to a likely exception thrower or assertion.
[ "Handle", "method", "invocations", ".", "Generally", "we", "want", "to", "get", "rid", "of", "null", "information", "following", "a", "call", "to", "a", "likely", "exception", "thrower", "or", "assertion", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/npe/IsNullValueFrameModelingVisitor.java#L176-L258
59,619
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/npe/IsNullValueFrameModelingVisitor.java
IsNullValueFrameModelingVisitor.checkForKnownValue
private boolean checkForKnownValue(Instruction obj) { if (trackValueNumbers) { try { // See if the value number loaded here is a known value ValueNumberFrame vnaFrameAfter = vnaDataflow.getFactAfterLocation(getLocation()); if (vnaFrameAfter.isValid()) ...
java
private boolean checkForKnownValue(Instruction obj) { if (trackValueNumbers) { try { // See if the value number loaded here is a known value ValueNumberFrame vnaFrameAfter = vnaDataflow.getFactAfterLocation(getLocation()); if (vnaFrameAfter.isValid()) ...
[ "private", "boolean", "checkForKnownValue", "(", "Instruction", "obj", ")", "{", "if", "(", "trackValueNumbers", ")", "{", "try", "{", "// See if the value number loaded here is a known value", "ValueNumberFrame", "vnaFrameAfter", "=", "vnaDataflow", ".", "getFactAfterLocat...
Check given Instruction to see if it produces a known value. If so, model the instruction and return true. Otherwise, do nothing and return false. Should only be used for instructions that produce a single value on the top of the stack. @param obj the Instruction the instruction @return true if the instruction produce...
[ "Check", "given", "Instruction", "to", "see", "if", "it", "produces", "a", "known", "value", ".", "If", "so", "model", "the", "instruction", "and", "return", "true", ".", "Otherwise", "do", "nothing", "and", "return", "false", ".", "Should", "only", "be", ...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/npe/IsNullValueFrameModelingVisitor.java#L439-L461
59,620
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/util/Strings.java
Strings.trimComma
public static String trimComma(String s) { if (s.endsWith(",")) { s = s.substring(0, s.length() - 1); } return s; }
java
public static String trimComma(String s) { if (s.endsWith(",")) { s = s.substring(0, s.length() - 1); } return s; }
[ "public", "static", "String", "trimComma", "(", "String", "s", ")", "{", "if", "(", "s", ".", "endsWith", "(", "\",\"", ")", ")", "{", "s", "=", "s", ".", "substring", "(", "0", ",", "s", ".", "length", "(", ")", "-", "1", ")", ";", "}", "ret...
Trim trailing comma from given string. @param s a string @return the same string with trailing comma trimmed (if any)
[ "Trim", "trailing", "comma", "from", "given", "string", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/util/Strings.java#L81-L86
59,621
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/util/Strings.java
Strings.initializeUnescapePattern
public static boolean initializeUnescapePattern() { if (paternIsInitialized == true) { return true; } synchronized (unescapeInitLockObject) { if (paternIsInitialized == true) { return true; } try { unescapePattern ...
java
public static boolean initializeUnescapePattern() { if (paternIsInitialized == true) { return true; } synchronized (unescapeInitLockObject) { if (paternIsInitialized == true) { return true; } try { unescapePattern ...
[ "public", "static", "boolean", "initializeUnescapePattern", "(", ")", "{", "if", "(", "paternIsInitialized", "==", "true", ")", "{", "return", "true", ";", "}", "synchronized", "(", "unescapeInitLockObject", ")", "{", "if", "(", "paternIsInitialized", "==", "tru...
Initialize regular expressions used in unescaping. This method will be invoked automatically the first time a string is unescaped.
[ "Initialize", "regular", "expressions", "used", "in", "unescaping", ".", "This", "method", "will", "be", "invoked", "automatically", "the", "first", "time", "a", "string", "is", "unescaped", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/util/Strings.java#L201-L225
59,622
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/generic/GenericSignatureParser.java
GenericSignatureParser.getReturnTypeSignature
public String getReturnTypeSignature() { int endOfParams = signature.lastIndexOf(')'); if (endOfParams < 0) { throw new IllegalArgumentException("Bad method signature: " + signature); } return signature.substring(endOfParams + 1); }
java
public String getReturnTypeSignature() { int endOfParams = signature.lastIndexOf(')'); if (endOfParams < 0) { throw new IllegalArgumentException("Bad method signature: " + signature); } return signature.substring(endOfParams + 1); }
[ "public", "String", "getReturnTypeSignature", "(", ")", "{", "int", "endOfParams", "=", "signature", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if", "(", "endOfParams", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Bad method signa...
Get the method return type signature. @return the method return type signature
[ "Get", "the", "method", "return", "type", "signature", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/generic/GenericSignatureParser.java#L171-L177
59,623
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/generic/GenericSignatureParser.java
GenericSignatureParser.getNumParameters
public int getNumParameters() { int count = 0; for (Iterator<String> i = parameterSignatureIterator(); i.hasNext();) { i.next(); ++count; } return count; }
java
public int getNumParameters() { int count = 0; for (Iterator<String> i = parameterSignatureIterator(); i.hasNext();) { i.next(); ++count; } return count; }
[ "public", "int", "getNumParameters", "(", ")", "{", "int", "count", "=", "0", ";", "for", "(", "Iterator", "<", "String", ">", "i", "=", "parameterSignatureIterator", "(", ")", ";", "i", ".", "hasNext", "(", ")", ";", ")", "{", "i", ".", "next", "(...
Get the number of parameters in the signature. @return the number of parameters
[ "Get", "the", "number", "of", "parameters", "in", "the", "signature", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/generic/GenericSignatureParser.java#L184-L191
59,624
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/generic/GenericSignatureParser.java
GenericSignatureParser.compareSignatures
public static boolean compareSignatures(String plainSignature, String genericSignature) { GenericSignatureParser plainParser = new GenericSignatureParser(plainSignature); GenericSignatureParser genericParser = new GenericSignatureParser(genericSignature); return plainParser.getNumParameters() =...
java
public static boolean compareSignatures(String plainSignature, String genericSignature) { GenericSignatureParser plainParser = new GenericSignatureParser(plainSignature); GenericSignatureParser genericParser = new GenericSignatureParser(genericSignature); return plainParser.getNumParameters() =...
[ "public", "static", "boolean", "compareSignatures", "(", "String", "plainSignature", ",", "String", "genericSignature", ")", "{", "GenericSignatureParser", "plainParser", "=", "new", "GenericSignatureParser", "(", "plainSignature", ")", ";", "GenericSignatureParser", "gen...
Compare a plain method signature to the a generic method Signature and return true if they match
[ "Compare", "a", "plain", "method", "signature", "to", "the", "a", "generic", "method", "Signature", "and", "return", "true", "if", "they", "match" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/generic/GenericSignatureParser.java#L245-L250
59,625
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/util/ClassPathUtil.java
ClassPathUtil.findCodeBaseInClassPath
public static String findCodeBaseInClassPath(Pattern codeBaseNamePattern, String classPath) { if (classPath == null) { return null; } StringTokenizer tok = new StringTokenizer(classPath, File.pathSeparator); while (tok.hasMoreTokens()) { String t = tok.nextToken(...
java
public static String findCodeBaseInClassPath(Pattern codeBaseNamePattern, String classPath) { if (classPath == null) { return null; } StringTokenizer tok = new StringTokenizer(classPath, File.pathSeparator); while (tok.hasMoreTokens()) { String t = tok.nextToken(...
[ "public", "static", "String", "findCodeBaseInClassPath", "(", "Pattern", "codeBaseNamePattern", ",", "String", "classPath", ")", "{", "if", "(", "classPath", "==", "null", ")", "{", "return", "null", ";", "}", "StringTokenizer", "tok", "=", "new", "StringTokeniz...
Try to find a codebase matching the given pattern in the given class path string. @param codeBaseNamePattern pattern describing a codebase (e.g., compiled from the regex "findbugs\\.jar$") @param classPath a classpath @return full path of named codebase, or null if the codebase couldn't be found
[ "Try", "to", "find", "a", "codebase", "matching", "the", "given", "pattern", "in", "the", "given", "class", "path", "string", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/util/ClassPathUtil.java#L75-L91
59,626
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/io/IO.java
IO.skipFully
public static void skipFully(InputStream in, long bytes) throws IOException { if (bytes < 0) { throw new IllegalArgumentException("Can't skip " + bytes + " bytes"); } long remaining = bytes; while (remaining > 0) { long skipped = in.skip(remaining); if...
java
public static void skipFully(InputStream in, long bytes) throws IOException { if (bytes < 0) { throw new IllegalArgumentException("Can't skip " + bytes + " bytes"); } long remaining = bytes; while (remaining > 0) { long skipped = in.skip(remaining); if...
[ "public", "static", "void", "skipFully", "(", "InputStream", "in", ",", "long", "bytes", ")", "throws", "IOException", "{", "if", "(", "bytes", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Can't skip \"", "+", "bytes", "+", "\" byt...
Provide a skip fully method. Either skips the requested number of bytes or throws an IOException; @param in The input stream on which to perform the skip @param bytes Number of bytes to skip @throws EOFException if we reach EOF and still need to skip more bytes @throws IOException if in.skip throws an IOException
[ "Provide", "a", "skip", "fully", "method", ".", "Either", "skips", "the", "requested", "number", "of", "bytes", "or", "throws", "an", "IOException", ";" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/io/IO.java#L245-L258
59,627
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionObjectType.java
ExceptionObjectType.fromExceptionSet
public static Type fromExceptionSet(ExceptionSet exceptionSet) throws ClassNotFoundException { Type commonSupertype = exceptionSet.getCommonSupertype(); if (commonSupertype.getType() != Const.T_OBJECT) { return commonSupertype; } ObjectType exceptionSupertype = (ObjectType) ...
java
public static Type fromExceptionSet(ExceptionSet exceptionSet) throws ClassNotFoundException { Type commonSupertype = exceptionSet.getCommonSupertype(); if (commonSupertype.getType() != Const.T_OBJECT) { return commonSupertype; } ObjectType exceptionSupertype = (ObjectType) ...
[ "public", "static", "Type", "fromExceptionSet", "(", "ExceptionSet", "exceptionSet", ")", "throws", "ClassNotFoundException", "{", "Type", "commonSupertype", "=", "exceptionSet", ".", "getCommonSupertype", "(", ")", ";", "if", "(", "commonSupertype", ".", "getType", ...
Initialize object from an exception set. @param exceptionSet the exception set @return a Type that is a supertype of all of the exceptions in the exception set
[ "Initialize", "object", "from", "an", "exception", "set", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/ExceptionObjectType.java#L60-L73
59,628
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/SignatureConverter.java
SignatureConverter.parseNext
public String parseNext() { StringBuilder result = new StringBuilder(); if (signature.startsWith("[")) { int dimensions = 0; do { ++dimensions; signature = signature.substring(1); } while (signature.charAt(0) == '['); resul...
java
public String parseNext() { StringBuilder result = new StringBuilder(); if (signature.startsWith("[")) { int dimensions = 0; do { ++dimensions; signature = signature.substring(1); } while (signature.charAt(0) == '['); resul...
[ "public", "String", "parseNext", "(", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "signature", ".", "startsWith", "(", "\"[\"", ")", ")", "{", "int", "dimensions", "=", "0", ";", "do", "{", "++", "dimensi...
Parse a single type out of the signature, starting at the beginning of the remaining part of the signature. For example, if the first character of the remaining part is "I", then this method will return "int", and the "I" will be consumed. Arrays, reference types, and basic types are all handled. @return the parsed ty...
[ "Parse", "a", "single", "type", "out", "of", "the", "signature", "starting", "at", "the", "beginning", "of", "the", "remaining", "part", "of", "the", "signature", ".", "For", "example", "if", "the", "first", "character", "of", "the", "remaining", "part", "...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/SignatureConverter.java#L78-L135
59,629
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AnalysisContext.java
AnalysisContext.reportMissingClass
static public void reportMissingClass(ClassNotFoundException e) { requireNonNull(e, "argument is null"); String missing = AbstractBugReporter.getMissingClassName(e); if (skipReportingMissingClass(missing)) { return; } if (!analyzingApplicationClass()) { re...
java
static public void reportMissingClass(ClassNotFoundException e) { requireNonNull(e, "argument is null"); String missing = AbstractBugReporter.getMissingClassName(e); if (skipReportingMissingClass(missing)) { return; } if (!analyzingApplicationClass()) { re...
[ "static", "public", "void", "reportMissingClass", "(", "ClassNotFoundException", "e", ")", "{", "requireNonNull", "(", "e", ",", "\"argument is null\"", ")", ";", "String", "missing", "=", "AbstractBugReporter", ".", "getMissingClassName", "(", "e", ")", ";", "if"...
file a ClassNotFoundException with the lookupFailureCallback @see #getLookupFailureCallback()
[ "file", "a", "ClassNotFoundException", "with", "the", "lookupFailureCallback" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AnalysisContext.java#L298-L312
59,630
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AnalysisContext.java
AnalysisContext.loadInterproceduralDatabases
public final void loadInterproceduralDatabases() { loadPropertyDatabase(getFieldStoreTypeDatabase(), FieldStoreTypeDatabase.DEFAULT_FILENAME, "field store type database"); loadPropertyDatabase(getUnconditionalDerefParamDatabase(), UNCONDITIONAL_DEREF_DB_FILENAME, "unconditional param der...
java
public final void loadInterproceduralDatabases() { loadPropertyDatabase(getFieldStoreTypeDatabase(), FieldStoreTypeDatabase.DEFAULT_FILENAME, "field store type database"); loadPropertyDatabase(getUnconditionalDerefParamDatabase(), UNCONDITIONAL_DEREF_DB_FILENAME, "unconditional param der...
[ "public", "final", "void", "loadInterproceduralDatabases", "(", ")", "{", "loadPropertyDatabase", "(", "getFieldStoreTypeDatabase", "(", ")", ",", "FieldStoreTypeDatabase", ".", "DEFAULT_FILENAME", ",", "\"field store type database\"", ")", ";", "loadPropertyDatabase", "(",...
If possible, load interprocedural property databases.
[ "If", "possible", "load", "interprocedural", "property", "databases", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AnalysisContext.java#L584-L589
59,631
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AnalysisContext.java
AnalysisContext.setDatabaseInputDir
public final void setDatabaseInputDir(String databaseInputDir) { if (DEBUG) { System.out.println("Setting database input directory: " + databaseInputDir); } this.databaseInputDir = databaseInputDir; }
java
public final void setDatabaseInputDir(String databaseInputDir) { if (DEBUG) { System.out.println("Setting database input directory: " + databaseInputDir); } this.databaseInputDir = databaseInputDir; }
[ "public", "final", "void", "setDatabaseInputDir", "(", "String", "databaseInputDir", ")", "{", "if", "(", "DEBUG", ")", "{", "System", ".", "out", ".", "println", "(", "\"Setting database input directory: \"", "+", "databaseInputDir", ")", ";", "}", "this", ".",...
Set the interprocedural database input directory. @param databaseInputDir the interprocedural database input directory
[ "Set", "the", "interprocedural", "database", "input", "directory", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AnalysisContext.java#L636-L641
59,632
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AnalysisContext.java
AnalysisContext.setDatabaseOutputDir
public final void setDatabaseOutputDir(String databaseOutputDir) { if (DEBUG) { System.out.println("Setting database output directory: " + databaseOutputDir); } this.databaseOutputDir = databaseOutputDir; }
java
public final void setDatabaseOutputDir(String databaseOutputDir) { if (DEBUG) { System.out.println("Setting database output directory: " + databaseOutputDir); } this.databaseOutputDir = databaseOutputDir; }
[ "public", "final", "void", "setDatabaseOutputDir", "(", "String", "databaseOutputDir", ")", "{", "if", "(", "DEBUG", ")", "{", "System", ".", "out", ".", "println", "(", "\"Setting database output directory: \"", "+", "databaseOutputDir", ")", ";", "}", "this", ...
Set the interprocedural database output directory. @param databaseOutputDir the interprocedural database output directory
[ "Set", "the", "interprocedural", "database", "output", "directory", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AnalysisContext.java#L658-L663
59,633
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AnalysisContext.java
AnalysisContext.storePropertyDatabase
public <DatabaseType extends PropertyDatabase<KeyType, Property>, KeyType extends FieldOrMethodDescriptor, Property> void storePropertyDatabase( DatabaseType database, String fileName, String description) { try { File dbFile = new File(getDatabaseOutputDir(), fileName); if (...
java
public <DatabaseType extends PropertyDatabase<KeyType, Property>, KeyType extends FieldOrMethodDescriptor, Property> void storePropertyDatabase( DatabaseType database, String fileName, String description) { try { File dbFile = new File(getDatabaseOutputDir(), fileName); if (...
[ "public", "<", "DatabaseType", "extends", "PropertyDatabase", "<", "KeyType", ",", "Property", ">", ",", "KeyType", "extends", "FieldOrMethodDescriptor", ",", "Property", ">", "void", "storePropertyDatabase", "(", "DatabaseType", "database", ",", "String", "fileName",...
Write an interprocedural property database. @param <DatabaseType> actual type of the database @param <KeyType> type of key (e.g., method or field) @param <Property> type of properties stored in the database @param database the database @param fileName name of database file @param description description of the databas...
[ "Write", "an", "interprocedural", "property", "database", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AnalysisContext.java#L765-L777
59,634
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AnalysisContext.java
AnalysisContext.setCurrentAnalysisContext
public static void setCurrentAnalysisContext(AnalysisContext analysisContext) { currentAnalysisContext.set(analysisContext); if (Global.getAnalysisCache() != null) { currentXFactory.set(new XFactory()); } }
java
public static void setCurrentAnalysisContext(AnalysisContext analysisContext) { currentAnalysisContext.set(analysisContext); if (Global.getAnalysisCache() != null) { currentXFactory.set(new XFactory()); } }
[ "public", "static", "void", "setCurrentAnalysisContext", "(", "AnalysisContext", "analysisContext", ")", "{", "currentAnalysisContext", ".", "set", "(", "analysisContext", ")", ";", "if", "(", "Global", ".", "getAnalysisCache", "(", ")", "!=", "null", ")", "{", ...
Set the current analysis context for this thread. @param analysisContext the current analysis context for this thread
[ "Set", "the", "current", "analysis", "context", "for", "this", "thread", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AnalysisContext.java#L785-L790
59,635
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AnalysisContext.java
AnalysisContext.getClassContext
public ClassContext getClassContext(JavaClass javaClass) { // This is a bit silly since we're doing an unnecessary // ClassDescriptor->JavaClass lookup. // However, we can be assured that it will succeed. ClassDescriptor classDescriptor = DescriptorFactory.instance().getClassDescriptor(...
java
public ClassContext getClassContext(JavaClass javaClass) { // This is a bit silly since we're doing an unnecessary // ClassDescriptor->JavaClass lookup. // However, we can be assured that it will succeed. ClassDescriptor classDescriptor = DescriptorFactory.instance().getClassDescriptor(...
[ "public", "ClassContext", "getClassContext", "(", "JavaClass", "javaClass", ")", "{", "// This is a bit silly since we're doing an unnecessary", "// ClassDescriptor->JavaClass lookup.", "// However, we can be assured that it will succeed.", "ClassDescriptor", "classDescriptor", "=", "Des...
Get the ClassContext for a class. @param javaClass the class @return the ClassContext for that class
[ "Get", "the", "ClassContext", "for", "a", "class", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AnalysisContext.java#L856-L871
59,636
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BlockType.java
BlockType.copyFrom
public void copyFrom(BlockType other) { this.isValid = other.isValid; this.isTop = other.isTop; if (isValid) { this.depth = other.depth; this.clear(); this.or(other); } }
java
public void copyFrom(BlockType other) { this.isValid = other.isValid; this.isTop = other.isTop; if (isValid) { this.depth = other.depth; this.clear(); this.or(other); } }
[ "public", "void", "copyFrom", "(", "BlockType", "other", ")", "{", "this", ".", "isValid", "=", "other", ".", "isValid", ";", "this", ".", "isTop", "=", "other", ".", "isTop", ";", "if", "(", "isValid", ")", "{", "this", ".", "depth", "=", "other", ...
Make this object an exact duplicate of given object. @param other the other BlockType object
[ "Make", "this", "object", "an", "exact", "duplicate", "of", "given", "object", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BlockType.java#L187-L195
59,637
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BlockType.java
BlockType.sameAs
public boolean sameAs(BlockType other) { if (!this.isValid) { return !other.isValid && (this.isTop == other.isTop); } else { if (!other.isValid) { return false; } else { // Both facts are valid if (this.depth != other.de...
java
public boolean sameAs(BlockType other) { if (!this.isValid) { return !other.isValid && (this.isTop == other.isTop); } else { if (!other.isValid) { return false; } else { // Both facts are valid if (this.depth != other.de...
[ "public", "boolean", "sameAs", "(", "BlockType", "other", ")", "{", "if", "(", "!", "this", ".", "isValid", ")", "{", "return", "!", "other", ".", "isValid", "&&", "(", "this", ".", "isTop", "==", "other", ".", "isTop", ")", ";", "}", "else", "{", ...
Return whether or not this object is identical to the one given. @param other the other BlockType object @return true if this object is identical to the one given, false otherwise
[ "Return", "whether", "or", "not", "this", "object", "is", "identical", "to", "the", "one", "given", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BlockType.java#L205-L227
59,638
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BlockType.java
BlockType.mergeWith
public void mergeWith(BlockType other) { if (this.isTop() || other.isBottom()) { copyFrom(other); } else if (isValid()) { // To merge, we take the common prefix int pfxLen = Math.min(this.depth, other.depth); int commonLen; for (commonLen = 0; ...
java
public void mergeWith(BlockType other) { if (this.isTop() || other.isBottom()) { copyFrom(other); } else if (isValid()) { // To merge, we take the common prefix int pfxLen = Math.min(this.depth, other.depth); int commonLen; for (commonLen = 0; ...
[ "public", "void", "mergeWith", "(", "BlockType", "other", ")", "{", "if", "(", "this", ".", "isTop", "(", ")", "||", "other", ".", "isBottom", "(", ")", ")", "{", "copyFrom", "(", "other", ")", ";", "}", "else", "if", "(", "isValid", "(", ")", ")...
Merge other dataflow value into this value. @param other the other BlockType value
[ "Merge", "other", "dataflow", "value", "into", "this", "value", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BlockType.java#L235-L249
59,639
spotbugs/spotbugs
eclipsePlugin/src/edu/umd/cs/findbugs/plugin/eclipse/quickfix/QuickFixesExtensionHelper.java
QuickFixesExtensionHelper.getContributedQuickFixes
public static synchronized Map<String, List<QuickFixContribution>> getContributedQuickFixes() { if (contributedQuickFixes != null) { return contributedQuickFixes; } HashMap<String, List<QuickFixContribution>> set = new HashMap<>(); IExtensionRegistry registry = Platform.getE...
java
public static synchronized Map<String, List<QuickFixContribution>> getContributedQuickFixes() { if (contributedQuickFixes != null) { return contributedQuickFixes; } HashMap<String, List<QuickFixContribution>> set = new HashMap<>(); IExtensionRegistry registry = Platform.getE...
[ "public", "static", "synchronized", "Map", "<", "String", ",", "List", "<", "QuickFixContribution", ">", ">", "getContributedQuickFixes", "(", ")", "{", "if", "(", "contributedQuickFixes", "!=", "null", ")", "{", "return", "contributedQuickFixes", ";", "}", "Has...
key is the pattern id, the value is the corresponding contribution
[ "key", "is", "the", "pattern", "id", "the", "value", "is", "the", "corresponding", "contribution" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/edu/umd/cs/findbugs/plugin/eclipse/quickfix/QuickFixesExtensionHelper.java#L57-L73
59,640
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java
TypeQualifierApplications.getDirectApplications
public static void getDirectApplications(Set<TypeQualifierAnnotation> result, XMethod o, int parameter) { Collection<AnnotationValue> values = getDirectAnnotation(o, parameter); for (AnnotationValue v : values) { constructTypeQualifierAnnotation(result, v); } }
java
public static void getDirectApplications(Set<TypeQualifierAnnotation> result, XMethod o, int parameter) { Collection<AnnotationValue> values = getDirectAnnotation(o, parameter); for (AnnotationValue v : values) { constructTypeQualifierAnnotation(result, v); } }
[ "public", "static", "void", "getDirectApplications", "(", "Set", "<", "TypeQualifierAnnotation", ">", "result", ",", "XMethod", "o", ",", "int", "parameter", ")", "{", "Collection", "<", "AnnotationValue", ">", "values", "=", "getDirectAnnotation", "(", "o", ","...
Populate a Set of TypeQualifierAnnotations representing directly-applied type qualifier annotations on given method parameter. @param result Set of TypeQualifierAnnotations @param o a method @param parameter a parameter (0 == first parameter)
[ "Populate", "a", "Set", "of", "TypeQualifierAnnotations", "representing", "directly", "-", "applied", "type", "qualifier", "annotations", "on", "given", "method", "parameter", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java#L214-L220
59,641
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java
TypeQualifierApplications.getDirectApplications
public static void getDirectApplications(Set<TypeQualifierAnnotation> result, AnnotatedObject o, ElementType e) { if (!o.getElementType().equals(e)) { return; } Collection<AnnotationValue> values = getDirectAnnotation(o); for (AnnotationValue v : values) { constru...
java
public static void getDirectApplications(Set<TypeQualifierAnnotation> result, AnnotatedObject o, ElementType e) { if (!o.getElementType().equals(e)) { return; } Collection<AnnotationValue> values = getDirectAnnotation(o); for (AnnotationValue v : values) { constru...
[ "public", "static", "void", "getDirectApplications", "(", "Set", "<", "TypeQualifierAnnotation", ">", "result", ",", "AnnotatedObject", "o", ",", "ElementType", "e", ")", "{", "if", "(", "!", "o", ".", "getElementType", "(", ")", ".", "equals", "(", "e", "...
Populate a Set of TypeQualifierAnnotations representing directly-applied type qualifier annotations on given AnnotatedObject. @param result Set of TypeQualifierAnnotations @param o an AnnotatedObject @param e ElementType representing kind of annotated object
[ "Populate", "a", "Set", "of", "TypeQualifierAnnotations", "representing", "directly", "-", "applied", "type", "qualifier", "annotations", "on", "given", "AnnotatedObject", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java#L233-L242
59,642
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java
TypeQualifierApplications.constructTypeQualifierAnnotation
public static TypeQualifierAnnotation constructTypeQualifierAnnotation(AnnotationValue v) { assert v != null; EnumValue whenValue = (EnumValue) v.getValue("when"); When when = whenValue == null ? When.ALWAYS : When.valueOf(whenValue.value); ClassDescriptor annotationClass = v.getAnnotati...
java
public static TypeQualifierAnnotation constructTypeQualifierAnnotation(AnnotationValue v) { assert v != null; EnumValue whenValue = (EnumValue) v.getValue("when"); When when = whenValue == null ? When.ALWAYS : When.valueOf(whenValue.value); ClassDescriptor annotationClass = v.getAnnotati...
[ "public", "static", "TypeQualifierAnnotation", "constructTypeQualifierAnnotation", "(", "AnnotationValue", "v", ")", "{", "assert", "v", "!=", "null", ";", "EnumValue", "whenValue", "=", "(", "EnumValue", ")", "v", ".", "getValue", "(", "\"when\"", ")", ";", "Wh...
Resolve a raw AnnotationValue into a TypeQualifierAnnotation. @param v a raw AnnotationValue @return a constructed TypeQualifierAnnotation
[ "Resolve", "a", "raw", "AnnotationValue", "into", "a", "TypeQualifierAnnotation", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java#L251-L259
59,643
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java
TypeQualifierApplications.constructTypeQualifierAnnotation
public static void constructTypeQualifierAnnotation(Set<TypeQualifierAnnotation> set, AnnotationValue v) { assert set != null; TypeQualifierAnnotation tqa = constructTypeQualifierAnnotation(v); set.add(tqa); }
java
public static void constructTypeQualifierAnnotation(Set<TypeQualifierAnnotation> set, AnnotationValue v) { assert set != null; TypeQualifierAnnotation tqa = constructTypeQualifierAnnotation(v); set.add(tqa); }
[ "public", "static", "void", "constructTypeQualifierAnnotation", "(", "Set", "<", "TypeQualifierAnnotation", ">", "set", ",", "AnnotationValue", "v", ")", "{", "assert", "set", "!=", "null", ";", "TypeQualifierAnnotation", "tqa", "=", "constructTypeQualifierAnnotation", ...
Resolve a raw AnnotationValue into a TypeQualifierAnnotation, storing result in given Set. @param set Set of resolved TypeQualifierAnnotations @param v a raw AnnotationValue
[ "Resolve", "a", "raw", "AnnotationValue", "into", "a", "TypeQualifierAnnotation", "storing", "result", "in", "given", "Set", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java#L270-L274
59,644
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java
TypeQualifierApplications.findMatchingTypeQualifierAnnotation
private static @CheckForNull TypeQualifierAnnotation findMatchingTypeQualifierAnnotation(Collection<TypeQualifierAnnotation> typeQualifierAnnotations, TypeQualifierValue<?> typeQualifierValue) { for (TypeQualifierAnnotation typeQualifierAnnotation : typeQualifierAnnotations) { if (ty...
java
private static @CheckForNull TypeQualifierAnnotation findMatchingTypeQualifierAnnotation(Collection<TypeQualifierAnnotation> typeQualifierAnnotations, TypeQualifierValue<?> typeQualifierValue) { for (TypeQualifierAnnotation typeQualifierAnnotation : typeQualifierAnnotations) { if (ty...
[ "private", "static", "@", "CheckForNull", "TypeQualifierAnnotation", "findMatchingTypeQualifierAnnotation", "(", "Collection", "<", "TypeQualifierAnnotation", ">", "typeQualifierAnnotations", ",", "TypeQualifierValue", "<", "?", ">", "typeQualifierValue", ")", "{", "for", "...
Look up a TypeQualifierAnnotation matching given TypeQualifierValue. @param typeQualifierAnnotations a Collection of TypeQualifierAnnotations @param typeQualifierValue a TypeQualifierValue @return matching TypeQualifierAnnotation, or null if none
[ "Look", "up", "a", "TypeQualifierAnnotation", "matching", "given", "TypeQualifierValue", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java#L387-L396
59,645
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java
TypeQualifierApplications.getDefaultAnnotation
private static @CheckForNull TypeQualifierAnnotation getDefaultAnnotation(AnnotatedObject o, TypeQualifierValue<?> typeQualifierValue, ElementType elementType) { // // Try to find a default annotation using the standard JSR-305 // default annotation mechanism. // TypeQualifie...
java
private static @CheckForNull TypeQualifierAnnotation getDefaultAnnotation(AnnotatedObject o, TypeQualifierValue<?> typeQualifierValue, ElementType elementType) { // // Try to find a default annotation using the standard JSR-305 // default annotation mechanism. // TypeQualifie...
[ "private", "static", "@", "CheckForNull", "TypeQualifierAnnotation", "getDefaultAnnotation", "(", "AnnotatedObject", "o", ",", "TypeQualifierValue", "<", "?", ">", "typeQualifierValue", ",", "ElementType", "elementType", ")", "{", "//", "// Try to find a default annotation ...
Look for a default type qualifier annotation. @param o an AnnotatedObject @param typeQualifierValue a TypeQualifierValue @param elementType type of element for which we're looking for a default annotation @return default TypeQualifierAnnotation, or null if none
[ "Look", "for", "a", "default", "type", "qualifier", "annotation", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java#L410-L464
59,646
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java
TypeQualifierApplications.getDirectTypeQualifierAnnotation
private static TypeQualifierAnnotation getDirectTypeQualifierAnnotation(AnnotatedObject o, TypeQualifierValue<?> typeQualifierValue) { TypeQualifierAnnotation result; Set<TypeQualifierAnnotation> applications = new HashSet<>(); getDirectApplications(applications, o, o.getElementType...
java
private static TypeQualifierAnnotation getDirectTypeQualifierAnnotation(AnnotatedObject o, TypeQualifierValue<?> typeQualifierValue) { TypeQualifierAnnotation result; Set<TypeQualifierAnnotation> applications = new HashSet<>(); getDirectApplications(applications, o, o.getElementType...
[ "private", "static", "TypeQualifierAnnotation", "getDirectTypeQualifierAnnotation", "(", "AnnotatedObject", "o", ",", "TypeQualifierValue", "<", "?", ">", "typeQualifierValue", ")", "{", "TypeQualifierAnnotation", "result", ";", "Set", "<", "TypeQualifierAnnotation", ">", ...
Get a directly-applied TypeQualifierAnnotation on given AnnotatedObject. @param o an AnnotatedObject @param typeQualifierValue the kind of TypeQualifierValue we are looking for @return directly-applied TypeQualifierAnnotation, or null if there is no such annotation on the AnnotatedObject
[ "Get", "a", "directly", "-", "applied", "TypeQualifierAnnotation", "on", "given", "AnnotatedObject", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java#L660-L670
59,647
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java
TypeQualifierApplications.getInheritedTypeQualifierAnnotation
public static TypeQualifierAnnotation getInheritedTypeQualifierAnnotation(XMethod o, TypeQualifierValue<?> typeQualifierValue) { assert !o.isStatic(); ReturnTypeAnnotationAccumulator accumulator = new ReturnTypeAnnotationAccumulator(typeQualifierValue, o); try { AnalysisContext.curr...
java
public static TypeQualifierAnnotation getInheritedTypeQualifierAnnotation(XMethod o, TypeQualifierValue<?> typeQualifierValue) { assert !o.isStatic(); ReturnTypeAnnotationAccumulator accumulator = new ReturnTypeAnnotationAccumulator(typeQualifierValue, o); try { AnalysisContext.curr...
[ "public", "static", "TypeQualifierAnnotation", "getInheritedTypeQualifierAnnotation", "(", "XMethod", "o", ",", "TypeQualifierValue", "<", "?", ">", "typeQualifierValue", ")", "{", "assert", "!", "o", ".", "isStatic", "(", ")", ";", "ReturnTypeAnnotationAccumulator", ...
Get the effective inherited TypeQualifierAnnotation on given instance method. @param o an XMethod @param typeQualifierValue the kind of TypeQualifierValue we are looking for @return effective TypeQualifierAnnotation inherited from overridden supertype methods, or null if there is no inherited TypeQualifierAnnotation
[ "Get", "the", "effective", "inherited", "TypeQualifierAnnotation", "on", "given", "instance", "method", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java#L684-L699
59,648
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java
TypeQualifierApplications.getDirectTypeQualifierAnnotation
public static @CheckForNull @CheckReturnValue TypeQualifierAnnotation getDirectTypeQualifierAnnotation(XMethod xmethod, int parameter, TypeQualifierValue<?> typeQualifierValue) { XMethod bridge = xmethod.bridgeTo(); if (bridge != null) { xmethod = bridge; } Set<TypeQualif...
java
public static @CheckForNull @CheckReturnValue TypeQualifierAnnotation getDirectTypeQualifierAnnotation(XMethod xmethod, int parameter, TypeQualifierValue<?> typeQualifierValue) { XMethod bridge = xmethod.bridgeTo(); if (bridge != null) { xmethod = bridge; } Set<TypeQualif...
[ "public", "static", "@", "CheckForNull", "@", "CheckReturnValue", "TypeQualifierAnnotation", "getDirectTypeQualifierAnnotation", "(", "XMethod", "xmethod", ",", "int", "parameter", ",", "TypeQualifierValue", "<", "?", ">", "typeQualifierValue", ")", "{", "XMethod", "bri...
Get the TypeQualifierAnnotation directly applied to given method parameter. @param xmethod a method @param parameter a parameter (0 == first parameter) @param typeQualifierValue the kind of TypeQualifierValue we are looking for @return TypeQualifierAnnotation directly applied to the parameter, or null if there is no d...
[ "Get", "the", "TypeQualifierAnnotation", "directly", "applied", "to", "given", "method", "parameter", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java#L924-L937
59,649
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java
TypeQualifierApplications.getInheritedTypeQualifierAnnotation
public static @CheckForNull TypeQualifierAnnotation getInheritedTypeQualifierAnnotation(XMethod xmethod, int parameter, TypeQualifierValue<?> typeQualifierValue) { assert !xmethod.isStatic(); ParameterAnnotationAccumulator accumulator = new ParameterAnnotationAccumulator(typeQualifierVa...
java
public static @CheckForNull TypeQualifierAnnotation getInheritedTypeQualifierAnnotation(XMethod xmethod, int parameter, TypeQualifierValue<?> typeQualifierValue) { assert !xmethod.isStatic(); ParameterAnnotationAccumulator accumulator = new ParameterAnnotationAccumulator(typeQualifierVa...
[ "public", "static", "@", "CheckForNull", "TypeQualifierAnnotation", "getInheritedTypeQualifierAnnotation", "(", "XMethod", "xmethod", ",", "int", "parameter", ",", "TypeQualifierValue", "<", "?", ">", "typeQualifierValue", ")", "{", "assert", "!", "xmethod", ".", "isS...
Get the effective inherited TypeQualifierAnnotation on the given instance method parameter. @param xmethod an instance method @param parameter a parameter (0 == first parameter) @param typeQualifierValue the kind of TypeQualifierValue we are looking for @return effective inherited TypeQualifierAnnotation on the parame...
[ "Get", "the", "effective", "inherited", "TypeQualifierAnnotation", "on", "the", "given", "instance", "method", "parameter", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java#L952-L969
59,650
spotbugs/spotbugs
spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/SorterDialog.java
SorterDialog.setSorterCheckBoxes
private void setSorterCheckBoxes() { SorterTableColumnModel sorter = MainFrame.getInstance().getSorter(); for (SortableCheckBox c : checkBoxSortList) { c.setSelected(sorter.isShown(c.sortable)); } }
java
private void setSorterCheckBoxes() { SorterTableColumnModel sorter = MainFrame.getInstance().getSorter(); for (SortableCheckBox c : checkBoxSortList) { c.setSelected(sorter.isShown(c.sortable)); } }
[ "private", "void", "setSorterCheckBoxes", "(", ")", "{", "SorterTableColumnModel", "sorter", "=", "MainFrame", ".", "getInstance", "(", ")", ".", "getSorter", "(", ")", ";", "for", "(", "SortableCheckBox", "c", ":", "checkBoxSortList", ")", "{", "c", ".", "s...
Sets the checkboxes in the sorter panel to what is shown in the MainFrame. This assumes that sorterTableColumnModel will return the list of which box is checked in the same order as the order that sorter panel has.
[ "Sets", "the", "checkboxes", "in", "the", "sorter", "panel", "to", "what", "is", "shown", "in", "the", "MainFrame", ".", "This", "assumes", "that", "sorterTableColumnModel", "will", "return", "the", "list", "of", "which", "box", "is", "checked", "in", "the",...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/SorterDialog.java#L155-L162
59,651
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java
MethodAnnotation.fromVisitedMethod
public static MethodAnnotation fromVisitedMethod(PreorderVisitor visitor) { String className = visitor.getDottedClassName(); MethodAnnotation result = new MethodAnnotation(className, visitor.getMethodName(), visitor.getMethodSig(), visitor .getMethod().isStatic()); // Try to fin...
java
public static MethodAnnotation fromVisitedMethod(PreorderVisitor visitor) { String className = visitor.getDottedClassName(); MethodAnnotation result = new MethodAnnotation(className, visitor.getMethodName(), visitor.getMethodSig(), visitor .getMethod().isStatic()); // Try to fin...
[ "public", "static", "MethodAnnotation", "fromVisitedMethod", "(", "PreorderVisitor", "visitor", ")", "{", "String", "className", "=", "visitor", ".", "getDottedClassName", "(", ")", ";", "MethodAnnotation", "result", "=", "new", "MethodAnnotation", "(", "className", ...
Factory method to create a MethodAnnotation from the method the given visitor is currently visiting. @param visitor the BetterVisitor currently visiting the method
[ "Factory", "method", "to", "create", "a", "MethodAnnotation", "from", "the", "method", "the", "given", "visitor", "is", "currently", "visiting", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java#L124-L134
59,652
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java
MethodAnnotation.fromCalledMethod
public static MethodAnnotation fromCalledMethod(DismantleBytecode visitor) { String className = visitor.getDottedClassConstantOperand(); String methodName = visitor.getNameConstantOperand(); String methodSig = visitor.getSigConstantOperand(); if (visitor instanceof OpcodeStackDetector &...
java
public static MethodAnnotation fromCalledMethod(DismantleBytecode visitor) { String className = visitor.getDottedClassConstantOperand(); String methodName = visitor.getNameConstantOperand(); String methodSig = visitor.getSigConstantOperand(); if (visitor instanceof OpcodeStackDetector &...
[ "public", "static", "MethodAnnotation", "fromCalledMethod", "(", "DismantleBytecode", "visitor", ")", "{", "String", "className", "=", "visitor", ".", "getDottedClassConstantOperand", "(", ")", ";", "String", "methodName", "=", "visitor", ".", "getNameConstantOperand", ...
Factory method to create a MethodAnnotation from a method called by the instruction the given visitor is currently visiting. @param visitor the visitor @return the MethodAnnotation representing the called method
[ "Factory", "method", "to", "create", "a", "MethodAnnotation", "from", "a", "method", "called", "by", "the", "instruction", "the", "given", "visitor", "is", "currently", "visiting", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java#L144-L164
59,653
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java
MethodAnnotation.fromCalledMethod
public static MethodAnnotation fromCalledMethod(String className, String methodName, String methodSig, boolean isStatic) { MethodAnnotation methodAnnotation = fromForeignMethod(className, methodName, methodSig, isStatic); methodAnnotation.setDescription(METHOD_CALLED); return methodAnnotation; ...
java
public static MethodAnnotation fromCalledMethod(String className, String methodName, String methodSig, boolean isStatic) { MethodAnnotation methodAnnotation = fromForeignMethod(className, methodName, methodSig, isStatic); methodAnnotation.setDescription(METHOD_CALLED); return methodAnnotation; ...
[ "public", "static", "MethodAnnotation", "fromCalledMethod", "(", "String", "className", ",", "String", "methodName", ",", "String", "methodSig", ",", "boolean", "isStatic", ")", "{", "MethodAnnotation", "methodAnnotation", "=", "fromForeignMethod", "(", "className", "...
Create a MethodAnnotation from a method that is not directly accessible. We will use the repository to try to find its class in order to populate the information as fully as possible. @param className class containing called method @param methodName name of called method @param methodSig signature of called method @pa...
[ "Create", "a", "MethodAnnotation", "from", "a", "method", "that", "is", "not", "directly", "accessible", ".", "We", "will", "use", "the", "repository", "to", "try", "to", "find", "its", "class", "in", "order", "to", "populate", "the", "information", "as", ...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java#L247-L253
59,654
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java
MethodAnnotation.fromXMethod
public static MethodAnnotation fromXMethod(XMethod xmethod) { return fromForeignMethod(xmethod.getClassName(), xmethod.getName(), xmethod.getSignature(), xmethod.isStatic()); }
java
public static MethodAnnotation fromXMethod(XMethod xmethod) { return fromForeignMethod(xmethod.getClassName(), xmethod.getName(), xmethod.getSignature(), xmethod.isStatic()); }
[ "public", "static", "MethodAnnotation", "fromXMethod", "(", "XMethod", "xmethod", ")", "{", "return", "fromForeignMethod", "(", "xmethod", ".", "getClassName", "(", ")", ",", "xmethod", ".", "getName", "(", ")", ",", "xmethod", ".", "getSignature", "(", ")", ...
Create a MethodAnnotation from an XMethod. @param xmethod the XMethod @return the MethodAnnotation
[ "Create", "a", "MethodAnnotation", "from", "an", "XMethod", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java#L262-L264
59,655
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java
MethodAnnotation.fromMethodDescriptor
public static MethodAnnotation fromMethodDescriptor(MethodDescriptor methodDescriptor) { return fromForeignMethod(methodDescriptor.getSlashedClassName(), methodDescriptor.getName(), methodDescriptor.getSignature(), methodDescriptor.isStatic()); }
java
public static MethodAnnotation fromMethodDescriptor(MethodDescriptor methodDescriptor) { return fromForeignMethod(methodDescriptor.getSlashedClassName(), methodDescriptor.getName(), methodDescriptor.getSignature(), methodDescriptor.isStatic()); }
[ "public", "static", "MethodAnnotation", "fromMethodDescriptor", "(", "MethodDescriptor", "methodDescriptor", ")", "{", "return", "fromForeignMethod", "(", "methodDescriptor", ".", "getSlashedClassName", "(", ")", ",", "methodDescriptor", ".", "getName", "(", ")", ",", ...
Create a MethodAnnotation from a MethodDescriptor. @param methodDescriptor the MethodDescriptor @return the MethodAnnotation
[ "Create", "a", "MethodAnnotation", "from", "a", "MethodDescriptor", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java#L273-L276
59,656
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/DiscoverSourceDirectories.java
DiscoverSourceDirectories.execute
public void execute() throws CheckedAnalysisException, IOException, InterruptedException { File dir = new File(rootSourceDirectory); if (!dir.isDirectory()) { throw new IOException("Path " + rootSourceDirectory + " is not a directory"); } // Find all directories underneath t...
java
public void execute() throws CheckedAnalysisException, IOException, InterruptedException { File dir = new File(rootSourceDirectory); if (!dir.isDirectory()) { throw new IOException("Path " + rootSourceDirectory + " is not a directory"); } // Find all directories underneath t...
[ "public", "void", "execute", "(", ")", "throws", "CheckedAnalysisException", ",", "IOException", ",", "InterruptedException", "{", "File", "dir", "=", "new", "File", "(", "rootSourceDirectory", ")", ";", "if", "(", "!", "dir", ".", "isDirectory", "(", ")", "...
Execute the search for source directories. @throws edu.umd.cs.findbugs.classfile.CheckedAnalysisException @throws java.io.IOException @throws java.lang.InterruptedException
[ "Execute", "the", "search", "for", "source", "directories", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/DiscoverSourceDirectories.java#L232-L263
59,657
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/builder/ResourceUtils.java
ResourceUtils.addFiles
public static void addFiles(final Project findBugsProject, File clzDir, final Pattern pat) { if (clzDir.isDirectory()) { clzDir.listFiles(new FileCollector(pat, findBugsProject)); } }
java
public static void addFiles(final Project findBugsProject, File clzDir, final Pattern pat) { if (clzDir.isDirectory()) { clzDir.listFiles(new FileCollector(pat, findBugsProject)); } }
[ "public", "static", "void", "addFiles", "(", "final", "Project", "findBugsProject", ",", "File", "clzDir", ",", "final", "Pattern", "pat", ")", "{", "if", "(", "clzDir", ".", "isDirectory", "(", ")", ")", "{", "clzDir", ".", "listFiles", "(", "new", "Fil...
recurse add all the files matching given name pattern inside the given directory and all subdirectories
[ "recurse", "add", "all", "the", "files", "matching", "given", "name", "pattern", "inside", "the", "given", "directory", "and", "all", "subdirectories" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/builder/ResourceUtils.java#L107-L111
59,658
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/builder/ResourceUtils.java
ResourceUtils.mapResource
private static void mapResource(WorkItem resource, Map<IProject, List<WorkItem>> projectsMap, boolean checkJavaProject) { IProject project = resource.getProject(); if (checkJavaProject && !ProjectUtilities.isJavaProject(project)) { // non java projects: can happen only for changesets ...
java
private static void mapResource(WorkItem resource, Map<IProject, List<WorkItem>> projectsMap, boolean checkJavaProject) { IProject project = resource.getProject(); if (checkJavaProject && !ProjectUtilities.isJavaProject(project)) { // non java projects: can happen only for changesets ...
[ "private", "static", "void", "mapResource", "(", "WorkItem", "resource", ",", "Map", "<", "IProject", ",", "List", "<", "WorkItem", ">", ">", "projectsMap", ",", "boolean", "checkJavaProject", ")", "{", "IProject", "project", "=", "resource", ".", "getProject"...
Maps the resource into its project @param resource @param projectsMap
[ "Maps", "the", "resource", "into", "its", "project" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/builder/ResourceUtils.java#L257-L274
59,659
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/builder/ResourceUtils.java
ResourceUtils.getResources
@SuppressWarnings("restriction") public static List<WorkItem> getResources(ChangeSet set) { if (set != null && !set.isEmpty()) { IResource[] resources = set.getResources(); List<WorkItem> filtered = new ArrayList<>(); for (IResource resource : resources) { ...
java
@SuppressWarnings("restriction") public static List<WorkItem> getResources(ChangeSet set) { if (set != null && !set.isEmpty()) { IResource[] resources = set.getResources(); List<WorkItem> filtered = new ArrayList<>(); for (IResource resource : resources) { ...
[ "@", "SuppressWarnings", "(", "\"restriction\"", ")", "public", "static", "List", "<", "WorkItem", ">", "getResources", "(", "ChangeSet", "set", ")", "{", "if", "(", "set", "!=", "null", "&&", "!", "set", ".", "isEmpty", "(", ")", ")", "{", "IResource", ...
Extracts only files from a change set @param set @return
[ "Extracts", "only", "files", "from", "a", "change", "set" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/builder/ResourceUtils.java#L282-L300
59,660
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/builder/ResourceUtils.java
ResourceUtils.getResource
@javax.annotation.CheckForNull public static IResource getResource(Object element) { if (element instanceof IJavaElement) { return ((IJavaElement) element).getResource(); } return Util.getAdapter(IResource.class, element); }
java
@javax.annotation.CheckForNull public static IResource getResource(Object element) { if (element instanceof IJavaElement) { return ((IJavaElement) element).getResource(); } return Util.getAdapter(IResource.class, element); }
[ "@", "javax", ".", "annotation", ".", "CheckForNull", "public", "static", "IResource", "getResource", "(", "Object", "element", ")", "{", "if", "(", "element", "instanceof", "IJavaElement", ")", "{", "return", "(", "(", "IJavaElement", ")", "element", ")", "...
Convenient method to get resources from adaptables @param element an IAdaptable object which may provide an adapter for IResource @return resource object or null
[ "Convenient", "method", "to", "get", "resources", "from", "adaptables" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/builder/ResourceUtils.java#L378-L385
59,661
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/npe/TypeQualifierNullnessAnnotationDatabase.java
TypeQualifierNullnessAnnotationDatabase.getNullnessAnnotationClassDescriptor
private ClassDescriptor getNullnessAnnotationClassDescriptor(NullnessAnnotation n) { if (n == NullnessAnnotation.CHECK_FOR_NULL) { return JSR305NullnessAnnotations.CHECK_FOR_NULL; } else if (n == NullnessAnnotation.NONNULL) { return JSR305NullnessAnnotations.NONNULL; } el...
java
private ClassDescriptor getNullnessAnnotationClassDescriptor(NullnessAnnotation n) { if (n == NullnessAnnotation.CHECK_FOR_NULL) { return JSR305NullnessAnnotations.CHECK_FOR_NULL; } else if (n == NullnessAnnotation.NONNULL) { return JSR305NullnessAnnotations.NONNULL; } el...
[ "private", "ClassDescriptor", "getNullnessAnnotationClassDescriptor", "(", "NullnessAnnotation", "n", ")", "{", "if", "(", "n", "==", "NullnessAnnotation", ".", "CHECK_FOR_NULL", ")", "{", "return", "JSR305NullnessAnnotations", ".", "CHECK_FOR_NULL", ";", "}", "else", ...
Convert a NullnessAnnotation into the ClassDescriptor of the equivalent JSR-305 nullness type qualifier. @param n a NullnessAnnotation @return ClassDescriptor of the equivalent JSR-305 nullness type qualifier
[ "Convert", "a", "NullnessAnnotation", "into", "the", "ClassDescriptor", "of", "the", "equivalent", "JSR", "-", "305", "nullness", "type", "qualifier", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/npe/TypeQualifierNullnessAnnotationDatabase.java#L222-L234
59,662
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/SortedBugCollection.java
SortedBugCollection.addAll
public void addAll(Collection<BugInstance> collection, boolean updateActiveTime) { for (BugInstance warning : collection) { add(warning, updateActiveTime); } }
java
public void addAll(Collection<BugInstance> collection, boolean updateActiveTime) { for (BugInstance warning : collection) { add(warning, updateActiveTime); } }
[ "public", "void", "addAll", "(", "Collection", "<", "BugInstance", ">", "collection", ",", "boolean", "updateActiveTime", ")", "{", "for", "(", "BugInstance", "warning", ":", "collection", ")", "{", "add", "(", "warning", ",", "updateActiveTime", ")", ";", "...
Add a Collection of BugInstances to this BugCollection object. @param collection the Collection of BugInstances to add @param updateActiveTime true if active time of added BugInstances should be updated to match collection: false if not
[ "Add", "a", "Collection", "of", "BugInstances", "to", "this", "BugCollection", "object", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/SortedBugCollection.java#L207-L211
59,663
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/SortedBugCollection.java
SortedBugCollection.getCurrentAppVersion
@Override public AppVersion getCurrentAppVersion() { return new AppVersion(getSequenceNumber()).setReleaseName(getReleaseName()).setTimestamp(getTimestamp()) .setNumClasses(getProjectStats().getNumClasses()).setCodeSize(getProjectStats().getCodeSize()); }
java
@Override public AppVersion getCurrentAppVersion() { return new AppVersion(getSequenceNumber()).setReleaseName(getReleaseName()).setTimestamp(getTimestamp()) .setNumClasses(getProjectStats().getNumClasses()).setCodeSize(getProjectStats().getCodeSize()); }
[ "@", "Override", "public", "AppVersion", "getCurrentAppVersion", "(", ")", "{", "return", "new", "AppVersion", "(", "getSequenceNumber", "(", ")", ")", ".", "setReleaseName", "(", "getReleaseName", "(", ")", ")", ".", "setTimestamp", "(", "getTimestamp", "(", ...
Get the current AppVersion.
[ "Get", "the", "current", "AppVersion", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/SortedBugCollection.java#L242-L246
59,664
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/SortedBugCollection.java
SortedBugCollection.readXML
public void readXML(File file) throws IOException, DocumentException { project.setCurrentWorkingDirectory(file.getParentFile()); dataSource = file.getAbsolutePath(); InputStream in = progessMonitoredInputStream(file, "Loading analysis"); try { readXML(in, file); } cat...
java
public void readXML(File file) throws IOException, DocumentException { project.setCurrentWorkingDirectory(file.getParentFile()); dataSource = file.getAbsolutePath(); InputStream in = progessMonitoredInputStream(file, "Loading analysis"); try { readXML(in, file); } cat...
[ "public", "void", "readXML", "(", "File", "file", ")", "throws", "IOException", ",", "DocumentException", "{", "project", ".", "setCurrentWorkingDirectory", "(", "file", ".", "getParentFile", "(", ")", ")", ";", "dataSource", "=", "file", ".", "getAbsolutePath",...
Read XML data from given file into this object, populating given Project as a side effect. @param file the file
[ "Read", "XML", "data", "from", "given", "file", "into", "this", "object", "populating", "given", "Project", "as", "a", "side", "effect", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/SortedBugCollection.java#L267-L278
59,665
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/SortedBugCollection.java
SortedBugCollection.toDocument
@Override public Document toDocument() { // if (project == null) throw new NullPointerException("No project"); assert project != null; DocumentFactory docFactory = new DocumentFactory(); Document document = docFactory.createDocument(); Dom4JXMLOutput treeBuilder = new Dom4JX...
java
@Override public Document toDocument() { // if (project == null) throw new NullPointerException("No project"); assert project != null; DocumentFactory docFactory = new DocumentFactory(); Document document = docFactory.createDocument(); Dom4JXMLOutput treeBuilder = new Dom4JX...
[ "@", "Override", "public", "Document", "toDocument", "(", ")", "{", "// if (project == null) throw new NullPointerException(\"No project\");", "assert", "project", "!=", "null", ";", "DocumentFactory", "docFactory", "=", "new", "DocumentFactory", "(", ")", ";", "Document"...
Convert the BugCollection into a dom4j Document object. @return the Document representing the BugCollection as a dom4j tree
[ "Convert", "the", "BugCollection", "into", "a", "dom4j", "Document", "object", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/SortedBugCollection.java#L423-L438
59,666
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/SortedBugCollection.java
SortedBugCollection.cloneAll
public static void cloneAll(Collection<BugInstance> dest, Collection<BugInstance> source) { for (BugInstance obj : source) { dest.add((BugInstance) obj.clone()); } }
java
public static void cloneAll(Collection<BugInstance> dest, Collection<BugInstance> source) { for (BugInstance obj : source) { dest.add((BugInstance) obj.clone()); } }
[ "public", "static", "void", "cloneAll", "(", "Collection", "<", "BugInstance", ">", "dest", ",", "Collection", "<", "BugInstance", ">", "source", ")", "{", "for", "(", "BugInstance", "obj", ":", "source", ")", "{", "dest", ".", "add", "(", "(", "BugInsta...
Clone all of the BugInstance objects in the source Collection and add them to the destination Collection. @param dest the destination Collection @param source the source Collection
[ "Clone", "all", "of", "the", "BugInstance", "objects", "in", "the", "source", "Collection", "and", "add", "them", "to", "the", "destination", "Collection", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/SortedBugCollection.java#L813-L817
59,667
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/BugAnnotationUtil.java
BugAnnotationUtil.writeXML
public static void writeXML(XMLOutput xmlOutput, String elementName, BugAnnotation annotation, XMLAttributeList attributeList, boolean addMessages) throws IOException { SourceLineAnnotation src = null; if (annotation instanceof BugAnnotationWithSourceLines) { src = ((BugAnnotati...
java
public static void writeXML(XMLOutput xmlOutput, String elementName, BugAnnotation annotation, XMLAttributeList attributeList, boolean addMessages) throws IOException { SourceLineAnnotation src = null; if (annotation instanceof BugAnnotationWithSourceLines) { src = ((BugAnnotati...
[ "public", "static", "void", "writeXML", "(", "XMLOutput", "xmlOutput", ",", "String", "elementName", ",", "BugAnnotation", "annotation", ",", "XMLAttributeList", "attributeList", ",", "boolean", "addMessages", ")", "throws", "IOException", "{", "SourceLineAnnotation", ...
Write a BugAnnotation as XML. @param xmlOutput the XMLOutput @param elementName name of element for BugAnnotation @param annotation the BugAnnotation @param attributeList the XML attribute list @param addMessages true if descriptive messages should be added @throws IOException
[ "Write", "a", "BugAnnotation", "as", "XML", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/BugAnnotationUtil.java#L47-L70
59,668
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/InnerClassAccessMap.java
InnerClassAccessMap.getInnerClassAccess
public InnerClassAccess getInnerClassAccess(String className, String methodName) throws ClassNotFoundException { Map<String, InnerClassAccess> map = getAccessMapForClass(className); return map.get(methodName); }
java
public InnerClassAccess getInnerClassAccess(String className, String methodName) throws ClassNotFoundException { Map<String, InnerClassAccess> map = getAccessMapForClass(className); return map.get(methodName); }
[ "public", "InnerClassAccess", "getInnerClassAccess", "(", "String", "className", ",", "String", "methodName", ")", "throws", "ClassNotFoundException", "{", "Map", "<", "String", ",", "InnerClassAccess", ">", "map", "=", "getAccessMapForClass", "(", "className", ")", ...
Get the InnerClassAccess in given class with the given method name. @param className the name of the class @param methodName the name of the access method @return the InnerClassAccess object for the method, or null if the method doesn't seem to be an inner class access
[ "Get", "the", "InnerClassAccess", "in", "given", "class", "with", "the", "given", "method", "name", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/InnerClassAccessMap.java#L93-L96
59,669
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/InnerClassAccessMap.java
InnerClassAccessMap.getInnerClassAccess
public InnerClassAccess getInnerClassAccess(INVOKESTATIC inv, ConstantPoolGen cpg) throws ClassNotFoundException { String methodName = inv.getMethodName(cpg); if (methodName.startsWith("access$")) { String className = inv.getClassName(cpg); return getInnerClassAccess(className, ...
java
public InnerClassAccess getInnerClassAccess(INVOKESTATIC inv, ConstantPoolGen cpg) throws ClassNotFoundException { String methodName = inv.getMethodName(cpg); if (methodName.startsWith("access$")) { String className = inv.getClassName(cpg); return getInnerClassAccess(className, ...
[ "public", "InnerClassAccess", "getInnerClassAccess", "(", "INVOKESTATIC", "inv", ",", "ConstantPoolGen", "cpg", ")", "throws", "ClassNotFoundException", "{", "String", "methodName", "=", "inv", ".", "getMethodName", "(", "cpg", ")", ";", "if", "(", "methodName", "...
Get the inner class access object for given invokestatic instruction. Returns null if the called method is not an inner class access. @param inv the invokestatic instruction @param cpg the ConstantPoolGen for the method @return the InnerClassAccess, or null if the call is not an inner class access
[ "Get", "the", "inner", "class", "access", "object", "for", "given", "invokestatic", "instruction", ".", "Returns", "null", "if", "the", "called", "method", "is", "not", "an", "inner", "class", "access", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/InnerClassAccessMap.java#L109-L117
59,670
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/InnerClassAccessMap.java
InnerClassAccessMap.getAccessMapForClass
private Map<String, InnerClassAccess> getAccessMapForClass(String className) throws ClassNotFoundException { Map<String, InnerClassAccess> map = classToAccessMap.get(className); if (map == null) { map = new HashMap<>(3); if (!className.startsWith("[")) { JavaCla...
java
private Map<String, InnerClassAccess> getAccessMapForClass(String className) throws ClassNotFoundException { Map<String, InnerClassAccess> map = classToAccessMap.get(className); if (map == null) { map = new HashMap<>(3); if (!className.startsWith("[")) { JavaCla...
[ "private", "Map", "<", "String", ",", "InnerClassAccess", ">", "getAccessMapForClass", "(", "String", "className", ")", "throws", "ClassNotFoundException", "{", "Map", "<", "String", ",", "InnerClassAccess", ">", "map", "=", "classToAccessMap", ".", "get", "(", ...
Return a map of inner-class member access method names to the fields that they access for given class name. @param className the name of the class @return map of access method names to the fields they access
[ "Return", "a", "map", "of", "inner", "-", "class", "member", "access", "method", "names", "to", "the", "fields", "that", "they", "access", "for", "given", "class", "name", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/InnerClassAccessMap.java#L341-L395
59,671
spotbugs/spotbugs
spotbugs/src/gui/main/edu/umd/cs/findbugs/gui/AnnotatedString.java
AnnotatedString.getMnemonic
public int getMnemonic() { int mnemonic = KeyEvent.VK_UNDEFINED; if (!MAC_OS_X) { int index = getMnemonicIndex(); if ((index >= 0) && ((index + 1) < myAnnotatedString.length())) { mnemonic = Character.toUpperCase(myAnnotatedString.charAt(index + 1)); }...
java
public int getMnemonic() { int mnemonic = KeyEvent.VK_UNDEFINED; if (!MAC_OS_X) { int index = getMnemonicIndex(); if ((index >= 0) && ((index + 1) < myAnnotatedString.length())) { mnemonic = Character.toUpperCase(myAnnotatedString.charAt(index + 1)); }...
[ "public", "int", "getMnemonic", "(", ")", "{", "int", "mnemonic", "=", "KeyEvent", ".", "VK_UNDEFINED", ";", "if", "(", "!", "MAC_OS_X", ")", "{", "int", "index", "=", "getMnemonicIndex", "(", ")", ";", "if", "(", "(", "index", ">=", "0", ")", "&&", ...
Return the appropriate mnemonic character for this string. If no mnemonic should be displayed, KeyEvent.VK_UNDEFINED is returned. @return the Mnemonic character, or VK_UNDEFINED if no mnemonic should be set
[ "Return", "the", "appropriate", "mnemonic", "character", "for", "this", "string", ".", "If", "no", "mnemonic", "should", "be", "displayed", "KeyEvent", ".", "VK_UNDEFINED", "is", "returned", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/gui/AnnotatedString.java#L88-L97
59,672
spotbugs/spotbugs
spotbugs/src/gui/main/edu/umd/cs/findbugs/gui/AnnotatedString.java
AnnotatedString.localiseButton
public static void localiseButton(AbstractButton button, String key, String defaultString, boolean setMnemonic) { AnnotatedString as = new AnnotatedString(L10N.getLocalString(key, defaultString)); button.setText(as.toString()); int mnemonic; if (setMnemonic && (mnemonic = as.getMnemonic(...
java
public static void localiseButton(AbstractButton button, String key, String defaultString, boolean setMnemonic) { AnnotatedString as = new AnnotatedString(L10N.getLocalString(key, defaultString)); button.setText(as.toString()); int mnemonic; if (setMnemonic && (mnemonic = as.getMnemonic(...
[ "public", "static", "void", "localiseButton", "(", "AbstractButton", "button", ",", "String", "key", ",", "String", "defaultString", ",", "boolean", "setMnemonic", ")", "{", "AnnotatedString", "as", "=", "new", "AnnotatedString", "(", "L10N", ".", "getLocalString"...
Localise the given AbstractButton, setting the text and optionally mnemonic Note that AbstractButton includes menus and menu items. @param button The button to localise @param key The key to look up in resource bundle @param defaultString default String to use if key not found @param setMnemonic whether or not to set ...
[ "Localise", "the", "given", "AbstractButton", "setting", "the", "text", "and", "optionally", "mnemonic", "Note", "that", "AbstractButton", "includes", "menus", "and", "menu", "items", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/gui/AnnotatedString.java#L168-L176
59,673
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/MethodHash.java
MethodHash.computeHash
public MethodHash computeHash(Method method) { final MessageDigest digest = Util.getMD5Digest(); byte[] code; if (method.getCode() == null || method.getCode().getCode() == null) { code = new byte[0]; } else { code = method.getCode().getCode(); } ...
java
public MethodHash computeHash(Method method) { final MessageDigest digest = Util.getMD5Digest(); byte[] code; if (method.getCode() == null || method.getCode().getCode() == null) { code = new byte[0]; } else { code = method.getCode().getCode(); } ...
[ "public", "MethodHash", "computeHash", "(", "Method", "method", ")", "{", "final", "MessageDigest", "digest", "=", "Util", ".", "getMD5Digest", "(", ")", ";", "byte", "[", "]", "code", ";", "if", "(", "method", ".", "getCode", "(", ")", "==", "null", "...
Compute hash on given method. @param method the method @return this object
[ "Compute", "hash", "on", "given", "method", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/MethodHash.java#L109-L127
59,674
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/view/explorer/BugPrioritySorter.java
BugPrioritySorter.compareGroups
static int compareGroups(BugGroup m1, BugGroup m2) { int result = m1.compareTo(m2); if (result == 0) { return m1.getShortDescription().compareToIgnoreCase(m2.getShortDescription()); } return result; }
java
static int compareGroups(BugGroup m1, BugGroup m2) { int result = m1.compareTo(m2); if (result == 0) { return m1.getShortDescription().compareToIgnoreCase(m2.getShortDescription()); } return result; }
[ "static", "int", "compareGroups", "(", "BugGroup", "m1", ",", "BugGroup", "m2", ")", "{", "int", "result", "=", "m1", ".", "compareTo", "(", "m2", ")", ";", "if", "(", "result", "==", "0", ")", "{", "return", "m1", ".", "getShortDescription", "(", ")...
Sorts bug groups on severity first, then on bug pattern name.
[ "Sorts", "bug", "groups", "on", "severity", "first", "then", "on", "bug", "pattern", "name", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/view/explorer/BugPrioritySorter.java#L74-L80
59,675
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/view/explorer/BugPrioritySorter.java
BugPrioritySorter.compareMarkers
static int compareMarkers(IMarker m1, IMarker m2) { if (m1 == null || m2 == null || !m1.exists() || !m2.exists()) { return 0; } int rank1 = MarkerUtil.findBugRankForMarker(m1); int rank2 = MarkerUtil.findBugRankForMarker(m2); int result = rank1 - rank2; if (re...
java
static int compareMarkers(IMarker m1, IMarker m2) { if (m1 == null || m2 == null || !m1.exists() || !m2.exists()) { return 0; } int rank1 = MarkerUtil.findBugRankForMarker(m1); int rank2 = MarkerUtil.findBugRankForMarker(m2); int result = rank1 - rank2; if (re...
[ "static", "int", "compareMarkers", "(", "IMarker", "m1", ",", "IMarker", "m2", ")", "{", "if", "(", "m1", "==", "null", "||", "m2", "==", "null", "||", "!", "m1", ".", "exists", "(", ")", "||", "!", "m2", ".", "exists", "(", ")", ")", "{", "ret...
Sorts markers on rank, then priority, and then on name if requested @param m1 @param m2 @return
[ "Sorts", "markers", "on", "rank", "then", "priority", "and", "then", "on", "name", "if", "requested" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/view/explorer/BugPrioritySorter.java#L89-L108
59,676
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/interproc/ParameterProperty.java
ParameterProperty.setParamsWithProperty
public void setParamsWithProperty(BitSet nonNullSet) { for (int i = 0; i < 32; ++i) { setParamWithProperty(i, nonNullSet.get(i)); } }
java
public void setParamsWithProperty(BitSet nonNullSet) { for (int i = 0; i < 32; ++i) { setParamWithProperty(i, nonNullSet.get(i)); } }
[ "public", "void", "setParamsWithProperty", "(", "BitSet", "nonNullSet", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "32", ";", "++", "i", ")", "{", "setParamWithProperty", "(", "i", ",", "nonNullSet", ".", "get", "(", "i", ")", ")", ...
Set the non-null param set from given BitSet. @param nonNullSet BitSet indicating which parameters are non-null
[ "Set", "the", "non", "-", "null", "param", "set", "from", "given", "BitSet", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/interproc/ParameterProperty.java#L115-L119
59,677
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/interproc/ParameterProperty.java
ParameterProperty.setParamWithProperty
public void setParamWithProperty(int param, boolean hasProperty) { if (param < 0 || param > 31) { return; } if (hasProperty) { bits |= (1 << param); } else { bits &= ~(1 << param); } }
java
public void setParamWithProperty(int param, boolean hasProperty) { if (param < 0 || param > 31) { return; } if (hasProperty) { bits |= (1 << param); } else { bits &= ~(1 << param); } }
[ "public", "void", "setParamWithProperty", "(", "int", "param", ",", "boolean", "hasProperty", ")", "{", "if", "(", "param", "<", "0", "||", "param", ">", "31", ")", "{", "return", ";", "}", "if", "(", "hasProperty", ")", "{", "bits", "|=", "(", "1", ...
Set whether or not a parameter might be non-null. @param param the parameter index @param hasProperty true if the parameter might be non-null, false otherwise
[ "Set", "whether", "or", "not", "a", "parameter", "might", "be", "non", "-", "null", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/interproc/ParameterProperty.java#L129-L138
59,678
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/interproc/ParameterProperty.java
ParameterProperty.getMatchingParameters
public BitSet getMatchingParameters(BitSet nullArgSet) { BitSet result = new BitSet(); for (int i = 0; i < 32; ++i) { result.set(i, nullArgSet.get(i) && hasProperty(i)); } return result; }
java
public BitSet getMatchingParameters(BitSet nullArgSet) { BitSet result = new BitSet(); for (int i = 0; i < 32; ++i) { result.set(i, nullArgSet.get(i) && hasProperty(i)); } return result; }
[ "public", "BitSet", "getMatchingParameters", "(", "BitSet", "nullArgSet", ")", "{", "BitSet", "result", "=", "new", "BitSet", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "32", ";", "++", "i", ")", "{", "result", ".", "set", "(",...
Given a bitset of null arguments passed to the method represented by this property, return a bitset indicating which null arguments correspond to an non-null param. @param nullArgSet bitset of null arguments @return bitset intersecting null arguments and non-null params
[ "Given", "a", "bitset", "of", "null", "arguments", "passed", "to", "the", "method", "represented", "by", "this", "property", "return", "a", "bitset", "indicating", "which", "null", "arguments", "correspond", "to", "an", "non", "-", "null", "param", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/interproc/ParameterProperty.java#L164-L170
59,679
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/SignatureParser.java
SignatureParser.getNumParametersForInvocation
public static int getNumParametersForInvocation(InvokeInstruction inv, ConstantPoolGen cpg) { SignatureParser sigParser = new SignatureParser(inv.getSignature(cpg)); return sigParser.getNumParameters(); }
java
public static int getNumParametersForInvocation(InvokeInstruction inv, ConstantPoolGen cpg) { SignatureParser sigParser = new SignatureParser(inv.getSignature(cpg)); return sigParser.getNumParameters(); }
[ "public", "static", "int", "getNumParametersForInvocation", "(", "InvokeInstruction", "inv", ",", "ConstantPoolGen", "cpg", ")", "{", "SignatureParser", "sigParser", "=", "new", "SignatureParser", "(", "inv", ".", "getSignature", "(", "cpg", ")", ")", ";", "return...
Get the number of parameters passed to method invocation. @param inv @param cpg @return int number of parameters
[ "Get", "the", "number", "of", "parameters", "passed", "to", "method", "invocation", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/SignatureParser.java#L249-L252
59,680
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/LineNumberMap.java
LineNumberMap.build
public void build() { int numGood = 0, numBytecodes = 0; if (DEBUG) { System.out.println("Method: " + methodGen.getName() + " - " + methodGen.getSignature() + "in class " + methodGen.getClassName()); } // Associate line number information with each Instr...
java
public void build() { int numGood = 0, numBytecodes = 0; if (DEBUG) { System.out.println("Method: " + methodGen.getName() + " - " + methodGen.getSignature() + "in class " + methodGen.getClassName()); } // Associate line number information with each Instr...
[ "public", "void", "build", "(", ")", "{", "int", "numGood", "=", "0", ",", "numBytecodes", "=", "0", ";", "if", "(", "DEBUG", ")", "{", "System", ".", "out", ".", "println", "(", "\"Method: \"", "+", "methodGen", ".", "getName", "(", ")", "+", "\" ...
Build the line number information. Should be called before any other methods.
[ "Build", "the", "line", "number", "information", ".", "Should", "be", "called", "before", "any", "other", "methods", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/LineNumberMap.java#L68-L113
59,681
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierDatabase.java
TypeQualifierDatabase.setReturnValue
public void setReturnValue(MethodDescriptor methodDesc, TypeQualifierValue<?> tqv, TypeQualifierAnnotation tqa) { Map<TypeQualifierValue<?>, TypeQualifierAnnotation> map = returnValueMap.get(methodDesc); if (map == null) { map = new HashMap<>(); returnValueMap.put(methodDesc, map...
java
public void setReturnValue(MethodDescriptor methodDesc, TypeQualifierValue<?> tqv, TypeQualifierAnnotation tqa) { Map<TypeQualifierValue<?>, TypeQualifierAnnotation> map = returnValueMap.get(methodDesc); if (map == null) { map = new HashMap<>(); returnValueMap.put(methodDesc, map...
[ "public", "void", "setReturnValue", "(", "MethodDescriptor", "methodDesc", ",", "TypeQualifierValue", "<", "?", ">", "tqv", ",", "TypeQualifierAnnotation", "tqa", ")", "{", "Map", "<", "TypeQualifierValue", "<", "?", ">", ",", "TypeQualifierAnnotation", ">", "map"...
Set a TypeQualifierAnnotation on a method return value. @param methodDesc the method @param tqv the type qualifier @param tqa the type qualifier annotation
[ "Set", "a", "TypeQualifierAnnotation", "on", "a", "method", "return", "value", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierDatabase.java#L65-L76
59,682
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierDatabase.java
TypeQualifierDatabase.getReturnValue
public TypeQualifierAnnotation getReturnValue(MethodDescriptor methodDesc, TypeQualifierValue<?> tqv) { // // TODO: handling of overridden methods? // Map<TypeQualifierValue<?>, TypeQualifierAnnotation> map = returnValueMap.get(methodDesc); if (map == null) { return n...
java
public TypeQualifierAnnotation getReturnValue(MethodDescriptor methodDesc, TypeQualifierValue<?> tqv) { // // TODO: handling of overridden methods? // Map<TypeQualifierValue<?>, TypeQualifierAnnotation> map = returnValueMap.get(methodDesc); if (map == null) { return n...
[ "public", "TypeQualifierAnnotation", "getReturnValue", "(", "MethodDescriptor", "methodDesc", ",", "TypeQualifierValue", "<", "?", ">", "tqv", ")", "{", "//", "// TODO: handling of overridden methods?", "//", "Map", "<", "TypeQualifierValue", "<", "?", ">", ",", "Type...
Get the TypeQualifierAnnotation on a method return value. @param methodDesc the method @param tqv the type qualifier @return the type qualifier annotation on the method return value, or null if no (interesting) type qualifier annotation was computed for this method
[ "Get", "the", "TypeQualifierAnnotation", "on", "a", "method", "return", "value", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierDatabase.java#L89-L98
59,683
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierDatabase.java
TypeQualifierDatabase.setParameter
public void setParameter(MethodDescriptor methodDesc, int param, TypeQualifierValue<?> tqv, TypeQualifierAnnotation tqa) { Map<TypeQualifierValue<?>, TypeQualifierAnnotation> map = parameterMap.get(methodDesc, param); if (map == null) { map = new HashMap<>(); parameterMap.put(met...
java
public void setParameter(MethodDescriptor methodDesc, int param, TypeQualifierValue<?> tqv, TypeQualifierAnnotation tqa) { Map<TypeQualifierValue<?>, TypeQualifierAnnotation> map = parameterMap.get(methodDesc, param); if (map == null) { map = new HashMap<>(); parameterMap.put(met...
[ "public", "void", "setParameter", "(", "MethodDescriptor", "methodDesc", ",", "int", "param", ",", "TypeQualifierValue", "<", "?", ">", "tqv", ",", "TypeQualifierAnnotation", "tqa", ")", "{", "Map", "<", "TypeQualifierValue", "<", "?", ">", ",", "TypeQualifierAn...
Set a TypeQualifierAnnotation on a method parameter. @param methodDesc the method @param param the parameter (0 == first parameter) @param tqv the type qualifier @param tqa the type qualifier annotation
[ "Set", "a", "TypeQualifierAnnotation", "on", "a", "method", "parameter", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierDatabase.java#L112-L123
59,684
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierDatabase.java
TypeQualifierDatabase.getParameter
public TypeQualifierAnnotation getParameter(MethodDescriptor methodDesc, int param, TypeQualifierValue<?> tqv) { // // TODO: handling of overridden methods? // Map<TypeQualifierValue<?>, TypeQualifierAnnotation> map = parameterMap.get(methodDesc, param); if (map == null) { ...
java
public TypeQualifierAnnotation getParameter(MethodDescriptor methodDesc, int param, TypeQualifierValue<?> tqv) { // // TODO: handling of overridden methods? // Map<TypeQualifierValue<?>, TypeQualifierAnnotation> map = parameterMap.get(methodDesc, param); if (map == null) { ...
[ "public", "TypeQualifierAnnotation", "getParameter", "(", "MethodDescriptor", "methodDesc", ",", "int", "param", ",", "TypeQualifierValue", "<", "?", ">", "tqv", ")", "{", "//", "// TODO: handling of overridden methods?", "//", "Map", "<", "TypeQualifierValue", "<", "...
Get the TypeQualifierAnnotation on a parameter. @param methodDesc the method @param param the parameter (0 == first parameter) @param tqv the type qualifier @return the type qualifier annotation on the method return value, or null if no (interesting) type qualifier annotation was computed for this method
[ "Get", "the", "TypeQualifierAnnotation", "on", "a", "parameter", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierDatabase.java#L138-L147
59,685
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/bcp/FieldAccess.java
FieldAccess.isLongOrDouble
protected static boolean isLongOrDouble(FieldInstruction fieldIns, ConstantPoolGen cpg) { Type type = fieldIns.getFieldType(cpg); int code = type.getType(); return code == Const.T_LONG || code == Const.T_DOUBLE; }
java
protected static boolean isLongOrDouble(FieldInstruction fieldIns, ConstantPoolGen cpg) { Type type = fieldIns.getFieldType(cpg); int code = type.getType(); return code == Const.T_LONG || code == Const.T_DOUBLE; }
[ "protected", "static", "boolean", "isLongOrDouble", "(", "FieldInstruction", "fieldIns", ",", "ConstantPoolGen", "cpg", ")", "{", "Type", "type", "=", "fieldIns", ".", "getFieldType", "(", "cpg", ")", ";", "int", "code", "=", "type", ".", "getType", "(", ")"...
Return whether the given FieldInstruction accesses a long or double field. @param fieldIns the FieldInstruction @param cpg the ConstantPoolGen for the method
[ "Return", "whether", "the", "given", "FieldInstruction", "accesses", "a", "long", "or", "double", "field", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/bcp/FieldAccess.java#L94-L98
59,686
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/bcp/FieldAccess.java
FieldAccess.snarfFieldValue
protected static Variable snarfFieldValue(FieldInstruction fieldIns, ConstantPoolGen cpg, ValueNumberFrame frame) throws DataflowAnalysisException { if (isLongOrDouble(fieldIns, cpg)) { int numSlots = frame.getNumSlots(); ValueNumber topValue = frame.getValue(numSlots - 1); ...
java
protected static Variable snarfFieldValue(FieldInstruction fieldIns, ConstantPoolGen cpg, ValueNumberFrame frame) throws DataflowAnalysisException { if (isLongOrDouble(fieldIns, cpg)) { int numSlots = frame.getNumSlots(); ValueNumber topValue = frame.getValue(numSlots - 1); ...
[ "protected", "static", "Variable", "snarfFieldValue", "(", "FieldInstruction", "fieldIns", ",", "ConstantPoolGen", "cpg", ",", "ValueNumberFrame", "frame", ")", "throws", "DataflowAnalysisException", "{", "if", "(", "isLongOrDouble", "(", "fieldIns", ",", "cpg", ")", ...
Get a Variable representing the stack value which will either be stored into or loaded from a field. @param fieldIns the FieldInstruction accessing the field @param cpg the ConstantPoolGen for the method @param frame the ValueNumberFrame containing the value to be stored or the value loaded
[ "Get", "a", "Variable", "representing", "the", "stack", "value", "which", "will", "either", "be", "stored", "into", "or", "loaded", "from", "a", "field", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/bcp/FieldAccess.java#L112-L124
59,687
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/Analysis.java
Analysis.getRelevantTypeQualifiers
public static Collection<TypeQualifierValue<?>> getRelevantTypeQualifiers(MethodDescriptor methodDescriptor, CFG cfg) throws CheckedAnalysisException { final HashSet<TypeQualifierValue<?>> result = new HashSet<>(); XMethod xmethod = XFactory.createXMethod(methodDescriptor); if (FI...
java
public static Collection<TypeQualifierValue<?>> getRelevantTypeQualifiers(MethodDescriptor methodDescriptor, CFG cfg) throws CheckedAnalysisException { final HashSet<TypeQualifierValue<?>> result = new HashSet<>(); XMethod xmethod = XFactory.createXMethod(methodDescriptor); if (FI...
[ "public", "static", "Collection", "<", "TypeQualifierValue", "<", "?", ">", ">", "getRelevantTypeQualifiers", "(", "MethodDescriptor", "methodDescriptor", ",", "CFG", "cfg", ")", "throws", "CheckedAnalysisException", "{", "final", "HashSet", "<", "TypeQualifierValue", ...
Find relevant type qualifiers needing to be checked for a given method. @param methodDescriptor a method @return Collection of relevant type qualifiers needing to be checked @throws CheckedAnalysisException
[ "Find", "relevant", "type", "qualifiers", "needing", "to", "be", "checked", "for", "a", "given", "method", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/Analysis.java#L77-L161
59,688
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/DescriptorFactory.java
DescriptorFactory.createClassDescriptorFromResourceName
public static ClassDescriptor createClassDescriptorFromResourceName(String resourceName) { if (!isClassResource(resourceName)) { throw new IllegalArgumentException("Resource " + resourceName + " is not a class"); } return createClassDescriptor(resourceName.substring(0, resourceName.l...
java
public static ClassDescriptor createClassDescriptorFromResourceName(String resourceName) { if (!isClassResource(resourceName)) { throw new IllegalArgumentException("Resource " + resourceName + " is not a class"); } return createClassDescriptor(resourceName.substring(0, resourceName.l...
[ "public", "static", "ClassDescriptor", "createClassDescriptorFromResourceName", "(", "String", "resourceName", ")", "{", "if", "(", "!", "isClassResource", "(", "resourceName", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Resource \"", "+", "reso...
Create a class descriptor from a resource name. @param resourceName the resource name @return the class descriptor
[ "Create", "a", "class", "descriptor", "from", "a", "resource", "name", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/DescriptorFactory.java#L281-L286
59,689
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/DescriptorFactory.java
DescriptorFactory.createClassDescriptorFromFieldSignature
public static @CheckForNull ClassDescriptor createClassDescriptorFromFieldSignature(String signature) { int start = signature.indexOf('L'); if (start < 0) { return null; } int end = signature.indexOf(';', start); if (end < 0) { return null; } ...
java
public static @CheckForNull ClassDescriptor createClassDescriptorFromFieldSignature(String signature) { int start = signature.indexOf('L'); if (start < 0) { return null; } int end = signature.indexOf(';', start); if (end < 0) { return null; } ...
[ "public", "static", "@", "CheckForNull", "ClassDescriptor", "createClassDescriptorFromFieldSignature", "(", "String", "signature", ")", "{", "int", "start", "=", "signature", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "start", "<", "0", ")", "{", "r...
Create a class descriptor from a field signature
[ "Create", "a", "class", "descriptor", "from", "a", "field", "signature" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/DescriptorFactory.java#L292-L303
59,690
spotbugs/spotbugs
spotbugs-ant/src/main/java/edu/umd/cs/findbugs/anttask/FindBugsViewerTask.java
FindBugsViewerTask.setPluginList
public void setPluginList(Path src) { if (pluginList == null) { pluginList = src; } else { pluginList.append(src); } }
java
public void setPluginList(Path src) { if (pluginList == null) { pluginList = src; } else { pluginList.append(src); } }
[ "public", "void", "setPluginList", "(", "Path", "src", ")", "{", "if", "(", "pluginList", "==", "null", ")", "{", "pluginList", "=", "src", ";", "}", "else", "{", "pluginList", ".", "append", "(", "src", ")", ";", "}", "}" ]
the plugin list to use. @param src plugin list to use
[ "the", "plugin", "list", "to", "use", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs-ant/src/main/java/edu/umd/cs/findbugs/anttask/FindBugsViewerTask.java#L182-L188
59,691
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ClassScreener.java
ClassScreener.addAllowedClass
public void addAllowedClass(String className) { String classRegex = START + dotsToRegex(className) + ".class$"; LOG.debug("Class regex: {}", classRegex); patternList.add(Pattern.compile(classRegex).matcher("")); }
java
public void addAllowedClass(String className) { String classRegex = START + dotsToRegex(className) + ".class$"; LOG.debug("Class regex: {}", classRegex); patternList.add(Pattern.compile(classRegex).matcher("")); }
[ "public", "void", "addAllowedClass", "(", "String", "className", ")", "{", "String", "classRegex", "=", "START", "+", "dotsToRegex", "(", "className", ")", "+", "\".class$\"", ";", "LOG", ".", "debug", "(", "\"Class regex: {}\"", ",", "classRegex", ")", ";", ...
Add the name of a class to be matched by the screener. @param className name of a class to be matched
[ "Add", "the", "name", "of", "a", "class", "to", "be", "matched", "by", "the", "screener", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ClassScreener.java#L106-L110
59,692
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ClassScreener.java
ClassScreener.addAllowedPackage
public void addAllowedPackage(String packageName) { if (packageName.endsWith(".")) { packageName = packageName.substring(0, packageName.length() - 1); } String packageRegex = START + dotsToRegex(packageName) + SEP + JAVA_IDENTIFIER_PART + "+.class$"; LOG.debug("Package regex...
java
public void addAllowedPackage(String packageName) { if (packageName.endsWith(".")) { packageName = packageName.substring(0, packageName.length() - 1); } String packageRegex = START + dotsToRegex(packageName) + SEP + JAVA_IDENTIFIER_PART + "+.class$"; LOG.debug("Package regex...
[ "public", "void", "addAllowedPackage", "(", "String", "packageName", ")", "{", "if", "(", "packageName", ".", "endsWith", "(", "\".\"", ")", ")", "{", "packageName", "=", "packageName", ".", "substring", "(", "0", ",", "packageName", ".", "length", "(", ")...
Add the name of a package to be matched by the screener. All class files that appear to be in the package should be matched. @param packageName name of the package to be matched
[ "Add", "the", "name", "of", "a", "package", "to", "be", "matched", "by", "the", "screener", ".", "All", "class", "files", "that", "appear", "to", "be", "in", "the", "package", "should", "be", "matched", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ClassScreener.java#L119-L127
59,693
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ClassScreener.java
ClassScreener.addAllowedPrefix
public void addAllowedPrefix(String prefix) { if (prefix.endsWith(".")) { prefix = prefix.substring(0, prefix.length() - 1); } LOG.debug("Allowed prefix: {}", prefix); String packageRegex = START + dotsToRegex(prefix) + SEP; LOG.debug("Prefix regex: {}", packageRegex)...
java
public void addAllowedPrefix(String prefix) { if (prefix.endsWith(".")) { prefix = prefix.substring(0, prefix.length() - 1); } LOG.debug("Allowed prefix: {}", prefix); String packageRegex = START + dotsToRegex(prefix) + SEP; LOG.debug("Prefix regex: {}", packageRegex)...
[ "public", "void", "addAllowedPrefix", "(", "String", "prefix", ")", "{", "if", "(", "prefix", ".", "endsWith", "(", "\".\"", ")", ")", "{", "prefix", "=", "prefix", ".", "substring", "(", "0", ",", "prefix", ".", "length", "(", ")", "-", "1", ")", ...
Add the name of a prefix to be matched by the screener. All class files that appear to be in the package specified by the prefix, or a more deeply nested package, should be matched. @param prefix name of the prefix to be matched
[ "Add", "the", "name", "of", "a", "prefix", "to", "be", "matched", "by", "the", "screener", ".", "All", "class", "files", "that", "appear", "to", "be", "in", "the", "package", "specified", "by", "the", "prefix", "or", "a", "more", "deeply", "nested", "p...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ClassScreener.java#L137-L145
59,694
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/I18N.java
I18N.getMessage
@Deprecated public @Nonnull String getMessage(String key) { BugPattern bugPattern = DetectorFactoryCollection.instance().lookupBugPattern(key); if (bugPattern == null) { return L10N.getLocalString("err.missing_pattern", "Error: missing bug pattern for key") + " " + key; } ...
java
@Deprecated public @Nonnull String getMessage(String key) { BugPattern bugPattern = DetectorFactoryCollection.instance().lookupBugPattern(key); if (bugPattern == null) { return L10N.getLocalString("err.missing_pattern", "Error: missing bug pattern for key") + " " + key; } ...
[ "@", "Deprecated", "public", "@", "Nonnull", "String", "getMessage", "(", "String", "key", ")", "{", "BugPattern", "bugPattern", "=", "DetectorFactoryCollection", ".", "instance", "(", ")", ".", "lookupBugPattern", "(", "key", ")", ";", "if", "(", "bugPattern"...
Get a message string. This is a format pattern for describing an entire bug instance in a single line. @param key which message to retrieve
[ "Get", "a", "message", "string", ".", "This", "is", "a", "format", "pattern", "for", "describing", "an", "entire", "bug", "instance", "in", "a", "single", "line", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/I18N.java#L71-L79
59,695
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/I18N.java
I18N.getDetailHTML
public @Nonnull String getDetailHTML(String key) { BugPattern bugPattern = DetectorFactoryCollection.instance().lookupBugPattern(key); if (bugPattern == null) { return L10N.getLocalString("err.missing_pattern", "Error: missing bug pattern for key") + " " + key; } return b...
java
public @Nonnull String getDetailHTML(String key) { BugPattern bugPattern = DetectorFactoryCollection.instance().lookupBugPattern(key); if (bugPattern == null) { return L10N.getLocalString("err.missing_pattern", "Error: missing bug pattern for key") + " " + key; } return b...
[ "public", "@", "Nonnull", "String", "getDetailHTML", "(", "String", "key", ")", "{", "BugPattern", "bugPattern", "=", "DetectorFactoryCollection", ".", "instance", "(", ")", ".", "lookupBugPattern", "(", "key", ")", ";", "if", "(", "bugPattern", "==", "null", ...
Get an HTML document describing the bug pattern for given key in detail. @param key which HTML details for retrieve
[ "Get", "an", "HTML", "document", "describing", "the", "bug", "pattern", "for", "given", "key", "in", "detail", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/I18N.java#L113-L120
59,696
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/I18N.java
I18N.getAnnotationDescription
public String getAnnotationDescription(String key) { try { return annotationDescriptionBundle.getString(key); } catch (MissingResourceException mre) { if (DEBUG) { return "TRANSLATE(" + key + ") (param={0}}"; } else { try { ...
java
public String getAnnotationDescription(String key) { try { return annotationDescriptionBundle.getString(key); } catch (MissingResourceException mre) { if (DEBUG) { return "TRANSLATE(" + key + ") (param={0}}"; } else { try { ...
[ "public", "String", "getAnnotationDescription", "(", "String", "key", ")", "{", "try", "{", "return", "annotationDescriptionBundle", ".", "getString", "(", "key", ")", ";", "}", "catch", "(", "MissingResourceException", "mre", ")", "{", "if", "(", "DEBUG", ")"...
Get an annotation description string. This is a format pattern which will describe a BugAnnotation in the context of a particular bug instance. Its single format argument is the BugAnnotation. @param key the annotation description to retrieve
[ "Get", "an", "annotation", "description", "string", ".", "This", "is", "a", "format", "pattern", "which", "will", "describe", "a", "BugAnnotation", "in", "the", "context", "of", "a", "particular", "bug", "instance", ".", "Its", "single", "format", "argument", ...
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/I18N.java#L130-L144
59,697
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/I18N.java
I18N.getBugCategoryDescription
public String getBugCategoryDescription(String category) { BugCategory bc = DetectorFactoryCollection.instance().getBugCategory(category); return (bc != null ? bc.getShortDescription() : category); }
java
public String getBugCategoryDescription(String category) { BugCategory bc = DetectorFactoryCollection.instance().getBugCategory(category); return (bc != null ? bc.getShortDescription() : category); }
[ "public", "String", "getBugCategoryDescription", "(", "String", "category", ")", "{", "BugCategory", "bc", "=", "DetectorFactoryCollection", ".", "instance", "(", ")", ".", "getBugCategory", "(", "category", ")", ";", "return", "(", "bc", "!=", "null", "?", "b...
Get the description of a bug category. Returns the category if no description can be found. @param category the category @return the description of the category
[ "Get", "the", "description", "of", "a", "bug", "category", ".", "Returns", "the", "category", "if", "no", "description", "can", "be", "found", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/I18N.java#L173-L176
59,698
spotbugs/spotbugs
spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/MainFrameComponentFactory.java
MainFrameComponentFactory.createSourceCodePanel
JPanel createSourceCodePanel() { Font sourceFont = new Font("Monospaced", Font.PLAIN, (int) Driver.getFontSize()); mainFrame.getSourceCodeTextPane().setFont(sourceFont); mainFrame.getSourceCodeTextPane().setEditable(false); mainFrame.getSourceCodeTextPane().getCaret().setSelectionVisible...
java
JPanel createSourceCodePanel() { Font sourceFont = new Font("Monospaced", Font.PLAIN, (int) Driver.getFontSize()); mainFrame.getSourceCodeTextPane().setFont(sourceFont); mainFrame.getSourceCodeTextPane().setEditable(false); mainFrame.getSourceCodeTextPane().getCaret().setSelectionVisible...
[ "JPanel", "createSourceCodePanel", "(", ")", "{", "Font", "sourceFont", "=", "new", "Font", "(", "\"Monospaced\"", ",", "Font", ".", "PLAIN", ",", "(", "int", ")", "Driver", ".", "getFontSize", "(", ")", ")", ";", "mainFrame", ".", "getSourceCodeTextPane", ...
Creates the source code panel, but does not put anything in it.
[ "Creates", "the", "source", "code", "panel", "but", "does", "not", "put", "anything", "in", "it", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/MainFrameComponentFactory.java#L137-L155
59,699
spotbugs/spotbugs
spotbugs/src/gui/main/edu/umd/cs/findbugs/sourceViewer/NavigableTextPane.java
NavigableTextPane.scrollLineToVisible
public void scrollLineToVisible(int line, int margin) { int maxMargin = (parentHeight() - 20) / 2; if (margin > maxMargin) { margin = Math.max(0, maxMargin); } scrollLineToVisibleImpl(line, margin); }
java
public void scrollLineToVisible(int line, int margin) { int maxMargin = (parentHeight() - 20) / 2; if (margin > maxMargin) { margin = Math.max(0, maxMargin); } scrollLineToVisibleImpl(line, margin); }
[ "public", "void", "scrollLineToVisible", "(", "int", "line", ",", "int", "margin", ")", "{", "int", "maxMargin", "=", "(", "parentHeight", "(", ")", "-", "20", ")", "/", "2", ";", "if", "(", "margin", ">", "maxMargin", ")", "{", "margin", "=", "Math"...
scroll the specified line into view, with a margin of 'margin' pixels above and below
[ "scroll", "the", "specified", "line", "into", "view", "with", "a", "margin", "of", "margin", "pixels", "above", "and", "below" ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/sourceViewer/NavigableTextPane.java#L111-L117