Package edu.umd.cs.findbugs.ba

Examples of edu.umd.cs.findbugs.ba.Location


     * @param handle
     *            the instruction which performs the call
     */
    public CallSite(Method method, BasicBlock basicBlock, InstructionHandle handle) {
        this.method = method;
        this.location = new Location(handle, basicBlock);
    }
View Full Code Here


     * @throws CFGBuilderException
     */
    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().getPosition() == pc) {
                return location;
            }
        }
        return null;
    }
View Full Code Here

     *            the bytecode offset of an instruction to get properties for
     */
    public static void addPropertiesForLocation(WarningPropertySet<WarningProperty> propertySet, ClassContext classContext,
            Method method, int pc) {
        try {
            Location location = pcToLocation(classContext, method, pc);
            if (location != null) {
                addPropertiesForDataMining(propertySet, classContext, method, location);
            }
        } catch (CFGBuilderException e) {
            // Ignore
View Full Code Here

        CFG cfg = classContext.getCFG(method);
        ConstantPoolGen cpg = classContext.getConstantPoolGen();

        for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
            Location location = i.next();
            Resource resource = resourceTracker.isResourceCreation(location.getBasicBlock(), location.getHandle(), cpg);
            if (resource != null) {
                resourceCollection.addCreatedResource(location, resource);
            }
        }
View Full Code Here

        CFG cfg = classContext.getCFG(method);
        ConstantPoolGen cpg = classContext.getConstantPoolGen();

        for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
            Location location = i.next();
            if (resourceTracker.mightCloseResource(location.getBasicBlock(), location.getHandle(), cpg)) {
                return true;
            }

        }
View Full Code Here

            CFG cfg = classContext.getCFG(method);

            IsNullValueDataflow inv = classContext.getIsNullValueDataflow(method);
            boolean guaranteedNonNull = true;
            for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
                Location location = i.next();
                InstructionHandle handle = location.getHandle();
                Instruction ins = handle.getInstruction();

                if (!(ins instanceof ARETURN)) {
                    continue;
                }
View Full Code Here

        }

        // Inspect Locations in the method for suspicious ref comparisons and
        // calls to equals()
        for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
            Location location = i.next();

            inspectLocation(jclass, cpg, method, methodGen, refComparisonList, stringComparisonList, visitor, typeDataflow,
                    location);
        }
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.ba.Location

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.