Program: 122579
Project: 122579
Buggy source:
/** 
 * DOC amaumont Comment method "createUI".
 * @param display
 */
public Shell createWindow(final Display display,MapperModel model){
  Shell activeShell=display.getActiveShell();
  Shell mapperShell=null;
  int style=SWT.DIALOG_TRIM | SWT.MIN | SWT.MAX| SWT.APPLICATION_MODAL| SWT.RESIZE;
  if (activeShell == null) {
    mapperShell=new Shell(mapperShell,style);
  }
 else {
    mapperShell=new Shell(activeShell,style);
  }
  this.mapperUIParent=mapperShell;
  final Shell mapperShellFinal=mapperShell;
  mapperShell.addShellListener(new ShellListener(){
    public void shellActivated(    ShellEvent e){
    }
    public void shellClosed(    ShellEvent e){
      UIManager uiManager=mapperManager.getUiManager();
      if (uiManager.getMapperResponse() == SWT.NONE) {
        for (        DataMapTableView dataMapTableView : uiManager.getInputsTablesView()) {
          dataMapTableView.notifyFocusLost();
        }
        for (        DataMapTableView dataMapTableView : uiManager.getOutputsTablesView()) {
          dataMapTableView.notifyFocusLost();
        }
        for (        DataMapTableView dataMapTableView : uiManager.getVarsTablesView()) {
          dataMapTableView.notifyFocusLost();
        }
        uiManager.setMapperResponse(SWT.CANCEL);
        uiManager.prepareClosing(uiManager.getMapperResponse());
      }
      if (mapperManager.isDataChanged() && !mapperManager.getUiManager().isCloseWithoutPrompt()) {
        boolean closeWindow=MessageDialog.openConfirm(mapperShellFinal,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
        if (!closeWindow) {
          e.doit=false;
        }
 else {
          mapperManager.getAbstractMapComponent().setExternalData(mapperManager.getOriginalExternalData());
          mapperManager.getUiManager().prepareClosing(SWT.CANCEL);
        }
      }
    }
    public void shellDeactivated(    ShellEvent e){
    }
    public void shellDeiconified(    ShellEvent e){
    }
    public void shellIconified(    ShellEvent e){
    }
  }
);
  MapperComponent component=(MapperComponent)mapperManager.getAbstractMapComponent();
  ExternalMapperUiProperties uiProperties=mapperManager.getUiManager().getUiProperties();
  mapperShell.setImage(CoreImageProvider.getComponentIcon(component.getComponent(),ICON_SIZE.ICON_32));
  IBrandingService brandingService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
  String productName=brandingService.getFullProductName();
  mapperShell.setText(Messages.getString("String_Node_Str",productName,component.getComponent().getName(),component.getUniqueName()));
  Rectangle boundsMapper=uiProperties.getBoundsMapper();
  if (uiProperties.isShellMaximized()) {
    mapperShell.setMaximized(uiProperties.isShellMaximized());
  }
 else {
    if (uiProperties.getBoundsMapper().equals(ExternalMapperUiProperties.DEFAULT_BOUNDS_MAPPER)) {
      mapperShell.setMaximized(true);
    }
 else {
      boundsMapper=uiProperties.getBoundsMapper();
      if (boundsMapper.x < 0) {
        boundsMapper.x=0;
      }
      if (boundsMapper.y < 0) {
        boundsMapper.y=0;
      }
      mapperShell.setBounds(boundsMapper);
    }
  }
  createCompositeContent(model);
  mapperShell.open();
  return mapperShell;
}

Fixed version (ground truth):
/** 
 * DOC amaumont Comment method "createUI".
 * @param display
 */
public Shell createWindow(final Display display,MapperModel model){
  Shell activeShell=display.getActiveShell();
  Shell mapperShell=null;
  int style=SWT.DIALOG_TRIM | SWT.MIN | SWT.MAX| SWT.APPLICATION_MODAL| SWT.RESIZE;
  if (activeShell == null) {
    mapperShell=new Shell(mapperShell,style);
  }
 else {
    mapperShell=new Shell(activeShell,style);
  }
  this.mapperUIParent=mapperShell;
  final Shell mapperShellFinal=mapperShell;
  mapperShell.addShellListener(new ShellListener(){
    public void shellActivated(    ShellEvent e){
    }
    public void shellClosed(    ShellEvent e){
      UIManager uiManager=mapperManager.getUiManager();
      if (uiManager.getMapperResponse() == SWT.NONE) {
        for (        DataMapTableView dataMapTableView : uiManager.getInputsTablesView()) {
          dataMapTableView.notifyFocusLost();
        }
        for (        DataMapTableView dataMapTableView : uiManager.getOutputsTablesView()) {
          dataMapTableView.notifyFocusLost();
        }
        for (        DataMapTableView dataMapTableView : uiManager.getVarsTablesView()) {
          dataMapTableView.notifyFocusLost();
        }
        uiManager.setMapperResponse(SWT.CANCEL);
        uiManager.prepareClosing(uiManager.getMapperResponse());
      }
      if (!mapperManager.componentIsReadOnly() && mapperManager.isDataChanged() && !mapperManager.getUiManager().isCloseWithoutPrompt()) {
        boolean closeWindow=MessageDialog.openConfirm(mapperShellFinal,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
        if (!closeWindow) {
          e.doit=false;
        }
 else {
          mapperManager.getAbstractMapComponent().setExternalData(mapperManager.getOriginalExternalData());
          mapperManager.getUiManager().prepareClosing(SWT.CANCEL);
        }
      }
    }
    public void shellDeactivated(    ShellEvent e){
    }
    public void shellDeiconified(    ShellEvent e){
    }
    public void shellIconified(    ShellEvent e){
    }
  }
);
  MapperComponent component=(MapperComponent)mapperManager.getAbstractMapComponent();
  ExternalMapperUiProperties uiProperties=mapperManager.getUiManager().getUiProperties();
  mapperShell.setImage(CoreImageProvider.getComponentIcon(component.getComponent(),ICON_SIZE.ICON_32));
  IBrandingService brandingService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
  String productName=brandingService.getFullProductName();
  mapperShell.setText(Messages.getString("String_Node_Str",productName,component.getComponent().getName(),component.getUniqueName()));
  Rectangle boundsMapper=uiProperties.getBoundsMapper();
  if (uiProperties.isShellMaximized()) {
    mapperShell.setMaximized(uiProperties.isShellMaximized());
  }
 else {
    if (uiProperties.getBoundsMapper().equals(ExternalMapperUiProperties.DEFAULT_BOUNDS_MAPPER)) {
      mapperShell.setMaximized(true);
    }
 else {
      boundsMapper=uiProperties.getBoundsMapper();
      if (boundsMapper.x < 0) {
        boundsMapper.x=0;
      }
      if (boundsMapper.y < 0) {
        boundsMapper.y=0;
      }
      mapperShell.setBounds(boundsMapper);
    }
  }
  createCompositeContent(model);
  mapperShell.open();
  return mapperShell;
}