Program: 116415
Project: 116415
Buggy source:
private ClusterStatus getClusterStatus(Map<String,ClusterDataHolder> clusterData){
  ClusterStatus status=null;
  boolean clusterActive=true;
  boolean clusterTerminated=true;
  boolean clusterCreated=true;
  for (  Map.Entry<String,ClusterDataHolder> clusterDataHolderEntry : clusterData.entrySet()) {
    Service service=TopologyManager.getTopology().getService(clusterDataHolderEntry.getValue().getServiceType());
    Cluster cluster=service.getCluster(clusterDataHolderEntry.getValue().getClusterId());
    if (cluster.getStatus() == ClusterStatus.Active) {
      clusterActive=clusterActive && true;
      clusterTerminated=false;
      clusterCreated=false;
    }
 else     if (cluster.getStatus() == ClusterStatus.Inactive) {
      status=ClusterStatus.Inactive;
      break;
    }
 else     if (cluster.getStatus() == ClusterStatus.Terminated) {
      clusterActive=false;
      clusterCreated=false;
      clusterTerminated=clusterTerminated && true;
    }
 else     if (cluster.getStatus() == ClusterStatus.Terminating) {
      status=ClusterStatus.Terminating;
      clusterActive=false;
      clusterTerminated=false;
      clusterCreated=false;
    }
 else     if (cluster.getStatus() == ClusterStatus.Created) {
      clusterActive=false;
      clusterTerminated=false;
      clusterCreated=clusterCreated && true;
    }
  }
  if (clusterActive) {
    status=ClusterStatus.Active;
  }
 else   if (clusterTerminated) {
    status=ClusterStatus.Terminated;
  }
 else   if (clusterCreated) {
    status=ClusterStatus.Created;
  }
  return status;
}

Fixed version (ground truth):
private ClusterStatus getClusterStatus(Map<String,ClusterDataHolder> clusterData){
  ClusterStatus status=null;
  boolean clusterActive=true;
  boolean clusterTerminated=true;
  boolean clusterCreated=true;
  for (  Map.Entry<String,ClusterDataHolder> clusterDataHolderEntry : clusterData.entrySet()) {
    Service service=TopologyManager.getTopology().getService(clusterDataHolderEntry.getValue().getServiceType());
    Cluster cluster=service.getCluster(clusterDataHolderEntry.getValue().getClusterId());
    if (cluster.getStatus() == ClusterStatus.Active) {
      clusterActive=clusterActive && true;
      clusterTerminated=false;
      clusterCreated=false;
    }
 else     if (cluster.getStatus() == ClusterStatus.Inactive) {
      status=ClusterStatus.Inactive;
      clusterActive=false;
      clusterTerminated=false;
      clusterCreated=false;
      break;
    }
 else     if (cluster.getStatus() == ClusterStatus.Terminated) {
      clusterActive=false;
      clusterCreated=false;
      clusterTerminated=clusterTerminated && true;
    }
 else     if (cluster.getStatus() == ClusterStatus.Terminating) {
      status=ClusterStatus.Terminating;
      clusterActive=false;
      clusterTerminated=false;
      clusterCreated=false;
    }
 else     if (cluster.getStatus() == ClusterStatus.Created) {
      clusterActive=false;
      clusterTerminated=false;
      clusterCreated=clusterCreated && true;
    }
  }
  if (clusterActive) {
    status=ClusterStatus.Active;
  }
 else   if (clusterTerminated) {
    status=ClusterStatus.Terminated;
  }
 else   if (clusterCreated) {
    status=ClusterStatus.Created;
  }
  return status;
}