Program: 66996
Project: 66996
Buggy source:
/** 
 * Create controls in the preview editor.
 * @param parent parent composite
 */
public void createPartControl(Composite parent){
  final ScrolledComposite sc=new ScrolledComposite(parent,SWT.H_SCROLL | SWT.V_SCROLL);
  sc.setExpandHorizontal(true);
  sc.setExpandVertical(true);
  mainPane=new Composite(sc,SWT.NONE);
  GridLayout layout=new GridLayout(1,false);
  layout.verticalSpacing=0;
  mainPane.setLayout(layout);
  mainPane.setLayoutData(new GridData(GridData.FILL_BOTH));
  final Composite buttonTray=new Composite(mainPane,SWT.NONE);
  GridData gData=new GridData(GridData.FILL_BOTH);
  gData.grabExcessHorizontalSpace=true;
  gData.grabExcessVerticalSpace=false;
  buttonTray.setLayoutData(gData);
  layout=new GridLayout(2,false);
  layout.marginWidth=5;
  layout.horizontalSpacing=0;
  buttonTray.setLayout(layout);
  bParameter=new Button(buttonTray,SWT.PUSH);
  bParameter.setToolTipText(Messages.getString("String_Node_Str"));
  bParameter.setText(Messages.getString("String_Node_Str"));
  GridData gd=new GridData();
  bParameter.setLayoutData(gd);
  final FormText note=new FormText(buttonTray,SWT.NONE);
  note.setText(getDisplayInfoText(ViewerPlugin.getDefault().getPluginPreferences().getString(WebViewer.PREVIEW_MAXROW)),true,true);
  note.setSize(SWT.DEFAULT - 10,SWT.DEFAULT);
  gd=new GridData();
  gd.horizontalIndent=20;
  note.setLayoutData(gd);
  note.addHyperlinkListener(new HyperlinkAdapter(){
    public void linkActivated(    HyperlinkEvent e){
      if (PreferencesUtil.createPreferenceDialogOn(UIUtil.getDefaultShell(),"String_Node_Str",new String[]{"String_Node_Str"},null).open() == Window.OK) {
        boolean ret=MessageDialog.openQuestion(UIUtil.getDefaultShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
        if (ret == true) {
          refresh();
        }
      }
    }
  }
);
  ViewerPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(new IPropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent event){
      if (note == null || note.isDisposed()) {
        ViewerPlugin.getDefault().getPluginPreferences().removePropertyChangeListener(this);
        return;
      }
      if (WebViewer.PREVIEW_MAXROW.equals(event.getProperty())) {
        note.setText(getDisplayInfoText(ViewerPlugin.getDefault().getPluginPreferences().getString(WebViewer.PREVIEW_MAXROW)),true,true);
        buttonTray.layout();
      }
    }
  }
);
  progressBar=new ProgressBar(mainPane,SWT.INDETERMINATE);
  gd=new GridData(GridData.END,GridData.CENTER,false,false);
  gd.heightHint=10;
  gd.widthHint=100;
  progressBar.setLayoutData(gd);
  progressBar.setVisible(false);
  createMainBrowser();
  parameterDialog=new InputParameterHtmlDialog(Display.getCurrent().getActiveShell(),InputParameterHtmlDialog.TITLE,getFileUri(),browser);
  if (bParameter != null) {
    bParameter.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent e){
        refresh();
      }
    }
);
  }
  sc.addControlListener(new ControlAdapter(){
    public void controlResized(    ControlEvent e){
      sc.setMinSize(buttonTray.computeSize(SWT.DEFAULT,SWT.DEFAULT));
      mainPane.layout();
    }
  }
);
  sc.setContent(mainPane);
}

Fixed version (ground truth):
/** 
 * Create controls in the preview editor.
 * @param parent parent composite
 */
public void createPartControl(Composite parent){
  final ScrolledComposite sc=new ScrolledComposite(parent,SWT.H_SCROLL | SWT.V_SCROLL);
  sc.setExpandHorizontal(true);
  sc.setExpandVertical(true);
  mainPane=new Composite(sc,SWT.NONE);
  GridLayout layout=new GridLayout(1,false);
  layout.verticalSpacing=0;
  mainPane.setLayout(layout);
  mainPane.setLayoutData(new GridData(GridData.FILL_BOTH));
  final Composite buttonTray=new Composite(mainPane,SWT.NONE);
  GridData gData=new GridData(GridData.FILL_BOTH);
  gData.grabExcessHorizontalSpace=true;
  gData.grabExcessVerticalSpace=false;
  buttonTray.setLayoutData(gData);
  layout=new GridLayout(2,false);
  layout.marginWidth=5;
  layout.horizontalSpacing=0;
  buttonTray.setLayout(layout);
  bParameter=new Button(buttonTray,SWT.PUSH);
  bParameter.setToolTipText(Messages.getString("String_Node_Str"));
  bParameter.setText(Messages.getString("String_Node_Str"));
  GridData gd=new GridData();
  bParameter.setLayoutData(gd);
  final FormText note=new FormText(buttonTray,SWT.NONE);
  note.setText(getDisplayInfoText(ViewerPlugin.getDefault().getPluginPreferences().getString(WebViewer.PREVIEW_MAXROW)),true,true);
  note.setSize(SWT.DEFAULT - 10,SWT.DEFAULT);
  gd=new GridData();
  gd.horizontalIndent=20;
  note.setLayoutData(gd);
  note.addHyperlinkListener(new HyperlinkAdapter(){
    public void linkActivated(    HyperlinkEvent e){
      if (PreferencesUtil.createPreferenceDialogOn(UIUtil.getDefaultShell(),"String_Node_Str",new String[]{"String_Node_Str"},null).open() == Window.OK) {
        boolean ret=MessageDialog.openQuestion(UIUtil.getDefaultShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
        if (ret == true) {
          refresh();
        }
      }
    }
  }
);
  final IPropertyChangeListener prefListener=new IPropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent event){
      if (note != null && !note.isDisposed() && WebViewer.PREVIEW_MAXROW.equals(event.getProperty())) {
        note.setText(getDisplayInfoText(ViewerPlugin.getDefault().getPluginPreferences().getString(WebViewer.PREVIEW_MAXROW)),true,true);
        buttonTray.layout();
      }
    }
  }
;
  note.addDisposeListener(new DisposeListener(){
    public void widgetDisposed(    DisposeEvent e){
      ViewerPlugin.getDefault().getPluginPreferences().removePropertyChangeListener(prefListener);
    }
  }
);
  ViewerPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(prefListener);
  progressBar=new ProgressBar(mainPane,SWT.INDETERMINATE);
  gd=new GridData(GridData.END,GridData.CENTER,false,false);
  gd.heightHint=10;
  gd.widthHint=100;
  progressBar.setLayoutData(gd);
  progressBar.setVisible(false);
  createMainBrowser();
  parameterDialog=new InputParameterHtmlDialog(Display.getCurrent().getActiveShell(),InputParameterHtmlDialog.TITLE,getFileUri(),browser);
  if (bParameter != null) {
    bParameter.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent e){
        refresh();
      }
    }
);
  }
  sc.addControlListener(new ControlAdapter(){
    public void controlResized(    ControlEvent e){
      sc.setMinSize(buttonTray.computeSize(SWT.DEFAULT,SWT.DEFAULT));
      mainPane.layout();
    }
  }
);
  sc.setContent(mainPane);
}