Program: 12659
Project: 12659
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.
 */
public static void validateCompliance(SBOLDocument sbolDocument){
  for (  Collection collection : sbolDocument.getCollections()) {
    if (!collection.checkDescendantsURIcompliance())     throw new SBOLValidationException("String_Node_Str",collection);
  }
  for (  Sequence sequence : sbolDocument.getSequences()) {
    if (!sequence.checkDescendantsURIcompliance())     throw new SBOLValidationException("String_Node_Str",sequence);
  }
  for (  ComponentDefinition componentDefinition : sbolDocument.getComponentDefinitions()) {
    if (!componentDefinition.checkDescendantsURIcompliance())     throw new SBOLValidationException("String_Node_Str",componentDefinition);
  }
  for (  ModuleDefinition moduleDefinition : sbolDocument.getModuleDefinitions()) {
    if (!moduleDefinition.checkDescendantsURIcompliance())     throw new SBOLValidationException("String_Node_Str",moduleDefinition);
  }
  for (  Model model : sbolDocument.getModels()) {
    if (!model.checkDescendantsURIcompliance())     throw new SBOLValidationException("String_Node_Str",model);
  }
  for (  GenericTopLevel genericTopLevel : sbolDocument.getGenericTopLevels()) {
    if (!genericTopLevel.checkDescendantsURIcompliance())     throw new SBOLValidationException("String_Node_Str",genericTopLevel);
  }
}

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.
 */
public static void validateCompliance(SBOLDocument sbolDocument){
  for (  Collection collection : sbolDocument.getCollections()) {
    if (!URIcompliance.isTopLevelURIcompliant(collection) || !collection.checkDescendantsURIcompliance())     throw new SBOLValidationException("String_Node_Str",collection);
  }
  for (  Sequence sequence : sbolDocument.getSequences()) {
    if (!URIcompliance.isTopLevelURIcompliant(sequence) || !sequence.checkDescendantsURIcompliance()) {
      throw new SBOLValidationException("String_Node_Str",sequence);
    }
  }
  for (  ComponentDefinition componentDefinition : sbolDocument.getComponentDefinitions()) {
    if (!URIcompliance.isTopLevelURIcompliant(componentDefinition) || !componentDefinition.checkDescendantsURIcompliance()) {
      throw new SBOLValidationException("String_Node_Str",componentDefinition);
    }
  }
  for (  ModuleDefinition moduleDefinition : sbolDocument.getModuleDefinitions()) {
    if (!URIcompliance.isTopLevelURIcompliant(moduleDefinition) || !moduleDefinition.checkDescendantsURIcompliance())     throw new SBOLValidationException("String_Node_Str",moduleDefinition);
  }
  for (  Model model : sbolDocument.getModels()) {
    if (!URIcompliance.isTopLevelURIcompliant(model) || !model.checkDescendantsURIcompliance())     throw new SBOLValidationException("String_Node_Str",model);
  }
  for (  GenericTopLevel genericTopLevel : sbolDocument.getGenericTopLevels()) {
    if (!URIcompliance.isTopLevelURIcompliant(genericTopLevel) || !genericTopLevel.checkDescendantsURIcompliance())     throw new SBOLValidationException("String_Node_Str",genericTopLevel);
  }
}