Program: 5694
Project: 5694
Buggy source:
@Test public void testRouteConfig() throws Exception {
  ServiceId service=fakeAppId.service(PrefixedEchoHandler.NAME);
  ServiceId serviceV1=fakeAppIdV1.service(PrefixedEchoHandler.NAME);
  String serviceName=String.format("String_Node_Str",FakeApp.NAME,PrefixedEchoHandler.NAME);
  String serviceArgument=String.format("String_Node_Str",serviceName,ApplicationId.DEFAULT_VERSION);
  String serviceV1Argument=String.format("String_Node_Str",serviceName,V1_SNAPSHOT);
  try {
    Map<String,String> runtimeArgs=ImmutableMap.of("String_Node_Str",ApplicationId.DEFAULT_VERSION);
    String runtimeArgsKV=SPACE_JOINER.withKeyValueSeparator("String_Node_Str").join(runtimeArgs);
    testCommandOutputContains(cli,"String_Node_Str" + serviceArgument + "String_Node_Str"+ runtimeArgsKV+ "String_Node_Str","String_Node_Str");
    assertProgramStatus(programClient,service,"String_Node_Str");
    testCommandOutputContains(cli,"String_Node_Str" + serviceName,GSON.toJson(ImmutableMap.of()));
    testCommandOutputContains(cli,"String_Node_Str" + serviceName + "String_Node_Str",String.format("String_Node_Str",ApplicationId.DEFAULT_VERSION));
    Map<String,String> runtimeArgs1=ImmutableMap.of("String_Node_Str",V1_SNAPSHOT);
    String runtimeArgs1KV=SPACE_JOINER.withKeyValueSeparator("String_Node_Str").join(runtimeArgs1);
    testCommandOutputContains(cli,"String_Node_Str" + serviceV1Argument + "String_Node_Str"+ runtimeArgs1KV+ "String_Node_Str","String_Node_Str");
    assertProgramStatus(programClient,serviceV1,"String_Node_Str");
    Map<String,Integer> routeConfig=ImmutableMap.of(ApplicationId.DEFAULT_VERSION,100,V1_SNAPSHOT,0);
    String routeConfigKV=SPACE_JOINER.withKeyValueSeparator("String_Node_Str").join(routeConfig);
    testCommandOutputContains(cli,"String_Node_Str" + serviceName + "String_Node_Str"+ routeConfigKV+ "String_Node_Str","String_Node_Str");
    for (int i=0; i < 10; i++) {
      testCommandOutputContains(cli,"String_Node_Str" + serviceName + "String_Node_Str",String.format("String_Node_Str",ApplicationId.DEFAULT_VERSION));
    }
    testCommandOutputContains(cli,"String_Node_Str" + serviceName,GSON.toJson(routeConfig));
    routeConfig=ImmutableMap.of(ApplicationId.DEFAULT_VERSION,0,V1_SNAPSHOT,100);
    routeConfigKV=SPACE_JOINER.withKeyValueSeparator("String_Node_Str").join(routeConfig);
    testCommandOutputContains(cli,"String_Node_Str" + serviceName + "String_Node_Str"+ routeConfigKV+ "String_Node_Str","String_Node_Str");
    for (int i=0; i < 10; i++) {
      testCommandOutputContains(cli,"String_Node_Str" + serviceName + "String_Node_Str",String.format("String_Node_Str",V1_SNAPSHOT));
    }
    testCommandOutputContains(cli,"String_Node_Str" + serviceName,GSON.toJson(routeConfig));
    testCommandOutputContains(cli,"String_Node_Str" + serviceName,"String_Node_Str");
    testCommandOutputContains(cli,"String_Node_Str" + serviceName,GSON.toJson(ImmutableMap.of()));
  }
  finally {
    programClient.stopAll(NamespaceId.DEFAULT.toId());
  }
}

Fixed version (ground truth):
@Test public void testRouteConfig() throws Exception {
  ServiceId service=fakeAppId.service(PrefixedEchoHandler.NAME);
  ServiceId serviceV1=fakeAppIdV1.service(PrefixedEchoHandler.NAME);
  String serviceName=String.format("String_Node_Str",FakeApp.NAME,PrefixedEchoHandler.NAME);
  String serviceArgument=String.format("String_Node_Str",serviceName,ApplicationId.DEFAULT_VERSION);
  String serviceV1Argument=String.format("String_Node_Str",serviceName,V1_SNAPSHOT);
  try {
    Map<String,String> runtimeArgs=ImmutableMap.of("String_Node_Str",ApplicationId.DEFAULT_VERSION);
    String runtimeArgsKV=SPACE_JOINER.withKeyValueSeparator("String_Node_Str").join(runtimeArgs);
    testCommandOutputContains(cli,"String_Node_Str" + serviceArgument + "String_Node_Str"+ runtimeArgsKV+ "String_Node_Str","String_Node_Str");
    assertProgramStatus(programClient,service,"String_Node_Str");
    testCommandOutputContains(cli,"String_Node_Str" + serviceName,GSON.toJson(ImmutableMap.of()));
    testCommandOutputContains(cli,"String_Node_Str" + serviceName + "String_Node_Str",String.format("String_Node_Str",ApplicationId.DEFAULT_VERSION));
    Map<String,String> runtimeArgs1=ImmutableMap.of("String_Node_Str",V1_SNAPSHOT);
    String runtimeArgs1KV=SPACE_JOINER.withKeyValueSeparator("String_Node_Str").join(runtimeArgs1);
    testCommandOutputContains(cli,"String_Node_Str" + serviceV1Argument + "String_Node_Str"+ runtimeArgs1KV+ "String_Node_Str","String_Node_Str");
    assertProgramStatus(programClient,serviceV1,"String_Node_Str");
    Map<String,Integer> routeConfig=ImmutableMap.of(ApplicationId.DEFAULT_VERSION,100,V1_SNAPSHOT,0);
    String routeConfigKV=SPACE_JOINER.withKeyValueSeparator("String_Node_Str").join(routeConfig);
    testCommandOutputContains(cli,"String_Node_Str" + serviceName + "String_Node_Str"+ routeConfigKV+ "String_Node_Str","String_Node_Str");
    for (int i=0; i < 10; i++) {
      testCommandOutputContains(cli,"String_Node_Str" + serviceName + "String_Node_Str",String.format("String_Node_Str",ApplicationId.DEFAULT_VERSION));
    }
    testCommandOutputContains(cli,"String_Node_Str" + serviceName,GSON.toJson(routeConfig));
    routeConfig=ImmutableMap.of(ApplicationId.DEFAULT_VERSION,0,V1_SNAPSHOT,100);
    routeConfigKV=SPACE_JOINER.withKeyValueSeparator("String_Node_Str").join(routeConfig);
    testCommandOutputContains(cli,"String_Node_Str" + serviceName + "String_Node_Str"+ routeConfigKV+ "String_Node_Str","String_Node_Str");
    for (int i=0; i < 10; i++) {
      testCommandOutputContains(cli,"String_Node_Str" + serviceName + "String_Node_Str",String.format("String_Node_Str",V1_SNAPSHOT));
    }
    testCommandOutputContains(cli,"String_Node_Str" + serviceName,GSON.toJson(routeConfig));
    testCommandOutputContains(cli,"String_Node_Str" + serviceName,"String_Node_Str");
    testCommandOutputContains(cli,"String_Node_Str" + serviceName,GSON.toJson(ImmutableMap.of()));
  }
  finally {
    programClient.stopAll(NamespaceId.DEFAULT);
  }
}