Program: 145693
Project: 145693
Buggy source:
public Window show(boolean aModal,final JavaScriptObject aCallback,PlatypusDesktopContainer aDesktop){
  close(null,null);
  if (!isOpened()) {
    window=new PlatypusWindow(aDesktop,this);
    window.addMoveHandler(new MoveHandler(){
      @Override public void onMove(      MoveEvent event){
        location=new Point(event.getX(),event.getY());
      }
    }
);
    window.addResizeHandler(new ResizeHandler(){
      @Override public void onResize(      ResizeEvent event){
        size=new Point(event.getWidth(),event.getHeight());
      }
    }
);
    window.setClosable(true);
    window.setMaximizable(maximizable);
    window.setMinimizable(iconifiable);
    window.setHeaderVisible(!undecorated);
    window.setShadow(!undecorated);
    window.setBorders(!undecorated);
    window.setDraggable(true);
    window.setResizable(resizable);
    window.setOnEsc(aModal);
    window.setHeadingText(title);
    window.setBodyBorder(false);
    window.getElement().getStyle().setOpacity(opacity);
    window.getBody().getStyle().setOpacity(opacity);
    if (iconImage != null && !iconImage.isEmpty())     window.getHeader().setIcon(AppClient.getInstance().getImageResource(iconImage).addJavaCallback(new ImageResourceCallback(){
      @Override public void run(      ImageResource aResource){
        setIcon(aResource);
        if (window != null)         window.getHeader().setIcon(aResource);
      }
    }
));
    window.setModal(aModal);
    window.setWidget(view);
    view.setVisible(true);
    registerWindowListeners(window);
    boolean wasSize=size != null;
    window.show();
    if (wasSize) {
      window.setPixelSize(size.getX(),size.getY());
    }
 else {
      int decorHeight=window.getElement().getHeight(false) - window.getBody().getHeight(false);
      int decorWidth=window.getElement().getWidth(false) - window.getBody().getWidth(false);
      window.setPixelSize(viewPreferredWidth + decorWidth,viewPreferredHeight + decorHeight);
    }
    if (locationByPlatform) {
      if (aDesktop != null)       window.setPosition(aDesktop.getConsideredPosition().getX(),aDesktop.getConsideredPosition().getY());
 else       window.center();
    }
 else {
      if (location != null)       window.setPosition(location.getX(),location.getY());
 else       window.center();
    }
  }
  return window;
}

Fixed version (ground truth):
public Window show(boolean aModal,final JavaScriptObject aCallback,PlatypusDesktopContainer aDesktop){
  close(null,null);
  if (!isOpened()) {
    window=new PlatypusWindow(aDesktop,this);
    window.addMoveHandler(new MoveHandler(){
      @Override public void onMove(      MoveEvent event){
        location=new Point(event.getX(),event.getY());
      }
    }
);
    window.addResizeHandler(new ResizeHandler(){
      @Override public void onResize(      ResizeEvent event){
        size=new Point(event.getWidth(),event.getHeight());
      }
    }
);
    window.setClosable(true);
    window.setMaximizable(maximizable);
    window.setMinimizable(iconifiable);
    window.setHeaderVisible(!undecorated);
    window.setShadow(!undecorated);
    window.setBorders(!undecorated);
    window.setDraggable(true);
    window.setResizable(resizable);
    window.setOnEsc(aModal);
    window.setHeadingText(title);
    window.setBodyBorder(false);
    window.getElement().getStyle().setOpacity(opacity);
    window.getBody().getStyle().setOpacity(opacity);
    if (iconImage != null && !iconImage.isEmpty())     window.getHeader().setIcon(AppClient.getInstance().getImageResource(iconImage).addCallback(new ImageResourceCallback(){
      @Override public void run(      ImageResource aResource){
        setIcon(aResource);
        if (window != null)         window.getHeader().setIcon(aResource);
      }
    }
));
    window.setModal(aModal);
    window.setWidget(view);
    view.setVisible(true);
    registerWindowListeners(window);
    boolean wasSize=size != null;
    window.show();
    if (wasSize) {
      window.setPixelSize(size.getX(),size.getY());
    }
 else {
      int decorHeight=window.getElement().getHeight(false) - window.getBody().getHeight(false);
      int decorWidth=window.getElement().getWidth(false) - window.getBody().getWidth(false);
      window.setPixelSize(viewPreferredWidth + decorWidth,viewPreferredHeight + decorHeight);
    }
    if (locationByPlatform) {
      if (aDesktop != null)       window.setPosition(aDesktop.getConsideredPosition().getX(),aDesktop.getConsideredPosition().getY());
 else       window.center();
    }
 else {
      if (location != null)       window.setPosition(location.getX(),location.getY());
 else       window.center();
    }
  }
  return window;
}