Program: 12720
Project: 12720
Buggy source:
private static SequenceAnnotation parseSequenceAnnotationV1(SBOLDocument SBOLDoc,NestedDocument<QName> sequenceAnnotation,List<SBOLPair> precedePairs,String parentURI,int sa_num){
  Integer start=null;
  Integer end=null;
  String strand=null;
  URI componentURI=null;
  URI identity=sequenceAnnotation.getIdentity();
  String persIdentity="String_Node_Str";
  List<Annotation> annotations=new ArrayList<>();
  if (setURIPrefix != null) {
    persIdentity=parentURI + "String_Node_Str" + sa_num;
    identity=URI.create(persIdentity + "String_Node_Str");
  }
  for (  NamedProperty<QName> namedProperty : sequenceAnnotation.getProperties()) {
    if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.bioStart)) {
      String temp=((Literal<QName>)namedProperty.getValue()).getValue().toString();
      start=Integer.parseInt(temp);
    }
 else     if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.bioEnd)) {
      String temp2=((Literal<QName>)namedProperty.getValue()).getValue().toString();
      end=Integer.parseInt(temp2);
    }
 else     if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.strand)) {
      strand=((Literal<QName>)namedProperty.getValue()).getValue().toString();
    }
 else     if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.subComponent)) {
      componentURI=parseDnaComponentV1(SBOLDoc,(NestedDocument<QName>)namedProperty.getValue()).getIdentity();
    }
 else     if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.precedes)) {
      URI left=sequenceAnnotation.getIdentity();
      URI right=URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString());
      SBOLPair pair=new SBOLPair(left,right);
      precedePairs.add(pair);
    }
 else {
      annotations.add(new Annotation(namedProperty));
    }
  }
  Location location=null;
  if (start != null && end != null) {
    URI range_identity=URI.create(persIdentity + "String_Node_Str");
    Location r=new Range(range_identity,start,end);
    if (!persIdentity.equals("String_Node_Str")) {
      r.setPersistentIdentity(URI.create(persIdentity + "String_Node_Str"));
      r.setDisplayId("String_Node_Str");
      r.setVersion("String_Node_Str");
    }
    if (strand != null) {
      if (strand.equals("String_Node_Str")) {
        r.setOrientation(OrientationType.convertToOrientationType(OrientationType.inline));
      }
 else       if (strand.equals("String_Node_Str")) {
        r.setOrientation(OrientationType.convertToOrientationType(OrientationType.reverseComplement));
      }
      location=r;
    }
  }
 else {
    URI dummyGenericLoc_id=URI.create(persIdentity + "String_Node_Str");
    GenericLocation dummyGenericLoc=new GenericLocation(dummyGenericLoc_id);
    if (!persIdentity.equals("String_Node_Str")) {
      dummyGenericLoc.setPersistentIdentity(URI.create(persIdentity + "String_Node_Str"));
      dummyGenericLoc.setDisplayId("String_Node_Str");
      dummyGenericLoc.setVersion("String_Node_Str");
    }
    if (strand != null) {
      if (strand.equals("String_Node_Str")) {
        dummyGenericLoc.setOrientation(OrientationType.convertToOrientationType(OrientationType.inline));
      }
 else       if (strand.equals("String_Node_Str")) {
        dummyGenericLoc.setOrientation(OrientationType.convertToOrientationType(OrientationType.reverseComplement));
      }
      location=dummyGenericLoc;
    }
  }
  List<Location> locations=new ArrayList<>();
  locations.add(location);
  SequenceAnnotation s=new SequenceAnnotation(identity,locations);
  if (!persIdentity.equals("String_Node_Str")) {
    s.setPersistentIdentity(URI.create(persIdentity));
    s.setDisplayId("String_Node_Str" + sa_num);
    s.setVersion("String_Node_Str");
  }
  if (identity != sequenceAnnotation.getIdentity())   s.setWasDerivedFrom(sequenceAnnotation.getIdentity());
  if (componentURI != null)   s.setComponent(componentURI);
  if (!annotations.isEmpty())   s.setAnnotations(annotations);
  return s;
}

Fixed version (ground truth):
private static SequenceAnnotation parseSequenceAnnotationV1(SBOLDocument SBOLDoc,NestedDocument<QName> sequenceAnnotation,List<SBOLPair> precedePairs,String parentURI,int sa_num){
  Integer start=null;
  Integer end=null;
  String strand=null;
  URI componentURI=null;
  URI identity=sequenceAnnotation.getIdentity();
  String persIdentity="String_Node_Str";
  List<Annotation> annotations=new ArrayList<>();
  if (URIPrefix != null) {
    persIdentity=createCompliantURI(parentURI,"String_Node_Str" + sa_num,"String_Node_Str").toString();
    identity=createCompliantURI(parentURI,"String_Node_Str" + sa_num,version);
  }
  for (  NamedProperty<QName> namedProperty : sequenceAnnotation.getProperties()) {
    if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.bioStart)) {
      String temp=((Literal<QName>)namedProperty.getValue()).getValue().toString();
      start=Integer.parseInt(temp);
    }
 else     if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.bioEnd)) {
      String temp2=((Literal<QName>)namedProperty.getValue()).getValue().toString();
      end=Integer.parseInt(temp2);
    }
 else     if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.strand)) {
      strand=((Literal<QName>)namedProperty.getValue()).getValue().toString();
    }
 else     if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.subComponent)) {
      componentURI=parseDnaComponentV1(SBOLDoc,(NestedDocument<QName>)namedProperty.getValue()).getIdentity();
    }
 else     if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.precedes)) {
      URI left=sequenceAnnotation.getIdentity();
      URI right=URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString());
      SBOLPair pair=new SBOLPair(left,right);
      precedePairs.add(pair);
    }
 else {
      annotations.add(new Annotation(namedProperty));
    }
  }
  Location location=null;
  if (start != null && end != null) {
    URI range_identity=createCompliantURI(persIdentity,"String_Node_Str",version);
    Location r=new Range(range_identity,start,end);
    if (!persIdentity.equals("String_Node_Str")) {
      r.setPersistentIdentity(createCompliantURI(persIdentity,"String_Node_Str","String_Node_Str"));
      r.setDisplayId("String_Node_Str");
      r.setVersion(version);
    }
    if (strand != null) {
      if (strand.equals("String_Node_Str")) {
        r.setOrientation(OrientationType.convertToOrientationType(OrientationType.inline));
      }
 else       if (strand.equals("String_Node_Str")) {
        r.setOrientation(OrientationType.convertToOrientationType(OrientationType.reverseComplement));
      }
      location=r;
    }
  }
 else {
    URI dummyGenericLoc_id=createCompliantURI(persIdentity,"String_Node_Str",version);
    GenericLocation dummyGenericLoc=new GenericLocation(dummyGenericLoc_id);
    if (!persIdentity.equals("String_Node_Str")) {
      dummyGenericLoc.setPersistentIdentity(createCompliantURI(persIdentity,"String_Node_Str","String_Node_Str"));
      dummyGenericLoc.setDisplayId("String_Node_Str");
      dummyGenericLoc.setVersion(version);
    }
    if (strand != null) {
      if (strand.equals("String_Node_Str")) {
        dummyGenericLoc.setOrientation(OrientationType.convertToOrientationType(OrientationType.inline));
      }
 else       if (strand.equals("String_Node_Str")) {
        dummyGenericLoc.setOrientation(OrientationType.convertToOrientationType(OrientationType.reverseComplement));
      }
      location=dummyGenericLoc;
    }
  }
  List<Location> locations=new ArrayList<>();
  locations.add(location);
  SequenceAnnotation s=new SequenceAnnotation(identity,locations);
  if (!persIdentity.equals("String_Node_Str")) {
    s.setPersistentIdentity(URI.create(persIdentity));
    s.setDisplayId("String_Node_Str" + sa_num);
    s.setVersion(version);
  }
  if (identity != sequenceAnnotation.getIdentity())   s.setWasDerivedFrom(sequenceAnnotation.getIdentity());
  if (componentURI != null)   s.setComponent(componentURI);
  if (!annotations.isEmpty())   s.setAnnotations(annotations);
  return s;
}