Program: 10832
Project: 10832
Buggy source:
@Test public void test() throws Exception {
  String port=System.getProperty("String_Node_Str","String_Node_Str");
  System.setProperty(KurentoServicesTestHelper.APP_HTTP_PORT_PROP,port);
  KurentoServicesTestHelper.startKurentoServicesIfNeccessary();
  startKurentoTreeServer();
  final KurentoTreeClient kurentoTree=new KurentoTreeClient("String_Node_Str" + port + "String_Node_Str");
  final String treeId=kurentoTree.createTree();
  ExecutorService exec=Executors.newFixedThreadPool(NUM_VIEWERS + 1);
  Future<BrowserClient> masterBrowserFuture=exec.submit(new Callable<BrowserClient>(){
    @Override public BrowserClient call() throws Exception {
      return createMaster(kurentoTree,treeId);
    }
  }
);
  BrowserClient masterBrowser=masterBrowserFuture.get();
  List<Future<TreeViewer>> viewers=new ArrayList<>();
  for (int i=0; i < 3; i++) {
    viewers.add(exec.submit(new Callable<TreeViewer>(){
      @Override public TreeViewer call() throws Exception {
        return createViewer(kurentoTree,treeId);
      }
    }
));
  }
  for (  Future<TreeViewer> viewer : viewers) {
    viewer.get();
  }
  log.info("String_Node_Str");
  log.info("String_Node_Str");
  for (  Future<TreeViewer> viewer : viewers) {
    viewer.get().getBrowser().waitForEvent("String_Node_Str");
  }
  log.info("String_Node_Str");
  log.info("String_Node_Str");
  masterBrowser.close();
  for (  Future<TreeViewer> viewer : viewers) {
    TreeViewer treeViewer=viewer.get();
    treeViewer.getBrowser().close();
    String sinkId=treeViewer.getSinkId();
    System.out.println("String_Node_Str" + sinkId);
    kurentoTree.removeTreeSink(treeId,sinkId);
  }
  kurentoTree.releaseTree(treeId);
  KurentoServicesTestHelper.teardownServices();
}

Fixed version (ground truth):
@Test public void test() throws Exception {
  int port=KurentoServicesTestHelper.getAppHttpPort();
  KurentoServicesTestHelper.startKurentoServicesIfNeccessary();
  startKurentoTreeServer();
  final KurentoTreeClient kurentoTree=new KurentoTreeClient("String_Node_Str" + port + "String_Node_Str");
  final String treeId=kurentoTree.createTree();
  ExecutorService exec=Executors.newFixedThreadPool(NUM_VIEWERS + 1);
  Future<BrowserClient> masterBrowserFuture=exec.submit(new Callable<BrowserClient>(){
    @Override public BrowserClient call() throws Exception {
      return createMaster(kurentoTree,treeId);
    }
  }
);
  BrowserClient masterBrowser=masterBrowserFuture.get();
  List<Future<TreeViewer>> viewers=new ArrayList<>();
  for (int i=0; i < 3; i++) {
    viewers.add(exec.submit(new Callable<TreeViewer>(){
      @Override public TreeViewer call() throws Exception {
        return createViewer(kurentoTree,treeId);
      }
    }
));
  }
  for (  Future<TreeViewer> viewer : viewers) {
    viewer.get();
  }
  log.info("String_Node_Str");
  log.info("String_Node_Str");
  for (  Future<TreeViewer> viewer : viewers) {
    viewer.get().getBrowser().waitForEvent("String_Node_Str");
  }
  log.info("String_Node_Str");
  log.info("String_Node_Str");
  masterBrowser.close();
  for (  Future<TreeViewer> viewer : viewers) {
    TreeViewer treeViewer=viewer.get();
    treeViewer.getBrowser().close();
    String sinkId=treeViewer.getSinkId();
    System.out.println("String_Node_Str" + sinkId);
    kurentoTree.removeTreeSink(treeId,sinkId);
  }
  kurentoTree.releaseTree(treeId);
  KurentoServicesTestHelper.teardownServices();
}