Program: 12413
Project: 12413
Buggy source:
private static VariableComponent parseVariableComponent(SBOLDocument SBOLDoc,NestedDocument<QName> variableComponent,Map<URI,NestedDocument<QName>> nested) throws SBOLValidationException {
  String displayId=null;
  String name=null;
  String description=null;
  URI persistentIdentity=null;
  String version=null;
  List<Annotation> annotations=new ArrayList<>();
  URI variable=null;
  OperatorType operator=null;
  HashSet<URI> variants=new HashSet<>();
  HashSet<URI> variantCollections=new HashSet<>();
  HashSet<URI> variantDerivations=new HashSet<>();
  for (  NamedProperty<QName> namedProperty : variableComponent.getProperties()) {
    if (namedProperty.getName().equals(Sbol2Terms.Identified.persistentIdentity)) {
      if (!(namedProperty.getValue() instanceof Literal) || persistentIdentity != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof URI))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      persistentIdentity=URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString());
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.Identified.version)) {
      if (!(namedProperty.getValue() instanceof Literal) || version != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof String))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      version=((Literal<QName>)namedProperty.getValue()).getValue().toString();
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.Identified.displayId)) {
      if (!(namedProperty.getValue() instanceof Literal) || displayId != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof String))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      displayId=((Literal<QName>)namedProperty.getValue()).getValue().toString();
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.Identified.title)) {
      if (!(namedProperty.getValue() instanceof Literal) || name != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof String))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      name=((Literal<QName>)namedProperty.getValue()).getValue().toString();
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.Identified.description)) {
      if (!(namedProperty.getValue() instanceof Literal) || description != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof String))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      description=((Literal<QName>)namedProperty.getValue()).getValue().toString();
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.VariableComponent.hasVariants)) {
      if (!(namedProperty.getValue() instanceof Literal) || description != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof String))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      variants.add(URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString()));
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.VariableComponent.hasVariantCollections)) {
      if (!(namedProperty.getValue() instanceof Literal) || description != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof String))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      variantCollections.add(URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString()));
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.VariableComponent.hasVariantDerivations)) {
      if (!(namedProperty.getValue() instanceof Literal) || description != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof String))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      variantDerivations.add(URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString()));
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.VariableComponent.hasOperator)) {
      if (!(namedProperty.getValue() instanceof Literal) || operator != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof URI))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      String operatorTypeStr=((Literal<QName>)namedProperty.getValue()).getValue().toString();
      if (operatorTypeStr.startsWith("String_Node_Str")) {
        System.out.println("String_Node_Str");
        operatorTypeStr=operatorTypeStr.replace("String_Node_Str","String_Node_Str");
      }
      try {
        operator=OperatorType.convertToOperatorType(URI.create(operatorTypeStr));
      }
 catch (      SBOLValidationException e) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.VariableComponent.hasVariable)) {
      if (!(namedProperty.getValue() instanceof Literal) || description != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof String))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      variable=URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString());
    }
 else {
      annotations.add(new Annotation(namedProperty));
    }
  }
  VariableComponent c=new VariableComponent(variableComponent.getIdentity(),variable,operator);
  if (persistentIdentity != null)   c.setPersistentIdentity(persistentIdentity);
  if (version != null)   c.setVersion(version);
  if (displayId != null)   c.setDisplayId(displayId);
  if (!variants.isEmpty())   c.setVariants(variants);
  if (!variantCollections.isEmpty())   c.setVariantCollections(variantCollections);
  if (!variantDerivations.isEmpty())   c.setVariantDerivations(variantDerivations);
  if (name != null)   c.setName(name);
  if (description != null)   c.setDescription(description);
  if (!annotations.isEmpty())   c.setAnnotations(annotations);
  return c;
}

Fixed version (ground truth):
private static VariableComponent parseVariableComponent(SBOLDocument SBOLDoc,NestedDocument<QName> variableComponent,Map<URI,NestedDocument<QName>> nested) throws SBOLValidationException {
  String displayId=null;
  String name=null;
  String description=null;
  URI persistentIdentity=null;
  String version=null;
  List<Annotation> annotations=new ArrayList<>();
  Component variable=null;
  OperatorType operator=null;
  HashSet<URI> variants=new HashSet<>();
  HashSet<URI> variantCollections=new HashSet<>();
  HashSet<URI> variantDerivations=new HashSet<>();
  for (  NamedProperty<QName> namedProperty : variableComponent.getProperties()) {
    if (namedProperty.getName().equals(Sbol2Terms.Identified.persistentIdentity)) {
      if (!(namedProperty.getValue() instanceof Literal) || persistentIdentity != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof URI))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      persistentIdentity=URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString());
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.Identified.version)) {
      if (!(namedProperty.getValue() instanceof Literal) || version != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof String))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      version=((Literal<QName>)namedProperty.getValue()).getValue().toString();
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.Identified.displayId)) {
      if (!(namedProperty.getValue() instanceof Literal) || displayId != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof String))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      displayId=((Literal<QName>)namedProperty.getValue()).getValue().toString();
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.Identified.title)) {
      if (!(namedProperty.getValue() instanceof Literal) || name != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof String))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      name=((Literal<QName>)namedProperty.getValue()).getValue().toString();
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.Identified.description)) {
      if (!(namedProperty.getValue() instanceof Literal) || description != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof String))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      description=((Literal<QName>)namedProperty.getValue()).getValue().toString();
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.VariableComponent.hasVariants)) {
      if (!(namedProperty.getValue() instanceof Literal) || description != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof String))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      variants.add(URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString()));
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.VariableComponent.hasVariantCollections)) {
      if (!(namedProperty.getValue() instanceof Literal) || description != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof String))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      variantCollections.add(URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString()));
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.VariableComponent.hasVariantDerivations)) {
      if (!(namedProperty.getValue() instanceof Literal) || description != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof String))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      variantDerivations.add(URI.create(((Literal<QName>)namedProperty.getValue()).getValue().toString()));
    }
 else     if (namedProperty.getName().equals(Sbol2Terms.VariableComponent.hasOperator)) {
      if (!(namedProperty.getValue() instanceof Literal) || operator != null || (!(((Literal<QName>)namedProperty.getValue()).getValue() instanceof URI))) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
      String operatorTypeStr=((Literal<QName>)namedProperty.getValue()).getValue().toString();
      if (operatorTypeStr.startsWith("String_Node_Str")) {
        System.out.println("String_Node_Str");
        operatorTypeStr=operatorTypeStr.replace("String_Node_Str","String_Node_Str");
      }
      try {
        operator=OperatorType.convertToOperatorType(URI.create(operatorTypeStr));
      }
 catch (      SBOLValidationException e) {
        throw new SBOLValidationException("String_Node_Str",variableComponent.getIdentity());
      }
    }
 else {
      annotations.add(new Annotation(namedProperty));
    }
  }
  VariableComponent c=new VariableComponent(variableComponent.getIdentity(),operator,variable);
  if (persistentIdentity != null)   c.setPersistentIdentity(persistentIdentity);
  if (version != null)   c.setVersion(version);
  if (displayId != null)   c.setDisplayId(displayId);
  if (!variants.isEmpty())   c.setVariants(variants);
  if (!variantCollections.isEmpty())   c.setVariantCollections(variantCollections);
  if (!variantDerivations.isEmpty())   c.setVariantDerivations(variantDerivations);
  if (name != null)   c.setName(name);
  if (description != null)   c.setDescription(description);
  if (!annotations.isEmpty())   c.setAnnotations(annotations);
  return c;
}