Program: 63919
Project: 63919
Buggy source:
@Test @Parameters({"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}) public void testClusterCreation(@Optional("String_Node_Str") String clusterName,@Optional("String_Node_Str") String ambariUser,@Optional("String_Node_Str") String ambariPassword,@Optional("String_Node_Str") boolean emailNeeded,@Optional("String_Node_Str") boolean enableSecurity,@Optional String kerberosMasterKey,@Optional String kerberosAdmin,@Optional String kerberosPassword,@Optional("String_Node_Str") String runRecipesOnHosts) throws Exception {
  IntegrationTestContext itContext=getItContext();
  String stackIdStr=itContext.getContextParam(CloudbreakITContextConstants.STACK_ID);
  Integer stackId=Integer.valueOf(stackIdStr);
  Integer blueprintId=Integer.valueOf(itContext.getContextParam(CloudbreakITContextConstants.BLUEPRINT_ID));
  List<HostGroup> hostgroups=itContext.getContextParam(CloudbreakITContextConstants.HOSTGROUP_ID,List.class);
  Set<HostGroupJson> hostGroupJsons1=convertHostGroups(hostgroups,runRecipesOnHosts);
  itContext.putContextParam(CloudbreakITContextConstants.AMBARI_USER_ID,ambariUser);
  itContext.putContextParam(CloudbreakITContextConstants.AMBARI_PASSWORD_ID,ambariPassword);
  ClusterRequest clusterRequest=new ClusterRequest();
  clusterRequest.setName(clusterName);
  clusterRequest.setDescription("String_Node_Str");
  clusterRequest.setKerberosAdmin(kerberosAdmin);
  clusterRequest.setKerberosPassword(kerberosPassword);
  clusterRequest.setKerberosMasterKey(kerberosMasterKey);
  clusterRequest.setEnableSecurity(enableSecurity);
  clusterRequest.setPassword(ambariPassword);
  clusterRequest.setUserName(ambariUser);
  clusterRequest.setBlueprintId(Long.valueOf(blueprintId));
  clusterRequest.setHostGroups(hostGroupJsons1);
  ClusterEndpoint clusterEndpoint=getCloudbreakClient().clusterEndpoint();
  clusterEndpoint.post(Long.valueOf(stackId),clusterRequest);
  CloudbreakUtil.waitAndCheckStackStatus(getCloudbreakClient(),stackIdStr,"String_Node_Str");
  CloudbreakUtil.checkClusterAvailability(getCloudbreakClient().stackEndpoint(),stackIdStr,ambariUser,ambariPassword);
}

Fixed version (ground truth):
@Test @Parameters({"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}) public void testClusterCreation(@Optional("String_Node_Str") String clusterName,@Optional("String_Node_Str") String ambariUser,@Optional("String_Node_Str") String ambariPassword,@Optional("String_Node_Str") boolean emailNeeded,@Optional("String_Node_Str") boolean enableSecurity,@Optional String kerberosMasterKey,@Optional String kerberosAdmin,@Optional String kerberosPassword,@Optional("String_Node_Str") String runRecipesOnHosts) throws Exception {
  IntegrationTestContext itContext=getItContext();
  String stackIdStr=itContext.getContextParam(CloudbreakITContextConstants.STACK_ID);
  Integer stackId=Integer.valueOf(stackIdStr);
  Integer blueprintId=Integer.valueOf(itContext.getContextParam(CloudbreakITContextConstants.BLUEPRINT_ID));
  List<HostGroup> hostgroups=itContext.getContextParam(CloudbreakITContextConstants.HOSTGROUP_ID,List.class);
  Set<HostGroupJson> hostGroupJsons1=convertHostGroups(hostgroups,runRecipesOnHosts);
  itContext.putContextParam(CloudbreakITContextConstants.AMBARI_USER_ID,ambariUser);
  itContext.putContextParam(CloudbreakITContextConstants.AMBARI_PASSWORD_ID,ambariPassword);
  ClusterRequest clusterRequest=new ClusterRequest();
  clusterRequest.setName(clusterName);
  clusterRequest.setDescription("String_Node_Str");
  clusterRequest.setKerberosAdmin(kerberosAdmin);
  clusterRequest.setKerberosPassword(kerberosPassword);
  clusterRequest.setKerberosMasterKey(kerberosMasterKey);
  clusterRequest.setEnableSecurity(enableSecurity);
  clusterRequest.setPassword(ambariPassword);
  clusterRequest.setUserName(ambariUser);
  clusterRequest.setBlueprintId(Long.valueOf(blueprintId));
  clusterRequest.setHostGroups(hostGroupJsons1);
  ClusterEndpoint clusterEndpoint=getCloudbreakClient().clusterEndpoint();
  CloudbreakUtil.checkResponse("String_Node_Str",clusterEndpoint.post(Long.valueOf(stackId),clusterRequest));
  CloudbreakUtil.waitAndCheckStackStatus(getCloudbreakClient(),stackIdStr,"String_Node_Str");
  CloudbreakUtil.checkClusterAvailability(getCloudbreakClient().stackEndpoint(),stackIdStr,ambariUser,ambariPassword);
}