Program: 12656
Project: 12656
Buggy source:
protected boolean checkDescendantsURIcompliance(){
  if (!isURIcompliant(this.getIdentity())) {
    return false;
  }
  boolean allDescendantsCompliant=true;
  if (!this.getModules().isEmpty()) {
    for (    Module module : this.getModules()) {
      allDescendantsCompliant=allDescendantsCompliant && isChildURIcompliant(this.getIdentity(),module.getIdentity());
      if (!allDescendantsCompliant) {
        return allDescendantsCompliant;
      }
      if (!module.getMapsTos().isEmpty()) {
        for (        MapsTo mapsTo : module.getMapsTos()) {
          allDescendantsCompliant=allDescendantsCompliant && isChildURIcompliant(module.getIdentity(),mapsTo.getIdentity());
          if (!allDescendantsCompliant) {
            return allDescendantsCompliant;
          }
        }
      }
    }
  }
  if (!this.getFunctionalComponents().isEmpty()) {
    for (    FunctionalComponent functionalComponent : this.getFunctionalComponents()) {
      allDescendantsCompliant=allDescendantsCompliant && isChildURIcompliant(this.getIdentity(),functionalComponent.getIdentity());
      if (!allDescendantsCompliant) {
        return allDescendantsCompliant;
      }
      if (!functionalComponent.getMapsTos().isEmpty()) {
        for (        MapsTo mapsTo : functionalComponent.getMapsTos()) {
          allDescendantsCompliant=allDescendantsCompliant && isChildURIcompliant(functionalComponent.getIdentity(),mapsTo.getIdentity());
          if (!allDescendantsCompliant) {
            return allDescendantsCompliant;
          }
        }
      }
    }
  }
  if (!this.getInteractions().isEmpty()) {
    for (    Interaction interaction : this.getInteractions()) {
      allDescendantsCompliant=allDescendantsCompliant && isChildURIcompliant(this.getIdentity(),interaction.getIdentity());
      if (!allDescendantsCompliant) {
        return allDescendantsCompliant;
      }
      for (      Participation participation : interaction.getParticipations()) {
        allDescendantsCompliant=allDescendantsCompliant && isChildURIcompliant(interaction.getIdentity(),participation.getIdentity());
        if (!allDescendantsCompliant) {
          return allDescendantsCompliant;
        }
      }
    }
  }
  return allDescendantsCompliant;
}

Fixed version (ground truth):
protected boolean checkDescendantsURIcompliance(){
  if (!isTopLevelURIformCompliant(this.getIdentity()))   return false;
  boolean allDescendantsCompliant=true;
  if (!this.getModules().isEmpty()) {
    for (    Module module : this.getModules()) {
      allDescendantsCompliant=allDescendantsCompliant && isChildURIcompliant(this,module);
      if (!allDescendantsCompliant) {
        return allDescendantsCompliant;
      }
      if (!module.getMapsTos().isEmpty()) {
        for (        MapsTo mapsTo : module.getMapsTos()) {
          allDescendantsCompliant=allDescendantsCompliant && isChildURIcompliant(module,mapsTo);
          if (!allDescendantsCompliant) {
            return allDescendantsCompliant;
          }
        }
      }
    }
  }
  if (!this.getFunctionalComponents().isEmpty()) {
    for (    FunctionalComponent functionalComponent : this.getFunctionalComponents()) {
      allDescendantsCompliant=allDescendantsCompliant && isChildURIcompliant(this,functionalComponent);
      if (!allDescendantsCompliant) {
        return allDescendantsCompliant;
      }
      if (!functionalComponent.getMapsTos().isEmpty()) {
        for (        MapsTo mapsTo : functionalComponent.getMapsTos()) {
          allDescendantsCompliant=allDescendantsCompliant && isChildURIcompliant(functionalComponent,mapsTo);
          if (!allDescendantsCompliant) {
            return allDescendantsCompliant;
          }
        }
      }
    }
  }
  if (!this.getInteractions().isEmpty()) {
    for (    Interaction interaction : this.getInteractions()) {
      allDescendantsCompliant=allDescendantsCompliant && isChildURIcompliant(this,interaction);
      if (!allDescendantsCompliant) {
        return allDescendantsCompliant;
      }
      for (      Participation participation : interaction.getParticipations()) {
        allDescendantsCompliant=allDescendantsCompliant && isChildURIcompliant(interaction,participation);
        if (!allDescendantsCompliant) {
          return allDescendantsCompliant;
        }
      }
    }
  }
  return allDescendantsCompliant;
}