Package edu.umd.cs.findbugs

Examples of edu.umd.cs.findbugs.I18N


            return true;
        }

        private void addDesignationKey(String argument) {
            I18N i18n = I18N.instance();

            for (String x : argument.split("[,|]")) {
                for (String designationKey : i18n.getUserDesignationKeys()) {
                    if (designationKey.equals(x) || i18n.getUserDesignation(designationKey).equals(x)) {
                        this.designationKey.add(designationKey);
                        break;
                    }

                }
View Full Code Here


        StringBuilder builder = new StringBuilder();
        long firstSeen = getFirstSeen(b);
        builder.append(String.format("First seen %s%n", format.format(new Date(firstSeen))));
        builder.append("\n");

        I18N i18n = I18N.instance();
        boolean canSeeCommentsByOthers = canSeeCommentsByOthers(b);
        if (canSeeCommentsByOthers && supportsBugLinks()) {
            BugFilingStatus bugLinkStatus = getBugLinkStatus(b);
            if (bugLinkStatus != null && bugLinkStatus.bugIsFiled()) {

                builder.append("\nBug status is ").append(getBugStatus(b));
                if (getBugIsUnassigned(b)) {
                    builder.append("\nBug is unassigned");
                }

                builder.append("\n\n");
            }
        }
        String me = getUser();
        for (BugDesignation d : getLatestDesignationFromEachUser(b)) {
            if (!usersToExclude.contains(d.getUser())
                    && (me != null && me.equals(d.getUser()) || canSeeCommentsByOthers)) {
                builder.append(String.format("%s@ %s: %s%n", d.getUser() == null ? "" : d.getUser() + " ",
                        format.format(new Date(d.getTimestamp())),
                        i18n.getUserDesignation(d.getDesignationKey())));
                String annotationText = d.getAnnotationText();
                if (annotationText != null && annotationText.length() > 0) {
                    builder.append(annotationText);
                    builder.append("\n\n");
                }
View Full Code Here

        Multiset<String> evaluations = new Multiset<String>();
        Multiset<String> designations = new Multiset<String>();
        Multiset<String> bugStatus = new Multiset<String>();

        int issuesWithThisManyReviews[] = new int[100];
        I18N i18n = I18N.instance();

        int packageCount = 0;
        int classCount = 0;
        int ncss = 0;
        ProjectStats projectStats = bugCollection.getProjectStats();
        for (PackageStats ps : projectStats.getPackageStats()) {
            int num = ps.getNumClasses();
            if (ClassName.matchedPrefixes(packagePrefixes, ps.getPackageName()) && num > 0) {
                packageCount++;
                ncss += ps.size();
                classCount += num;
            }
        }

        if (classCount == 0) {
            w.println("No classes were analyzed");
            return;
        }
        if (packagePrefixes != null && packagePrefixes.length > 0) {
            String lst = Arrays.asList(packagePrefixes).toString();
            w.println("Code analyzed in " + lst.substring(1, lst.length() - 1));
        } else {
            w.println("Code analyzed");
        }
        w.printf("%,7d packages%n%,7d classes%n", packageCount, classCount);
        if (ncss > 0) {
            w.printf("%,7d thousands of lines of non-commenting source statements%n", (ncss + 999) / 1000);
        }
        w.println();
        int count = 0;
        for (BugInstance bd : bugs) {

            count++;
            HashSet<String> reviewers = new HashSet<String>();
            String status = supportsBugLinks() && getBugLinkStatus(bd).bugIsFiled() ? getBugStatus(bd) : null;
            if (status != null) {
                bugStatus.add(status);
            }

            for (BugDesignation d : getLatestDesignationFromEachUser(bd)) {
                if (reviewers.add(d.getUser())) {
                    evaluations.add(d.getUser());
                    designations.add(i18n.getUserDesignation(d.getDesignationKey()));
                }
            }

            int numReviews = Math.min(reviewers.size(), issuesWithThisManyReviews.length - 1);
            issuesWithThisManyReviews[numReviews]++;
View Full Code Here

TOP

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

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.