Examples of addSourceLine()


Examples of edu.umd.cs.findbugs.BugInstance.addSourceLine()

        if (variable != null) {
            bugInstance.add(variable);
        } else {
            bugInstance.add(new LocalVariableAnnotation("?", -1, -1));
        }
        bugInstance.addSourceLine(classContext, method, location).describe("SOURCE_LINE_DEREF");

        if (FindBugsAnalysisFeatures.isRelaxedMode()) {
            WarningPropertyUtil.addPropertiesForDataMining(propertySet, classContext, method, location);
        }
        addPropertiesForDereferenceLocations(propertySet, Collections.singleton(location), false);
View Full Code Here

Examples of edu.umd.cs.findbugs.BugInstance.addSourceLine()

            }
            bugInstance.setPriority(priority+1);
            bugInstance.add(fallback);
        }
        if (wouldHaveBeenAKaboom) {
            bugInstance.addSourceLine(classContext, method, locationOfKaBoom);
        }

        if (FindBugsAnalysisFeatures.isRelaxedMode()) {
            WarningPropertySet<WarningProperty> propertySet = new WarningPropertySet<WarningProperty>();
            WarningPropertyUtil.addPropertiesForDataMining(propertySet, classContext, method, location);
View Full Code Here

Examples of edu.umd.cs.findbugs.BugInstance.addSourceLine()

                }
            }

        } else {
            for (Location loc : derefLocationSet) {
                bugInstance.addSourceLine(classContext, method, loc).describe(getDescription(loc, refValue));
            }

            if (sourceLocations == doomedLocations && assignedNullLocationSet.size() == 1) {
                Location assignedNull = assignedNullLocationSet.iterator().next();
                SourceLineAnnotation sourceLineAnnotation = SourceLineAnnotation.fromVisitedInstruction(classContext, method,
View Full Code Here

Examples of edu.umd.cs.findbugs.BugInstance.addSourceLine()

        if (variable != null) {
            bugInstance.add(variable);
        } else {
            bugInstance.add(new LocalVariableAnnotation("?", -1, -1));
        }
        bugInstance.addSourceLine(classContext, method, location).describe("SOURCE_LINE_DEREF");

        if (FindBugsAnalysisFeatures.isRelaxedMode()) {
            WarningPropertyUtil.addPropertiesForDataMining(propertySet, classContext, method, location);
        }
        addPropertiesForDereferenceLocations(propertySet, Collections.singleton(location));
View Full Code Here

Examples of edu.umd.cs.findbugs.BugInstance.addSourceLine()

            propertySet.decorateBugInstance(bugInstance);
            // Add source lines for unsynchronized accesses
            for (Iterator<SourceLineAnnotation> j = stats.unsyncAccessIterator(); j.hasNext();) {
                SourceLineAnnotation accessSourceLine = j.next();
                bugInstance.addSourceLine(accessSourceLine).describe("SOURCE_LINE_UNSYNC_ACCESS");
            }

            if (SYNC_ACCESS) {
                // Add source line for synchronized accesses;
                // useful for figuring out what the detector is doing
View Full Code Here

Examples of edu.umd.cs.findbugs.BugInstance.addSourceLine()

            if (SYNC_ACCESS) {
                // Add source line for synchronized accesses;
                // useful for figuring out what the detector is doing
                for (Iterator<SourceLineAnnotation> j = stats.syncAccessIterator(); j.hasNext();) {
                    SourceLineAnnotation accessSourceLine = j.next();
                    bugInstance.addSourceLine(accessSourceLine).describe("SOURCE_LINE_SYNC_ACCESS");
                }
            }

            if (EVAL) {
                bugInstance.addInt(biasedLocked).describe("INT_BIASED_LOCKED");
View Full Code Here

Examples of edu.umd.cs.findbugs.BugInstance.addSourceLine()

                }

                BugInstance bugInstance = new BugInstance(this, exitInTryBlock ? "DE_MIGHT_DROP" : "DE_MIGHT_IGNORE", priority)
                .addClassAndMethod(this);
                bugInstance.addClass(causeName).describe("CLASS_EXCEPTION");
                bugInstance.addSourceLine(srcLine);
                bugAccumulator.accumulateBug(bugInstance, srcLine);

            }
        }
    }
View Full Code Here

Examples of edu.umd.cs.findbugs.BugInstance.addSourceLine()

            .addString(regex).describe(StringAnnotation.REGEX_ROLE);
            String options = getOptions(flags);
            if (options.length() > 0) {
                bug.addString("Regex flags: " + options).describe(StringAnnotation.STRING_MESSAGE);
            }
            bug.addSourceLine(this);
            bugReporter.reportBug(bug);
        }
    }

    /** return an int on the stack, or 'defaultValue' if can't determine */
 
View Full Code Here

Examples of edu.umd.cs.findbugs.BugInstance.addSourceLine()

                    BugInstance bug;
                    if (unconditionalDerefLocationSet.size() > 1) {
                        bug = new BugInstance(this, "NP_GUARANTEED_DEREF", NORMAL_PRIORITY).addClassAndMethod(this);
                        bug.addOptionalAnnotation(variableAnnotation);
                        bug.addSourceLine(tested).describe("SOURCE_LINE_KNOWN_NULL");
                        for (Location dereferenced : unconditionalDerefLocationSet) {
                            bug.addSourceLine(getClassContext(), getMethod(), dereferenced).describe("SOURCE_LINE_DEREF");
                        }

                    } else {
View Full Code Here

Examples of edu.umd.cs.findbugs.BugInstance.addSourceLine()

                    if (unconditionalDerefLocationSet.size() > 1) {
                        bug = new BugInstance(this, "NP_GUARANTEED_DEREF", NORMAL_PRIORITY).addClassAndMethod(this);
                        bug.addOptionalAnnotation(variableAnnotation);
                        bug.addSourceLine(tested).describe("SOURCE_LINE_KNOWN_NULL");
                        for (Location dereferenced : unconditionalDerefLocationSet) {
                            bug.addSourceLine(getClassContext(), getMethod(), dereferenced).describe("SOURCE_LINE_DEREF");
                        }

                    } else {
                        bug = new BugInstance(this, "NP_NULL_ON_SOME_PATH", NORMAL_PRIORITY).addClassAndMethod(this);
                        bug.addOptionalAnnotation(variableAnnotation);
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.