Program: 16992
Project: 16992
Buggy source:
public static void getAlignmentFromFasta(){
  String fastaStr="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  InputStream fasta;
  try {
    fasta=new ByteArrayInputStream(fastaStr.getBytes("String_Node_Str"));
  }
 catch (  UnsupportedEncodingException e) {
    e.printStackTrace();
    return;
  }
  FastaHeaderParserInterface<ProteinSequence,AminoAcidCompound> headerParser;
  headerParser=new GenericFastaHeaderParser<ProteinSequence,AminoAcidCompound>();
  AtomCache cache=new AtomCache();
  AminoAcidCompoundSet aaSet=AminoAcidCompoundSet.getAminoAcidCompoundSet();
  SequenceCreatorInterface<AminoAcidCompound> creator;
  creator=new CasePreservingProteinSequenceCreator(aaSet);
  FastaStructureParser parser=new FastaStructureParser(fasta,headerParser,creator,cache);
  try {
    parser.process();
  }
 catch (  IOException e) {
    e.printStackTrace();
    return;
  }
catch (  StructureException e) {
    e.printStackTrace();
    return;
  }
  ResidueNumber[][] residues=parser.getResidues();
  ProteinSequence[] sequences=parser.getSequences();
  Structure[] structures=parser.getStructures();
  for (int structNum=0; structNum < sequences.length; structNum++) {
    CasePreservingProteinSequenceCreator.setLowercaseToNull(sequences[structNum],residues[structNum]);
  }
  residues=StructureSequenceMatcher.removeGaps(residues);
  Atom[] ca1=StructureTools.getAtomCAArray(structures[0]);
  Atom[] ca2=StructureTools.getAtomCAArray(structures[1]);
  AFPChain afp=AlignmentTools.createAFPChain(ca1,ca2,residues[0],residues[1]);
  try {
    StructureAlignmentDisplay.display(afp,ca1,ca2);
  }
 catch (  StructureException e) {
    e.printStackTrace();
    return;
  }
}

Fixed version (ground truth):
public static void getAlignmentFromFasta() throws StructureException {
  String fastaStr="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  InputStream fasta;
  try {
    fasta=new ByteArrayInputStream(fastaStr.getBytes("String_Node_Str"));
  }
 catch (  UnsupportedEncodingException e) {
    e.printStackTrace();
    return;
  }
  FastaHeaderParserInterface<ProteinSequence,AminoAcidCompound> headerParser;
  headerParser=new GenericFastaHeaderParser<ProteinSequence,AminoAcidCompound>();
  AtomCache cache=new AtomCache();
  AminoAcidCompoundSet aaSet=AminoAcidCompoundSet.getAminoAcidCompoundSet();
  SequenceCreatorInterface<AminoAcidCompound> creator;
  creator=new CasePreservingProteinSequenceCreator(aaSet);
  FastaStructureParser parser=new FastaStructureParser(fasta,headerParser,creator,cache);
  try {
    parser.process();
  }
 catch (  IOException e) {
    e.printStackTrace();
    return;
  }
catch (  StructureException e) {
    e.printStackTrace();
    return;
  }
  ResidueNumber[][] residues=parser.getResidues();
  ProteinSequence[] sequences=parser.getSequences();
  Structure[] structures=parser.getStructures();
  for (int structNum=0; structNum < sequences.length; structNum++) {
    CasePreservingProteinSequenceCreator.setLowercaseToNull(sequences[structNum],residues[structNum]);
  }
  residues=StructureSequenceMatcher.removeGaps(residues);
  Atom[] ca1=StructureTools.getAtomCAArray(structures[0]);
  Atom[] ca2=StructureTools.getAtomCAArray(structures[1]);
  AFPChain afp=AlignmentTools.createAFPChain(ca1,ca2,residues[0],residues[1]);
  try {
    StructureAlignmentDisplay.display(afp,ca1,ca2);
  }
 catch (  StructureException e) {
    e.printStackTrace();
    return;
  }
}