Program: 12563
Project: 12563
Buggy source:
public static void main(String[] args) throws URISyntaxException, SBOLValidationException {
  SBOLDocument doc=new SBOLDocument();
  doc.setDefaultURIprefix("String_Node_Str");
  doc.setComplete(true);
  doc.setCreateDefaults(true);
  String version="String_Node_Str";
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.PROTEIN);
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.RNA).addRole(SequenceOntology.SGRNA);
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.COMPLEX);
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA).addRole(SequenceOntology.PROMOTER);
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.PROTEIN);
  ModuleDefinition CRISPR_Template=doc.createModuleDefinition("String_Node_Str",version);
  Interaction Cas9Complex_Formation=CRISPR_Template.createInteraction("String_Node_Str",SystemsBiologyOntology.NON_COVALENT_BINDING);
  Cas9Complex_Formation.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Cas9Complex_Formation.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Cas9Complex_Formation.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PRODUCT);
  Interaction EYFP_production=CRISPR_Template.createInteraction("String_Node_Str",SystemsBiologyOntology.GENETIC_PRODUCTION);
  EYFP_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PROMOTER);
  EYFP_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PRODUCT);
  Interaction target_generic_gene_inhibition=CRISPR_Template.createInteraction("String_Node_Str",SystemsBiologyOntology.INHIBITION);
  target_generic_gene_inhibition.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.INHIBITOR);
  target_generic_gene_inhibition.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PROMOTER);
  String CRa_U6_seq_elements="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  doc.createSequence("String_Node_Str",version,CRa_U6_seq_elements,Sequence.IUPAC_DNA);
  String gRNA_b_elements="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  doc.createSequence("String_Node_Str",version,gRNA_b_elements,Sequence.IUPAC_DNA);
  String mKate_seq_elements="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  doc.createSequence("String_Node_Str",version,mKate_seq_elements,Sequence.IUPAC_DNA);
  String CRP_b_seq_elements="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  doc.createSequence("String_Node_Str",version,CRP_b_seq_elements,Sequence.IUPAC_DNA);
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA).addRole(SequenceOntology.PROMOTER);
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA).addRole(SequenceOntology.CDS);
  ComponentDefinition cas9m_BFP_gene=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  cas9m_BFP_gene.addRole(SequenceOntology.PROMOTER);
  cas9m_BFP_gene.createSequenceConstraint("String_Node_Str",RestrictionType.PRECEDES,"String_Node_Str","String_Node_Str");
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.PROTEIN);
  ComponentDefinition CRa_U6=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  CRa_U6.addRole(SequenceOntology.PROMOTER);
  CRa_U6.addSequence("String_Node_Str");
  ComponentDefinition gRNA_b_nc=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  gRNA_b_nc.addRole(SequenceOntology.CDS);
  gRNA_b_nc.addSequence("String_Node_Str");
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA).addRole(SequenceOntology.TERMINATOR);
  ComponentDefinition gRNA_b_gene=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  gRNA_b_gene.addRole(SequenceOntology.PROMOTER);
  gRNA_b_gene.createSequenceConstraint("String_Node_Str",RestrictionType.PRECEDES,"String_Node_Str","String_Node_Str");
  gRNA_b_gene.createSequenceConstraint("String_Node_Str",RestrictionType.PRECEDES,"String_Node_Str","String_Node_Str");
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.RNA).addRole(SequenceOntology.SGRNA);
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.COMPLEX);
  ComponentDefinition mKate_cds=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  mKate_cds.addRole(SequenceOntology.CDS);
  mKate_cds.addSequence("String_Node_Str");
  ComponentDefinition mKate_gene=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  mKate_gene.addRole(SequenceOntology.PROMOTER);
  mKate_gene.createSequenceConstraint("String_Node_Str",RestrictionType.PRECEDES,"String_Node_Str","String_Node_Str");
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.PROTEIN);
  ComponentDefinition Gal4VP16_cds=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  Gal4VP16_cds.addRole(SequenceOntology.CDS);
  ComponentDefinition Gal4VP16_gene=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  Gal4VP16_gene.addRole(SequenceOntology.PROMOTER);
  Gal4VP16_gene.createSequenceConstraint("String_Node_Str",RestrictionType.PRECEDES,"String_Node_Str","String_Node_Str");
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.PROTEIN);
  ComponentDefinition CRP_b=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  CRP_b.addRole(SequenceOntology.PROMOTER);
  CRP_b.addSequence("String_Node_Str");
  ComponentDefinition EYFP_cds=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  EYFP_cds.addRole(SequenceOntology.CDS);
  ComponentDefinition EYFP_gene=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  EYFP_gene.addRole(SequenceOntology.PROMOTER);
  EYFP_gene.createSequenceConstraint("String_Node_Str",RestrictionType.PRECEDES,"String_Node_Str","String_Node_Str");
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.PROTEIN);
  ModuleDefinition CRPb_circuit=doc.createModuleDefinition("String_Node_Str",version);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  Interaction mKate_production=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.GENETIC_PRODUCTION);
  mKate_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PRODUCT);
  mKate_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PROMOTER);
  Interaction GAL4VP16_production=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.GENETIC_PRODUCTION);
  GAL4VP16_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PROMOTER);
  GAL4VP16_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PRODUCT);
  Interaction cas9m_BFP_production=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.GENETIC_PRODUCTION);
  cas9m_BFP_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PROMOTER);
  cas9m_BFP_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PRODUCT);
  Interaction gRNA_b_production=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.GENETIC_PRODUCTION);
  gRNA_b_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PROMOTER);
  gRNA_b_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PRODUCT);
  Interaction EYFP_Activation=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.STIMULATION);
  EYFP_Activation.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.STIMULATOR);
  EYFP_Activation.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PROMOTER);
  Interaction mKate_deg=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.DEGRADATION);
  mKate_deg.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Interaction GAL4VP16_deg=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.DEGRADATION);
  GAL4VP16_deg.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Interaction cas9m_BFP_deg=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.DEGRADATION);
  cas9m_BFP_deg.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Interaction gRNA_b_deg=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.DEGRADATION);
  gRNA_b_deg.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Interaction EYFP_deg=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.DEGRADATION);
  EYFP_deg.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Interaction cas9m_BFP_gRNA_b_deg=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.DEGRADATION);
  cas9m_BFP_gRNA_b_deg.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Module Template_Module=CRPb_circuit.createModule("String_Node_Str","String_Node_Str",version);
  Template_Module.createMapsTo("String_Node_Str",RefinementType.USELOCAL,"String_Node_Str","String_Node_Str");
  Template_Module.createMapsTo("String_Node_Str",RefinementType.USELOCAL,"String_Node_Str","String_Node_Str");
  Template_Module.createMapsTo("String_Node_Str",RefinementType.USELOCAL,"String_Node_Str","String_Node_Str");
  Template_Module.createMapsTo("String_Node_Str",RefinementType.USELOCAL,"String_Node_Str","String_Node_Str");
  Template_Module.createMapsTo("String_Node_Str",RefinementType.USELOCAL,"String_Node_Str","String_Node_Str");
  ComponentDefinition cas9_generic1=doc.getComponentDefinition("String_Node_Str",version);
  ComponentDefinition cas9_generic2=doc.getComponentDefinition("String_Node_Str",null);
  if (cas9_generic1.equals(cas9_generic2)) {
    System.out.println("String_Node_Str");
  }
  gRNA_b_gene.getSequenceConstraint("String_Node_Str");
  CRISPR_Template.setName("String_Node_Str");
  if (CRISPR_Template.isSetName()) {
    CRISPR_Template.unsetName();
    CRISPR_Template.setName("String_Node_Str");
  }
  CRISPR_Template.setDescription("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  URI gRNA_b_gene_role2=URI.create("String_Node_Str");
  gRNA_b_gene.addRole(gRNA_b_gene_role2);
  if (gRNA_b_gene.containsRole(gRNA_b_gene_role2)) {
    gRNA_b_gene.removeRole(gRNA_b_gene_role2);
  }
  gRNA_b_gene.clearRoles();
  if (!gRNA_b_gene.getRoles().isEmpty()) {
    System.out.println("String_Node_Str");
  }
  gRNA_b_gene.setRoles(new HashSet<URI>(Arrays.asList(SequenceOntology.PROMOTER)));
  CRP_b.clearSequences();
  CRP_b.addSequence("String_Node_Str");
  String prURI="String_Node_Str";
  String prPrefix="String_Node_Str";
  doc.addNamespace(URI.create(prURI),prPrefix);
  ComponentDefinition pConst=doc.getComponentDefinition("String_Node_Str",version);
  pConst.createAnnotation(new QName(prURI,"String_Node_Str",prPrefix),URI.create("String_Node_Str"));
  String myersLabURI="String_Node_Str";
  String myersLabPrefix="String_Node_Str";
  doc.addNamespace(URI.create(myersLabURI),myersLabPrefix);
  GenericTopLevel datasheet=doc.createGenericTopLevel("String_Node_Str","String_Node_Str",new QName(myersLabURI,"String_Node_Str",myersLabPrefix));
  datasheet.setName("String_Node_Str");
  datasheet.createAnnotation(new QName(myersLabURI,"String_Node_Str",myersLabPrefix),URI.create(myersLabURI + "String_Node_Str"));
  datasheet.createAnnotation(new QName(myersLabURI,"String_Node_Str",myersLabPrefix),0.75);
  pConst.createAnnotation(new QName(myersLabURI,"String_Node_Str",myersLabPrefix),datasheet.getIdentity());
  ComponentDefinition pConst_alt=(ComponentDefinition)doc.createCopy(pConst,"String_Node_Str");
  Sequence pConst_alt_seq=doc.createSequence("String_Node_Str",version,"String_Node_Str",Sequence.IUPAC_DNA);
  pConst_alt.addSequence(pConst_alt_seq);
  SBOLValidate.validateSBOL(doc,true,true,true);
  if (SBOLValidate.getNumErrors() > 0) {
    for (    String error : SBOLValidate.getErrors()) {
      System.out.println(error);
    }
    return;
  }
  try {
    SBOLWriter.write(doc,(System.out));
  }
 catch (  XMLStreamException|FactoryConfigurationError|CoreIoException e) {
    e.printStackTrace();
  }
  try {
    SBOLWriter.write(doc,"String_Node_Str");
  }
 catch (  XMLStreamException|FactoryConfigurationError|CoreIoException|IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws URISyntaxException, SBOLValidationException {
  SBOLDocument doc=new SBOLDocument();
  doc.setDefaultURIprefix("String_Node_Str");
  doc.setComplete(true);
  doc.setCreateDefaults(true);
  String version="String_Node_Str";
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.PROTEIN);
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.RNA).addRole(SequenceOntology.SGRNA);
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.COMPLEX);
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA).addRole(SequenceOntology.PROMOTER);
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.PROTEIN);
  ModuleDefinition CRISPR_Template=doc.createModuleDefinition("String_Node_Str",version);
  Interaction Cas9Complex_Formation=CRISPR_Template.createInteraction("String_Node_Str",SystemsBiologyOntology.NON_COVALENT_BINDING);
  Cas9Complex_Formation.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Cas9Complex_Formation.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Cas9Complex_Formation.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PRODUCT);
  Interaction EYFP_production=CRISPR_Template.createInteraction("String_Node_Str",SystemsBiologyOntology.GENETIC_PRODUCTION);
  EYFP_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PROMOTER);
  EYFP_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PRODUCT);
  Interaction target_generic_gene_inhibition=CRISPR_Template.createInteraction("String_Node_Str",SystemsBiologyOntology.INHIBITION);
  target_generic_gene_inhibition.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.INHIBITOR);
  target_generic_gene_inhibition.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PROMOTER);
  String CRa_U6_seq_elements="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  doc.createSequence("String_Node_Str",version,CRa_U6_seq_elements,Sequence.IUPAC_DNA);
  String gRNA_b_elements="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  doc.createSequence("String_Node_Str",version,gRNA_b_elements,Sequence.IUPAC_DNA);
  String mKate_seq_elements="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  doc.createSequence("String_Node_Str",version,mKate_seq_elements,Sequence.IUPAC_DNA);
  String CRP_b_seq_elements="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  doc.createSequence("String_Node_Str",version,CRP_b_seq_elements,Sequence.IUPAC_DNA);
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA).addRole(SequenceOntology.PROMOTER);
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA).addRole(SequenceOntology.CDS);
  ComponentDefinition cas9m_BFP_gene=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  cas9m_BFP_gene.addRole(SequenceOntology.PROMOTER);
  cas9m_BFP_gene.createSequenceConstraint("String_Node_Str",RestrictionType.PRECEDES,"String_Node_Str","String_Node_Str");
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.PROTEIN);
  ComponentDefinition CRa_U6=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  CRa_U6.addRole(SequenceOntology.PROMOTER);
  CRa_U6.addSequence("String_Node_Str");
  ComponentDefinition gRNA_b_nc=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  gRNA_b_nc.addRole(SequenceOntology.CDS);
  gRNA_b_nc.addSequence("String_Node_Str");
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA).addRole(SequenceOntology.TERMINATOR);
  ComponentDefinition gRNA_b_gene=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  gRNA_b_gene.addRole(SequenceOntology.PROMOTER);
  gRNA_b_gene.createSequenceConstraint("String_Node_Str",RestrictionType.PRECEDES,"String_Node_Str","String_Node_Str");
  gRNA_b_gene.createSequenceConstraint("String_Node_Str",RestrictionType.PRECEDES,"String_Node_Str","String_Node_Str");
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.RNA).addRole(SequenceOntology.SGRNA);
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.COMPLEX);
  ComponentDefinition mKate_cds=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  mKate_cds.addRole(SequenceOntology.CDS);
  mKate_cds.addSequence("String_Node_Str");
  ComponentDefinition mKate_gene=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  mKate_gene.addRole(SequenceOntology.PROMOTER);
  mKate_gene.createSequenceConstraint("String_Node_Str",RestrictionType.PRECEDES,"String_Node_Str","String_Node_Str");
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.PROTEIN);
  ComponentDefinition Gal4VP16_cds=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  Gal4VP16_cds.addRole(SequenceOntology.CDS);
  ComponentDefinition Gal4VP16_gene=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  Gal4VP16_gene.addRole(SequenceOntology.PROMOTER);
  Gal4VP16_gene.createSequenceConstraint("String_Node_Str",RestrictionType.PRECEDES,"String_Node_Str","String_Node_Str");
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.PROTEIN);
  ComponentDefinition CRP_b=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  CRP_b.addRole(SequenceOntology.PROMOTER);
  CRP_b.addSequence("String_Node_Str");
  ComponentDefinition EYFP_cds=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  EYFP_cds.addRole(SequenceOntology.CDS);
  ComponentDefinition EYFP_gene=doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.DNA);
  EYFP_gene.addRole(SequenceOntology.PROMOTER);
  EYFP_gene.createSequenceConstraint("String_Node_Str",RestrictionType.PRECEDES,"String_Node_Str","String_Node_Str");
  doc.createComponentDefinition("String_Node_Str",version,ComponentDefinition.PROTEIN);
  ModuleDefinition CRPb_circuit=doc.createModuleDefinition("String_Node_Str",version);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  CRPb_circuit.createFunctionalComponent("String_Node_Str",AccessType.PRIVATE,"String_Node_Str",version,DirectionType.NONE);
  Interaction mKate_production=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.GENETIC_PRODUCTION);
  mKate_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PRODUCT);
  mKate_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PROMOTER);
  Interaction GAL4VP16_production=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.GENETIC_PRODUCTION);
  GAL4VP16_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PROMOTER);
  GAL4VP16_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PRODUCT);
  Interaction cas9m_BFP_production=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.GENETIC_PRODUCTION);
  cas9m_BFP_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PROMOTER);
  cas9m_BFP_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PRODUCT);
  Interaction gRNA_b_production=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.GENETIC_PRODUCTION);
  gRNA_b_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PROMOTER);
  gRNA_b_production.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PRODUCT);
  Interaction EYFP_Activation=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.STIMULATION);
  EYFP_Activation.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.STIMULATOR);
  EYFP_Activation.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.PROMOTER);
  Interaction mKate_deg=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.DEGRADATION);
  mKate_deg.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Interaction GAL4VP16_deg=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.DEGRADATION);
  GAL4VP16_deg.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Interaction cas9m_BFP_deg=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.DEGRADATION);
  cas9m_BFP_deg.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Interaction gRNA_b_deg=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.DEGRADATION);
  gRNA_b_deg.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Interaction EYFP_deg=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.DEGRADATION);
  EYFP_deg.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Interaction cas9m_BFP_gRNA_b_deg=CRPb_circuit.createInteraction("String_Node_Str",SystemsBiologyOntology.DEGRADATION);
  cas9m_BFP_gRNA_b_deg.createParticipation("String_Node_Str","String_Node_Str",SystemsBiologyOntology.REACTANT);
  Module Template_Module=CRPb_circuit.createModule("String_Node_Str","String_Node_Str",version);
  Template_Module.createMapsTo("String_Node_Str",RefinementType.USELOCAL,"String_Node_Str","String_Node_Str");
  Template_Module.createMapsTo("String_Node_Str",RefinementType.USELOCAL,"String_Node_Str","String_Node_Str");
  Template_Module.createMapsTo("String_Node_Str",RefinementType.USELOCAL,"String_Node_Str","String_Node_Str");
  Template_Module.createMapsTo("String_Node_Str",RefinementType.USELOCAL,"String_Node_Str","String_Node_Str");
  Template_Module.createMapsTo("String_Node_Str",RefinementType.USELOCAL,"String_Node_Str","String_Node_Str");
  ComponentDefinition cas9_generic1=doc.getComponentDefinition("String_Node_Str",version);
  ComponentDefinition cas9_generic2=doc.getComponentDefinition("String_Node_Str",null);
  if (cas9_generic1.equals(cas9_generic2)) {
    System.out.println("String_Node_Str");
  }
  gRNA_b_gene.getSequenceConstraint("String_Node_Str");
  CRISPR_Template.setName("String_Node_Str");
  if (CRISPR_Template.isSetName()) {
    CRISPR_Template.unsetName();
    CRISPR_Template.setName("String_Node_Str");
  }
  CRISPR_Template.setDescription("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  URI gRNA_b_gene_role2=URI.create("String_Node_Str");
  gRNA_b_gene.addRole(gRNA_b_gene_role2);
  if (gRNA_b_gene.containsRole(gRNA_b_gene_role2)) {
    gRNA_b_gene.removeRole(gRNA_b_gene_role2);
  }
  gRNA_b_gene.clearRoles();
  if (!gRNA_b_gene.getRoles().isEmpty()) {
    System.out.println("String_Node_Str");
  }
  gRNA_b_gene.setRoles(new HashSet<URI>(Arrays.asList(SequenceOntology.PROMOTER)));
  CRP_b.clearSequences();
  CRP_b.addSequence("String_Node_Str");
  String prURI="String_Node_Str";
  String prPrefix="String_Node_Str";
  doc.addNamespace(URI.create(prURI),prPrefix);
  ComponentDefinition pConst=doc.getComponentDefinition("String_Node_Str",version);
  pConst.createAnnotation(new QName(prURI,"String_Node_Str",prPrefix),URI.create("String_Node_Str"));
  String myersLabURI="String_Node_Str";
  String myersLabPrefix="String_Node_Str";
  doc.addNamespace(URI.create(myersLabURI),myersLabPrefix);
  GenericTopLevel datasheet=doc.createGenericTopLevel("String_Node_Str","String_Node_Str",new QName(myersLabURI,"String_Node_Str",myersLabPrefix));
  datasheet.setName("String_Node_Str");
  datasheet.createAnnotation(new QName(myersLabURI,"String_Node_Str",myersLabPrefix),URI.create(myersLabURI + "String_Node_Str"));
  datasheet.createAnnotation(new QName(myersLabURI,"String_Node_Str",myersLabPrefix),0.75);
  pConst.createAnnotation(new QName(myersLabURI,"String_Node_Str",myersLabPrefix),datasheet.getIdentity());
  ComponentDefinition pConst_alt=(ComponentDefinition)doc.createCopy(pConst,"String_Node_Str");
  Sequence pConst_alt_seq=doc.createSequence("String_Node_Str",version,"String_Node_Str",Sequence.IUPAC_DNA);
  pConst_alt.addSequence(pConst_alt_seq);
  SBOLValidate.validateSBOL(doc,true,true,true);
  if (SBOLValidate.getNumErrors() > 0) {
    for (    String error : SBOLValidate.getErrors()) {
      System.out.println(error);
    }
    return;
  }
  try {
    SBOLWriter.write(doc,(System.out));
  }
 catch (  FactoryConfigurationError|SBOLConversionException e) {
    e.printStackTrace();
  }
  try {
    SBOLWriter.write(doc,"String_Node_Str");
  }
 catch (  FactoryConfigurationError|IOException|SBOLConversionException e) {
    e.printStackTrace();
  }
}