Program: 5423
Project: 5423
Buggy source:
@Test public void testWorkflows() throws Exception {
  String workflow=String.format("String_Node_Str",FakeApp.NAME,FakeWorkflow.NAME);
  File doneFile=TMP_FOLDER.newFile("String_Node_Str");
  Map<String,String> runtimeArgs=ImmutableMap.of("String_Node_Str",doneFile.getAbsolutePath());
  String runtimeArgsKV=Joiner.on("String_Node_Str").withKeyValueSeparator("String_Node_Str").join(runtimeArgs);
  testCommandOutputContains(cli,"String_Node_Str" + workflow + "String_Node_Str"+ runtimeArgsKV+ "String_Node_Str","String_Node_Str");
  assertProgramStatus(programClient,fakeWorkflowId,"String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  String commandOutput=getCommandOutput(cli,"String_Node_Str" + workflow);
  String[] lines=commandOutput.split("String_Node_Str");
  Assert.assertEquals(2,lines.length);
  String[] split=lines[1].split("String_Node_Str");
  String runId=split[0];
  List<WorkflowTokenDetail.NodeValueDetail> tokenValues=new ArrayList<>();
  tokenValues.add(new WorkflowTokenDetail.NodeValueDetail(FakeWorkflow.FakeAction.class.getSimpleName(),FakeWorkflow.FakeAction.TOKEN_VALUE));
  tokenValues.add(new WorkflowTokenDetail.NodeValueDetail(FakeWorkflow.FakeAction.ANOTHER_FAKE_NAME,FakeWorkflow.FakeAction.TOKEN_VALUE));
  testCommandOutputContains(cli,String.format("String_Node_Str",workflow,runId),Joiner.on("String_Node_Str").join(FakeWorkflow.FakeAction.TOKEN_KEY,GSON.toJson(tokenValues)));
  testCommandOutputNotContains(cli,String.format("String_Node_Str",workflow,runId),Joiner.on("String_Node_Str").join(FakeWorkflow.FakeAction.TOKEN_KEY,GSON.toJson(tokenValues)));
  testCommandOutputContains(cli,String.format("String_Node_Str",workflow,runId,FakeWorkflow.FakeAction.TOKEN_KEY),Joiner.on("String_Node_Str").join(FakeWorkflow.FakeAction.TOKEN_KEY,GSON.toJson(tokenValues)));
  String fakeNodeValue=Joiner.on("String_Node_Str").join(FakeWorkflow.FakeAction.TOKEN_KEY,FakeWorkflow.FakeAction.TOKEN_VALUE);
  testCommandOutputContains(cli,String.format("String_Node_Str",workflow,runId,FakeWorkflow.FakeAction.class.getSimpleName()),fakeNodeValue);
  testCommandOutputNotContains(cli,String.format("String_Node_Str",workflow,runId,FakeWorkflow.FakeAction.ANOTHER_FAKE_NAME),fakeNodeValue);
  testCommandOutputContains(cli,String.format("String_Node_Str",workflow,runId,FakeWorkflow.FakeAction.ANOTHER_FAKE_NAME,FakeWorkflow.FakeAction.TOKEN_KEY),fakeNodeValue);
  testCommandOutputContains(cli,"String_Node_Str" + workflow,FakeWorkflow.FAKE_LOG);
  testCommandOutputContains(cli,"String_Node_Str" + workflow,String.format("String_Node_Str",fakeWorkflowId));
}

Fixed version (ground truth):
@Test public void testWorkflows() throws Exception {
  String workflow=String.format("String_Node_Str",FakeApp.NAME,FakeWorkflow.NAME);
  File doneFile=TMP_FOLDER.newFile("String_Node_Str");
  Map<String,String> runtimeArgs=ImmutableMap.of("String_Node_Str",doneFile.getAbsolutePath());
  String runtimeArgsKV=Joiner.on("String_Node_Str").withKeyValueSeparator("String_Node_Str").join(runtimeArgs);
  testCommandOutputContains(cli,"String_Node_Str" + workflow + "String_Node_Str"+ runtimeArgsKV+ "String_Node_Str","String_Node_Str");
  Tasks.waitFor(1,new Callable<Integer>(){
    @Override public Integer call() throws Exception {
      return programClient.getProgramRuns(fakeWorkflowId,ProgramRunStatus.COMPLETED.name(),0,Long.MAX_VALUE,Integer.MAX_VALUE).size();
    }
  }
,180,TimeUnit.SECONDS);
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  String commandOutput=getCommandOutput(cli,"String_Node_Str" + workflow);
  String[] lines=commandOutput.split("String_Node_Str");
  Assert.assertEquals(2,lines.length);
  String[] split=lines[1].split("String_Node_Str");
  String runId=split[0];
  List<WorkflowTokenDetail.NodeValueDetail> tokenValues=new ArrayList<>();
  tokenValues.add(new WorkflowTokenDetail.NodeValueDetail(FakeWorkflow.FakeAction.class.getSimpleName(),FakeWorkflow.FakeAction.TOKEN_VALUE));
  tokenValues.add(new WorkflowTokenDetail.NodeValueDetail(FakeWorkflow.FakeAction.ANOTHER_FAKE_NAME,FakeWorkflow.FakeAction.TOKEN_VALUE));
  testCommandOutputContains(cli,String.format("String_Node_Str",workflow,runId),Joiner.on("String_Node_Str").join(FakeWorkflow.FakeAction.TOKEN_KEY,GSON.toJson(tokenValues)));
  testCommandOutputNotContains(cli,String.format("String_Node_Str",workflow,runId),Joiner.on("String_Node_Str").join(FakeWorkflow.FakeAction.TOKEN_KEY,GSON.toJson(tokenValues)));
  testCommandOutputContains(cli,String.format("String_Node_Str",workflow,runId,FakeWorkflow.FakeAction.TOKEN_KEY),Joiner.on("String_Node_Str").join(FakeWorkflow.FakeAction.TOKEN_KEY,GSON.toJson(tokenValues)));
  String fakeNodeValue=Joiner.on("String_Node_Str").join(FakeWorkflow.FakeAction.TOKEN_KEY,FakeWorkflow.FakeAction.TOKEN_VALUE);
  testCommandOutputContains(cli,String.format("String_Node_Str",workflow,runId,FakeWorkflow.FakeAction.class.getSimpleName()),fakeNodeValue);
  testCommandOutputNotContains(cli,String.format("String_Node_Str",workflow,runId,FakeWorkflow.FakeAction.ANOTHER_FAKE_NAME),fakeNodeValue);
  testCommandOutputContains(cli,String.format("String_Node_Str",workflow,runId,FakeWorkflow.FakeAction.ANOTHER_FAKE_NAME,FakeWorkflow.FakeAction.TOKEN_KEY),fakeNodeValue);
  testCommandOutputContains(cli,"String_Node_Str" + workflow,FakeWorkflow.FAKE_LOG);
  testCommandOutputContains(cli,"String_Node_Str" + workflow,String.format("String_Node_Str",fakeWorkflowId));
}