Program: 65893
Project: 65893
Buggy source:
/** 
 * This method is called upon plug-in activation
 */
public void start(BundleContext context) throws Exception {
  super.start(context);
  PreferenceFactory.getInstance().getPreferences(CrosstabPlugin.getDefault()).setDefault(PREFERENCE_FILTER_LIMIT,FILTER_LIMIT_DEFAULT);
  PreferenceFactory.getInstance().getPreferences(CrosstabPlugin.getDefault()).setDefault(PREFERENCE_AUTO_DEL_BINDINGS,AUTO_DEL_BINDING_DEFAULT);
  PreferenceFactory.getInstance().getPreferences(CrosstabPlugin.getDefault()).setDefault(CUBE_BUILDER_WARNING_PREFERENCE,MessageDialogWithToggle.PROMPT);
  CrosstabModelUtil.setCrosstabModelListener(new ICrosstabModelListener(){
    public void onCreated(    int type,    Object model){
      if (type == ICrosstabModelListener.MEASURE_HEADER && model instanceof CrosstabCellHandle) {
        CrosstabCellHandle cellHandle=((CrosstabCellHandle)model);
        if (cellHandle.getContents().size() > 0) {
          return;
        }
        LabelHandle labelHandle=DesignElementFactory.getInstance(cellHandle.getModuleHandle()).newLabel(null);
        try {
          labelHandle.setText(((MeasureViewHandle)cellHandle.getContainer()).getCubeMeasureName());
          cellHandle.addContent(labelHandle);
        }
 catch (        SemanticException e) {
          ExceptionUtil.handle(e);
        }
      }
    }
    public void onValidate(    int type,    Object model){
      if (type == ICrosstabModelListener.MEASURE_DETAIL && model instanceof AggregationCellHandle) {
        AggregationCellHandle cellHandle=(AggregationCellHandle)model;
        if (cellHandle.getContents().size() == 1 && cellHandle.getContents().get(0) instanceof DataItemHandle) {
          MeasureViewHandle measureView=(MeasureViewHandle)cellHandle.getContainer();
          DataItemHandle dataItem=(DataItemHandle)cellHandle.getContents().get(0);
          CrosstabAdaptUtil.formatDataItem(measureView.getCubeMeasure(),dataItem);
          ActionHandle actionHandle=measureView.getCubeMeasure().getActionHandle();
          if (actionHandle != null) {
            try {
              dataItem.setAction((Action)actionHandle.getStructure().copy());
            }
 catch (            SemanticException e) {
              ExceptionUtil.handle(e);
            }
          }
        }
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * This method is called upon plug-in activation
 */
public void start(BundleContext context) throws Exception {
  super.start(context);
  PreferenceFactory.getInstance().getPreferences(CrosstabPlugin.getDefault()).setDefault(PREFERENCE_FILTER_LIMIT,FILTER_LIMIT_DEFAULT);
  PreferenceFactory.getInstance().getPreferences(CrosstabPlugin.getDefault()).setDefault(PREFERENCE_AUTO_DEL_BINDINGS,AUTO_DEL_BINDING_DEFAULT);
  PreferenceFactory.getInstance().getPreferences(CrosstabPlugin.getDefault()).setDefault(CUBE_BUILDER_WARNING_PREFERENCE,MessageDialogWithToggle.PROMPT);
  CrosstabModelUtil.setCrosstabModelListener(new ICrosstabModelListener(){
    public void onCreated(    int type,    Object model){
      if (type == ICrosstabModelListener.MEASURE_HEADER && model instanceof CrosstabCellHandle) {
        CrosstabCellHandle cellHandle=((CrosstabCellHandle)model);
        if (cellHandle.getContents().size() > 0) {
          return;
        }
        LabelHandle labelHandle=DesignElementFactory.getInstance(cellHandle.getModuleHandle()).newLabel(null);
        try {
          labelHandle.setText(((MeasureViewHandle)cellHandle.getContainer()).getCubeMeasureName());
          cellHandle.addContent(labelHandle);
        }
 catch (        SemanticException e) {
          ExceptionUtil.handle(e);
        }
      }
    }
    public void onValidate(    int type,    Object model){
      if (type == ICrosstabModelListener.MEASURE_DETAIL && model instanceof AggregationCellHandle) {
        AggregationCellHandle cellHandle=(AggregationCellHandle)model;
        if (cellHandle.getContents().size() == 1 && cellHandle.getContents().get(0) instanceof DataItemHandle) {
          MeasureViewHandle measureView=(MeasureViewHandle)cellHandle.getContainer();
          DataItemHandle dataItem=(DataItemHandle)cellHandle.getContents().get(0);
          CrosstabAdaptUtil.formatDataItem(measureView.getCubeMeasure(),dataItem);
          if (measureView.getCubeMeasure() == null) {
            return;
          }
          ActionHandle actionHandle=measureView.getCubeMeasure().getActionHandle();
          if (actionHandle != null) {
            try {
              dataItem.setAction((Action)actionHandle.getStructure().copy());
            }
 catch (            SemanticException e) {
              ExceptionUtil.handle(e);
            }
          }
        }
      }
    }
  }
);
}