Program: 17167
Project: 17167
Buggy source:
private static void showFatcat(String serverLocation,Chain c1,Chain c2,String name1,String name2) throws StructureException {
  JFrame tmpFrame=new JFrame();
  tmpFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  showProgressBar(tmpFrame,"String_Node_Str","String_Node_Str");
  StructureAlignment fatCatRigid=StructureAlignmentFactory.getAlgorithm("String_Node_Str");
  Atom[] ca1=StructureTools.getAtomCAArray(c1);
  Atom[] ca2=StructureTools.getAtomCAArray(c2);
  AFPChain afpChain=null;
  try {
    afpChain=JFatCatClient.getAFPChainFromServer(serverLocation,name1,name2,ca1,ca2);
    if (afpChain != null) {
      System.out.println("String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str");
      afpChain=fatCatRigid.align(ca1,ca2);
      afpChain.setName1(name1);
      afpChain.setName2(name2);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  if (afpChain == null) {
    afpChain=fatCatRigid.align(ca1,ca2);
    afpChain.setName1(name1);
    afpChain.setName2(name2);
  }
  tmpFrame.dispose();
  List<Group> hetatms=c1.getAtomGroups("String_Node_Str");
  List<Group> nucs=c1.getAtomGroups("String_Node_Str");
  List<Group> hetatms2=new ArrayList<Group>();
  List<Group> nucs2=new ArrayList<Group>();
  System.out.println("String_Node_Str" + afpChain.getAlgorithmName() + "String_Node_Str"+ afpChain.getVersion());
  if ((afpChain.getBlockNum() - 1) == 0) {
    hetatms2=c2.getAtomGroups("String_Node_Str");
    nucs2=c2.getAtomGroups("String_Node_Str");
  }
  StructureAlignmentJmol jmol=StructureAlignmentDisplay.display(afpChain,ca1,ca2,hetatms,nucs,hetatms2,nucs2);
  DisplayAFP.showAlignmentImage(afpChain,ca1,ca2,jmol);
}

Fixed version (ground truth):
private static void showFatcat(String serverLocation,Chain c1,Chain c2,String name1,String name2) throws StructureException {
  JFrame tmpFrame=new JFrame();
  tmpFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  showProgressBar(tmpFrame,"String_Node_Str","String_Node_Str");
  StructureAlignment fatCatRigid=StructureAlignmentFactory.getAlgorithm("String_Node_Str");
  Atom[] ca1=StructureTools.getAtomCAArray(c1);
  Atom[] ca2=StructureTools.getAtomCAArray(c2);
  AFPChain afpChain=null;
  try {
    afpChain=JFatCatClient.getAFPChainFromServer(serverLocation,name1,name2,ca1,ca2);
    if (afpChain != null) {
    }
 else {
      System.out.println("String_Node_Str");
      afpChain=fatCatRigid.align(ca1,ca2);
      afpChain.setName1(name1);
      afpChain.setName2(name2);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  if (afpChain == null) {
    afpChain=fatCatRigid.align(ca1,ca2);
    afpChain.setName1(name1);
    afpChain.setName2(name2);
  }
  tmpFrame.dispose();
  JFatCatProxy proxy=new JFatCatProxy();
  proxy.setStructureAlignment(fatCatRigid);
  Group[] twistedGroups=proxy.twistGroups(afpChain,ca1,ca2);
  List<Group> hetatms=ca1[0].getParent().getParent().getAtomGroups("String_Node_Str");
  List<Group> nucs=ca1[0].getParent().getParent().getAtomGroups("String_Node_Str");
  List<Group> hetatms2=new ArrayList<Group>();
  List<Group> nucs2=new ArrayList<Group>();
  if ((afpChain.getBlockNum() - 1) == 0) {
    hetatms2=ca2[0].getParent().getParent().getAtomGroups("String_Node_Str");
    nucs2=ca2[0].getParent().getParent().getAtomGroups("String_Node_Str");
  }
  StructureAlignmentJmol jmol=DisplayAFP.display(afpChain,twistedGroups,ca1,ca2,hetatms,nucs,hetatms2,nucs2);
  DisplayAFP.showAlignmentImage(afpChain,ca1,ca2,jmol);
}