static public void merge(HashSet<String> hashes, SortedBugCollection into, SortedBugCollection from) { for (BugInstance bugInstance : from.getCollection()) { if (hashes == null || hashes.add(bugInstance.getInstanceHash())) { into.add(bugInstance); } } ProjectStats stats = into.getProjectStats(); ProjectStats stats2 = from.getProjectStats(); stats.addStats(stats2); Project project = into.getProject(); Project project2 = from.getProject(); project.add(project2); for(AnalysisError error : from.getErrors()) { into.addError(error); } return; }
public CopyBuggySource(String[] args) throws Exception { origCollection = new SortedBugCollection(); origCollection.readXML(args[0]); project = origCollection.getProject(); sourceFinder = new SourceFinder(project); src = new File(args[1]); kind = SrcKind.get(src); switch (kind) { case DIR: break; case ZIP: zOut = new ZipOutputStream(new FileOutputStream(src)); break; case Z0P_GZ: zOut = new ZipOutputStream(new DeflaterOutputStream(new FileOutputStream(src))); zOut.setLevel(0); break; } }
Project project = results.getProject(); project.getSourceDirList().clear(); project.getFileList().clear();
if (!reporter.isApplySuppressions() || !bugCollection.getProject().getSuppressionFilter().match(warning)) { int rank = warning.getBugRank(); BugPattern pattern = warning.getBugPattern();
origCollection.readXML(System.in); Project project = origCollection.getProject(); origCollection.getProject().setProjectName(commandLine.projectName);
throw ioe; project = bugs.getProject().duplicate();
Project project = resultCollection.getProject(); int passed = 0; int dropped = 0;
public CopyBuggySource(String[] args) throws Exception { origCollection = new SortedBugCollection(); origCollection.readXML(args[0]); project = origCollection.getProject(); sourceFinder = new SourceFinder(project); src = new File(args[1]); kind = SrcKind.get(src); switch (kind) { case DIR: break; case ZIP: zOut = new ZipOutputStream(new FileOutputStream(src)); break; case Z0P_GZ: zOut = new ZipOutputStream(new DeflaterOutputStream(new FileOutputStream(src))); zOut.setLevel(0); break; } }
static public SortedBugCollection union(SortedBugCollection origCollection, SortedBugCollection newCollection) { SortedBugCollection result = origCollection.duplicate(); for (Iterator<BugInstance> i = newCollection.iterator(); i.hasNext();) { BugInstance bugInstance = i.next(); result.add(bugInstance); } ProjectStats stats = result.getProjectStats(); ProjectStats stats2 = newCollection.getProjectStats(); stats.addStats(stats2); Project project = result.getProject(); project.add(newCollection.getProject()); return result; }
public void load() throws IOException, DocumentException { if (options.analysisFile == null) { bugCollection.readXML(UTF8.bufferedReader(System.in)); } else { bugCollection.readXML(options.analysisFile); } if (options.cloudId != null && !options.cloudId.equals(bugCollection.getProject().getCloudId())) { bugCollection.getProject().setCloudId(options.cloudId); bugCollection.reinitializeCloud(); } }
static public void merge(HashSet<String> hashes, SortedBugCollection into, SortedBugCollection from) { for (BugInstance bugInstance : from.getCollection()) { if (hashes == null || hashes.add(bugInstance.getInstanceHash())) { into.add(bugInstance); } } ProjectStats stats = into.getProjectStats(); ProjectStats stats2 = from.getProjectStats(); stats.addStats(stats2); Project project = into.getProject(); Project project2 = from.getProject(); project.add(project2); for(AnalysisError error : from.getErrors()) { into.addError(error); } return; }
@Override public @Nonnull Cloud getCloud() { if (shouldNotUsePlugin) { return CloudFactory.getPlainCloud(this); } Cloud result = cloud; if (result == null) { IGuiCallback callback = getProject().getGuiCallback(); result = cloud = CloudFactory.createCloudWithoutInitializing(this); try { CloudFactory.initializeCloud(this, result); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Could not load cloud plugin "+ result.getCloudName(), e); callback.showMessageDialog("Unable to connect to " + result.getCloudName() + ": " + Util.getNetworkErrorMessage(e)); if (CloudFactory.FAIL_ON_CLOUD_ERROR) { throw new IllegalStateException("Could not load FindBugs Cloud plugin - to avoid this message, " + "set -D" + CloudFactory.FAIL_ON_CLOUD_ERROR_PROP + "=false", e); } result = cloud = CloudFactory.getPlainCloud(this); } callback.registerCloud(getProject(), this, result); } if (!result.isInitialized()) { LOGGER.log(Level.SEVERE, "Cloud " + result.getCloudName() + " is not initialized "); } if (bugsPopulated) { result.bugsPopulated(); } return result; }
cloud.setMode(Cloud.Mode.COMMUNAL); out.printf("Cloud sync and summary report for %s%n", bugCollection.getProject().getProjectName());
public void openBugCollection(SortedBugCollection bugs) { acquireDisplayWait(); try { mainFrameLoadSaveHelper.prepareForFileLoad(null, null); Project project = bugs.getProject(); project.setGuiCallback(guiCallback); BugLoader.addDeadBugMatcher(bugs); setProjectAndBugCollectionInSwingThread(project, bugs); } finally { releaseDisplayWait(); } }
Project project = results.getProject(); project.getSourceDirList().clear(); project.getFileList().clear();
results.getProject().setCloudId(options.cloudId); results.reinitializeCloud(); cloud.waitUntilIssueDataDownloaded(); isConnectedToCloud = !(cloud instanceof BugCollectionStorageCloud); Project project = results.getProject(); originalMode = cloud.getMode();
SortedBugCollection collection = readXml(file); Project project = collection.getProject(); for (String sourceFolder : sources) { project.addSourceDir(sourceFolder);
SortedBugCollection collection = readXml(file); Project project = collection.getProject(); for (String sourceFolder : sources) { project.addSourceDir(sourceFolder);
SortedBugCollection collection = readXml(file); Project project = collection.getProject(); for (String sourceFolder : sources) { project.addSourceDir(sourceFolder);
throw ioe; project = bugs.getProject().duplicate();