Map<String,Set<String>> missingFiles = new HashMap<String,Set<String>>(); if (!commandLine.searchSourcePaths.isEmpty()) { sourceSearcher = new SourceSearcher(project); Set<String> filenames = new HashSet<String>(); for(BugInstance bug : origCollection.getCollection()) { SourceLineAnnotation src = bug.getPrimarySourceLineAnnotation(); if (!sourceSearcher.sourceNotFound.contains(src.getClassName()) && !sourceSearcher.findSource(src)) { Set<String> paths = missingFiles.get(src.getSourceFile()); if (paths == null) { paths = new HashSet<String>(); missingFiles.put(src.getSourceFile(), paths); } String fullPath = fullPath(src);  paths.add(fullPath); } } Set<String> foundPaths = new HashSet<String>(); for(String f : commandLine.searchSourcePaths) for(File javaFile :  RecursiveSearchForJavaFiles.search(new File(f))) { Set<String> matchingMissingClasses = missingFiles.get(javaFile.getName()); if (matchingMissingClasses == null) {  } else for(String sourcePath : matchingMissingClasses) { String path = javaFile.getAbsolutePath(); if (path.endsWith(sourcePath)) { String dir = path.substring(0,path.length() - sourcePath.length()); if (foundPaths.add(dir)) { project.addSourceDir(dir); if (argCount < args.length) System.out.println("Found " + dir); } } }   }   }
	public static void main(String[] args) throws IOException,			DocumentException {		DetectorFactoryCollection.instance();		SetInfoCommandLine commandLine = new SetInfoCommandLine();		int argCount = commandLine.parse(args, 0, 2, USAGE);		Project project = new Project();		BugCollection origCollection;		origCollection = new SortedBugCollection();		if (argCount < args.length) 			origCollection.readXML(args[argCount++], project);		else			origCollection.readXML(System.in, project);				if (commandLine.revisionName != null)			origCollection.setReleaseName(commandLine.revisionName);		if (commandLine.revisionTimestamp != 0)			origCollection.setTimestamp(commandLine.revisionTimestamp);		for(String source : commandLine.sourcePaths)			project.addSourceDir(source);				if (argCount < args.length) 			origCollection.writeXML(args[argCount++], project);		else			origCollection.writeXML(System.out, project);	}