code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
private static Set<Method> findLockedMethods(ClassContext classContext, SelfCalls selfCalls, Set<CallSite> obviouslyLockedSites)
{
JavaClass javaClass = classContext.getJavaClass();
Method[] methodList = javaClass.getMethods();
CallGraph callGraph = selfCalls.getCallGraph();
// In... | java |
private static Set<CallSite> findObviouslyLockedCallSites(ClassContext classContext, SelfCalls selfCalls)
throws CFGBuilderException, DataflowAnalysisException {
ConstantPoolGen cpg = classContext.getConstantPoolGen();
// Find all obviously locked call sites
Set<CallSite> obviouslyL... | java |
private static boolean implementsMap(ClassDescriptor d) {
while (d != null) {
try {
// Do not report this warning for EnumMap: EnumMap.keySet()/get() iteration is as fast as entrySet() iteration
if ("java.util.EnumMap".equals(d.getDottedClassName())) {
... | java |
private void restoreDefaultSettings() {
if (getProject() != null) {
// By default, don't run FindBugs automatically
chkEnableFindBugs.setSelection(false);
chkRunAtFullBuild.setEnabled(false);
FindBugsPreferenceInitializer.restoreDefaults(projectStore);
} e... | java |
@Override
public boolean performOk() {
reportConfigurationTab.performOk();
boolean analysisSettingsChanged = false;
boolean reporterSettingsChanged = false;
boolean needRedisplayMarkers = false;
if (workspaceSettingsTab != null) {
workspaceSettingsTab.performOK();... | java |
public Token next() throws IOException {
skipWhitespace();
int c = reader.read();
if (c < 0) {
return new Token(Token.EOF);
} else if (c == '\n') {
return new Token(Token.EOL);
} else if (c == '\'' || c == '"') {
return munchString(c);
... | java |
private void reportResultsToConsole() {
if (!isStreamReportingEnabled()) {
return;
}
printToStream("Finished, found: " + bugCount + " bugs");
ConfigurableXmlOutputStream xmlStream = new ConfigurableXmlOutputStream(stream, true);
ProjectStats stats = bugCollection.getP... | java |
public ByteCodePattern addWild(int numWild) {
Wild wild = isLastWild();
if (wild != null) {
wild.setMinAndMax(0, numWild);
} else {
addElement(new Wild(numWild));
}
return this;
} | java |
public Edge lookupEdgeById(int id) {
Iterator<Edge> i = edgeIterator();
while (i.hasNext()) {
Edge edge = i.next();
if (edge.getId() == id) {
return edge;
}
}
return null;
} | java |
public BasicBlock lookupBlockByLabel(int blockLabel) {
for (Iterator<BasicBlock> i = blockIterator(); i.hasNext();) {
BasicBlock basicBlock = i.next();
if (basicBlock.getLabel() == blockLabel) {
return basicBlock;
}
}
return null;
} | java |
public Collection<Location> orderedLocations() {
TreeSet<Location> tree = new TreeSet<>();
for (Iterator<Location> locs = locationIterator(); locs.hasNext();) {
Location loc = locs.next();
tree.add(loc);
}
return tree;
} | java |
public Collection<BasicBlock> getBlocks(BitSet labelSet) {
LinkedList<BasicBlock> result = new LinkedList<>();
for (Iterator<BasicBlock> i = blockIterator(); i.hasNext();) {
BasicBlock block = i.next();
if (labelSet.get(block.getLabel())) {
result.add(block);
... | java |
public Collection<BasicBlock> getBlocksContainingInstructionWithOffset(int offset) {
LinkedList<BasicBlock> result = new LinkedList<>();
for (Iterator<BasicBlock> i = blockIterator(); i.hasNext();) {
BasicBlock block = i.next();
if (block.containsInstructionWithOffset(offset)) {
... | java |
public Collection<Location> getLocationsContainingInstructionWithOffset(int offset) {
LinkedList<Location> result = new LinkedList<>();
for (Iterator<Location> i = locationIterator(); i.hasNext();) {
Location location = i.next();
if (location.getHandle().getPosition() == offset) ... | java |
public int getNumNonExceptionSucessors(BasicBlock block) {
int numNonExceptionSuccessors = block.getNumNonExceptionSuccessors();
if (numNonExceptionSuccessors < 0) {
numNonExceptionSuccessors = 0;
for (Iterator<Edge> i = outgoingEdgeIterator(block); i.hasNext();) {
... | java |
public Location getLocationAtEntry() {
InstructionHandle handle = getEntry().getFirstInstruction();
assert handle != null;
return new Location(handle, getEntry());
} | java |
public void addPlugin(Plugin plugin) throws OrderingConstraintException {
if (DEBUG) {
System.out.println("Adding plugin " + plugin.getPluginId() + " to execution plan");
}
pluginList.add(plugin);
// Add ordering constraints
copyTo(plugin.interPassConstraintIterator... | java |
private void assignToPass(DetectorFactory factory, AnalysisPass pass) {
pass.addToPass(factory);
assignedToPassSet.add(factory);
} | java |
public void execute(InstructionScannerGenerator generator) {
// Pump the instructions in the path through the generator and all
// generated scanners
while (edgeIter.hasNext()) {
Edge edge = edgeIter.next();
BasicBlock source = edge.getSource();
if (DEBUG) {
... | java |
@SuppressWarnings("rawtypes")
@Override
protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException {
monitor.subTask("Running SpotBugs...");
switch (kind) {
case IncrementalProjectBuilder.FULL_BUILD: {
FindBugs2Eclipse.cleanClassClache(getPr... | java |
protected void work(final IResource resource, final List<WorkItem> resources, IProgressMonitor monitor) {
IPreferenceStore store = FindbugsPlugin.getPluginPreferences(getProject());
boolean runAsJob = store.getBoolean(FindBugsConstants.KEY_RUN_ANALYSIS_AS_EXTRA_JOB);
FindBugsJob fbJob = new Star... | java |
public static @DottedClassName
String getMissingClassName(ClassNotFoundException ex) {
// If the exception has a ResourceNotFoundException as the cause,
// then we have an easy answer.
Throwable cause = ex.getCause();
if (cause instanceof ResourceNotFoundException) {
Stri... | java |
public void addFieldLine(String className, String fieldName, SourceLineRange range) {
fieldLineMap.put(new FieldDescriptor(className, fieldName), range);
} | java |
public void addMethodLine(String className, String methodName, String methodSignature, SourceLineRange range) {
methodLineMap.put(new MethodDescriptor(className, methodName, methodSignature), range);
} | java |
public @CheckForNull
SourceLineRange getFieldLine(String className, String fieldName) {
return fieldLineMap.get(new FieldDescriptor(className, fieldName));
} | java |
public @CheckForNull
SourceLineRange getMethodLine(String className, String methodName, String methodSignature) {
return methodLineMap.get(new MethodDescriptor(className, methodName, methodSignature));
} | java |
private static String parseVersionNumber(String line) {
StringTokenizer tokenizer = new StringTokenizer(line, " \t");
if (!expect(tokenizer, "sourceInfo") || !expect(tokenizer, "version") || !tokenizer.hasMoreTokens()) {
return null;
}
return tokenizer.nextToken();
} | java |
private static boolean expect(StringTokenizer tokenizer, String token) {
if (!tokenizer.hasMoreTokens()) {
return false;
}
String s = tokenizer.nextToken();
if (DEBUG) {
System.out.println("token=" + s);
}
return s.equals(token);
} | java |
private int compareClassesAllowingNull(ClassAnnotation lhs, ClassAnnotation rhs) {
if (lhs == null || rhs == null) {
return compareNullElements(lhs, rhs);
}
String lhsClassName = classNameRewriter.rewriteClassName(lhs.getClassName());
String rhsClassName = classNameRewriter.... | java |
static int countFilteredBugs() {
int result = 0;
for (BugLeafNode bug : getMainBugSet().mainList) {
if (suppress(bug)) {
result++;
}
}
return result;
} | java |
public BugSet query(BugAspects a) {
BugSet result = this;
for (SortableValue sp : a) {
result = result.query(sp);
}
return result;
} | java |
private static Location pcToLocation(ClassContext classContext, Method method, int pc) throws CFGBuilderException {
CFG cfg = classContext.getCFG(method);
for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
Location location = i.next();
if (location.getHandle().ge... | java |
private static void addReceiverObjectType(WarningPropertySet<WarningProperty> propertySet, ClassContext classContext,
Method method, Location location) {
try {
Instruction ins = location.getHandle().getInstruction();
if (!receiverObjectInstructionSet.get(ins.getOpcode())) {
... | java |
private Set<String> buildClassSet(BugCollection bugCollection) {
Set<String> classSet = new HashSet<>();
for (Iterator<BugInstance> i = bugCollection.iterator(); i.hasNext();) {
BugInstance warning = i.next();
for (Iterator<BugAnnotation> j = warning.annotationIterator(); j.hasN... | java |
private void suppressWarningsIfOneLiveStoreOnLine(BugAccumulator accumulator, BitSet liveStoreSourceLineSet) {
if (!SUPPRESS_IF_AT_LEAST_ONE_LIVE_STORE_ON_LINE) {
return;
}
// Eliminate any accumulated warnings for instructions
// that (due to inlining) *can* be live stores.... | java |
private void countLocalStoresLoadsAndIncrements(int[] localStoreCount, int[] localLoadCount, int[] localIncrementCount,
CFG cfg) {
for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
Location location = i.next();
if (location.getBasicBlock().isExceptionHandle... | java |
private boolean isStore(Location location) {
Instruction ins = location.getHandle().getInstruction();
return (ins instanceof StoreInstruction) || (ins instanceof IINC);
} | java |
private boolean isLoad(Location location) {
Instruction ins = location.getHandle().getInstruction();
return (ins instanceof LoadInstruction) || (ins instanceof IINC);
} | java |
public AnnotationVisitor getAnnotationVisitor() {
return new AnnotationVisitor(FindBugsASM.ASM_VERSION) {
@Override
public void visit(String name, Object value) {
name = canonicalString(name);
valueMap.put(name, value);
}
/*
... | java |
private Constant readConstant() throws InvalidClassFileFormatException, IOException {
int tag = in.readUnsignedByte();
if (tag < 0 || tag >= CONSTANT_FORMAT_MAP.length) {
throw new InvalidClassFileFormatException(expectedClassDescriptor, codeBaseEntry);
}
String format = CONS... | java |
private String getUtf8String(int refIndex) throws InvalidClassFileFormatException {
checkConstantPoolIndex(refIndex);
Constant refConstant = constantPool[refIndex];
checkConstantTag(refConstant, IClassConstants.CONSTANT_Utf8);
return (String) refConstant.data[0];
} | java |
private void checkConstantPoolIndex(int index) throws InvalidClassFileFormatException {
if (index < 0 || index >= constantPool.length || constantPool[index] == null) {
throw new InvalidClassFileFormatException(expectedClassDescriptor, codeBaseEntry);
}
} | java |
private void checkConstantTag(Constant constant, int expectedTag) throws InvalidClassFileFormatException {
if (constant.tag != expectedTag) {
throw new InvalidClassFileFormatException(expectedClassDescriptor, codeBaseEntry);
}
} | java |
private String getSignatureFromNameAndType(int index) throws InvalidClassFileFormatException {
checkConstantPoolIndex(index);
Constant constant = constantPool[index];
checkConstantTag(constant, IClassConstants.CONSTANT_NameAndType);
return getUtf8String((Integer) constant.data[1]);
} | java |
private void checkUnconditionalDerefDatabase(Location location, ValueNumberFrame vnaFrame, UnconditionalValueDerefSet fact)
throws DataflowAnalysisException {
ConstantPoolGen constantPool = methodGen.getConstantPool();
for (ValueNumber vn : checkUnconditionalDerefDatabase(location, vnaFrame... | java |
private void checkInstance(Location location, ValueNumberFrame vnaFrame, UnconditionalValueDerefSet fact)
throws DataflowAnalysisException {
// See if this instruction has a null check.
// If it does, the fall through predecessor will be
// identify itself as the null check.
... | java |
private UnconditionalValueDerefSet duplicateFact(UnconditionalValueDerefSet fact) {
UnconditionalValueDerefSet copyOfFact = createFact();
copy(fact, copyOfFact);
fact = copyOfFact;
return fact;
} | java |
private @CheckForNull
ValueNumber findValueKnownNonnullOnBranch(UnconditionalValueDerefSet fact, Edge edge) {
IsNullValueFrame invFrame = invDataflow.getResultFact(edge.getSource());
if (!invFrame.isValid()) {
return null;
}
IsNullConditionDecision decision = invFrame.ge... | java |
private boolean isExceptionEdge(Edge edge) {
boolean isExceptionEdge = edge.isExceptionEdge();
if (isExceptionEdge) {
if (DEBUG) {
System.out.println("NOT Ignoring " + edge);
}
return true; // false
}
if (edge.getType() != EdgeTypes.FAL... | java |
public static boolean isSubtype(ReferenceType t, ReferenceType possibleSupertype) throws ClassNotFoundException {
return Global.getAnalysisCache().getDatabase(Subtypes2.class).isSubtype(t, possibleSupertype);
} | java |
public static boolean isMonitorWait(String methodName, String methodSig) {
return "wait".equals(methodName) && ("()V".equals(methodSig) || "(J)V".equals(methodSig) || "(JI)V".equals(methodSig));
} | java |
public static boolean isMonitorNotify(String methodName, String methodSig) {
return ("notify".equals(methodName) || "notifyAll".equals(methodName)) && "()V".equals(methodSig);
} | java |
public static boolean isMonitorNotify(Instruction ins, ConstantPoolGen cpg) {
if (!(ins instanceof InvokeInstruction)) {
return false;
}
if (ins.getOpcode() == Const.INVOKESTATIC) {
return false;
}
InvokeInstruction inv = (InvokeInstruction) ins;
... | java |
public static JavaClassAndMethod visitSuperClassMethods(JavaClassAndMethod method, JavaClassAndMethodChooser chooser)
throws ClassNotFoundException {
return findMethod(method.getJavaClass().getSuperClasses(), method.getMethod().getName(), method.getMethod()
.getSignature(), chooser);... | java |
public static JavaClassAndMethod visitSuperInterfaceMethods(JavaClassAndMethod method, JavaClassAndMethodChooser chooser)
throws ClassNotFoundException {
return findMethod(method.getJavaClass().getAllInterfaces(), method.getMethod().getName(), method.getMethod()
.getSignature(), choo... | java |
public static Set<JavaClassAndMethod> resolveMethodCallTargets(ReferenceType receiverType,
InvokeInstruction invokeInstruction, ConstantPoolGen cpg) throws ClassNotFoundException {
return resolveMethodCallTargets(receiverType, invokeInstruction, cpg, false);
} | java |
@Deprecated
public static boolean isConcrete(XMethod xmethod) {
int accessFlags = xmethod.getAccessFlags();
return (accessFlags & Const.ACC_ABSTRACT) == 0 && (accessFlags & Const.ACC_NATIVE) == 0;
} | java |
public static Field findField(String className, String fieldName) throws ClassNotFoundException {
JavaClass jclass = Repository.lookupClass(className);
while (jclass != null) {
Field[] fieldList = jclass.getFields();
for (Field field : fieldList) {
if (field.getN... | java |
public static boolean isInnerClassAccess(INVOKESTATIC inv, ConstantPoolGen cpg) {
String methodName = inv.getName(cpg);
return methodName.startsWith("access$");
} | java |
public static InnerClassAccess getInnerClassAccess(INVOKESTATIC inv, ConstantPoolGen cpg) throws ClassNotFoundException {
String className = inv.getClassName(cpg);
String methodName = inv.getName(cpg);
String methodSig = inv.getSignature(cpg);
InnerClassAccess access = AnalysisContext.... | java |
@SuppressWarnings("unchecked")
@Override
public synchronized Enumeration<Object> keys() {
// sort elements based on detector (prop key) names
Set<?> set = keySet();
return (Enumeration<Object>) sortKeys((Set<String>) set);
} | java |
public void loadXml(String fileName) throws CoreException {
if (fileName == null) {
return;
}
st = new StopTimer();
// clear markers
clearMarkers(null);
final Project findBugsProject = new Project();
final Reporter bugReporter = new Reporter(javaProj... | java |
private void clearMarkers(List<WorkItem> files) throws CoreException {
if (files == null) {
project.deleteMarkers(FindBugsMarker.NAME, true, IResource.DEPTH_INFINITE);
return;
}
for (WorkItem item : files) {
if (item != null) {
item.clearMarker... | java |
private void collectClassFiles(List<WorkItem> resources, Map<IPath, IPath> outLocations, Project fbProject) {
for (WorkItem workItem : resources) {
workItem.addFilesToProject(fbProject, outLocations);
}
} | java |
private void runFindBugs(final FindBugs2 findBugs) {
if (DEBUG) {
FindbugsPlugin.log("Running findbugs in thread " + Thread.currentThread().getName());
}
System.setProperty("findbugs.progress", "true");
try {
// Perform the analysis! (note: This is not thread-safe... | java |
private void updateBugCollection(Project findBugsProject, Reporter bugReporter, boolean incremental) {
SortedBugCollection newBugCollection = bugReporter.getBugCollection();
try {
st.newPoint("getBugCollection");
SortedBugCollection oldBugCollection = FindbugsPlugin.getBugCollect... | java |
public static IPath getFilterPath(String filePath, IProject project) {
IPath path = new Path(filePath);
if (path.isAbsolute()) {
return path;
}
if (project != null) {
// try first project relative location
IPath newPath = project.getLocation().append(p... | java |
public static IPath toFilterPath(String filePath, IProject project) {
IPath path = new Path(filePath);
IPath commonPath;
if (project != null) {
commonPath = project.getLocation();
IPath relativePath = getRelativePath(path, commonPath);
if (!relativePath.equals... | java |
public static ProjectFilterSettings fromEncodedString(String s) {
ProjectFilterSettings result = new ProjectFilterSettings();
if (s.length() > 0) {
int bar = s.indexOf(FIELD_DELIMITER);
String minPriority;
if (bar >= 0) {
minPriority = s.substring(0, ... | java |
public static void hiddenFromEncodedString(ProjectFilterSettings result, String s) {
if (s.length() > 0) {
int bar = s.indexOf(FIELD_DELIMITER);
String categories;
if (bar >= 0) {
categories = s.substring(0, bar);
} else {
categori... | java |
public boolean displayWarning(BugInstance bugInstance) {
int priority = bugInstance.getPriority();
if (priority > getMinPriorityAsInt()) {
return false;
}
int rank = bugInstance.getBugRank();
if (rank > getMinRank()) {
return false;
}
Bu... | java |
public void setMinPriority(String minPriority) {
this.minPriority = minPriority;
Integer value = priorityNameToValueMap.get(minPriority);
if (value == null) {
value = priorityNameToValueMap.get(DEFAULT_PRIORITY);
if (value == null) {
throw new IllegalStat... | java |
public String hiddenToEncodedString() {
StringBuilder buf = new StringBuilder();
// Encode hidden bug categories
for (Iterator<String> i = hiddenBugCategorySet.iterator(); i.hasNext();) {
buf.append(i.next());
if (i.hasNext()) {
buf.append(LISTITEM_DELIMIT... | java |
public String toEncodedString() {
// Priority threshold
StringBuilder buf = new StringBuilder();
buf.append(getMinPriority());
// Encode enabled bug categories. Note that these aren't really used for
// much.
// They only come in to play when parsed by a version of FindB... | java |
public static String getIntPriorityAsString(int prio) {
String minPriority;
switch (prio) {
case Priorities.EXP_PRIORITY:
minPriority = ProjectFilterSettings.EXPERIMENTAL_PRIORITY;
break;
case Priorities.LOW_PRIORITY:
minPriority = ProjectFilterSetting... | java |
public GraphType transpose(GraphType orig, GraphToolkit<GraphType, EdgeType, VertexType> toolkit) {
GraphType trans = toolkit.createGraph();
// For each vertex in original graph, create an equivalent
// vertex in the transposed graph,
// ensuring that vertex labels in the transposed gr... | java |
public void mapInputToOutput(ValueNumber input, ValueNumber output) {
BitSet inputSet = getInputSet(output);
inputSet.set(input.getNumber());
if (DEBUG) {
System.out.println(input.getNumber() + "->" + output.getNumber());
System.out.println("Input set for " + output.getNu... | java |
public BitSet getInputSet(ValueNumber output) {
BitSet outputSet = outputToInputMap.get(output);
if (outputSet == null) {
if (DEBUG) {
System.out.println("Create new input set for " + output.getNumber());
}
outputSet = new BitSet();
outputT... | java |
private static boolean mightInheritFromException(ClassDescriptor d) {
while (d != null) {
try {
if ("java.lang.Exception".equals(d.getDottedClassName())) {
return true;
}
XClass classNameAndInfo = Global.getAnalysisCache().getClassA... | java |
public void launch() throws Exception {
// Sanity-check the loaded BCEL classes
if (!CheckBcel.check()) {
System.exit(1);
}
int launchProperty = getLaunchProperty();
if (GraphicsEnvironment.isHeadless() || launchProperty == TEXTUI) {
FindBugs2.main(args)... | java |
private int getLaunchProperty() {
// See if the first command line argument specifies the UI.
if (args.length > 0) {
String firstArg = args[0];
if (firstArg.startsWith("-")) {
String uiName = firstArg.substring(1);
if (uiNameToCodeMap.containsKey(u... | java |
@Override
public void configure() throws CoreException {
if (DEBUG) {
System.out.println("Adding findbugs to the project build spec.");
}
// register FindBugs builder
addToBuildSpec(FindbugsPlugin.BUILDER_ID);
} | java |
@Override
public void deconfigure() throws CoreException {
if (DEBUG) {
System.out.println("Removing findbugs from the project build spec.");
}
// de-register FindBugs builder
removeFromBuildSpec(FindbugsPlugin.BUILDER_ID);
} | java |
protected void removeFromBuildSpec(String builderID) throws CoreException {
MarkerUtil.removeMarkers(getProject());
IProjectDescription description = getProject().getDescription();
ICommand[] commands = description.getBuildSpec();
for (int i = 0; i < commands.length; ++i) {
i... | java |
protected void addToBuildSpec(String builderID) throws CoreException {
IProjectDescription description = getProject().getDescription();
ICommand findBugsCommand = getFindBugsCommand(description);
if (findBugsCommand == null) {
// Add a Java command to the build spec
IComm... | java |
private ICommand getFindBugsCommand(IProjectDescription description) {
ICommand[] commands = description.getBuildSpec();
for (int i = 0; i < commands.length; ++i) {
if (FindbugsPlugin.BUILDER_ID.equals(commands[i].getBuilderName())) {
return commands[i];
}
... | java |
public void addSwitch(String option, String description) {
optionList.add(option);
optionDescriptionMap.put(option, description);
if (option.length() > maxWidth) {
maxWidth = option.length();
}
} | java |
public void addSwitchWithOptionalExtraPart(String option, String optionExtraPartSynopsis, String description) {
optionList.add(option);
optionExtraPartSynopsisMap.put(option, optionExtraPartSynopsis);
optionDescriptionMap.put(option, description);
// Option will display as -foo[:extraPa... | java |
public void addOption(String option, String argumentDesc, String description) {
optionList.add(option);
optionDescriptionMap.put(option, description);
requiresArgumentSet.add(option);
argumentDescriptionMap.put(option, argumentDesc);
int width = option.length() + 3 + argumentDes... | java |
public void printUsage(OutputStream os) {
int count = 0;
PrintStream out = UTF8.printStream(os);
for (String option : optionList) {
if (optionGroups.containsKey(count)) {
out.println(" " + optionGroups.get(count));
}
count++;
if ... | java |
public void setLockCount(int valueNumber, int lockCount) {
int index = findIndex(valueNumber);
if (index < 0) {
addEntry(index, valueNumber, lockCount);
} else {
array[index + 1] = lockCount;
}
} | java |
public int getNumLockedObjects() {
int result = 0;
for (int i = 0; i + 1 < array.length; i += 2) {
if (array[i] == INVALID) {
break;
}
if (array[i + 1] > 0) {
++result;
}
}
return result;
} | java |
public void copyFrom(LockSet other) {
if (other.array.length != array.length) {
array = new int[other.array.length];
}
System.arraycopy(other.array, 0, array, 0, array.length);
this.defaultLockCount = other.defaultLockCount;
} | java |
public void meetWith(LockSet other) {
for (int i = 0; i + 1 < array.length; i += 2) {
int valueNumber = array[i];
if (valueNumber < 0) {
break;
}
int mine = array[i + 1];
int his = other.getLockCount(valueNumber);
array[i +... | java |
public boolean containsReturnValue(ValueNumberFactory factory) {
for (int i = 0; i + 1 < array.length; i += 2) {
int valueNumber = array[i];
if (valueNumber < 0) {
break;
}
int lockCount = array[i + 1];
if (lockCount > 0 && factory.forN... | java |
public boolean isEmpty() {
for (int i = 0; i + 1 < array.length; i += 2) {
int valueNumber = array[i];
if (valueNumber < 0) {
return true;
}
int myLockCount = array[i + 1];
if (myLockCount > 0) {
return false;
... | java |
public SimplePathEnumerator enumerate() {
Iterator<Edge> entryOut = cfg.outgoingEdgeIterator(cfg.getEntry());
if (!entryOut.hasNext()) {
throw new IllegalStateException();
}
Edge entryEdge = entryOut.next();
LinkedList<Edge> init = new LinkedList<>();
init.ad... | java |
@Override
public void visitClassContext(ClassContext classContext) {
int majorVersion = classContext.getJavaClass().getMajor();
if (majorVersion >= Const.MAJOR_1_5 && hasInterestingMethod(classContext.getJavaClass().getConstantPool(), methods)) {
super.visitClassContext(classContext);
... | java |
public static Collection<AnnotationValue> resolveTypeQualifiers(AnnotationValue value) {
LinkedList<AnnotationValue> result = new LinkedList<>();
resolveTypeQualifierNicknames(value, result, new LinkedList<ClassDescriptor>());
return result;
} | java |
public void mergeVertices(Set<VertexType> vertexSet, GraphType g, VertexCombinator<VertexType> combinator,
GraphToolkit<GraphType, EdgeType, VertexType> toolkit) {
// Special case: if the vertex set contains a single vertex
// or is empty, there is nothing to do
if (vertexSet.size()... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.