nus-yam/ex-repair huggingface dataset:
Program: 16962
Project: 16962
Buggy source:
@Override public int getMaxScore(){
  return 0;
}

Fixed version (ground truth):
@Override public double getMaxScore(){
  return 0;
}
Program: 16963
Project: 16963
Buggy source:
@Override public int getMinScore(){
  return 0;
}

Fixed version (ground truth):
@Override public double getMinScore(){
  return 0;
}
Program: 16964
Project: 16964
Buggy source:
@Override public int getScore(){
  return 0;
}

Fixed version (ground truth):
@Override public double getScore(){
  return 0;
}
Program: 16965
Project: 16965
Buggy source:
@Override public int getMinScore(){
  if (profile == null) {
    align();
  }
  return min;
}

Fixed version (ground truth):
@Override public double getMinScore(){
  if (profile == null) {
    align();
  }
  return min;
}
Program: 16966
Project: 16966
Buggy source:
@Override public int getMaxScore(){
  if (profile == null) {
    align();
  }
  return max;
}

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

Fixed version (ground truth):
@Override public double getScore(){
  if (profile == null) {
    align();
  }
  return score;
}
Program: 16968
Project: 16968
Buggy source:
@Override public Integer call(){
  return pss.getScore();
}

Fixed version (ground truth):
@Override public Double call(){
  return pss.getScore();
}
Program: 16969
Project: 16969
Buggy source:
/** 
 * Returns maximum possible score.
 * @return maximum possible score
 */
int getMaxScore();

Fixed version (ground truth):
/** 
 * Returns maximum possible score.
 * @return maximum possible score
 */
double getMaxScore();
Program: 16970
Project: 16970
Buggy source:
/** 
 * Returns minimum possible score.
 * @return minimum possible score
 */
int getMinScore();

Fixed version (ground truth):
/** 
 * Returns minimum possible score.
 * @return minimum possible score
 */
double getMinScore();
Program: 16971
Project: 16971
Buggy source:
/** 
 * Returns score resulting from algorithm.  This should normalize between 0 and 1 by calculating (  {@link #getScore()} - {@link #getMinScore()}) / (  {@link #getMaxScore()} - {@link #getMinScore()}).
 * @return score resulting from algorithm
 */
int getScore();

Fixed version (ground truth):
/** 
 * Returns score resulting from algorithm.  This should normalize between 0 and 1 by calculating (  {@link #getScore()} - {@link #getMinScore()}) / (  {@link #getMaxScore()} - {@link #getMinScore()}).
 * @return score resulting from algorithm
 */
double getScore();
Program: 16972
Project: 16972
Buggy source:
@Test public void testGetAllPairsScores(){
  assertArrayEquals(tree.getAllPairsScores(),new int[]{4,0,3,0,3,0});
}

Fixed version (ground truth):
@Test public void testGetAllPairsScores(){
  assertArrayEquals(tree.getAllPairsScores(),new double[]{4,0,3,0,3,0},0.00001);
}
Program: 16973
Project: 16973
Buggy source:
public static Cut[] getCuts(int k,Subproblem subproblem,int[] dim,boolean anchor0){
  Cut[] cuts;
  int m=subproblem.getQueryEndIndex() - subproblem.getQueryStartIndex() - (anchor0 ? 1 : 0);
  if (k < m) {
    cuts=new Cut[k];
    for (int i=0; i < k; i++) {
      cuts[i]=new Cut(subproblem.getQueryStartIndex() + ((i + 1) * (m + 1) * k / (k + 1)),dim);
    }
  }
 else {
    cuts=new Cut[m];
    for (int i=0, x=subproblem.getQueryStartIndex() + (anchor0 ? 1 : 0); i < m; i++, x++) {
      cuts[i]=new Cut(x,dim);
    }
  }
  return cuts;
}

Fixed version (ground truth):
public static Cut[] getCuts(int k,Subproblem subproblem,int[] dim,boolean anchor0){
  Cut[] cuts;
  int m=subproblem.getQueryEndIndex() - subproblem.getQueryStartIndex() - (anchor0 ? 1 : 0);
  if (k < m) {
    cuts=new Cut[k];
    int firstCutIndex=subproblem.getQueryStartIndex() + (anchor0 ? 1 : 0);
    int finalCutIndex=firstCutIndex + m - 1;
    for (int i=0; i < k; i++) {
      cuts[i]=new Cut(firstCutIndex + i * m / (k - 1),dim);
    }
  }
 else {
    cuts=new Cut[m];
    for (int i=0, x=subproblem.getQueryStartIndex() + (anchor0 ? 1 : 0); i < m; i++, x++) {
      cuts[i]=new Cut(x,dim);
    }
  }
  return cuts;
}
Program: 16975
Project: 16975
Buggy source:
/** 
 * Set the default scop version and instance
 * @param scop
 */
public static void setScopDatabase(ScopDatabase scop){
  System.out.println("String_Node_Str" + scop.getClass().getName());
  defaultVersion=scop.getScopVersion();
  versionedScopDBs.put(defaultVersion,scop);
}

Fixed version (ground truth):
/** 
 * Set the default scop version and instance
 * @param scop
 */
public static void setScopDatabase(ScopDatabase scop){
  defaultVersion=scop.getScopVersion();
  versionedScopDBs.put(defaultVersion,scop);
}
Program: 16976
Project: 16976
Buggy source:
/** 
 * Gets an instance of the specified scop version. <p> The particular implementation returned is influenced by the <tt>forceLocalData</tt> parameter. When false, the instance returned will generally be a  {@link RemoteScopInstallation}, although this may be influenced by previous calls to this class. When true, the result is guaranteed to implement   {@link LocalScopDatabase} (generally a {@link BerkeleyScopInstallation}). <p> Note that  
 * @param version A version number, such as {@link #VERSION_1_75A}
 * @param forceLocalData Whether to use a local installation or a remote installation
 * @return an
 */
public static ScopDatabase getSCOP(String version,boolean forceLocalData){
  if (version == null) {
    version=defaultVersion;
  }
  ScopDatabase scop=versionedScopDBs.get(version);
  if (forceLocalData) {
    if (scop == null || !(scop instanceof LocalScopDatabase)) {
      BerkeleyScopInstallation berkeley=new BerkeleyScopInstallation();
      berkeley.setScopVersion(version);
      versionedScopDBs.put(version,berkeley);
      return berkeley;
    }
    return scop;
  }
 else {
    if (scop == null) {
      scop=new RemoteScopInstallation();
      scop.setScopVersion(version);
      versionedScopDBs.put(version,scop);
    }
    return scop;
  }
}

Fixed version (ground truth):
/** 
 * Gets an instance of the specified scop version. <p> The particular implementation returned is influenced by the <tt>forceLocalData</tt> parameter. When false, the instance returned will generally be a  {@link RemoteScopInstallation}, although this may be influenced by previous calls to this class. When true, the result is guaranteed to implement   {@link LocalScopDatabase} (generally a {@link BerkeleyScopInstallation}). <p> Note that  
 * @param version A version number, such as {@link #VERSION_1_75A}
 * @param forceLocalData Whether to use a local installation or a remote installation
 * @return an
 */
public static ScopDatabase getSCOP(String version,boolean forceLocalData){
  if (version == null) {
    version=DEFAULT_VERSION;
  }
  ScopDatabase scop=versionedScopDBs.get(version);
  if (forceLocalData) {
    if (scop == null || !(scop instanceof LocalScopDatabase)) {
      BerkeleyScopInstallation berkeley=new BerkeleyScopInstallation();
      berkeley.setScopVersion(version);
      versionedScopDBs.put(version,berkeley);
      return berkeley;
    }
    return scop;
  }
 else {
    if (scop == null) {
      scop=new RemoteScopInstallation();
      scop.setScopVersion(version);
      versionedScopDBs.put(version,scop);
    }
    return scop;
  }
}
Program: 16977
Project: 16977
Buggy source:
/** 
 * Set the default scop version and instance
 * @param scop
 */
public static void setScopDatabase(ScopDatabase scop){
  defaultVersion=scop.getScopVersion();
  versionedScopDBs.put(defaultVersion,scop);
}

Fixed version (ground truth):
/** 
 * Set the default scop version and instance
 * @param scop
 */
public static void setScopDatabase(ScopDatabase scop){
  DEFAULT_VERSION=scop.getScopVersion();
  versionedScopDBs.put(DEFAULT_VERSION,scop);
}
Program: 16978
Project: 16978
Buggy source:
protected void downloadClaFile() throws IOException {
  String filename=getFilename("String_Node_Str");
  URL url=new URL(scopDownloadURL + filename);
  downloadFileFromRemote(url,new File(filename));
}

Fixed version (ground truth):
@Override protected void downloadClaFile() throws IOException {
  String filename=getFilename("String_Node_Str");
  URL url=new URL(scopDownloadURL + filename);
  downloadFileFromRemote(url,new File(getClaFilename()));
}
Program: 16979
Project: 16979
Buggy source:
protected void downloadComFile() throws IOException {
  String filename=getFilename("String_Node_Str");
  URL url=new URL(scopDownloadURL + filename);
  downloadFileFromRemote(url,new File(filename));
}

Fixed version (ground truth):
@Override protected void downloadComFile() throws IOException {
  String filename=getFilename("String_Node_Str");
  URL url=new URL(scopDownloadURL + filename);
  downloadFileFromRemote(url,new File(getComFilename()));
}
Program: 16980
Project: 16980
Buggy source:
protected void downloadHieFile() throws IOException {
  String filename=getFilename("String_Node_Str");
  URL url=new URL(scopDownloadURL + filename);
  downloadFileFromRemote(url,new File(filename));
}

Fixed version (ground truth):
@Override protected void downloadHieFile() throws IOException {
  String filename=getFilename("String_Node_Str");
  URL url=new URL(scopDownloadURL + filename);
  downloadFileFromRemote(url,new File(getHieFilename()));
}
Program: 16981
Project: 16981
Buggy source:
protected void downloadDesFile() throws IOException {
  String filename=getFilename("String_Node_Str");
  URL url=new URL(scopDownloadURL + filename);
  downloadFileFromRemote(url,new File(filename));
}

Fixed version (ground truth):
@Override protected void downloadDesFile() throws IOException {
  String filename=getFilename("String_Node_Str");
  URL url=new URL(scopDownloadURL + filename);
  downloadFileFromRemote(url,new File(getDesFilename()));
}
Program: 16982
Project: 16982
Buggy source:
/** 
 * Gets an instance of the specified scop version. <p> The particular implementation returned is influenced by the <tt>forceLocalData</tt> parameter. When false, the instance returned will generally be a  {@link RemoteScopInstallation}, although this may be influenced by previous calls to this class. When true, the result is guaranteed to implement   {@link LocalScopDatabase} (generally a {@link BerkeleyScopInstallation}). <p> Note that  
 * @param version A version number, such as {@link #VERSION_1_75A}
 * @param forceLocalData Whether to use a local installation or a remote installation
 * @return an
 */
public static ScopDatabase getSCOP(String version,boolean forceLocalData){
  if (version == null) {
    version=defaultVersion;
  }
  ScopDatabase scop=versionedScopDBs.get(version);
  if (forceLocalData) {
    if (scop == null || !(scop instanceof LocalScopDatabase)) {
      BerkeleyScopInstallation berkeley=new BerkeleyScopInstallation();
      berkeley.setScopVersion(version);
      versionedScopDBs.put(version,berkeley);
      return berkeley;
    }
    return scop;
  }
 else {
    if (scop == null) {
      scop=new RemoteScopInstallation();
      versionedScopDBs.put(version,scop);
    }
    return scop;
  }
}

Fixed version (ground truth):
/** 
 * Gets an instance of the specified scop version. <p> The particular implementation returned is influenced by the <tt>forceLocalData</tt> parameter. When false, the instance returned will generally be a  {@link RemoteScopInstallation}, although this may be influenced by previous calls to this class. When true, the result is guaranteed to implement   {@link LocalScopDatabase} (generally a {@link BerkeleyScopInstallation}). <p> Note that  
 * @param version A version number, such as {@link #VERSION_1_75A}
 * @param forceLocalData Whether to use a local installation or a remote installation
 * @return an
 */
public static ScopDatabase getSCOP(String version,boolean forceLocalData){
  if (version == null) {
    version=defaultVersion;
  }
  ScopDatabase scop=versionedScopDBs.get(version);
  if (forceLocalData) {
    if (scop == null || !(scop instanceof LocalScopDatabase)) {
      BerkeleyScopInstallation berkeley=new BerkeleyScopInstallation();
      berkeley.setScopVersion(version);
      versionedScopDBs.put(version,berkeley);
      return berkeley;
    }
    return scop;
  }
 else {
    if (scop == null) {
      scop=new RemoteScopInstallation();
      scop.setScopVersion(version);
      versionedScopDBs.put(version,scop);
    }
    return scop;
  }
}
Program: 16983
Project: 16983
Buggy source:
protected void downloadClaFile() throws FileNotFoundException, IOException {
  String remoteFilename=claFileName + scopVersion + "String_Node_Str";
  URL url=new URL(scopDownloadURL + remoteFilename);
  String localFileName=getClaFilename();
  File localFile=new File(localFileName);
  downloadFileFromRemote(url,localFile);
}

Fixed version (ground truth):
protected void downloadClaFile() throws IOException {
  String filename=getFilename("String_Node_Str");
  URL url=new URL(scopDownloadURL + filename);
  downloadFileFromRemote(url,new File(filename));
}
Program: 16984
Project: 16984
Buggy source:
protected void downloadComFile() throws FileNotFoundException, IOException {
  String remoteFilename=comFileName + scopVersion + "String_Node_Str";
  URL url=new URL(scopDownloadURL + remoteFilename);
  String localFileName=getComFilename();
  File localFile=new File(localFileName);
  downloadFileFromRemote(url,localFile);
}

Fixed version (ground truth):
protected void downloadComFile() throws IOException {
  String filename=getFilename("String_Node_Str");
  URL url=new URL(scopDownloadURL + filename);
  downloadFileFromRemote(url,new File(filename));
}
Program: 16985
Project: 16985
Buggy source:
protected void downloadHieFile() throws FileNotFoundException, IOException {
  String remoteFilename=hieFileName + scopVersion + "String_Node_Str";
  URL url=new URL(scopDownloadURL + remoteFilename);
  String localFileName=getHieFilename();
  File localFile=new File(localFileName);
  downloadFileFromRemote(url,localFile);
}

Fixed version (ground truth):
protected void downloadHieFile() throws IOException {
  String filename=getFilename("String_Node_Str");
  URL url=new URL(scopDownloadURL + filename);
  downloadFileFromRemote(url,new File(filename));
}
Program: 16986
Project: 16986
Buggy source:
protected void downloadDesFile() throws FileNotFoundException, IOException {
  String remoteFilename=desFileName + scopVersion + "String_Node_Str";
  URL url=new URL(scopDownloadURL + remoteFilename);
  String localFileName=getDesFilename();
  File localFile=new File(localFileName);
  downloadFileFromRemote(url,localFile);
}

Fixed version (ground truth):
protected void downloadDesFile() throws IOException {
  String filename=getFilename("String_Node_Str");
  URL url=new URL(scopDownloadURL + filename);
  downloadFileFromRemote(url,new File(filename));
}
Program: 16988
Project: 16988
Buggy source:
private void pdb_SSBOND_Handler(String line){
  String chain1=line.substring(15,16);
  String seqNum1=line.substring(18,21).trim();
  String icode1=line.substring(21,22);
  String chain2=line.substring(29,30);
  String seqNum2=line.substring(31,35).trim();
  String icode2=line.substring(35,36);
  if (icode1.equals("String_Node_Str"))   icode1="String_Node_Str";
  if (icode2.equals("String_Node_Str"))   icode2="String_Node_Str";
  SSBond ssbond=new SSBond();
  ssbond.setChainID1(chain1);
  ssbond.setResnum1(seqNum1);
  ssbond.setChainID2(chain2);
  ssbond.setResnum2(seqNum2);
  ssbond.setInsCode1(icode1);
  ssbond.setInsCode2(icode2);
  structure.addSSBond(ssbond);
}

Fixed version (ground truth):
private void pdb_SSBOND_Handler(String line){
  String chain1=line.substring(15,16);
  String seqNum1=line.substring(17,21).trim();
  String icode1=line.substring(21,22);
  String chain2=line.substring(29,30);
  String seqNum2=line.substring(31,35).trim();
  String icode2=line.substring(35,36);
  if (icode1.equals("String_Node_Str"))   icode1="String_Node_Str";
  if (icode2.equals("String_Node_Str"))   icode2="String_Node_Str";
  SSBond ssbond=new SSBond();
  ssbond.setChainID1(chain1);
  ssbond.setResnum1(seqNum1);
  ssbond.setChainID2(chain2);
  ssbond.setResnum2(seqNum2);
  ssbond.setInsCode1(icode1);
  ssbond.setInsCode2(icode2);
  structure.addSSBond(ssbond);
}
Program: 16990
Project: 16990
Buggy source:
/** 
 * Load the sequence
 * @return
 */
private boolean init(){
  try {
    BufferedReader br=new BufferedReader(new FileReader(file));
    String sequence=sequenceParser.getSequence(br,sequenceLength);
    setContents(sequence);
    br.close();
  }
 catch (  Exception e) {
    throw new FileAccessError("String_Node_Str" + file + "String_Node_Str"+ sequenceStartIndex+ "String_Node_Str"+ sequenceLength+ "String_Node_Str"+ e.toString());
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Load the sequence
 * @return
 */
private boolean init(){
  try {
    BufferedReader br=new BufferedReader(new FileReader(file));
    br.skip(sequenceStartIndex);
    String sequence=sequenceParser.getSequence(br,sequenceLength);
    setContents(sequence);
    br.close();
  }
 catch (  Exception e) {
    throw new FileAccessError("String_Node_Str" + file + "String_Node_Str"+ sequenceStartIndex+ "String_Node_Str"+ sequenceLength+ "String_Node_Str"+ e.toString());
  }
  return true;
}
Program: 16991
Project: 16991
Buggy source:
public Group getAltLocGroup(Character altLoc){
  if (altLocs == null || altLocs.size() == 0)   return null;
  for (  Group group : altLocs) {
    if (group.getAtoms().isEmpty())     continue;
    try {
      if (group.getAtom(0).getAltLoc().equals(altLoc)) {
        return group;
      }
    }
 catch (    StructureException e) {
    }
  }
  return null;
}

Fixed version (ground truth):
public Group getAltLocGroup(Character altLoc){
  try {
    if (getAtom(0).getAltLoc().equals(altLoc)) {
      return this;
    }
    if (altLocs == null || altLocs.size() == 0)     return null;
    for (    Group group : altLocs) {
      if (group.getAtoms().isEmpty())       continue;
      if (group.getAtom(0).getAltLoc().equals(altLoc)) {
        return group;
      }
    }
  }
 catch (  StructureException e) {
  }
  return null;
}
Program: 16993
Project: 16993
Buggy source:
public static void main(String[] args){
  getAlignmentFromFasta();
}

Fixed version (ground truth):
public static void main(String[] args) throws StructureException {
  getAlignmentFromFasta();
}
Program: 16998
Project: 16998
Buggy source:
@Test public void testCp() throws IOException, StructureException {
  Structure structure=cache.getStructure("String_Node_Str");
  ProteinSequence sequence=new ProteinSequence("String_Node_Str");
  ProteinSequence second=new ProteinSequence("String_Node_Str");
  AFPChain afpChain=FastaAFPChainConverter.cpFastaToAfpChain(sequence,second,structure,-393);
  String xml=AFPChainXMLConverter.toXML(afpChain);
  System.out.println(xml);
}

Fixed version (ground truth):
@Test public void testCp() throws IOException, StructureException {
  Structure structure=cache.getStructure("String_Node_Str");
  String first=("String_Node_Str");
  String second=("String_Node_Str");
  int y=0;
  for (int i=0; i < second.length(); i++)   if (second.charAt(i) == '-' || Character.isLowerCase(second.charAt(i)))   y++;
  System.out.println("String_Node_Str" + y);
  AFPChain afpChain=FastaAFPChainConverter.cpFastaToAfpChain(first,second,structure,-393);
  String xml=AFPChainXMLConverter.toXML(afpChain);
  System.out.println(xml);
}
Program: 17001
Project: 17001
Buggy source:
/** 
 * @param afpChain
 * @param ca1
 * @param ca2
 * @param optLength
 * @param optLens
 * @param optAln
 * @return
 * @throws StructureException if an error occured during superposition
 */
public static AFPChain replaceOptAln(AFPChain afpChain,Atom[] ca1,Atom[] ca2,int blockNum,int[] optLens,int[][][] optAln) throws StructureException {
  int optLength=0;
  for (int blk=0; blk < blockNum; blk++) {
    optLength+=optLens[blk];
  }
  AFPChain refinedAFP=(AFPChain)afpChain.clone();
  refinedAFP.setOptLength(optLength);
  refinedAFP.setOptLen(optLens);
  refinedAFP.setOptAln(optAln);
  refinedAFP.setBlockNum(blockNum);
  Atom[] ca2clone=StructureTools.cloneCAArray(ca2);
  AlignmentTools.updateSuperposition(refinedAFP,ca1,ca2clone);
  AFPAlignmentDisplay.getAlign(refinedAFP,ca1,ca2clone);
  return refinedAFP;
}

Fixed version (ground truth):
/** 
 * @param afpChain
 * @param ca1
 * @param ca2
 * @param optLength
 * @param optLens
 * @param optAln
 * @return
 * @throws StructureException if an error occured during superposition
 */
public static AFPChain replaceOptAln(AFPChain afpChain,Atom[] ca1,Atom[] ca2,int blockNum,int[] optLens,int[][][] optAln) throws StructureException {
  int optLength=0;
  for (int blk=0; blk < blockNum; blk++) {
    optLength+=optLens[blk];
  }
  AFPChain refinedAFP=(AFPChain)afpChain.clone();
  refinedAFP.setOptLength(optLength);
  refinedAFP.setBlockSize(optLens);
  refinedAFP.setOptLen(optLens);
  refinedAFP.setOptAln(optAln);
  refinedAFP.setBlockNum(blockNum);
  Atom[] ca2clone=StructureTools.cloneCAArray(ca2);
  AlignmentTools.updateSuperposition(refinedAFP,ca1,ca2clone);
  AFPAlignmentDisplay.getAlign(refinedAFP,ca1,ca2clone);
  return refinedAFP;
}
Program: 17002
Project: 17002
Buggy source:
public void testOldSecOutput() throws Exception {
  String fileName="String_Node_Str";
  InputStream inStream=this.getClass().getResourceAsStream(fileName);
  assertNotNull("String_Node_Str" + fileName + "String_Node_Str",inStream);
  String xml=StringManipulationHelper.convertStreamToString(inStream);
  AtomCache cache=new AtomCache();
  String name1="String_Node_Str";
  String name2="String_Node_Str";
  Atom[] ca1=cache.getAtoms(name1);
  Atom[] ca2=cache.getAtoms(name2);
  AFPChain afpChainOrig=AFPChainXMLParser.fromXML(xml,ca1,ca2);
  afpChainOrig.setCalculationTime(-1);
  String xmlComp=AFPChainXMLConverter.toXML(afpChainOrig,ca1,ca2);
  StringManipulationTestsHelper.assertEqualsIgnoreEndline(xml,xmlComp);
  StructureAlignment ce=StructureAlignmentFactory.getAlgorithm(CeMain.algorithmName);
  AFPChain afpChainNew=ce.align(ca1,ca2);
  afpChainNew.setCalculationTime(-1);
  afpChainNew.setName1(name1);
  afpChainNew.setName2(name2);
  String xmlNew=AFPChainXMLConverter.toXML(afpChainNew,ca1,ca2);
  StringManipulationTestsHelper.assertEqualsIgnoreEndline(xml,xmlNew);
}

Fixed version (ground truth):
public void testOldSecOutput() throws Exception {
  ChemCompProvider ccprovorig=ChemCompGroupFactory.getChemCompProvider();
  if (!(ccprovorig instanceof DownloadChemCompProvider)) {
    ChemCompProvider ccprov=new DownloadChemCompProvider();
    ChemCompGroupFactory.setChemCompProvider(ccprov);
  }
  String fileName="String_Node_Str";
  InputStream inStream=this.getClass().getResourceAsStream(fileName);
  assertNotNull("String_Node_Str" + fileName + "String_Node_Str",inStream);
  String xml=StringManipulationHelper.convertStreamToString(inStream);
  AtomCache cache=new AtomCache();
  String name1="String_Node_Str";
  String name2="String_Node_Str";
  Atom[] ca1=cache.getAtoms(name1);
  Atom[] ca2=cache.getAtoms(name2);
  assertEquals(715,ca1.length);
  assertEquals(697,ca2.length);
  System.out.println("String_Node_Str");
  AFPChain afpChainOrig=AFPChainXMLParser.fromXML(xml,ca1,ca2);
  assertEquals("String_Node_Str",new String(afpChainOrig.getAlnseq1()));
  assertEquals("String_Node_Str",new String(afpChainOrig.getAlnseq2()));
  afpChainOrig.setCalculationTime(-1);
  assertEquals(720,afpChainOrig.getAlnLength());
  assertEquals(28,afpChainOrig.getGapLen());
  assertTrue(afpChainOrig.getIdentity() > 0.99);
  assertTrue(afpChainOrig.getIdentity() < 1.0);
  System.out.println("String_Node_Str");
  String xmlComp=AFPChainXMLConverter.toXML(afpChainOrig,ca1,ca2);
  StringManipulationTestsHelper.assertEqualsIgnoreEndline(xml,xmlComp);
  StructureAlignment ce=StructureAlignmentFactory.getAlgorithm(CeMain.algorithmName);
  System.out.println("String_Node_Str");
  AFPChain afpChainNew=ce.align(ca1,ca2);
  afpChainNew.setCalculationTime(-1);
  afpChainNew.setName1(name1);
  afpChainNew.setName2(name2);
  String xmlNew=AFPChainXMLConverter.toXML(afpChainNew,ca1,ca2);
  StringManipulationTestsHelper.assertEqualsIgnoreEndline(xml,xmlNew);
  ChemCompGroupFactory.setChemCompProvider(ccprovorig);
}
Program: 17003
Project: 17003
Buggy source:
/** 
 * Calculate the TM-Score for the superposition. <p>Citation:<br/> <i>Zhang Y and Skolnick J (2004). "Scoring function for automated assessment  of protein structure template quality". Proteins 57: 702 - 710.</i>
 * @param atomSet1 atom array 1
 * @param atomSet2 atom array 2
 * @param len1 The full length of the protein supplying atomSet1
 * @param len2 The full length of the protein supplying atomSet2
 * @return The TM-Score 
 * @throws StructureException
 */
public static double getTMScore(Atom[] atomSet1,Atom[] atomSet2,int len1,int len2) throws StructureException {
  if (atomSet1.length != atomSet2.length) {
    throw new StructureException("String_Node_Str");
  }
  if (atomSet1.length > len1) {
    throw new StructureException("String_Node_Str");
  }
  if (atomSet2.length > len2) {
    throw new StructureException("String_Node_Str");
  }
  int Lmin=Math.min(len1,len2);
  int Laln=atomSet1.length;
  double d0=1.24 * Math.cbrt(Lmin - 15.) - 1.8;
  double d0sq=d0 * d0;
  double sum=0;
  for (int i=0; i < Laln; i++) {
    double d=Calc.getDistance(atomSet1[i],atomSet2[i]);
    sum+=1. / (1 + d * d / d0sq);
  }
  return sum / Lmin;
}

Fixed version (ground truth):
/** 
 * Calculate the TM-Score for the superposition. Atom sets must be pre-rotated. <p>Citation:<br/> <i>Zhang Y and Skolnick J (2004). "Scoring function for automated assessment  of protein structure template quality". Proteins 57: 702 - 710.</i>
 * @param atomSet1 atom array 1
 * @param atomSet2 atom array 2
 * @param len1 The full length of the protein supplying atomSet1
 * @param len2 The full length of the protein supplying atomSet2
 * @return The TM-Score 
 * @throws StructureException
 */
public static double getTMScore(Atom[] atomSet1,Atom[] atomSet2,int len1,int len2) throws StructureException {
  if (atomSet1.length != atomSet2.length) {
    throw new StructureException("String_Node_Str");
  }
  if (atomSet1.length > len1) {
    throw new StructureException("String_Node_Str");
  }
  if (atomSet2.length > len2) {
    throw new StructureException("String_Node_Str");
  }
  int Lmin=Math.min(len1,len2);
  int Laln=atomSet1.length;
  double d0=1.24 * Math.cbrt(Lmin - 15.) - 1.8;
  double d0sq=d0 * d0;
  double sum=0;
  for (int i=0; i < Laln; i++) {
    double d=Calc.getDistance(atomSet1[i],atomSet2[i]);
    sum+=1. / (1 + d * d / d0sq);
  }
  return sum / Lmin;
}
Program: 17004
Project: 17004
Buggy source:
/** 
 * Calculate the RMS (root mean square) deviation of two sets of atoms.
 * @param atomSet1 atom array 1
 * @param atomSet2 atom array 2
 * @return the RMS of two atom sets
 * @throws StructureException
 */
public static double getRMS(Atom[] atomSet1,Atom[] atomSet2) throws StructureException {
  if (atomSet1.length != atomSet2.length) {
    throw new StructureException("String_Node_Str");
  }
  double sum=0.0;
  for (int i=0; i < atomSet1.length; i++) {
    double d=Calc.getDistance(atomSet1[i],atomSet2[i]);
    sum+=(d * d);
  }
  double avd=(sum / atomSet1.length);
  return Math.sqrt(avd);
}

Fixed version (ground truth):
/** 
 * Calculate the RMS (root mean square) deviation of two sets of atoms. Atom sets must be pre-rotated.
 * @param atomSet1 atom array 1
 * @param atomSet2 atom array 2
 * @return the RMS of two atom sets
 * @throws StructureException
 */
public static double getRMS(Atom[] atomSet1,Atom[] atomSet2) throws StructureException {
  if (atomSet1.length != atomSet2.length) {
    throw new StructureException("String_Node_Str");
  }
  double sum=0.0;
  for (int i=0; i < atomSet1.length; i++) {
    double d=Calc.getDistance(atomSet1[i],atomSet2[i]);
    sum+=(d * d);
  }
  double avd=(sum / atomSet1.length);
  return Math.sqrt(avd);
}
Program: 17007
Project: 17007
Buggy source:
public Structure getAsymUnit(String pdbId){
  if (s == null || (!s.getPDBCode().equalsIgnoreCase(pdbId))) {
    loadPDB(pdbId);
  }
  if (s.nrModels() > 1)   s=StructureTools.removeModels(s);
  return s;
}

Fixed version (ground truth):
public Structure getAsymUnit(String pdbId){
  if (s == null || (!s.getPDBCode().equalsIgnoreCase(pdbId))) {
    loadPDB(pdbId);
  }
  if (s.nrModels() > 1) {
    boolean isNMR=s.isNmr();
    s.setNmr(true);
    s=StructureTools.removeModels(s);
    s.setNmr(isNMR);
  }
  return s;
}
Program: 17011
Project: 17011
Buggy source:
public void run(){
  StructureAlignment algorithm=null;
  if (parent != null)   algorithm=parent.getStructureAlignment();
 else {
    algorithm=customAlgorithm;
  }
  job=new MultiThreadedDBSearch(name1,structure1,outFile,algorithm,nrCPUs,domainSplit);
  AtomCache cache=new AtomCache(config);
  System.out.println("String_Node_Str" + cache.getPath());
  job.setAtomCache(cache);
  if (name1.equals("String_Node_Str")) {
    job.setCustomFile1(parent.getDBSearch().getPDBUploadPanel().getFilePath1());
    job.setCustomChain1(parent.getDBSearch().getPDBUploadPanel().getChain1());
  }
  job.run();
  File resultList=job.getResultFile();
  if (parent != null) {
    parent.notifyCalcFinished();
    if (resultList != null) {
      DBResultTable table=new DBResultTable();
      table.show(resultList,config);
    }
  }
}

Fixed version (ground truth):
public void run(){
  StructureAlignment algorithm=null;
  if (parent != null)   algorithm=parent.getStructureAlignment();
 else {
    algorithm=customAlgorithm;
  }
  if (name1.startsWith("String_Node_Str"))   name1="String_Node_Str";
  job=new MultiThreadedDBSearch(name1,structure1,outFile,algorithm,nrCPUs,domainSplit);
  AtomCache cache=new AtomCache(config);
  System.out.println("String_Node_Str" + cache.getPath());
  System.out.println("String_Node_Str" + name1);
  System.out.println("String_Node_Str" + structure1.getName());
  job.setAtomCache(cache);
  if (name1.equals("String_Node_Str")) {
    job.setCustomFile1(parent.getDBSearch().getPDBUploadPanel().getFilePath1());
    job.setCustomChain1(parent.getDBSearch().getPDBUploadPanel().getChain1());
  }
  job.run();
  File resultList=job.getResultFile();
  if (parent != null) {
    parent.notifyCalcFinished();
    if (resultList != null) {
      DBResultTable table=new DBResultTable();
      table.show(resultList,config);
    }
  }
}
Program: 17014
Project: 17014
Buggy source:
/** 
 * #=GR <seqname> <feature> <Generic per-Residue annotation, exactly 1 char per residue>
 * @param line the line to be parsed
 */
private void handleResidueAnnotation(String seqName,String featureName,String value){
  if (featureName.equals(GR_SURFACE_ACCESSIBILITY)) {
    stockholmStructure.addSurfaceAccessibility(seqName,value);
  }
 else   if (featureName.equals(GR_TRANS_MEMBRANE)) {
    stockholmStructure.addTransMembrane(seqName,value);
  }
 else   if (featureName.equals(GR_POSTERIOR_PROBABILITY)) {
    stockholmStructure.addPosteriorProbability(seqName,value);
  }
 else   if (featureName.equals(GR_LIGAND_BINDING)) {
    stockholmStructure.addLigandBinding(seqName,value);
  }
 else   if (featureName.equals(GR_ACTIVE_SITE)) {
    stockholmStructure.addActiveSite(seqName,value);
  }
 else   if (featureName.equals(GR_AS_PFAM_PREDICTED)) {
    stockholmStructure.addASPFamPredicted(seqName,value);
  }
 else   if (featureName.equals(GR_AS_SWISSPROT)) {
    stockholmStructure.addASSwissProt(seqName,value);
  }
 else   if (featureName.equals(GR_INTRON)) {
    stockholmStructure.addIntron(seqName,value);
  }
 else   if (featureName.equals(GR_SECONDARY_STRUCTURE)) {
    stockholmStructure.addSecondaryStructure(seqName,value);
  }
 else {
    System.err.println("String_Node_Str" + featureName + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * #=GR &lt;seqname&gt; &lt;feature&gt; &lt;Generic per-Residue annotation, exactly 1 char per residue&gt;
 * @param line the line to be parsed
 */
private void handleResidueAnnotation(String seqName,String featureName,String value){
  if (featureName.equals(GR_SURFACE_ACCESSIBILITY)) {
    stockholmStructure.addSurfaceAccessibility(seqName,value);
  }
 else   if (featureName.equals(GR_TRANS_MEMBRANE)) {
    stockholmStructure.addTransMembrane(seqName,value);
  }
 else   if (featureName.equals(GR_POSTERIOR_PROBABILITY)) {
    stockholmStructure.addPosteriorProbability(seqName,value);
  }
 else   if (featureName.equals(GR_LIGAND_BINDING)) {
    stockholmStructure.addLigandBinding(seqName,value);
  }
 else   if (featureName.equals(GR_ACTIVE_SITE)) {
    stockholmStructure.addActiveSite(seqName,value);
  }
 else   if (featureName.equals(GR_AS_PFAM_PREDICTED)) {
    stockholmStructure.addASPFamPredicted(seqName,value);
  }
 else   if (featureName.equals(GR_AS_SWISSPROT)) {
    stockholmStructure.addASSwissProt(seqName,value);
  }
 else   if (featureName.equals(GR_INTRON)) {
    stockholmStructure.addIntron(seqName,value);
  }
 else   if (featureName.equals(GR_SECONDARY_STRUCTURE)) {
    stockholmStructure.addSecondaryStructure(seqName,value);
  }
 else {
    System.err.println("String_Node_Str" + featureName + "String_Node_Str");
  }
}
Program: 17015
Project: 17015
Buggy source:
/** 
 * Handles a line that corresponds to a sequence. <br> e.g.: COATB_BPIKE/30-81 AEPNAATNYATEAMDSLKTQAIDLISQTWPVVTTVVVAGLVIRLFKKFSSKA <b>Warning: This function seems to fail when dealing with sequence with intrinsic space</b>
 * @param line the line to be parsed
 * @throws Exception
 */
private void handleSequenceLine(String line) throws ParserException {
  String[] lineContent=line.split("String_Node_Str");
  if (lineContent.length != 2) {
    throw new ParserException("String_Node_Str" + line);
  }
  stockholmStructure.addSequence(lineContent[0],lineContent[1]);
}

Fixed version (ground truth):
/** 
 * Handles a line that corresponds to a sequence. <br> e.g.: COATB_BPIKE/30-81 AEPNAATNYATEAMDSLKTQAIDLISQTWPVVTTVVVAGLVIRLFKKFSSKA<br> N.B.: This function can't tolerate sequences with intrinsic white space.
 * @param line the line to be parsed
 * @throws Exception
 */
private void handleSequenceLine(String line) throws ParserException {
  String[] lineContent=line.split("String_Node_Str");
  if (lineContent.length != 2) {
    throw new ParserException("String_Node_Str" + line);
  }
  stockholmStructure.addSequence(lineContent[0],lineContent[1]);
}
Program: 17016
Project: 17016
Buggy source:
/** 
 * Get HashMap of user data. Each Feature object has a Java HashMap object which can be used to annotate the Feature. JavaGene does not use or interpret the keys or values. The values can be any subtype of the Java Object class. <br><br> If a Feature is constructed from data fields, the initial HashMap has no mappings (is empty). If a Feature is constructed from another Feature, a copy of the mappings is made. Note that the Objects in the copied mapping are shared, even though the mapping itself is copied (not shared). Thus removing or adding a mapping to one Feature will not affect the other, but changing an Object which is part of an established mapping may affect both Features.
 * @return The user HashMap.
 */
public HashMap<String,Object> userData(){
  return mUserMap;
}

Fixed version (ground truth):
/** 
 * Get HashMap of user data. Each Feature object has a Java HashMap object which can be used to annotate the Feature. JavaGene does not use or interpret the keys or values. The values can be any subtype of the Java Object class. <br><br> If a Feature is constructed from data fields, the initial HashMap has no mappings (is empty). If a Feature is constructed from another Feature, a copy of the mappings is made. Note that the Objects in the copied mapping are shared, even though the mapping itself is copied (not shared). Thus removing or adding a mapping to one Feature will not affect the other, but changing an Object which is part of an established mapping may affect both Features.
 * @return The user HashMap.
 */
public HashMap<String,String> userData(){
  return mUserMap;
}
Program: 17017
Project: 17017
Buggy source:
/** 
 * Construct a new Feature from raw data (usually a GFF row).
 * @param seqname The sequence name field (field 1).
 * @param source The source or method field (field 2).
 * @param type The type of feature field (field 3).
 * @param location The location of the feature. (calculated from GFF start, end and strand fields).
 * @param score The score field (field 7).
 * @param frame The frame or phase field (field 8).
 * @param attributes A string of key/value pairs separated by semicolons (field 9).
 */
public Feature(String seqname,String source,String type,Location location,Double score,int frame,String attributes){
  mSeqname=seqname;
  mSource=source;
  mType=type;
  mLocation=location;
  mScore=score;
  mFrame=frame;
  mAttributes=attributes;
  initAttributeHashMap();
  mUserMap=new HashMap<String,Object>();
}

Fixed version (ground truth):
/** 
 * Construct a new Feature from raw data (usually a GFF row).
 * @param seqname The sequence name field (field 1).
 * @param source The source or method field (field 2).
 * @param type The type of feature field (field 3).
 * @param location The location of the feature. (calculated from GFF start, end and strand fields).
 * @param score The score field (field 7).
 * @param frame The frame or phase field (field 8).
 * @param attributes A string of key/value pairs separated by semicolons (field 9).
 */
public Feature(String seqname,String source,String type,Location location,Double score,int frame,String attributes){
  mSeqname=seqname;
  mSource=source;
  mType=type;
  mLocation=location;
  mScore=score;
  mFrame=frame;
  mAttributes=attributes;
  initAttributeHashMap();
  mUserMap=new HashMap<String,String>();
}
Program: 17018
Project: 17018
Buggy source:
/** 
 * Get HashMap of user data.
 * @return The user HashMap.
 */
public HashMap<String,Object> userData();

Fixed version (ground truth):
/** 
 * Get HashMap of user data.
 * @return The user HashMap.
 */
public HashMap<String,String> userData();
Program: 17019
Project: 17019
Buggy source:
private void readMatrix(String line){
  String pos=line.substring(18,19);
  int i=Integer.parseInt(pos);
  String index=line.substring(21,24 + correct).trim();
  int id=Integer.parseInt(index);
  if (id != currentIndex) {
    addNewMatrix();
    currentIndex=id;
    currentMatrix=Matrix.identity(3,3);
    shift=new double[3];
  }
  String x=line.substring(24 + correct,33 + correct);
  String y=line.substring(34 + correct,43 + correct);
  String z=line.substring(44 + correct,53 + correct);
  String vec=line.substring(58 + correct,line.length()).trim();
  currentMatrix.set(0,(i - 1),Float.parseFloat(x));
  currentMatrix.set(1,(i - 1),Float.parseFloat(y));
  currentMatrix.set(2,(i - 1),Float.parseFloat(z));
  shift[i - 1]=Float.parseFloat(vec);
}

Fixed version (ground truth):
private void readMatrix(String line){
  System.out.println(line);
  String pos=line.substring(18,19);
  int i=Integer.parseInt(pos);
  String index=line.substring(21,24 + correct).trim();
  int id=Integer.parseInt(index);
  if (id != currentIndex) {
    addNewMatrix();
    currentIndex=id;
    currentMatrix=Matrix.identity(3,3);
    shift=new double[3];
  }
  String x=line.substring(24 + correct,33 + correct);
  String y=line.substring(34 + correct,43 + correct);
  String z=line.substring(44 + correct,53 + correct);
  String vec=line.substring(58 + correct,line.length()).trim();
  currentMatrix.set(0,(i - 1),Float.parseFloat(x));
  currentMatrix.set(1,(i - 1),Float.parseFloat(y));
  currentMatrix.set(2,(i - 1),Float.parseFloat(z));
  shift[i - 1]=Float.parseFloat(vec);
}
Program: 17020
Project: 17020
Buggy source:
/** 
 * See here for the current spec: http://www.wwpdb.org/documentation/format33/remarks2.html
 * @param line
 */
public void pdb_REMARK_350_Handler(String line){
  if (line.startsWith("String_Node_Str")) {
    String nr=line.substring(24,line.length()).trim();
    if (currentBioMolecule != null) {
      finalizeCurrentBioMolecule();
    }
    currentBioMolecule=Integer.parseInt(nr);
    currentIndex=1;
  }
 else   if (line.startsWith("String_Node_Str")) {
    addToCurrentChainList(line);
  }
 else   if (line.startsWith("String_Node_Str")) {
    addToCurrentChainList(line);
  }
 else   if (line.startsWith("String_Node_Str")) {
    readMatrix(line);
  }
}

Fixed version (ground truth):
/** 
 * See here for the current spec: http://www.wwpdb.org/documentation/format33/remarks2.html
 * @param line
 */
public void pdb_REMARK_350_Handler(String line){
  if (line.startsWith("String_Node_Str")) {
    String nr=line.substring(24,line.length()).trim();
    if (currentBioMolecule != null) {
      finalizeCurrentBioMolecule();
    }
    currentBioMolecule=Integer.parseInt(nr);
    currentIndex=1;
  }
 else   if (line.startsWith("String_Node_Str")) {
    System.out.println("String_Node_Str" + currentChainIDs.size() + "String_Node_Str"+ line);
    if (currentChainIDs.size() > 0) {
      addNewMatrix();
      currentChainIDs.clear();
      currentIndex++;
    }
    addToCurrentChainList(line);
  }
 else   if (line.startsWith("String_Node_Str")) {
    addToCurrentChainList(line);
  }
 else   if (line.startsWith("String_Node_Str")) {
    readMatrix(line);
  }
}
Program: 17021
Project: 17021
Buggy source:
private void addNewMatrix(){
  ModelTransformationMatrix max=new ModelTransformationMatrix();
  max.setMatrix(currentMatrix);
  max.setVector(shift);
  max.id=currentIndex + "String_Node_Str";
  for (  String chainId : currentChainIDs) {
    ModelTransformationMatrix m=(ModelTransformationMatrix)max.clone();
    m.setNdbChainId(chainId);
    transformations.add(m);
  }
  currentMatrix=new Matrix(3,3);
  shift=new double[3];
  if (currentIndex == 999) {
    correct+=1;
  }
}

Fixed version (ground truth):
private void addNewMatrix(){
  System.out.println("String_Node_Str" + currentIndex + "String_Node_Str"+ currentChainIDs);
  ModelTransformationMatrix max=new ModelTransformationMatrix();
  max.setMatrix(currentMatrix);
  max.setVector(shift);
  max.id=currentIndex + "String_Node_Str";
  for (  String chainId : currentChainIDs) {
    ModelTransformationMatrix m=(ModelTransformationMatrix)max.clone();
    m.setNdbChainId(chainId);
    transformations.add(m);
  }
  currentMatrix=new Matrix(3,3);
  shift=new double[3];
  if (currentIndex == 999) {
    correct+=1;
  }
}
Program: 17022
Project: 17022
Buggy source:
public void finalizeCurrentBioMolecule(){
  addNewMatrix();
  transformationMap.put(currentBioMolecule,transformations);
  transformations=new ArrayList<ModelTransformationMatrix>();
  currentChainIDs.clear();
}

Fixed version (ground truth):
public void finalizeCurrentBioMolecule(){
  System.out.println("String_Node_Str" + currentBioMolecule);
  addNewMatrix();
  transformationMap.put(currentBioMolecule,transformations);
  transformations=new ArrayList<ModelTransformationMatrix>();
  System.out.println("String_Node_Str" + currentBioMolecule + "String_Node_Str"+ currentChainIDs);
  currentChainIDs.clear();
}
Program: 17023
Project: 17023
Buggy source:
private void init(){
  operatorResolver=new OperatorResolver();
  modelTransformations=new ArrayList<ModelTransformationMatrix>(1);
  asymIds=new ArrayList<String>();
}

Fixed version (ground truth):
private void init(){
  operatorResolver=new OperatorResolver();
  modelTransformations=new ArrayList<ModelTransformationMatrix>(1);
}
Program: 17024
Project: 17024
Buggy source:
public Structure rebuildQuaternaryStructure(Structure asymUnit,List<ModelTransformationMatrix> transformations){
  Structure s=asymUnit.clone();
  List<Chain> transformedChains=new ArrayList<Chain>();
  System.out.print("String_Node_Str" + s.getPDBCode() + "String_Node_Str");
  for (  Chain c : s.getChains()) {
    System.out.print(c.getChainID());
    if (c.getInternalChainID() != null) {
      System.out.print("String_Node_Str" + c.getInternalChainID() + "String_Node_Str");
    }
  }
  for (  ModelTransformationMatrix max : transformations) {
    boolean foundChain=false;
    for (    Chain c : s.getChains()) {
      String intChainID=c.getInternalChainID();
      if (intChainID == null) {
        System.err.println("String_Node_Str" + c.getChainID() + "String_Node_Str"+ max.ndbChainId+ "String_Node_Str");
        intChainID=c.getChainID();
      }
      if (max.ndbChainId.equals(intChainID)) {
        foundChain=true;
        Chain newChain=(Chain)c.clone();
        Matrix m=max.getMatrix();
        double[] vector=max.getVector();
        Atom v=new AtomImpl();
        v.setCoords(vector);
        for (        Group g : newChain.getAtomGroups()) {
          for (          Atom a : g.getAtoms()) {
            Calc.rotate(a,m);
            Calc.shift(a,v);
          }
        }
        transformedChains.add(newChain);
      }
    }
    if (!foundChain) {
      System.err.println("String_Node_Str" + max.ndbChainId);
    }
  }
  s.setChains(transformedChains);
  return s;
}

Fixed version (ground truth):
public Structure rebuildQuaternaryStructure(Structure asymUnit,List<ModelTransformationMatrix> transformations){
  Structure s=asymUnit.clone();
  List<Chain> transformedChains=new ArrayList<Chain>();
  for (  ModelTransformationMatrix max : transformations) {
    boolean foundChain=false;
    for (    Chain c : s.getChains()) {
      String intChainID=c.getInternalChainID();
      if (intChainID == null) {
        System.err.println("String_Node_Str" + c.getChainID() + "String_Node_Str"+ max.ndbChainId+ "String_Node_Str");
        intChainID=c.getChainID();
      }
      if (max.ndbChainId.equals(intChainID)) {
        foundChain=true;
        Chain newChain=(Chain)c.clone();
        Matrix m=max.getMatrix();
        double[] vector=max.getVector();
        Atom v=new AtomImpl();
        v.setCoords(vector);
        for (        Group g : newChain.getAtomGroups()) {
          for (          Atom a : g.getAtoms()) {
            Calc.rotate(a,m);
            Calc.shift(a,v);
          }
        }
        transformedChains.add(newChain);
      }
    }
    if (!foundChain) {
      System.err.println("String_Node_Str" + max.ndbChainId);
    }
  }
  s.setChains(transformedChains);
  return s;
}
Program: 17025
Project: 17025
Buggy source:
private ArrayList<ModelTransformationMatrix> getBioUnitTransformationsListUnaryOperators(){
  ArrayList<ModelTransformationMatrix> transformations=new ArrayList<ModelTransformationMatrix>();
  List<String> operators=operatorResolver.getUnaryOperators();
  for (  String chainId : asymIds) {
    for (    String operator : operators) {
      ModelTransformationMatrix original=getModelTransformationMatrix(operator);
      ModelTransformationMatrix transform=new ModelTransformationMatrix(original);
      transform.ndbChainId=chainId;
      transform.id=operator;
      transformations.add(transform);
    }
  }
  return transformations;
}

Fixed version (ground truth):
private ArrayList<ModelTransformationMatrix> getBioUnitTransformationsListUnaryOperators(String assemblyId){
  ArrayList<ModelTransformationMatrix> transformations=new ArrayList<ModelTransformationMatrix>();
  for (  PdbxStructAssemblyGen psag : psags) {
    if (psag.getAssembly_id().equals(assemblyId)) {
      operatorResolver.parseOperatorExpressionString(psag.getOper_expression());
      List<String> operators=operatorResolver.getUnaryOperators();
      List<String> asymIds=Arrays.asList(psag.getAsym_id_list().split("String_Node_Str"));
      for (      String chainId : asymIds) {
        for (        String operator : operators) {
          ModelTransformationMatrix original=getModelTransformationMatrix(operator);
          ModelTransformationMatrix transform=new ModelTransformationMatrix(original);
          transform.ndbChainId=chainId;
          transform.id=operator;
          transformations.add(transform);
        }
      }
    }
  }
  System.out.println("String_Node_Str" + assemblyId + "String_Node_Str"+ transformations.size());
  return transformations;
}