Program: 12457
Project: 12457
Buggy source:
/** 
 * Creates a generic top-level, and then adds it to this SBOL document's list of generic top-levels. <p> This method calls   {@link #createGenericTopLevel(String,String,String,QName)} with the default URIprefix of this SBOL document, the given component definition display ID and version, and the given RDF type. 
 * @param URIprefix the given URI prefix used to create a compliant URI for the generic top-level to be created 
 * @param displayId the display ID of the generic top-level to be created
 * @param version the version of the generic top-level to be created
 * @param rdfType the type of the generic top-level to be created
 * @return the created generic top-level
 * @throws SBOLValidationException if an SBOL validation rules was violated:10201, 10202, 10204, 10206, 10220, 10303, 10304, 10305, 10401, 10501, 10701, 10801, 10901, 11101, 11201, 11301,  11401, 11501, 11601, 11701, 11801, 11901, 12001, 12301, 12302. 
 */
public GenericTopLevel createGenericTopLevel(String URIprefix,String displayId,String version,QName rdfType) throws SBOLValidationException {
  URIprefix=URIcompliance.checkURIprefix(URIprefix);
  if (rdfType.getNamespaceURI().equals(Sbol2Terms.sbol2.getNamespaceURI()) || rdfType.getNamespaceURI().equals(Sbol1Terms.sbol1.getNamespaceURI())) {
    throw new SBOLValidationException("String_Node_Str");
  }
  GenericTopLevel g=new GenericTopLevel(createCompliantURI(URIprefix,TopLevel.GENERIC_TOP_LEVEL,displayId,version,typesInURIs),rdfType);
  g.setPersistentIdentity(createCompliantURI(URIprefix,TopLevel.GENERIC_TOP_LEVEL,displayId,"String_Node_Str",typesInURIs));
  g.setDisplayId(displayId);
  g.setVersion(version);
  addGenericTopLevel(g);
  return g;
}

Fixed version (ground truth):
/** 
 * Creates a generic top-level, and then adds it to this SBOL document's list of generic top-levels. <p> This method calls   {@link #createGenericTopLevel(String,String,String,QName)} with the default URIprefix of this SBOL document, the given component definition display ID and version, and the given RDF type. 
 * @param URIprefix the given URI prefix used to create a compliant URI for the generic top-level to be created 
 * @param displayId the display ID of the generic top-level to be created
 * @param version the version of the generic top-level to be created
 * @param rdfType the type of the generic top-level to be created
 * @return the created generic top-level
 * @throws SBOLValidationException if an SBOL validation rules was violated:10201, 10202, 10204, 10206, 10220, 10303, 10304, 10305, 10401, 10501, 10701, 10801, 10901, 11101, 11201, 11301,  11401, 11501, 11601, 11701, 11801, 11901, 12001, 12301, 12302. 
 */
public GenericTopLevel createGenericTopLevel(String URIprefix,String displayId,String version,QName rdfType) throws SBOLValidationException {
  URIprefix=URIcompliance.checkURIprefix(URIprefix);
  if (rdfType.getNamespaceURI().equals(Sbol2Terms.sbol2.getNamespaceURI())) {
    throw new SBOLValidationException("String_Node_Str");
  }
  GenericTopLevel g=new GenericTopLevel(createCompliantURI(URIprefix,TopLevel.GENERIC_TOP_LEVEL,displayId,version,typesInURIs),rdfType);
  g.setPersistentIdentity(createCompliantURI(URIprefix,TopLevel.GENERIC_TOP_LEVEL,displayId,"String_Node_Str",typesInURIs));
  g.setDisplayId(displayId);
  g.setVersion(version);
  addGenericTopLevel(g);
  return g;
}