Program: 16426
Project: 16426
Buggy source:
private static void demoContacts(String pdbCode) throws IOException, StructureException {
  AtomCache cache=new AtomCache();
  cache.setUseMmCif(true);
  StructureIO.setAtomCache(cache);
  Structure structure=StructureIO.getStructure(pdbCode);
  Chain chain=structure.getChainByPDB("String_Node_Str");
  String[] atoms={"String_Node_Str"};
  AtomContactSet contacts=StructureTools.getAtomsInContact(chain,atoms,8.0);
  System.out.println("String_Node_Str");
  for (  AtomContact contact : contacts) {
    Atom atom1=contact.getPair().getFirst();
    Atom atom2=contact.getPair().getSecond();
    System.out.printf("String_Node_Str",atom1.getGroup().getResidueNumber(),atom1.getGroup().getPDBName(),atom2.getGroup().getResidueNumber(),atom2.getGroup().getPDBName(),contact.getDistance());
  }
  System.out.println("String_Node_Str" + contacts.size());
  GroupContactSet groupContacts=new GroupContactSet(contacts);
  System.out.println("String_Node_Str" + groupContacts.size());
  contacts=StructureTools.getAtomsInContact(structure.getChain(0),structure.getChain(1),5.5,false);
  System.out.println("String_Node_Str");
  for (  AtomContact contact : contacts) {
    Atom atom1=contact.getPair().getFirst();
    Atom atom2=contact.getPair().getSecond();
    System.out.printf("String_Node_Str",atom1.getGroup().getResidueNumber(),atom1.getGroup().getChainId(),atom1.getGroup().getPDBName(),atom1.getName(),atom2.getGroup().getResidueNumber(),atom2.getGroup().getChainId(),atom2.getGroup().getPDBName(),atom2.getName(),contact.getDistance());
  }
  System.out.println("String_Node_Str" + contacts.size());
  groupContacts=new GroupContactSet(contacts);
  System.out.println("String_Node_Str" + groupContacts.size());
}

Fixed version (ground truth):
private static void demoContacts(String pdbCode) throws IOException, StructureException {
  AtomCache cache=new AtomCache();
  cache.setUseMmCif(true);
  StructureIO.setAtomCache(cache);
  Structure structure=StructureIO.getStructure(pdbCode);
  Chain chain=structure.getPolyChainByPDB("String_Node_Str");
  String[] atoms={"String_Node_Str"};
  AtomContactSet contacts=StructureTools.getAtomsInContact(chain,atoms,8.0);
  System.out.println("String_Node_Str");
  for (  AtomContact contact : contacts) {
    Atom atom1=contact.getPair().getFirst();
    Atom atom2=contact.getPair().getSecond();
    System.out.printf("String_Node_Str",atom1.getGroup().getResidueNumber(),atom1.getGroup().getPDBName(),atom2.getGroup().getResidueNumber(),atom2.getGroup().getPDBName(),contact.getDistance());
  }
  System.out.println("String_Node_Str" + contacts.size());
  GroupContactSet groupContacts=new GroupContactSet(contacts);
  System.out.println("String_Node_Str" + groupContacts.size());
  contacts=StructureTools.getAtomsInContact(structure.getChain(0),structure.getChain(1),5.5,false);
  System.out.println("String_Node_Str");
  for (  AtomContact contact : contacts) {
    Atom atom1=contact.getPair().getFirst();
    Atom atom2=contact.getPair().getSecond();
    System.out.printf("String_Node_Str",atom1.getGroup().getResidueNumber(),atom1.getGroup().getChainId(),atom1.getGroup().getPDBName(),atom1.getName(),atom2.getGroup().getResidueNumber(),atom2.getGroup().getChainId(),atom2.getGroup().getPDBName(),atom2.getName(),contact.getDistance());
  }
  System.out.println("String_Node_Str" + contacts.size());
  groupContacts=new GroupContactSet(contacts);
  System.out.println("String_Node_Str" + groupContacts.size());
}