This is related to Bug 8212 in xfce4-panel. Java-based GUIs (Matlab, IntelliJ IDEA) that use modal dialog boxes can cause the Window Buttons in the taskbar to incorrectly disappear.
To reproduce, start Matlab, select Help -> Product Help, then back in the main window, File -> New -> Class. Then close the Editor while watching the Panel. Both the Editor and main MATLAB window buttons will disappear. Now close the Help window. MATLAB will still be running, but no buttons appear in the panel. If you switch to a different workspace and back, the button reappears.
I think this is the same issue with Java-based GUIs that affected the gnome panel, see: https://bugs.launchpad.net/ubuntu/+source/libwnck/+bug/144406 and http://cgit.compiz.org/compiz/plugins/workarounds/commit/?h=compiz-0.8&id=79f11ed2cd71d2155a5e04aa8803c56633b212bb. From that page:
"Certain java applications set themselves to be transient when they open a modal dialog, causing them to disappear from the taskbar window list. This workaround notices when the transient property is unset and adds the window back to the taskbar."
Using gnome-panel with metacity, the bug DOES NOT occur.
Using xfce4-panel with metacity, the bug DOES NOT occur.
Using gnome-panel with xfwm4, the bug DOES occur.
Using xfce4-panel with xfwm4, the bug DOES occur.
So, that would seem to point to the window manager rather than the panel.
Looks like a java bug to me, from your own description.