Program: 70916
Project: 70916
Buggy source:
protected Command getCreateCommand(CreateRequest request){
  EditPart after=getInsertionReference(request);
  Object model=this.getHost().getModel();
  Object newObject=request.getExtendedData().get(DesignerConstants.KEY_NEWOBJECT);
  if (model instanceof CrosstabCellAdapter) {
    int type=getAreaType((CrosstabCellAdapter)model);
    String position=((CrosstabCellAdapter)model).getPositionType();
    if ((newObject instanceof DimensionHandle || newObject instanceof LevelHandle) && (type == ICrosstabConstants.COLUMN_AXIS_TYPE || type == ICrosstabConstants.ROW_AXIS_TYPE)) {
      Object afterObj=after == null ? null : after.getModel();
      if (newObject instanceof LevelHandle) {
        DimensionHandle dimensionHandle=CrosstabAdaptUtil.getDimensionHandle((LevelHandle)newObject);
        AddDimensionViewHandleCommand command=new AddDimensionViewHandleCommand((CrosstabCellAdapter)model,type,dimensionHandle,afterObj);
        command.setLevelHandles(new LevelHandle[]{(LevelHandle)newObject});
        return command;
      }
      return new AddDimensionViewHandleCommand((CrosstabCellAdapter)model,type,(DimensionHandle)newObject,afterObj);
    }
 else     if (newObject instanceof MeasureHandle && position.equals(ICrosstabCellAdapterFactory.CELL_MEASURE)) {
      Object afterObj=null;
      if (after != null) {
        afterObj=after.getModel();
      }
      return new AddMeasureViewHandleCommand((CrosstabCellAdapter)model,(MeasureHandle)newObject,afterObj);
    }
 else     if (newObject instanceof MeasureGroupHandle && position.equals(ICrosstabCellAdapterFactory.CELL_MEASURE)) {
      List list=new ArrayList();
      list.add(newObject);
      Object afterObj=null;
      if (after != null) {
        afterObj=after.getModel();
      }
      return new AddMultipleMeasureCommand((CrosstabCellAdapter)model,list,afterObj);
    }
 else     if (newObject instanceof Object[] && CrosstabAdaptUtil.canCreateMultipleCommand((Object[])newObject) && position.equals(ICrosstabCellAdapterFactory.CELL_MEASURE)) {
      List list=new ArrayList();
      Object[] objs=(Object[])newObject;
      for (int i=0; i < objs.length; i++) {
        list.add(objs[i]);
      }
      Object afterObj=null;
      if (after != null) {
        afterObj=after.getModel();
      }
      return new AddMultipleMeasureCommand((CrosstabCellAdapter)model,list,afterObj);
    }
 else     if (isLevelHandles(newObject)) {
      Object[] items=(Object[])newObject;
      LevelHandle[] levelHandles=new LevelHandle[items.length];
      System.arraycopy(items,0,levelHandles,0,levelHandles.length);
      Object afterObj=after == null ? null : after.getModel();
      DimensionHandle dimensionHandle=CrosstabAdaptUtil.getDimensionHandle(levelHandles[0]);
      AddDimensionViewHandleCommand command=new AddDimensionViewHandleCommand((CrosstabCellAdapter)model,type,dimensionHandle,afterObj);
      command.setLevelHandles(levelHandles);
      return command;
    }
 else {
      CrosstabCellCreateCommand command=new CrosstabCellCreateCommand(request.getExtendedData());
      command.setParent(getHost().getModel());
      command.setAfter(after == null ? null : after.getModel());
      return command;
    }
  }
  return super.getCreateCommand(request);
}

Fixed version (ground truth):
protected Command getCreateCommand(CreateRequest request){
  EditPart after;
  if (getLocationFromRequest(request) == null) {
    after=null;
  }
 else {
    after=getInsertionReference(request);
  }
  Object model=this.getHost().getModel();
  Object newObject=request.getExtendedData().get(DesignerConstants.KEY_NEWOBJECT);
  if (model instanceof CrosstabCellAdapter) {
    int type=getAreaType((CrosstabCellAdapter)model);
    String position=((CrosstabCellAdapter)model).getPositionType();
    if ((newObject instanceof DimensionHandle || newObject instanceof LevelHandle) && (type == ICrosstabConstants.COLUMN_AXIS_TYPE || type == ICrosstabConstants.ROW_AXIS_TYPE)) {
      Object afterObj=after == null ? null : after.getModel();
      if (newObject instanceof LevelHandle) {
        DimensionHandle dimensionHandle=CrosstabAdaptUtil.getDimensionHandle((LevelHandle)newObject);
        AddDimensionViewHandleCommand command=new AddDimensionViewHandleCommand((CrosstabCellAdapter)model,type,dimensionHandle,afterObj);
        command.setLevelHandles(new LevelHandle[]{(LevelHandle)newObject});
        return command;
      }
      return new AddDimensionViewHandleCommand((CrosstabCellAdapter)model,type,(DimensionHandle)newObject,afterObj);
    }
 else     if (newObject instanceof MeasureHandle && position.equals(ICrosstabCellAdapterFactory.CELL_MEASURE)) {
      Object afterObj=null;
      if (after != null) {
        afterObj=after.getModel();
      }
      return new AddMeasureViewHandleCommand((CrosstabCellAdapter)model,(MeasureHandle)newObject,afterObj);
    }
 else     if (newObject instanceof MeasureGroupHandle && position.equals(ICrosstabCellAdapterFactory.CELL_MEASURE)) {
      List list=new ArrayList();
      list.add(newObject);
      Object afterObj=null;
      if (after != null) {
        afterObj=after.getModel();
      }
      return new AddMultipleMeasureCommand((CrosstabCellAdapter)model,list,afterObj);
    }
 else     if (newObject instanceof Object[] && CrosstabAdaptUtil.canCreateMultipleCommand((Object[])newObject) && position.equals(ICrosstabCellAdapterFactory.CELL_MEASURE)) {
      List list=new ArrayList();
      Object[] objs=(Object[])newObject;
      for (int i=0; i < objs.length; i++) {
        list.add(objs[i]);
      }
      Object afterObj=null;
      if (after != null) {
        afterObj=after.getModel();
      }
      return new AddMultipleMeasureCommand((CrosstabCellAdapter)model,list,afterObj);
    }
 else     if (isLevelHandles(newObject)) {
      Object[] items=(Object[])newObject;
      LevelHandle[] levelHandles=new LevelHandle[items.length];
      System.arraycopy(items,0,levelHandles,0,levelHandles.length);
      Object afterObj=after == null ? null : after.getModel();
      DimensionHandle dimensionHandle=CrosstabAdaptUtil.getDimensionHandle(levelHandles[0]);
      AddDimensionViewHandleCommand command=new AddDimensionViewHandleCommand((CrosstabCellAdapter)model,type,dimensionHandle,afterObj);
      command.setLevelHandles(levelHandles);
      return command;
    }
 else {
      CrosstabCellCreateCommand command=new CrosstabCellCreateCommand(request.getExtendedData());
      command.setParent(getHost().getModel());
      command.setAfter(after == null ? null : after.getModel());
      return command;
    }
  }
  return super.getCreateCommand(request);
}