Program: 16520
Project: 16520
Buggy source:
private boolean alignNucleotideGroups(List<Group> seqRes,List<Group> atomRes){
  Map<Integer,Integer> seqresIndexPosition=new HashMap<Integer,Integer>();
  Map<Integer,Integer> atomIndexPosition=new HashMap<Integer,Integer>();
  String seq1=getFullAtomSequence(seqRes,seqresIndexPosition);
  String seq2=getFullAtomSequence(atomRes,atomIndexPosition);
  if (seq1.isEmpty() || seq2.isEmpty()) {
    logger.warn("String_Node_Str");
    return true;
  }
  logger.debug("String_Node_Str" + seq1.length() + "String_Node_Str"+ seq1);
  logger.debug("String_Node_Str" + seq2.length() + "String_Node_Str"+ seq2);
  Sequence<NucleotideCompound> s1;
  Sequence<NucleotideCompound> s2;
  try {
    s1=new DNASequence(seq1,AmbiguityDNACompoundSet.getDNACompoundSet());
  }
 catch (  CompoundNotFoundException e) {
    try {
      s1=new RNASequence(seq1,AmbiguityRNACompoundSet.getRNACompoundSet());
    }
 catch (    CompoundNotFoundException ex) {
      logger.warn("String_Node_Str" + seq1);
      return true;
    }
  }
  try {
    s2=new DNASequence(seq2,AmbiguityDNACompoundSet.getDNACompoundSet());
  }
 catch (  CompoundNotFoundException e) {
    try {
      s2=new RNASequence(seq2,AmbiguityRNACompoundSet.getRNACompoundSet());
    }
 catch (    CompoundNotFoundException ex) {
      logger.warn("String_Node_Str" + seq2);
      return true;
    }
  }
  if (!s1.getCompoundSet().equals(s2.getCompoundSet())) {
    if (!s1.getCompoundSet().equals(AmbiguityRNACompoundSet.getRNACompoundSet())) {
      try {
        s1=new RNASequence(seq1,AmbiguityRNACompoundSet.getRNACompoundSet());
      }
 catch (      CompoundNotFoundException ex) {
        logger.warn("String_Node_Str" + seq1);
        return true;
      }
    }
    if (!s2.getCompoundSet().equals(AmbiguityRNACompoundSet.getRNACompoundSet())) {
      try {
        s2=new RNASequence(seq2,AmbiguityRNACompoundSet.getRNACompoundSet());
      }
 catch (      CompoundNotFoundException ex) {
        logger.warn("String_Node_Str" + seq2);
        return true;
      }
    }
  }
  SubstitutionMatrix<NucleotideCompound> matrix=SubstitutionMatrixHelper.getNuc4_4();
  GapPenalty penalty=new SimpleGapPenalty(8,1);
  PairwiseSequenceAligner<Sequence<NucleotideCompound>,NucleotideCompound> smithWaterman=Alignments.getPairwiseAligner(s1,s2,PairwiseSequenceAlignerType.LOCAL,penalty,matrix);
  SequencePair<Sequence<NucleotideCompound>,NucleotideCompound> pair=smithWaterman.getPair();
  if (pair == null) {
    logger.warn("String_Node_Str");
    logger.warn("String_Node_Str");
    logger.warn(seq1);
    logger.warn(seq2);
    return true;
  }
  logger.debug("String_Node_Str" + pair.toString(100));
  boolean noMatchFound=mapDNAChains(seqRes,atomRes,pair,seqresIndexPosition,atomIndexPosition);
  return noMatchFound;
}

Fixed version (ground truth):
private boolean alignNucleotideGroups(List<Group> seqRes,List<Group> atomRes){
  Map<Integer,Integer> seqresIndexPosition=new HashMap<Integer,Integer>();
  Map<Integer,Integer> atomIndexPosition=new HashMap<Integer,Integer>();
  String seq1=getFullAtomSequence(seqRes,seqresIndexPosition,true);
  String seq2=getFullAtomSequence(atomRes,atomIndexPosition,true);
  if (seq1.isEmpty() || seq2.isEmpty()) {
    logger.warn("String_Node_Str");
    return true;
  }
  logger.debug("String_Node_Str" + seq1.length() + "String_Node_Str"+ seq1);
  logger.debug("String_Node_Str" + seq2.length() + "String_Node_Str"+ seq2);
  Sequence<NucleotideCompound> s1=getNucleotideSequence(seq1);
  Sequence<NucleotideCompound> s2=getNucleotideSequence(seq2);
  if (s1 == null || s2 == null)   return true;
  if (!s1.getCompoundSet().equals(s2.getCompoundSet())) {
    if (!s1.getCompoundSet().equals(AmbiguityRNACompoundSet.getRNACompoundSet())) {
      try {
        s1=new RNASequence(seq1,AmbiguityRNACompoundSet.getRNACompoundSet());
      }
 catch (      CompoundNotFoundException ex) {
        logger.warn("String_Node_Str" + seq1);
        return true;
      }
    }
    if (!s2.getCompoundSet().equals(AmbiguityRNACompoundSet.getRNACompoundSet())) {
      try {
        s2=new RNASequence(seq2,AmbiguityRNACompoundSet.getRNACompoundSet());
      }
 catch (      CompoundNotFoundException ex) {
        logger.warn("String_Node_Str" + seq2);
        return true;
      }
    }
  }
  SubstitutionMatrix<NucleotideCompound> matrix=SubstitutionMatrixHelper.getNuc4_4();
  GapPenalty penalty=new SimpleGapPenalty(8,1);
  PairwiseSequenceAligner<Sequence<NucleotideCompound>,NucleotideCompound> smithWaterman=Alignments.getPairwiseAligner(s1,s2,PairwiseSequenceAlignerType.LOCAL,penalty,matrix);
  SequencePair<Sequence<NucleotideCompound>,NucleotideCompound> pair=smithWaterman.getPair();
  if (pair == null) {
    logger.warn("String_Node_Str");
    logger.warn("String_Node_Str");
    logger.warn(seq1);
    logger.warn(seq2);
    return true;
  }
  logger.debug("String_Node_Str" + pair.toString(100));
  boolean noMatchFound=mapDNAChains(seqRes,atomRes,pair,seqresIndexPosition,atomIndexPosition);
  return noMatchFound;
}