public final String toString(boolean _deep) { final StringBuilder builder = new StringBuilder(); if(_deep) { builder.append("Library affected: [").append(this.getAffected()).append("]").append(System.getProperty("line.separator")); builder.append(" Bug ").append(this.getBugId()); builder.append(" LibraryId ").append(this.getLibraryId()); } else { builder.append("[").append(this.getId()).append(":").append(this.getBugId()).append(":affected=").append(this.getAffected()).append("]"); } return builder.toString(); } }
@Override public final String toString() { return this.toString(false); }
if(a.getLibraryId()!=null && dep.getLib()!=null && dep.getLib().getLibraryId()!=null) { if(a.getLibraryId().equals(dep.getLib().getLibraryId())) { if(a.getSource() == AffectedVersionSource.MANUAL){ manual_libId = a.getAffected(); else if(a.getSource() == AffectedVersionSource.AST_EQUALITY || a.getSource() == AffectedVersionSource.MAJOR_EQUALITY || a.getSource() == AffectedVersionSource.MINOR_EQUALITY || a.getSource() == AffectedVersionSource.INTERSECTION || a.getSource() == AffectedVersionSource.GREATER_RELEASE){ equal = a.getAffected(); source = a.getSource(); else if(a.getSource() == AffectedVersionSource.PRE_COMMIT_POM) pre_commit_pom = a.getAffected(); else if(a.getSource() == AffectedVersionSource.LINE_ADD) line_add = a.getAffected(); else if(a.getLib()!=null && a.getLib()==dep.getLib()){ if(a.getSource() == AffectedVersionSource.MANUAL){ this.setAffectedVersion((a.getAffected())?1:0); this.setAffectedVersionConfirmed(1); this.setAffectedVersionSource(AffectedVersionSource.MANUAL); return; else if (a.getSource() == AffectedVersionSource.CHECK_VERSION) check_version = a.getAffected(); else if (a.getLib()!=null && a.getLibraryId()!=null){ System.out.println("affectedLib with both LIB: " + a.getLib() + " , and LIBID: " + dep.getLib());
if(a.getLib()!=null && a.getLib().getDigest().equals(digest)){ continue bugLoop; if(a.getLib()!=null && a.getLib().getDigest().equals(digest)){ continue bugLoop; if( (a.getLibraryId()!=null && l.getLibraryId()==null && a.getLibraryId().getMvnGroup().equals("org.apache.tomcat") && a.getLibraryId().getVersion().equals(version)) || (a.getLibraryId()!=null && l.getLibraryId()!=null && a.getLibraryId().getMvnGroup().equals("org.apache.tomcat") && a.getLibraryId().getArtifact().startsWith("tomcat-") && l.getLibraryId().getMvnGroup().equals("p2.eclipse-plugin") && l.getLibraryId().getArtifact().substring(0,l.getLibraryId().getArtifact().lastIndexOf(".")).equals("org.apache") && l.getLibraryId().getArtifact().substring(l.getLibraryId().getArtifact().lastIndexOf(".")+1, l.getLibraryId().getArtifact().length()).equals(a.getLibraryId().getArtifact().substring(a.getLibraryId().getArtifact().lastIndexOf("-")+1,a.getLibraryId().getArtifact().length())) && a.getLibraryId().getVersion().equals(version)) ){ if(a.getAffected()!=null){ if(affected == null){ affected = a.getAffected(); toUpload = true; } else if (!affected.equals(a.getAffected())){ toUpload = false;
if(addnew){ for(AffectedLibrary a: existingxSource.get(AffectedVersionSource.AST_EQUALITY)){ if(a.getLibraryId()!=null && a.getLibraryId().getMvnGroup().equals(v.get(i).getGroup()) && a.getLibraryId().getArtifact().equals(v.get(i).getArtifact()) && a.getLibraryId().getVersion().equals(v.get(i).getVersion())){ toAdd = false; break; for(int j=0;j<existingxSource.get(AffectedVersionSource.AST_EQUALITY).length;j++){ AffectedLibrary a = existingxSource.get(AffectedVersionSource.AST_EQUALITY)[j]; if(a.getLibraryId()!=null && a.getLibraryId().getMvnGroup().equals(f.get(i).getGroup()) && a.getLibraryId().getArtifact().equals(f.get(i).getArtifact()) && a.getLibraryId().getVersion().equals(f.get(i).getVersion())){ toAdd = false; break; for(int j=0;j<existingxSource.get(AffectedVersionSource.MINOR_EQUALITY).length;j++){ AffectedLibrary a = existingxSource.get(AffectedVersionSource.MINOR_EQUALITY)[j]; if(a.getLibraryId()!=null && a.getLibraryId().getMvnGroup().equals(el.getKey().getGroup()) && a.getLibraryId().getArtifact().equals(el.getKey().getArtifact()) && a.getLibraryId().getVersion().equals(el.getKey().getVersion())){ toAdd = false; break; for(int j=0;j<existingxSource.get(AffectedVersionSource.MAJOR_EQUALITY).length;j++){ AffectedLibrary a = existingxSource.get(AffectedVersionSource.MAJOR_EQUALITY)[j]; if(a.getLibraryId()!=null && a.getLibraryId().getMvnGroup().equals(el.getKey().getGroup()) && a.getLibraryId().getArtifact().equals(el.getKey().getArtifact()) && a.getLibraryId().getVersion().equals(el.getKey().getVersion())){