Program: 16854
Project: 16854
Buggy source:
private boolean mapDNAChains(List<Group> seqResGroups,List<Group> atomRes,SequencePair<DNASequence,NucleotideCompound> pair,Map<Integer,Integer> seqresIndexPosition,Map<Integer,Integer> atomIndexPosition){
  int aligLength=pair.getLength();
  boolean noMatchFound=true;
  Compound gapSymbol=DNACompoundSet.getDNACompoundSet().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 + "String_Node_Str"+ s1+ "String_Node_Str"+ a1+ "String_Node_Str"+ posAtom);
        logger.warn("String_Node_Str");
      }
      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 + "String_Node_Str"+ a1);
          }
        }
      }
      seqResGroups.set(seqresIndexPosition.get(posSeq),a1);
      noMatchFound=false;
    }
  }
  if (noMatchFound) {
    logger.debug("String_Node_Str");
  }
  return noMatchFound;
}

Fixed version (ground truth):
private boolean mapDNAChains(List<Group> seqResGroups,List<Group> atomRes,SequencePair<Sequence<NucleotideCompound>,NucleotideCompound> pair,Map<Integer,Integer> seqresIndexPosition,Map<Integer,Integer> atomIndexPosition){
  int aligLength=pair.getLength();
  boolean noMatchFound=true;
  Compound gapSymbol=DNACompoundSet.getDNACompoundSet().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 + "String_Node_Str"+ s1+ "String_Node_Str"+ a1+ "String_Node_Str"+ posAtom);
        logger.warn("String_Node_Str");
      }
      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 + "String_Node_Str"+ a1);
          }
        }
      }
      seqResGroups.set(seqresIndexPosition.get(posSeq),a1);
      noMatchFound=false;
    }
  }
  if (noMatchFound) {
    logger.debug("String_Node_Str");
  }
  return noMatchFound;
}