Program: 67170
Project: 67170
Buggy source:
/** 
 * Create filter provider by specified input.
 * @param input
 * @param providerInput
 * @return the created filter provider
 * @since 2.3
 */
public static AbstractFilterHandleProvider createFilterProvider(Object input,Object providerInput){
  AbstractFilterHandleProvider currentProvider=null;
  Object handle=null;
  if (input instanceof List<?>) {
    handle=((List<?>)input).get(0);
  }
 else {
    handle=input;
  }
  AbstractFilterHandleProvider baseProvider=getAdapter(new ChartPageGenerator(),AbstractFilterHandleProvider.class);
  if (baseProvider == null) {
    baseProvider=new FilterHandleProvider();
  }
  if (handle instanceof ReportItemHandle && ChartCubeUtil.getBindingCube((DesignElementHandle)handle) != null) {
    if (((ReportItemHandle)handle).getCube() != null && (ChartItemUtil.isChildOfMultiViewsHandle((DesignElementHandle)handle) || ((ReportItemHandle)handle).getDataBindingReference() != null)) {
      ReportItemHandle ref=ChartReportItemUtil.getReportItemReference((ReportItemHandle)handle);
      try {
        ChartFilterFactory cff=ChartReportItemUIUtil.createChartFilterFactory(handle);
        if (cff.isChartHandle(ref)) {
          currentProvider=new ChartShareCubeFiltersHandleProvider(new FilterHandleProvider());
        }
 else {
          currentProvider=new ChartShareCrosstabFiltersHandleProvider();
        }
      }
 catch (      ExtendedElementException e) {
        ChartWizard.displayException(e);
        currentProvider=new ChartCubeFilterHandleProvider(new FilterHandleProvider());
      }
    }
 else {
      currentProvider=new ChartCubeFilterHandleProvider(new FilterHandleProvider());
    }
  }
 else {
    if (ChartItemUtil.isChildOfMultiViewsHandle((DesignElementHandle)handle)) {
      currentProvider=new ChartShareFiltersHandleProvider(baseProvider);
    }
 else {
      currentProvider=new ChartFilterHandleProvider(baseProvider);
    }
  }
  if (input != null) {
    currentProvider.setInput(input);
  }
  return currentProvider;
}

Fixed version (ground truth):
/** 
 * Create filter provider by specified input.
 * @param input
 * @param providerInput
 * @return the created filter provider
 * @since 2.3
 */
public static AbstractFilterHandleProvider createFilterProvider(Object input,Object providerInput){
  AbstractFilterHandleProvider currentProvider=null;
  Object handle=null;
  if (input instanceof List<?>) {
    handle=((List<?>)input).get(0);
  }
 else {
    handle=input;
  }
  AbstractFilterHandleProvider baseProvider=getAdapter(new ChartPageGenerator(),AbstractFilterHandleProvider.class);
  if (baseProvider == null) {
    baseProvider=new FilterHandleProvider();
  }
  if (handle instanceof ReportItemHandle && ChartCubeUtil.getBindingCube((DesignElementHandle)handle) != null) {
    if (((ReportItemHandle)handle).getCube() != null && (ChartItemUtil.isChildOfMultiViewsHandle((DesignElementHandle)handle) || ((ReportItemHandle)handle).getDataBindingReference() != null)) {
      ReportItemHandle ref=ChartReportItemUtil.getReportItemReference((ReportItemHandle)handle);
      if (ref != null && ICrosstabConstants.CROSSTAB_EXTENSION_NAME.equals(((ExtendedItemHandle)ref).getExtensionName())) {
        currentProvider=new ChartShareCrosstabFiltersHandleProvider();
      }
 else {
        currentProvider=new ChartShareCubeFiltersHandleProvider(new FilterHandleProvider());
      }
    }
 else {
      currentProvider=new ChartCubeFilterHandleProvider(new FilterHandleProvider());
    }
  }
 else {
    if (ChartItemUtil.isChildOfMultiViewsHandle((DesignElementHandle)handle)) {
      currentProvider=new ChartShareFiltersHandleProvider(baseProvider);
    }
 else {
      currentProvider=new ChartFilterHandleProvider(baseProvider);
    }
  }
  if (input != null) {
    currentProvider.setInput(input);
  }
  return currentProvider;
}