Program: 116011
Project: 116011
Buggy source:
/** 
 * Builds the Application structure
 * @param applicationContext ApplicationContext object with Application information
 * @param subscribableInfoCtxts Map [cartridge alias -> Group] with extracted Subscription Information
 * @return Application Application object denoting the Application structure
 * @throws ApplicationDefinitionException If an error occurs in building the Application structure
 */
private Application buildCompositeAppStructure(ApplicationContext applicationContext,Map<String,SubscribableInfoContext> subscribableInfoCtxts) throws ApplicationDefinitionException {
}

Fixed version (ground truth):
/** 
 * Builds the Application structure
 * @param applicationContext ApplicationContext object with Application information
 * @param subscribableInfoCtxts Map [cartridge alias -> Group] with extracted Subscription Information
 * @return Application Application object denoting the Application structure
 * @throws ApplicationDefinitionException If an error occurs in building the Application structure
 */
private Application buildCompositeAppStructure(ApplicationContext applicationContext,Map<String,SubscribableInfoContext> subscribableInfoCtxts) throws ApplicationDefinitionException {
  Application application=new Application(applicationContext.getApplicationId());
  application.setTenantId(applicationContext.getTenantId());
  application.setTenantDomain(applicationContext.getTenantDomain());
  application.setTenantAdminUserName(applicationContext.getTenantAdminUsername());
  Map<String,Map<String,ClusterDataHolder>> clusterDataMap;
  if (applicationContext.getComponents() != null) {
    if (applicationContext.getComponents().getCartridgeContexts() != null) {
      clusterDataMap=parseLeafLevelSubscriptions(applicationContext.getApplicationId(),applicationContext.getTenantId(),application.getKey(),null,Arrays.asList(applicationContext.getComponents().getCartridgeContexts()),null);
      application.setClusterData(clusterDataMap.get("String_Node_Str"));
      application.setClusterDataForType(clusterDataMap.get("String_Node_Str"));
    }
    if (applicationContext.getComponents().getGroupContexts() != null) {
      application.setGroups(parseGroups(applicationContext.getApplicationId(),applicationContext.getTenantId(),application.getKey(),Arrays.asList(applicationContext.getComponents().getGroupContexts()),subscribableInfoCtxts));
    }
    if (applicationContext.getComponents().getDependencyContext() != null) {
      DependencyOrder appDependencyOrder=new DependencyOrder();
      String[] startupOrders=applicationContext.getComponents().getDependencyContext().getStartupOrdersContexts();
      if (startupOrders != null) {
        if (log.isDebugEnabled()) {
          log.debug("String_Node_Str" + applicationContext.getAlias() + "String_Node_Str"+ startupOrders.length);
        }
        appDependencyOrder.setStartupOrders(ParserUtils.convertStartupOrder(startupOrders));
      }
 else {
        if (log.isDebugEnabled()) {
          log.debug("String_Node_Str" + applicationContext.getAlias());
        }
      }
      String[] scalingDependents=applicationContext.getComponents().getDependencyContext().getScalingDependents();
      if (scalingDependents != null) {
        if (log.isDebugEnabled()) {
          log.debug("String_Node_Str" + applicationContext.getAlias() + "String_Node_Str"+ scalingDependents.length);
        }
        appDependencyOrder.setScalingDependents(ParserUtils.convertScalingDependentList(scalingDependents));
      }
 else {
        if (log.isDebugEnabled()) {
          log.debug("String_Node_Str" + applicationContext.getAlias());
        }
      }
      String terminationBehavior=applicationContext.getComponents().getDependencyContext().getTerminationBehaviour();
      validateTerminationBehavior(terminationBehavior);
      appDependencyOrder.setTerminationBehaviour(terminationBehavior);
      application.setDependencyOrder(appDependencyOrder);
    }
  }
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + applicationContext.getApplicationId());
  }
  return application;
}