Program: 133639
Project: 133639
Buggy source:
/** 
 * Creates and registers all listeners for the specified widget.
 * @param widget The widget that will receive listeners.
 */
private void registerListeners(final VisItSwtWidget widget){
  if (wheelListener == null) {
    wheelListener=new MouseWheelListener(){
      @Override public void mouseScrolled(      MouseEvent e){
        String direction=(e.count > 0) ? "String_Node_Str" : "String_Node_Str";
        widget.zoom(direction);
      }
    }
;
    widget.addMouseWheelListener(wheelListener);
  }
  if (moveListener == null) {
    moveListener=new MouseMoveListener(){
      @Override public void mouseMove(      MouseEvent e){
        if (mousePressed) {
          enqueueMouseLocation(e.x,e.y);
        }
      }
    }
;
    widget.addMouseMoveListener(moveListener);
  }
  if (mouseListener == null) {
    mouseListener=new MouseListener(){
      @Override public void mouseUp(      MouseEvent e){
        mousePressed=false;
        stop();
      }
      @Override public void mouseDown(      MouseEvent e){
        mousePressed=true;
        start(e.x,e.y,(e.stateMask & SWT.CTRL) != 0,(e.stateMask & SWT.SHIFT) != 0);
      }
      @Override public void mouseDoubleClick(      MouseEvent e){
      }
    }
;
    widget.addMouseListener(mouseListener);
  }
  if (disposeListener == null) {
    disposeListener=new DisposeListener(){
      @Override public void widgetDisposed(      DisposeEvent e){
        dispose();
      }
    }
;
    widget.addDisposeListener(disposeListener);
  }
  return;
}

Fixed version (ground truth):
/** 
 * Creates and registers all listeners for the specified widget.
 * @param widget The widget that will receive listeners.
 */
private void registerListeners(final VisItSwtWidget widget){
  if (wheelListener == null) {
    wheelListener=new MouseWheelListener(){
      @Override public void mouseScrolled(      MouseEvent e){
        String direction=(e.count > 0) ? "String_Node_Str" : "String_Node_Str";
        widget.zoom(direction);
        System.out.println(direction);
      }
    }
;
    Listener dummy=new Listener(){
      @Override public void handleEvent(      org.eclipse.swt.widgets.Event event){
      }
    }
;
    widget.addListener(SWT.KeyDown,dummy);
    widget.addMouseWheelListener(wheelListener);
  }
  if (moveListener == null) {
    moveListener=new MouseMoveListener(){
      @Override public void mouseMove(      MouseEvent e){
        if (mousePressed) {
          enqueueMouseLocation(e.x,e.y);
        }
      }
    }
;
    widget.addMouseMoveListener(moveListener);
  }
  if (mouseListener == null) {
    mouseListener=new MouseListener(){
      @Override public void mouseUp(      MouseEvent e){
        mousePressed=false;
        stop();
      }
      @Override public void mouseDown(      MouseEvent e){
        mousePressed=true;
        start(e.x,e.y,(e.stateMask & SWT.CTRL) != 0,(e.stateMask & SWT.SHIFT) != 0);
      }
      @Override public void mouseDoubleClick(      MouseEvent e){
      }
    }
;
    widget.addMouseListener(mouseListener);
  }
  if (disposeListener == null) {
    disposeListener=new DisposeListener(){
      @Override public void widgetDisposed(      DisposeEvent e){
        dispose();
      }
    }
;
    widget.addDisposeListener(disposeListener);
  }
  return;
}