nus-yam/ex-repair huggingface dataset:
Program: 12589
Project: 12589
Buggy source:
@Override protected boolean checkDescendantsURIcompliance(){
  return isTopLevelURIformCompliant(this.getIdentity());
}

Fixed version (ground truth):
@Override protected void checkDescendantsURIcompliance() throws SBOLValidationException {
  URIcompliance.isTopLevelURIformCompliant(this.getIdentity());
}
Program: 12594
Project: 12594
Buggy source:
/** 
 * Validate SBOL objects are compliant in the given   {@code sbolDocument}.
 * @param sbolDocument
 * @throws SBOLValidationException if any top-level objects or any of their children or grandchildren in the given  {@code sbolDocument} contain a non-compliant URI.
 */
static void validateCompliance(SBOLDocument sbolDocument){
  for (  Collection collection : sbolDocument.getCollections()) {
    if (!URIcompliance.isTopLevelURIcompliant(collection) || !collection.checkDescendantsURIcompliance()) {
      errors.add("String_Node_Str" + collection.getIdentity() + "String_Node_Str");
    }
  }
  for (  Sequence sequence : sbolDocument.getSequences()) {
    if (!URIcompliance.isTopLevelURIcompliant(sequence) || !sequence.checkDescendantsURIcompliance()) {
      errors.add("String_Node_Str" + sequence.getIdentity() + "String_Node_Str");
    }
  }
  for (  ComponentDefinition componentDefinition : sbolDocument.getComponentDefinitions()) {
    if (!URIcompliance.isTopLevelURIcompliant(componentDefinition) || !componentDefinition.checkDescendantsURIcompliance()) {
      errors.add("String_Node_Str" + componentDefinition.getIdentity() + "String_Node_Str");
    }
  }
  for (  ModuleDefinition moduleDefinition : sbolDocument.getModuleDefinitions()) {
    if (!URIcompliance.isTopLevelURIcompliant(moduleDefinition) || !moduleDefinition.checkDescendantsURIcompliance())     errors.add("String_Node_Str" + moduleDefinition.getIdentity() + "String_Node_Str");
  }
  for (  Model model : sbolDocument.getModels()) {
    if (!URIcompliance.isTopLevelURIcompliant(model) || !model.checkDescendantsURIcompliance())     errors.add("String_Node_Str" + model.getIdentity() + "String_Node_Str");
  }
  for (  GenericTopLevel genericTopLevel : sbolDocument.getGenericTopLevels()) {
    if (!URIcompliance.isTopLevelURIcompliant(genericTopLevel) || !genericTopLevel.checkDescendantsURIcompliance())     errors.add("String_Node_Str" + genericTopLevel.getIdentity() + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Validate SBOL objects are compliant in the given   {@code sbolDocument}.
 * @param sbolDocument
 * @throws SBOLValidationException if any top-level objects or any of their children or grandchildren in the given  {@code sbolDocument} contain a non-compliant URI.
 */
static void validateCompliance(SBOLDocument sbolDocument){
  for (  TopLevel topLevel : sbolDocument.getTopLevels()) {
    try {
      topLevel.isURIcompliant();
    }
 catch (    SBOLValidationException e) {
      errors.add(e.getMessage());
    }
  }
}
Program: 12595
Project: 12595
Buggy source:
@Override protected boolean checkDescendantsURIcompliance(){
  return isTopLevelURIformCompliant(this.getIdentity());
}

Fixed version (ground truth):
@Override protected void checkDescendantsURIcompliance() throws SBOLValidationException {
  URIcompliance.isTopLevelURIformCompliant(this.getIdentity());
}
Program: 12596
Project: 12596
Buggy source:
/** 
 * Adds the specified instance to the list of components.
 * @throws SBOLValidationException 
 */
void addComponent(Component component) throws SBOLValidationException {
  component.setSBOLDocument(this.sbolDocument);
  component.setComponentDefinition(this);
  if (sbolDocument != null && sbolDocument.isComplete()) {
    if (component.getDefinition() == null) {
      throw new SBOLValidationException("String_Node_Str",component);
    }
  }
  Set<URI> visited=new HashSet<>();
  visited.add(this.getIdentity());
  if (SBOLValidate.checkComponentDefinitionCycle(sbolDocument,component.getDefinition(),visited)) {
    throw new SBOLValidationException("String_Node_Str" + component.getIdentity() + "String_Node_Str");
  }
  addChildSafely(component,components,"String_Node_Str",sequenceAnnotations,sequenceConstraints);
  for (  MapsTo mapsTo : component.getMapsTos()) {
    mapsTo.setSBOLDocument(sbolDocument);
    mapsTo.setComponentDefinition(this);
    mapsTo.setComponentInstance(component);
  }
}

Fixed version (ground truth):
/** 
 * Adds the specified instance to the list of components.
 * @throws SBOLValidationException 
 */
void addComponent(Component component) throws SBOLValidationException {
  component.setSBOLDocument(this.sbolDocument);
  component.setComponentDefinition(this);
  if (sbolDocument != null && sbolDocument.isComplete()) {
    if (component.getDefinition() == null) {
      throw new SBOLValidationException("String_Node_Str",component);
    }
  }
  Set<URI> visited=new HashSet<>();
  visited.add(this.getIdentity());
  SBOLValidate.checkComponentDefinitionCycle(sbolDocument,component.getDefinition(),visited);
  addChildSafely(component,components,"String_Node_Str",sequenceAnnotations,sequenceConstraints);
  for (  MapsTo mapsTo : component.getMapsTos()) {
    mapsTo.setSBOLDocument(sbolDocument);
    mapsTo.setComponentDefinition(this);
    mapsTo.setComponentInstance(component);
  }
}
Program: 12597
Project: 12597
Buggy source:
/** 
 * Sets the   {@code wasDerivedFrom} property of this object to the specified one.<p> If this object belongs to an SBOLDocument instance, then the SBOLDcouement instance is checked for compliance first. Only a compliant SBOLDocument instance is allowed to be edited.
 * @param wasDerivedFrom The URI for with an SBOL object with this property refers to another SBOL object or non-SBOL resource from which this object was derived
 * @throws SBOLValidationException if the associated SBOLDocument is not compliant.
 */
public void setWasDerivedFrom(URI wasDerivedFrom) throws SBOLValidationException {
  if (sbolDocument != null) {
    sbolDocument.checkReadOnly();
    if (!SBOLValidate.checkWasDerivedFromVersion(sbolDocument,this,wasDerivedFrom)) {
      throw new SBOLValidationException("String_Node_Str",this);
    }
    if (SBOLValidate.checkWasDerivedFromCycle(sbolDocument,this,wasDerivedFrom,new HashSet<URI>())) {
      throw new SBOLValidationException("String_Node_Str" + getIdentity() + "String_Node_Str");
    }
  }
  this.wasDerivedFrom=wasDerivedFrom;
}

Fixed version (ground truth):
/** 
 * Sets the   {@code wasDerivedFrom} property of this object to the specified one.<p> If this object belongs to an SBOLDocument instance, then the SBOLDcouement instance is checked for compliance first. Only a compliant SBOLDocument instance is allowed to be edited.
 * @param wasDerivedFrom The URI for with an SBOL object with this property refers to another SBOL object or non-SBOL resource from which this object was derived
 * @throws SBOLValidationException if the associated SBOLDocument is not compliant.
 */
public void setWasDerivedFrom(URI wasDerivedFrom) throws SBOLValidationException {
  if (sbolDocument != null) {
    sbolDocument.checkReadOnly();
    if (!SBOLValidate.checkWasDerivedFromVersion(sbolDocument,this,wasDerivedFrom)) {
      throw new SBOLValidationException("String_Node_Str",this);
    }
    SBOLValidate.checkWasDerivedFromCycle(sbolDocument,this,wasDerivedFrom,new HashSet<URI>());
  }
  this.wasDerivedFrom=wasDerivedFrom;
}
Program: 12598
Project: 12598
Buggy source:
/** 
 * Adds the given   {@code module} argument to this ModuleDefinition's list ofModule instances, and then associates it with the SBOLDocument instance that also contains this ModuleDefinition object.
 * @param module
 * @throws SBOLValidationException 
 */
void addModule(Module module) throws SBOLValidationException {
  module.setSBOLDocument(this.sbolDocument);
  module.setModuleDefinition(this);
  if (sbolDocument != null && sbolDocument.isComplete()) {
    if (module.getDefinition() == null) {
      throw new SBOLValidationException("String_Node_Str",module);
    }
  }
  Set<URI> visited=new HashSet<>();
  visited.add(this.getIdentity());
  if (SBOLValidate.checkModuleDefinitionCycle(sbolDocument,module.getDefinition(),visited)) {
    throw new SBOLValidationException("String_Node_Str",module);
  }
  addChildSafely(module,modules,"String_Node_Str",functionalComponents,interactions);
  for (  MapsTo mapsTo : module.getMapsTos()) {
    mapsTo.setSBOLDocument(sbolDocument);
    mapsTo.setModuleDefinition(this);
    mapsTo.setModule(module);
  }
}

Fixed version (ground truth):
/** 
 * Adds the given   {@code module} argument to this ModuleDefinition's list ofModule instances, and then associates it with the SBOLDocument instance that also contains this ModuleDefinition object.
 * @param module
 * @throws SBOLValidationException 
 */
void addModule(Module module) throws SBOLValidationException {
  module.setSBOLDocument(this.sbolDocument);
  module.setModuleDefinition(this);
  if (sbolDocument != null && sbolDocument.isComplete()) {
    if (module.getDefinition() == null) {
      throw new SBOLValidationException("String_Node_Str",module);
    }
  }
  Set<URI> visited=new HashSet<>();
  visited.add(this.getIdentity());
  SBOLValidate.checkModuleDefinitionCycle(sbolDocument,module.getDefinition(),visited);
  addChildSafely(module,modules,"String_Node_Str",functionalComponents,interactions);
  for (  MapsTo mapsTo : module.getMapsTos()) {
    mapsTo.setSBOLDocument(sbolDocument);
    mapsTo.setModuleDefinition(this);
    mapsTo.setModule(module);
  }
}
Program: 12599
Project: 12599
Buggy source:
protected static boolean checkWasDerivedFromCycle(SBOLDocument sbolDocument,Identified identified,URI wasDerivedFrom,Set<URI> visited){
  visited.add(identified.getIdentity());
  TopLevel tl=sbolDocument.getTopLevel(wasDerivedFrom);
  if (tl != null) {
    if (visited.contains(tl.getIdentity()))     return true;
    if (tl.isSetWasDerivedFrom()) {
      if (checkWasDerivedFromCycle(sbolDocument,tl,tl.getWasDerivedFrom(),visited))       return true;
    }
 else {
      return false;
    }
  }
  visited.remove(identified.getIdentity());
  return false;
}

Fixed version (ground truth):
protected static void checkWasDerivedFromCycle(SBOLDocument sbolDocument,Identified identified,URI wasDerivedFrom,Set<URI> visited) throws SBOLValidationException {
  visited.add(identified.getIdentity());
  TopLevel tl=sbolDocument.getTopLevel(wasDerivedFrom);
  if (tl != null) {
    if (visited.contains(tl.getIdentity())) {
      throw new SBOLValidationException("String_Node_Str",identified);
    }
    if (tl.isSetWasDerivedFrom()) {
      try {
        checkWasDerivedFromCycle(sbolDocument,tl,tl.getWasDerivedFrom(),visited);
      }
 catch (      SBOLValidationException e) {
        throw new SBOLValidationException("String_Node_Str",identified);
      }
    }
 else {
      return;
    }
  }
  visited.remove(identified.getIdentity());
  return;
}
Program: 12600
Project: 12600
Buggy source:
/** 
 * Validate if there are circular references in given   {@code sbolDocument}.
 * @param sbolDocument
 */
static void validateCircularReferences(SBOLDocument sbolDocument){
  for (  TopLevel topLevel : sbolDocument.getTopLevels()) {
    if (topLevel.isSetWasDerivedFrom()) {
      if (checkWasDerivedFromCycle(sbolDocument,topLevel,topLevel.getWasDerivedFrom(),new HashSet<URI>())) {
        errors.add("String_Node_Str" + topLevel.getIdentity() + "String_Node_Str");
      }
    }
  }
  for (  ComponentDefinition componentDefinition : sbolDocument.getComponentDefinitions()) {
    if (checkComponentDefinitionCycle(sbolDocument,componentDefinition,new HashSet<URI>())) {
      errors.add("String_Node_Str" + componentDefinition.getIdentity() + "String_Node_Str");
    }
  }
  for (  ModuleDefinition moduleDefinition : sbolDocument.getModuleDefinitions()) {
    if (checkModuleDefinitionCycle(sbolDocument,moduleDefinition,new HashSet<URI>())) {
      errors.add("String_Node_Str" + moduleDefinition.getIdentity() + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Validate if there are circular references in given   {@code sbolDocument}.
 * @param sbolDocument
 */
static void validateCircularReferences(SBOLDocument sbolDocument){
  for (  TopLevel topLevel : sbolDocument.getTopLevels()) {
    if (topLevel.isSetWasDerivedFrom()) {
      try {
        checkWasDerivedFromCycle(sbolDocument,topLevel,topLevel.getWasDerivedFrom(),new HashSet<URI>());
      }
 catch (      SBOLValidationException e) {
        errors.add(e.getMessage());
      }
    }
  }
  for (  ComponentDefinition componentDefinition : sbolDocument.getComponentDefinitions()) {
    try {
      checkComponentDefinitionCycle(sbolDocument,componentDefinition,new HashSet<URI>());
    }
 catch (    SBOLValidationException e) {
      errors.add(e.getMessage());
    }
  }
  for (  ModuleDefinition moduleDefinition : sbolDocument.getModuleDefinitions()) {
    try {
      checkModuleDefinitionCycle(sbolDocument,moduleDefinition,new HashSet<URI>());
    }
 catch (    SBOLValidationException e) {
      errors.add(e.getMessage());
    }
  }
}
Program: 12601
Project: 12601
Buggy source:
protected static boolean checkModuleDefinitionCycle(SBOLDocument sbolDocument,ModuleDefinition moduleDefinition,Set<URI> visited){
  if (moduleDefinition == null)   return false;
  visited.add(moduleDefinition.getIdentity());
  for (  Module module : moduleDefinition.getModules()) {
    ModuleDefinition md=module.getDefinition();
    if (md == null)     continue;
    if (visited.contains(md.getIdentity()))     return true;
    if (checkModuleDefinitionCycle(sbolDocument,md,visited))     return true;
  }
  visited.remove(moduleDefinition.getIdentity());
  return false;
}

Fixed version (ground truth):
protected static void checkModuleDefinitionCycle(SBOLDocument sbolDocument,ModuleDefinition moduleDefinition,Set<URI> visited) throws SBOLValidationException {
  if (moduleDefinition == null)   return;
  visited.add(moduleDefinition.getIdentity());
  for (  Module module : moduleDefinition.getModules()) {
    ModuleDefinition md=module.getDefinition();
    if (md == null)     continue;
    if (visited.contains(md.getIdentity())) {
      throw new SBOLValidationException("String_Node_Str",module);
    }
    try {
      checkModuleDefinitionCycle(sbolDocument,md,visited);
    }
 catch (    SBOLValidationException e) {
      throw new SBOLValidationException("String_Node_Str",module);
    }
  }
  visited.remove(moduleDefinition.getIdentity());
  return;
}
Program: 12602
Project: 12602
Buggy source:
protected static boolean checkComponentDefinitionCycle(SBOLDocument sbolDocument,ComponentDefinition componentDefinition,Set<URI> visited){
  if (componentDefinition == null)   return false;
  visited.add(componentDefinition.getIdentity());
  for (  Component component : componentDefinition.getComponents()) {
    ComponentDefinition cd=component.getDefinition();
    if (cd == null)     continue;
    if (visited.contains(cd.getIdentity()))     return true;
    if (checkComponentDefinitionCycle(sbolDocument,cd,visited))     return true;
  }
  visited.remove(componentDefinition.getIdentity());
  return false;
}

Fixed version (ground truth):
protected static void checkComponentDefinitionCycle(SBOLDocument sbolDocument,ComponentDefinition componentDefinition,Set<URI> visited) throws SBOLValidationException {
  if (componentDefinition == null)   return;
  visited.add(componentDefinition.getIdentity());
  for (  Component component : componentDefinition.getComponents()) {
    ComponentDefinition cd=component.getDefinition();
    if (cd == null)     continue;
    if (visited.contains(cd.getIdentity())) {
      throw new SBOLValidationException("String_Node_Str",component);
    }
    try {
      checkComponentDefinitionCycle(sbolDocument,cd,visited);
    }
 catch (    SBOLValidationException e) {
      throw new SBOLValidationException("String_Node_Str",component);
    }
  }
  visited.remove(componentDefinition.getIdentity());
  return;
}
Program: 12603
Project: 12603
Buggy source:
/** 
 * Text which is written for users to read and interpret.  It should describe what the component is used for and/or what it does. Suggestion: it should provide information that cannot yet be represented in the rest of the DNA components computable fields. Do not include <> tags such as HTML or XML inside as that may break the RDF. Don't include {} tags as that may break the Json.
 * @param description human readable text describing the component
 */
@Override void setDescription(String description);

Fixed version (ground truth):
/** 
 * Text which is written for users to read and interpret.  It should describe what the component is used for and/or what it does. Suggestion: it should provide information that cannot yet be represented in the rest of the DNA components computable fields. Do not include tags such as HTML or XML inside as that may break the RDF. Don't include {} tags as that may break the Json.
 * @param description human readable text describing the component
 */
@Override void setDescription(String description);
Program: 12604
Project: 12604
Buggy source:
/** 
 * Creates a new URI from the Sequence Ontology namespace with the given local name. For example, the function call <value>term("SO_0000001")</value> will return the URI <value>http://purl.obolibrary.org/obo/SO_0000001</value>
 */
public static final URI type(String localName){
  return NAMESPACE.resolve(localName);
}

Fixed version (ground truth):
/** 
 * Creates a new URI from the Sequence Ontology namespace with the given local name. For example, the function call term("SO_0000001") will return the URI http://purl.obolibrary.org/obo/SO_0000001
 */
public static final URI type(String localName){
  return NAMESPACE.resolve(localName);
}
Program: 12606
Project: 12606
Buggy source:
@Test public void testValidation() throws CoreIoException, XMLStreamException, FactoryConfigurationError {
  File file_base=null;
  try {
    file_base=new File(ValidationTest.class.getResource("String_Node_Str").toURI());
  }
 catch (  URISyntaxException e1) {
    e1.printStackTrace();
  }
  File file;
  SBOLDocument doc=null;
  for (  File f : file_base.listFiles()) {
    file=new File(f.getAbsolutePath());
    System.out.println(f.getName().replace("String_Node_Str","String_Node_Str"));
    SBOLReader.setKeepGoing(true);
    try {
      doc=SBOLReader.read(file);
    }
 catch (    SBOLValidationException e) {
      e.printStackTrace();
    }
catch (    FileNotFoundException e) {
      e.printStackTrace();
    }
    SBOLValidate.validateSBOL(doc,true,true,true);
    if (SBOLReader.getNumErrors() > 0) {
      for (      String error : SBOLReader.getErrors()) {
        System.out.println("String_Node_Str" + error);
        if (!error.split("String_Node_Str")[0].equals((f.getName()).replace("String_Node_Str","String_Node_Str"))) {
        }
      }
    }
 else     if (SBOLValidate.getNumErrors() > 0) {
      for (      String error : SBOLValidate.getErrors()) {
        System.out.println("String_Node_Str" + error);
        if (!error.split("String_Node_Str")[0].equals(f.getName())) {
        }
      }
    }
 else {
    }
  }
}

Fixed version (ground truth):
@Test public void testValidation() throws CoreIoException, XMLStreamException, FactoryConfigurationError {
  File file_base=null;
  try {
    file_base=new File(ValidationTest.class.getResource("String_Node_Str").toURI());
  }
 catch (  URISyntaxException e1) {
    e1.printStackTrace();
  }
  File file;
  SBOLDocument doc=null;
  for (  File f : file_base.listFiles()) {
    file=new File(f.getAbsolutePath());
    System.out.println(f.getName().replace("String_Node_Str","String_Node_Str"));
    SBOLReader.setKeepGoing(true);
    try {
      doc=SBOLReader.read(file);
    }
 catch (    SBOLValidationException e) {
      e.printStackTrace();
    }
catch (    FileNotFoundException e) {
      e.printStackTrace();
    }
    SBOLValidate.validateSBOL(doc,true,true,true);
    if (SBOLReader.getNumErrors() > 0) {
      for (      String error : SBOLReader.getErrors()) {
        System.out.println("String_Node_Str" + error);
        if (!error.split("String_Node_Str")[0].equals((f.getName()).replace("String_Node_Str","String_Node_Str"))) {
        }
      }
    }
 else     if (SBOLValidate.getNumErrors() > 0) {
      for (      String error : SBOLValidate.getErrors()) {
        System.out.println("String_Node_Str" + error);
        if (!error.split("String_Node_Str")[0].equals(f.getName().replace("String_Node_Str","String_Node_Str"))) {
        }
      }
    }
 else {
    }
  }
}
Program: 12609
Project: 12609
Buggy source:
public static void validateSBOL(SBOLDocument sbolDocument,boolean complete,boolean compliant,boolean bestPractice){
  clearErrors();
  validateSequenceEncodings(sbolDocument);
  validateWasDerivedFromVersion(sbolDocument);
  validateCircularReferences(sbolDocument);
  validateURIuniqueness(sbolDocument);
  if (compliant)   validateCompliance(sbolDocument);
  if (complete)   validateCompleteness(sbolDocument);
  if (bestPractice)   validateOntologyUsage(sbolDocument);
}

Fixed version (ground truth):
public static void validateSBOL(SBOLDocument sbolDocument,boolean complete,boolean compliant,boolean bestPractice){
  clearErrors();
  validateSequenceEncodings(sbolDocument);
  validateWasDerivedFromVersion(sbolDocument);
  validateCircularReferences(sbolDocument);
  validateURIuniqueness(sbolDocument);
  if (compliant)   validateCompliance(sbolDocument);
  if (complete)   validateCompleteness(sbolDocument);
  if (bestPractice) {
    validateOntologyUsage(sbolDocument);
    validateSequenceAnnotations(sbolDocument);
  }
}
Program: 12610
Project: 12610
Buggy source:
/** 
 * Creates a Range instance with the given arguments and then adds to this SequenceAnnotation object's list of locations. <p> This method creates the Range instance's identity URI with the persistent identity of this SequenceAnnotation object, the given   {@code displayId} of the Range instance. The orientation propertyof the created Range instance is set to the given  {@code orientation}.
 * @param displayId
 * @param start
 * @param end
 * @param orientation
 */
public void addRange(String displayId,int start,int end,OrientationType orientation){
  URI identity=createCompliantURI(this.getPersistentIdentity().toString(),displayId,this.getVersion());
  Range range=new Range(identity,start,end);
  range.setOrientation(orientation);
  addLocation(range);
}

Fixed version (ground truth):
/** 
 * Creates a Range instance with the given arguments and then adds to this SequenceAnnotation object's list of locations. <p> This method creates the Range instance's identity URI with the persistent identity of this SequenceAnnotation object, the given   {@code displayId} of the Range instance. The orientation propertyof the created Range instance is set to the given  {@code orientation}.
 * @param displayId
 * @param start
 * @param end
 * @param orientation
 */
public void addRange(String displayId,int start,int end,OrientationType orientation){
  URI identity=createCompliantURI(this.getPersistentIdentity().toString(),displayId,this.getVersion());
  Range range=new Range(identity,start,end);
  range.setPersistentIdentity(createCompliantURI(this.getPersistentIdentity().toString(),displayId,"String_Node_Str"));
  range.setDisplayId(displayId);
  range.setVersion(this.getVersion());
  range.setOrientation(orientation);
  addLocation(range);
}
Program: 12611
Project: 12611
Buggy source:
/** 
 * Creates a Cut instance with the given arguments and then adds to this SequenceAnnotation object's list of locations. <p> This method creates the Cut instance's identity URI with the persistent identity of this SequenceAnnotation object, the given   {@code displayId} of the Cut instance. The orientation propertyof the created Cut instance is set to the given  {@code orientation}.
 * @param displayId
 * @param at
 * @param orientation
 */
public void addCut(String displayId,int at,OrientationType orientation){
  URI identity=createCompliantURI(this.getPersistentIdentity().toString(),displayId,this.getVersion());
  Cut cut=new Cut(identity,at);
  cut.setOrientation(orientation);
  addLocation(cut);
}

Fixed version (ground truth):
/** 
 * Creates a Cut instance with the given arguments and then adds to this SequenceAnnotation object's list of locations. <p> This method creates the Cut instance's identity URI with the persistent identity of this SequenceAnnotation object, the given   {@code displayId} of the Cut instance. The orientation propertyof the created Cut instance is set to the given  {@code orientation}.
 * @param displayId
 * @param at
 * @param orientation
 */
public void addCut(String displayId,int at,OrientationType orientation){
  URI identity=createCompliantURI(this.getPersistentIdentity().toString(),displayId,this.getVersion());
  Cut cut=new Cut(identity,at);
  cut.setPersistentIdentity(createCompliantURI(this.getPersistentIdentity().toString(),displayId,"String_Node_Str"));
  cut.setDisplayId(displayId);
  cut.setVersion(this.getVersion());
  cut.setOrientation(orientation);
  addLocation(cut);
}
Program: 12612
Project: 12612
Buggy source:
/** 
 * Creates a GenericLocation instance with the given arguments and then adds to this SequenceAnnotation object's list of locations. <p> This method creates the GenericLocation instance's identity URI with the persistent identity of this SequenceAnnotation object, the given   {@code displayId} of the GenericLocation instance. The orientation property of the created GenericLocation instance is set to the given  {@code orientation}.
 * @param displayId
 * @param orientation
 */
public void addGenericLocation(String displayId,OrientationType orientation){
  URI identity=createCompliantURI(this.getPersistentIdentity().toString(),displayId,this.getVersion());
  GenericLocation genericLocation=new GenericLocation(identity);
  genericLocation.setOrientation(orientation);
  addLocation(genericLocation);
}

Fixed version (ground truth):
/** 
 * Creates a GenericLocation instance with the given arguments and then adds to this SequenceAnnotation object's list of locations. <p> This method creates the GenericLocation instance's identity URI with the persistent identity of this SequenceAnnotation object, the given   {@code displayId} of the GenericLocation instance. The orientation property of the created GenericLocation instance is set to the given  {@code orientation}.
 * @param displayId
 * @param orientation
 */
public void addGenericLocation(String displayId,OrientationType orientation){
  URI identity=createCompliantURI(this.getPersistentIdentity().toString(),displayId,this.getVersion());
  GenericLocation genericLocation=new GenericLocation(identity);
  genericLocation.setPersistentIdentity(createCompliantURI(this.getPersistentIdentity().toString(),displayId,"String_Node_Str"));
  genericLocation.setDisplayId(displayId);
  genericLocation.setVersion(this.getVersion());
  genericLocation.setOrientation(orientation);
  addLocation(genericLocation);
}
Program: 12613
Project: 12613
Buggy source:
/** 
 * Top level types
 */
public static void main(String[] args) throws XMLStreamException, FactoryConfigurationError, CoreIoException {
  SBOLDocument doc=new SBOLDocument();
  doc.createCollection("String_Node_Str","String_Node_Str","String_Node_Str");
  doc.createCollection("String_Node_Str","String_Node_Str","String_Node_Str");
  get_myParts(SBOL2Doc_test);
}

Fixed version (ground truth):
/** 
 * Top level types
 */
public static void main(String[] args) throws XMLStreamException, FactoryConfigurationError, CoreIoException {
  get_myParts(sbolDocument);
  ComponentDefinition cd=sbolDocument.getComponentDefinition("String_Node_Str","String_Node_Str");
  SequenceAnnotation sa=cd.getSequenceAnnotation("String_Node_Str");
  sa.addCut("String_Node_Str",12);
  SBOLValidate.validateSBOL(sbolDocument,true,true,true);
  if (SBOLValidate.getNumErrors() > 0) {
    for (    String error : SBOLValidate.getErrors()) {
      System.out.println(error);
    }
  }
}
Program: 12614
Project: 12614
Buggy source:
/** 
 * Sets the reference component URI to the given   {@code componentURI}. <p> If this SequenceAnnotation object belongs to an SBOLDocument instance, then the SBOLDcouement instance is checked for compliance first. Only a compliant SBOLDocument instance is allowed to be edited.
 * @param componentURI
 * @throws SBOLValidationException if the associated SBOLDocument is not compliant
 * @throws IllegalArgumentException if the associated ComponentDefinition object is not {@code null}, and the given   {@code componentURI} does not exist in its associated ComponentDefinition object'slist of Component instances.
 */
public void setComponent(URI componentURI){
  if (sbolDocument != null)   sbolDocument.checkReadOnly();
  if (componentDefinition != null) {
    if (componentDefinition.getComponent(componentURI) == null) {
      throw new IllegalArgumentException("String_Node_Str" + componentURI + "String_Node_Str");
    }
    for (    SequenceAnnotation sa : componentDefinition.getSequenceAnnotations()) {
      if (sa.isSetComponent() && sa.getComponentURI().equals(componentURI)) {
        throw new SBOLValidationException("String_Node_Str");
      }
    }
  }
  this.component=componentURI;
}

Fixed version (ground truth):
/** 
 * Sets the reference component URI to the given   {@code componentURI}. <p> If this SequenceAnnotation object belongs to an SBOLDocument instance, then the SBOLDcouement instance is checked for compliance first. Only a compliant SBOLDocument instance is allowed to be edited.
 * @param componentURI
 * @throws SBOLValidationException if the associated SBOLDocument is not compliant
 * @throws IllegalArgumentException if the associated ComponentDefinition object is not {@code null}, and the given   {@code componentURI} does not exist in its associated ComponentDefinition object'slist of Component instances.
 */
public void setComponent(URI componentURI){
  if (sbolDocument != null)   sbolDocument.checkReadOnly();
  if (componentDefinition != null) {
    if (componentDefinition.getComponent(componentURI) == null) {
      throw new IllegalArgumentException("String_Node_Str" + componentURI + "String_Node_Str");
    }
    for (    SequenceAnnotation sa : componentDefinition.getSequenceAnnotations()) {
      if (sa.getIdentity().equals(this.getIdentity()))       continue;
      if (sa.isSetComponent() && sa.getComponentURI().equals(componentURI)) {
        throw new SBOLValidationException("String_Node_Str");
      }
    }
  }
  this.component=componentURI;
}
Program: 12617
Project: 12617
Buggy source:
static URI convertSeqOntologyV1(String term){
  String v1SO="String_Node_Str";
  String v2SO="String_Node_Str";
  String convertedSO=term;
  if (term.startsWith(v1SO)) {
    convertedSO=convertedSO.replace(v1SO,v2SO);
    return URI.create(convertedSO);
  }
  return URI.create(convertedSO);
}

Fixed version (ground truth):
static URI convertSeqOntologyV1(String term){
  String v1SO="String_Node_Str";
  String v2SO="String_Node_Str";
  String convertedSO=term;
  if (term.startsWith(v1SO)) {
    convertedSO=convertedSO.replace(v1SO,v2SO);
    return URI.create(convertedSO);
  }
 else   if (term.startsWith("String_Node_Str")) {
    convertedSO=convertedSO.replace("String_Node_Str",v2SO);
  }
 else   if (term.startsWith("String_Node_Str")) {
    convertedSO=convertedSO.replace("String_Node_Str",v2SO);
  }
  return URI.create(convertedSO);
}
Program: 12618
Project: 12618
Buggy source:
@Test public void test_singleComponentDefinition() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  Set<URI> type=SBOLTestUtils.getSetPropertyURI("String_Node_Str");
  Set<URI> role=SBOLTestUtils.getSetPropertyURI("String_Node_Str");
  ComponentDefinition pLac=document.createComponentDefinition("String_Node_Str",VERSION_1_0,type);
  pLac.setRoles(role);
  runTest("String_Node_Str",document,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void test_singleComponentDefinition() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  Set<URI> type=new HashSet<URI>();
  type.add(ComponentDefinition.DNA);
  Set<URI> role=new HashSet<URI>();
  role.add(SequenceOntology.PROMOTER);
  ComponentDefinition pLac=document.createComponentDefinition("String_Node_Str",VERSION_1_0,type);
  pLac.setRoles(role);
  runTest("String_Node_Str",document,"String_Node_Str");
}
Program: 12619
Project: 12619
Buggy source:
@Test public void test_CreateAndRemoveModel() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  Sequence s=document.createSequence("String_Node_Str",VERSION_1_0,"String_Node_Str",URI.create("String_Node_Str"));
  document.removeSequence(s);
  for (int i=1; i < 4; i++) {
    document.createCollection("String_Node_Str" + i,VERSION_1_0);
  }
  document.clearSequences();
  document.createSequence("String_Node_Str",VERSION_1_0,"String_Node_Str",URI.create("String_Node_Str"));
  runTest("String_Node_Str",document,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void test_CreateAndRemoveModel() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  Sequence s=document.createSequence("String_Node_Str",VERSION_1_0,"String_Node_Str",Sequence.IUPAC_DNA);
  document.removeSequence(s);
  for (int i=1; i < 4; i++) {
    document.createCollection("String_Node_Str" + i,VERSION_1_0);
  }
  document.clearSequences();
  document.createSequence("String_Node_Str",VERSION_1_0,"String_Node_Str",Sequence.IUPAC_DNA);
  runTest("String_Node_Str",document,"String_Node_Str");
}
Program: 12621
Project: 12621
Buggy source:
@Test public void test_Model_remove() throws Exception {
  String prURI="String_Node_Str";
  String prPrefix="String_Node_Str";
  SBOLDocument document=new SBOLDocument();
  document.setDefaultURIprefix(prURI);
  document.setTypesInURIs(true);
  document.addNamespace(URI.create(prURI),prPrefix);
  String M1_ID="String_Node_Str";
  String M1_Version="String_Node_Str";
  String M1_Source="String_Node_Str";
  String M1_Language="String_Node_Str";
  String M1_Framework="String_Node_Str";
  URI M1_URISource=URI.create(M1_Source);
  URI M1_URILanguage=URI.create(M1_Language);
  URI M1_URI_Framework=URI.create(M1_Framework);
  Model M1=document.createModel(M1_ID,M1_Version,M1_URISource,M1_URILanguage,M1_URI_Framework);
  document.removeModel(M1);
  runTest("String_Node_Str",document,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void test_Model_remove() throws Exception {
  String prURI="String_Node_Str";
  String prPrefix="String_Node_Str";
  SBOLDocument document=new SBOLDocument();
  document.setDefaultURIprefix(prURI);
  document.setTypesInURIs(true);
  document.addNamespace(URI.create(prURI),prPrefix);
  String M1_ID="String_Node_Str";
  String M1_Version="String_Node_Str";
  String M1_Source="String_Node_Str";
  URI M1_URISource=URI.create(M1_Source);
  Model M1=document.createModel(M1_ID,M1_Version,M1_URISource,Model.SBML,SystemsBiologyOntology.CONTINUOUS_FRAMEWORK);
  document.removeModel(M1);
  runTest("String_Node_Str",document,"String_Node_Str");
}
Program: 12622
Project: 12622
Buggy source:
@Test public void test_singleModel() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  String id="String_Node_Str";
  document.createModel(id,VERSION_1_0,URI.create(id + "String_Node_Str"),URI.create(id + "String_Node_Str"),URI.create(id + "String_Node_Str"));
  runTest("String_Node_Str",document,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void test_singleModel() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  String id="String_Node_Str";
  document.createModel(id,VERSION_1_0,URI.create(id + "String_Node_Str"),Model.SBML,SystemsBiologyOntology.CONTINUOUS_FRAMEWORK);
  runTest("String_Node_Str",document,"String_Node_Str");
}
Program: 12623
Project: 12623
Buggy source:
@Test public void test_CreateAndRemoveComponentDefintion() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  Set<URI> types=new HashSet<URI>();
  types.add((URI.create("String_Node_Str")));
  ComponentDefinition cd=document.createComponentDefinition("String_Node_Str",VERSION_1_0,types);
  document.removeComponentDefinition(cd);
  for (int i=1; i < 4; i++) {
    document.createComponentDefinition("String_Node_Str" + i,VERSION_1_0,types);
  }
  document.clearComponentDefinitions();
  document.createComponentDefinition("String_Node_Str",VERSION_1_0,types);
  runTest("String_Node_Str",document,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void test_CreateAndRemoveComponentDefintion() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  Set<URI> types=new HashSet<URI>();
  types.add(ComponentDefinition.PROTEIN);
  ComponentDefinition cd=document.createComponentDefinition("String_Node_Str",VERSION_1_0,types);
  document.removeComponentDefinition(cd);
  for (int i=1; i < 4; i++) {
    document.createComponentDefinition("String_Node_Str" + i,VERSION_1_0,types);
  }
  document.clearComponentDefinitions();
  document.createComponentDefinition("String_Node_Str",VERSION_1_0,types);
  runTest("String_Node_Str",document,"String_Node_Str");
}
Program: 12624
Project: 12624
Buggy source:
@Test public void test_singleFunctionalComponent() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  Set<URI> type=SBOLTestUtils.getSetPropertyURI("String_Node_Str");
  Set<URI> role=SBOLTestUtils.getSetPropertyURI("String_Node_Str");
  ComponentDefinition LacIIn=document.createComponentDefinition("String_Node_Str",VERSION_1_0,type);
  String compDef_id=LacIIn.getDisplayId();
  LacIIn.createComponent("String_Node_Str",AccessType.PUBLIC,compDef_id,VERSION_1_0);
  runTest("String_Node_Str",document,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void test_singleFunctionalComponent() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  Set<URI> type=new HashSet<URI>();
  type.add(ComponentDefinition.PROTEIN);
  ComponentDefinition LacIIn=document.createComponentDefinition("String_Node_Str",VERSION_1_0,type);
  String compDef_id=LacIIn.getDisplayId();
  LacIIn.createComponent("String_Node_Str",AccessType.PUBLIC,compDef_id,VERSION_1_0);
  runTest("String_Node_Str",document,"String_Node_Str");
}
Program: 12625
Project: 12625
Buggy source:
@Test public void test_multipleSquences() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  String id="String_Node_Str";
  String id2="String_Node_Str";
  String id3="String_Node_Str";
  document.createSequence(id,VERSION_1_0,id + "String_Node_Str",URI.create(id + "String_Node_Str"));
  document.createSequence(id2,VERSION_1_0,id2 + "String_Node_Str",URI.create(id2 + "String_Node_Str"));
  document.createSequence(id3,VERSION_1_0,id3 + "String_Node_Str",URI.create(id3 + "String_Node_Str"));
  runTest("String_Node_Str",document,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void test_multipleSquences() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  String id="String_Node_Str";
  String id2="String_Node_Str";
  String id3="String_Node_Str";
  document.createSequence(id,VERSION_1_0,id + "String_Node_Str",Sequence.IUPAC_DNA);
  document.createSequence(id2,VERSION_1_0,id2 + "String_Node_Str",Sequence.IUPAC_DNA);
  document.createSequence(id3,VERSION_1_0,id3 + "String_Node_Str",Sequence.IUPAC_DNA);
  runTest("String_Node_Str",document,"String_Node_Str");
}
Program: 12627
Project: 12627
Buggy source:
@Test public void test_singleSequence() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  String id="String_Node_Str";
  document.createSequence(id,VERSION_1_0,id + "String_Node_Str",URI.create(id + "String_Node_Str"));
  runTest("String_Node_Str",document,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void test_singleSequence() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  String id="String_Node_Str";
  document.createSequence(id,VERSION_1_0,id + "String_Node_Str",Sequence.IUPAC_DNA);
  runTest("String_Node_Str",document,"String_Node_Str");
}
Program: 12628
Project: 12628
Buggy source:
@Test public void test_SimpleModuleDefinition() throws Exception {
  SBOLDocument document=new SBOLDocument();
  setDefaultNameSpace(document,SBOLTestUtils.example.getNamespaceURI());
  document.setTypesInURIs(true);
  ModuleDefinition module=document.createModuleDefinition("String_Node_Str");
  FunctionalComponent cds=module.createFunctionalComponent("String_Node_Str",AccessType.PUBLIC,URI.create("String_Node_Str"),DirectionType.IN);
  FunctionalComponent protein=module.createFunctionalComponent("String_Node_Str",AccessType.PUBLIC,URI.create("String_Node_Str"),DirectionType.OUT);
  module.createInteraction("String_Node_Str",new HashSet<URI>(Arrays.asList(URI.create("String_Node_Str"))));
  runTest("String_Node_Str",document,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void test_SimpleModuleDefinition() throws Exception {
  SBOLDocument document=new SBOLDocument();
  setDefaultNameSpace(document,SBOLTestUtils.example.getNamespaceURI());
  document.setTypesInURIs(true);
  ModuleDefinition module=document.createModuleDefinition("String_Node_Str");
  FunctionalComponent cds=module.createFunctionalComponent("String_Node_Str",AccessType.PUBLIC,URI.create("String_Node_Str"),DirectionType.IN);
  FunctionalComponent protein=module.createFunctionalComponent("String_Node_Str",AccessType.PUBLIC,URI.create("String_Node_Str"),DirectionType.OUT);
  module.createInteraction("String_Node_Str",new HashSet<URI>(Arrays.asList(SystemsBiologyOntology.TRANSCRIPTION)));
  runTest("String_Node_Str",document,"String_Node_Str");
}
Program: 12629
Project: 12629
Buggy source:
@Test public void test_singleCompDef_withSeq() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  Set<URI> type=SBOLTestUtils.getSetPropertyURI("String_Node_Str");
  Set<URI> role=SBOLTestUtils.getSetPropertyURI("String_Node_Str");
  ComponentDefinition pLac=document.createComponentDefinition("String_Node_Str",VERSION_1_0,type);
  pLac.setRoles(role);
  runTest("String_Node_Str",document,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void test_singleCompDef_withSeq() throws Exception {
  SBOLDocument document=new SBOLDocument();
  document.setComplete(true);
  document.setDefaultURIprefix("String_Node_Str");
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  document.addNamespaceBinding(NamespaceBinding("String_Node_Str","String_Node_Str"));
  Set<URI> type=new HashSet<URI>();
  type.add(ComponentDefinition.DNA);
  Set<URI> role=new HashSet<URI>();
  role.add(SequenceOntology.PROMOTER);
  ComponentDefinition pLac=document.createComponentDefinition("String_Node_Str",VERSION_1_0,type);
  pLac.setRoles(role);
  runTest("String_Node_Str",document,"String_Node_Str");
}
Program: 12634
Project: 12634
Buggy source:
/** 
 * Extract the persistent identity URI from the given URI. The persistent identity is simply the identity URI without the version.
 * @return the extracted persistent identity URI, <code>null</code> otherwise.
 */
static String extractPersistentId(URI objURI){
  String URIstr=objURI.toString();
  Pattern r=Pattern.compile(genericURIpattern1);
  Matcher m=r.matcher(URIstr);
  if (m.matches()) {
    return m.group(1);
  }
 else {
    throw new IllegalArgumentException(objURI + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Extract the persistent identity URI from the given URI. The persistent identity is simply the identity URI without the version.
 * @return the extracted persistent identity URI, <code>null</code> otherwise.
 */
static String extractPersistentId(URI objURI){
  String URIstr=objURI.toString();
  Pattern r=Pattern.compile(genericURIpattern1);
  Matcher m=r.matcher(URIstr);
  if (m.matches()) {
    return m.group(1);
  }
 else {
    return null;
  }
}