Package edu.umd.cs.findbugs

Examples of edu.umd.cs.findbugs.BugPattern


    }


    @SuppressWarnings({"MethodMayBeStatic"})
    public String getTypeDescription(final BugInstance bugInstance) {
      final BugPattern bugPattern = bugInstance.getBugPattern();
      return bugPattern.getAbbrev();
    }
View Full Code Here


    }


    @SuppressWarnings({"MethodMayBeStatic"})
    public String getCategory(final BugInstance bugInstance) {
      final BugPattern bugPattern = bugInstance.getBugPattern();
      return bugPattern.getCategory();
    }
View Full Code Here

    }


    @SuppressWarnings({"MethodMayBeStatic"})
    public String getShortDescr(final BugInstance warning) {
      final BugPattern bugPattern = warning.getBugPattern();
      return bugPattern.getShortDescription();
    }
View Full Code Here

    sb.append(getDescriptionWithoutHtml(factory));
    sb.append("\n\nReported patterns:\n");
    final Collection<BugPattern> patterns = factory.getReportedBugPatterns();
    //noinspection ForLoopWithMissingComponent
    for (final Iterator<BugPattern> iter = patterns.iterator(); iter.hasNext();) {
      final BugPattern pattern = iter.next();
      sb.append(pattern.getType()).append(' ').append(" (").append(pattern.getAbbrev()).append(", ").append(pattern.getCategory()).append("):").append("  ");
      sb.append(pattern.getShortDescription());
      if (iter.hasNext()) {
        sb.append('\n');
      }
    }
    if (patterns.isEmpty()) {
View Full Code Here

            if (maybeMutatedAsString != null && !(atMutationPoint(bug) && mutationPoints.contains(getBugLocation(bug)))) {
                return false;
            }

            BugPattern thisBugPattern = bug.getBugPattern();
            if (!categoryKey.isEmpty() && thisBugPattern != null && !categoryKey.contains(thisBugPattern.getCategory())) {
                return false;
            }
            if (!designationKey.isEmpty() && !designationKey.contains(bug.getUserDesignationKey())) {
                return false;
            }
View Full Code Here

                for (BugAnnotation b : bug.getAnnotationsForMessage(true)) {
                    summaryTopPanel.add(mainFrameComponentFactory.bugSummaryComponent(b, bug));
                }


                BugPattern bugPattern = bug.getBugPattern();
                String detailText =
                        bugPattern.getDetailText()
                        +"<br><p> <b>Bug kind and pattern: " +
                        bugPattern.getAbbrev() + " - " + bugPattern.getType();
                String txt = bugPattern.getDetailHTML(detailText);
                summaryHtmlArea.setText(txt);

                summaryTopPanel.add(Box.createVerticalGlue());
                summaryTopPanel.revalidate();
View Full Code Here

        int rank = bugInstance.getBugRank();
        if (rank > getMinRank()) {
            return false;
        }

        BugPattern bugPattern = bugInstance.getBugPattern();

        // HACK: it is conceivable that the detector plugin which generated
        // this warning is not available any more, in which case we can't
        // find out the category. Let the warning be visible in this case.
        if (!containsCategory(bugPattern.getCategory())) {
            return false;
        }

        if (!displayFalseWarnings) {
            boolean isFalseWarning = !Boolean.valueOf(bugInstance.getProperty(BugProperty.IS_BUG, "true")).booleanValue();
View Full Code Here

                if (bugCode == null) {
                    matching.add(warning.getPrimarySourceLineAnnotation());
                    matching.addAll(warning.getAnotherInstanceSourceLineAnnotations());
                    continue;
                }
                BugPattern pattern = warning.getBugPattern();
                String match;
                if (matchPattern) {
                    match = pattern.getType();
                } else {
                    match = pattern.getAbbrev();
                }
                if (match.equals(bugCode)) {
                    matching.add(warning.getPrimarySourceLineAnnotation());
                    matching.addAll(warning.getAnotherInstanceSourceLineAnnotations());
View Full Code Here

        prologue();

        Iterator<BugPattern> i = DetectorFactoryCollection.instance().bugPatternIterator();
        while (i.hasNext()) {
            BugPattern bugPattern = i.next();
            if (!enabledPatternSet.contains(bugPattern)) {
                continue;
            }
            emit(bugPattern);
        }
View Full Code Here

        // If at least one child is there, discard it from checked elements
        // list,
        // as it is already disabled by disabling parent
        Iterator<BugPattern> patterns = preSelectedPatterns.iterator();
        while (patterns.hasNext()) {
            BugPattern pattern = patterns.next();
            BugCode bugCode = DetectorFactoryCollection.instance().getBugCode(pattern.getAbbrev());
            if (preSelectedTypes.contains(bugCode)) {
                patterns.remove();
            }
        }
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.BugPattern

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.