Program: 12516
Project: 12516
Buggy source:
@Override void checkDescendantsURIcompliance() throws SBOLValidationException {
  isTopLevelURIformCompliant(this.getIdentity());
  if (!this.getModules().isEmpty()) {
    for (    Module module : this.getModules()) {
      try {
        isChildURIcompliant(this,module);
      }
 catch (      SBOLValidationException e) {
        throw new SBOLValidationException(e.getRule(),module);
      }
      if (!module.getMapsTos().isEmpty()) {
        for (        MapsTo mapsTo : module.getMapsTos()) {
          try {
            isChildURIcompliant(module,mapsTo);
          }
 catch (          SBOLValidationException e) {
            throw new SBOLValidationException(e.getRule(),mapsTo);
          }
        }
      }
    }
  }
  if (!this.getFunctionalComponents().isEmpty()) {
    for (    FunctionalComponent functionalComponent : this.getFunctionalComponents()) {
      try {
        isChildURIcompliant(this,functionalComponent);
      }
 catch (      SBOLValidationException e) {
        throw new SBOLValidationException(e.getRule(),functionalComponent);
      }
      if (!functionalComponent.getMapsTos().isEmpty()) {
        for (        MapsTo mapsTo : functionalComponent.getMapsTos()) {
          try {
            isChildURIcompliant(functionalComponent,mapsTo);
          }
 catch (          SBOLValidationException e) {
            throw new SBOLValidationException(e.getRule(),mapsTo);
          }
        }
      }
    }
  }
  if (!this.getInteractions().isEmpty()) {
    for (    Interaction interaction : this.getInteractions()) {
      try {
        isChildURIcompliant(this,interaction);
      }
 catch (      SBOLValidationException e) {
        throw new SBOLValidationException(e.getRule(),interaction);
      }
      for (      Participation participation : interaction.getParticipations()) {
        try {
          isChildURIcompliant(interaction,participation);
        }
 catch (        SBOLValidationException e) {
          throw new SBOLValidationException(e.getRule(),participation);
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override void checkDescendantsURIcompliance() throws SBOLValidationException {
  if (!this.getModules().isEmpty()) {
    for (    Module module : this.getModules()) {
      try {
        isChildURIcompliant(this,module);
      }
 catch (      SBOLValidationException e) {
        throw new SBOLValidationException(e.getRule(),module);
      }
      if (!module.getMapsTos().isEmpty()) {
        for (        MapsTo mapsTo : module.getMapsTos()) {
          try {
            isChildURIcompliant(module,mapsTo);
          }
 catch (          SBOLValidationException e) {
            throw new SBOLValidationException(e.getRule(),mapsTo);
          }
        }
      }
    }
  }
  if (!this.getFunctionalComponents().isEmpty()) {
    for (    FunctionalComponent functionalComponent : this.getFunctionalComponents()) {
      try {
        isChildURIcompliant(this,functionalComponent);
      }
 catch (      SBOLValidationException e) {
        throw new SBOLValidationException(e.getRule(),functionalComponent);
      }
      if (!functionalComponent.getMapsTos().isEmpty()) {
        for (        MapsTo mapsTo : functionalComponent.getMapsTos()) {
          try {
            isChildURIcompliant(functionalComponent,mapsTo);
          }
 catch (          SBOLValidationException e) {
            throw new SBOLValidationException(e.getRule(),mapsTo);
          }
        }
      }
    }
  }
  if (!this.getInteractions().isEmpty()) {
    for (    Interaction interaction : this.getInteractions()) {
      try {
        isChildURIcompliant(this,interaction);
      }
 catch (      SBOLValidationException e) {
        throw new SBOLValidationException(e.getRule(),interaction);
      }
      for (      Participation participation : interaction.getParticipations()) {
        try {
          isChildURIcompliant(interaction,participation);
        }
 catch (        SBOLValidationException e) {
          throw new SBOLValidationException(e.getRule(),participation);
        }
      }
    }
  }
}