Program: 116435
Project: 116435
Buggy source:
protected void onChildTerminatedEvent(String idOfEvent){
  List<ApplicationContext> terminationList;
  boolean allDependentTerminated=true;
  ApplicationContext context=this.dependencyTree.findApplicationContextWithId(idOfEvent);
  context.setTerminated(true);
  terminationList=this.dependencyTree.getTerminationDependencies(idOfEvent);
  if (terminationList != null) {
    for (    ApplicationContext context1 : terminationList) {
      if (this.aliasToInActiveMonitorsMap.containsKey(context1.getId())) {
        allDependentTerminated=false;
      }
 else       if (this.aliasToActiveMonitorsMap.containsKey(context1.getId())) {
        log.warn("String_Node_Str" + context1.getId() + "String_Node_Str");
        allDependentTerminated=false;
      }
 else {
        allDependentTerminated=true;
      }
    }
  }
  List<ApplicationContext> parentContexts=this.dependencyTree.findAllParentContextWithId(idOfEvent);
  boolean canStart=false;
  if (parentContexts != null) {
    for (    ApplicationContext context1 : parentContexts) {
      if (this.aliasToInActiveMonitorsMap.containsKey(context1.getId())) {
        log.info("String_Node_Str" + context1.getId() + "String_Node_Str");
        canStart=false;
      }
 else       if (this.aliasToActiveMonitorsMap.containsKey(context1.getId())) {
        if (canStart) {
          log.warn("String_Node_Str" + context1.getId() + "String_Node_Str");
        }
      }
 else {
        log.info("String_Node_Str" + context1.getId() + "String_Node_Str");
        canStart=true;
      }
    }
  }
  if ((terminationList != null && allDependentTerminated || terminationList == null) && (parentContexts != null && canStart || parentContexts == null)) {
    try {
      this.startDependency();
    }
 catch (    TopologyInConsistentException e) {
      e.printStackTrace();
    }
  }
 else {
    log.info("String_Node_Str" + idOfEvent + "String_Node_Str");
  }
}

Fixed version (ground truth):
protected void onChildTerminatedEvent(String idOfEvent){
  List<ApplicationContext> terminationList;
  boolean allDependentTerminated=true;
  ApplicationContext context=this.dependencyTree.findApplicationContextWithId(idOfEvent);
  context.setTerminated(true);
  terminationList=this.dependencyTree.getTerminationDependencies(idOfEvent);
  if (terminationList != null) {
    for (    ApplicationContext context1 : terminationList) {
      if (!this.aliasToInActiveMonitorsMap.containsKey(context1.getId())) {
        allDependentTerminated=false;
      }
 else       if (this.aliasToActiveMonitorsMap.containsKey(context1.getId())) {
        log.warn("String_Node_Str" + context1.getId() + "String_Node_Str");
        allDependentTerminated=false;
      }
 else {
        log.info("String_Node_Str" + context1.getId() + "String_Node_Str");
      }
    }
  }
  List<ApplicationContext> parentContexts=this.dependencyTree.findAllParentContextWithId(idOfEvent);
  boolean canStart=false;
  if (parentContexts != null) {
    for (    ApplicationContext context1 : parentContexts) {
      if (this.aliasToInActiveMonitorsMap.containsKey(context1.getId())) {
        log.info("String_Node_Str" + context1.getId() + "String_Node_Str");
        canStart=false;
      }
 else       if (this.aliasToActiveMonitorsMap.containsKey(context1.getId())) {
        if (canStart) {
          log.warn("String_Node_Str" + context1.getId() + "String_Node_Str");
        }
      }
 else {
        log.info("String_Node_Str" + context1.getId() + "String_Node_Str");
        canStart=true;
      }
    }
  }
  if ((terminationList != null && allDependentTerminated || terminationList == null) && (parentContexts != null && canStart || parentContexts == null)) {
    try {
      this.startDependencyOnTermination();
    }
 catch (    TopologyInConsistentException e) {
      e.printStackTrace();
    }
  }
 else {
    StatusChecker.getInstance().onChildStatusChange(idOfEvent,this.id,this.appId);
    log.info("String_Node_Str" + idOfEvent + "String_Node_Str");
  }
}