Program: 116078
Project: 116078
Buggy source:
private boolean allParentActive(List<ApplicationChildContext> parentContexts,String instanceId){
  boolean parentsActive=false;
  for (  ApplicationChildContext context1 : parentContexts) {
    if (this.inactiveInstancesMap.containsKey(context1.getId()) && this.inactiveInstancesMap.get(context1.getId()).contains(instanceId) || this.terminatingInstancesMap.containsKey(context1.getId()) && this.terminatingInstancesMap.get(context1.getId()).contains(instanceId)) {
      parentsActive=false;
      log.info("String_Node_Str" + context1.getId() + "String_Node_Str");
      return parentsActive;
    }
 else     if (this.aliasToActiveMonitorsMap.containsKey(context1.getId())) {
      Monitor monitor=this.aliasToActiveMonitorsMap.get(context1.getId());
      if (monitor instanceof GroupMonitor) {
        GroupMonitor monitor1=(GroupMonitor)monitor;
        try {
          ApplicationHolder.acquireReadLock();
          if (monitor1.verifyGroupStatus(instanceId,GroupStatus.Active)) {
            parentsActive=true;
          }
        }
  finally {
          ApplicationHolder.releaseReadLock();
        }
      }
 else       if (monitor instanceof AbstractClusterMonitor) {
        AbstractClusterMonitor monitor1=(AbstractClusterMonitor)monitor;
        TopologyManager.acquireReadLockForCluster(monitor1.getServiceId(),monitor1.getClusterId());
        try {
          if (((ClusterInstance)monitor1.getInstance(instanceId)).getStatus() == ClusterStatus.Active) {
            parentsActive=true;
          }
        }
  finally {
          TopologyManager.releaseReadLockForCluster(monitor1.getServiceId(),monitor1.getClusterId());
        }
      }
    }
  }
  return parentsActive;
}

Fixed version (ground truth):
private boolean allParentActive(List<ApplicationChildContext> parentContexts,String instanceId){
  boolean parentsActive=false;
  for (  ApplicationChildContext context1 : parentContexts) {
    if (this.inactiveInstancesMap.containsKey(context1.getId()) && this.inactiveInstancesMap.get(context1.getId()).contains(instanceId) || this.terminatingInstancesMap.containsKey(context1.getId()) && this.terminatingInstancesMap.get(context1.getId()).contains(instanceId)) {
      parentsActive=false;
      log.info("String_Node_Str" + context1.getId() + "String_Node_Str");
      return parentsActive;
    }
 else     if (this.aliasToActiveMonitorsMap.containsKey(context1.getId())) {
      Monitor monitor=this.aliasToActiveMonitorsMap.get(context1.getId());
      if (monitor instanceof GroupMonitor) {
        GroupMonitor monitor1=(GroupMonitor)monitor;
        try {
          ApplicationHolder.acquireReadLock();
          if (monitor1.verifyGroupStatus(context1.getId(),instanceId,GroupStatus.Active)) {
            parentsActive=true;
          }
        }
  finally {
          ApplicationHolder.releaseReadLock();
        }
      }
 else       if (monitor instanceof AbstractClusterMonitor) {
        AbstractClusterMonitor monitor1=(AbstractClusterMonitor)monitor;
        TopologyManager.acquireReadLockForCluster(monitor1.getServiceId(),monitor1.getClusterId());
        try {
          if (((ClusterInstance)monitor1.getInstance(instanceId)).getStatus() == ClusterStatus.Active) {
            parentsActive=true;
          }
        }
  finally {
          TopologyManager.releaseReadLockForCluster(monitor1.getServiceId(),monitor1.getClusterId());
        }
      }
    }
  }
  return parentsActive;
}