nus-yam/ex-repair huggingface dataset:
Program: 17063
Project: 17063
Buggy source:
private ScopDomain getScopDomain(String scopId){
  if (scopInstallation == null) {
    scopInstallation=new ScopInstallation(path);
  }
  return scopInstallation.getDomainByScopID(scopId);
}

Fixed version (ground truth):
private ScopDomain getScopDomain(String scopId){
  if (scopInstallation == null) {
    scopInstallation=ScopFactory.getSCOP();
  }
  return scopInstallation.getDomainByScopID(scopId);
}
Program: 17064
Project: 17064
Buggy source:
public ScopInstallation getScopInstallation(){
  if (scopInstallation == null) {
    scopInstallation=new ScopInstallation(path);
  }
  return scopInstallation;
}

Fixed version (ground truth):
public ScopDatabase getScopInstallation(){
  if (scopInstallation == null) {
    scopInstallation=ScopFactory.getSCOP();
  }
  return scopInstallation;
}
Program: 17066
Project: 17066
Buggy source:
public NCBIQBlastAlignmentProperties(){
  this.param.put("String_Node_Str","String_Node_Str");
  this.param.put("String_Node_Str","String_Node_Str");
  this.param.put("String_Node_Str","String_Node_Str");
  this.param.put("String_Node_Str","String_Node_Str");
  this.param.put("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public NCBIQBlastAlignmentProperties(){
  this.param.put("String_Node_Str","String_Node_Str");
  this.param.put("String_Node_Str","String_Node_Str");
  this.param.put("String_Node_Str","String_Node_Str");
  this.param.put("String_Node_Str","String_Node_Str");
  this.param.put("String_Node_Str","String_Node_Str");
  this.param.put("String_Node_Str","String_Node_Str");
  this.param.put("String_Node_Str","String_Node_Str");
}
Program: 17067
Project: 17067
Buggy source:
/** 
 * <p> This method extracts the actual Blast report for this request ID. It uses an object implementing the RemotePairwiseAlignmentOutputProperties interface which will specify output formatting options. </p>
 * @param id :a valid request ID
 * @param rb : a <code>RemotePairwiseAlignmentOutputProperties</code> thatwill specify specific output formatting commands
 * @return an <code>InputStream</code> that can be use any way one mightdesire
 * @throws Exception if it is not possible to recover the results.
 */
public InputStream getAlignmentResults(String id,RemotePairwiseAlignmentOutputProperties rb) throws Exception {
  if (holder.containsKey(id)) {
    String srid="String_Node_Str" + id + "String_Node_Str"+ rb.getOutputOption("String_Node_Str")+ "String_Node_Str"+ rb.getOutputOption("String_Node_Str")+ "String_Node_Str"+ rb.getOutputOption("String_Node_Str")+ "String_Node_Str"+ rb.getOutputOption("String_Node_Str")+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ getTool()+ "String_Node_Str"+ getEmail();
    try {
      uConn=setQBlastServiceProperties(aUrl.openConnection());
      fromQBlast=new OutputStreamWriter(uConn.getOutputStream());
      fromQBlast.write(srid);
      fromQBlast.flush();
      return uConn.getInputStream();
    }
 catch (    IOException ioe) {
      throw new Exception("String_Node_Str");
    }
  }
 else {
    throw new Exception("String_Node_Str" + id + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * <p> This method extracts the actual Blast report for this request ID. It uses an object implementing the RemotePairwiseAlignmentOutputProperties interface which will specify output formatting options. </p>
 * @param id :a valid request ID
 * @param rb : a <code>RemotePairwiseAlignmentOutputProperties</code> thatwill specify specific output formatting commands
 * @return an <code>InputStream</code> that can be use any way one mightdesire
 * @throws Exception if it is not possible to recover the results.
 */
public InputStream getAlignmentResults(String id,RemotePairwiseAlignmentOutputProperties rb) throws Exception {
  if (holder.containsKey(id)) {
    String srid="String_Node_Str" + id + "String_Node_Str"+ rb.getOutputOption("String_Node_Str")+ "String_Node_Str"+ rb.getOutputOption("String_Node_Str")+ "String_Node_Str"+ rb.getOutputOption("String_Node_Str")+ "String_Node_Str"+ rb.getOutputOption("String_Node_Str")+ "String_Node_Str"+ "String_Node_Str"+ getTool()+ "String_Node_Str"+ getEmail();
    try {
      uConn=setQBlastServiceProperties(aUrl.openConnection());
      fromQBlast=new OutputStreamWriter(uConn.getOutputStream());
      fromQBlast.write(srid);
      fromQBlast.flush();
      return uConn.getInputStream();
    }
 catch (    IOException ioe) {
      throw new Exception("String_Node_Str");
    }
  }
 else {
    throw new Exception("String_Node_Str" + id + "String_Node_Str");
  }
}
Program: 17068
Project: 17068
Buggy source:
private void colorBySCOP(){
  if (structure == null)   return;
  String pdbId=structure.getPDBCode();
  if (pdbId == null)   return;
  String pdbLocation=System.getProperty(AbstractUserArgumentProcessor.PDB_DIR);
  ScopInstallation scop=new ScopInstallation(pdbLocation);
  List<ScopDomain> domains=scop.getDomainsForPDB(pdbId);
  int i=-1;
  for (  ScopDomain domain : domains) {
    i++;
    if (i >= ColorUtils.colorWheel.length)     i=0;
    Color c1=ColorUtils.colorWheel[i];
    List<String> ranges=domain.getRanges();
    for (    String range : ranges) {
      System.out.println(range);
      String[] spl=range.split("String_Node_Str");
      String script="String_Node_Str";
      if (spl.length > 1)       script+=spl[1] + "String_Node_Str" + spl[0]+ "String_Node_Str";
 else       script+="String_Node_Str" + spl[0] + "String_Node_Str";
      script+="String_Node_Str" + c1.getRed() + "String_Node_Str"+ c1.getGreen()+ "String_Node_Str"+ c1.getBlue()+ "String_Node_Str";
      script+="String_Node_Str" + c1.getRed() + "String_Node_Str"+ c1.getGreen()+ "String_Node_Str"+ c1.getBlue()+ "String_Node_Str";
      System.out.println(script);
      evalString(script);
    }
  }
}

Fixed version (ground truth):
private void colorBySCOP(){
  if (structure == null)   return;
  String pdbId=structure.getPDBCode();
  if (pdbId == null)   return;
  String pdbLocation=System.getProperty(AbstractUserArgumentProcessor.PDB_DIR);
  ScopInstallation scop=new ScopInstallation(pdbLocation);
  List<ScopDomain> domains=scop.getDomainsForPDB(pdbId);
  if (domains == null) {
    System.err.println("String_Node_Str" + pdbId);
    return;
  }
  int i=-1;
  for (  ScopDomain domain : domains) {
    i++;
    if (i >= ColorUtils.colorWheel.length)     i=0;
    Color c1=ColorUtils.colorWheel[i];
    List<String> ranges=domain.getRanges();
    for (    String range : ranges) {
      System.out.println(range);
      String[] spl=range.split("String_Node_Str");
      String script="String_Node_Str";
      if (spl.length > 1)       script+=spl[1] + "String_Node_Str" + spl[0]+ "String_Node_Str";
 else       script+="String_Node_Str" + spl[0] + "String_Node_Str";
      script+="String_Node_Str" + c1.getRed() + "String_Node_Str"+ c1.getGreen()+ "String_Node_Str"+ c1.getBlue()+ "String_Node_Str";
      script+="String_Node_Str" + c1.getRed() + "String_Node_Str"+ c1.getGreen()+ "String_Node_Str"+ c1.getBlue()+ "String_Node_Str";
      System.out.println(script);
      evalString(script);
    }
  }
}
Program: 17070
Project: 17070
Buggy source:
/** 
 * Imperfect code. Checks the last amino acid to see if a codon could have translated a stop for it. Left in for the moment
 */
protected void trimStop(List<AminoAcidCompound> sequence){
  AminoAcidCompound stop=sequence.get(sequence.size() - 1);
  boolean isStop=false;
  for (  Codon c : aminoAcidToCodon.get(stop)) {
    if (c.isStop()) {
      isStop=true;
      break;
    }
  }
  if (isStop) {
    sequence.remove(sequence.size() - 1);
  }
}

Fixed version (ground truth):
/** 
 * Imperfect code. Checks the last amino acid to see if a codon could have translated a stop for it. Left in for the moment
 */
protected void trimStop(List<AminoAcidCompound> sequence){
  AminoAcidCompound stop=sequence.get(sequence.size() - 1);
  boolean isStop=false;
  if (aminoAcidToCodon.containsKey(stop)) {
    for (    Codon c : aminoAcidToCodon.get(stop)) {
      if (c.isStop()) {
        isStop=true;
        break;
      }
    }
  }
  if (isStop) {
    sequence.remove(sequence.size() - 1);
  }
}
Program: 17071
Project: 17071
Buggy source:
/** 
 * Performs the core conversion of RNA to Peptide. It does this by walking a windowed version of the given sequence. Any trailing DNA base pairs are ignored according to the specification of   {@link WindowedSequence}.
 */
public List<Sequence<AminoAcidCompound>> createSequences(Sequence<NucleotideCompound> originalSequence){
  List<List<AminoAcidCompound>> workingList=new ArrayList<List<AminoAcidCompound>>();
  Iterable<SequenceView<NucleotideCompound>> iter=new WindowedSequence<NucleotideCompound>(originalSequence,3);
  for (  SequenceView<NucleotideCompound> element : iter) {
    AminoAcidCompound aminoAcid;
    int i=1;
    Table.CaseInsensitiveTriplet triplet=new Table.CaseInsensitiveTriplet(element.getCompoundAt(i++),element.getCompoundAt(i++),element.getCompoundAt(i++));
    Codon target;
    int arrayIndex=triplet.intValue();
    if (arrayIndex > -1 && arrayIndex < codonArray.length) {
      target=codonArray[arrayIndex];
      aminoAcid=target.getAminoAcid();
    }
 else {
      target=quickLookup.get(triplet);
      aminoAcid=target.getAminoAcid();
    }
    if (aminoAcid == null && translateNCodons()) {
      aminoAcid=unknownAminoAcidCompound;
    }
    addCompoundsToList(Arrays.asList(aminoAcid),workingList);
  }
  postProcessCompoundLists(workingList);
  return workingListToSequences(workingList);
}

Fixed version (ground truth):
/** 
 * Performs the core conversion of RNA to Peptide. It does this by walking a windowed version of the given sequence. Any trailing DNA base pairs are ignored according to the specification of   {@link WindowedSequence}.
 */
public List<Sequence<AminoAcidCompound>> createSequences(Sequence<NucleotideCompound> originalSequence){
  List<List<AminoAcidCompound>> workingList=new ArrayList<List<AminoAcidCompound>>();
  Iterable<SequenceView<NucleotideCompound>> iter=new WindowedSequence<NucleotideCompound>(originalSequence,3);
  for (  SequenceView<NucleotideCompound> element : iter) {
    AminoAcidCompound aminoAcid=null;
    int i=1;
    Table.CaseInsensitiveTriplet triplet=new Table.CaseInsensitiveTriplet(element.getCompoundAt(i++),element.getCompoundAt(i++),element.getCompoundAt(i++));
    Codon target=null;
    int arrayIndex=triplet.intValue();
    if (arrayIndex > -1 && arrayIndex < codonArray.length) {
      target=codonArray[arrayIndex];
      if (target != null) {
        aminoAcid=target.getAminoAcid();
      }
    }
 else {
      target=quickLookup.get(triplet);
      aminoAcid=target.getAminoAcid();
    }
    if (aminoAcid == null && translateNCodons()) {
      aminoAcid=unknownAminoAcidCompound;
    }
    addCompoundsToList(Arrays.asList(aminoAcid),workingList);
  }
  postProcessCompoundLists(workingList);
  return workingListToSequences(workingList);
}
Program: 17072
Project: 17072
Buggy source:
private void initMet(List<AminoAcidCompound> sequence){
  AminoAcidCompound initMet=getToCompoundSet().getCompoundForString("String_Node_Str");
  AminoAcidCompound start=sequence.get(0);
  boolean isStart=false;
  for (  Codon c : aminoAcidToCodon.get(start)) {
    if (c.isStart()) {
      isStart=true;
      break;
    }
  }
  if (isStart) {
    sequence.set(0,initMet);
  }
}

Fixed version (ground truth):
private void initMet(List<AminoAcidCompound> sequence){
  AminoAcidCompound initMet=getToCompoundSet().getCompoundForString("String_Node_Str");
  AminoAcidCompound start=sequence.get(0);
  boolean isStart=false;
  if (aminoAcidToCodon.containsKey(start)) {
    for (    Codon c : aminoAcidToCodon.get(start)) {
      if (c.isStart()) {
        isStart=true;
        break;
      }
    }
  }
  if (isStart) {
    sequence.set(0,initMet);
  }
}
Program: 17073
Project: 17073
Buggy source:
public FileParsingParameters getFileParsingParameters(){
  return null;
}

Fixed version (ground truth):
public FileParsingParameters getFileParsingParameters(){
  return params;
}
Program: 17074
Project: 17074
Buggy source:
private void downloadBiolUnit(String pdbId,File localFile){
  String u="String_Node_Str";
  String ur=String.format(u,pdbId);
  System.out.println("String_Node_Str" + ur);
  System.out.println("String_Node_Str" + localFile);
  try {
    URL url=new URL(ur);
    InputStream uStream=url.openStream();
    InputStream conn=new GZIPInputStream(uStream);
    FileOutputStream outPut=new FileOutputStream(localFile);
    GZIPOutputStream gzOutPut=new GZIPOutputStream(outPut);
    PrintWriter pw=new PrintWriter(gzOutPut);
    BufferedReader fileBuffer=new BufferedReader(new InputStreamReader(conn));
    String line;
    while ((line=fileBuffer.readLine()) != null) {
      pw.println(line);
    }
    pw.flush();
    pw.close();
    outPut.flush();
    outPut.close();
    conn.close();
    uStream.close();
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str" + pdbId + "String_Node_Str");
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Download the biological unit file
 * @param pdbId the PDB ID
 * @param localFile where to store the file locally
 */
private void downloadBiolUnit(String pdbId,File localFile){
  String u="String_Node_Str";
  String ur=String.format(u,pdbId);
  System.out.println("String_Node_Str" + ur);
  System.out.println("String_Node_Str" + localFile);
  try {
    URL url=new URL(ur);
    InputStream uStream=url.openStream();
    InputStream conn=new GZIPInputStream(uStream);
    FileOutputStream outPut=new FileOutputStream(localFile);
    GZIPOutputStream gzOutPut=new GZIPOutputStream(outPut);
    PrintWriter pw=new PrintWriter(gzOutPut);
    BufferedReader fileBuffer=new BufferedReader(new InputStreamReader(conn));
    String line;
    while ((line=fileBuffer.readLine()) != null) {
      pw.println(line);
    }
    pw.flush();
    pw.close();
    outPut.flush();
    outPut.close();
    conn.close();
    uStream.close();
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str" + pdbId + "String_Node_Str");
    e.printStackTrace();
  }
}
Program: 17075
Project: 17075
Buggy source:
public void setFileParsingParameters(FileParsingParameters params){
}

Fixed version (ground truth):
public void setFileParsingParameters(FileParsingParameters params){
  this.params=params;
}
Program: 17076
Project: 17076
Buggy source:
/** 
 * returns the first available biological unit for the PDB ID
 * @throws IOException 
 */
public Structure getBiologicalUnit(String pdbId) throws StructureException, IOException {
  if (pdbId == null || pdbId.length() < 4)   throw new StructureException("String_Node_Str" + pdbId + "String_Node_Str");
  String middle=pdbId.substring(1,3).toLowerCase();
  String dir=path + BIOL_DIR;
  File tmp1=new File(dir);
  if (!tmp1.exists()) {
    tmp1.mkdir();
  }
  dir=dir + lineSplit + middle;
  File directoryCheck=new File(dir);
  if (!directoryCheck.exists()) {
    directoryCheck.mkdir();
  }
  File tempFile=new File(dir + lineSplit + "String_Node_Str"+ pdbId.toLowerCase()+ "String_Node_Str");
  if (!tempFile.exists()) {
    downloadBiolUnit(pdbId.toLowerCase(),tempFile);
  }
  PDBFileReader reader=getPdbFilereader();
  return reader.getStructure(tempFile);
}

Fixed version (ground truth):
/** 
 * Returns the first available biological unit for the PDB ID. Note: the biological units are represented using multiple models. You need to work with all models to get the full set of atoms.
 * @throws IOException 
 */
public Structure getBiologicalUnit(String pdbId) throws StructureException, IOException {
  if (pdbId == null || pdbId.length() < 4)   throw new StructureException("String_Node_Str" + pdbId + "String_Node_Str");
  String middle=pdbId.substring(1,3).toLowerCase();
  String dir=path + BIOL_DIR;
  File tmp1=new File(dir);
  if (!tmp1.exists()) {
    tmp1.mkdir();
  }
  dir=dir + lineSplit + middle;
  File directoryCheck=new File(dir);
  if (!directoryCheck.exists()) {
    directoryCheck.mkdir();
  }
  File tempFile=new File(dir + lineSplit + "String_Node_Str"+ pdbId.toLowerCase()+ "String_Node_Str");
  if (!tempFile.exists()) {
    downloadBiolUnit(pdbId.toLowerCase(),tempFile);
  }
  PDBFileReader reader=getPdbFilereader();
  return reader.getStructure(tempFile);
}
Program: 17077
Project: 17077
Buggy source:
/** 
 * Get all amino acids in a chain.
 * @param chain
 * @return
 */
public static List<Group> getAminoAcids(Chain chain){
  List<Group> residues=new ArrayList<Group>(chain.getSeqResGroups());
  residues.retainAll(chain.getAtomGroups());
  return residues;
}

Fixed version (ground truth):
/** 
 * Get all amino acids in a chain.
 * @param chain
 * @return
 */
public static List<Group> getAminoAcids(Chain chain){
  List<Group> residues=new ArrayList<Group>(chain.getAtomGroups());
  residues.retainAll(chain.getSeqResGroups());
  List<Group> otherGroups=new ArrayList<Group>(chain.getAtomGroups());
  otherGroups.removeAll(chain.getSeqResGroups());
  for (  Group g : otherGroups) {
    if (g.hasAminoAtoms()) {
      residues.add(g);
    }
  }
  return residues;
}
Program: 17079
Project: 17079
Buggy source:
public static double getTMScore(AFPChain align,Atom[] ca1,Atom[] ca2) throws StructureException {
  if (align.getNrEQR() == 0)   return -1;
  Atom[] ca1aligned=new Atom[align.getOptLength()];
  Atom[] ca2aligned=new Atom[align.getOptLength()];
  int pos=0;
  int[] blockLens=align.getOptLen();
  int[][][] optAln=align.getOptAln();
  assert(align.getBlockNum() <= optAln.length);
  for (int block=0; block < align.getBlockNum(); block++) {
    assert(blockLens[block] <= optAln[block][0].length);
    for (int i=0; i < blockLens[block]; i++) {
      ca1aligned[pos]=ca1[optAln[block][0][i]];
      ca2aligned[pos]=(Atom)ca2[optAln[block][1][i]].clone();
      pos++;
    }
  }
  assert(pos == align.getOptLength());
  SVDSuperimposer svd=new SVDSuperimposer(ca1aligned,ca2aligned);
  Matrix matrix=svd.getRotation();
  Atom shift=svd.getTranslation();
  for (  Atom a : ca2aligned) {
    Calc.rotate(a,matrix);
    Calc.shift(a,shift);
  }
  return SVDSuperimposer.getTMScore(ca1aligned,ca2aligned,ca1.length,ca2.length);
}

Fixed version (ground truth):
public static double getTMScore(AFPChain align,Atom[] ca1,Atom[] ca2) throws StructureException {
  if (align.getNrEQR() == 0)   return -1;
  Atom[] ca1aligned=new Atom[align.getOptLength()];
  Atom[] ca2aligned=new Atom[align.getOptLength()];
  int pos=0;
  int[] blockLens=align.getOptLen();
  int[][][] optAln=align.getOptAln();
  assert(align.getBlockNum() <= optAln.length);
  for (int block=0; block < align.getBlockNum(); block++) {
    if (!(blockLens[block] <= optAln[block][0].length)) {
      System.err.println("String_Node_Str" + block + "String_Node_Str"+ blockLens[block]+ "String_Node_Str"+ optAln[block][0].length);
    }
    for (int i=0; i < blockLens[block]; i++) {
      Atom a1=ca1[optAln[block][0][i]];
      Atom a2=(Atom)ca2[optAln[block][1][i]].clone();
      ca1aligned[pos]=a1;
      ca2aligned[pos]=a2;
      pos++;
    }
  }
  if (pos != align.getOptLength()) {
    System.err.println("String_Node_Str" + pos + "String_Node_Str"+ align.getOptLength());
    ca1aligned=(Atom[])resizeArray(ca1aligned,pos);
    ca2aligned=(Atom[])resizeArray(ca2aligned,pos);
  }
  SVDSuperimposer svd=new SVDSuperimposer(ca1aligned,ca2aligned);
  Matrix matrix=svd.getRotation();
  Atom shift=svd.getTranslation();
  for (  Atom a : ca2aligned) {
    Calc.rotate(a,matrix);
    Calc.shift(a,shift);
  }
  return SVDSuperimposer.getTMScore(ca1aligned,ca2aligned,ca1.length,ca2.length);
}
Program: 17081
Project: 17081
Buggy source:
public void NCBIQBlastAlignmentProperties(){
  this.param.put("String_Node_Str","String_Node_Str");
  this.param.put("String_Node_Str","String_Node_Str");
  this.param.put("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public NCBIQBlastAlignmentProperties(){
  this.param.put("String_Node_Str","String_Node_Str");
  this.param.put("String_Node_Str","String_Node_Str");
  this.param.put("String_Node_Str","String_Node_Str");
}
Program: 17082
Project: 17082
Buggy source:
/** 
 * This method set the program to be use with blastall. This method does a validation before running on the valid blastall programs: blastn / blastp / blastx / tblastn / tblastx
 * @param program : one of blastall programs
 * @exception Exception if the named program is not a valid blastall options
 */
public void setBlastProgram(String program) throws Exception {
  boolean isValid=false;
  String[] blastPr=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  if (Arrays.binarySearch(blastPr,program) >= 0) {
    isValid=true;
  }
  if (!isValid) {
    throw new Exception("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * This method set the program to be use with blastall. This method does a validation before running on the valid blastall programs: blastn / blastp / blastx / tblastn / tblastx
 * @param program : one of blastall programs
 * @exception Exception if the named program is not a valid blastall options
 */
public void setBlastProgram(String program) throws Exception {
  boolean isValid=false;
  String[] blastPr=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  if (Arrays.binarySearch(blastPr,program) >= 0) {
    this.param.put("String_Node_Str",program);
    isValid=true;
  }
  if (!isValid) {
    throw new Exception("String_Node_Str");
  }
}
Program: 17083
Project: 17083
Buggy source:
/** 
 * The constructor for a QBlast service request.
 * @throws Exception if the NCBI URL is unresponsive
 */
public void NCBIQBlastService() throws Exception {
  try {
    aUrl=new URL(baseurl);
    uConn=setQBlastServiceProperties(aUrl.openConnection());
  }
 catch (  MalformedURLException e) {
    throw new Exception("String_Node_Str");
  }
catch (  IOException e) {
    throw new Exception("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * The constructor for a QBlast service request.
 * @throws Exception if the NCBI URL is unresponsive
 */
public NCBIQBlastService() throws Exception {
  try {
    aUrl=new URL(baseurl);
    uConn=setQBlastServiceProperties(aUrl.openConnection());
  }
 catch (  MalformedURLException e) {
    throw new Exception("String_Node_Str");
  }
catch (  IOException e) {
    throw new Exception("String_Node_Str");
  }
}
Program: 17084
Project: 17084
Buggy source:
/** 
 * This method is a wrapper that executes the Blast request via the Put command of the CGI-BIN interface with the specified parameters and a GenBank GID. It gets the estimated time of completion by capturing the value of the RTOE variable and sets a loop that will check for completion of analysis at intervals specified by RTOE. <p> It also capture the value for the RID variable, necessary for fetching the actual results after completion. </p>
 * @param gid :an integer with a Genbank GID
 * @param rpa :a <code>RemotePairwiseAlignmentProperties</code> object
 * @return rid : a String with the request ID for this sequence
 * @throws Exception if it is not possible to sent the BLAST command
 */
public String sendAlignmentRequest(int gid,RemotePairwiseAlignmentProperties rpa) throws Exception {
  seq=Integer.toString(gid);
  return rid=sendActualAlignementRequest(seq,rpa);
}

Fixed version (ground truth):
/** 
 * This method is a wrapper that executes the Blast request via the Put command of the CGI-BIN interface with the specified parameters and a GenBank GID. It gets the estimated time of completion by capturing the value of the RTOE variable and sets a loop that will check for completion of analysis at intervals specified by RTOE. <p> It also capture the value for the RID variable, necessary for fetching the actual results after completion. </p>
 * @param gid :an integer with a Genbank GID
 * @param rpa :a <code>RemotePairwiseAlignmentProperties</code> object
 * @return rid : a String with the request ID for this sequence
 * @throws Exception if it is not possible to sent the BLAST command
 */
public String sendAlignmentRequest(int gid,RemotePairwiseAlignmentProperties rpa) throws Exception {
  tmp=Integer.toString(gid);
  return rid=sendActualAlignementRequest(tmp,rpa);
}
Program: 17086
Project: 17086
Buggy source:
/** 
 * Set the tool identifier for QBlast. Defaults to 'biojavax'.
 * @param tool the new identifier.
 */
public void setTool(String tool){
  this.tool=tool;
}

Fixed version (ground truth):
/** 
 * Set the tool identifier for QBlast. Defaults to 'biojava3'.
 * @param tool the new identifier.
 */
public void setTool(String tool){
  this.tool=tool;
}
Program: 17087
Project: 17087
Buggy source:
/** 
 * Get the tool identifier for QBlast. Defaults to 'biojavax'.
 * @return the identifier.
 */
public String getTool(){
  return this.tool;
}

Fixed version (ground truth):
/** 
 * Get the tool identifier for QBlast. Defaults to 'biojava3'.
 * @return the identifier.
 */
public String getTool(){
  return this.tool;
}
Program: 17088
Project: 17088
Buggy source:
/** 
 * The constructor for a QBlast service request.
 * @throws Exception if the NCBI URL is unresponsive
 */
public NCBIQBlastService() throws Exception {
  try {
    aUrl=new URL(baseurl);
    uConn=setQBlastServiceProperties(aUrl.openConnection());
  }
 catch (  MalformedURLException e) {
    throw new Exception("String_Node_Str");
  }
catch (  IOException e) {
    throw new Exception("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * The constructor for a QBlast service request.
 * @throws Exception if the NCBI URL is unresponsive
 */
public NCBIQBlastService() throws Exception {
  try {
    aUrl=new URL(baseurl);
    uConn=setQBlastServiceProperties(aUrl.openConnection());
    holder=new HashMap<String,Long>();
  }
 catch (  MalformedURLException e) {
    throw new Exception("String_Node_Str");
  }
catch (  IOException e) {
    throw new Exception("String_Node_Str");
  }
}
Program: 17092
Project: 17092
Buggy source:
private void colorByPDP(){
  System.out.println("String_Node_Str");
  if (structure == null)   return;
  try {
    Atom[] ca=StructureTools.getAtomCAArray(structure);
    List<Domain> domains=ProteinDomainParser.suggestDomains(ca);
    int i=-1;
    for (    Domain dom : domains) {
      i++;
      if (i > ColorUtils.colorWheel.length)       i=0;
      List<Segment> segments=dom.getSegments();
      Color c1=ColorUtils.colorWheel[i];
      float fraction=0f;
      for (      Segment s : segments) {
        fraction+=1.0 / (float)segments.size();
        int start=s.from;
        int end=s.to;
        Group startG=ca[start].getGroup();
        Group endG=ca[end].getGroup();
        System.out.println("String_Node_Str" + startG.getResidueNumber() + "String_Node_Str"+ startG.getChainId()+ "String_Node_Str"+ endG.getResidueNumber()+ "String_Node_Str"+ endG.getChainId()+ "String_Node_Str"+ s);
        String j1=startG.getResidueNumber() + "String_Node_Str";
        String j2=endG.getResidueNumber() + "String_Node_Str" + endG.getChainId();
        String script="String_Node_Str" + j1 + "String_Node_Str"+ j2+ "String_Node_Str";
        script+="String_Node_Str" + c1.getRed() + "String_Node_Str"+ c1.getGreen()+ "String_Node_Str"+ c1.getBlue()+ "String_Node_Str";
        evalString(script);
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void colorByPDP(){
  System.out.println("String_Node_Str");
  if (structure == null)   return;
  try {
    Atom[] ca=StructureTools.getAtomCAArray(structure);
    List<Domain> domains=ProteinDomainParser.suggestDomains(ca);
    int i=-1;
    for (    Domain dom : domains) {
      i++;
      if (i > ColorUtils.colorWheel.length)       i=0;
      List<Segment> segments=dom.getSegments();
      Color c1=ColorUtils.colorWheel[i];
      float fraction=0f;
      for (      Segment s : segments) {
        fraction+=1.0 / (float)segments.size();
        int start=s.from;
        int end=s.to;
        Group startG=ca[start].getGroup();
        Group endG=ca[end].getGroup();
        System.out.println("String_Node_Str" + startG.getResidueNumber() + "String_Node_Str"+ startG.getChainId()+ "String_Node_Str"+ endG.getResidueNumber()+ "String_Node_Str"+ endG.getChainId()+ "String_Node_Str"+ s);
        String j1=startG.getResidueNumber() + "String_Node_Str";
        String j2=endG.getResidueNumber() + "String_Node_Str" + endG.getChainId();
        String script="String_Node_Str" + j1 + "String_Node_Str"+ j2+ "String_Node_Str";
        script+="String_Node_Str" + c1.getRed() + "String_Node_Str"+ c1.getGreen()+ "String_Node_Str"+ c1.getBlue()+ "String_Node_Str";
        script+="String_Node_Str" + c1.getRed() + "String_Node_Str"+ c1.getGreen()+ "String_Node_Str"+ c1.getBlue()+ "String_Node_Str";
        evalString(script);
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 17093
Project: 17093
Buggy source:
private void colorBySCOP(){
  if (structure == null)   return;
  String pdbId=structure.getPDBCode();
  if (pdbId == null)   return;
  String pdbLocation=System.getProperty(AbstractUserArgumentProcessor.PDB_DIR);
  ScopInstallation scop=new ScopInstallation(pdbLocation);
  List<ScopDomain> domains=scop.getDomainsForPDB(pdbId);
  int i=-1;
  for (  ScopDomain domain : domains) {
    i++;
    if (i > ColorUtils.colorWheel.length)     i=0;
    Color c1=ColorUtils.colorWheel[i];
    List<String> ranges=domain.getRanges();
    for (    String range : ranges) {
      String[] spl=range.split("String_Node_Str");
      String script="String_Node_Str" + spl[1] + "String_Node_Str"+ spl[0]+ "String_Node_Str";
      script+="String_Node_Str" + c1.getRed() + "String_Node_Str"+ c1.getGreen()+ "String_Node_Str"+ c1.getBlue()+ "String_Node_Str";
      System.out.println(script);
      evalString(script);
    }
  }
}

Fixed version (ground truth):
private void colorBySCOP(){
  if (structure == null)   return;
  String pdbId=structure.getPDBCode();
  if (pdbId == null)   return;
  String pdbLocation=System.getProperty(AbstractUserArgumentProcessor.PDB_DIR);
  ScopInstallation scop=new ScopInstallation(pdbLocation);
  List<ScopDomain> domains=scop.getDomainsForPDB(pdbId);
  int i=-1;
  for (  ScopDomain domain : domains) {
    i++;
    if (i > ColorUtils.colorWheel.length)     i=0;
    Color c1=ColorUtils.colorWheel[i];
    List<String> ranges=domain.getRanges();
    for (    String range : ranges) {
      System.out.println(range);
      String[] spl=range.split("String_Node_Str");
      String script="String_Node_Str";
      if (spl.length > 1)       script+=spl[1] + "String_Node_Str" + spl[0]+ "String_Node_Str";
 else       script+="String_Node_Str" + spl[0] + "String_Node_Str";
      script+="String_Node_Str" + c1.getRed() + "String_Node_Str"+ c1.getGreen()+ "String_Node_Str"+ c1.getBlue()+ "String_Node_Str";
      script+="String_Node_Str" + c1.getRed() + "String_Node_Str"+ c1.getGreen()+ "String_Node_Str"+ c1.getBlue()+ "String_Node_Str";
      System.out.println(script);
      evalString(script);
    }
  }
}
Program: 17100
Project: 17100
Buggy source:
@SuppressWarnings("String_Node_Str") public static Object display(AFPChain afpChain,Atom[] ca1,Atom[] ca2,List<Group> hetatms1,List<Group> nucs1,List<Group> hetatms2,List<Group> nucs2) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
  Class c=Class.forName(strucAlignmentDisplay);
  Method display=c.getMethod("String_Node_Str",new Class[]{AFPChain.class,Atom[].class,Atom[].class,List.class,List.class,List.class,List.class});
  Object structureAlignmentJmol=display.invoke(null,afpChain,ca1,ca2,hetatms1,nucs1,hetatms2,nucs2);
  return structureAlignmentJmol;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static Object display(AFPChain afpChain,Atom[] ca1,Atom[] ca2) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
  Class c=Class.forName(strucAlignmentDisplay);
  Method display=c.getMethod("String_Node_Str",new Class[]{AFPChain.class,Atom[].class,Atom[].class});
  Object structureAlignmentJmol=display.invoke(null,afpChain,ca1,ca2);
  return structureAlignmentJmol;
}
Program: 17102
Project: 17102
Buggy source:
@Override public int getSequenceIndexAt(int alignmentIndex){
  if (sequenceFromAlignment == null) {
    sequenceFromAlignment=new int[length];
    int a=1, s=numBefore + 1;
    for (int i=0; i < getStart().getPosition(); i++, a++) {
      sequenceFromAlignment[a - 1]=s;
    }
    for (; a <= length; a++) {
      if (s < getEnd().getPosition() && !isGap(a)) {
        s++;
      }
      sequenceFromAlignment[a - 1]=s;
    }
  }
  return sequenceFromAlignment[alignmentIndex - 1];
}

Fixed version (ground truth):
@Override public int getSequenceIndexAt(int alignmentIndex){
  if (sequenceFromAlignment == null) {
    sequenceFromAlignment=new int[length];
    int a=1, s=numBefore + 1;
    for (int i=0; i < getStart().getPosition(); i++, a++) {
      sequenceFromAlignment[a - 1]=s;
    }
    for (; a <= length; a++) {
      if (!isGap(a)) {
        s++;
      }
      sequenceFromAlignment[a - 1]=s;
    }
  }
  return sequenceFromAlignment[alignmentIndex - 1];
}
Program: 17103
Project: 17103
Buggy source:
@Test public void testGetSequenceAsString(){
  assertEquals(global.getSequenceAsString(),"String_Node_Str");
  assertEquals(local.getSequenceAsString(),"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testGetSequenceAsString(){
  assertEquals(global.getSequenceAsString(),"String_Node_Str");
  assertEquals(local.getSequenceAsString(),"String_Node_Str");
  assertEquals(local2.getSequenceAsString(),"String_Node_Str");
}
Program: 17104
Project: 17104
Buggy source:
@Test public void testGetAlignmentIndexAt(){
  assertEquals(global.getAlignmentIndexAt(1),2);
  assertEquals(global.getAlignmentIndexAt(2),3);
  assertEquals(global.getAlignmentIndexAt(3),5);
  assertEquals(global.getAlignmentIndexAt(4),6);
  assertEquals(local.getAlignmentIndexAt(1),1);
  assertEquals(local.getAlignmentIndexAt(2),1);
  assertEquals(local.getAlignmentIndexAt(3),2);
  assertEquals(local.getAlignmentIndexAt(4),5);
  assertEquals(local.getAlignmentIndexAt(5),7);
  assertEquals(local.getAlignmentIndexAt(6),8);
  assertEquals(local.getAlignmentIndexAt(7),8);
  assertEquals(local.getAlignmentIndexAt(8),8);
  assertEquals(local.getAlignmentIndexAt(9),8);
}

Fixed version (ground truth):
@Test public void testGetAlignmentIndexAt(){
  assertEquals(global.getAlignmentIndexAt(1),2);
  assertEquals(global.getAlignmentIndexAt(2),3);
  assertEquals(global.getAlignmentIndexAt(3),5);
  assertEquals(global.getAlignmentIndexAt(4),6);
  assertEquals(local.getAlignmentIndexAt(1),1);
  assertEquals(local.getAlignmentIndexAt(2),1);
  assertEquals(local.getAlignmentIndexAt(3),2);
  assertEquals(local.getAlignmentIndexAt(4),5);
  assertEquals(local.getAlignmentIndexAt(5),7);
  assertEquals(local.getAlignmentIndexAt(6),8);
  assertEquals(local.getAlignmentIndexAt(7),8);
  assertEquals(local.getAlignmentIndexAt(8),8);
  assertEquals(local.getAlignmentIndexAt(9),8);
  assertEquals(local2.getAlignmentIndexAt(1),1);
  assertEquals(local2.getAlignmentIndexAt(2),1);
  assertEquals(local2.getAlignmentIndexAt(3),2);
  assertEquals(local2.getAlignmentIndexAt(4),3);
}
Program: 17105
Project: 17105
Buggy source:
@Test public void testIsCircular(){
  assertFalse(global.isCircular());
  assertFalse(local.isCircular());
}

Fixed version (ground truth):
@Test public void testIsCircular(){
  assertFalse(global.isCircular());
  assertFalse(local.isCircular());
  assertFalse(local2.isCircular());
}
Program: 17106
Project: 17106
Buggy source:
@Test public void testGetNumGaps(){
  assertEquals(global.getNumGaps(),3);
  assertEquals(local.getNumGaps(),2);
}

Fixed version (ground truth):
@Test public void testGetNumGaps(){
  assertEquals(global.getNumGaps(),3);
  assertEquals(local.getNumGaps(),2);
  assertEquals(local2.getNumGaps(),0);
}
Program: 17107
Project: 17107
Buggy source:
@Test public void testGetIndexOf(){
  assertEquals(global.getIndexOf(cs.getCompoundForString("String_Node_Str")),3);
  assertEquals(global.getIndexOf(cs.getCompoundForString("String_Node_Str")),1);
  assertEquals(local.getIndexOf(cs.getCompoundForString("String_Node_Str")),5);
  assertEquals(local.getIndexOf(cs.getCompoundForString("String_Node_Str")),3);
}

Fixed version (ground truth):
@Test public void testGetIndexOf(){
  assertEquals(global.getIndexOf(cs.getCompoundForString("String_Node_Str")),3);
  assertEquals(global.getIndexOf(cs.getCompoundForString("String_Node_Str")),1);
  assertEquals(local.getIndexOf(cs.getCompoundForString("String_Node_Str")),5);
  assertEquals(local.getIndexOf(cs.getCompoundForString("String_Node_Str")),3);
  assertEquals(local2.getIndexOf(cs.getCompoundForString("String_Node_Str")),2);
  assertEquals(local2.getIndexOf(cs.getCompoundForString("String_Node_Str")),-1);
}
Program: 17108
Project: 17108
Buggy source:
@Test public void testGetSequenceIndexAt(){
  assertEquals(global.getSequenceIndexAt(1),1);
  assertEquals(global.getSequenceIndexAt(2),1);
  assertEquals(global.getSequenceIndexAt(3),2);
  assertEquals(global.getSequenceIndexAt(4),2);
  assertEquals(global.getSequenceIndexAt(5),3);
  assertEquals(global.getSequenceIndexAt(6),4);
  assertEquals(global.getSequenceIndexAt(7),4);
  assertEquals(local.getSequenceIndexAt(1),2);
  assertEquals(local.getSequenceIndexAt(2),3);
  assertEquals(local.getSequenceIndexAt(3),3);
  assertEquals(local.getSequenceIndexAt(4),3);
  assertEquals(local.getSequenceIndexAt(5),4);
  assertEquals(local.getSequenceIndexAt(6),4);
  assertEquals(local.getSequenceIndexAt(7),5);
  assertEquals(local.getSequenceIndexAt(8),6);
}

Fixed version (ground truth):
@Test public void testGetSequenceIndexAt(){
  assertEquals(global.getSequenceIndexAt(1),1);
  assertEquals(global.getSequenceIndexAt(2),1);
  assertEquals(global.getSequenceIndexAt(3),2);
  assertEquals(global.getSequenceIndexAt(4),2);
  assertEquals(global.getSequenceIndexAt(5),3);
  assertEquals(global.getSequenceIndexAt(6),4);
  assertEquals(global.getSequenceIndexAt(7),4);
  assertEquals(local.getSequenceIndexAt(1),2);
  assertEquals(local.getSequenceIndexAt(2),3);
  assertEquals(local.getSequenceIndexAt(3),3);
  assertEquals(local.getSequenceIndexAt(4),3);
  assertEquals(local.getSequenceIndexAt(5),4);
  assertEquals(local.getSequenceIndexAt(6),4);
  assertEquals(local.getSequenceIndexAt(7),5);
  assertEquals(local.getSequenceIndexAt(8),6);
  assertEquals(local2.getSequenceIndexAt(1),2);
  assertEquals(local2.getSequenceIndexAt(2),3);
  assertEquals(local2.getSequenceIndexAt(3),4);
}
Program: 17109
Project: 17109
Buggy source:
@Test public void testGetOverlapCount(){
  assertEquals(global.getOverlapCount(),1);
  assertEquals(local.getOverlapCount(),1);
}

Fixed version (ground truth):
@Test public void testGetOverlapCount(){
  assertEquals(global.getOverlapCount(),1);
  assertEquals(local.getOverlapCount(),1);
  assertEquals(local2.getOverlapCount(),1);
}
Program: 17110
Project: 17110
Buggy source:
@Test public void testGetLastIndexOf(){
  assertEquals(global.getLastIndexOf(cs.getCompoundForString("String_Node_Str")),3);
  assertEquals(global.getLastIndexOf(cs.getCompoundForString("String_Node_Str")),7);
  assertEquals(local.getLastIndexOf(cs.getCompoundForString("String_Node_Str")),5);
  assertEquals(local.getLastIndexOf(cs.getCompoundForString("String_Node_Str")),6);
}

Fixed version (ground truth):
@Test public void testGetLastIndexOf(){
  assertEquals(global.getLastIndexOf(cs.getCompoundForString("String_Node_Str")),3);
  assertEquals(global.getLastIndexOf(cs.getCompoundForString("String_Node_Str")),7);
  assertEquals(local.getLastIndexOf(cs.getCompoundForString("String_Node_Str")),5);
  assertEquals(local.getLastIndexOf(cs.getCompoundForString("String_Node_Str")),6);
  assertEquals(local2.getLastIndexOf(cs.getCompoundForString("String_Node_Str")),2);
  assertEquals(local2.getLastIndexOf(cs.getCompoundForString("String_Node_Str")),-1);
}
Program: 17111
Project: 17111
Buggy source:
@Test public void testGetLocationInAlignment(){
  assertEquals(global.getLocationInAlignment(),new SimpleLocation(2,6,Strand.UNDEFINED,new SimpleLocation(2,3,Strand.UNDEFINED),new SimpleLocation(5,6,Strand.UNDEFINED)));
  assertEquals(local.getLocationInAlignment(),new SimpleLocation(1,8,Strand.UNDEFINED,new SimpleLocation(1,2,Strand.UNDEFINED),new SimpleLocation(5,5,Strand.UNDEFINED),new SimpleLocation(7,8,Strand.UNDEFINED)));
}

Fixed version (ground truth):
@Test public void testGetLocationInAlignment(){
  assertEquals(global.getLocationInAlignment(),new SimpleLocation(2,6,Strand.UNDEFINED,new SimpleLocation(2,3,Strand.UNDEFINED),new SimpleLocation(5,6,Strand.UNDEFINED)));
  assertEquals(local.getLocationInAlignment(),new SimpleLocation(1,8,Strand.UNDEFINED,new SimpleLocation(1,2,Strand.UNDEFINED),new SimpleLocation(5,5,Strand.UNDEFINED),new SimpleLocation(7,8,Strand.UNDEFINED)));
  assertEquals(local2.getLocationInAlignment(),new SimpleLocation(1,3,Strand.UNDEFINED));
}
Program: 17112
Project: 17112
Buggy source:
@Test public void testGetOriginalSequence(){
  assertEquals(global.getOriginalSequence(),go);
  assertEquals(local.getOriginalSequence(),lo);
}

Fixed version (ground truth):
@Test public void testGetOriginalSequence(){
  assertEquals(global.getOriginalSequence(),go);
  assertEquals(local.getOriginalSequence(),lo);
  assertEquals(local2.getOriginalSequence(),go);
}
Program: 17113
Project: 17113
Buggy source:
@Test public void testGetStart(){
  assertEquals(global.getStart().getPosition(),new Integer(2));
  assertEquals(local.getStart().getPosition(),new Integer(1));
}

Fixed version (ground truth):
@Test public void testGetStart(){
  assertEquals(global.getStart().getPosition(),new Integer(2));
  assertEquals(local.getStart().getPosition(),new Integer(1));
  assertEquals(local2.getStart().getPosition(),new Integer(1));
}
Program: 17114
Project: 17114
Buggy source:
@Test public void testGetSequenceAsStringIntegerIntegerStrand(){
  assertEquals(global.getSequenceAsString(2,5,Strand.UNDEFINED),"String_Node_Str");
  assertEquals(local.getSequenceAsString(2,6,Strand.UNDEFINED),"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testGetSequenceAsStringIntegerIntegerStrand(){
  assertEquals(global.getSequenceAsString(2,5,Strand.UNDEFINED),"String_Node_Str");
  assertEquals(local.getSequenceAsString(2,6,Strand.UNDEFINED),"String_Node_Str");
  assertEquals(local2.getSequenceAsString(2,3,Strand.UNDEFINED),"String_Node_Str");
}
Program: 17115
Project: 17115
Buggy source:
@Test public void testCountCompounds(){
  assertEquals(global.countCompounds(cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str")),3);
  assertEquals(local.countCompounds(cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str")),1);
}

Fixed version (ground truth):
@Test public void testCountCompounds(){
  assertEquals(global.countCompounds(cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str")),3);
  assertEquals(local.countCompounds(cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str")),1);
  assertEquals(local2.countCompounds(cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str"),cs.getCompoundForString("String_Node_Str")),2);
}
Program: 17116
Project: 17116
Buggy source:
@Test public void testGetCompoundSet(){
  assertEquals(global.getCompoundSet(),cs);
  assertEquals(local.getCompoundSet(),cs);
}

Fixed version (ground truth):
@Test public void testGetCompoundSet(){
  assertEquals(global.getCompoundSet(),cs);
  assertEquals(local.getCompoundSet(),cs);
  assertEquals(local2.getCompoundSet(),cs);
}
Program: 17117
Project: 17117
Buggy source:
@Test public void testIterator(){
  for (  AminoAcidCompound c : global) {
    assertNotNull(cs.getStringForCompound(c));
  }
}

Fixed version (ground truth):
@Test public void testIterator(){
  for (  AminoAcidCompound c : global) {
    assertNotNull(cs.getStringForCompound(c));
  }
  for (  AminoAcidCompound c : local) {
    assertNotNull(cs.getStringForCompound(c));
  }
  for (  AminoAcidCompound c : local2) {
    assertNotNull(cs.getStringForCompound(c));
  }
}
Program: 17118
Project: 17118
Buggy source:
@Test public void testGetAccession(){
  assertNull(global.getAccession());
  assertNull(local.getAccession());
}

Fixed version (ground truth):
@Test public void testGetAccession(){
  assertNull(global.getAccession());
  assertNull(local.getAccession());
  assertNull(local2.getAccession());
}
Program: 17119
Project: 17119
Buggy source:
@Test public void testGetCompoundAt(){
  assertEquals(global.getCompoundAt(1),cs.getCompoundForString("String_Node_Str"));
  assertEquals(global.getCompoundAt(2),cs.getCompoundForString("String_Node_Str"));
  assertEquals(global.getCompoundAt(3),cs.getCompoundForString("String_Node_Str"));
  assertEquals(global.getCompoundAt(4),cs.getCompoundForString("String_Node_Str"));
  assertEquals(global.getCompoundAt(5),cs.getCompoundForString("String_Node_Str"));
  assertEquals(global.getCompoundAt(6),cs.getCompoundForString("String_Node_Str"));
  assertEquals(global.getCompoundAt(7),cs.getCompoundForString("String_Node_Str"));
  assertEquals(global.getCompoundAt(1),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(1),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(2),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(3),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(4),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(5),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(6),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(7),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(8),cs.getCompoundForString("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testGetCompoundAt(){
  assertEquals(global.getCompoundAt(1),cs.getCompoundForString("String_Node_Str"));
  assertEquals(global.getCompoundAt(2),cs.getCompoundForString("String_Node_Str"));
  assertEquals(global.getCompoundAt(3),cs.getCompoundForString("String_Node_Str"));
  assertEquals(global.getCompoundAt(4),cs.getCompoundForString("String_Node_Str"));
  assertEquals(global.getCompoundAt(5),cs.getCompoundForString("String_Node_Str"));
  assertEquals(global.getCompoundAt(6),cs.getCompoundForString("String_Node_Str"));
  assertEquals(global.getCompoundAt(7),cs.getCompoundForString("String_Node_Str"));
  assertEquals(global.getCompoundAt(1),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(1),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(2),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(3),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(4),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(5),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(6),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(7),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local.getCompoundAt(8),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local2.getCompoundAt(1),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local2.getCompoundAt(2),cs.getCompoundForString("String_Node_Str"));
  assertEquals(local2.getCompoundAt(3),cs.getCompoundForString("String_Node_Str"));
}