nus-yam/ex-repair huggingface dataset:
Program: 16919
Project: 16919
Buggy source:
/** 
 * Returns a list of current PDB IDs
 * @return a list of PDB IDs, or null if a problem occurred
 */
public static SortedSet<String> getCurrentPDBIds(){
  SortedSet<String> allPDBs=new TreeSet<String>();
  String serverName=System.getProperty(PDB_SERVER_PROPERTY);
  if (serverName == null)   serverName=DEFAULT_PDB_SERVER;
 else   logger.info(String.format("String_Node_Str",PDB_SERVER_PROPERTY,serverName));
  String urlStr=String.format("String_Node_Str",serverName);
  try {
    URL u=new URL(urlStr);
    InputStream stream=HTTPConnectionTools.getInputStream(u,60000);
    if (stream != null) {
      BufferedReader reader=new BufferedReader(new InputStreamReader(stream));
      String line=null;
      while ((line=reader.readLine()) != null) {
        int index=line.lastIndexOf("String_Node_Str");
        if (index > 0) {
          allPDBs.add(line.substring(index + 13,index + 17));
        }
      }
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
    return null;
  }
  return allPDBs;
}

Fixed version (ground truth):
/** 
 * Returns a list of current PDB IDs
 * @return a list of PDB IDs, or null if a problem occurred
 */
public static SortedSet<String> getCurrentPDBIds(){
  SortedSet<String> allPDBs=new TreeSet<String>();
  String serverName=System.getProperty(PDB_SERVER_PROPERTY);
  if (serverName == null)   serverName=DEFAULT_PDB_SERVER;
 else   logger.info(String.format("String_Node_Str",PDB_SERVER_PROPERTY,serverName));
  String urlStr=String.format("String_Node_Str",serverName);
  try {
    URL u=new URL(urlStr);
    InputStream stream=HTTPConnectionTools.getInputStream(u,60000);
    if (stream != null) {
      BufferedReader reader=new BufferedReader(new InputStreamReader(stream));
      String line=null;
      while ((line=reader.readLine()) != null) {
        int index=line.lastIndexOf("String_Node_Str");
        if (index > 0) {
          allPDBs.add(line.substring(index + 13,index + 17));
        }
      }
    }
  }
 catch (  IOException e) {
    logger.error("String_Node_Str",e);
    return null;
  }
  return allPDBs;
}
Program: 16920
Project: 16920
Buggy source:
public void testFetchCurrent() throws IOException, StructureException {
  cache.setAutoFetch(true);
  cache.setFetchCurrent(true);
  cache.setFetchFileEvenIfObsolete(false);
  Structure s;
  try {
    s=cache.getStructure("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IOException e) {
    System.err.println("String_Node_Str");
  }
catch (  StructureException e) {
    System.err.println("String_Node_Str");
  }
  s=cache.getStructure("String_Node_Str");
  assertEquals("String_Node_Str","String_Node_Str",s.getPDBCode());
}

Fixed version (ground truth):
public void testFetchCurrent() throws IOException, StructureException {
  cache.setUseMmCif(false);
  cache.setAutoFetch(true);
  cache.setFetchCurrent(true);
  cache.setFetchFileEvenIfObsolete(false);
  Structure s;
  try {
    s=cache.getStructure("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IOException e) {
    System.err.println("String_Node_Str");
  }
catch (  StructureException e) {
    System.err.println("String_Node_Str");
  }
  s=cache.getStructure("String_Node_Str");
  assertEquals("String_Node_Str","String_Node_Str",s.getPDBCode());
}
Program: 16921
Project: 16921
Buggy source:
public void setUp(){
  String cacheDir=cache.getPath();
  String[] uncacheIDs=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  ArrayList<String> extensions=new ArrayList<String>();
  extensions.add("String_Node_Str");
  extensions.add("String_Node_Str");
  extensions.add("String_Node_Str");
  extensions.add("String_Node_Str");
  extensions.add("String_Node_Str");
  extensions.add("String_Node_Str");
  for (  String pdbId : uncacheIDs) {
    String middle=pdbId.substring(1,3).toLowerCase();
    String fpath=cacheDir + lineSplit + middle+ lineSplit+ pdbId;
    String ppath=cacheDir + lineSplit + middle+ lineSplit+ "String_Node_Str"+ pdbId;
    String[] paths=new String[]{fpath,ppath};
    for (int p=0; p < paths.length; p++) {
      String testpath=paths[p];
      for (int i=0; i < extensions.size(); i++) {
        String ex=(String)extensions.get(i);
        File f=new File(testpath + ex);
        if (f.exists()) {
          System.out.println("String_Node_Str" + testpath + ex);
          assertTrue("String_Node_Str" + testpath + ex+ "String_Node_Str",f.delete());
        }
      }
    }
  }
}

Fixed version (ground truth):
public void setUp(){
  cache=new AtomCache();
  String cacheDir=cache.getPath();
  String[] uncacheIDs=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  ArrayList<String> extensions=new ArrayList<String>();
  extensions.add("String_Node_Str");
  extensions.add("String_Node_Str");
  extensions.add("String_Node_Str");
  extensions.add("String_Node_Str");
  extensions.add("String_Node_Str");
  extensions.add("String_Node_Str");
  for (  String pdbId : uncacheIDs) {
    String middle=pdbId.substring(1,3).toLowerCase();
    String fpath=cacheDir + lineSplit + middle+ lineSplit+ pdbId;
    String ppath=cacheDir + lineSplit + middle+ lineSplit+ "String_Node_Str"+ pdbId;
    String[] paths=new String[]{fpath,ppath};
    for (int p=0; p < paths.length; p++) {
      String testpath=paths[p];
      for (int i=0; i < extensions.size(); i++) {
        String ex=(String)extensions.get(i);
        File f=new File(testpath + ex);
        if (f.exists()) {
          System.out.println("String_Node_Str" + testpath + ex);
          assertTrue("String_Node_Str" + testpath + ex+ "String_Node_Str",f.delete());
        }
      }
    }
  }
}
Program: 16922
Project: 16922
Buggy source:
public void testFetchObsolete() throws IOException, StructureException {
  cache.setAutoFetch(true);
  cache.setFetchCurrent(false);
  cache.setFetchFileEvenIfObsolete(true);
  Structure s;
  s=cache.getStructure("String_Node_Str");
  assertEquals("String_Node_Str","String_Node_Str",s.getPDBCode());
  s=cache.getStructure("String_Node_Str");
  assertEquals("String_Node_Str","String_Node_Str",s.getPDBCode());
  System.err.println("String_Node_Str");
}

Fixed version (ground truth):
public void testFetchObsolete() throws IOException, StructureException {
  cache.setUseMmCif(false);
  cache.setAutoFetch(true);
  cache.setFetchCurrent(false);
  cache.setFetchFileEvenIfObsolete(true);
  Structure s;
  s=cache.getStructure("String_Node_Str");
  assertEquals("String_Node_Str","String_Node_Str",s.getPDBCode());
  s=cache.getStructure("String_Node_Str");
  assertEquals("String_Node_Str","String_Node_Str",s.getPDBCode());
  System.err.println("String_Node_Str");
}
Program: 16923
Project: 16923
Buggy source:
public void testLoadStructureFromURL() throws IOException, StructureException {
  try {
    AtomCache cache=new AtomCache();
    String path=cache.getPath();
    path+="String_Node_Str" + FILE_SEPARATOR;
    File f=new File(path);
    if (!f.exists()) {
      System.out.println("String_Node_Str" + f);
      f.mkdir();
    }
    AtomCache c=new AtomCache(path,true);
    c.getStructure("String_Node_Str");
    File newFile=new File(path + FILE_SEPARATOR + "String_Node_Str"+ FILE_SEPARATOR+ "String_Node_Str");
    URL u=newFile.toURI().toURL();
    System.out.println(u);
    Structure s=c.getStructure(u.toString() + "String_Node_Str");
    System.out.println(s);
  }
 catch (  Exception e) {
    fail(e.getMessage());
  }
}

Fixed version (ground truth):
public void testLoadStructureFromURL() throws IOException, StructureException {
  try {
    AtomCache cache=new AtomCache();
    String path=cache.getPath();
    path+="String_Node_Str" + FILE_SEPARATOR;
    File f=new File(path);
    if (!f.exists()) {
      System.out.println("String_Node_Str" + f);
      f.mkdir();
    }
    AtomCache c=new AtomCache(path,true);
    c.setUseMmCif(false);
    c.getStructure("String_Node_Str");
    File newFile=new File(path + FILE_SEPARATOR + "String_Node_Str"+ FILE_SEPARATOR+ "String_Node_Str");
    URL u=newFile.toURI().toURL();
    System.out.println(u);
    Structure s=c.getStructure(u.toString() + "String_Node_Str");
    System.out.println(s);
  }
 catch (  Exception e) {
    fail(e.getMessage());
  }
}
Program: 16926
Project: 16926
Buggy source:
/** 
 * Get the space group for the given international short name, using the PDB format, e.g. 'P 21 21 21' or 'C 1 c 1'
 * @param shortName
 * @return the SpaceGroup or null if the shortName is not valid
 */
public static SpaceGroup getSpaceGroup(String shortName){
  if (shortName == null)   return null;
  if (shortName.equals("String_Node_Str"))   shortName="String_Node_Str";
  shortName=shortName.substring(0,1) + shortName.substring(1).toLowerCase();
  return name2sgs.get(shortName);
}

Fixed version (ground truth):
/** 
 * Get the space group for the given international short name, using the PDB format, e.g. 'P 21 21 21' or 'C 1 c 1'
 * @param shortName
 * @return the SpaceGroup or null if the shortName is not valid
 */
public static SpaceGroup getSpaceGroup(String shortName){
  if (shortName == null || shortName.length() <= 2)   return null;
  if (shortName.equals("String_Node_Str"))   shortName="String_Node_Str";
  shortName=shortName.substring(0,1) + shortName.substring(1).toLowerCase();
  return name2sgs.get(shortName);
}
Program: 16928
Project: 16928
Buggy source:
/** 
 * Handler for HEADER Record Format COLUMNS        DATA TYPE       FIELD           DEFINITION ---------------------------------------------------------------------------------- 1 -  6        Record name     "HEADER" 11 - 50        String(40)      classification  Classifies the molecule(s) 51 - 59        Date            depDate         Deposition date.  This is the date the coordinates were received by the PDB 63 - 66        IDcode          idCode          This identifier is unique within PDB
 */
private void pdb_HEADER_Handler(String line){
  String classification=null;
  String deposition_date=null;
  String pdbCode=null;
  int len=line.trim().length();
  if (len > 10) {
    classification=line.substring(10,max(len,50)).trim();
    pdbHeader.setClassification(classification);
  }
  if (len > 50) {
    deposition_date=line.substring(50,max(len,59)).trim();
    try {
      Date dep=dateFormat.parse(deposition_date);
      pdbHeader.setDepDate(dep);
    }
 catch (    ParseException e) {
      logger.fine("String_Node_Str" + deposition_date + "String_Node_Str");
    }
  }
  if (len > 62) {
    pdbCode=line.substring(62,max(len,66)).trim();
    pdbId=pdbCode;
    if (DEBUG) {
      System.out.println("String_Node_Str" + pdbId);
    }
    structure.setPDBCode(pdbCode);
    pdbHeader.setIdCode(pdbCode);
  }
  if (len > 66) {
    if (pdbId.equals(line.substring(72,76))) {
      isLegacyFormat=true;
      System.out.println(pdbId + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Handler for HEADER Record Format COLUMNS        DATA TYPE       FIELD           DEFINITION ---------------------------------------------------------------------------------- 1 -  6        Record name     "HEADER" 11 - 50        String(40)      classification  Classifies the molecule(s) 51 - 59        Date            depDate         Deposition date.  This is the date the coordinates were received by the PDB 63 - 66        IDcode          idCode          This identifier is unique within PDB
 */
private void pdb_HEADER_Handler(String line){
  String classification=null;
  String deposition_date=null;
  String pdbCode=null;
  int len=line.trim().length();
  if (len > 10) {
    classification=line.substring(10,min(len,50)).trim();
    pdbHeader.setClassification(classification);
  }
  if (len > 50) {
    deposition_date=line.substring(50,min(len,59)).trim();
    try {
      Date dep=dateFormat.parse(deposition_date);
      pdbHeader.setDepDate(dep);
    }
 catch (    ParseException e) {
      logger.fine("String_Node_Str" + deposition_date + "String_Node_Str");
    }
  }
  if (len > 62) {
    pdbCode=line.substring(62,min(len,66)).trim();
    pdbId=pdbCode;
    if (DEBUG) {
      System.out.println("String_Node_Str" + pdbId);
    }
    structure.setPDBCode(pdbCode);
    pdbHeader.setIdCode(pdbCode);
  }
  if (len > 66) {
    if (pdbId.equals(line.substring(72,76))) {
      isLegacyFormat=true;
      System.out.println(pdbId + "String_Node_Str");
    }
  }
}
Program: 16929
Project: 16929
Buggy source:
/** 
 * Handler for TITLE Record Format COLUMNS        DATA TYPE       FIELD          DEFINITION ---------------------------------------------------------------------------------- 1 -  6        Record name     "TITLE " 9 - 10        Continuation    continuation   Allows concatenation of multiple records. 11 - 70        String          title          Title of the experiment.
 */
private void pdb_TITLE_Handler(String line){
  String title;
  if (line.length() > 79)   title=line.substring(10,80).trim();
 else   title=line.substring(10,line.length()).trim();
  String t=pdbHeader.getTitle();
  if ((t != null) && (!t.equals("String_Node_Str")))   t+="String_Node_Str";
 else   t="String_Node_Str";
  t+=title;
  pdbHeader.setTitle(t);
}

Fixed version (ground truth):
/** 
 * Handler for TITLE Record Format COLUMNS        DATA TYPE       FIELD          DEFINITION ---------------------------------------------------------------------------------- 1 -  6        Record name     "TITLE " 9 - 10        Continuation    continuation   Allows concatenation of multiple records. 11 - 70        String          title          Title of the experiment.
 */
private void pdb_TITLE_Handler(String line){
  String title;
  if (line.length() > 79)   title=line.substring(10,80).trim();
 else   title=line.substring(10,line.length()).trim();
  String t=pdbHeader.getTitle();
  if ((t != null) && (!t.equals("String_Node_Str"))) {
    if (t.endsWith("String_Node_Str"))     t+="String_Node_Str";
 else     t+="String_Node_Str";
  }
 else   t="String_Node_Str";
  t+=title;
  pdbHeader.setTitle(t);
}
Program: 16931
Project: 16931
Buggy source:
public void newCell(Cell cell){
  try {
    float a=Float.parseFloat(cell.getLength_a());
    float b=Float.parseFloat(cell.getLength_b());
    float c=Float.parseFloat(cell.getLength_c());
    float alpha=Float.parseFloat(cell.getAngle_alpha());
    float beta=Float.parseFloat(cell.getAngle_beta());
    float gamma=Float.parseFloat(cell.getAngle_gamma());
    if (a == 1.0f && b == 1.0f && c == 1.0f && alpha == 90.0f && beta == 90.0f && gamma == 90.0f) {
      return;
    }
    CrystalCell xtalCell=new CrystalCell();
    structure.getPDBHeader().getCrystallographicInfo().setCrystalCell(xtalCell);
    xtalCell.setA(a);
    xtalCell.setB(b);
    xtalCell.setC(c);
    xtalCell.setAlpha(alpha);
    xtalCell.setBeta(beta);
    xtalCell.setGamma(gamma);
  }
 catch (  NumberFormatException e) {
    structure.getPDBHeader().getCrystallographicInfo().setCrystalCell(null);
    logger.warning("String_Node_Str");
  }
  try {
    structure.getPDBHeader().getCrystallographicInfo().setZ(Integer.parseInt(cell.getZ_PDB()));
  }
 catch (  NumberFormatException e) {
    logger.warning("String_Node_Str");
  }
}

Fixed version (ground truth):
public void newCell(Cell cell){
  try {
    float a=Float.parseFloat(cell.getLength_a());
    float b=Float.parseFloat(cell.getLength_b());
    float c=Float.parseFloat(cell.getLength_c());
    float alpha=Float.parseFloat(cell.getAngle_alpha());
    float beta=Float.parseFloat(cell.getAngle_beta());
    float gamma=Float.parseFloat(cell.getAngle_gamma());
    if (a == 1.0f && b == 1.0f && c == 1.0f && alpha == 90.0f && beta == 90.0f && gamma == 90.0f) {
      return;
    }
    CrystalCell xtalCell=new CrystalCell();
    structure.getPDBHeader().getCrystallographicInfo().setCrystalCell(xtalCell);
    xtalCell.setA(a);
    xtalCell.setB(b);
    xtalCell.setC(c);
    xtalCell.setAlpha(alpha);
    xtalCell.setBeta(beta);
    xtalCell.setGamma(gamma);
  }
 catch (  NumberFormatException e) {
    structure.getPDBHeader().getCrystallographicInfo().setCrystalCell(null);
    logger.fine("String_Node_Str" + e.getMessage() + "String_Node_Str");
  }
  try {
    structure.getPDBHeader().getCrystallographicInfo().setZ(Integer.parseInt(cell.getZ_PDB()));
  }
 catch (  NumberFormatException e) {
    logger.fine("String_Node_Str");
  }
}
Program: 16932
Project: 16932
Buggy source:
public void newRefine(Refine r){
  PDBHeader pdbHeader=structure.getPDBHeader();
  try {
    pdbHeader.setResolution(Float.parseFloat(r.getLs_d_res_high()));
  }
 catch (  NumberFormatException e) {
    logger.warning("String_Node_Str" + r.getLs_d_res_high() + "String_Node_Str"+ e.getMessage());
  }
}

Fixed version (ground truth):
public void newRefine(Refine r){
  PDBHeader pdbHeader=structure.getPDBHeader();
  if (pdbHeader.getResolution() != PDBHeader.DEFAULT_RESOLUTION) {
    logger.fine("String_Node_Str" + r.getLs_d_res_high() + "String_Node_Str"+ String.format("String_Node_Str",pdbHeader.getResolution())+ "String_Node_Str");
    return;
  }
  try {
    pdbHeader.setResolution(Float.parseFloat(r.getLs_d_res_high()));
  }
 catch (  NumberFormatException e) {
    logger.fine("String_Node_Str" + r.getLs_d_res_high() + "String_Node_Str"+ e.getMessage());
  }
}
Program: 16933
Project: 16933
Buggy source:
public void newSymmetry(Symmetry symmetry){
  String spaceGroup=symmetry.getSpace_group_name_H_M();
  SpaceGroup sg=SymoplibParser.getSpaceGroup(spaceGroup);
  if (sg == null)   logger.warning("String_Node_Str" + spaceGroup + "String_Node_Str");
  structure.getPDBHeader().getCrystallographicInfo().setSpaceGroup(sg);
}

Fixed version (ground truth):
public void newSymmetry(Symmetry symmetry){
  String spaceGroup=symmetry.getSpace_group_name_H_M();
  SpaceGroup sg=SymoplibParser.getSpaceGroup(spaceGroup);
  if (sg == null)   logger.fine("String_Node_Str" + spaceGroup + "String_Node_Str");
  structure.getPDBHeader().getCrystallographicInfo().setSpaceGroup(sg);
}
Program: 16934
Project: 16934
Buggy source:
public void setTransfAlgebraic(List<String> transfAlgebraic){
  if (transformations == null)   transformations=new ArrayList<Matrix4d>(transfAlgebraic.size());
  if (this.transfAlgebraic == null)   this.transfAlgebraic=new ArrayList<String>(transfAlgebraic.size());
  for (  String transf : transfAlgebraic) {
    addTransformation(transf);
  }
}

Fixed version (ground truth):
public void setTransfAlgebraic(List<String> transfAlgebraic){
  if (transformations == null || transformations.size() == 0)   transformations=new ArrayList<Matrix4d>(transfAlgebraic.size());
  if (this.transfAlgebraic == null || this.transfAlgebraic.size() == 0)   this.transfAlgebraic=new ArrayList<String>(transfAlgebraic.size());
  for (  String transf : transfAlgebraic) {
    addTransformation(transf);
  }
}
Program: 16935
Project: 16935
Buggy source:
protected void initializeCellTranslations(){
  cellTranslations=new Vector3d[multiplicity / primitiveMultiplicity];
  cellTranslations[0]=new Vector3d(0,0,0);
  if (transformations == null) {
    System.err.println("String_Node_Str" + this.toXML());
  }
  if (multiplicity == primitiveMultiplicity) {
    return;
  }
  int fold=multiplicity / primitiveMultiplicity;
  for (int n=1; n < fold; n++) {
    if (transformations.size() < (n * primitiveMultiplicity))     System.out.println(this.toXML());
    Matrix4d t=transformations.get(n * primitiveMultiplicity);
    cellTranslations[n]=new Vector3d(t.m03,t.m13,t.m23);
  }
}

Fixed version (ground truth):
protected void initializeCellTranslations(){
  if (cellTranslations != null && cellTranslations.length > 0) {
    return;
  }
  cellTranslations=new Vector3d[multiplicity / primitiveMultiplicity];
  cellTranslations[0]=new Vector3d(0,0,0);
  if (transformations == null) {
    System.err.println("String_Node_Str" + this.toXML());
  }
  if (multiplicity == primitiveMultiplicity) {
    return;
  }
  int fold=multiplicity / primitiveMultiplicity;
  for (int n=1; n < fold; n++) {
    if (transformations.size() < (n * primitiveMultiplicity)) {
      System.err.println("String_Node_Str" + (n * primitiveMultiplicity));
      System.err.println(this.toXML());
    }
    Matrix4d t=transformations.get(n * primitiveMultiplicity);
    cellTranslations[n]=new Vector3d(t.m03,t.m13,t.m23);
  }
}
Program: 16936
Project: 16936
Buggy source:
public List<String> getTransfAlgebraic(){
  return transfAlgebraic;
}

Fixed version (ground truth):
@XmlJavaTypeAdapter(TransfAlgebraicAdapter.class) public List<String> getTransfAlgebraic(){
  return transfAlgebraic;
}
Program: 16937
Project: 16937
Buggy source:
private Group getCorrectAltLocGroup(Character altLoc,String recordName,Character aminoCode1,String groupCode3,long seq_id){
  List<Atom> atoms=current_group.getAtoms();
  if (atoms.size() > 0) {
    Atom a1=atoms.get(0);
    if (a1.getAltLoc().equals(altLoc)) {
      return current_group;
    }
  }
  List<Group> altLocs=current_group.getAltLocs();
  for (  Group altLocG : altLocs) {
    atoms=altLocG.getAtoms();
    if (atoms.size() > 0) {
      for (      Atom a1 : atoms) {
        if (a1.getAltLoc().equals(altLoc)) {
          return altLocG;
        }
      }
    }
  }
  if (groupCode3.equals(current_group.getPDBName())) {
    if (current_group.getAtoms().size() == 0)     return current_group;
    Group altLocG=(Group)current_group.clone();
    current_group.addAltLoc(altLocG);
    return altLocG;
  }
  Group altLocG=getNewGroup(recordName,aminoCode1,seq_id,groupCode3);
  try {
    altLocG.setPDBName(groupCode3);
  }
 catch (  PDBParseException e) {
    e.printStackTrace();
  }
  altLocG.setResidueNumber(current_group.getResidueNumber());
  current_group.addAltLoc(altLocG);
  return altLocG;
}

Fixed version (ground truth):
private Group getCorrectAltLocGroup(Character altLoc,String recordName,Character aminoCode1,String groupCode3,long seq_id){
  List<Atom> atoms=current_group.getAtoms();
  if (atoms.size() > 0) {
    Atom a1=atoms.get(0);
    if (a1.getAltLoc().equals(altLoc)) {
      return current_group;
    }
  }
  List<Group> altLocs=current_group.getAltLocs();
  for (  Group altLocG : altLocs) {
    atoms=altLocG.getAtoms();
    if (atoms.size() > 0) {
      for (      Atom a1 : atoms) {
        if (a1.getAltLoc().equals(altLoc)) {
          return altLocG;
        }
      }
    }
  }
  if (groupCode3.equals(current_group.getPDBName())) {
    if (current_group.getAtoms().size() == 0) {
      return current_group;
    }
    Group altLocG=(Group)current_group.clone();
    altLocG.setAtoms(new ArrayList<Atom>());
    current_group.addAltLoc(altLocG);
    return altLocG;
  }
  Group altLocG=getNewGroup(recordName,aminoCode1,seq_id,groupCode3);
  try {
    altLocG.setPDBName(groupCode3);
  }
 catch (  PDBParseException e) {
    e.printStackTrace();
  }
  altLocG.setResidueNumber(current_group.getResidueNumber());
  current_group.addAltLoc(altLocG);
  return altLocG;
}
Program: 16938
Project: 16938
Buggy source:
/** 
 * Loads the SIFTS mapping. Attempts to load the mapping file file in the PDB cache directory. If the file does not exist or could not be parsed, downloads and stores a GZ-compressed file.
 * @param useOnlyLocal If true, will throw an IOException if the file needs to be downloaded
 * @return
 * @throws IOException If the local file could not be read and could not be downloaded (including if onlyLocal is true)
 */
public static SiftsChainToUniprotMapping load(boolean useOnlyLocal) throws IOException {
  String cacheDir=System.getProperty(AbstractUserArgumentProcessor.CACHE_DIR);
  if (cacheDir != null) {
    DEFAULT_FILE=new File(cacheDir.endsWith(File.pathSeparator) ? cacheDir + DEFAULT_FILENAME : cacheDir + File.pathSeparator + DEFAULT_FILENAME);
  }
 else {
    DEFAULT_FILE=File.createTempFile(DEFAULT_FILENAME,"String_Node_Str");
  }
  if (!DEFAULT_FILE.exists()) {
    if (useOnlyLocal)     throw new IOException(DEFAULT_FILE + "String_Node_Str");
    download();
  }
  try {
    return build();
  }
 catch (  IOException e) {
    e.printStackTrace();
    if (useOnlyLocal)     throw new IOException(DEFAULT_FILE + "String_Node_Str");
    download();
    return build();
  }
}

Fixed version (ground truth):
/** 
 * Loads the SIFTS mapping. Attempts to load the mapping file file in the PDB cache directory. If the file does not exist or could not be parsed, downloads and stores a GZ-compressed file.
 * @param useOnlyLocal If true, will throw an IOException if the file needs to be downloaded
 * @return
 * @throws IOException If the local file could not be read and could not be downloaded (including if onlyLocal is true)
 */
public static SiftsChainToUniprotMapping load(boolean useOnlyLocal) throws IOException {
  String cacheDir=System.getProperty(AbstractUserArgumentProcessor.CACHE_DIR);
  if (cacheDir != null) {
    DEFAULT_FILE=new File(cacheDir.endsWith(File.pathSeparator) ? cacheDir + DEFAULT_FILENAME : cacheDir + File.pathSeparator + DEFAULT_FILENAME);
  }
 else {
    DEFAULT_FILE=File.createTempFile(DEFAULT_FILENAME,"String_Node_Str");
  }
  if (!DEFAULT_FILE.exists() || DEFAULT_FILE.length() == 0) {
    if (useOnlyLocal)     throw new IOException(DEFAULT_FILE + "String_Node_Str");
    download();
  }
  try {
    return build();
  }
 catch (  IOException e) {
    e.printStackTrace();
    if (useOnlyLocal)     throw new IOException(DEFAULT_FILE + "String_Node_Str");
    download();
    return build();
  }
}
Program: 16942
Project: 16942
Buggy source:
private static void formatPosition(int pos1,Atom[] ca,int len,StringWriter header1,StringWriter header2){
  int linePos=len % LINELENGTH;
  if (header1.getBuffer().length() < linePos) {
    for (int i=header1.getBuffer().length(); i < linePos; i++) {
      header1.append("String_Node_Str");
    }
  }
  Atom a=ca[pos1];
  Group g=a.getGroup();
  ResidueNumber residueNumber=g.getResidueNumber();
  pos1=residueNumber.getSeqNum();
  boolean hasInsertionCode=false;
  if (residueNumber.getInsCode() != null) {
    hasInsertionCode=true;
  }
  if ((pos1 % 10 == 0) && (!hasInsertionCode)) {
    CharSequence display=getPDBPos(a);
    boolean ignoreH1=false;
    if (header1.getBuffer().length() - 1 > linePos) {
      ignoreH1=true;
      System.out.println("String_Node_Str" + len + "String_Node_Str"+ header1.getBuffer().length()+ "String_Node_Str"+ linePos+ "String_Node_Str"+ header1.toString()+ "String_Node_Str");
    }
    if (!ignoreH1) {
      header1.append(String.format("String_Node_Str",display));
      header2.append("String_Node_Str");
    }
 else {
      header2.append("String_Node_Str");
    }
  }
 else   if (hasInsertionCode) {
    Character insCode=g.getResidueNumber().getInsCode();
    if (insCode != null)     header2.append(insCode);
 else {
      header2.append("String_Node_Str");
    }
  }
 else   if (((pos1) % 5) == 0 && len > 5) {
    header2.append("String_Node_Str");
  }
 else {
    if (len > 0)     header2.append("String_Node_Str");
  }
}

Fixed version (ground truth):
private static void formatPosition(int pos1,Atom[] ca,int len,StringWriter header1,StringWriter header2){
  int linePos=len % LINELENGTH;
  if (header1.getBuffer().length() < linePos) {
    for (int i=header1.getBuffer().length(); i < linePos; i++) {
      header1.append("String_Node_Str");
    }
  }
  Atom a=ca[pos1];
  Group g=a.getGroup();
  ResidueNumber residueNumber=g.getResidueNumber();
  pos1=residueNumber.getSeqNum();
  boolean hasInsertionCode=false;
  if (residueNumber.getInsCode() != null) {
    hasInsertionCode=true;
  }
  if ((pos1 % 10 == 0) && (!hasInsertionCode)) {
    CharSequence display=getPDBPos(a);
    boolean ignoreH1=false;
    if (header1.getBuffer().length() - 1 > linePos) {
      ignoreH1=true;
      System.err.println("String_Node_Str" + len + "String_Node_Str"+ header1.getBuffer().length()+ "String_Node_Str"+ linePos+ "String_Node_Str"+ header1.toString()+ "String_Node_Str");
    }
    if (!ignoreH1) {
      header1.append(String.format("String_Node_Str",display));
      header2.append("String_Node_Str");
    }
 else {
      header2.append("String_Node_Str");
    }
  }
 else   if (hasInsertionCode) {
    Character insCode=g.getResidueNumber().getInsCode();
    if (insCode != null)     header2.append(insCode);
 else {
      header2.append("String_Node_Str");
    }
  }
 else   if (((pos1) % 5) == 0 && len > 5) {
    header2.append("String_Node_Str");
  }
 else {
    if (len > 0)     header2.append("String_Node_Str");
  }
}
Program: 16943
Project: 16943
Buggy source:
/** 
 * Creates a Map specifying the alignment as a mapping between residue indices of protein 1 and residue indices of protein 2. <p>For example,<pre> 1234 5678</pre> becomes<pre> 1->5 2->6 3->7 4->8</pre>
 * @param afpChain An alignment
 * @return A mapping from aligned residues of protein 1 to their partners in protein 2.
 * @throws StructureException If afpChain is not one-to-one
 */
public static Map<Integer,Integer> alignmentAsMap(AFPChain afpChain) throws StructureException {
  Map<Integer,Integer> map=new HashMap<Integer,Integer>();
  int[][][] optAln=afpChain.getOptAln();
  int[] optLen=afpChain.getOptLen();
  for (int block=0; block < afpChain.getBlockNum(); block++) {
    for (int pos=0; pos < optLen[block]; pos++) {
      int res1=optAln[block][0][pos];
      int res2=optAln[block][1][pos];
      if (map.containsKey(res1)) {
        throw new StructureException(String.format("String_Node_Str",res1,map.get(res1),res2));
      }
      map.put(res1,res2);
    }
  }
  return map;
}

Fixed version (ground truth):
/** 
 * Creates a Map specifying the alignment as a mapping between residue indices of protein 1 and residue indices of protein 2. <p>For example,<pre> 1234 5678</pre> becomes<pre> 1->5 2->6 3->7 4->8</pre>
 * @param afpChain An alignment
 * @return A mapping from aligned residues of protein 1 to their partners in protein 2.
 * @throws StructureException If afpChain is not one-to-one
 */
public static Map<Integer,Integer> alignmentAsMap(AFPChain afpChain) throws StructureException {
  Map<Integer,Integer> map=new HashMap<Integer,Integer>();
  if (afpChain.getAlnLength() < 1) {
    return map;
  }
  int[][][] optAln=afpChain.getOptAln();
  int[] optLen=afpChain.getOptLen();
  for (int block=0; block < afpChain.getBlockNum(); block++) {
    for (int pos=0; pos < optLen[block]; pos++) {
      int res1=optAln[block][0][pos];
      int res2=optAln[block][1][pos];
      if (map.containsKey(res1)) {
        throw new StructureException(String.format("String_Node_Str",res1,map.get(res1),res2));
      }
      map.put(res1,res2);
    }
  }
  return map;
}
Program: 16944
Project: 16944
Buggy source:
/** 
 * Loads the SIFTS mapping. Attempts to load the mapping file file in the PDB cache directory. If the file does not exist or could not be parsed, downloads and stores a GZ-compressed file.
 * @param useOnlyLocal If true, will throw an IOException if the file needs to be downloaded
 * @return
 * @throws IOException If the local file could not be read and could not be downloaded (including if onlyLocal is true)
 */
public static SiftsChainToUniprotMapping load(boolean useOnlyLocal) throws IOException {
  String cacheDir=System.getProperty(AbstractUserArgumentProcessor.CACHE_DIR);
  if (cacheDir != null) {
    DEFAULT_FILE=new File(cacheDir.endsWith(File.pathSeparator) ? cacheDir + DEFAULT_FILENAME : cacheDir + File.pathSeparator + DEFAULT_FILENAME);
  }
 else {
    DEFAULT_FILE=File.createTempFile(DEFAULT_FILENAME,"String_Node_Str");
  }
  if (!DEFAULT_FILE.exists()) {
    if (useOnlyLocal)     throw new IOException(DEFAULT_FILE + "String_Node_Str");
    download();
  }
  try {
    return build();
  }
 catch (  IOException e) {
    e.printStackTrace();
    if (useOnlyLocal)     throw new IOException(DEFAULT_FILE + "String_Node_Str");
    download();
    return build();
  }
}

Fixed version (ground truth):
/** 
 * Loads the SIFTS mapping. Attempts to load the mapping file file in the PDB cache directory. If the file does not exist or could not be parsed, downloads and stores a GZ-compressed file.
 * @param useOnlyLocal If true, will throw an IOException if the file needs to be downloaded
 * @return
 * @throws IOException If the local file could not be read and could not be downloaded (including if onlyLocal is true)
 */
public static SiftsChainToUniprotMapping load(boolean useOnlyLocal) throws IOException {
  String cacheDir=System.getProperty(AbstractUserArgumentProcessor.CACHE_DIR);
  if (cacheDir != null) {
    DEFAULT_FILE=new File(cacheDir.endsWith(File.pathSeparator) ? cacheDir + DEFAULT_FILENAME : cacheDir + File.pathSeparator + DEFAULT_FILENAME);
  }
 else {
    DEFAULT_FILE=File.createTempFile(DEFAULT_FILENAME,"String_Node_Str");
  }
  if (!DEFAULT_FILE.exists() || DEFAULT_FILE.length() == 0) {
    if (useOnlyLocal)     throw new IOException(DEFAULT_FILE + "String_Node_Str");
    download();
  }
  try {
    return build();
  }
 catch (  IOException e) {
    e.printStackTrace();
    if (useOnlyLocal)     throw new IOException(DEFAULT_FILE + "String_Node_Str");
    download();
    return build();
  }
}
Program: 16945
Project: 16945
Buggy source:
private static void formatPosition(int pos1,Atom[] ca,int len,StringWriter header1,StringWriter header2){
  int linePos=len % LINELENGTH;
  if (header1.getBuffer().length() < linePos) {
    for (int i=header1.getBuffer().length(); i < linePos; i++) {
      header1.append("String_Node_Str");
    }
  }
  Atom a=ca[pos1];
  Group g=a.getGroup();
  ResidueNumber residueNumber=g.getResidueNumber();
  pos1=residueNumber.getSeqNum();
  boolean hasInsertionCode=false;
  if (residueNumber.getInsCode() != null) {
    hasInsertionCode=true;
  }
  if ((pos1 % 10 == 0) && (!hasInsertionCode)) {
    CharSequence display=getPDBPos(a);
    boolean ignoreH1=false;
    if (header1.getBuffer().length() - 1 > linePos) {
      ignoreH1=true;
      System.out.println("String_Node_Str" + len + "String_Node_Str"+ header1.getBuffer().length()+ "String_Node_Str"+ linePos+ "String_Node_Str"+ header1.toString()+ "String_Node_Str");
    }
    if (!ignoreH1) {
      header1.append(String.format("String_Node_Str",display));
      header2.append("String_Node_Str");
    }
 else {
      header2.append("String_Node_Str");
    }
  }
 else   if (hasInsertionCode) {
    Character insCode=g.getResidueNumber().getInsCode();
    if (insCode != null)     header2.append(insCode);
 else {
      header2.append("String_Node_Str");
    }
  }
 else   if (((pos1) % 5) == 0 && len > 5) {
    header2.append("String_Node_Str");
  }
 else {
    if (len > 0)     header2.append("String_Node_Str");
  }
}

Fixed version (ground truth):
private static void formatPosition(int pos1,Atom[] ca,int len,StringWriter header1,StringWriter header2){
  int linePos=len % LINELENGTH;
  if (header1.getBuffer().length() < linePos) {
    for (int i=header1.getBuffer().length(); i < linePos; i++) {
      header1.append("String_Node_Str");
    }
  }
  Atom a=ca[pos1];
  Group g=a.getGroup();
  ResidueNumber residueNumber=g.getResidueNumber();
  pos1=residueNumber.getSeqNum();
  boolean hasInsertionCode=false;
  if (residueNumber.getInsCode() != null) {
    hasInsertionCode=true;
  }
  if ((pos1 % 10 == 0) && (!hasInsertionCode)) {
    CharSequence display=getPDBPos(a);
    boolean ignoreH1=false;
    if (header1.getBuffer().length() - 1 > linePos) {
      ignoreH1=true;
    }
    if (!ignoreH1) {
      header1.append(String.format("String_Node_Str",display));
      header2.append("String_Node_Str");
    }
 else {
      header2.append("String_Node_Str");
    }
  }
 else   if (hasInsertionCode) {
    Character insCode=g.getResidueNumber().getInsCode();
    if (insCode != null)     header2.append(insCode);
 else {
      header2.append("String_Node_Str");
    }
  }
 else   if (((pos1) % 5) == 0 && len > 5) {
    header2.append("String_Node_Str");
  }
 else {
    if (len > 0)     header2.append("String_Node_Str");
  }
}
Program: 16946
Project: 16946
Buggy source:
/** 
 * @see #toConciseAlignmentString(Map,Map)
 */
public static Map<Integer,Integer> fromConciseAlignmentString(String string){
  char[] chars=string.toCharArray();
  Map<Integer,Integer> map=new HashMap<Integer,Integer>();
  for (int i=1; i < chars.length - 1; i++) {
    if (chars[i] == '>') {
      map.put(Integer.parseInt(String.valueOf(chars[i - 1])),Integer.parseInt(String.valueOf(chars[i + 1])));
    }
  }
  return map;
}

Fixed version (ground truth):
/** 
 * @see #toConciseAlignmentString(Map,Map)
 */
public static Map<Integer,Integer> fromConciseAlignmentString(String string){
  Map<Integer,Integer> map=new HashMap<Integer,Integer>();
  boolean matches=true;
  while (matches) {
    Pattern pattern=Pattern.compile("String_Node_Str");
    Matcher matcher=pattern.matcher(string);
    matches=matcher.find();
    if (matches) {
      Integer from=Integer.parseInt(matcher.group(1));
      Integer to=Integer.parseInt(matcher.group(2));
      map.put(from,to);
      string=string.substring(matcher.end(1) + 1);
    }
  }
  return map;
}
Program: 16947
Project: 16947
Buggy source:
/** 
 * Loads a   {@link StructureIdentifier} from the specified string.The type returned for any particular string can be considered relatively stable but should not be relied on.
 */
public static StructureIdentifier loadIdentifier(String id){
  try {
    return new UriIdentifier(id);
  }
 catch (  URISyntaxException e) {
    return new SubstructureIdentifier(id);
  }
}

Fixed version (ground truth):
/** 
 * Loads a   {@link StructureIdentifier} from the specified string.The type returned for any particular string can be considered relatively stable but should not be relied on.
 */
public static StructureIdentifier loadIdentifier(String id,AtomCache cache){
  if (id.matches(CATH_PATTERN)) {
    return CathFactory.getCathDatabase().getDescriptionByCathId(id);
  }
 else   if (id.matches(SCOP_PATTERN)) {
    return ScopFactory.getSCOP().getDomainByScopID(id);
  }
  try {
    return new SubstructureIdentifier(id,cache);
  }
 catch (  Exception e) {
    throw new IllegalArgumentException("String_Node_Str" + id,e);
  }
}
Program: 16948
Project: 16948
Buggy source:
@Override public String getIdentifier(){
  return ResidueRange.toString(ranges);
}

Fixed version (ground truth):
@Override public String getIdentifier(){
  if (ranges.isEmpty())   return pdbId;
  return pdbId + "String_Node_Str" + ResidueRange.toString(ranges);
}
Program: 16949
Project: 16949
Buggy source:
public SubstructureIdentifier(String id){
  if (id.contains("String_Node_Str")) {
    this.pdbId=id;
    this.ranges=new ArrayList<ResidueRange>();
  }
 else {
    String[] s=id.split("String_Node_Str");
    this.pdbId=s[0];
    this.ranges=ResidueRange.parseMultiple(s[1]);
  }
}

Fixed version (ground truth):
public SubstructureIdentifier(String id,AtomCache cache) throws IOException, StructureException {
  if (id.contains("String_Node_Str")) {
    this.pdbId=id.split("String_Node_Str")[0];
  }
 else {
    this.pdbId=id;
  }
  AtomPositionMap map=new AtomPositionMap(cache.getAtoms(pdbId));
  if (id.contains("String_Node_Str")) {
    String[] s=id.split("String_Node_Str");
    this.ranges=ResidueRange.parseMultiple(s[1],map);
  }
 else {
    this.ranges=map.getRanges();
  }
}
Program: 16950
Project: 16950
Buggy source:
@Override public String getIdentifier(){
  return pdbId + ResidueRange.toString(getResidueRanges());
}

Fixed version (ground truth):
@Override public String getIdentifier(){
  return pdbId + "String_Node_Str" + ResidueRange.toString(getResidueRanges());
}
Program: 16951
Project: 16951
Buggy source:
/** 
 * Factory method to run a list of scorers concurrently.  This method runs the scorers in parallel by submitting all of the scoring tasks to the shared thread pool of the   {@link ConcurrencyTools} utility.
 * @param < S > each {@link Sequence} of an alignment pair is of type S
 * @param < C > each element of an {@link AlignedSequence} is a {@link Compound} of type C
 * @param scorers list of scorers to run
 * @return list of score results from running scorers
 */
public static <S extends Sequence<C>,C extends Compound>int[] runPairwiseScorers(List<PairwiseSequenceScorer<S,C>> scorers){
  int n=1, all=scorers.size();
  List<Future<Integer>> futures=new ArrayList<Future<Integer>>();
  for (  PairwiseSequenceScorer<S,C> scorer : scorers) {
    futures.add(ConcurrencyTools.submit(new CallablePairwiseSequenceScorer<S,C>(scorer),String.format("String_Node_Str",n++,all)));
  }
  List<Integer> results=getListFromFutures(futures);
  int[] scores=new int[results.size()];
  for (int i=0; i < scores.length; i++) {
    scores[i]=results.get(i);
  }
  return scores;
}

Fixed version (ground truth):
/** 
 * Factory method to run a list of scorers concurrently.  This method runs the scorers in parallel by submitting all of the scoring tasks to the shared thread pool of the   {@link ConcurrencyTools} utility.
 * @param < S > each {@link Sequence} of an alignment pair is of type S
 * @param < C > each element of an {@link AlignedSequence} is a {@link Compound} of type C
 * @param scorers list of scorers to run
 * @return list of score results from running scorers
 */
public static <S extends Sequence<C>,C extends Compound>double[] runPairwiseScorers(List<PairwiseSequenceScorer<S,C>> scorers){
  int n=1, all=scorers.size();
  List<Future<Double>> futures=new ArrayList<Future<Double>>();
  for (  PairwiseSequenceScorer<S,C> scorer : scorers) {
    futures.add(ConcurrencyTools.submit(new CallablePairwiseSequenceScorer<S,C>(scorer),String.format("String_Node_Str",n++,all)));
  }
  List<Double> results=getListFromFutures(futures);
  double[] scores=new double[results.size()];
  for (int i=0; i < scores.length; i++) {
    scores[i]=results.get(i);
  }
  return scores;
}
Program: 16952
Project: 16952
Buggy source:
/** 
 * Factory method which computes a similarity score for the given   {@link Sequence} pair.
 * @param < S > each {@link Sequence} of the pair is of type S
 * @param < C > each element of a {@link Sequence} is a {@link Compound} of type C
 * @param query the first {@link Sequence} to score
 * @param target the second {@link Sequence} to score
 * @param type chosen type from list of pairwise sequence scoring routines
 * @param gapPenalty the gap penalties used during alignment
 * @param subMatrix the set of substitution scores used during alignment
 * @return sequence pair score
 */
static <S extends Sequence<C>,C extends Compound>int getPairwiseScore(S query,S target,PairwiseSequenceScorerType type,GapPenalty gapPenalty,SubstitutionMatrix<C> subMatrix){
  return getPairwiseScorer(query,target,type,gapPenalty,subMatrix).getScore();
}

Fixed version (ground truth):
/** 
 * Factory method which computes a similarity score for the given   {@link Sequence} pair.
 * @param < S > each {@link Sequence} of the pair is of type S
 * @param < C > each element of a {@link Sequence} is a {@link Compound} of type C
 * @param query the first {@link Sequence} to score
 * @param target the second {@link Sequence} to score
 * @param type chosen type from list of pairwise sequence scoring routines
 * @param gapPenalty the gap penalties used during alignment
 * @param subMatrix the set of substitution scores used during alignment
 * @return sequence pair score
 */
static <S extends Sequence<C>,C extends Compound>double getPairwiseScore(S query,S target,PairwiseSequenceScorerType type,GapPenalty gapPenalty,SubstitutionMatrix<C> subMatrix){
  return getPairwiseScorer(query,target,type,gapPenalty,subMatrix).getScore();
}
Program: 16953
Project: 16953
Buggy source:
/** 
 * Factory method which computes a sequence pair score for all   {@link Sequence} pairs in the given {@link List}. This method runs the scorings in parallel by submitting all of the scorings to the shared thread pool of the  {@link ConcurrencyTools} utility.
 * @param < S > each {@link Sequence} of a pair is of type S
 * @param < C > each element of a {@link Sequence} is a {@link Compound} of type C
 * @param sequences the {@link List} of {@link Sequence}s to align
 * @param type chosen type from list of pairwise sequence scoring routines
 * @param gapPenalty the gap penalties used during alignment
 * @param subMatrix the set of substitution scores used during alignment
 * @return list of sequence pair scores
 */
public static <S extends Sequence<C>,C extends Compound>int[] getAllPairsScores(List<S> sequences,PairwiseSequenceScorerType type,GapPenalty gapPenalty,SubstitutionMatrix<C> subMatrix){
  return runPairwiseScorers(getAllPairsScorers(sequences,type,gapPenalty,subMatrix));
}

Fixed version (ground truth):
/** 
 * Factory method which computes a sequence pair score for all   {@link Sequence} pairs in the given {@link List}. This method runs the scorings in parallel by submitting all of the scorings to the shared thread pool of the  {@link ConcurrencyTools} utility.
 * @param < S > each {@link Sequence} of a pair is of type S
 * @param < C > each element of a {@link Sequence} is a {@link Compound} of type C
 * @param sequences the {@link List} of {@link Sequence}s to align
 * @param type chosen type from list of pairwise sequence scoring routines
 * @param gapPenalty the gap penalties used during alignment
 * @param subMatrix the set of substitution scores used during alignment
 * @return list of sequence pair scores
 */
public static <S extends Sequence<C>,C extends Compound>double[] getAllPairsScores(List<S> sequences,PairwiseSequenceScorerType type,GapPenalty gapPenalty,SubstitutionMatrix<C> subMatrix){
  return runPairwiseScorers(getAllPairsScorers(sequences,type,gapPenalty,subMatrix));
}
Program: 16954
Project: 16954
Buggy source:
@Override public int getMaxScore(){
  if (aligner != null) {
    align();
  }
  return max;
}

Fixed version (ground truth):
@Override public double getMaxScore(){
  if (aligner != null) {
    align();
  }
  return max;
}
Program: 16955
Project: 16955
Buggy source:
@Override public int getMinScore(){
  return 0;
}

Fixed version (ground truth):
@Override public double getMinScore(){
  return 0;
}
Program: 16956
Project: 16956
Buggy source:
@Override public int getScore(){
  if (aligner != null) {
    align();
  }
  return score;
}

Fixed version (ground truth):
@Override public double getScore(){
  if (aligner != null) {
    align();
  }
  return score;
}
Program: 16957
Project: 16957
Buggy source:
@Override public int getMaxScore(){
  if (aligner != null) {
    align();
  }
  return max;
}

Fixed version (ground truth):
@Override public double getMaxScore(){
  if (aligner != null) {
    align();
  }
  return max;
}
Program: 16958
Project: 16958
Buggy source:
@Override public int getMinScore(){
  return 0;
}

Fixed version (ground truth):
@Override public double getMinScore(){
  return 0;
}
Program: 16959
Project: 16959
Buggy source:
@Override public int getScore(){
  if (aligner != null) {
    align();
  }
  return score;
}

Fixed version (ground truth):
@Override public double getScore(){
  if (aligner != null) {
    align();
  }
  return score;
}
Program: 16960
Project: 16960
Buggy source:
/** 
 * Returns the similarity matrix used to construct this guide tree.  The scores have not been normalized.
 * @return the similarity matrix used to construct this guide tree
 */
public int[][] getScoreMatrix(){
  int[][] matrix=new int[sequences.size()][sequences.size()];
  for (int i=0, n=0; i < matrix.length; i++) {
    matrix[i][i]=scorers.get(i).getMaxScore();
    for (int j=i + 1; j < matrix.length; j++) {
      matrix[i][j]=matrix[j][i]=scorers.get(n++).getScore();
    }
  }
  return matrix;
}

Fixed version (ground truth):
/** 
 * Returns the similarity matrix used to construct this guide tree.  The scores have not been normalized.
 * @return the similarity matrix used to construct this guide tree
 */
public double[][] getScoreMatrix(){
  double[][] matrix=new double[sequences.size()][sequences.size()];
  for (int i=0, n=0; i < matrix.length; i++) {
    matrix[i][i]=scorers.get(i).getMaxScore();
    for (int j=i + 1; j < matrix.length; j++) {
      matrix[i][j]=matrix[j][i]=scorers.get(n++).getScore();
    }
  }
  return matrix;
}
Program: 16961
Project: 16961
Buggy source:
/** 
 * Returns a sequence pair score for all   {@link Sequence} pairs in the given {@link List}.
 * @return list of sequence pair scores
 */
public int[] getAllPairsScores(){
  int[] scores=new int[scorers.size()];
  int n=0;
  for (  PairwiseSequenceScorer<S,C> scorer : scorers) {
    scores[n++]=scorer.getScore();
  }
  return scores;
}

Fixed version (ground truth):
/** 
 * Returns a sequence pair score for all   {@link Sequence} pairs in the given {@link List}.
 * @return list of sequence pair scores
 */
public double[] getAllPairsScores(){
  double[] scores=new double[scorers.size()];
  int n=0;
  for (  PairwiseSequenceScorer<S,C> scorer : scorers) {
    scores[n++]=scorer.getScore();
  }
  return scores;
}