Program: 16517
Project: 16517
Buggy source:
private boolean mapChains(List<Group> seqResGroups,List<Group> atomRes,SequencePair<ProteinSequence,AminoAcidCompound> pair,Map<Integer,Integer> seqresIndexPosition,Map<Integer,Integer> atomIndexPosition){
  int aligLength=pair.getLength();
  boolean noMatchFound=true;
  Compound gapSymbol=AminoAcidCompoundSet.getAminoAcidCompoundSet().getCompoundForString("String_Node_Str");
  mainLoop:   for (int i=1; i <= aligLength; i++) {
    Compound s=pair.getCompoundAt(1,i);
    Compound a=pair.getCompoundAt(2,i);
    int posSeq=pair.getIndexInQueryAt(i) - 1;
    int posAtom=pair.getIndexInTargetAt(i) - 1;
    if (s.equals(gapSymbol) || a.equals(gapSymbol)) {
      continue;
    }
    if (s.equals(a)) {
      Group s1=seqResGroups.get(seqresIndexPosition.get(posSeq));
      Group a1=atomRes.get(atomIndexPosition.get(posAtom));
      if (s1 == null || a1 == null) {
        logger.warn("String_Node_Str" + i + "String_Node_Str"+ s+ "String_Node_Str"+ posSeq+ "String_Node_Str"+ s1+ "String_Node_Str"+ posAtom+ "String_Node_Str"+ a1);
        continue mainLoop;
      }
      String pdbNameS=s1.getPDBName();
      String pdbNameA=a1.getPDBName();
      if (pdbNameS == null || pdbNameA == null) {
        logger.warn("String_Node_Str",posSeq,s1,a1,posAtom);
        logger.warn("String_Node_Str");
        return true;
      }
      if (!pdbNameA.equals(pdbNameS)) {
        if (!pdbNameA.trim().equals(pdbNameS.trim())) {
          logger.info(s1 + "String_Node_Str" + posSeq+ "String_Node_Str"+ a1+ "String_Node_Str"+ posAtom+ "String_Node_Str"+ s+ "String_Node_Str"+ a);
          if (s1.getType().equals(HetatomImpl.type) && a1.getType().equals(HetatomImpl.type)) {
            logger.info("String_Node_Str");
          }
 else {
            logger.warn("String_Node_Str",s1,a1);
          }
        }
      }
      seqResGroups.set(seqresIndexPosition.get(posSeq),a1);
      noMatchFound=false;
    }
  }
  if (noMatchFound) {
    logger.debug("String_Node_Str");
  }
  return noMatchFound;
}

Fixed version (ground truth):
private boolean mapChains(List<Group> seqResGroups,List<Group> atomRes,SequencePair<ProteinSequence,AminoAcidCompound> pair,Map<Integer,Integer> seqresIndexPosition,Map<Integer,Integer> atomIndexPosition){
  int aligLength=pair.getLength();
  boolean noMatchFound=true;
  Compound gapSymbol=AminoAcidCompoundSet.getAminoAcidCompoundSet().getCompoundForString("String_Node_Str");
  mainLoop:   for (int i=1; i <= aligLength; i++) {
    Compound s=pair.getCompoundAt(1,i);
    Compound a=pair.getCompoundAt(2,i);
    int posSeq=pair.getIndexInQueryAt(i) - 1;
    int posAtom=pair.getIndexInTargetAt(i) - 1;
    if (s.equals(gapSymbol) || a.equals(gapSymbol)) {
      continue;
    }
    if (s.equals(a)) {
      Group s1=seqResGroups.get(seqresIndexPosition.get(posSeq));
      Group a1=atomRes.get(atomIndexPosition.get(posAtom));
      if (s1 == null || a1 == null) {
        logger.warn("String_Node_Str" + i + "String_Node_Str"+ s+ "String_Node_Str"+ posSeq+ "String_Node_Str"+ s1+ "String_Node_Str"+ posAtom+ "String_Node_Str"+ a1);
        continue mainLoop;
      }
      String pdbNameS=s1.getPDBName();
      String pdbNameA=a1.getPDBName();
      if (pdbNameS == null || pdbNameA == null) {
        logger.warn("String_Node_Str",posSeq,s1,a1,posAtom);
        logger.warn("String_Node_Str");
        return true;
      }
      if (!pdbNameA.trim().equals(pdbNameS.trim())) {
        String msg="String_Node_Str" + s1 + "String_Node_Str"+ posSeq+ "String_Node_Str"+ a1+ "String_Node_Str"+ posAtom+ "String_Node_Str"+ s+ "String_Node_Str"+ a;
        if (s1.getType().equals(HetatomImpl.type) && a1.getType().equals(HetatomImpl.type)) {
          logger.info(msg + "String_Node_Str");
        }
 else {
          logger.warn(msg + "String_Node_Str");
        }
      }
      seqResGroups.set(seqresIndexPosition.get(posSeq),a1);
      noMatchFound=false;
    }
  }
  if (noMatchFound) {
    logger.debug("String_Node_Str");
  }
  return noMatchFound;
}