Program: 96224
Project: 96224
Buggy source:
/** 
 * Implementation of the mouse move. The mouse is moved into the graphics component.
 * @param graphicsComponent The component into which the mouse will be moved.
 * @param constraints The rectangle to move to, relative to the location ofthe given component. May be <code>null</code>. If <code>null</code>, the mouse will be moved to the center of the given component.
 * @param xPos xPos in component           
 * @param yPos yPos in component
 * @param xAbsolute true if x-position should be absolute  
 * @param yAbsolute true if y-position should be absolute  
 * @param clickOptions Contains mouse movement strategy information.
 * @throws StepExecutionException If the click delay is interupted or the event confirmation receives a timeout.
 */
private void moveImpl(final Widget graphicsComponent,final Rectangle constraints,final int xPos,final boolean xAbsolute,final int yPos,final boolean yAbsolute,ClickOptions clickOptions) throws StepExecutionException {
  if (clickOptions.isScrollToVisible() && graphicsComponent instanceof Control) {
    ensureComponentVisible((Control)graphicsComponent,constraints);
  }
  Rectangle bounds=getBounds(graphicsComponent);
  if (constraints != null) {
    if (graphicsComponent instanceof Control) {
      Point convertedLocation=(Point)m_queuer.invokeAndWait("String_Node_Str",new IRunnable(){
        public Object run() throws StepExecutionException {
          return ((Control)graphicsComponent).toDisplay(constraints.x,constraints.y);
        }
      }
);
      bounds.x=convertedLocation.x;
      bounds.y=convertedLocation.y;
    }
 else {
      bounds.x+=constraints.x;
      bounds.y+=constraints.y;
    }
    bounds.height=constraints.height;
    bounds.width=constraints.width;
  }
  Point pointToGo=SwtPointUtil.calculatePointToGo(xPos,xAbsolute,yPos,yAbsolute,bounds);
  if (isMouseMoveRequired(pointToGo)) {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + pointToGo);
    }
    Point initialPoint=(Point)m_queuer.invokeAndWait("String_Node_Str",new IRunnable(){
      public Object run() throws StepExecutionException {
        Display d=m_autServer.getAutDisplay();
        return d.getCursorLocation();
      }
    }
);
    if (pointToGo != null && (pointToGo.x < 0 || pointToGo.y < 0)) {
      throw new RobotException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.CLICKPOINT_OFFSCREEN,new String[]{String.valueOf(pointToGo.x),String.valueOf(pointToGo.y)}));
    }
    java.awt.Point[] path=MouseMovementStrategy.getMovementPath(new java.awt.Point(initialPoint.x,initialPoint.y),new java.awt.Point(pointToGo.x,pointToGo.y),clickOptions.getStepMovement());
    for (int i=0; i < path.length; i++) {
      m_robot.mouseMove(path[i].x,path[i].y);
    }
    logAndCorrectMousePosition(pointToGo);
  }
}

Fixed version (ground truth):
/** 
 * Implementation of the mouse move. The mouse is moved into the graphics component.
 * @param graphicsComponent The component into which the mouse will be moved.
 * @param constraints The rectangle to move to, relative to the location ofthe given component. May be <code>null</code>. If <code>null</code>, the mouse will be moved to the center of the given component.
 * @param xPos xPos in component           
 * @param yPos yPos in component
 * @param xAbsolute true if x-position should be absolute  
 * @param yAbsolute true if y-position should be absolute  
 * @param clickOptions Contains mouse movement strategy information.
 * @throws StepExecutionException If the click delay is interupted or the event confirmation receives a timeout.
 */
private void moveImpl(final Widget graphicsComponent,final Rectangle constraints,final int xPos,final boolean xAbsolute,final int yPos,final boolean yAbsolute,ClickOptions clickOptions) throws StepExecutionException {
  if (clickOptions.isScrollToVisible() && graphicsComponent instanceof Control) {
    ensureComponentVisible((Control)graphicsComponent,constraints);
  }
  Rectangle bounds=getBounds(graphicsComponent);
  if (constraints != null) {
    if (graphicsComponent instanceof Control) {
      Point convertedLocation=convertLocation(constraints,(Control)graphicsComponent);
      bounds.x=convertedLocation.x;
      bounds.y=convertedLocation.y;
    }
 else {
      bounds.x+=constraints.x;
      bounds.y+=constraints.y;
    }
    bounds.height=constraints.height;
    bounds.width=constraints.width;
  }
  Point pointToGo=SwtPointUtil.calculatePointToGo(xPos,xAbsolute,yPos,yAbsolute,bounds);
  if (isMouseMoveRequired(pointToGo)) {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + pointToGo);
    }
    Point initialPoint=(Point)m_queuer.invokeAndWait("String_Node_Str",new IRunnable(){
      public Object run() throws StepExecutionException {
        Display d=m_autServer.getAutDisplay();
        return d.getCursorLocation();
      }
    }
);
    if (pointToGo != null && (pointToGo.x < 0 || pointToGo.y < 0)) {
      throw new RobotException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.CLICKPOINT_OFFSCREEN,new String[]{String.valueOf(pointToGo.x),String.valueOf(pointToGo.y)}));
    }
    java.awt.Point[] path=MouseMovementStrategy.getMovementPath(new java.awt.Point(initialPoint.x,initialPoint.y),new java.awt.Point(pointToGo.x,pointToGo.y),clickOptions.getStepMovement());
    for (int i=0; i < path.length; i++) {
      m_robot.mouseMove(path[i].x,path[i].y);
    }
    logAndCorrectMousePosition(pointToGo);
  }
}