nus-yam/ex-repair huggingface dataset:
Program: 12528
Project: 12528
Buggy source:
/** 
 * Returns   {@code true} if the stanza with childURI is a descendant of the stanza with parentURI.
 * @param childURI the given stanza's URI
 * @param parentURI the given stanza's URI
 * @return {@code true} if the stanza with childURI is a descendant of the stanza with parentURI, {@code false} otherwise.
 */
public final boolean isDescendantOf(URI childURI,URI parentURI){
  String childId=getId(childURI);
  String parentId=getId(parentURI);
  return isDescendantOf(childId,parentId);
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if the stanza with childURI is a descendant of the stanza with parentURI.
 * @param childURI the given stanza's URI
 * @param parentURI the given stanza's URI
 * @return {@code true} if the stanza with childURI is a descendant of the stanza with parentURI, {@code false} otherwise.
 */
public final boolean isDescendantOf(URI childURI,URI parentURI){
  String childId=getId(childURI);
  String parentId=getId(parentURI);
  if (childId == null || parentId == null)   return false;
  return isDescendantOf(childId,parentId);
}
Program: 12529
Project: 12529
Buggy source:
/** 
 * Creates a new URI from the EDAM Ontology namespace with the given local name. For example, the function call <code>term("format_1915")</code> will return the URI <a>http://purl.obolibrary.org/edam/format_1915</a>
 * @param localName the given local name
 * @return the created URI
 */
public static final URI type(String localName){
  return URI.create(URI_PREFIX + localName);
}

Fixed version (ground truth):
/** 
 * Creates a new URI from the EDAM Ontology namespace with the given local name. For example, the function call <code>term("format_1915")</code> will return the URI <a>http://purl.obolibrary.org/edam/format_1915</a>
 * @param localName the given local name
 * @return the created URI
 */
static final URI type(String localName){
  return URI.create(URI_PREFIX + localName);
}
Program: 12530
Project: 12530
Buggy source:
/** 
 * Returns a set of child ids that are descendants of a given parent URI. 
 * @param parentURI the URI of the parent term
 * @return a set of child ids that are descendants of a given parent URI. 
 */
public final Set<String> getDescendantsOf(URI parentURI){
  String parentId=getId(parentURI);
  return getDescendantsOf(parentId);
}

Fixed version (ground truth):
/** 
 * Returns a set of child ids that are descendants of a given parent URI. 
 * @param parentURI the URI of the parent term
 * @return a set of child ids that are descendants of a given parent URI. 
 */
public final Set<String> getDescendantsOf(URI parentURI){
  String parentId=getId(parentURI);
  if (parentId == null)   return new HashSet<String>();
  return getDescendantsOf(parentId);
}
Program: 12531
Project: 12531
Buggy source:
/** 
 * Returns   {@code true} if the term with childURI is a descendant of the term with parentURI. This method firstextracts IDs for the child and parent terms, and then pass them to  {@link #isDescendantOf(String,String)}.  
 * @param childURI the URI of the child term
 * @param parentURI the URI of the parent term
 * @return {@code true} if the term with childURI is a descendant of the term with parentURI, {@code false} otherwise.
 */
public final boolean isDescendantOf(URI childURI,URI parentURI){
  String childId=getId(childURI);
  String parentId=getId(parentURI);
  return isDescendantOf(childId,parentId);
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if the term with childURI is a descendant of the term with parentURI. This method firstextracts IDs for the child and parent terms, and then pass them to  {@link #isDescendantOf(String,String)}.  
 * @param childURI the URI of the child term
 * @param parentURI the URI of the parent term
 * @return {@code true} if the term with childURI is a descendant of the term with parentURI, {@code false} otherwise.
 */
public final boolean isDescendantOf(URI childURI,URI parentURI){
  String childId=getId(childURI);
  String parentId=getId(parentURI);
  if (childId == null || parentId == null)   return false;
  return isDescendantOf(childId,parentId);
}
Program: 12532
Project: 12532
Buggy source:
/** 
 * Creates a new URI from the Sequence Ontology (SO) namespace, i.e. "http://identifiers.org/so/", with the given ID.  For example, the method call <code>type("SO:0000001")</code> will return the URI <a>http://identifiers.org/so/SO:0000001</a>
 * @param id the ID of an SO term
 * @return the created URI
 */
public static final URI type(String id){
  return URI.create(URI_PREFIX + id);
}

Fixed version (ground truth):
/** 
 * Creates a new URI from the Sequence Ontology (SO) namespace, i.e. "http://identifiers.org/so/", with the given ID.  For example, the method call <code>type("SO:0000001")</code> will return the URI <a>http://identifiers.org/so/SO:0000001</a>
 * @param id the ID of an SO term
 * @return the created URI
 */
static final URI type(String id){
  return URI.create(URI_PREFIX + id);
}
Program: 12533
Project: 12533
Buggy source:
/** 
 * Returns a set of child ids that are descendants of a given parent URI. 
 * @param parentURI the URI of the parent term
 * @return a set of child ids that are descendants of a given parent URI. 
 */
public final Set<String> getDescendantsOf(URI parentURI){
  String parentId=getId(parentURI);
  return getDescendantsOf(parentId);
}

Fixed version (ground truth):
/** 
 * Returns a set of child ids that are descendants of a given parent URI. 
 * @param parentURI the URI of the parent term
 * @return a set of child ids that are descendants of a given parent URI. 
 */
public final Set<String> getDescendantsOf(URI parentURI){
  String parentId=getId(parentURI);
  if (parentId == null)   return new HashSet<String>();
  return getDescendantsOf(parentId);
}
Program: 12534
Project: 12534
Buggy source:
/** 
 * Creates a new URI from the Systems Biology Ontology (SBO) namespace with the given local name. For example, the method call <code>term("SBO_0000001")</code> will return the URI <a>http://purl.obolibrary.org/obo/SBO_0000001</a>
 * @param id the ID of a SBO term
 * @return the created URI
 */
public static final URI type(String id){
  return URI.create(URI_PREFIX + id);
}

Fixed version (ground truth):
/** 
 * Creates a new URI from the Systems Biology Ontology (SBO) namespace with the given local name. For example, the method call <code>term("SBO_0000001")</code> will return the URI <a>http://purl.obolibrary.org/obo/SBO_0000001</a>
 * @param id the ID of a SBO term
 * @return the created URI
 */
static final URI type(String id){
  return URI.create(URI_PREFIX + id);
}
Program: 12536
Project: 12536
Buggy source:
@Override public int compareTo(Location location){
  int thisPos=-1;
  Annotation annotation=this.getAnnotation(new QName(GenBank.GBNAMESPACE,GenBank.POSITION,GenBank.GBPREFIX));
  if (annotation != null) {
    thisPos=Integer.parseInt(annotation.getStringValue());
  }
  int otherPos=-1;
  annotation=location.getAnnotation(new QName(GenBank.GBNAMESPACE,GenBank.POSITION,GenBank.GBPREFIX));
  if (annotation != null) {
    otherPos=Integer.parseInt(annotation.getStringValue());
  }
  if (thisPos != -1 && otherPos != -1) {
    int result=thisPos - otherPos;
    return result;
  }
  if (location instanceof Range) {
    int result=this.at - ((Range)location).getStart();
    if (result == 0) {
      result=((Range)location).getEnd() - this.at;
    }
    return result;
  }
 else   if (location instanceof Cut) {
    return this.at - ((Cut)location).getAt();
  }
  return this.at;
}

Fixed version (ground truth):
@Override public int compareTo(Location location){
  int thisPos=-1;
  Annotation annotation=this.getAnnotation(new QName(GenBank.GBNAMESPACE,GenBank.POSITION,GenBank.GBPREFIX));
  if (annotation != null) {
    thisPos=Integer.parseInt(annotation.getStringValue().replace("String_Node_Str","String_Node_Str"));
  }
  int otherPos=-1;
  annotation=location.getAnnotation(new QName(GenBank.GBNAMESPACE,GenBank.POSITION,GenBank.GBPREFIX));
  if (annotation != null) {
    otherPos=Integer.parseInt(annotation.getStringValue().replace("String_Node_Str","String_Node_Str"));
  }
  if (thisPos != -1 && otherPos != -1) {
    int result=thisPos - otherPos;
    return result;
  }
  if (location instanceof Range) {
    int result=this.at - ((Range)location).getStart();
    if (result == 0) {
      result=((Range)location).getEnd() - this.at;
    }
    return result;
  }
 else   if (location instanceof Cut) {
    return this.at - ((Cut)location).getAt();
  }
  return this.at;
}
Program: 12538
Project: 12538
Buggy source:
@Override public int compareTo(Location location){
  int thisPos=-1;
  Annotation annotation=this.getAnnotation(new QName(GenBank.GBNAMESPACE,GenBank.POSITION,GenBank.GBPREFIX));
  if (annotation != null) {
    thisPos=Integer.parseInt(annotation.getStringValue());
  }
  int otherPos=-1;
  annotation=location.getAnnotation(new QName(GenBank.GBNAMESPACE,GenBank.POSITION,GenBank.GBPREFIX));
  if (annotation != null) {
    otherPos=Integer.parseInt(annotation.getStringValue());
  }
  if (thisPos != -1 && otherPos != -1) {
    int result=thisPos - otherPos;
    return result;
  }
  if (location instanceof Range) {
    int result=this.start - ((Range)location).getStart();
    if (result == 0) {
      result=((Range)location).getEnd() - this.end;
    }
    return result;
  }
 else   if (location instanceof Cut) {
    int result=this.start - ((Cut)location).getAt();
    if (result == 0) {
      result=((Cut)location).getAt() - this.end;
    }
    return result;
  }
  return this.start;
}

Fixed version (ground truth):
@Override public int compareTo(Location location){
  int thisPos=-1;
  Annotation annotation=this.getAnnotation(new QName(GenBank.GBNAMESPACE,GenBank.POSITION,GenBank.GBPREFIX));
  if (annotation != null) {
    thisPos=Integer.parseInt(annotation.getStringValue().replace("String_Node_Str","String_Node_Str"));
  }
  int otherPos=-1;
  annotation=location.getAnnotation(new QName(GenBank.GBNAMESPACE,GenBank.POSITION,GenBank.GBPREFIX));
  if (annotation != null) {
    otherPos=Integer.parseInt(annotation.getStringValue().replace("String_Node_Str","String_Node_Str"));
  }
  if (thisPos != -1 && otherPos != -1) {
    int result=thisPos - otherPos;
    return result;
  }
  if (location instanceof Range) {
    int result=this.start - ((Range)location).getStart();
    if (result == 0) {
      result=((Range)location).getEnd() - this.end;
    }
    return result;
  }
 else   if (location instanceof Cut) {
    int result=this.start - ((Cut)location).getAt();
    if (result == 0) {
      result=((Cut)location).getAt() - this.end;
    }
    return result;
  }
  return this.start;
}
Program: 12539
Project: 12539
Buggy source:
@Test public void test_GenBank_Files(){
  File file_base=null;
  try {
    file_base=new File(ValidationTest.class.getResource("String_Node_Str").toURI());
  }
 catch (  URISyntaxException e1) {
    e1.printStackTrace();
  }
  File file;
  for (  File f : file_base.listFiles()) {
    if (f.isDirectory()) {
      continue;
    }
    file=new File(f.getAbsolutePath());
    try {
      SBOLReader.setURIPrefix("String_Node_Str");
      SBOLDocument actual=SBOLReader.read(file);
      ByteArrayOutputStream out=new ByteArrayOutputStream();
      SBOLWriter.write(actual,System.out,SBOLDocument.GENBANK);
      runTest("String_Node_Str" + f.getName().replace("String_Node_Str","String_Node_Str"),actual,"String_Node_Str",true);
    }
 catch (    Exception e) {
      throw new AssertionError("String_Node_Str" + f.getName(),e);
    }
  }
}

Fixed version (ground truth):
@Test public void test_GenBank_Files(){
  File file_base=null;
  try {
    file_base=new File(ValidationTest.class.getResource("String_Node_Str").toURI());
  }
 catch (  URISyntaxException e1) {
    e1.printStackTrace();
  }
  File file;
  for (  File f : file_base.listFiles()) {
    if (f.isDirectory()) {
      continue;
    }
    file=new File(f.getAbsolutePath());
    try {
      SBOLReader.setURIPrefix("String_Node_Str");
      SBOLDocument actual=SBOLReader.read(file);
      ByteArrayOutputStream out=new ByteArrayOutputStream();
      SBOLWriter.write(actual,out,SBOLDocument.GENBANK);
      runTest("String_Node_Str" + f.getName().replace("String_Node_Str","String_Node_Str"),actual,"String_Node_Str",true);
    }
 catch (    Exception e) {
      throw new AssertionError("String_Node_Str" + f.getName(),e);
    }
  }
}
Program: 12540
Project: 12540
Buggy source:
/** 
 * Takes in the given FASTA filename and converts the file to an SBOLDocument. <p> This method calls   {@link #read(File)}.
 * @param fileName the given FASTA filename
 * @param URIprefix the URI prefix used for generated Sequence objects
 * @param displayId the base displayId to use for generated Sequence objects (null will use description as id)
 * @param version the verison used for generated Sequence objects
 * @param encoding the encoding assumed for generated Sequence objects
 * @return the converted SBOLDocument
 * @throws SBOLConversionException violates conversion limitations
 * @throws SBOLValidationException violates sbol validation rule
 * @throws IOException input/output operation failed
 */
public static SBOLDocument read(String fileName,String URIprefix,String displayId,String version,URI encoding) throws IOException, SBOLConversionException, SBOLValidationException {
  return read(new File(fileName),URIprefix,displayId,version,encoding);
}

Fixed version (ground truth):
/** 
 * Takes in the given FASTA filename and converts the file to an SBOLDocument.
 * @param fileName the given FASTA filename
 * @param URIprefix the URI prefix used for generated Sequence objects
 * @param displayId the base displayId to use for generated Sequence objects (null will use description as id)
 * @param version the verison used for generated Sequence objects
 * @param encoding the encoding assumed for generated Sequence objects
 * @return the converted SBOLDocument
 * @throws SBOLConversionException violates conversion limitations
 * @throws SBOLValidationException violates sbol validation rule
 * @throws IOException input/output operation failed
 */
public static SBOLDocument read(String fileName,String URIprefix,String displayId,String version,URI encoding) throws IOException, SBOLConversionException, SBOLValidationException {
  return read(new File(fileName),URIprefix,displayId,version,encoding);
}
Program: 12542
Project: 12542
Buggy source:
/** 
 * The getRandomNumber returns a random number in the range [min..max]  (both inclusive). If the min > max, then the method returns -1.
 * @param min ... the minimum number
 * @param max ... the maximum number
 * @return a random number in the range [min..max]
 */
public int getRandomNumber(int min,int max){
  if (min <= max) {
    return new Random().nextInt((max - min) + 1) + min;
  }
  return -1;
}

Fixed version (ground truth):
/** 
 * The getRandomNumber returns a random number in the range [min..max]  (both inclusive). If the min greater than max, then the method returns -1.
 * @param min ... the minimum number
 * @param max ... the maximum number
 * @return a random number in the range [min..max]
 */
public int getRandomNumber(int min,int max){
  if (min <= max) {
    return new Random().nextInt((max - min) + 1) + min;
  }
  return -1;
}
Program: 12543
Project: 12543
Buggy source:
/** 
 * Test <code>null<\code> for grand child URI not compliant in extractPersistentId.
 */
@Test public void testExtractURIprefix1(){
  String extractedPrefix=extractURIprefix(uri8);
  assertNull(extractedPrefix);
}

Fixed version (ground truth):
/** 
 * Test null for grand child URI not compliant in extractPersistentId.
 */
@Test public void testExtractURIprefix1(){
  String extractedPrefix=extractURIprefix(uri8);
  assertNull(extractedPrefix);
}
Program: 12544
Project: 12544
Buggy source:
/** 
 * Test <code>null<\code> for extractVersion for the compliant top-level URI.
 */
@Test public void testExtractVersion1(){
  String extractedVersion=extractVersion(uri4);
  assertNull(extractedVersion);
}

Fixed version (ground truth):
/** 
 * Test null for extractVersion for the compliant top-level URI.
 */
@Test public void testExtractVersion1(){
  String extractedVersion=extractVersion(uri4);
  assertNull(extractedVersion);
}
Program: 12545
Project: 12545
Buggy source:
/** 
 * Test <code>null<\code> for extractVersion for the compliant child URI.
 */
@Test public void testExtractVersion2(){
  String extractedVersion=extractVersion(uri6);
  assertNull(extractedVersion);
}

Fixed version (ground truth):
/** 
 * Test null for extractVersion for the compliant child URI.
 */
@Test public void testExtractVersion2(){
  String extractedVersion=extractVersion(uri6);
  assertNull(extractedVersion);
}
Program: 12546
Project: 12546
Buggy source:
/** 
 * Test <code>null<\code> for extractVersion for the compliant grand child URI.
 */
@Test public void testExtractVersion3(){
  String extractedVersion=extractVersion(uri8);
  assertNull(extractedVersion);
}

Fixed version (ground truth):
/** 
 * Test null for extractVersion for the compliant grand child URI.
 */
@Test public void testExtractVersion3(){
  String extractedVersion=extractVersion(uri8);
  assertNull(extractedVersion);
}
Program: 12547
Project: 12547
Buggy source:
/** 
 * Test <code>null<\code> for extractVersion for the compliant great grand child URI.
 */
@Test public void testExtractVersion4(){
  String extractedVersion=extractVersion(uri9);
  assertNull(extractedVersion);
}

Fixed version (ground truth):
/** 
 * Test null for extractVersion for the compliant great grand child URI.
 */
@Test public void testExtractVersion4(){
  String extractedVersion=extractVersion(uri9);
  assertNull(extractedVersion);
}
Program: 12548
Project: 12548
Buggy source:
/** 
 * Test <code>null<\code> for top-level URI not compliant in extractPersistentId.
 */
@Test public void testExtractPersistentId1(){
  if (extractPersistentId(uri4) == null) {
    return;
  }
  assert(false);
}

Fixed version (ground truth):
/** 
 * Test null for top-level URI not compliant in extractPersistentId.
 */
@Test public void testExtractPersistentId1(){
  if (extractPersistentId(uri4) == null) {
    return;
  }
  assert(false);
}
Program: 12549
Project: 12549
Buggy source:
/** 
 * Test <code>null<\code> for child URI not compliant in extractPersistentId.
 */
@Test public void testExtractPersistentId3(){
  if (extractPersistentId(uri6) == null) {
    return;
  }
  assert(false);
}

Fixed version (ground truth):
/** 
 * Test null for child URI not compliant in extractPersistentId.
 */
@Test public void testExtractPersistentId3(){
  if (extractPersistentId(uri6) == null) {
    return;
  }
  assert(false);
}
Program: 12550
Project: 12550
Buggy source:
/** 
 * Test <code>null<\code> for grand child URI not compliant in extractPersistentId.
 */
@Test public void testExtractPersistentId5(){
  if (extractPersistentId(uri8) == null) {
    return;
  }
  assert(false);
}

Fixed version (ground truth):
/** 
 * Test null for grand child URI not compliant in extractPersistentId.
 */
@Test public void testExtractPersistentId5(){
  if (extractPersistentId(uri8) == null) {
    return;
  }
  assert(false);
}
Program: 12551
Project: 12551
Buggy source:
/** 
 * Test <code>null<\code> for great grand child URI not compliant in extractPersistentId.
 */
@Test public void testExtractPersistentId7(){
  if (extractPersistentId(uri9) == null) {
    return;
  }
  assert(false);
}

Fixed version (ground truth):
/** 
 * Test null for great grand child URI not compliant in extractPersistentId.
 */
@Test public void testExtractPersistentId7(){
  if (extractPersistentId(uri9) == null) {
    return;
  }
  assert(false);
}
Program: 12556
Project: 12556
Buggy source:
@Test public void test_GenBank_Files() throws Exception {
  File file_base=null;
  try {
    file_base=new File(ValidationTest.class.getResource("String_Node_Str").toURI());
  }
 catch (  URISyntaxException e1) {
    e1.printStackTrace();
  }
  File file;
  for (  File f : file_base.listFiles()) {
    if (f.isDirectory()) {
      continue;
    }
    file=new File(f.getAbsolutePath());
    try {
      SBOLReader.setURIPrefix("String_Node_Str");
      SBOLDocument actual=SBOLReader.read(file);
      ByteArrayOutputStream out=new ByteArrayOutputStream();
      SBOLWriter.write(actual,out,SBOLDocument.GENBANK);
      runTest("String_Node_Str" + f.getName().replace("String_Node_Str","String_Node_Str"),actual,"String_Node_Str",true);
    }
 catch (    SBOLValidationException e) {
      throw new AssertionError("String_Node_Str" + f.getName(),e);
    }
  }
}

Fixed version (ground truth):
@Test public void test_GenBank_Files(){
  File file_base=null;
  try {
    file_base=new File(ValidationTest.class.getResource("String_Node_Str").toURI());
  }
 catch (  URISyntaxException e1) {
    e1.printStackTrace();
  }
  File file;
  for (  File f : file_base.listFiles()) {
    if (f.isDirectory()) {
      continue;
    }
    file=new File(f.getAbsolutePath());
    try {
      SBOLReader.setURIPrefix("String_Node_Str");
      SBOLDocument actual=SBOLReader.read(file);
      ByteArrayOutputStream out=new ByteArrayOutputStream();
      SBOLWriter.write(actual,out,SBOLDocument.GENBANK);
      runTest("String_Node_Str" + f.getName().replace("String_Node_Str","String_Node_Str"),actual,"String_Node_Str",true);
    }
 catch (    Exception e) {
      throw new AssertionError("String_Node_Str" + f.getName(),e);
    }
  }
}
Program: 12557
Project: 12557
Buggy source:
/** 
 * Takes in a given InputStream and fileType, and add the data read to this SBOLDocument.
 * @param in a given RDF InputStream
 * @param fileType the fileType that this file is in
 * @throws FactoryConfigurationError - TODO
 * @throws XMLStreamException invalid xml file
 * @throws SBOLValidationException if this SBOLDocument object is not compliant
 */
void read(InputStream in,String fileType) throws FactoryConfigurationError, SBOLValidationException {
  SBOLReader.read(this,in,fileType);
}

Fixed version (ground truth):
/** 
 * Takes in a given InputStream and fileType, and add the data read to this SBOLDocument.
 * @param in a given RDF InputStream
 * @param fileType the fileType that this file is in
 * @throws FactoryConfigurationError - TODO
 * @throws SBOLValidationException if this SBOLDocument object is not compliant
 */
void read(InputStream in,String fileType) throws FactoryConfigurationError, SBOLValidationException {
  SBOLReader.read(this,in,fileType);
}
Program: 12558
Project: 12558
Buggy source:
/** 
 * Serializes SBOLDocument and outputs the data from the serialization to the given output stream in RDF format
 * @param out the given output stream
 * @throws CoreIoException - TODO
 * @throws FactoryConfigurationError - TODO
 * @throws XMLStreamException invalid xml file
 * @throws IOException - TODO
 */
public static void write(OutputStream out) throws XMLStreamException, FactoryConfigurationError, CoreIoException {
  document.write(out);
}

Fixed version (ground truth):
/** 
 * Serializes SBOLDocument and outputs the data from the serialization to the given output stream in RDF format
 * @param out the given output stream
 * @throws CoreIoException - TODO
 * @throws FactoryConfigurationError - TODO
 * @throws XMLStreamException invalid xml file
 */
public static void write(OutputStream out) throws XMLStreamException, FactoryConfigurationError, CoreIoException {
  document.write(out);
}
Program: 12559
Project: 12559
Buggy source:
/** 
 * Sets the default URI prefix to the given   {@code defaultURIprefix}.
 * @param defaultURIprefix the given default URI prefix
 * @throws SBOLValidationException  if this SBOLDocument object is not compliant
 */
public static void setDefaultURIprefix(String defaultURIprefix){
  document.setDefaultURIprefix(defaultURIprefix);
}

Fixed version (ground truth):
/** 
 * Sets the default URI prefix to the given   {@code defaultURIprefix}.
 * @param defaultURIprefix the given default URI prefix
 */
public static void setDefaultURIprefix(String defaultURIprefix){
  document.setDefaultURIprefix(defaultURIprefix);
}
Program: 12560
Project: 12560
Buggy source:
public static SBOLDocument writeThenRead(SBOLDocument doc) throws SBOLValidationException, IOException, XMLStreamException, FactoryConfigurationError, CoreIoException {
  ByteArrayOutputStream out=new ByteArrayOutputStream();
  SBOLWriter.write(doc,out);
  return SBOLReader.read(new ByteArrayInputStream(out.toByteArray()));
}

Fixed version (ground truth):
public static SBOLDocument writeThenRead(SBOLDocument doc) throws SBOLValidationException, IOException, XMLStreamException, FactoryConfigurationError, CoreIoException, SBOLConversionException {
  ByteArrayOutputStream out=new ByteArrayOutputStream();
  SBOLWriter.write(doc,out);
  return SBOLReader.read(new ByteArrayInputStream(out.toByteArray()));
}
Program: 12562
Project: 12562
Buggy source:
public static SBOLDocument writeThenRead(SBOLDocument doc) throws SBOLValidationException, IOException, XMLStreamException, FactoryConfigurationError, CoreIoException {
  ByteArrayOutputStream out=new ByteArrayOutputStream();
  SBOLWriter.write(doc,out);
  return SBOLReader.read(new ByteArrayInputStream(out.toByteArray()));
}

Fixed version (ground truth):
public static SBOLDocument writeThenRead(SBOLDocument doc) throws SBOLValidationException, IOException, XMLStreamException, FactoryConfigurationError, CoreIoException, SBOLConversionException {
  ByteArrayOutputStream out=new ByteArrayOutputStream();
  SBOLWriter.write(doc,out);
  return SBOLReader.read(new ByteArrayInputStream(out.toByteArray()));
}
Program: 12567
Project: 12567
Buggy source:
@Test public void test_GenBank_Files() throws Exception {
  File file_base=null;
  try {
    file_base=new File(ValidationTest.class.getResource("String_Node_Str").toURI());
  }
 catch (  URISyntaxException e1) {
    e1.printStackTrace();
  }
  File file;
  for (  File f : file_base.listFiles()) {
    file=new File(f.getAbsolutePath());
    try {
      GenBank.setURIPrefix("String_Node_Str");
      SBOLDocument actual=GenBank.read(file);
      GenBank.write(actual.getRootComponentDefinitions().iterator().next(),"String_Node_Str" + f.getName());
      runTest("String_Node_Str" + f.getName().replace("String_Node_Str","String_Node_Str"),actual,"String_Node_Str",true);
    }
 catch (    SBOLValidationException e) {
      throw new AssertionError("String_Node_Str" + f.getName(),e);
    }
  }
}

Fixed version (ground truth):
@Test public void test_GenBank_Files() throws Exception {
  File file_base=null;
  try {
    file_base=new File(ValidationTest.class.getResource("String_Node_Str").toURI());
  }
 catch (  URISyntaxException e1) {
    e1.printStackTrace();
  }
  File file;
  for (  File f : file_base.listFiles()) {
    if (f.isDirectory()) {
      continue;
    }
    file=new File(f.getAbsolutePath());
    try {
      GenBank.setURIPrefix("String_Node_Str");
      SBOLDocument actual=GenBank.read(file);
      GenBank.write(actual.getRootComponentDefinitions().iterator().next(),"String_Node_Str" + f.getName());
      runTest("String_Node_Str" + f.getName().replace("String_Node_Str","String_Node_Str"),actual,"String_Node_Str",true);
    }
 catch (    SBOLValidationException e) {
      throw new AssertionError("String_Node_Str" + f.getName(),e);
    }
  }
}
Program: 12568
Project: 12568
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());
  SBOLValidate.checkComponentDefinitionCycle(sbolDocument,component.getDefinition(),visited);
  addChildSafely(component,components,"String_Node_Str",sequenceAnnotations,sequenceConstraints);
  for (  MapsTo mapsTo : component.getMapsTos()) {
    if (this.getComponent(mapsTo.getLocalURI()) == null) {
      throw new SBOLValidationException("String_Node_Str",mapsTo);
    }
    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);
    }
  }
  if (this.getIdentity().equals(component.getDefinitionURI())) {
    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()) {
    if (this.getComponent(mapsTo.getLocalURI()) == null) {
      throw new SBOLValidationException("String_Node_Str",mapsTo);
    }
    mapsTo.setSBOLDocument(sbolDocument);
    mapsTo.setComponentDefinition(this);
    mapsTo.setComponentInstance(component);
  }
}
Program: 12569
Project: 12569
Buggy source:
void addComponentNoCheck(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);
}

Fixed version (ground truth):
void addComponentNoCheck(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);
    }
  }
  if (this.getIdentity().equals(component.getDefinitionURI())) {
    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);
}
Program: 12570
Project: 12570
Buggy source:
/** 
 * Adds the specified instance to the list of references.
 * @throws SBOLValidationException 
 */
void addMapsTo(MapsTo mapsTo) throws SBOLValidationException {
  if (sbolDocument != null) {
    if (moduleDefinition.getFunctionalComponent(mapsTo.getLocalURI()) == null) {
      throw new SBOLValidationException("String_Node_Str",mapsTo);
    }
  }
  if (sbolDocument != null && sbolDocument.isComplete()) {
    if (getDefinition().getComponent(mapsTo.getRemoteURI()) == null) {
      throw new SBOLValidationException("String_Node_Str",mapsTo);
    }
    if (getDefinition().getComponent(mapsTo.getRemoteURI()).getAccess().equals(AccessType.PRIVATE)) {
      throw new SBOLValidationException("String_Node_Str",mapsTo);
    }
    if (mapsTo.getRefinement().equals(RefinementType.VERIFYIDENTICAL)) {
      if (!mapsTo.getLocal().getDefinitionURI().equals(mapsTo.getRemote().getDefinitionURI())) {
        throw new SBOLValidationException("String_Node_Str",mapsTo);
      }
    }
  }
  addChildSafely(mapsTo,mapsTos,"String_Node_Str");
  mapsTo.setSBOLDocument(this.sbolDocument);
  mapsTo.setModuleDefinition(moduleDefinition);
  mapsTo.setComponentInstance(this);
}

Fixed version (ground truth):
/** 
 * Adds the specified instance to the list of references.
 * @throws SBOLValidationException 
 */
void addMapsTo(MapsTo mapsTo) throws SBOLValidationException {
  mapsTo.setSBOLDocument(this.sbolDocument);
  mapsTo.setModuleDefinition(moduleDefinition);
  mapsTo.setComponentInstance(this);
  if (sbolDocument != null) {
    if (moduleDefinition.getFunctionalComponent(mapsTo.getLocalURI()) == null) {
      throw new SBOLValidationException("String_Node_Str",mapsTo);
    }
  }
  if (sbolDocument != null && sbolDocument.isComplete()) {
    if (getDefinition().getComponent(mapsTo.getRemoteURI()) == null) {
      throw new SBOLValidationException("String_Node_Str",mapsTo);
    }
    if (getDefinition().getComponent(mapsTo.getRemoteURI()).getAccess().equals(AccessType.PRIVATE)) {
      throw new SBOLValidationException("String_Node_Str",mapsTo);
    }
    if (mapsTo.getRefinement().equals(RefinementType.VERIFYIDENTICAL)) {
      if (!mapsTo.getLocal().getDefinitionURI().equals(mapsTo.getRemote().getDefinitionURI())) {
        throw new SBOLValidationException("String_Node_Str",mapsTo);
      }
    }
  }
  addChildSafely(mapsTo,mapsTos,"String_Node_Str");
}
Program: 12571
Project: 12571
Buggy source:
/** 
 * Returns the   {@link QName} instance matching the given {@code modelURI} from thisSBOLDocument object's list of namespace QName instances.
 * @param namespaceURI
 * @return the matching instance if present, or {@code null} otherwise.
 */
public QName getNamespace(URI namespaceURI){
  if (nameSpaces.get(namespaceURI) == null)   return null;
  return new QName(namespaceURI.toString(),"String_Node_Str",nameSpaces.get(namespaceURI).getPrefix());
}

Fixed version (ground truth):
/** 
 * Returns the   {@link QName} instance matching the given {@code modelURI} from thisSBOLDocument object's list of namespace QName instances.
 * @param namespaceURI
 * @return the matching instance if present, or {@code null} otherwise.
 */
public QName getNamespace(URI namespaceURI){
  for (  NamespaceBinding namespaceBinding : nameSpaces.values()) {
    if (namespaceBinding.getNamespaceURI().equals(namespaceURI.toString())) {
      return new QName(namespaceBinding.getNamespaceURI(),"String_Node_Str",namespaceBinding.getPrefix());
    }
  }
  return null;
}
Program: 12573
Project: 12573
Buggy source:
@Override public void runTest(final String fileName,final SBOLDocument expected,String fileType,boolean compliant) throws Exception {
  assumeNotNull(expected);
  SBOLValidate.validateSBOL(expected,false,false,false);
  if (SBOLValidate.getNumErrors() > 0) {
    for (    String error : SBOLValidate.getErrors()) {
      System.err.println(error);
    }
    assertTrue(false);
  }
  SBOLDocument actual=SBOLTestUtils.writeAndRead(expected,compliant);
  assertTrue(actual.equals(expected));
}

Fixed version (ground truth):
@Override public void runTest(final String fileName,final SBOLDocument expected,String fileType,boolean compliant) throws Exception {
  assumeNotNull(expected);
  SBOLValidate.validateSBOL(expected,false,false,false);
  if (SBOLValidate.getNumErrors() > 0) {
    for (    String error : SBOLValidate.getErrors()) {
      System.err.println(error);
    }
    assertTrue(false);
  }
  SBOLDocument actual=SBOLTestUtils.writeAndRead(expected,compliant);
  if (!actual.equals(expected)) {
    System.out.println("String_Node_Str" + expected.toString());
    SBOLWriter.write(expected,(System.out));
    System.out.println("String_Node_Str" + actual.toString());
  }
  assertTrue(actual.equals(expected));
}
Program: 12574
Project: 12574
Buggy source:
/** 
 * Adds the specified instance to the list of sequenceConstraints.
 * @throws SBOLValidationException 
 */
void addSequenceConstraint(SequenceConstraint sequenceConstraint) throws SBOLValidationException {
  sequenceConstraint.setSBOLDocument(this.sbolDocument);
  sequenceConstraint.setComponentDefinition(this);
  if (sequenceConstraint.getSubject() == null) {
    throw new SBOLValidationException("String_Node_Str",sequenceConstraint);
  }
  if (sequenceConstraint.getObject() == null) {
    throw new SBOLValidationException("String_Node_Str",sequenceConstraint);
  }
  addChildSafely(sequenceConstraint,sequenceConstraints,"String_Node_Str",components,sequenceAnnotations);
}

Fixed version (ground truth):
/** 
 * Adds the specified instance to the list of sequenceConstraints.
 * @throws SBOLValidationException 
 */
void addSequenceConstraint(SequenceConstraint sequenceConstraint) throws SBOLValidationException {
  sequenceConstraint.setSBOLDocument(this.sbolDocument);
  sequenceConstraint.setComponentDefinition(this);
  if (sequenceConstraint.getSubject() == null) {
    throw new SBOLValidationException("String_Node_Str",sequenceConstraint);
  }
  if (sequenceConstraint.getObject() == null) {
    throw new SBOLValidationException("String_Node_Str",sequenceConstraint);
  }
  if (sequenceConstraint.getSubjectURI().equals(sequenceConstraint.getObjectURI())) {
    throw new SBOLValidationException("String_Node_Str",sequenceConstraint);
  }
  addChildSafely(sequenceConstraint,sequenceConstraints,"String_Node_Str",components,sequenceAnnotations);
}
Program: 12575
Project: 12575
Buggy source:
/** 
 * Sets the reference subject Component URI to the given   {@code subjectURI}. <p> If this SequenceConstraint subject 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 subjectURI
 * @throws SBOLValidationException if the associated SBOLDocument is not compliant
 * @throws SBOLValidationException if the associated ComponentDefinition subjectis not  {@code null}, and the given   {@code subjectURI} does not exist in its associated ComponentDefinition subject's list of Component instances.
 * @throws SBOLValidationException if the given {@code subjectURI} is {@code null}.
 */
public void setSubject(URI subjectURI) throws SBOLValidationException {
  if (sbolDocument != null)   sbolDocument.checkReadOnly();
  if (componentDefinition != null) {
    if (componentDefinition.getComponent(subjectURI) == null) {
      throw new SBOLValidationException("String_Node_Str",this);
    }
  }
  if (subjectURI == null) {
    throw new SBOLValidationException("String_Node_Str",this);
  }
  if (subjectURI == object) {
    throw new SBOLValidationException("String_Node_Str",this);
  }
  this.subject=subjectURI;
}

Fixed version (ground truth):
/** 
 * Sets the reference subject Component URI to the given   {@code subjectURI}. <p> If this SequenceConstraint subject 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 subjectURI
 * @throws SBOLValidationException if the associated SBOLDocument is not compliant
 * @throws SBOLValidationException if the associated ComponentDefinition subjectis not  {@code null}, and the given   {@code subjectURI} does not exist in its associated ComponentDefinition subject's list of Component instances.
 * @throws SBOLValidationException if the given {@code subjectURI} is {@code null}.
 */
public void setSubject(URI subjectURI) throws SBOLValidationException {
  if (sbolDocument != null)   sbolDocument.checkReadOnly();
  if (componentDefinition != null) {
    if (componentDefinition.getComponent(subjectURI) == null) {
      throw new SBOLValidationException("String_Node_Str",this);
    }
  }
  if (subjectURI == null) {
    throw new SBOLValidationException("String_Node_Str",this);
  }
  if (subjectURI.equals(object)) {
    throw new SBOLValidationException("String_Node_Str",this);
  }
  this.subject=subjectURI;
}
Program: 12576
Project: 12576
Buggy source:
/** 
 * Top level types
 * @throws SBOLValidationException 
 */
public static void main(String[] args) throws FactoryConfigurationError, SBOLValidationException {
  get_myParts(sbolDocument);
  sbolDocument.getComponentDefinition("String_Node_Str","String_Node_Str");
  SBOLValidate.validateSBOL(sbolDocument,true,true,true);
  if (SBOLValidate.getNumErrors() > 0) {
    for (    String error : SBOLValidate.getErrors()) {
      System.out.println(error);
    }
  }
}

Fixed version (ground truth):
/** 
 * Top level types
 * @throws SBOLValidationException 
 * @throws CoreIoException 
 * @throws XMLStreamException 
 */
public static void main(String[] args) throws FactoryConfigurationError, SBOLValidationException, XMLStreamException, CoreIoException {
  SBOLDocument document=new SBOLDocument();
  document.createSequence("String_Node_Str","String_Node_Str",org.sbolstandard.core2.Sequence.IUPAC_DNA);
  SBOLWriter.write(document,(System.out));
  get_myParts(sbolDocument);
  sbolDocument.getComponentDefinition("String_Node_Str","String_Node_Str");
  SBOLValidate.validateSBOL(sbolDocument,true,true,true);
  if (SBOLValidate.getNumErrors() > 0) {
    for (    String error : SBOLValidate.getErrors()) {
      System.out.println(error);
    }
  }
}
Program: 12577
Project: 12577
Buggy source:
/** 
 * Check if this top-level object's and all of its descendants' URIs are all compliant. 
 * @return {@code true} if they are all compliant, {@code false} otherwise.
 * @throws SBOLValidationException 
 */
protected abstract void checkDescendantsURIcompliance() throws SBOLValidationException ;

Fixed version (ground truth):
/** 
 * Check if this top-level object's and all of its descendants' URIs are all compliant. 
 * @throws SBOLValidationException 
 */
protected abstract void checkDescendantsURIcompliance() throws SBOLValidationException ;
Program: 12578
Project: 12578
Buggy source:
/** 
 * Test if the given object's identity URI is compliant with the form   {@code ⟨prefix⟩/(⟨displayId⟩/)}{1,3}⟨version⟩. The prefix is established by the owner of this object. The number of displayIds can range from 1 to 4, depending on the level of the given object. 
 * @param objURI
 * @return <code>true</code> if the identity URI is compliant, <code>false</code> otherwise.
 * @throws SBOLValidationException 
 */
void isURIcompliant() throws SBOLValidationException {
  URIcompliance.isTopLevelURIformCompliant(this.getIdentity());
  try {
    URIcompliance.isURIcompliant(this);
  }
 catch (  SBOLValidationException e) {
    throw new SBOLValidationException(e.getRule(),this);
  }
  this.checkDescendantsURIcompliance();
}

Fixed version (ground truth):
/** 
 * Test if the given object's identity URI is compliant with the form   {@code ⟨prefix⟩/(⟨displayId⟩/)}{1,3}⟨version⟩. The prefix is established by the owner of this object. The number of displayIds can range from 1 to 4, depending on the level of the given object. 
 * @param objURI
 * @throws SBOLValidationException 
 */
void isURIcompliant() throws SBOLValidationException {
  URIcompliance.isTopLevelURIformCompliant(this.getIdentity());
  try {
    URIcompliance.isURIcompliant(this);
  }
 catch (  SBOLValidationException e) {
    throw new SBOLValidationException(e.getRule(),this);
  }
  this.checkDescendantsURIcompliance();
}
Program: 12579
Project: 12579
Buggy source:
/** 
 * Test if the given object's identity URI is compliant with the form   {@code ⟨prefix⟩/(⟨displayId⟩/)}{1,3}⟨version⟩. The prefix is established by the owner of this object. The number of displayIds can range from 1 to 4, depending on the level of the given object. 
 * @param objURI
 * @return <code>true</code> if the identity URI is compliant, <code>false</code> otherwise.
 * @throws SBOLValidationException 
 */
static final void isTopLevelURIformCompliant(URI topLevelURI) throws SBOLValidationException {
  Pattern r;
  String URIstr=topLevelURI.toString();
  r=Pattern.compile(toplevelURIpattern);
  Matcher m=r.matcher(URIstr);
  if (!m.matches()) {
    throw new SBOLValidationException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Test if the given object's identity URI is compliant with the form   {@code ⟨prefix⟩/(⟨displayId⟩/)}{1,3}⟨version⟩. The prefix is established by the owner of this object. The number of displayIds can range from 1 to 4, depending on the level of the given object. 
 * @param objURI
 * @throws SBOLValidationException 
 */
static final void isTopLevelURIformCompliant(URI topLevelURI) throws SBOLValidationException {
  Pattern r;
  String URIstr=topLevelURI.toString();
  r=Pattern.compile(toplevelURIpattern);
  Matcher m=r.matcher(URIstr);
  if (!m.matches()) {
    throw new SBOLValidationException("String_Node_Str");
  }
}
Program: 12580
Project: 12580
Buggy source:
/** 
 * Set field variable <code>displayId</code> to the specified element.
 * @throws SBOLValidationException 
 */
void setDisplayId(String displayId) throws SBOLValidationException {
  if (!URIcompliance.isDisplayIdValid(displayId)) {
    throw new SBOLValidationException("String_Node_Str");
  }
  this.displayId=displayId;
}

Fixed version (ground truth):
/** 
 * Set field variable <code>displayId</code> to the specified element.
 * @throws SBOLValidationException 
 */
void setDisplayId(String displayId) throws SBOLValidationException {
  if (!URIcompliance.isDisplayIdValid(displayId)) {
    throw new SBOLValidationException("String_Node_Str",this);
  }
  this.displayId=displayId;
}
Program: 12582
Project: 12582
Buggy source:
/** 
 * @param identity
 * @param rdfType
 * @return the new generic top level
 * @throws SBOLValidationException 
 */
GenericTopLevel createGenericTopLevel(URI identity,QName rdfType) throws SBOLValidationException {
  if (rdfType.getNamespaceURI().equals(Sbol2Terms.sbol2.getNamespaceURI()) || rdfType.getNamespaceURI().equals(Sbol1Terms.sbol1.getNamespaceURI())) {
    throw new SBOLValidationException("String_Node_Str");
  }
  GenericTopLevel newGenericTopLevel=new GenericTopLevel(identity,rdfType);
  addGenericTopLevel(newGenericTopLevel);
  return newGenericTopLevel;
}

Fixed version (ground truth):
/** 
 * @param identity
 * @param rdfType
 * @return the new generic top level
 * @throws SBOLValidationException 
 */
GenericTopLevel createGenericTopLevel(URI identity,QName rdfType) throws SBOLValidationException {
  if (rdfType.getNamespaceURI().equals(Sbol2Terms.sbol2.getNamespaceURI()) || rdfType.getNamespaceURI().equals(Sbol1Terms.sbol1.getNamespaceURI())) {
    throw new SBOLValidationException(rdfType.getLocalPart() + "String_Node_Str");
  }
  GenericTopLevel newGenericTopLevel=new GenericTopLevel(identity,rdfType);
  addGenericTopLevel(newGenericTopLevel);
  return newGenericTopLevel;
}
Program: 12585
Project: 12585
Buggy source:
static URI createCompliantURI(String prefix,String type,String displayId,String version,boolean useType) throws SBOLValidationException {
  validateIdVersion(displayId,version);
  if (!useType)   return createCompliantURI(prefix,displayId,version);
  if (!prefix.endsWith("String_Node_Str") && !prefix.endsWith("String_Node_Str") && !prefix.endsWith("String_Node_Str")) {
    prefix+="String_Node_Str";
  }
  if (version == null || version.equals("String_Node_Str")) {
    return URI.create(prefix + type + '/'+ displayId);
  }
  return URI.create(prefix + type + '/'+ displayId+ '/'+ version);
}

Fixed version (ground truth):
static URI createCompliantURI(String prefix,String type,String displayId,String version,boolean useType) throws SBOLValidationException {
  if (prefix == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  validateIdVersion(displayId,version);
  if (!useType)   return createCompliantURI(prefix,displayId,version);
  if (!prefix.endsWith("String_Node_Str") && !prefix.endsWith("String_Node_Str") && !prefix.endsWith("String_Node_Str")) {
    prefix+="String_Node_Str";
  }
  if (version == null || version.equals("String_Node_Str")) {
    return URI.create(prefix + type + '/'+ displayId);
  }
  return URI.create(prefix + type + '/'+ displayId+ '/'+ version);
}
Program: 12586
Project: 12586
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: 12588
Project: 12588
Buggy source:
@Override protected boolean checkDescendantsURIcompliance(){
  return isTopLevelURIformCompliant(this.getIdentity());
}

Fixed version (ground truth):
@Override protected void checkDescendantsURIcompliance() throws SBOLValidationException {
  URIcompliance.isTopLevelURIformCompliant(this.getIdentity());
}