Program: 12852
Project: 12852
Buggy source:
private static SequenceAnnotation parseSequenceAnnotationV1(SBOLDocument SBOLDoc,NestedDocument<QName> sequenceAnnotation,List<SBOLPair> precedePairs,URI parentURI){
  int sa_value=0;
  Integer start=null;
  Integer end=null;
  String strand=null;
  URI componentURI=null;
  URI identity=sequenceAnnotation.getIdentity();
  List<Annotation> annotations=new ArrayList<Annotation>();
  for (  NamedProperty<QName> namedProperty : sequenceAnnotation.getProperties()) {
    if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.uri)) {
      if (authority != null) {
        identity=URI.create(getParentURI(parentURI) + "String_Node_Str" + identity+ ++sa_value+ "String_Node_Str");
      }
    }
 else     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(getParentURI(sequenceAnnotation.getIdentity()) + "String_Node_Str");
    Range r=new Range(range_identity,start,end);
    if (strand != null) {
      if (strand.equals("String_Node_Str")) {
        r.setOrientation(Sbol2Terms.Orientation.inline);
      }
 else       if (strand.equals("String_Node_Str")) {
        r.setOrientation(Sbol2Terms.Orientation.reverseComplement);
      }
      location=r;
    }
  }
 else {
    URI dummyRange_id=URI.create(getParentURI(sequenceAnnotation.getIdentity()) + "String_Node_Str");
    int dummy_start=0;
    int dummy_end=0;
    Range dummyRange=new Range(dummyRange_id,dummy_start,dummy_end);
    location=dummyRange;
  }
  SequenceAnnotation s=new SequenceAnnotation(sequenceAnnotation.getIdentity(),location);
  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,URI parentURI,int sa_num){
  Integer start=null;
  Integer end=null;
  String strand=null;
  URI componentURI=null;
  URI identity=sequenceAnnotation.getIdentity();
  List<Annotation> annotations=new ArrayList<Annotation>();
  if (authority != null) {
    identity=URI.create(getParentURI(parentURI) + "String_Node_Str" + sa_num+ "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(getParentURI(identity) + "String_Node_Str");
    Range r=new Range(range_identity,start,end);
    if (strand != null) {
      if (strand.equals("String_Node_Str")) {
        r.setOrientation(Sbol2Terms.Orientation.inline);
      }
 else       if (strand.equals("String_Node_Str")) {
        r.setOrientation(Sbol2Terms.Orientation.reverseComplement);
      }
      location=r;
    }
  }
 else {
    URI dummyRange_id=URI.create(getParentURI(identity) + "String_Node_Str");
    int dummy_start=0;
    int dummy_end=0;
    Range dummyRange=new Range(dummyRange_id,dummy_start,dummy_end);
    location=dummyRange;
  }
  SequenceAnnotation s=new SequenceAnnotation(identity,location);
  if (componentURI != null)   s.setComponent(componentURI);
  if (!annotations.isEmpty())   s.setAnnotations(annotations);
  return s;
}