Program: 6646
Project: 6646
Buggy source:
@Test public void testWorkflowToken() throws Exception {
  Id.Application fakeAppId=Id.Application.from(Id.Namespace.DEFAULT,FakeApp.NAME);
  Id.Workflow fakeWorkflowId=Id.Workflow.from(fakeAppId,FakeWorkflow.NAME);
  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,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testWorkflowToken() throws Exception {
  Id.Application fakeAppId=Id.Application.from(Id.Namespace.DEFAULT,FakeApp.NAME);
  Id.Workflow fakeWorkflowId=Id.Workflow.from(fakeAppId,FakeWorkflow.NAME);
  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,String.format("String_Node_Str",fakeWorkflowId));
}