Program: 69544
Project: 69544
Buggy source:
/** 
 * Gets the IPageGenerator class corresponding to the given DE type.
 * @param type The DE element type
 * @return The class of the IPageGenerator
 */
private Class getGeneratorClass(Object obj){
  Class type=obj.getClass();
  if (type == TableHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return ListPageGenerator.class;
  }
  if (type == ImageHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return TextPageGenerator.class;
  }
  if (type == TextItemHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return TextPageGenerator.class;
  }
  if (type == TextDataHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return TextPageGenerator.class;
  }
  if (type == ColumnHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return ColumnPageGenerator.class;
  }
  if (type == RowHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return ColumnPageGenerator.class;
  }
  if (type == GridHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return GridPageGenerator.class;
  }
  if (type == DataItemHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return DataPageGenerator.class;
  }
  if (type == CellHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return ColumnPageGenerator.class;
  }
  if (type == ListHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return ListPageGenerator.class;
  }
  if (type == TabularCubeHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return ListPageGenerator.class;
  }
  if (type == ModelClassWrapper.class) {
    getGeneratorClass(((ModelClassWrapper)obj).getElement());
    return MessagePageGenerator.class;
  }
  if (type == LabelHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return LabelPageGenerator.class;
  }
 else   if (type == SimpleMasterPageHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == DataSourceHandle.class || type == OdaDataSourceHandle.class || type == ScriptDataSourceHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == DataSetHandle.class || type == OdaDataSetHandle.class || type == JointDataSetHandle.class || type == ScriptDataSetHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == ScalarParameterHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == TemplateReportItemHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == ReportDesignHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == LibraryHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == AutoTextHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == ParameterGroupHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == CascadingParameterGroupHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else {
    typeInfo=Messages.getString("String_Node_Str");
    return TabPageGenerator.class;
  }
  return CategoryPageGenerator.class;
}

Fixed version (ground truth):
/** 
 * Gets the IPageGenerator class corresponding to the given DE type.
 * @param type The DE element type
 * @return The class of the IPageGenerator
 */
private Class getGeneratorClass(Object obj){
  Class type=obj.getClass();
  if (type == TableHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return ListPageGenerator.class;
  }
  if (type == ImageHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return TextPageGenerator.class;
  }
  if (type == TextItemHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return TextPageGenerator.class;
  }
  if (type == TextDataHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return TextPageGenerator.class;
  }
  if (type == ColumnHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return ColumnPageGenerator.class;
  }
  if (type == RowHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return ColumnPageGenerator.class;
  }
  if (type == GridHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return GridPageGenerator.class;
  }
  if (type == DataItemHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return DataPageGenerator.class;
  }
  if (type == CellHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return ColumnPageGenerator.class;
  }
  if (type == ListHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return ListPageGenerator.class;
  }
  if (type == TabularCubeHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return ListPageGenerator.class;
  }
  if (type == ModelClassWrapper.class) {
    getGeneratorClass(((ModelClassWrapper)obj).getElement());
    return MessagePageGenerator.class;
  }
  if (type == LabelHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
    return LabelPageGenerator.class;
  }
 else   if (type == SimpleMasterPageHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (DataSourceHandle.class.isAssignableFrom(type)) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (DataSetHandle.class.isAssignableFrom(type)) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == ScalarParameterHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == TemplateReportItemHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == ReportDesignHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == LibraryHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == AutoTextHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == ParameterGroupHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else   if (type == CascadingParameterGroupHandle.class) {
    typeInfo=Messages.getString("String_Node_Str");
  }
 else {
    typeInfo=Messages.getString("String_Node_Str");
    return TabPageGenerator.class;
  }
  return CategoryPageGenerator.class;
}