Program: 18251
Project: 18251
Buggy source:
/** 
 * Test the simulation engine
 * @throws Exception If a problem occurs
 */
@Test public void simulationEngineTest() throws Exception {
  String testStoreName="String_Node_Str";
  DefaultHttpClient httpClient=new DefaultHttpClient();
  HttpPost newRunPostRequest=new HttpPost("String_Node_Str" + testStoreName);
  assertEquals("String_Node_Str" + testStoreName + "String_Node_Str",httpClient.execute(newRunPostRequest,new BasicResponseHandler()));
  DefaultHttpClient httpProxyClient=new DefaultHttpClient();
  HttpHost proxy=new HttpHost("String_Node_Str",EasySOAConstants.HTTP_DISCOVERY_PROXY_PORT);
  httpProxyClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,proxy);
  UrlMock urlMock=new UrlMock();
  HttpResponse response;
  HttpUriRequest httpUriRequest;
  for (  String url : urlMock.getTwitterUrlData("String_Node_Str" + EasySOAConstants.TWITTER_MOCK_PORT)) {
    logger.info("String_Node_Str" + url);
    httpUriRequest=new HttpGet(url);
    response=httpProxyClient.execute(httpUriRequest);
    ContentReader.read(response.getEntity().getContent());
  }
  HttpPost stopRunPostRequest=new HttpPost("String_Node_Str");
  assertEquals("String_Node_Str",httpClient.execute(stopRunPostRequest,new BasicResponseHandler()));
  HttpPost deleteRunPostRequest=new HttpPost("String_Node_Str");
  assertEquals("String_Node_Str",httpClient.execute(deleteRunPostRequest,new BasicResponseHandler()));
  ProxyFileStore fileStore=new ProxyFileStore();
  List<ExchangeRecord> recordList=fileStore.getExchangeRecordlist(testStoreName);
  ReplayEngine replayEngine=frascati.getService(componentList.get(0),"String_Node_Str",org.easysoa.records.replay.ReplayEngine.class);
  SimulationEngine simulationEngine=replayEngine.getSimulationEngine();
  logger.debug("String_Node_Str");
  SimulationStore simulationStore=simulationEngine.getSimulationStoreFromSuggestion("String_Node_Str",recordList);
  for (  ExchangeRecord record : recordList) {
    Map<String,List<String>> fieldValues=new HashMap<String,List<String>>();
    ExchangeRecord simulatedResponse=simulationEngine.simulate(record,simulationStore,new SimpleSimulationMethod(),replayEngine.getTemplateEngine(),fieldValues);
    logger.debug("String_Node_Str" + simulatedResponse.getOutMessage().getMessageContent().getRawContent());
  }
}

Fixed version (ground truth):
/** 
 * Test the simulation engine
 * @throws Exception If a problem occurs
 */
@Test public void simulationEngineTest() throws Exception {
  String testStoreName="String_Node_Str";
  DefaultHttpClient httpClient=new DefaultHttpClient();
  HttpPost newRunPostRequest=new HttpPost("String_Node_Str" + testStoreName);
  assertEquals("String_Node_Str" + testStoreName + "String_Node_Str",httpClient.execute(newRunPostRequest,new BasicResponseHandler()));
  DefaultHttpClient httpProxyClient=new DefaultHttpClient();
  HttpHost proxy=new HttpHost("String_Node_Str",EasySOAConstants.HTTP_DISCOVERY_PROXY_PORT);
  httpProxyClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,proxy);
  UrlMock urlMock=new UrlMock();
  HttpResponse response;
  HttpUriRequest httpUriRequest;
  for (  String url : urlMock.getTwitterUrlData("String_Node_Str" + EasySOAConstants.TWITTER_MOCK_PORT)) {
    logger.info("String_Node_Str" + url);
    httpUriRequest=new HttpGet(url);
    response=httpProxyClient.execute(httpUriRequest);
    ContentReader.read(response.getEntity().getContent());
  }
  HttpPost stopRunPostRequest=new HttpPost("String_Node_Str");
  assertEquals("String_Node_Str",httpClient.execute(stopRunPostRequest,new BasicResponseHandler()));
  HttpPost deleteRunPostRequest=new HttpPost("String_Node_Str");
  assertEquals("String_Node_Str",httpClient.execute(deleteRunPostRequest,new BasicResponseHandler()));
  ProxyFileStore fileStore=new ProxyFileStore();
  List<ExchangeRecord> recordList=fileStore.getExchangeRecordlist(testStoreName);
  ReplayEngine replayEngine=frascati.getService(componentList.get(0),"String_Node_Str",org.easysoa.records.replay.ReplayEngine.class);
  SimulationEngine simulationEngine=replayEngine.getSimulationEngine();
  logger.debug("String_Node_Str");
  SimulationStore simulationStore=simulationEngine.getSimulationStoreFromSuggestion("String_Node_Str",recordList);
  fileStore.saveSimulationStore(simulationStore);
  for (  ExchangeRecord record : recordList) {
    Map<String,List<String>> fieldValues=new HashMap<String,List<String>>();
    ExchangeRecord simulatedResponse=simulationEngine.simulate(record,simulationStore,new SimpleSimulationMethod(),replayEngine.getTemplateEngine(),fieldValues);
    logger.debug("String_Node_Str" + simulatedResponse.getOutMessage().getMessageContent().getRawContent());
  }
}