Program: 17152
Project: 17152
Buggy source:
public static void main(String[] args){
  String pdb1="String_Node_Str";
  String pdb2="String_Node_Str";
  try {
    AtomCache cache=new AtomCache("String_Node_Str",true);
    Atom[] ca1=cache.getAtoms(pdb1);
    Atom[] ca2=cache.getAtoms(pdb2);
    CeMain ceMain;
    ceMain=(CeMain)StructureAlignmentFactory.getAlgorithm(CeMain.algorithmName);
    ((CeParameters)ceMain.getParameters()).setMaxGapSize(0);
    AFPChain align=ceMain.align(ca1,ca2);
    System.out.println(align.toCE(ca1,ca2));
    Atom[] ca1aligned=new Atom[align.getOptLength()];
    Atom[] ca2aligned=new Atom[align.getOptLength()];
    int pos=0;
    int[] blockLens=align.getOptLen();
    int[][][] optAln=align.getOptAln();
    for (int block=0; block < optAln.length; block++) {
      assert(blockLens[block] == optAln[block][0].length);
      for (int i=0; i < optAln[block][0].length; i++) {
        ca1aligned[pos]=ca1[optAln[block][0][i]];
        ca2aligned[pos]=(Atom)ca2[optAln[block][1][i]].clone();
        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);
    }
    System.out.println(SVDSuperimposer.getRMS(ca1aligned,ca2aligned));
    System.out.println(matrix.toString());
    System.out.println(shift.toString());
    PrintWriter pw1=new PrintWriter(new FileWriter("String_Node_Str"));
    Structure s1=ca1[0].getParent().getParent().getParent();
    pw1.println(s1.toPDB());
    pw1.close();
    PrintWriter pw2=new PrintWriter(new FileWriter("String_Node_Str"));
    Structure s2=ca2[0].getParent().getParent().getParent();
    pw2.println(s2.toPDB());
    pw2.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  String pdb1="String_Node_Str";
  String pdb2="String_Node_Str";
  try {
    AtomCache cache=new AtomCache("String_Node_Str",true);
    Atom[] ca1=cache.getAtoms(pdb1);
    Atom[] ca2=cache.getAtoms(pdb2);
    CeMain ceMain;
    ceMain=(CeMain)StructureAlignmentFactory.getAlgorithm(CeMain.algorithmName);
    ((CeParameters)ceMain.getParameters()).setMaxGapSize(0);
    AFPChain align=ceMain.align(ca1,ca2);
    System.out.println(align.toCE(ca1,ca2));
    Atom[] ca1aligned=new Atom[align.getOptLength()];
    Atom[] ca2aligned=new Atom[align.getOptLength()];
    int pos=0;
    int[] blockLens=align.getOptLen();
    int[][][] optAln=align.getOptAln();
    for (int block=0; block < optAln.length; 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++;
      }
    }
    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);
    }
    System.out.println(SVDSuperimposer.getRMS(ca1aligned,ca2aligned));
    System.out.println(matrix.toString());
    System.out.println(shift.toString());
    PrintWriter pw1=new PrintWriter(new FileWriter("String_Node_Str"));
    Structure s1=ca1[0].getParent().getParent().getParent();
    pw1.println(s1.toPDB());
    pw1.close();
    PrintWriter pw2=new PrintWriter(new FileWriter("String_Node_Str"));
    Structure s2=ca2[0].getParent().getParent().getParent();
    pw2.println(s2.toPDB());
    pw2.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}