Program: 6733
Project: 6733
Buggy source:
@Test public void testStreamWrites() throws Exception {
  HttpResponse response=GatewayFastTestsSuite.deploy(AppWritingtoStream.class,AppWritingtoStream.APPNAME);
  Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
  response=GatewayFastTestsSuite.doPost(String.format("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.FLOW),null);
  Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
  response=GatewayFastTestsSuite.doPost(String.format("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.WORKER),null);
  Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
  response=GatewayFastTestsSuite.doPost(String.format("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.SERVICE),null);
  Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
  waitState("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.FLOW,"String_Node_Str");
  waitState("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.SERVICE,"String_Node_Str");
  checkCount(AppWritingtoStream.VALUE);
  response=GatewayFastTestsSuite.doPost(String.format("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.FLOW),null);
  Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
  String workerState=getState("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.WORKER);
  if (workerState != null && workerState.equals("String_Node_Str")) {
    response=GatewayFastTestsSuite.doPost(String.format("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.WORKER),null);
    Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
  }
  response=GatewayFastTestsSuite.doPost(String.format("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.SERVICE),null);
  Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
  waitState("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.FLOW,"String_Node_Str");
  waitState("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.WORKER,"String_Node_Str");
  waitState("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.SERVICE,"String_Node_Str");
  response=GatewayFastTestsSuite.doDelete(String.format("String_Node_Str",AppWritingtoStream.APPNAME));
  Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
}

Fixed version (ground truth):
@Test public void testStreamWrites() throws Exception {
  HttpResponse response=GatewayFastTestsSuite.deploy(AppWritingtoStream.class,AppWritingtoStream.APPNAME);
  Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
  response=GatewayFastTestsSuite.doPost(String.format("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.FLOW),null);
  Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
  response=GatewayFastTestsSuite.doPost(String.format("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.WORKER),null);
  Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
  response=GatewayFastTestsSuite.doPost(String.format("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.SERVICE),null);
  Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
  waitState("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.FLOW,"String_Node_Str");
  waitState("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.SERVICE,"String_Node_Str");
  checkCount(AppWritingtoStream.VALUE);
  checkHeader("String_Node_Str","String_Node_Str");
  response=GatewayFastTestsSuite.doPost(String.format("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.FLOW),null);
  Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
  String workerState=getState("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.WORKER);
  if (workerState != null && workerState.equals("String_Node_Str")) {
    response=GatewayFastTestsSuite.doPost(String.format("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.WORKER),null);
    Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
  }
  response=GatewayFastTestsSuite.doPost(String.format("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.SERVICE),null);
  Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
  waitState("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.FLOW,"String_Node_Str");
  waitState("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.WORKER,"String_Node_Str");
  waitState("String_Node_Str",AppWritingtoStream.APPNAME,AppWritingtoStream.SERVICE,"String_Node_Str");
  response=GatewayFastTestsSuite.doDelete(String.format("String_Node_Str",AppWritingtoStream.APPNAME));
  Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusLine().getStatusCode());
}