Program: 96249
Project: 96249
Buggy source:
public _AppIndicatorNativeTray(final SystemTray systemTray){
  super();
  Gtk.startGui();
  final GtkMenu gtkMenu=new GtkMenu(){
    /** 
 * MUST BE AFTER THE ITEM IS ADDED/CHANGED from the menu ALWAYS CALLED ON THE EDT
 */
    protected final void onMenuAdded(    final Pointer menu){
      AppIndicator.app_indicator_set_menu(appIndicator,menu);
    }
    @Override public void setEnabled(    final MenuItem menuItem){
      Gtk.dispatch(new Runnable(){
        @Override public void run(){
          boolean enabled=menuItem.getEnabled();
          if (visible && !enabled) {
            AppIndicator.app_indicator_set_status(appIndicator,AppIndicator.STATUS_PASSIVE);
            visible=false;
          }
 else           if (!visible && enabled) {
            AppIndicator.app_indicator_set_status(appIndicator,AppIndicator.STATUS_ACTIVE);
            visible=true;
          }
        }
      }
);
    }
    @Override public void setImage(    final MenuItem menuItem){
      imageFile=menuItem.getImage();
      if (imageFile == null) {
        return;
      }
      Gtk.dispatch(new Runnable(){
        @Override public void run(){
          AppIndicator.app_indicator_set_icon(appIndicator,imageFile.getAbsolutePath());
          if (!isActive) {
            isActive=true;
            AppIndicator.app_indicator_set_status(appIndicator,AppIndicator.STATUS_ACTIVE);
          }
        }
      }
);
    }
    @Override public void setText(    final MenuItem menuItem){
    }
    @Override public void setShortcut(    final MenuItem menuItem){
    }
    @Override public void remove(){
      if (!shuttingDown.getAndSet(true)) {
        final AppIndicatorInstanceStruct savedAppIndicator=appIndicator;
        appIndicator=null;
        Gtk.dispatch(new Runnable(){
          @Override public void run(){
            AppIndicator.app_indicator_set_status(savedAppIndicator,AppIndicator.STATUS_PASSIVE);
            Pointer p=savedAppIndicator.getPointer();
            Gobject.g_object_unref(p);
          }
        }
);
        super.remove();
        Gtk.shutdownGui();
      }
    }
  }
;
  Gtk.dispatch(new Runnable(){
    @Override public void run(){
      File image=ImageUtils.getTransparentImage(ImageUtils.ENTRY_SIZE);
      String id=System.nanoTime() + "String_Node_Str";
      appIndicator=AppIndicator.app_indicator_new(id,image.getAbsolutePath(),AppIndicator.CATEGORY_APPLICATION_STATUS);
    }
  }
);
  Gtk.waitForStartup();
  if (System.getProperty("String_Node_Str","String_Node_Str").equals("String_Node_Str")) {
    Gtk.dispatch(new Runnable(){
      @Override public void run(){
        AppIndicator.app_indicator_set_status(appIndicator,AppIndicator.STATUS_ACTIVE);
        AppIndicator.app_indicator_set_title(appIndicator,"String_Node_Str");
      }
    }
);
  }
  bind(gtkMenu,null,systemTray);
}

Fixed version (ground truth):
public _AppIndicatorNativeTray(final SystemTray systemTray){
  super();
  Gtk.startGui();
  final GtkMenu gtkMenu=new GtkMenu(){
    /** 
 * MUST BE AFTER THE ITEM IS ADDED/CHANGED from the menu ALWAYS CALLED ON THE EDT
 */
    protected final void onMenuAdded(    final Pointer menu){
      AppIndicator.app_indicator_set_menu(appIndicator,menu);
      if (!setName) {
        setName=true;
        AppIndicator.app_indicator_set_title(appIndicator,"String_Node_Str");
      }
    }
    @Override public void setEnabled(    final MenuItem menuItem){
      Gtk.dispatch(new Runnable(){
        @Override public void run(){
          boolean enabled=menuItem.getEnabled();
          if (visible && !enabled) {
            AppIndicator.app_indicator_set_status(appIndicator,AppIndicator.STATUS_PASSIVE);
            visible=false;
          }
 else           if (!visible && enabled) {
            AppIndicator.app_indicator_set_status(appIndicator,AppIndicator.STATUS_ACTIVE);
            visible=true;
          }
        }
      }
);
    }
    @Override public void setImage(    final MenuItem menuItem){
      imageFile=menuItem.getImage();
      if (imageFile == null) {
        return;
      }
      Gtk.dispatch(new Runnable(){
        @Override public void run(){
          AppIndicator.app_indicator_set_icon(appIndicator,imageFile.getAbsolutePath());
          if (!isActive) {
            isActive=true;
            AppIndicator.app_indicator_set_status(appIndicator,AppIndicator.STATUS_ACTIVE);
          }
        }
      }
);
    }
    @Override public void setText(    final MenuItem menuItem){
    }
    @Override public void setShortcut(    final MenuItem menuItem){
    }
    @Override public void remove(){
      if (!shuttingDown.getAndSet(true)) {
        final AppIndicatorInstanceStruct savedAppIndicator=appIndicator;
        appIndicator=null;
        Gtk.dispatch(new Runnable(){
          @Override public void run(){
            AppIndicator.app_indicator_set_status(savedAppIndicator,AppIndicator.STATUS_PASSIVE);
            Pointer p=savedAppIndicator.getPointer();
            Gobject.g_object_unref(p);
          }
        }
);
        super.remove();
        Gtk.shutdownGui();
      }
    }
  }
;
  Gtk.dispatch(new Runnable(){
    @Override public void run(){
      File image=ImageUtils.getTransparentImage(ImageUtils.ENTRY_SIZE);
      String id=System.nanoTime() + "String_Node_Str";
      appIndicator=AppIndicator.app_indicator_new(id,image.getAbsolutePath(),AppIndicator.CATEGORY_APPLICATION_STATUS);
    }
  }
);
  Gtk.waitForStartup();
  bind(gtkMenu,null,systemTray);
}