Program: 42513
Project: 42513
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 {
  if (algorithmName.equals("String_Node_Str")) {
    modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.USER_ID_RECOMMENDATION,MLIntegrationTestConstants.PRODUCT_ID_RECOMMENDATION,MLIntegrationTestConstants.RATING_RECOMMENDATION,"String_Node_Str",MLIntegrationTestConstants.TRAIN_DATA_FRACTION_DEFAULT,projectId,versionSetId,mlHttpclient);
  }
 else   if (algorithmName.equals("String_Node_Str")) {
    modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.USER_ID_RECOMMENDATION,MLIntegrationTestConstants.PRODUCT_ID_RECOMMENDATION,MLIntegrationTestConstants.OBSERVATION_LIST_RECOMMENDATION,"String_Node_Str",MLIntegrationTestConstants.TRAIN_DATA_FRACTION_DEFAULT,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 {
  if (algorithmName.equals("String_Node_Str")) {
    modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.USER_ID_RECOMMENDATION,MLIntegrationTestConstants.PRODUCT_ID_RECOMMENDATION,MLIntegrationTestConstants.RATING_RECOMMENDATION,"String_Node_Str",MLIntegrationTestConstants.TRAIN_DATA_FRACTION_DEFAULT,projectId,versionSetId,mlHttpclient);
  }
 else   if (algorithmName.equals("String_Node_Str")) {
    modelName=MLTestUtils.createModelWithConfigurations(algorithmName,algorithmType,MLIntegrationTestConstants.USER_ID_RECOMMENDATION,MLIntegrationTestConstants.PRODUCT_ID_RECOMMENDATION,MLIntegrationTestConstants.OBSERVATION_LIST_RECOMMENDATION,"String_Node_Str",MLIntegrationTestConstants.TRAIN_DATA_FRACTION_DEFAULT,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);
}