Program: 66345
Project: 66345
Buggy source:
/** 
 * Returns the categories list in BIRT chart expression builder
 * @param builderCommand
 * @return category style
 */
public static int getExpressionBuilderStyle(int builderCommand){
  if (builderCommand == IUIServiceProvider.COMMAND_EXPRESSION_DATA_BINDINGS) {
    return ChartExpressionProvider.CATEGORY_WITH_BIRT_VARIABLES | ChartExpressionProvider.CATEGORY_WITH_COLUMN_BINDINGS | ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_EXPRESSION_CHART_DATAPOINTS) {
    return ChartExpressionProvider.CATEGORY_WITH_DATA_POINTS;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_EXPRESSION_SCRIPT_DATAPOINTS) {
    return ChartExpressionProvider.CATEGORY_WITH_DATA_POINTS | ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS | ChartExpressionProvider.CATEGORY_WITH_JAVASCRIPT;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_EXPRESSION_TRIGGERS_SIMPLE) {
    return ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS | ChartExpressionProvider.CATEGORY_WITH_JAVASCRIPT;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_EXPRESSION_TOOLTIPS_DATAPOINTS) {
    return ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS | ChartExpressionProvider.CATEGORY_WITH_COLUMN_BINDINGS | ChartExpressionProvider.CATEGORY_WITH_DATA_POINTS;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_CUBE_EXPRESSION_TOOLTIPS_DATAPOINTS) {
    return ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS | ChartExpressionProvider.CATEGORY_WITH_DATA_POINTS;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_HYPERLINK) {
    return ChartExpressionProvider.CATEGORY_WITH_BIRT_VARIABLES | ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_HYPERLINK_DATAPOINTS) {
    return ChartExpressionProvider.CATEGORY_WITH_BIRT_VARIABLES | ChartExpressionProvider.CATEGORY_WITH_COLUMN_BINDINGS | ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS| ChartExpressionProvider.CATEGORY_WITH_DATA_POINTS;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_HYPERLINK_LEGEND) {
    return ChartExpressionProvider.CATEGORY_WITH_LEGEND_ITEMS | ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS | ChartExpressionProvider.CATEGORY_WITH_JAVASCRIPT| ChartExpressionProvider.CATEGORY_WITH_BIRT_VARIABLES;
  }
  return ChartExpressionProvider.CATEGORY_BASE;
}

Fixed version (ground truth):
/** 
 * Returns the categories list in BIRT chart expression builder
 * @param builderCommand
 * @return category style
 */
public static int getExpressionBuilderStyle(int builderCommand){
  if (builderCommand == IUIServiceProvider.COMMAND_EXPRESSION_DATA_BINDINGS) {
    return ChartExpressionProvider.CATEGORY_WITH_BIRT_VARIABLES | ChartExpressionProvider.CATEGORY_WITH_COLUMN_BINDINGS | ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_EXPRESSION_CHART_DATAPOINTS) {
    return ChartExpressionProvider.CATEGORY_WITH_DATA_POINTS;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_EXPRESSION_SCRIPT_DATAPOINTS) {
    return ChartExpressionProvider.CATEGORY_WITH_DATA_POINTS | ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS | ChartExpressionProvider.CATEGORY_WITH_JAVASCRIPT;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_EXPRESSION_TRIGGERS_SIMPLE) {
    return ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS | ChartExpressionProvider.CATEGORY_WITH_JAVASCRIPT;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_EXPRESSION_TOOLTIPS_DATAPOINTS) {
    return ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS | ChartExpressionProvider.CATEGORY_WITH_COLUMN_BINDINGS | ChartExpressionProvider.CATEGORY_WITH_DATA_POINTS;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_CUBE_EXPRESSION_TOOLTIPS_DATAPOINTS) {
    return ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS | ChartExpressionProvider.CATEGORY_WITH_DATA_POINTS;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_HYPERLINK) {
    return ChartExpressionProvider.CATEGORY_WITH_BIRT_VARIABLES | ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_HYPERLINK_DATAPOINTS) {
    return ChartExpressionProvider.CATEGORY_WITH_BIRT_VARIABLES | ChartExpressionProvider.CATEGORY_WITH_COLUMN_BINDINGS | ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS| ChartExpressionProvider.CATEGORY_WITH_DATA_POINTS;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_HYPERLINK_DATAPOINTS_SIMPLE) {
    return ChartExpressionProvider.CATEGORY_WITH_BIRT_VARIABLES | ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS | ChartExpressionProvider.CATEGORY_WITH_DATA_POINTS;
  }
 else   if (builderCommand == IUIServiceProvider.COMMAND_HYPERLINK_LEGEND) {
    return ChartExpressionProvider.CATEGORY_WITH_LEGEND_ITEMS | ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS | ChartExpressionProvider.CATEGORY_WITH_JAVASCRIPT| ChartExpressionProvider.CATEGORY_WITH_BIRT_VARIABLES;
  }
  return ChartExpressionProvider.CATEGORY_BASE;
}