Program: 79229
Project: 79229
Buggy source:
/** 
 * Returns <code>true</code> if the given point is outside the viewport or near its edge. Scrolls the viewport by a calculated (time based) amount in the current direction. todo: investigate if we should allow auto expose when the pointer is outside the viewport
 * @see org.eclipse.gef.AutoexposeHelper#step(org.eclipse.draw2d.geometry.Point)
 */
public boolean step(Point where){
  Viewport port=findViewport(owner);
  Rectangle rect=Rectangle.SINGLETON;
  port.getClientArea(rect);
  port.translateToParent(rect);
  port.translateToAbsolute(rect);
  if (!rect.contains(where) || rect.crop(threshold).contains(where))   return false;
  int scrollOffset=0;
  if (lastStepTime == 0)   lastStepTime=System.currentTimeMillis();
  DeferredGraphicalViewer.OriginStepData stepData=((DeferredGraphicalViewer)owner.getViewer()).getOriginStepData();
  long difference=System.currentTimeMillis() - lastStepTime;
  if (difference > 0) {
    scrollOffset=((int)difference / 3);
    lastStepTime=System.currentTimeMillis();
  }
  if (scrollOffset == 0)   return true;
  rect.crop(threshold);
  int region=rect.getPosition(where);
  Point loc=port.getViewLocation();
  if ((region & PositionConstants.SOUTH) != 0)   loc.y+=scrollOffset;
 else   if ((region & PositionConstants.NORTH) != 0)   loc.y-=scrollOffset;
  if ((region & PositionConstants.EAST) != 0)   loc.x+=scrollOffset;
 else   if ((region & PositionConstants.WEST) != 0)   loc.x-=scrollOffset;
  Rectangle bounds=port.getBounds();
  if (stepData.minX > loc.x)   loc.x=port.getHorizontalRangeModel().getValue();
  if (stepData.maxX - stepData.extendX < loc.x)   loc.x=port.getHorizontalRangeModel().getValue();
  if (stepData.minY > loc.y)   loc.y=port.getVerticalRangeModel().getValue();
  if (stepData.maxY - stepData.extendY < loc.y)   loc.y=port.getVerticalRangeModel().getValue();
  port.setViewLocation(loc);
  return true;
}

Fixed version (ground truth):
/** 
 * Returns <code>true</code> if the given point is outside the viewport or near its edge. Scrolls the viewport by a calculated (time based) amount in the current direction. todo: investigate if we should allow auto expose when the pointer is outside the viewport
 * @see org.eclipse.gef.AutoexposeHelper#step(org.eclipse.draw2d.geometry.Point)
 */
public boolean step(Point where){
  Viewport port=findViewport(owner);
  Rectangle rect=Rectangle.SINGLETON;
  port.getClientArea(rect);
  port.translateToParent(rect);
  port.translateToAbsolute(rect);
  if (!rect.contains(where) || rect.crop(threshold).contains(where))   return false;
  int scrollOffset=0;
  if (lastStepTime == 0)   lastStepTime=System.currentTimeMillis();
  DeferredGraphicalViewer.OriginStepData stepData=((DeferredGraphicalViewer)owner.getViewer()).getOriginStepData();
  long difference=System.currentTimeMillis() - lastStepTime;
  if (difference > 0) {
    scrollOffset=((int)difference / 3);
    lastStepTime=System.currentTimeMillis();
  }
  if (scrollOffset == 0)   return true;
  rect.crop(threshold);
  int region=rect.getPosition(where);
  Point loc=port.getViewLocation();
  if ((region & PositionConstants.SOUTH) != 0)   loc.y+=scrollOffset;
 else   if ((region & PositionConstants.NORTH) != 0)   loc.y-=scrollOffset;
  if ((region & PositionConstants.EAST) != 0)   loc.x+=scrollOffset;
 else   if ((region & PositionConstants.WEST) != 0)   loc.x-=scrollOffset;
  if (stepData.minX > loc.x)   loc.x=port.getHorizontalRangeModel().getValue();
  if (stepData.maxX - stepData.extendX < loc.x)   loc.x=port.getHorizontalRangeModel().getValue();
  if (stepData.minY > loc.y)   loc.y=port.getVerticalRangeModel().getValue();
  if (stepData.maxY - stepData.extendY < loc.y)   loc.y=port.getVerticalRangeModel().getValue();
  port.setViewLocation(loc);
  return true;
}