Program: 78394
Project: 78394
Buggy source:
private void createExpressionField(Composite parent){
  Composite expressionArea=new Composite(parent,SWT.NONE);
  expressionArea.setLayout(new GridLayout(2,false));
  expressionArea.setLayoutData(new GridData(GridData.FILL_BOTH));
  Composite composite=new Composite(expressionArea,SWT.BORDER);
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  composite.setLayout(UIUtil.createGridLayoutWithoutMargin());
  CompositeRuler ruler=new CompositeRuler();
  ruler.addDecorator(0,new LineNumberRulerColumn());
  sourceViewer=new SourceViewer(composite,ruler,SWT.H_SCROLL | SWT.V_SCROLL);
  sourceViewer.configure(new JSSourceViewerConfiguration());
  if (expression != null) {
    JSEditorInput editorInput=new JSEditorInput(expression);
    JSDocumentProvider documentProvider=new JSDocumentProvider();
    try {
      documentProvider.connect(editorInput);
    }
 catch (    CoreException e) {
      ExceptionHandler.handle(e);
    }
    IDocument document=documentProvider.getDocument(editorInput);
    sourceViewer.setDocument(document);
  }
  GridData gd=new GridData(GridData.FILL_BOTH);
  gd.heightHint=150;
  sourceViewer.getControl().setLayoutData(gd);
  sourceViewer.getTextWidget().addKeyListener(new KeyAdapter(){
    public void keyPressed(    KeyEvent e){
      if (isUndoKeyPress(e)) {
        sourceViewer.doOperation(ITextOperationTarget.UNDO);
      }
 else       if (isRedoKeyPress(e)) {
        sourceViewer.doOperation(ITextOperationTarget.REDO);
      }
    }
    private boolean isUndoKeyPress(    KeyEvent e){
      return ((e.stateMask & SWT.CONTROL) > 0) && ((e.keyCode == 'z') || (e.keyCode == 'Z'));
    }
    private boolean isRedoKeyPress(    KeyEvent e){
      return ((e.stateMask & SWT.CONTROL) > 0) && ((e.keyCode == 'y') || (e.keyCode == 'Y'));
    }
  }
);
  buttonBar=new Composite(expressionArea,SWT.NONE);
  buttonBar.setLayout(UIUtil.createGridLayoutWithoutMargin());
  buttonBar.setLayoutData(new GridData(GridData.FILL_VERTICAL));
}

Fixed version (ground truth):
private void createExpressionField(Composite parent){
  Composite expressionArea=new Composite(parent,SWT.NONE);
  expressionArea.setLayout(new GridLayout(2,false));
  expressionArea.setLayoutData(new GridData(GridData.FILL_BOTH));
  Composite composite=new Composite(expressionArea,SWT.BORDER);
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  composite.setLayout(UIUtil.createGridLayoutWithoutMargin());
  CompositeRuler ruler=new CompositeRuler();
  ruler.addDecorator(0,new LineNumberRulerColumn());
  sourceViewer=new SourceViewer(composite,ruler,SWT.H_SCROLL | SWT.V_SCROLL);
  sourceViewer.configure(new JSSourceViewerConfiguration());
  if (expression != null) {
    JSEditorInput editorInput=new JSEditorInput(expression);
    JSDocumentProvider documentProvider=new JSDocumentProvider();
    try {
      documentProvider.connect(editorInput);
    }
 catch (    CoreException e) {
      ExceptionHandler.handle(e);
    }
    IDocument document=documentProvider.getDocument(editorInput);
    sourceViewer.setDocument(document);
  }
  GridData gd=new GridData(GridData.FILL_BOTH);
  gd.heightHint=150;
  sourceViewer.getControl().setLayoutData(gd);
  if (Platform.getOS().equals(Platform.WS_WIN32)) {
    Font font=sourceViewer.getTextWidget().getFont();
    FontData data=font.getFontData()[0];
    Font newFont=FontManager.getFont(data.getName(),data.getHeight() + 1,data.getStyle());
    sourceViewer.getTextWidget().setFont(newFont);
  }
  sourceViewer.getTextWidget().addKeyListener(new KeyAdapter(){
    public void keyPressed(    KeyEvent e){
      if (isUndoKeyPress(e)) {
        sourceViewer.doOperation(ITextOperationTarget.UNDO);
      }
 else       if (isRedoKeyPress(e)) {
        sourceViewer.doOperation(ITextOperationTarget.REDO);
      }
    }
    private boolean isUndoKeyPress(    KeyEvent e){
      return ((e.stateMask & SWT.CONTROL) > 0) && ((e.keyCode == 'z') || (e.keyCode == 'Z'));
    }
    private boolean isRedoKeyPress(    KeyEvent e){
      return ((e.stateMask & SWT.CONTROL) > 0) && ((e.keyCode == 'y') || (e.keyCode == 'Y'));
    }
  }
);
  buttonBar=new Composite(expressionArea,SWT.NONE);
  buttonBar.setLayout(UIUtil.createGridLayoutWithoutMargin());
  buttonBar.setLayoutData(new GridData(GridData.FILL_VERTICAL));
}