Program: 116085
Project: 116085
Buggy source:
/** 
 * Act upon one of its children got terminated
 * @param eventId id of the notifier
 */
protected void onChildTerminatedEvent(String eventId,String instanceId){
  List<ApplicationChildContext> terminationList;
  boolean allDependentTerminated=false;
  ApplicationChildContext context=this.startupDependencyTree.findApplicationContextWithIdInPrimaryTree(eventId);
  context.setTerminated(true);
  terminationList=this.startupDependencyTree.getTerminationDependencies(eventId);
  if (terminationList != null) {
    allDependentTerminated=allDependentTerminated(terminationList);
  }
  log.info("String_Node_Str" + "String_Node_Str" + eventId + "String_Node_Str"+ instanceId);
  List<ApplicationChildContext> parentContexts=this.startupDependencyTree.findAllParentContextWithId(eventId);
  boolean parentsTerminated=false;
  boolean allParentsActive=false;
  if (parentContexts != null) {
    parentsTerminated=allParentTerminated(parentContexts,instanceId);
    allParentsActive=allParentActive(parentContexts,instanceId);
  }
  if ((terminationList.isEmpty() || allDependentTerminated) && (parentContexts.isEmpty() || parentsTerminated || allParentsActive)) {
    try {
      try {
        this.startDependencyOnTermination(instanceId);
      }
 catch (      MonitorNotFoundException e) {
        e.printStackTrace();
      }
catch (      PolicyValidationException e) {
        e.printStackTrace();
      }
catch (      PartitionValidationException e) {
        e.printStackTrace();
      }
    }
 catch (    TopologyInConsistentException e) {
      log.error("String_Node_Str" + e);
    }
  }
 else {
    ServiceReferenceHolder.getInstance().getGroupStatusProcessorChain().process(this.id,this.appId,instanceId);
    log.info("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Act upon one of its children got terminated
 * @param eventId id of the notifier
 */
protected void onChildTerminatedEvent(String eventId,String instanceId){
  List<ApplicationChildContext> terminationList;
  boolean allDependentTerminated=false;
  ApplicationChildContext context=this.startupDependencyTree.findApplicationContextWithIdInPrimaryTree(eventId);
  context.setTerminated(true);
  terminationList=this.startupDependencyTree.getTerminationDependencies(eventId);
  if (terminationList != null) {
    allDependentTerminated=allDependentTerminated(terminationList,instanceId);
  }
  log.info("String_Node_Str" + "String_Node_Str" + eventId + "String_Node_Str"+ instanceId);
  List<ApplicationChildContext> parentContexts=this.startupDependencyTree.findAllParentContextWithId(eventId);
  boolean parentsTerminated=false;
  boolean allParentsActive=false;
  if (parentContexts != null) {
    parentsTerminated=allParentTerminated(parentContexts,instanceId);
    allParentsActive=allParentActive(parentContexts,instanceId);
  }
  if ((terminationList.isEmpty() || allDependentTerminated) && (parentContexts.isEmpty() || parentsTerminated || allParentsActive)) {
    try {
      try {
        this.startDependencyOnTermination(instanceId);
      }
 catch (      MonitorNotFoundException e) {
        e.printStackTrace();
      }
catch (      PolicyValidationException e) {
        e.printStackTrace();
      }
catch (      PartitionValidationException e) {
        e.printStackTrace();
      }
    }
 catch (    TopologyInConsistentException e) {
      log.error("String_Node_Str" + e);
    }
  }
 else {
    ServiceReferenceHolder.getInstance().getGroupStatusProcessorChain().process(this.id,this.appId,instanceId);
    log.info("String_Node_Str");
  }
}