Program: 12724
Project: 12724
Buggy source:
private static SequenceConstraint parseSequenceConstraint(NestedDocument<QName> sequenceConstraints){
  URI persistentIdentity=null;
  String displayId=null;
  RestrictionType restriction=null;
  URI subject=null;
  URI object=null;
  String version=null;
  URI wasDerivedFrom=null;
  List<Annotation> annotations=new ArrayList<>();
  for (  NamedProperty<QName> namedProperty : sequenceConstraints.getProperties()) {
    if (namedProperty.getName().equals(Sbol2Terms.Identified.persistentIdentity)) {
      persistentIdentity=URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString());
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.SequenceConstraint.restriction)) {
      restriction=SequenceConstraint.RestrictionType.convertToRestrictionType(URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString()));
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.SequenceConstraint.hasSubject)) {
      subject=URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString());
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.SequenceConstraint.hasObject)) {
      object=URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString());
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.Documented.displayId)) {
      displayId=((Literal<QName>)namedProperty.getValue()).getValue().toString();
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.Identified.version)) {
      version=((Literal<QName>)namedProperty.getValue()).getValue().toString();
    }
 else     if (namedProperty.getName().equals(ProvTerms.Prov.wasDerivedFrom)) {
      wasDerivedFrom=URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString());
    }
 else {
      annotations.add(new Annotation(namedProperty));
    }
  }
  SequenceConstraint s=new SequenceConstraint(sequenceConstraints.getIdentity(),restriction,subject,object);
  if (displayId != null)   s.setDisplayId(displayId);
  if (persistentIdentity != null)   s.setPersistentIdentity(persistentIdentity);
  if (version != null)   s.setVersion(version);
  if (wasDerivedFrom != null)   s.setWasDerivedFrom(wasDerivedFrom);
  if (!annotations.isEmpty())   s.setAnnotations(annotations);
  return s;
}

Fixed version (ground truth):
private static SequenceConstraint parseSequenceConstraint(NestedDocument<QName> sequenceConstraints){
  URI persistentIdentity=null;
  String displayId=null;
  RestrictionType restriction=null;
  URI subject=null;
  URI object=null;
  String version=null;
  URI wasDerivedFrom=null;
  List<Annotation> annotations=new ArrayList<>();
  for (  NamedProperty<QName> namedProperty : sequenceConstraints.getProperties()) {
    if (namedProperty.getName().equals(Sbol2Terms.Identified.persistentIdentity)) {
      persistentIdentity=URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString());
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.SequenceConstraint.restriction)) {
      restriction=SequenceConstraint.RestrictionType.convertToRestrictionType(URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString()));
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.SequenceConstraint.hasSubject)) {
      subject=URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString());
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.SequenceConstraint.hasObject)) {
      object=URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString());
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.Documented.displayId)) {
      displayId=((Literal<QName>)namedProperty.getValue()).getValue().toString();
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.Identified.version)) {
      version=((Literal<QName>)namedProperty.getValue()).getValue().toString();
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.Identified.wasDerivedFrom)) {
      wasDerivedFrom=URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString());
    }
 else {
      annotations.add(new Annotation(namedProperty));
    }
  }
  SequenceConstraint s=new SequenceConstraint(sequenceConstraints.getIdentity(),restriction,subject,object);
  if (displayId != null)   s.setDisplayId(displayId);
  if (persistentIdentity != null)   s.setPersistentIdentity(persistentIdentity);
  if (version != null)   s.setVersion(version);
  if (wasDerivedFrom != null)   s.setWasDerivedFrom(wasDerivedFrom);
  if (!annotations.isEmpty())   s.setAnnotations(annotations);
  return s;
}