Package edu.umd.cs.findbugs.cloud
Class AbstractCloud
java.lang.Object
edu.umd.cs.findbugs.cloud.AbstractCloud
- All Implemented Interfaces:
Cloud
- Direct Known Subclasses:
BugCollectionStorageCloud
- Author:
- William Pugh
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.umd.cs.findbugs.cloud.Cloud
Cloud.BugFilingStatus, Cloud.CloudListener, Cloud.CloudStatusListener, Cloud.CloudTask, Cloud.CloudTaskListener, Cloud.Mode, Cloud.SigninState, Cloud.UserDesignation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BugCollection
static long
protected final CloudPlugin
protected final PropertyBundle
protected static final boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractCloud
(CloudPlugin plugin, BugCollection bugs, Properties properties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDateSeen
(BugInstance b, long when) void
addListener
(Cloud.CloudListener listener) void
addStatusListener
(Cloud.CloudStatusListener listener) void
Called after the bugs in the bug collection are loaded; bugs should not be synchronized before this method is calledboolean
boolean
canStoreUserAnnotation
(BugInstance bugInstance) Is this bug one that gets persisted to the cloud? We may decide that we don't persist low confidence issues to the database to avoid overloading itboolean
claim
(BugInstance b) Claim the bugGet the user who has claimed a bug; null if no one hasboolean
Returns true if communication has already been initiated (and perhaps completed).createTask
(String name) fileBug
(BugInstance bug) protected void
getBugByHash
(String hash) boolean
does the issue have an unassigned issue in the bug trackerGet link for bug, either to file one or to view itget the bug filing status for a bug instancegetBugLinkType
(BugInstance instance) A textual description of the bug status (e.g., FIX_LATER, ASSIGNED, OBSOLETE, WILL_NOT_FIX)double
double
double
protected String
getCloudProperty
(String propertyName) long
boolean
has the user said they will fix this bugprotected abstract Iterable
<BugDesignation> long
getMode()
Get voting modeint
double
URL to view the source for a bug instanceTool tip text for "view source" buttonGet a status message for the cloud; information about any errors, and information about database synchronizationGet the user's designation for the bugGet free text evaluation of the bugprotected NameLookup
long
Return the time the user last changed their evaluation of this bugboolean
has the issue been marked "will not be fixed" in a bug trackerboolean
hasVoted
(BugInstance bug) boolean
Attempt to initialize the cloudboolean
Return true if the cloud has been successfully initializedprotected boolean
boolean
void
printCloudSummary
(PrintWriter w, Iterable<BugInstance> bugs, String[] packagePrefixes) static void
printLeaderBoard2
(PrintWriter w, Multiset<String> evaluations, int maxRows, String alwaysPrint, String format, String title) void
removeListener
(Cloud.CloudListener listener) void
void
setBugLinkOnCloudAndStoreIssueDetails
(BugInstance b, String viewUrl, String linkType) void
setMode
(Cloud.Mode mode) Set voting modevoid
setSigninState
(Cloud.SigninState state) void
setStatusMsg
(String newMsg) void
shutdown()
Shutdown the cloud, note termination of session, close connectionsboolean
Supports links to a bug databaseboolean
Supports allowing users to claim a bugboolean
Supports textual summaries about the status of a bugboolean
boolean
Does the cloud support source lines (e.g., to FishEye)void
updateBugStatusCache
(BugInstance b, String status) Updates the local cache of bug reporting status.void
updatedIssue
(BugInstance bug) protected void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.umd.cs.findbugs.cloud.Cloud
availableForInitialization, bugFiled, getPrimaryDesignation, getProjects, getUser, initiateCommunication, isInCloud, isOnlineCloud, isSavingSignInInformationEnabled, setSaveSignInInformation, signIn, signOut, storeUserAnnotation, waitUntilIssueDataDownloaded, waitUntilIssueDataDownloaded, waitUntilNewIssuesUploaded, waitUntilNewIssuesUploaded
-
Field Details
-
MIN_TIMESTAMP
public static long MIN_TIMESTAMP -
THROW_EXCEPTION_IF_CANT_CONNECT
protected static final boolean THROW_EXCEPTION_IF_CANT_CONNECT- See Also:
-
plugin
-
bugCollection
-
properties
-
-
Constructor Details
-
AbstractCloud
-
-
Method Details
-
isInitialized
public boolean isInitialized()Description copied from interface:Cloud
Return true if the cloud has been successfully initialized- Specified by:
isInitialized
in interfaceCloud
-
initialize
Description copied from interface:Cloud
Attempt to initialize the cloud- Specified by:
initialize
in interfaceCloud
- Returns:
- true if successful
- Throws:
IOException
-
getMode
Description copied from interface:Cloud
Get voting mode -
setMode
Description copied from interface:Cloud
Set voting mode -
getPlugin
-
getBugCollection
- Specified by:
getBugCollection
in interfaceCloud
-
supportsBugLinks
public boolean supportsBugLinks()Description copied from interface:Cloud
Supports links to a bug database- Specified by:
supportsBugLinks
in interfaceCloud
-
setBugLinkOnCloudAndStoreIssueDetails
public void setBugLinkOnCloudAndStoreIssueDetails(BugInstance b, String viewUrl, String linkType) throws IOException, SignInCancelledException - Specified by:
setBugLinkOnCloudAndStoreIssueDetails
in interfaceCloud
- Throws:
IOException
SignInCancelledException
-
updateBugStatusCache
Description copied from interface:Cloud
Updates the local cache of bug reporting status. Does not modify server code.- Specified by:
updateBugStatusCache
in interfaceCloud
-
supportsClaims
public boolean supportsClaims()Description copied from interface:Cloud
Supports allowing users to claim a bug- Specified by:
supportsClaims
in interfaceCloud
-
supportsCloudReports
public boolean supportsCloudReports()Description copied from interface:Cloud
Supports textual summaries about the status of a bug- Specified by:
supportsCloudReports
in interfaceCloud
-
claimedBy
Description copied from interface:Cloud
Get the user who has claimed a bug; null if no one has -
claim
Description copied from interface:Cloud
Claim the bug -
getBugLink
Description copied from interface:Cloud
Get link for bug, either to file one or to view it- Specified by:
getBugLink
in interfaceCloud
-
getBugLinkType
- Specified by:
getBugLinkType
in interfaceCloud
-
fileBug
-
getBugLinkStatus
Description copied from interface:Cloud
get the bug filing status for a bug instance- Specified by:
getBugLinkStatus
in interfaceCloud
-
canSeeCommentsByOthers
-
hasVoted
-
notInCloudMsg
-
getCloudReport
- Specified by:
getCloudReport
in interfaceCloud
-
getCloudReportWithoutMe
- Specified by:
getCloudReportWithoutMe
in interfaceCloud
-
bugsPopulated
public void bugsPopulated()Description copied from interface:Cloud
Called after the bugs in the bug collection are loaded; bugs should not be synchronized before this method is called- Specified by:
bugsPopulated
in interfaceCloud
-
issueDataHasBeenDownloaded
protected boolean issueDataHasBeenDownloaded() -
getBugStatus
Description copied from interface:Cloud
A textual description of the bug status (e.g., FIX_LATER, ASSIGNED, OBSOLETE, WILL_NOT_FIX)- Specified by:
getBugStatus
in interfaceCloud
-
getLatestDesignationFromEachUser
-
getUserDate
- Specified by:
getUserDate
in interfaceCloud
-
addListener
- Specified by:
addListener
in interfaceCloud
-
removeListener
- Specified by:
removeListener
in interfaceCloud
-
addStatusListener
- Specified by:
addStatusListener
in interfaceCloud
-
removeStatusListener
- Specified by:
removeStatusListener
in interfaceCloud
-
getStatusMsg
Description copied from interface:Cloud
Get a status message for the cloud; information about any errors, and information about database synchronization- Specified by:
getStatusMsg
in interfaceCloud
-
shutdown
public void shutdown()Description copied from interface:Cloud
Shutdown the cloud, note termination of session, close connections -
getIWillFix
Description copied from interface:Cloud
has the user said they will fix this bug- Specified by:
getIWillFix
in interfaceCloud
-
getConsensusDesignation
- Specified by:
getConsensusDesignation
in interfaceCloud
- Returns:
Cloud.UserDesignation.UNCLASSIFIED
if no consensus has been reached
-
overallClassificationIsNotAProblem
- Specified by:
overallClassificationIsNotAProblem
in interfaceCloud
-
getClassificationScore
- Specified by:
getClassificationScore
in interfaceCloud
-
getClassificationVariance
- Specified by:
getClassificationVariance
in interfaceCloud
-
getPortionObsoleteClassifications
- Specified by:
getPortionObsoleteClassifications
in interfaceCloud
-
getNumberReviewers
- Specified by:
getNumberReviewers
in interfaceCloud
-
printCloudSummary
- Specified by:
printCloudSummary
in interfaceCloud
-
printLeaderBoard2
-
supportsCloudSummaries
public boolean supportsCloudSummaries()- Specified by:
supportsCloudSummaries
in interfaceCloud
-
canStoreUserAnnotation
Description copied from interface:Cloud
Is this bug one that gets persisted to the cloud? We may decide that we don't persist low confidence issues to the database to avoid overloading it- Specified by:
canStoreUserAnnotation
in interfaceCloud
-
getClassificationDisagreement
- Specified by:
getClassificationDisagreement
in interfaceCloud
-
getUserDesignation
Description copied from interface:Cloud
Get the user's designation for the bug- Specified by:
getUserDesignation
in interfaceCloud
-
getUserEvaluation
Description copied from interface:Cloud
Get free text evaluation of the bug- Specified by:
getUserEvaluation
in interfaceCloud
-
getUserTimestamp
Description copied from interface:Cloud
Return the time the user last changed their evaluation of this bug- Specified by:
getUserTimestamp
in interfaceCloud
-
getFirstSeen
- Specified by:
getFirstSeen
in interfaceCloud
-
addDateSeen
- Specified by:
addDateSeen
in interfaceCloud
-
updatedStatus
protected void updatedStatus() -
updatedIssue
-
fireIssueDataDownloadedEvent
protected void fireIssueDataDownloadedEvent() -
getSigninState
- Specified by:
getSigninState
in interfaceCloud
-
setSigninState
-
getBugByHash
-
getUsernameLookup
- Throws:
IOException
-
createTask
-
setStatusMsg
-
getCloudProperty
-
supportsSourceLinks
public boolean supportsSourceLinks()Description copied from interface:Cloud
Does the cloud support source lines (e.g., to FishEye)- Specified by:
supportsSourceLinks
in interfaceCloud
-
getSourceLink
Description copied from interface:Cloud
URL to view the source for a bug instance- Specified by:
getSourceLink
in interfaceCloud
-
getSourceLinkToolTip
Description copied from interface:Cloud
Tool tip text for "view source" button- Specified by:
getSourceLinkToolTip
in interfaceCloud
-
getBugIsUnassigned
Description copied from interface:Cloud
does the issue have an unassigned issue in the bug tracker- Specified by:
getBugIsUnassigned
in interfaceCloud
-
getWillNotBeFixed
Description copied from interface:Cloud
has the issue been marked "will not be fixed" in a bug tracker- Specified by:
getWillNotBeFixed
in interfaceCloud
-
getReviewers
- Specified by:
getReviewers
in interfaceCloud
-
getGuiCallback
- Specified by:
getGuiCallback
in interfaceCloud
-
getCloudName
- Specified by:
getCloudName
in interfaceCloud
-
communicationInitiated
public boolean communicationInitiated()Description copied from interface:Cloud
Returns true if communication has already been initiated (and perhaps completed).- Specified by:
communicationInitiated
in interfaceCloud
-
getLocalFirstSeen
-