private static Map<SignatureLibrary,Set<Job>> clusterJobsBySignatureLibrary(List<Job> jobs){
  Map<SignatureLibrary,Set<Job>> result=new HashMap<SignatureLibrary,Set<Job>>();
  for (  Job job : jobs) {
    SignatureLibraryRelease release=job.getLibraryRelease();
    if (release != null) {
      SignatureLibrary library=release.getLibrary();
      Set<Job> jobsForLibrary=result.get(library);
      if (jobsForLibrary == null) {
        jobsForLibrary=new HashSet<Job>();
      }
      jobsForLibrary.add(job);
      result.put(library,jobsForLibrary);
    }
  }
  return result;
}

private static Map < SignatureLibrary , Set < Job > > clusterJobsBySignatureLibrary ( List < Job > jobs ) { Map < SignatureLibrary , Set < Job > > result = new HashMap < SignatureLibrary , Set < Job > > ( ) ; for ( Job job : jobs ) { SignatureLibraryRelease release = job . getLibraryRelease ( ) ; if ( release != null ) { SignatureLibrary library = release . getLibrary ( ) ; Set < Job > jobsForLibrary = result . get ( library ) ; if ( jobsForLibrary == null ) { jobsForLibrary = new HashSet < Job > ( ) ; } jobsForLibrary . add ( job ) ; result . put ( library , jobsForLibrary ) ; } } return result ; }
clusters jobs of the same library ( analysis ) .
