Program: 116303
Project: 116303
Buggy source:
/** 
 * Parses an individual Group
 * @param appId Application id
 * @param tenantId tenant id of tenant which deployed the Application
 * @param key Generated key for the Application
 * @param groupCtxt Group definition information
 * @param subscribableInfoCtxts Map [cartridge alias -> Group] with extracted Subscription Information
 * @param definedGroupCtxts Map [group alias -> Group] with extracted Group Information
 * @return  Group object
 * @throws ApplicationDefinitionException if unable to parse
 */
private Group parseGroup(String appId,int tenantId,String key,GroupContext groupCtxt,Map<String,SubscribableInfoContext> subscribableInfoCtxts,Map<String,GroupContext> definedGroupCtxts) throws ApplicationDefinitionException {
  GroupContext definedGroupDef=definedGroupCtxts.get(groupCtxt.getAlias());
  if (definedGroupDef == null) {
    handleError("String_Node_Str" + groupCtxt.getName() + "String_Node_Str"+ groupCtxt.getAlias()+ "String_Node_Str");
  }
  Group group=new Group(appId,groupCtxt.getName(),groupCtxt.getAlias());
  group.setAutoscalingPolicy(groupCtxt.getAutoscalingPolicy());
  group.setDeploymentPolicy(groupCtxt.getDeploymentPolicy());
  DependencyOrder dependencyOrder=new DependencyOrder();
  String[] startupOrders=getStartupOrderForGroup(groupCtxt);
  if (startupOrders != null) {
    dependencyOrder.setStartupOrders(ParserUtils.convert(startupOrders,groupCtxt));
  }
  dependencyOrder.setTerminationBehaviour(getKillbehaviour(groupCtxt.getName()));
  group.setDependencyOrder(dependencyOrder);
  Map<String,ClusterDataHolder> clusterDataMap;
  if (groupCtxt.getSubscribableContexts() != null) {
    clusterDataMap=parseLeafLevelSubscriptions(appId,tenantId,key,groupCtxt.getName(),Arrays.asList(groupCtxt.getSubscribableContexts()),subscribableInfoCtxts);
    group.setClusterData(clusterDataMap);
  }
  if (groupCtxt.getGroupContexts() != null) {
    Map<String,Group> nestedGroups=new HashMap<String,Group>();
    for (    GroupContext subGroupCtxt : groupCtxt.getGroupContexts()) {
      subGroupCtxt=definedGroupCtxts.get(subGroupCtxt.getAlias());
      Group nestedGroup=parseGroup(appId,tenantId,key,subGroupCtxt,subscribableInfoCtxts,definedGroupCtxts);
      nestedGroups.put(nestedGroup.getAlias(),nestedGroup);
    }
    group.setGroups(nestedGroups);
  }
  return group;
}

Fixed version (ground truth):
/** 
 * Parses an individual Group
 * @param appId Application id
 * @param tenantId tenant id of tenant which deployed the Application
 * @param key Generated key for the Application
 * @param groupCtxt Group definition information
 * @param subscribableInfoCtxts Map [cartridge alias -> Group] with extracted Subscription Information
 * @param definedGroupCtxts Map [group alias -> Group] with extracted Group Information
 * @return  Group object
 * @throws ApplicationDefinitionException if unable to parse
 */
private Group parseGroup(String appId,int tenantId,String key,GroupContext groupCtxt,Map<String,SubscribableInfoContext> subscribableInfoCtxts,Map<String,GroupContext> definedGroupCtxts) throws ApplicationDefinitionException {
  GroupContext definedGroupDef=definedGroupCtxts.get(groupCtxt.getAlias());
  if (definedGroupDef == null) {
    handleError("String_Node_Str" + groupCtxt.getName() + "String_Node_Str"+ groupCtxt.getAlias()+ "String_Node_Str");
  }
  Group group=new Group(appId,groupCtxt.getName(),groupCtxt.getAlias());
  group.setGroupScalingEnabled(isGroupScalingEnabled(groupCtxt.getName()));
  group.setAutoscalingPolicy(groupCtxt.getAutoscalingPolicy());
  group.setDeploymentPolicy(groupCtxt.getDeploymentPolicy());
  DependencyOrder dependencyOrder=new DependencyOrder();
  String[] startupOrders=getStartupOrderForGroup(groupCtxt);
  if (startupOrders != null) {
    dependencyOrder.setStartupOrders(ParserUtils.convert(startupOrders,groupCtxt));
  }
  dependencyOrder.setTerminationBehaviour(getKillbehaviour(groupCtxt.getName()));
  group.setDependencyOrder(dependencyOrder);
  Map<String,ClusterDataHolder> clusterDataMap;
  if (groupCtxt.getSubscribableContexts() != null) {
    clusterDataMap=parseLeafLevelSubscriptions(appId,tenantId,key,groupCtxt.getName(),Arrays.asList(groupCtxt.getSubscribableContexts()),subscribableInfoCtxts);
    group.setClusterData(clusterDataMap);
  }
  if (groupCtxt.getGroupContexts() != null) {
    Map<String,Group> nestedGroups=new HashMap<String,Group>();
    for (    GroupContext subGroupCtxt : groupCtxt.getGroupContexts()) {
      subGroupCtxt=definedGroupCtxts.get(subGroupCtxt.getAlias());
      Group nestedGroup=parseGroup(appId,tenantId,key,subGroupCtxt,subscribableInfoCtxts,definedGroupCtxts);
      nestedGroups.put(nestedGroup.getAlias(),nestedGroup);
    }
    group.setGroups(nestedGroups);
  }
  return group;
}