Program: 12553
Project: 12553
Buggy source:
static void read(SBOLDocument doc,BufferedReader br,String URIprefix,String version,URI encoding) throws SBOLValidationException, IOException {
  nextLine=null;
  String strLine;
  StringBuilder sbSequence=new StringBuilder();
  String elements=null;
  String description="String_Node_Str";
  boolean sequenceMode=false;
  String displayId;
  while ((strLine=readFASTALine(br)) != null) {
    strLine=strLine.trim();
    if (strLine.startsWith("String_Node_Str")) {
      if (sequenceMode) {
        sequenceMode=false;
        displayId=URIcompliance.fixDisplayId(description);
        Sequence sequence=doc.createSequence(URIprefix,displayId,version,sbSequence.toString(),encoding);
        sequence.setDescription(description);
        description="String_Node_Str";
        sbSequence=new StringBuilder();
      }
      description+=strLine.replaceFirst("String_Node_Str","String_Node_Str").trim();
    }
 else     if (strLine.startsWith("String_Node_Str")) {
      if (sequenceMode) {
        sequenceMode=false;
        displayId=URIcompliance.fixDisplayId(description);
        Sequence sequence=doc.createSequence(URIprefix,displayId,version,sbSequence.toString(),encoding);
        sequence.setDescription(description);
        description="String_Node_Str";
        sbSequence=new StringBuilder();
      }
      description+=strLine.replaceFirst("String_Node_Str","String_Node_Str").trim();
    }
 else {
      sequenceMode=true;
      if (elements == null) {
        elements=new String("String_Node_Str");
      }
      String[] strSplit=strLine.split("String_Node_Str");
      for (int i=0; i < strSplit.length; i++) {
        sbSequence.append(strSplit[i]);
      }
    }
  }
  displayId=URIcompliance.fixDisplayId(description);
  Sequence sequence=doc.createSequence(URIprefix,displayId,version,sbSequence.toString(),encoding);
  sequence.setDescription(description);
}

Fixed version (ground truth):
static void read(SBOLDocument doc,String stringBuffer,String URIprefix,String version,URI encoding) throws SBOLValidationException, IOException {
  nextLine=null;
  String strLine;
  StringBuilder sbSequence=new StringBuilder();
  String elements=null;
  String description="String_Node_Str";
  boolean sequenceMode=false;
  String displayId;
  BufferedReader br=new BufferedReader(new StringReader(stringBuffer));
  while ((strLine=readFASTALine(br)) != null) {
    strLine=strLine.trim();
    if (strLine.startsWith("String_Node_Str")) {
      if (sequenceMode) {
        sequenceMode=false;
        displayId=URIcompliance.fixDisplayId(description);
        Sequence sequence=doc.createSequence(URIprefix,displayId,version,sbSequence.toString(),encoding);
        sequence.setDescription(description);
        description="String_Node_Str";
        sbSequence=new StringBuilder();
      }
      description+=strLine.replaceFirst("String_Node_Str","String_Node_Str").trim();
    }
 else     if (strLine.startsWith("String_Node_Str")) {
      if (sequenceMode) {
        sequenceMode=false;
        displayId=URIcompliance.fixDisplayId(description);
        Sequence sequence=doc.createSequence(URIprefix,displayId,version,sbSequence.toString(),encoding);
        sequence.setDescription(description);
        description="String_Node_Str";
        sbSequence=new StringBuilder();
      }
      description+=strLine.replaceFirst("String_Node_Str","String_Node_Str").trim();
    }
 else {
      sequenceMode=true;
      if (elements == null) {
        elements=new String("String_Node_Str");
      }
      String[] strSplit=strLine.split("String_Node_Str");
      for (int i=0; i < strSplit.length; i++) {
        sbSequence.append(strSplit[i]);
      }
    }
  }
  displayId=URIcompliance.fixDisplayId(description);
  Sequence sequence=doc.createSequence(URIprefix,displayId,version,sbSequence.toString(),encoding);
  sequence.setDescription(description);
  br.close();
}