Examples of locationIterator()


Examples of edu.umd.cs.findbugs.ba.CFG.locationIterator()

        MethodDescriptor methodDescriptor = DescriptorFactory.instance().getMethodDescriptor(classContext.getJavaClass(), method);
        if (DEBUG) {
            System.out.println("**** Analyzing method " + SignatureConverter.convertMethodSignature(methodGen));
        }

        for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
            Location location = i.next();
            try {
                Instruction ins = location.getHandle().getInstruction();
                XField xfield = null;
                boolean isWrite = false;
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.CFG.locationIterator()

        ValueNumberDataflow vnaDataflow = classContext.getValueNumberDataflow(method);
        TypeDataflow typeDataflow = classContext.getTypeDataflow(method);

        String sourceFileName = javaClass.getSourceFileName();

        for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
            Location location = i.next();

            InstructionHandle handle = location.getHandle();
            Instruction ins = handle.getInstruction();
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.CFG.locationIterator()

        ValueNumberDataflow valueNumberDataflow = classContext.getValueNumberDataflow(method);
        ConstantPoolGen cpg = classContext.getConstantPoolGen();
        MethodGen methodGen = classContext.getMethodGen(method);
        String sourceFile = classContext.getJavaClass().getSourceFileName();

        for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
            Location location = i.next();

            Instruction ins = location.getHandle().getInstruction();
            switch (ins.getOpcode()) {
            case INVOKEVIRTUAL:
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.CFG.locationIterator()

        BitSet liveStoreSourceLineSet = new BitSet();

        // Scan method for
        // - dead stores
        // - stores to parameters that are dead upon entry to the method
        for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
            Location location = i.next();

            BugInstance pendingBugReportAboutOverwrittenParameter = null;
            try {
                WarningPropertySet<WarningProperty> propertySet = new WarningPropertySet<WarningProperty>();
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.CFG.locationIterator()

                    } else if (prevIns instanceof GETSTATIC) {
                        GETSTATIC getStatic = (GETSTATIC) prevIns;
                        ConstantPoolGen cpg = methodGen.getConstantPool();
                        foundDeadClassInitialization = getStatic.getFieldName(cpg).startsWith("class$")
                                && getStatic.getSignature(cpg).equals("Ljava/lang/Class;");
                        for (Iterator<Location> j = cfg.locationIterator(); j.hasNext();) {
                            Location location2 = j.next();
                            if (location2.getHandle().getPosition() + 15 == location.getHandle().getPosition()) {
                                Instruction instruction2 = location2.getHandle().getInstruction();
                                if (instruction2 instanceof LDC) {
                                    Object value = ((LDC) instruction2).getValue(methodGen.getConstantPool());
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.CFG.locationIterator()

        CFG cfg = classContext.getCFG(method);

        StringAppendState stringAppendState = getStringAppendState(cfg, cpg);

        ConstantDataflow dataflow = classContext.getConstantDataflow(method);
        for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
            Location location = i.next();
            Instruction ins = location.getHandle().getInstruction();
            if (!(ins instanceof InvokeInstruction)) {
                continue;
            }
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.CFG.locationIterator()

        if (DEBUG) {
            String methodName = methodGen.getClassName() + "." + methodGen.getName();
            System.out.println("Checking " + methodName);
        }

        for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
            Location location = i.next();
            InstructionHandle handle = location.getHandle();
            Instruction ins = handle.getInstruction();

            Use use = getUse(cpg, ins);
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.CFG.locationIterator()

     *         Location can be found
     * @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;
            }
        }
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.CFG.locationIterator()

        ResourceCollection<Resource> resourceCollection = new ResourceCollection<Resource>();

        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

Examples of edu.umd.cs.findbugs.ba.CFG.locationIterator()

            throws CFGBuilderException, DataflowAnalysisException {

        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
TOP
Copyright © 2018 www.massapi.com. 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.