Program: 57829
Project: 57829
Buggy source:
private void createPickingListeners(){
  view.addMultiIDPickingListener(new APickingListener(){
    @Override public void clicked(    Pick pick){
      DimensionGroupRenderer dimensionGroupRenderer=getDimensionGroupRenderer(pick.getID());
      if (dimensionGroupRenderer == null)       return;
      dimensionGroupRenderer.setSelectionType(SelectionType.SELECTION);
      dragAndDropController.clearDraggables();
      dragAndDropController.setDraggingStartPosition(pick.getPickedPoint());
      dragAndDropController.addDraggable(dimensionGroupRenderer);
      view.setDisplayListDirty();
    }
    @Override public void mouseOver(    Pick pick){
      DimensionGroupRenderer dimensionGroupRenderer=getDimensionGroupRenderer(pick.getID());
      if (dimensionGroupRenderer == null)       return;
      dimensionGroupRenderer.setColor(dimensionGroupRenderer.getBorderColor());
    }
    @Override public void mouseOut(    Pick pick){
      DimensionGroupRenderer dimensionGroupRenderer=getDimensionGroupRenderer(pick.getID());
      if (dimensionGroupRenderer == null)       return;
      dimensionGroupRenderer.setColor(dataDomain.getColor().getRGBA());
    }
    @Override public void dragged(    Pick pick){
      if (!dragAndDropController.isDragging()) {
        dragAndDropController.startDragging("String_Node_Str");
      }
    }
    private DimensionGroupRenderer getDimensionGroupRenderer(    int id){
      for (      DimensionGroupRenderer dimensionGroupRenderer : dimensionGroupRenderers) {
        if (dimensionGroupRenderer.getDimensionGroupData().getID() == id) {
          return dimensionGroupRenderer;
        }
      }
      return null;
    }
  }
,DIMENSION_GROUP_PICKING_TYPE + node.getID());
  view.addMultiIDPickingListener(new APickingListener(){
    @Override public void mouseOver(    Pick pick){
      EmptyCellRenderer emptyCellRenderer=getEmptyCellRenderer(pick.getID());
      if (emptyCellRenderer == null)       return;
      emptyCellRenderer.setColor(emptyCellRenderer.getBorderColor());
      view.setDisplayListDirty();
    }
    @Override public void mouseOut(    Pick pick){
      EmptyCellRenderer emptyCellRenderer=getEmptyCellRenderer(pick.getID());
      if (emptyCellRenderer == null)       return;
      emptyCellRenderer.setColor(EmptyCellRenderer.DEFAULT_COLOR);
      view.setDisplayListDirty();
    }
    @Override public void rightClicked(    Pick pick){
      Pair<CellContainer,CellContainer> rowAndColumn=null;
      for (      EmptyCellRenderer emptyCellRenderer : emptyCellRenderers.keySet()) {
        if (emptyCellRenderer.getID() == pick.getID()) {
          rowAndColumn=emptyCellRenderers.get(emptyCellRenderer);
          break;
        }
      }
      if (rowAndColumn != null) {
        String recordPerspectiveID=rowAndColumn.getFirst().id;
        CellContainer column=rowAndColumn.getSecond();
        String dimensionPerspectiveID=column.id;
        Group group=null;
        DimensionVirtualArray dimensionVA=null;
        boolean createDimensionPerspective=false;
        if (!dataDomain.getTable().containsDimensionPerspective(dimensionPerspectiveID)) {
          DimensionPerspective perspective=dataDomain.getTable().getDimensionPerspective(column.parentContainer.id);
          int groupIndex=column.parentContainer.childContainers.indexOf(column);
          dimensionVA=perspective.getVirtualArray();
          DimensionGroupList groupList=dimensionVA.getGroupList();
          group=groupList.get(groupIndex);
          createDimensionPerspective=true;
        }
        view.getContextMenuCreator().addContextMenuItem(new AddDataContainerItem(dataDomain,recordPerspectiveID,dimensionPerspectiveID,createDimensionPerspective,dimensionVA,group));
      }
    }
    private EmptyCellRenderer getEmptyCellRenderer(    int id){
      for (      EmptyCellRenderer emptyCellRenderer : emptyCellRenderers.keySet()) {
        if (emptyCellRenderer.getID() == id) {
          return emptyCellRenderer;
        }
      }
      return null;
    }
  }
,EMPTY_CELL_PICKING_TYPE + node.getID());
}

Fixed version (ground truth):
private void createPickingListeners(){
  view.addMultiIDPickingListener(new APickingListener(){
    @Override public void clicked(    Pick pick){
      DimensionGroupRenderer dimensionGroupRenderer=getDimensionGroupRenderer(pick.getID());
      if (dimensionGroupRenderer == null)       return;
      dimensionGroupRenderer.setSelectionType(SelectionType.SELECTION);
      dragAndDropController.clearDraggables();
      dragAndDropController.setDraggingStartPosition(pick.getPickedPoint());
      dragAndDropController.addDraggable(dimensionGroupRenderer);
      view.setDisplayListDirty();
    }
    @Override public void mouseOver(    Pick pick){
      DimensionGroupRenderer dimensionGroupRenderer=getDimensionGroupRenderer(pick.getID());
      if (dimensionGroupRenderer == null)       return;
      dimensionGroupRenderer.setColor(dimensionGroupRenderer.getBorderColor());
      view.setDisplayListDirty();
    }
    @Override public void mouseOut(    Pick pick){
      DimensionGroupRenderer dimensionGroupRenderer=getDimensionGroupRenderer(pick.getID());
      if (dimensionGroupRenderer == null)       return;
      dimensionGroupRenderer.setColor(dataDomain.getColor().getRGBA());
      view.setDisplayListDirty();
    }
    @Override public void dragged(    Pick pick){
      if (!dragAndDropController.isDragging()) {
        dragAndDropController.startDragging("String_Node_Str");
      }
    }
    private DimensionGroupRenderer getDimensionGroupRenderer(    int id){
      for (      DimensionGroupRenderer dimensionGroupRenderer : dimensionGroupRenderers) {
        if (dimensionGroupRenderer.getDimensionGroupData().getID() == id) {
          return dimensionGroupRenderer;
        }
      }
      return null;
    }
  }
,DIMENSION_GROUP_PICKING_TYPE + node.getID());
  view.addMultiIDPickingListener(new APickingListener(){
    @Override public void mouseOver(    Pick pick){
      EmptyCellRenderer emptyCellRenderer=getEmptyCellRenderer(pick.getID());
      if (emptyCellRenderer == null)       return;
      emptyCellRenderer.setColor(emptyCellRenderer.getBorderColor());
      view.setDisplayListDirty();
    }
    @Override public void mouseOut(    Pick pick){
      EmptyCellRenderer emptyCellRenderer=getEmptyCellRenderer(pick.getID());
      if (emptyCellRenderer == null)       return;
      emptyCellRenderer.setColor(EmptyCellRenderer.DEFAULT_COLOR);
      view.setDisplayListDirty();
    }
    @Override public void rightClicked(    Pick pick){
      Pair<CellContainer,CellContainer> rowAndColumn=null;
      for (      EmptyCellRenderer emptyCellRenderer : emptyCellRenderers.keySet()) {
        if (emptyCellRenderer.getID() == pick.getID()) {
          rowAndColumn=emptyCellRenderers.get(emptyCellRenderer);
          break;
        }
      }
      if (rowAndColumn != null) {
        String recordPerspectiveID=rowAndColumn.getFirst().id;
        CellContainer column=rowAndColumn.getSecond();
        String dimensionPerspectiveID=column.id;
        Group group=null;
        DimensionVirtualArray dimensionVA=null;
        boolean createDimensionPerspective=false;
        if (!dataDomain.getTable().containsDimensionPerspective(dimensionPerspectiveID)) {
          DimensionPerspective perspective=dataDomain.getTable().getDimensionPerspective(column.parentContainer.id);
          int groupIndex=column.parentContainer.childContainers.indexOf(column);
          dimensionVA=perspective.getVirtualArray();
          DimensionGroupList groupList=dimensionVA.getGroupList();
          group=groupList.get(groupIndex);
          createDimensionPerspective=true;
        }
        view.getContextMenuCreator().addContextMenuItem(new AddDataContainerItem(dataDomain,recordPerspectiveID,dimensionPerspectiveID,createDimensionPerspective,dimensionVA,group));
      }
    }
    private EmptyCellRenderer getEmptyCellRenderer(    int id){
      for (      EmptyCellRenderer emptyCellRenderer : emptyCellRenderers.keySet()) {
        if (emptyCellRenderer.getID() == id) {
          return emptyCellRenderer;
        }
      }
      return null;
    }
  }
,EMPTY_CELL_PICKING_TYPE + node.getID());
}