Program: 7267
Project: 7267
Buggy source:
@Test public void testAll() throws Exception {
  File jarFile=createAppJarFile(FakeApp.class);
  appClient.deploy(jarFile);
  verifyProgramNames(FakeApp.PROCEDURES,procedureClient.list());
  programClient.start(FakeApp.NAME,ProgramType.PROCEDURE,FakeProcedure.NAME);
  assertProgramRunning(programClient,FakeApp.NAME,ProgramType.PROCEDURE,FakeProcedure.NAME);
  String result=procedureClient.call(FakeApp.NAME,FakeProcedure.NAME,FakeProcedure.METHOD_NAME,ImmutableMap.of("String_Node_Str","String_Node_Str"));
  Assert.assertEquals(GSON.toJson(ImmutableMap.of("String_Node_Str","String_Node_Str")),result);
  String testNamespace=clientConfig.getNamespace();
  clientConfig.setNamespace("String_Node_Str");
  try {
    procedureClient.call(FakeApp.NAME,FakeProcedure.NAME,FakeProcedure.METHOD_NAME,ImmutableMap.of("String_Node_Str","String_Node_Str"));
    Assert.fail("String_Node_Str");
  }
 catch (  IllegalStateException e) {
    String expectedErrMsg="String_Node_Str";
    Assert.assertEquals(expectedErrMsg,e.getMessage());
  }
  clientConfig.setNamespace(testNamespace);
  String testVersion=clientConfig.getApiVersion();
  clientConfig.setApiVersion(Constants.Gateway.API_VERSION_3_TOKEN);
  try {
    procedureClient.call(FakeApp.NAME,FakeProcedure.NAME,FakeProcedure.METHOD_NAME,ImmutableMap.of("String_Node_Str","String_Node_Str"));
    Assert.fail("String_Node_Str");
  }
 catch (  IllegalStateException e) {
    String expectedErrMsg="String_Node_Str";
    Assert.assertEquals(expectedErrMsg,e.getMessage());
  }
  clientConfig.setApiVersion(testVersion);
  programClient.stop(FakeApp.NAME,ProgramType.PROCEDURE,FakeProcedure.NAME);
  assertProgramStopped(programClient,FakeApp.NAME,ProgramType.PROCEDURE,FakeProcedure.NAME);
  appClient.delete(FakeApp.NAME);
  Assert.assertEquals(0,appClient.list().size());
}

Fixed version (ground truth):
@Test public void testAll() throws Exception {
  File jarFile=createAppJarFile(FakeApp.class);
  appClient.deploy(jarFile);
  verifyProgramNames(FakeApp.PROCEDURES,procedureClient.list());
  programClient.start(FakeApp.NAME,ProgramType.PROCEDURE,FakeProcedure.NAME);
  assertProgramRunning(programClient,FakeApp.NAME,ProgramType.PROCEDURE,FakeProcedure.NAME);
  String result=procedureClient.call(FakeApp.NAME,FakeProcedure.NAME,FakeProcedure.METHOD_NAME,ImmutableMap.of("String_Node_Str","String_Node_Str"));
  Assert.assertEquals(GSON.toJson(ImmutableMap.of("String_Node_Str","String_Node_Str")),result);
  Id.Namespace testNamespace=clientConfig.getNamespace();
  clientConfig.setNamespace(Id.Namespace.from("String_Node_Str"));
  try {
    procedureClient.call(FakeApp.NAME,FakeProcedure.NAME,FakeProcedure.METHOD_NAME,ImmutableMap.of("String_Node_Str","String_Node_Str"));
    Assert.fail("String_Node_Str");
  }
 catch (  IllegalStateException e) {
    String expectedErrMsg="String_Node_Str";
    Assert.assertEquals(expectedErrMsg,e.getMessage());
  }
  clientConfig.setNamespace(testNamespace);
  String testVersion=clientConfig.getApiVersion();
  clientConfig.setApiVersion(Constants.Gateway.API_VERSION_3_TOKEN);
  try {
    procedureClient.call(FakeApp.NAME,FakeProcedure.NAME,FakeProcedure.METHOD_NAME,ImmutableMap.of("String_Node_Str","String_Node_Str"));
    Assert.fail("String_Node_Str");
  }
 catch (  IllegalStateException e) {
    String expectedErrMsg="String_Node_Str";
    Assert.assertEquals(expectedErrMsg,e.getMessage());
  }
  clientConfig.setApiVersion(testVersion);
  programClient.stop(FakeApp.NAME,ProgramType.PROCEDURE,FakeProcedure.NAME);
  assertProgramStopped(programClient,FakeApp.NAME,ProgramType.PROCEDURE,FakeProcedure.NAME);
  appClient.delete(FakeApp.NAME);
  Assert.assertEquals(0,appClient.list().size());
}