Program: 6210
Project: 6210
Buggy source:
@Test public void testAppWithConfig() throws Exception {
  LocationFactory locationFactory=new LocalLocationFactory(TMP_FOLDER.newFolder());
  Location appJar=AppJarHelper.createDeploymentJar(locationFactory,ConfigTestApp.class);
  Id.Artifact artifactId=Id.Artifact.from(Id.Namespace.DEFAULT,ConfigTestApp.class.getSimpleName(),"String_Node_Str");
  ArtifactRepository artifactRepo=new ArtifactRepository(conf,null,null,null,new ProgramRuntimeProviderLoader(conf));
  ConfigTestApp.ConfigClass config=new ConfigTestApp.ConfigClass("String_Node_Str","String_Node_Str");
  Configurator configuratorWithConfig=new InMemoryConfigurator(conf,Id.Namespace.DEFAULT,artifactId,ConfigTestApp.class.getName(),appJar,new Gson().toJson(config),artifactRepo);
  ListenableFuture<ConfigResponse> result=configuratorWithConfig.config();
  ConfigResponse response=result.get(10,TimeUnit.SECONDS);
  Assert.assertNotNull(response);
  ApplicationSpecificationAdapter adapter=ApplicationSpecificationAdapter.create(new ReflectionSchemaGenerator());
  ApplicationSpecification specification=adapter.fromJson(response.get());
  Assert.assertNotNull(specification);
  Assert.assertTrue(specification.getStreams().size() == 1);
  Assert.assertTrue(specification.getStreams().containsKey("String_Node_Str"));
  Assert.assertTrue(specification.getDatasets().size() == 1);
  Assert.assertTrue(specification.getDatasets().containsKey("String_Node_Str"));
  Configurator configuratorWithoutConfig=new InMemoryConfigurator(conf,Id.Namespace.DEFAULT,artifactId,ConfigTestApp.class.getName(),appJar,null,artifactRepo);
  result=configuratorWithoutConfig.config();
  response=result.get(10,TimeUnit.SECONDS);
  Assert.assertNotNull(response);
  specification=adapter.fromJson(response.get());
  Assert.assertNotNull(specification);
  Assert.assertTrue(specification.getStreams().size() == 1);
  Assert.assertTrue(specification.getStreams().containsKey(ConfigTestApp.DEFAULT_STREAM));
  Assert.assertTrue(specification.getDatasets().size() == 1);
  Assert.assertTrue(specification.getDatasets().containsKey(ConfigTestApp.DEFAULT_TABLE));
}

Fixed version (ground truth):
@Test public void testAppWithConfig() throws Exception {
  LocationFactory locationFactory=new LocalLocationFactory(TMP_FOLDER.newFolder());
  Location appJar=AppJarHelper.createDeploymentJar(locationFactory,ConfigTestApp.class);
  Id.Artifact artifactId=Id.Artifact.from(Id.Namespace.DEFAULT,ConfigTestApp.class.getSimpleName(),"String_Node_Str");
  ArtifactRepository artifactRepo=new ArtifactRepository(conf,null,null,null,new DummyProgramRunnerFactory());
  ConfigTestApp.ConfigClass config=new ConfigTestApp.ConfigClass("String_Node_Str","String_Node_Str");
  Configurator configuratorWithConfig=new InMemoryConfigurator(conf,Id.Namespace.DEFAULT,artifactId,ConfigTestApp.class.getName(),appJar,new Gson().toJson(config),artifactRepo);
  ListenableFuture<ConfigResponse> result=configuratorWithConfig.config();
  ConfigResponse response=result.get(10,TimeUnit.SECONDS);
  Assert.assertNotNull(response);
  ApplicationSpecificationAdapter adapter=ApplicationSpecificationAdapter.create(new ReflectionSchemaGenerator());
  ApplicationSpecification specification=adapter.fromJson(response.get());
  Assert.assertNotNull(specification);
  Assert.assertTrue(specification.getStreams().size() == 1);
  Assert.assertTrue(specification.getStreams().containsKey("String_Node_Str"));
  Assert.assertTrue(specification.getDatasets().size() == 1);
  Assert.assertTrue(specification.getDatasets().containsKey("String_Node_Str"));
  Configurator configuratorWithoutConfig=new InMemoryConfigurator(conf,Id.Namespace.DEFAULT,artifactId,ConfigTestApp.class.getName(),appJar,null,artifactRepo);
  result=configuratorWithoutConfig.config();
  response=result.get(10,TimeUnit.SECONDS);
  Assert.assertNotNull(response);
  specification=adapter.fromJson(response.get());
  Assert.assertNotNull(specification);
  Assert.assertTrue(specification.getStreams().size() == 1);
  Assert.assertTrue(specification.getStreams().containsKey(ConfigTestApp.DEFAULT_STREAM));
  Assert.assertTrue(specification.getDatasets().size() == 1);
  Assert.assertTrue(specification.getDatasets().containsKey(ConfigTestApp.DEFAULT_TABLE));
}