nus-yam/ex-repair huggingface dataset:
Program: 42518
Project: 42518
Buggy source:
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_GAMMA_TELESCOPE,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}

Fixed version (ground truth):
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_GAMMA_TELESCOPE,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  addModelId(modelId);
  String analysisName=algorithmName + versionSetId;
  addAnalysisId(mlHttpclient.getAnalysisId(projectId,analysisName));
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}
Program: 42519
Project: 42519
Buggy source:
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_AUTOMOBILE,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}

Fixed version (ground truth):
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_AUTOMOBILE,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  addModelId(modelId);
  String analysisName=algorithmName + versionSetId;
  addAnalysisId(mlHttpclient.getAnalysisId(projectId,analysisName));
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}
Program: 42520
Project: 42520
Buggy source:
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_AZURE_STREAMING,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}

Fixed version (ground truth):
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_AZURE_STREAMING,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  addModelId(modelId);
  String analysisName=algorithmName + versionSetId;
  addAnalysisId(mlHttpclient.getAnalysisId(projectId,analysisName));
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}
Program: 42521
Project: 42521
Buggy source:
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_DAS,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  String payload="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  int analysisId=mlHttpclient.getAnalysisId(projectId,algorithmName + versionSetId);
  mlHttpclient.setFeatureCustomized(analysisId,payload);
  modelId=mlHttpclient.getModelId(modelName);
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}

Fixed version (ground truth):
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_DAS,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  String payload="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  int analysisId=mlHttpclient.getAnalysisId(projectId,algorithmName + versionSetId);
  mlHttpclient.setFeatureCustomized(analysisId,payload);
  modelId=mlHttpclient.getModelId(modelName);
  addModelId(modelId);
  String analysisName=algorithmName + versionSetId;
  addAnalysisId(mlHttpclient.getAnalysisId(projectId,analysisName));
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}
Program: 42522
Project: 42522
Buggy source:
private boolean buildModelWithLearningAlgorithmExpectingFailure(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_ABALONE,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusFailed(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  return status;
}

Fixed version (ground truth):
private boolean buildModelWithLearningAlgorithmExpectingFailure(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_ABALONE,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  addModelId(modelId);
  String analysisName=algorithmName + versionSetId;
  addAnalysisId(mlHttpclient.getAnalysisId(projectId,analysisName));
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusFailed(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  return status;
}
Program: 42523
Project: 42523
Buggy source:
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private boolean buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_ABALONE,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  return status;
}

Fixed version (ground truth):
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private boolean buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_ABALONE,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  addModelId(modelId);
  String analysisName=algorithmName + versionSetId;
  addAnalysisId(mlHttpclient.getAnalysisId(projectId,analysisName));
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  return status;
}
Program: 42524
Project: 42524
Buggy source:
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_DIGITS,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}

Fixed version (ground truth):
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_DIGITS,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  addModelId(modelId);
  String analysisName=algorithmName + versionSetId;
  addAnalysisId(mlHttpclient.getAnalysisId(projectId,analysisName));
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}
Program: 42525
Project: 42525
Buggy source:
/** 
 * Test creating a model.
 * @throws MLHttpClientException 
 * @throws IOException 
 */
@Test(priority=1,description="String_Node_Str") public void testCreateModel() throws MLHttpClientException, IOException {
  CloseableHttpResponse response=mlHttpclient.createModel(analysisId,versionSetId);
  MLIntegrationTestConstants.MODEL_NAME=mlHttpclient.getModelName(response);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
}

Fixed version (ground truth):
/** 
 * Test creating a model.
 * @throws MLHttpClientException 
 * @throws IOException 
 */
@Test(priority=1,description="String_Node_Str") public void testCreateModel() throws MLHttpClientException, IOException {
  createModel(analysisId,versionSetId);
}
Program: 42526
Project: 42526
Buggy source:
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_DIABETES,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,analysisId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  CloseableHttpResponse response=mlHttpclient.doHttpPost("String_Node_Str" + modelId,null);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusFailed(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}

Fixed version (ground truth):
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_DIABETES,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,analysisId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  addModelId(modelId);
  CloseableHttpResponse response=mlHttpclient.doHttpPost("String_Node_Str" + modelId,null);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusFailed(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}
Program: 42527
Project: 42527
Buggy source:
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_DIABETES,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,analysisId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  CloseableHttpResponse response=mlHttpclient.doHttpPost("String_Node_Str" + modelId,null);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}

Fixed version (ground truth):
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_DIABETES,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,analysisId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  addModelId(modelId);
  CloseableHttpResponse response=mlHttpclient.doHttpPost("String_Node_Str" + modelId,null);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}
Program: 42528
Project: 42528
Buggy source:
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_TITANIC,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId,null);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}

Fixed version (ground truth):
/** 
 * A test case for building a model with the given learning algorithm
 * @param algorithmName Name of the learning algorithm
 * @param algorithmType Type of the learning algorithm
 * @throws MLHttpClientException
 * @throws IOException
 * @throws JSONException
 * @throws InterruptedException
 */
private void buildModelWithLearningAlgorithm(String algorithmName,String algorithmType) throws MLHttpClientException, IOException, JSONException, InterruptedException {
  modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.RESPONSE_ATTRIBUTE_TITANIC,MLIntegrationTestConstants.TRAIN_DATA_FRACTION,projectId,versionSetId,mlHttpclient);
  modelId=mlHttpclient.getModelId(modelName);
  addModelId(modelId);
  String analysisName=algorithmName + versionSetId;
  addAnalysisId(mlHttpclient.getAnalysisId(projectId,analysisName));
  response=mlHttpclient.doHttpPost("String_Node_Str" + modelId,null);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
  boolean status=MLTestUtils.checkModelStatusCompleted(modelName,mlHttpclient,MLIntegrationTestConstants.THREAD_SLEEP_TIME_LARGE,1000);
  assertEquals("String_Node_Str",true,status);
}
Program: 42529
Project: 42529
Buggy source:
/** 
 * @throws MLHttpClientException 
 */
@Test(priority=3,description="String_Node_Str") public void testGetAllFeatures() throws MLHttpClientException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + analysisId + "String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
}

Fixed version (ground truth):
/** 
 * @throws MLHttpClientException
 * @throws IOException
 */
@Test(priority=3,description="String_Node_Str") public void testGetAllFeatures() throws MLHttpClientException, IOException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + analysisId + "String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
}
Program: 42530
Project: 42530
Buggy source:
/** 
 * @throws MLHttpClientException 
 */
@Test(priority=3,description="String_Node_Str") public void testGetFilteredFeatures() throws MLHttpClientException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + analysisId + "String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
}

Fixed version (ground truth):
/** 
 * @throws MLHttpClientException
 * @throws IOException
 */
@Test(priority=3,description="String_Node_Str") public void testGetFilteredFeatures() throws MLHttpClientException, IOException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + analysisId + "String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
}
Program: 42531
Project: 42531
Buggy source:
/** 
 * @throws MLHttpClientException 
 */
@Test(priority=4,description="String_Node_Str") public void testGetSummaryStatsWithFeature() throws MLHttpClientException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + analysisId + "String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
}

Fixed version (ground truth):
/** 
 * @throws MLHttpClientException
 * @throws IOException
 */
@Test(priority=4,description="String_Node_Str") public void testGetSummaryStatsWithFeature() throws MLHttpClientException, IOException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + analysisId + "String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
}
Program: 42532
Project: 42532
Buggy source:
/** 
 * @throws MLHttpClientException 
 */
@Test(priority=3,description="String_Node_Str") public void testGetSummarizedFeatures() throws MLHttpClientException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + analysisId + "String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
}

Fixed version (ground truth):
/** 
 * @throws MLHttpClientException
 * @throws IOException
 */
@Test(priority=3,description="String_Node_Str") public void testGetSummarizedFeatures() throws MLHttpClientException, IOException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + analysisId + "String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
}
Program: 42533
Project: 42533
Buggy source:
/** 
 * @throws MLHttpClientException 
 */
@Test(priority=4,description="String_Node_Str") public void testGetSummaryStatsWithoutFeature() throws MLHttpClientException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + analysisId + "String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.NOT_FOUND.getStatusCode(),response.getStatusLine().getStatusCode());
}

Fixed version (ground truth):
/** 
 * @throws MLHttpClientException
 * @throws IOException
 */
@Test(priority=4,description="String_Node_Str") public void testGetSummaryStatsWithoutFeature() throws MLHttpClientException, IOException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + analysisId + "String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.NOT_FOUND.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
}
Program: 42534
Project: 42534
Buggy source:
/** 
 * Test retrieving all analyzes from project API.
 * @throws MLHttpClientException 
 */
@Test(description="String_Node_Str") public void testGetAllAnalyzesFromProject() throws MLHttpClientException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
}

Fixed version (ground truth):
/** 
 * Test retrieving all analyzes from project API.
 * @throws MLHttpClientException
 * @throws IOException
 */
@Test(description="String_Node_Str") public void testGetAllAnalyzesFromProject() throws MLHttpClientException, IOException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
}
Program: 42535
Project: 42535
Buggy source:
/** 
 * Test retrieving all analyzes.
 * @throws MLHttpClientException 
 */
@Test(description="String_Node_Str") public void testGetAllAnalyzesOfProject() throws MLHttpClientException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + projectId + "String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
}

Fixed version (ground truth):
/** 
 * Test retrieving all analyzes.
 * @throws MLHttpClientException
 * @throws IOException
 */
@Test(description="String_Node_Str") public void testGetAllAnalyzesOfProject() throws MLHttpClientException, IOException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + projectId + "String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
}
Program: 42536
Project: 42536
Buggy source:
/** 
 * Test retrieving an analysis by name.
 * @throws MLHttpClientException 
 * @throws IOException 
 */
@Test(description="String_Node_Str") public void testGetAnalysis() throws MLHttpClientException, IOException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + projectId + "String_Node_Str"+ MLIntegrationTestConstants.ANALYSIS_NAME);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
}

Fixed version (ground truth):
/** 
 * Test retrieving an analysis by name.
 * @throws MLHttpClientException
 * @throws IOException
 */
@Test(description="String_Node_Str") public void testGetAnalysis() throws MLHttpClientException, IOException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + projectId + "String_Node_Str"+ MLIntegrationTestConstants.ANALYSIS_NAME);
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
}
Program: 42537
Project: 42537
Buggy source:
/** 
 * Test retrieving a non-existing analysis.
 * @throws MLHttpClientException 
 * @throws IOException
 */
@Test(description="String_Node_Str") public void testGetNonExistingAnalysis() throws MLHttpClientException, IOException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + projectId + "String_Node_Str"+ "String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.NOT_FOUND.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
}

Fixed version (ground truth):
/** 
 * Test retrieving a non-existing analysis.
 * @throws MLHttpClientException
 * @throws IOException
 */
@Test(description="String_Node_Str") public void testGetNonExistingAnalysis() throws MLHttpClientException, IOException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str" + projectId + "String_Node_Str"+ "String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.NOT_FOUND.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
}
Program: 42538
Project: 42538
Buggy source:
/** 
 * Test retrieving all analyzes.
 * @throws MLHttpClientException 
 */
@Test(description="String_Node_Str") public void testGetAllAnalyzes() throws MLHttpClientException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
}

Fixed version (ground truth):
/** 
 * Test retrieving all analyzes.
 * @throws MLHttpClientException
 * @throws IOException
 */
@Test(description="String_Node_Str") public void testGetAllAnalyzes() throws MLHttpClientException, IOException {
  CloseableHttpResponse response=mlHttpclient.doHttpGet("String_Node_Str");
  assertEquals("String_Node_Str",Response.Status.OK.getStatusCode(),response.getStatusLine().getStatusCode());
  response.close();
}
Program: 42540
Project: 42540
Buggy source:
public List<MLHyperParameter> getHyperParameters(long analysisId) throws MLAnalysisHandlerException {
  try {
    return databaseService.getHyperParametersOfModel(analysisId);
  }
 catch (  DatabaseHandlerException e) {
    throw new MLAnalysisHandlerException(e.getMessage(),e);
  }
}

Fixed version (ground truth):
public List<MLHyperParameter> getHyperParameters(long analysisId,String algorithmName) throws MLAnalysisHandlerException {
  try {
    return databaseService.getHyperParametersOfModel(analysisId,algorithmName);
  }
 catch (  DatabaseHandlerException e) {
    throw new MLAnalysisHandlerException(e.getMessage(),e);
  }
}
Program: 42541
Project: 42541
Buggy source:
public void addHyperParameters(long analysisId,List<MLHyperParameter> hyperParameters) throws MLAnalysisHandlerException {
  try {
    databaseService.insertHyperParameters(analysisId,hyperParameters);
  }
 catch (  DatabaseHandlerException e) {
    throw new MLAnalysisHandlerException(e.getMessage(),e);
  }
}

Fixed version (ground truth):
public void addHyperParameters(long analysisId,List<MLHyperParameter> hyperParameters,String algorithmName) throws MLAnalysisHandlerException {
  try {
    databaseService.insertHyperParameters(analysisId,hyperParameters,algorithmName);
  }
 catch (  DatabaseHandlerException e) {
    throw new MLAnalysisHandlerException(e.getMessage(),e);
  }
}
Program: 42542
Project: 42542
Buggy source:
public void addDefaultsIntoHyperParameters(long analysisId) throws MLAnalysisHandlerException {
  try {
    String algorithmName=databaseService.getAStringModelConfiguration(analysisId,MLConstants.ALGORITHM_NAME);
    if (algorithmName == null) {
      throw new MLAnalysisHandlerException("String_Node_Str" + analysisId);
    }
    List<MLHyperParameter> hyperParameters=null;
    for (    MLAlgorithm mlAlgorithm : algorithms) {
      if (algorithmName.equalsIgnoreCase(mlAlgorithm.getName())) {
        hyperParameters=mlAlgorithm.getParameters();
        break;
      }
    }
    if (hyperParameters == null) {
      throw new MLAnalysisHandlerException("String_Node_Str" + algorithmName);
    }
    databaseService.insertHyperParameters(analysisId,hyperParameters);
  }
 catch (  DatabaseHandlerException e) {
    throw new MLAnalysisHandlerException(e.getMessage(),e);
  }
}

Fixed version (ground truth):
public void addDefaultsIntoHyperParameters(long analysisId) throws MLAnalysisHandlerException {
  try {
    String algorithmName=databaseService.getAStringModelConfiguration(analysisId,MLConstants.ALGORITHM_NAME);
    if (algorithmName == null) {
      throw new MLAnalysisHandlerException("String_Node_Str" + analysisId);
    }
    List<MLHyperParameter> hyperParameters=null;
    for (    MLAlgorithm mlAlgorithm : algorithms) {
      if (algorithmName.equalsIgnoreCase(mlAlgorithm.getName())) {
        hyperParameters=mlAlgorithm.getParameters();
        break;
      }
    }
    if (hyperParameters == null) {
      throw new MLAnalysisHandlerException("String_Node_Str" + algorithmName);
    }
    databaseService.insertHyperParameters(analysisId,hyperParameters,algorithmName);
  }
 catch (  DatabaseHandlerException e) {
    throw new MLAnalysisHandlerException(e.getMessage(),e);
  }
}
Program: 42543
Project: 42543
Buggy source:
/** 
 * Get the list of Hyper-parameters of the model
 * @param analysisId unique id of the analysis
 * @return
 * @throws DatabaseHandlerException
 */
public List<MLHyperParameter> getHyperParametersOfModel(long analysisId) throws DatabaseHandlerException ;

Fixed version (ground truth):
/** 
 * Get the list of Hyper-parameters of the model
 * @param analysisId     Unique ID of the analysis
 * @param algorithmName  Algorithm name
 * @return
 * @throws DatabaseHandlerException
 */
public List<MLHyperParameter> getHyperParametersOfModel(long analysisId,String algorithmName) throws DatabaseHandlerException ;
Program: 42544
Project: 42544
Buggy source:
/** 
 * Insert a list of HyperParameters into the database
 * @param analysisId         Analysis Id
 * @param hyperParameters    MLHyperParameter list
 * @throws DatabaseHandlerException
 */
public void insertHyperParameters(long analysisId,List<MLHyperParameter> hyperParameters) throws DatabaseHandlerException ;

Fixed version (ground truth):
/** 
 * Insert a list of HyperParameters into the database
 * @param analysisId         Analysis Id
 * @param hyperParameters    MLHyperParameter list
 * @param algorithmName      Algorithm name
 * @throws DatabaseHandlerException
 */
public void insertHyperParameters(long analysisId,List<MLHyperParameter> hyperParameters,String algorithmName) throws DatabaseHandlerException ;
Program: 42545
Project: 42545
Buggy source:
@Override public List<MLHyperParameter> getHyperParametersOfModel(long analysisId) throws DatabaseHandlerException {
  List<MLHyperParameter> hyperParams=new ArrayList<MLHyperParameter>();
  Connection connection=null;
  PreparedStatement getFeatues=null;
  ResultSet result=null;
  try {
    connection=dbh.getDataSource().getConnection();
    connection.setAutoCommit(true);
    getFeatues=connection.prepareStatement(SQLQueries.GET_HYPER_PARAMETERS_OF_ANALYSIS);
    getFeatues.setLong(1,analysisId);
    result=getFeatues.executeQuery();
    while (result.next()) {
      MLHyperParameter param=new MLHyperParameter();
      param.setKey(result.getString(1));
      param.setValue(result.getString(2));
      hyperParams.add(param);
    }
    return hyperParams;
  }
 catch (  SQLException e) {
    throw new DatabaseHandlerException("String_Node_Str" + "String_Node_Str" + analysisId + "String_Node_Str"+ e.getMessage(),e);
  }
 finally {
    MLDatabaseUtils.closeDatabaseResources(connection,getFeatues,result);
  }
}

Fixed version (ground truth):
@Override public List<MLHyperParameter> getHyperParametersOfModel(long analysisId,String algorithmName) throws DatabaseHandlerException {
  List<MLHyperParameter> hyperParams=new ArrayList<MLHyperParameter>();
  Connection connection=null;
  PreparedStatement getFeatues=null;
  ResultSet result=null;
  try {
    connection=dbh.getDataSource().getConnection();
    connection.setAutoCommit(true);
    if (algorithmName == null) {
      getFeatues=connection.prepareStatement(SQLQueries.GET_HYPER_PARAMETERS_OF_ANALYSIS);
      getFeatues.setLong(1,analysisId);
    }
 else {
      getFeatues=connection.prepareStatement(SQLQueries.GET_HYPER_PARAMETERS_OF_ANALYSIS_WITH_ALGORITHM);
      getFeatues.setLong(1,analysisId);
      getFeatues.setString(2,algorithmName);
    }
    result=getFeatues.executeQuery();
    while (result.next()) {
      MLHyperParameter param=new MLHyperParameter();
      param.setKey(result.getString(1));
      param.setValue(result.getString(2));
      hyperParams.add(param);
    }
    return hyperParams;
  }
 catch (  SQLException e) {
    throw new DatabaseHandlerException("String_Node_Str" + "String_Node_Str" + analysisId + "String_Node_Str"+ e.getMessage(),e);
  }
 finally {
    MLDatabaseUtils.closeDatabaseResources(connection,getFeatues,result);
  }
}
Program: 42546
Project: 42546
Buggy source:
@Override public void insertHyperParameters(long analysisId,List<MLHyperParameter> hyperParameters) throws DatabaseHandlerException {
  Connection connection=null;
  PreparedStatement insertStatement=null;
  try {
    connection=dbh.getDataSource().getConnection();
    connection.setAutoCommit(false);
    for (    MLHyperParameter mlHyperParameter : hyperParameters) {
      String name=mlHyperParameter.getKey();
      String value=mlHyperParameter.getValue();
      insertStatement=connection.prepareStatement(SQLQueries.INSERT_HYPER_PARAMETER);
      insertStatement.setLong(1,analysisId);
      insertStatement.setString(2,name);
      insertStatement.setString(3,value);
      insertStatement.execute();
    }
    connection.commit();
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str");
    }
  }
 catch (  SQLException e) {
    MLDatabaseUtils.rollBack(connection);
    throw new DatabaseHandlerException("String_Node_Str" + "String_Node_Str" + e.getMessage(),e);
  }
 finally {
    MLDatabaseUtils.enableAutoCommit(connection);
    MLDatabaseUtils.closeDatabaseResources(connection,insertStatement);
  }
}

Fixed version (ground truth):
@Override public void insertHyperParameters(long analysisId,List<MLHyperParameter> hyperParameters,String algorithmName) throws DatabaseHandlerException {
  Connection connection=null;
  PreparedStatement insertStatement=null;
  PreparedStatement getStatement=null;
  PreparedStatement deleteStatement=null;
  ResultSet result=null;
  try {
    connection=dbh.getDataSource().getConnection();
    connection.setAutoCommit(false);
    getStatement=connection.prepareStatement(SQLQueries.GET_EXISTING_ALGORITHM);
    getStatement.setLong(1,analysisId);
    result=getStatement.executeQuery();
    if (!algorithmName.equals(result)) {
      deleteStatement=connection.prepareStatement(SQLQueries.DELETE_HYPER_PARAMETERS);
      deleteStatement.setLong(1,analysisId);
      deleteStatement.execute();
    }
    for (    MLHyperParameter mlHyperParameter : hyperParameters) {
      String name=mlHyperParameter.getKey();
      String value=mlHyperParameter.getValue();
      insertStatement=connection.prepareStatement(SQLQueries.INSERT_HYPER_PARAMETER);
      insertStatement.setLong(1,analysisId);
      insertStatement.setString(2,algorithmName);
      insertStatement.setString(3,name);
      insertStatement.setString(4,value);
      insertStatement.execute();
    }
    connection.commit();
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str");
    }
  }
 catch (  SQLException e) {
    MLDatabaseUtils.rollBack(connection);
    throw new DatabaseHandlerException("String_Node_Str" + "String_Node_Str" + e.getMessage(),e);
  }
 finally {
    MLDatabaseUtils.enableAutoCommit(connection);
    MLDatabaseUtils.closeDatabaseResources(connection,insertStatement);
  }
}
Program: 42547
Project: 42547
Buggy source:
/** 
 * get hyper-parameters of an analysis.
 */
@GET @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") public Response getHyperParameters(@PathParam("String_Node_Str") long analysisId){
  PrivilegedCarbonContext carbonContext=PrivilegedCarbonContext.getThreadLocalCarbonContext();
  int tenantId=carbonContext.getTenantId();
  String userName=carbonContext.getUsername();
  try {
    List<MLHyperParameter> responseVariable=mlAnalysisHandler.getHyperParameters(analysisId);
    return Response.ok(responseVariable).build();
  }
 catch (  MLAnalysisHandlerException e) {
    logger.error(String.format("String_Node_Str",analysisId,tenantId,userName,e.getMessage()));
    return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build();
  }
}

Fixed version (ground truth):
/** 
 * get hyper-parameters of an analysis.
 */
@GET @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") public Response getHyperParameters(@PathParam("String_Node_Str") long analysisId,@QueryParam("String_Node_Str") String algorithmName){
  PrivilegedCarbonContext carbonContext=PrivilegedCarbonContext.getThreadLocalCarbonContext();
  int tenantId=carbonContext.getTenantId();
  String userName=carbonContext.getUsername();
  try {
    List<MLHyperParameter> responseVariable=mlAnalysisHandler.getHyperParameters(analysisId,algorithmName);
    return Response.ok(responseVariable).build();
  }
 catch (  MLAnalysisHandlerException e) {
    logger.error(String.format("String_Node_Str",analysisId,tenantId,userName,e.getMessage()));
    return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build();
  }
}
Program: 42548
Project: 42548
Buggy source:
/** 
 * Adding hyper parameters for the selected algorithm of this analysis.
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") public Response addHyperParameters(@PathParam("String_Node_Str") long analysisId,List<MLHyperParameter> hyperParameters){
  PrivilegedCarbonContext carbonContext=PrivilegedCarbonContext.getThreadLocalCarbonContext();
  int tenantId=carbonContext.getTenantId();
  String userName=carbonContext.getUsername();
  try {
    mlAnalysisHandler.addHyperParameters(analysisId,hyperParameters);
    return Response.ok().build();
  }
 catch (  MLAnalysisHandlerException e) {
    logger.error(String.format("String_Node_Str",analysisId,tenantId,userName,e.getMessage()));
    return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build();
  }
}

Fixed version (ground truth):
/** 
 * Adding hyper parameters for the selected algorithm of this analysis.
 */
@POST @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") public Response addHyperParameters(@PathParam("String_Node_Str") long analysisId,List<MLHyperParameter> hyperParameters,@QueryParam("String_Node_Str") String algorithmName){
  PrivilegedCarbonContext carbonContext=PrivilegedCarbonContext.getThreadLocalCarbonContext();
  int tenantId=carbonContext.getTenantId();
  String userName=carbonContext.getUsername();
  try {
    mlAnalysisHandler.addHyperParameters(analysisId,hyperParameters,algorithmName);
    return Response.ok().build();
  }
 catch (  MLAnalysisHandlerException e) {
    logger.error(String.format("String_Node_Str",analysisId,tenantId,userName,e.getMessage()));
    return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build();
  }
}