code
stringlengths
73
34.1k
label
stringclasses
1 value
private void scan(CallGraphNode node) throws CFGBuilderException { Method method = node.getMethod(); CFG cfg = classContext.getCFG(method); if (method.isSynchronized()) { hasSynchronization = true; } Iterator<BasicBlock> i = cfg.blockIterator(); while (i.has...
java
private Method isSelfCall(InvokeInstruction inv) { ConstantPoolGen cpg = classContext.getConstantPoolGen(); JavaClass jclass = classContext.getJavaClass(); String calledClassName = inv.getClassName(cpg); // FIXME: is it possible we would see a superclass name here? // Not a big...
java
public boolean isEnabledForCurrentJRE() { if ("".equals(requireJRE)) { return true; } try { JavaVersion requiredVersion = new JavaVersion(requireJRE); JavaVersion runtimeVersion = JavaVersion.getRuntimeVersion(); if (DEBUG_JAVA_VERSION) { ...
java
public Set<BugPattern> getReportedBugPatterns() { Set<BugPattern> result = new TreeSet<>(); StringTokenizer tok = new StringTokenizer(reports, ","); while (tok.hasMoreTokens()) { String type = tok.nextToken(); BugPattern bugPattern = DetectorFactoryCollection.instance().l...
java
public String getShortName() { int endOfPkg = className.lastIndexOf('.'); if (endOfPkg >= 0) { return className.substring(endOfPkg + 1); } return className; }
java
public LoadStoreCount getLoadStoreCount(XField field) { LoadStoreCount loadStoreCount = loadStoreCountMap.get(field); if (loadStoreCount == null) { loadStoreCount = new LoadStoreCount(); loadStoreCountMap.put(field, loadStoreCount); } return loadStoreCount; }
java
public void addLoad(InstructionHandle handle, XField field) { getLoadStoreCount(field).loadCount++; handleToFieldMap.put(handle, field); loadHandleSet.set(handle.getPosition()); }
java
public void addStore(InstructionHandle handle, XField field) { getLoadStoreCount(field).storeCount++; handleToFieldMap.put(handle, field); }
java
public static SourceLineAnnotation forFirstLineOfMethod(MethodDescriptor methodDescriptor) { SourceLineAnnotation result = null; try { Method m = Global.getAnalysisCache().getMethodAnalysis(Method.class, methodDescriptor); XClass xclass = Global.getAnalysisCache().getClassAnalys...
java
public static SourceLineAnnotation fromVisitedInstruction(ClassContext classContext, Method method, Location loc) { return fromVisitedInstruction(classContext, method, loc.getHandle()); }
java
public static SourceLineAnnotation fromVisitedInstruction(ClassContext classContext, Method method, InstructionHandle handle) { return fromVisitedInstruction(classContext, method, handle.getPosition()); }
java
public static SourceLineAnnotation fromVisitedInstruction(MethodDescriptor methodDescriptor, Location location) { return fromVisitedInstruction(methodDescriptor, location.getHandle().getPosition()); }
java
public static SourceLineAnnotation fromVisitedInstructionRange(ClassContext classContext, MethodGen methodGen, String sourceFile, InstructionHandle start, InstructionHandle end) { LineNumberTable lineNumberTable = methodGen.getLineNumberTable(methodGen.getConstantPool()); String className = ...
java
public boolean isAssertionInstruction(Instruction ins, ConstantPoolGen cpg) { if (ins instanceof InvokeInstruction) { return isAssertionCall((InvokeInstruction) ins); } if (ins instanceof GETSTATIC) { GETSTATIC getStatic = (GETSTATIC) ins; String className = ...
java
private static short unsignedValueOf(byte value) { short result; if ((value & 0x80) != 0) { result = (short) (value & 0x7F); result |= 0x80; } else { result = value; } return result; }
java
private static int extractInt(byte[] arr, int offset) { return ((arr[offset] & 0xFF) << 24) | ((arr[offset + 1] & 0xFF) << 16) | ((arr[offset + 2] & 0xFF) << 8) | (arr[offset + 3] & 0xFF); }
java
public void makeSameAs(UnconditionalValueDerefSet source) { // Copy value numbers valueNumbersUnconditionallyDereferenced.clear(); valueNumbersUnconditionallyDereferenced.or(source.valueNumbersUnconditionallyDereferenced); lastUpdateTimestamp = source.lastUpdateTimestamp; // Copy...
java
public boolean isSameAs(UnconditionalValueDerefSet otherFact) { return valueNumbersUnconditionallyDereferenced.equals(otherFact.valueNumbersUnconditionallyDereferenced) && derefLocationSetMap.equals(otherFact.derefLocationSetMap); }
java
public void addDeref(ValueNumber vn, Location location) { if (UnconditionalValueDerefAnalysis.DEBUG) { System.out.println("Adding dereference of " + vn + " to # " + System.identityHashCode(this) + " @ " + location); } valueNumbersUnconditionallyDereferenced.set(vn.getNumber()); ...
java
public void setDerefSet(ValueNumber vn, Set<Location> derefSet) { if (UnconditionalValueDerefAnalysis.DEBUG) { System.out.println("Adding dereference of " + vn + " for # " + System.identityHashCode(this) + " to " + derefSet); } valueNumbersUnconditionallyDereferenced.set(vn.getNumber...
java
public void clearDerefSet(ValueNumber value) { if (UnconditionalValueDerefAnalysis.DEBUG) { System.out.println("Clearing dereference of " + value + " for # " + System.identityHashCode(this)); } valueNumbersUnconditionallyDereferenced.clear(value.getNumber()); derefLocationSet...
java
public Set<Location> getDerefLocationSet(ValueNumber vn) { Set<Location> derefLocationSet = derefLocationSetMap.get(vn); if (derefLocationSet == null) { derefLocationSet = new HashSet<>(); derefLocationSetMap.put(vn, derefLocationSet); } return derefLocationSet; ...
java
private void work(final IProject project, final String fileName) { FindBugsJob runFindBugs = new FindBugsJob("Loading XML data from " + fileName + "...", project) { @Override protected void runWithProgress(IProgressMonitor monitor) throws CoreException { FindBugsWorker wo...
java
private void handleWillCloseWhenClosed(XMethod xmethod, Obligation deletedObligation) { if (deletedObligation == null) { if (DEBUG_ANNOTATIONS) { System.out.println("Method " + xmethod.toString() + " is marked @WillCloseWhenClosed, " + "but its parameter is no...
java
public IsNullValue toExceptionValue() { if (getBaseKind() == NO_KABOOM_NN) { return new IsNullValue(kind | EXCEPTION, locationOfKaBoom); } return instanceByFlagsList[(getFlags() | EXCEPTION) >> FLAG_SHIFT][getBaseKind()]; }
java
public static IsNullValue merge(IsNullValue a, IsNullValue b) { if (a == b) { return a; } if (a.equals(b)) { return a; } int aKind = a.kind & 0xff; int bKind = b.kind & 0xff; int aFlags = a.getFlags(); int bFlags = b.getFlags(); ...
java
public boolean isNullOnSomePath() { int baseKind = getBaseKind(); if (NCP_EXTRA_BRANCH) { // Note: NCP_EXTRA_BRANCH is an experimental feature // to see how many false warnings we get when we allow // two branches between an explicit null and a // a derefe...
java
static public boolean isContainer(ReferenceType target) throws ClassNotFoundException { Subtypes2 subtypes2 = AnalysisContext.currentAnalysisContext().getSubtypes2(); return subtypes2.isSubtype(target, COLLECTION_TYPE) || subtypes2.isSubtype(target, MAP_TYPE); }
java
public void addApplicationClass(XClass appXClass) { for (XMethod m : appXClass.getXMethods()) { if (m.isStub()) { return; } } ClassVertex vertex = addClassAndGetClassVertex(appXClass); vertex.markAsApplicationClass(); }
java
private ClassVertex addClassAndGetClassVertex(XClass xclass) { if (xclass == null) { throw new IllegalStateException(); } LinkedList<XClass> workList = new LinkedList<>(); workList.add(xclass); while (!workList.isEmpty()) { XClass work = workList.removeF...
java
public boolean isSubtype(ReferenceType type, ReferenceType possibleSupertype) throws ClassNotFoundException { // Eliminate some easy cases if (type.equals(possibleSupertype)) { return true; } if (possibleSupertype.equals(Type.OBJECT)) { return true; } ...
java
public boolean isSubtype(ObjectType type, ObjectType possibleSupertype) throws ClassNotFoundException { if (DEBUG_QUERIES) { System.out.println("isSubtype: check " + type + " subtype of " + possibleSupertype); } if (type.equals(possibleSupertype)) { if (DEBUG_QUERIES) { ...
java
private ReferenceType computeFirstCommonSuperclassOfSameDimensionArrays(ArrayType aArrType, ArrayType bArrType) throws ClassNotFoundException { assert aArrType.getDimensions() == bArrType.getDimensions(); Type aBaseType = aArrType.getBasicType(); Type bBaseType = bArrType.getBasicTy...
java
private ReferenceType computeFirstCommonSuperclassOfDifferentDimensionArrays(ArrayType aArrType, ArrayType bArrType) { assert aArrType.getDimensions() != bArrType.getDimensions(); boolean aBaseTypeIsPrimitive = (aArrType.getBasicType() instanceof BasicType); boolean bBaseTypeIsPrimitive = (bArr...
java
public boolean hasSubtypes(ClassDescriptor classDescriptor) throws ClassNotFoundException { Set<ClassDescriptor> subtypes = getDirectSubtypes(classDescriptor); if (DEBUG) { System.out.println("Direct subtypes of " + classDescriptor + " are " + subtypes); } return !subtypes.is...
java
public Set<ClassDescriptor> getDirectSubtypes(ClassDescriptor classDescriptor) throws ClassNotFoundException { ClassVertex startVertex = resolveClassVertex(classDescriptor); Set<ClassDescriptor> result = new HashSet<>(); Iterator<InheritanceEdge> i = graph.incomingEdgeIterator(startVertex); ...
java
public Set<ClassDescriptor> getTransitiveCommonSubtypes(ClassDescriptor classDescriptor1, ClassDescriptor classDescriptor2) throws ClassNotFoundException { Set<ClassDescriptor> subtypes1 = getSubtypes(classDescriptor1); Set<ClassDescriptor> result = new HashSet<>(subtypes1); Set<Clas...
java
public void traverseSupertypes(ClassDescriptor start, InheritanceGraphVisitor visitor) throws ClassNotFoundException { LinkedList<SupertypeTraversalPath> workList = new LinkedList<>(); ClassVertex startVertex = resolveClassVertex(start); workList.addLast(new SupertypeTraversalPath(startVertex))...
java
public void traverseSupertypesDepthFirst(ClassDescriptor start, SupertypeTraversalVisitor visitor) throws ClassNotFoundException { this.traverseSupertypesDepthFirstHelper(start, visitor, new HashSet<ClassDescriptor>()); }
java
private Set<ClassDescriptor> computeKnownSubtypes(ClassDescriptor classDescriptor) throws ClassNotFoundException { LinkedList<ClassVertex> workList = new LinkedList<>(); ClassVertex startVertex = resolveClassVertex(classDescriptor); workList.addLast(startVertex); Set<ClassDescriptor> r...
java
public SupertypeQueryResults getSupertypeQueryResults(ClassDescriptor classDescriptor) { SupertypeQueryResults supertypeQueryResults = supertypeSetMap.get(classDescriptor); if (supertypeQueryResults == null) { supertypeQueryResults = computeSupertypes(classDescriptor); supertypeS...
java
private SupertypeQueryResults computeSupertypes(ClassDescriptor classDescriptor) // throws // ClassNotFoundException { if (DEBUG_QUERIES) { System.out.println("Computing supertypes for " + classDescriptor.toDottedClassName()); } // Try to fully resolve the class and its supe...
java
private ClassVertex resolveClassVertex(ClassDescriptor classDescriptor) throws ClassNotFoundException { ClassVertex typeVertex = optionallyResolveClassVertex(classDescriptor); if (!typeVertex.isResolved()) { ClassDescriptor.throwClassNotFoundException(classDescriptor); } as...
java
private void addSupertypeEdges(ClassVertex vertex, LinkedList<XClass> workList) { XClass xclass = vertex.getXClass(); // Direct superclass ClassDescriptor superclassDescriptor = xclass.getSuperclassDescriptor(); if (superclassDescriptor != null) { addInheritanceEdge(vertex, ...
java
private ClassVertex addClassVertexForMissingClass(ClassDescriptor missingClassDescriptor, boolean isInterfaceEdge) { ClassVertex missingClassVertex = ClassVertex.createMissingClassVertex(missingClassDescriptor, isInterfaceEdge); missingClassVertex.setFinished(true); addVertexToGraph(missingClass...
java
public boolean prescreen(ClassContext classContext, Method method) { BitSet bytecodeSet = classContext.getBytecodeSet(method); return bytecodeSet != null && (bytecodeSet.get(Const.INVOKEINTERFACE) || bytecodeSet.get(Const.INVOKEVIRTUAL) || bytecodeSet.get(Const.IN...
java
private boolean isSynthetic(Method m) { if ((m.getAccessFlags() & Const.ACC_SYNTHETIC) != 0) { return true; } Attribute[] attrs = m.getAttributes(); for (Attribute attr : attrs) { if (attr instanceof Synthetic) { return true; } ...
java
private boolean compareTypesOld(Type parmType, Type argType) { // XXX equality not implemented for GenericObjectType // if (parmType.equals(argType)) return true; // Compare type signatures instead if (GenericUtilities.getString(parmType).equals(GenericUtilities.getString(argType))) { ...
java
public void checkMessages(XMLFile messagesDoc) throws DocumentException { // Detector elements must all have a class attribute // and details child element. for (Iterator<Node> i = messagesDoc.xpathIterator("/MessageCollection/Detector"); i.hasNext();) { Node node = i.next(); ...
java
public static boolean check() { Class<?> objectType; Class<?> type; Class<?> constants; Class<?> emptyVis; Class<?> repository; try { objectType = Class.forName(ORG_APACHE_BCEL_GENERIC_OBJECT_TYPE); type = Class.forName(ORG_APACHE_BCEL_GENERIC_...
java
public ValueNumber forNumber(int number) { if (number >= getNumValuesAllocated()) { throw new IllegalArgumentException("Value " + number + " has not been allocated"); } return allocatedValueList.get(number); }
java
public String format(BugAnnotation[] args, ClassAnnotation primaryClass, boolean abridgedMessages) { String pat = pattern; StringBuilder result = new StringBuilder(); while (pat.length() > 0) { int subst = pat.indexOf('{'); if (subst < 0) { result.append(...
java
public static FieldAnnotation fromVisitedField(PreorderVisitor visitor) { return new FieldAnnotation(visitor.getDottedClassName(), visitor.getFieldName(), visitor.getFieldSig(), visitor.getFieldIsStatic()); }
java
public static FieldAnnotation fromFieldDescriptor(FieldDescriptor fieldDescriptor) { return new FieldAnnotation(fieldDescriptor.getClassDescriptor().getDottedClassName(), fieldDescriptor.getName(), fieldDescriptor.getSignature(), fieldDescriptor.isStatic()); }
java
public static FieldAnnotation isRead(Instruction ins, ConstantPoolGen cpg) { if (ins instanceof GETFIELD || ins instanceof GETSTATIC) { FieldInstruction fins = (FieldInstruction) ins; String className = fins.getClassName(cpg); return new FieldAnnotation(className, fins.getNam...
java
public static FieldAnnotation isWrite(Instruction ins, ConstantPoolGen cpg) { if (ins instanceof PUTFIELD || ins instanceof PUTSTATIC) { FieldInstruction fins = (FieldInstruction) ins; String className = fins.getClassName(cpg); return new FieldAnnotation(className, fins.getNa...
java
public static boolean isClassFile(IJavaElement elt) { if (elt == null) { return false; } return elt instanceof IClassFile || elt instanceof ICompilationUnit; }
java
public static void copyToClipboard(String content) { if (content == null) { return; } Clipboard cb = null; try { cb = new Clipboard(Display.getDefault()); cb.setContents(new String[] { content }, new TextTransfer[] { TextTransfer.getInstance() }); ...
java
public static void sortIMarkers(IMarker[] markers) { Arrays.sort(markers, new Comparator<IMarker>() { @Override public int compare(IMarker arg0, IMarker arg1) { IResource resource0 = arg0.getResource(); IResource resource1 = arg1.getResource(); ...
java
public @CheckForNull IsNullValue getDecision(int edgeType) { switch (edgeType) { case EdgeTypes.IFCMP_EDGE: return ifcmpDecision; case EdgeTypes.FALL_THROUGH_EDGE: return fallThroughDecision; default: throw new IllegalArgumentException("Bad edge ty...
java
private BitSet findPreviouslyDeadBlocks() throws DataflowAnalysisException, CFGBuilderException { BitSet deadBlocks = new BitSet(); ValueNumberDataflow vnaDataflow = classContext.getValueNumberDataflow(method); for (Iterator<BasicBlock> i = vnaDataflow.getCFG().blockIterator(); i.hasNext();) { ...
java
public void addStreamEscape(Stream source, Location target) { StreamEscape streamEscape = new StreamEscape(source, target); streamEscapeSet.add(streamEscape); if (FindOpenStream.DEBUG) { System.out.println("Adding potential stream escape " + streamEscape); } }
java
public void addStreamOpenLocation(Location streamOpenLocation, Stream stream) { if (FindOpenStream.DEBUG) { System.out.println("Stream open location at " + streamOpenLocation); } streamOpenLocationMap.put(streamOpenLocation, stream); if (stream.isUninteresting()) { ...
java
private NullnessAnnotation getMethodNullnessAnnotation() { if (method.getSignature().indexOf(")L") >= 0 || method.getSignature().indexOf(")[") >= 0) { if (DEBUG_NULLRETURN) { System.out.println("Checking return annotation for " + SignatureConverter.convertMet...
java
private void checkNonNullParam(Location location, ConstantPoolGen cpg, TypeDataflow typeDataflow, InvokeInstruction invokeInstruction, BitSet nullArgSet, BitSet definitelyNullArgSet) { if (inExplicitCatchNullBlock(location)) { return; } boolean caught = inIndirectCatchNu...
java
private boolean isGoto(Instruction instruction) { return instruction.getOpcode() == Const.GOTO || instruction.getOpcode() == Const.GOTO_W; }
java
public void dispose(){ classAnalysisMap.clear(); classAnalysisEngineMap.clear(); analysisLocals.clear(); databaseFactoryMap.clear(); databaseMap.clear(); methodAnalysisEngineMap.clear(); }
java
public <E> void reuseClassAnalysis(Class<E> analysisClass, Map<ClassDescriptor, Object> map) { Map<ClassDescriptor, Object> myMap = classAnalysisMap.get(analysisClass); if (myMap != null) { myMap.putAll(map); } else { myMap = createMap(classAnalysisEngineMap, analysisClas...
java
@SuppressWarnings("unchecked") private <E> E analyzeMethod(ClassContext classContext, Class<E> analysisClass, MethodDescriptor methodDescriptor) throws CheckedAnalysisException { IMethodAnalysisEngine<E> engine = (IMethodAnalysisEngine<E>) methodAnalysisEngineMap.get(analysisClass); if (...
java
private static <DescriptorType> Map<DescriptorType, Object> findOrCreateDescriptorMap( final Map<Class<?>, Map<DescriptorType, Object>> analysisClassToDescriptorMapMap, final Map<Class<?>, ? extends IAnalysisEngine<DescriptorType, ?>> engineMap, final Class<?> analysisClass) ...
java
public void writeElementList(String tagName, Collection<String> listValues) { for (String listValue : listValues) { openTag(tagName); writeText(listValue); closeTag(tagName); } }
java
public boolean isObligationType(ClassDescriptor classDescriptor) { try { return getObligationByType(BCELUtil.getObjectTypeInstance(classDescriptor.toDottedClassName())) != null; } catch (ClassNotFoundException e) { Global.getAnalysisCache().getErrorLogger().reportMissingClass(e);...
java
public Obligation[] getParameterObligationTypes(XMethod xmethod) { Type[] paramTypes = Type.getArgumentTypes(xmethod.getSignature()); Obligation[] result = new Obligation[paramTypes.length]; for (int i = 0; i < paramTypes.length; i++) { if (!(paramTypes[i] instanceof ObjectType)) { ...
java
@Override public Fact getFactAfterLocation(Location location) throws DataflowAnalysisException { BasicBlock basicBlock = location.getBasicBlock(); InstructionHandle handle = location.getHandle(); if (handle == (isForwards() ? basicBlock.getLastInstruction() : basicBlock.getFirstInstruction(...
java
@Override public void visit(JavaClass someObj) { currentClass = someObj.getClassName(); currentMethod = null; currentCFG = null; currentLockDataFlow = null; sawDateClass = false; }
java
private void addAuxClassPathEntries(String argument) { StringTokenizer tok = new StringTokenizer(argument, File.pathSeparator); while (tok.hasMoreTokens()) { project.addAuxClasspathEntry(tok.nextToken()); } }
java
private void choose(String argument, String desc, Chooser chooser) { StringTokenizer tok = new StringTokenizer(argument, ","); while (tok.hasMoreTokens()) { String what = tok.nextToken().trim(); if (!what.startsWith("+") && !what.startsWith("-")) { throw new Illeg...
java
public void handleXArgs() throws IOException { if (getXargs()) { try (BufferedReader in = UTF8.bufferedReader(System.in)) { while (true) { String s = in.readLine(); if (s == null) { break; } ...
java
private void handleAuxClassPathFromFile(String filePath) throws IOException { try (BufferedReader in = new BufferedReader(UTF8.fileReader(filePath))) { while (true) { String s = in.readLine(); if (s == null) { break; } ...
java
private void handleAnalyzeFromFile(String filePath) throws IOException { try (BufferedReader in = new BufferedReader(UTF8.fileReader(filePath))) { while (true) { String s = in.readLine(); if (s == null) { break; } pr...
java
public Project duplicate() { Project dup = new Project(); dup.currentWorkingDirectoryList.addAll(this.currentWorkingDirectoryList); dup.projectName = this.projectName; dup.analysisTargets.addAll(this.analysisTargets); dup.srcDirList.addAll(this.srcDirList); dup.auxClasspa...
java
public void add(Project project2) { analysisTargets = appendWithoutDuplicates(analysisTargets, project2.analysisTargets); srcDirList = appendWithoutDuplicates(srcDirList, project2.srcDirList); auxClasspathEntryList = appendWithoutDuplicates(auxClasspathEntryList, project2.auxClasspathEntryList);...
java
public boolean addSourceDirs(Collection<String> sourceDirs) { boolean isNew = false; if (sourceDirs == null || sourceDirs.isEmpty()) { return isNew; } for (String dirName : sourceDirs) { for (String dir : makeAbsoluteCwdCandidates(dirName)) { isN...
java
public boolean addWorkingDir(String dirName) { if (dirName == null) { throw new NullPointerException(); } return addToListInternal(currentWorkingDirectoryList, new File(dirName)); }
java
public void removeSourceDir(int num) { srcDirList.remove(num); IO.close(sourceFinder); sourceFinder = new SourceFinder(this); isModified = true; }
java
@Deprecated public void write(String outputFile, boolean useRelativePaths, String relativeBase) throws IOException { PrintWriter writer = UTF8.printWriter(outputFile); try { writer.println(JAR_FILES_KEY); for (String jarFile : analysisTargets) { if (useRelativ...
java
public static Project readProject(String argument) throws IOException { String projectFileName = argument; File projectFile = new File(projectFileName); if (projectFileName.endsWith(".xml") || projectFileName.endsWith(".fbp")) { try { return Project.readXML(projectF...
java
private String convertToRelative(String srcFile, String base) { String slash = SystemProperties.getProperty("file.separator"); if (FILE_IGNORE_CASE) { srcFile = srcFile.toLowerCase(); base = base.toLowerCase(); } if (base.equals(srcFile)) { return "....
java
private String makeAbsoluteCWD(String fileName) { List<String> candidates = makeAbsoluteCwdCandidates(fileName); return candidates.get(0); }
java
private List<String> makeAbsoluteCwdCandidates(String fileName) { List<String> candidates = new ArrayList<>(); boolean hasProtocol = (URLClassPath.getURLProtocol(fileName) != null); if (hasProtocol) { candidates.add(fileName); return candidates; } if (ne...
java
private <T> boolean addToListInternal(Collection<T> list, T value) { if (!list.contains(value)) { list.add(value); isModified = true; return true; } else { return false; } }
java
private boolean doRedundantLoadElimination() { if (!REDUNDANT_LOAD_ELIMINATION) { return false; } XField xfield = loadedFieldSet.getField(handle); if (xfield == null) { return false; } // TODO: support two-slot fields return !(xfield.getS...
java
private boolean doForwardSubstitution() { if (!REDUNDANT_LOAD_ELIMINATION) { return false; } XField xfield = loadedFieldSet.getField(handle); if (xfield == null) { return false; } if(xfield.getSignature().equals("D") || xfield.getSignature().equa...
java
@Override public void modelNormalInstruction(Instruction ins, int numWordsConsumed, int numWordsProduced) { int flags = 0; if (ins instanceof InvokeInstruction) { flags = ValueNumber.RETURN_VALUE; } else if (ins instanceof ArrayInstruction) { flags = ValueNumber.ARRA...
java
private ValueNumber[] popInputValues(int numWordsConsumed) { ValueNumberFrame frame = getFrame(); ValueNumber[] inputValueList = allocateValueNumberArray(numWordsConsumed); // Pop off the input operands. try { frame.getTopStackWords(inputValueList); while (numWor...
java
private void pushOutputValues(ValueNumber[] outputValueList) { ValueNumberFrame frame = getFrame(); for (ValueNumber aOutputValueList : outputValueList) { frame.pushValue(aOutputValueList); } }
java
private void loadInstanceField(XField instanceField, Instruction obj) { if (RLE_DEBUG) { System.out.println("[loadInstanceField for field " + instanceField + " in instruction " + handle); } ValueNumberFrame frame = getFrame(); try { ValueNumber reference = frame...
java
private void loadStaticField(XField staticField, Instruction obj) { if (RLE_DEBUG) { System.out.println("[loadStaticField for field " + staticField + " in instruction " + handle); } ValueNumberFrame frame = getFrame(); AvailableLoad availableLoad = new AvailableLoad(staticF...
java
private void storeInstanceField(XField instanceField, Instruction obj, boolean pushStoredValue) { if (RLE_DEBUG) { System.out.println("[storeInstanceField for field " + instanceField + " in instruction " + handle); } ValueNumberFrame frame = getFrame(); int numWordsConsumed...
java
private void storeStaticField(XField staticField, Instruction obj, boolean pushStoredValue) { if (RLE_DEBUG) { System.out.println("[storeStaticField for field " + staticField + " in instruction " + handle); } ValueNumberFrame frame = getFrame(); AvailableLoad availableLoad ...
java