Package edu.umd.cs.findbugs.cloud

Examples of edu.umd.cs.findbugs.cloud.Cloud


    html.append("<h2>");
    html.append(bugInstance.getAbridgedMessage());
    html.append("</h2><p/>");
    final SortedBugCollection bc = _lastBugCollection;
    if (bc != null) {
      final Cloud cloud = bc.getCloud();
      //noinspection ConstantConditions
      if (cloud != null) {
        final int reviewers = cloud.getReviewers(bugInstance).size();
        if (reviewers > 0) {
          html.append(" - <a href='#comments'><u>");
          html.append(reviewers);
          html.append(" comment");
          html.append(reviewers != 1 ? "s" : "");
          html.append("</u></a>");
        }
        final UserDesignation designation = cloud.getConsensusDesignation(bugInstance);
        if (designation != UserDesignation.UNCLASSIFIED) {
          //List<String> userDesignationKeys = I18N.instance().getUserDesignationKeys(true);
          html.append(" - \"");
          html.append(I18N.instance().getUserDesignation(designation.name()));
          html.append('\"');
        }
        final int ageInDays = (int) ((System.currentTimeMillis() - cloud.getFirstSeen(bugInstance)) / (1000 * 60 * 60 * 24));
        if (cloud.isInCloud(bugInstance) && ageInDays > 0) {
          html.append(" - first seen ");
          html.append(ageInDays);
          html.append(" day");
          html.append(ageInDays != 1 ? "s" : "");
          html.append(" ago");
View Full Code Here


        }
        if (userDesignation.getDesignationKey().equals(key)) {
            return;
        }
        userDesignation.setDesignationKey(key);
        Cloud plugin = bugCollection != null ? bugCollection.getCloud() : null;
        if (plugin != null) {
            plugin.storeUserAnnotation(this);
        }
    }
View Full Code Here

        String existingText = u.getNonnullAnnotationText();
        if (existingText.equals(annotationText)) {
            return;
        }
        u.setAnnotationText(annotationText);
        Cloud plugin = bugCollection != null ? bugCollection.getCloud() : null;
        if (plugin != null) {
            plugin.storeUserAnnotation(this);
        }
    }
View Full Code Here

        if (removedByChangeOfPersistingClass) {
            attributeList.addAttribute("removedByChange", "true");
        }

        if (bugCollection != null) {
            Cloud cloud = bugCollection.getCloudLazily();
            if (cloud != null && cloud.communicationInitiated()) {
                long firstSeen = cloud.getFirstSeen(this);
                attributeList.addAttribute("firstSeen", firstSeenXMLFormat().format(firstSeen));
                int reviews = cloud.getNumberReviewers(this);
                UserDesignation consensus = cloud.getConsensusDesignation(this);
                if (!cloud.isInCloud(this)) {
                    attributeList.addAttribute("isInCloud", "false");
                }
                if (reviews > 0) {
                    attributeList.addAttribute("reviews", Integer.toString(reviews));
View Full Code Here

        }

        if (commandLine.maxAgeSpecified || commandLine.notAProblemSpecified || commandLine.shouldFixSpecified) {

            Cloud cloud = origCollection.getCloud();
            SigninState signinState = cloud.getSigninState();
            if (!signinState.canDownload()) {
                disconnect(verbose, commandLine, resultCollection,  cloud.getCloudName() + " state is " + signinState
                        + "; ignoring filtering options that require cloud access");

            } else if (!cloud.waitUntilIssueDataDownloaded(20, TimeUnit.SECONDS)) {
                if (verbose) {
                    System.out.println("Waiting for cloud information required for filtering");
                }
                if (!cloud.waitUntilIssueDataDownloaded(60, TimeUnit.SECONDS)) {
                    disconnect(verbose, commandLine, resultCollection,
                            "Unable to connect to cloud; ignoring filtering options that require cloud access");
                }
            }
        }
View Full Code Here

                if (sourceSearcher.findSource(primarySourceLineAnnotation) != withSource) {
                    return false;
                }
            }

            Cloud cloud = collection.getCloud();
            if (maxAgeSpecified) {
                long firstSeen = cloud.getFirstSeen(bug);
                if (!cloud.isInCloud(bug)) {
                    return false;
                }
                if (firstSeen < minFirstSeen) {
                    return false;
                }
            }

            if (notAProblemSpecified && notAProblem != (cloud.getConsensusDesignation(bug).score() < 0)) {
                return false;
            }
            if (shouldFixSpecified && shouldFix != (cloud.getConsensusDesignation(bug).score() > 0)) {
                return false;
            }

            if (sloppyUniqueSpecified) {
                boolean unique = uniqueSloppy.add(bug);
View Full Code Here

                Date firstSeen = new Date(when);
                b.getXmlProps().setFirstSeen(firstSeen);
                System.out.println("Set first seen to " + firstSeen);
            }
        }
        Cloud cloud = origCollection.getCloud();
        cloud.bugsPopulated();
        if (cloud.getSigninState() != Cloud.SigninState.SIGNED_IN
                && cloud.getSigninState() != Cloud.SigninState.NO_SIGNIN_REQUIRED) {
            cloud.signIn();
            if (cloud.getSigninState() != Cloud.SigninState.SIGNED_IN
                    && cloud.getSigninState() != Cloud.SigninState.NO_SIGNIN_REQUIRED) {
                throw new IllegalStateException("Unable to sign in; state : " + cloud.getSigninState());
            }
        }

        cloud.waitUntilIssueDataDownloaded();

        if (args.length > 1) {
            origCollection.writeXML(args[1]);
        }
        cloud.waitUntilNewIssuesUploaded();
        cloud.shutdown();

    }
View Full Code Here

        statusBarLabel.setText(msg);
    }

    private String updateCloudSigninStatus(String msg) {
        if (getBugCollection() != null) {
            Cloud cloud = getBugCollection().getCloud();
            String pluginMsg = cloud.getStatusMsg();
            if (pluginMsg != null && pluginMsg.length() > 1) {
                msg = join(msg, pluginMsg);
            }
        }
        return msg;
View Full Code Here

        guiLayout.saveState();
        guiSaveState.setFrameBounds(getBounds());
        guiSaveState.setExtendedWindowState(getExtendedState());
        guiSaveState.save();
        if (this.bugCollection != null) {
            Cloud cloud = this.bugCollection.getCloud();
            cloud.shutdown();
        }
        System.exit(0);
    }
View Full Code Here

        }
        acquireDisplayWait();
        try {

            if (this.bugCollection != bugCollection && this.bugCollection != null) {
                Cloud plugin = this.bugCollection.getCloud();
                plugin.removeListener(userAnnotationListener);
                plugin.removeStatusListener(cloudStatusListener);
                plugin.shutdown();
            }
            // setRebuilding(false);
            setProject(project);
            this.bugCollection = bugCollection;
            BugLoader.addDeadBugMatcher(bugCollection);

            comments.updateBugCollection();
            displayer.clearCache();
            if (bugCollection != null) {
                Cloud plugin = bugCollection.getCloud();
                plugin.addListener(userAnnotationListener);
                plugin.addStatusListener(cloudStatusListener);
            }
            mainFrameTree.updateBugTree();
            setProjectChanged(false);
            Runnable runnable = new Runnable() {
                @Override
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.cloud.Cloud

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.