Program: 116283
Project: 116283
Buggy source:
@Override public void createApplicationClusters(String appId,ApplicationClusterContextDTO[] appClustersContexts) throws ApplicationClusterRegistrationException {
  if (appClustersContexts == null || appClustersContexts.length == 0) {
    String errorMsg="String_Node_Str";
    LOG.error(errorMsg);
    throw new ApplicationClusterRegistrationException(errorMsg);
  }
  List<Cluster> clusters=new ArrayList<Cluster>();
  for (  ApplicationClusterContextDTO appClusterCtxt : appClustersContexts) {
    dataHolder.addClusterContext(new ClusterContext(appClusterCtxt.getClusterId(),appClusterCtxt.getCartridgeType(),appClusterCtxt.getTextPayload(),appClusterCtxt.getHostName(),appClusterCtxt.isLbCluster(),appClusterCtxt.getProperties()));
    Cluster newCluster=new Cluster(appClusterCtxt.getCartridgeType(),appClusterCtxt.getClusterId(),appClusterCtxt.getDeploymentPolicyName(),appClusterCtxt.getAutoscalePolicyName(),appId);
    newCluster.setLbCluster(false);
    newCluster.setTenantRange(appClusterCtxt.getTenantRange());
    newCluster.setStatus(ClusterStatus.Created,null);
    newCluster.setHostNames(Arrays.asList(appClusterCtxt.getHostName()));
    Cartridge cartridge=dataHolder.getCartridge(appClusterCtxt.getCartridgeType());
    if (cartridge.getDeployerType() != null && cartridge.getDeployerType().equals(StratosConstants.KUBERNETES_DEPLOYER_TYPE)) {
      newCluster.setKubernetesCluster(true);
    }
    if (appClusterCtxt.getProperties() != null) {
      Properties properties=CloudControllerUtil.toJavaUtilProperties(appClusterCtxt.getProperties());
      newCluster.setProperties(properties);
    }
    clusters.add(newCluster);
  }
  TopologyBuilder.handleApplicationClustersCreated(appId,clusters);
  persist();
}

Fixed version (ground truth):
@Override public void createApplicationClusters(String appId,ApplicationClusterContextDTO[] appClustersContexts) throws ApplicationClusterRegistrationException {
  if (appClustersContexts == null || appClustersContexts.length == 0) {
    String errorMsg="String_Node_Str";
    LOG.error(errorMsg);
    throw new ApplicationClusterRegistrationException(errorMsg);
  }
  List<Cluster> clusters=new ArrayList<Cluster>();
  for (  ApplicationClusterContextDTO appClusterCtxt : appClustersContexts) {
    dataHolder.addClusterContext(new ClusterContext(appClusterCtxt.getClusterId(),appClusterCtxt.getCartridgeType(),appClusterCtxt.getTextPayload(),appClusterCtxt.getHostName(),appClusterCtxt.isLbCluster(),appClusterCtxt.getProperties()));
    Cluster newCluster=new Cluster(appClusterCtxt.getCartridgeType(),appClusterCtxt.getClusterId(),appClusterCtxt.getDeploymentPolicyName(),appClusterCtxt.getAutoscalePolicyName(),appId);
    newCluster.setLbCluster(false);
    newCluster.setTenantRange(appClusterCtxt.getTenantRange());
    newCluster.setHostNames(Arrays.asList(appClusterCtxt.getHostName()));
    Cartridge cartridge=dataHolder.getCartridge(appClusterCtxt.getCartridgeType());
    if (cartridge.getDeployerType() != null && cartridge.getDeployerType().equals(StratosConstants.KUBERNETES_DEPLOYER_TYPE)) {
      newCluster.setKubernetesCluster(true);
    }
    if (appClusterCtxt.getProperties() != null) {
      Properties properties=CloudControllerUtil.toJavaUtilProperties(appClusterCtxt.getProperties());
      newCluster.setProperties(properties);
    }
    clusters.add(newCluster);
  }
  TopologyBuilder.handleApplicationClustersCreated(appId,clusters);
  persist();
}