Program: 116475
Project: 116475
Buggy source:
private boolean updateChildStatus(String appId,String id,Map<String,Group> groups,Map<String,ClusterDataHolder> clusterData,ParentComponent parent){
  boolean groupActive=false;
  boolean clustersActive;
  boolean groupsActive;
  boolean childFound=false;
  boolean clusterFound=false;
  for (  ClusterDataHolder clusterDataHolder : clusterData.values()) {
    if (clusterDataHolder.getClusterId().equals(id)) {
      clusterFound=true;
    }
  }
  if (clusterFound || groups.containsKey(id)) {
    childFound=true;
    if (!clusterData.isEmpty() && !groups.isEmpty()) {
      clustersActive=getClusterStatus(clusterData);
      groupsActive=getGroupStatus(groups);
      groupActive=clustersActive && groupsActive;
    }
 else     if (!groups.isEmpty()) {
      groupsActive=getGroupStatus(groups);
      groupActive=groupsActive;
    }
 else     if (!clusterData.isEmpty()) {
      clustersActive=getClusterStatus(clusterData);
      groupActive=clustersActive;
    }
 else {
      log.warn("String_Node_Str" + appId);
    }
    if (parent instanceof Application && groupActive) {
      StatusEventPublisher.sendApplicationActivatedEvent(appId);
    }
 else     if (parent instanceof Group && groupActive) {
      StatusEventPublisher.sendGroupActivatedEvent(appId,((Group)parent).getAlias());
    }
    return childFound;
  }
 else {
    if (!groups.isEmpty()) {
      for (      Group group : groups.values()) {
        return updateChildStatus(appId,id,group.getAliasToGroupMap(),group.getClusterDataMap(),group);
      }
    }
  }
  return childFound;
}

Fixed version (ground truth):
private boolean updateChildStatus(String appId,String id,Map<String,Group> groups,Map<String,ClusterDataHolder> clusterData,ParentComponent parent){
  boolean groupActive=false;
  boolean clustersActive;
  boolean groupsActive;
  boolean childFound=false;
  boolean clusterFound=false;
  for (  ClusterDataHolder clusterDataHolder : clusterData.values()) {
    if (clusterDataHolder.getClusterId().equals(id)) {
      clusterFound=true;
    }
  }
  log.info("String_Node_Str" + clusterFound);
  if (clusterFound || groups.containsKey(id)) {
    childFound=true;
    if (!clusterData.isEmpty() && !groups.isEmpty()) {
      if (log.isDebugEnabled()) {
        log.debug("String_Node_Str" + clusterFound);
      }
      clustersActive=getClusterStatus(clusterData);
      groupsActive=getGroupStatus(groups);
      if (log.isDebugEnabled()) {
        log.debug("String_Node_Str" + clustersActive + "String_Node_Str"+ groupActive);
      }
      groupActive=clustersActive && groupsActive;
    }
 else     if (!groups.isEmpty()) {
      groupsActive=getGroupStatus(groups);
      if (log.isDebugEnabled()) {
        log.info("String_Node_Str" + clusterFound);
      }
      groupActive=groupsActive;
    }
 else     if (!clusterData.isEmpty()) {
      clustersActive=getClusterStatus(clusterData);
      if (log.isDebugEnabled()) {
        log.debug("String_Node_Str" + clustersActive + "String_Node_Str"+ groupActive);
      }
      groupActive=clustersActive;
    }
 else {
      log.warn("String_Node_Str" + appId);
    }
    if (parent instanceof Application && groupActive) {
      log.info("String_Node_Str" + appId);
      StatusEventPublisher.sendApplicationActivatedEvent(appId);
    }
 else     if (parent instanceof Group && groupActive) {
      log.info("String_Node_Str" + parent.getUniqueIdentifier());
      StatusEventPublisher.sendGroupActivatedEvent(appId,parent.getUniqueIdentifier());
    }
    return childFound;
  }
 else {
    if (!groups.isEmpty()) {
      for (      Group group : groups.values()) {
        return updateChildStatus(appId,id,group.getAliasToGroupMap(),group.getClusterDataMap(),group);
      }
    }
  }
  return childFound;
}