Buggy code:
private static GroupHandle addGroupHandle ( TableHandle tableHandle , ResultSetColumnHandle model , DataItemHandle dataHandle , int index ) throws SemanticException { } protected static DesignElementHandle performInsertDataSetColumn ( ResultSetColumnHandle model , Object target , Object targetParent ) throws SemanticException { DataItemHandle dataHandle = DesignElementFactory . getInstance ( ) . newDataItem ( null ) ; DataSetHandle dataSet = InsertInLayoutUtil . getDataSet ( model ) ; if ( targetParent instanceof TableHandle ) { TableHandle tableHandle = ( ( TableHandle ) ( targetParent ) ) ; if ( tableHandle . isSummaryTable ( ) ) { InsertInLayoutUtil . setDataSet ( tableHandle , dataSet ) ; InsertInLayoutUtil . setDataItemAction ( model , dataHandle ) ; if ( ANALYSIS_TYPE_DIMENSION . equals ( UIUtil . getColumnAnalysis ( model ) ) ) { ComputedColumn bindingColumn = StructureFactory . newComputedColumn ( tableHandle , model . getColumnName ( ) ) ; bindingColumn . setDataType ( model . getDataType ( ) ) ; ExpressionUtility . setBindingColumnExpression ( model , bindingColumn ) ; bindingColumn . setDisplayName ( UIUtil . getColumnDisplayName ( model ) ) ; String displayKey = UIUtil . getColumnDisplayNameKey ( model ) ; if ( displayKey != null ) bindingColumn . setDisplayNameID ( displayKey ) ; tableHandle . addColumnBinding ( bindingColumn , false ) ; dataHandle . setResultSetColumn ( model . getColumnName ( ) ) ; SlotHandle slotHandle = tableHandle . getGroups ( ) ; for ( Object o : slotHandle . getContents ( ) ) { GroupHandle group = ( ( GroupHandle ) ( o ) ) ; if ( group . getName ( ) . equals ( model . getColumnName ( ) ) ) { if ( target instanceof CellHandle ) { CellHandle cellTarget = ( ( CellHandle ) ( target ) ) ; if ( ( cellTarget . getContent ( ) . getCount ( ) ) == 0 ) { return dataHandle ; } } return null ; } } int index = - 1 ; if ( target instanceof CellHandle ) { CellHandle cellTarget = ( ( CellHandle ) ( target ) ) ; CellHandleAdapter cellAdapter = HandleAdapterFactory . getInstance ( ) . getCellHandleAdapter ( cellTarget ) ; index = cellAdapter . getColumnNumber ( ) ; } return InsertInLayoutUtil . addGroupHandle ( tableHandle , model , dataHandle , ( index - 1 ) ) ; } else if ( ANALYSIS_TYPE_ATTRIBUTE . equals ( UIUtil . getColumnAnalysis ( model ) ) ) { DataSetHandle dataset = InsertInLayoutUtil . getDataSet ( model ) ; String str = UIUtil . getAnalysisColumn ( model ) ; String type = "" ; ResultSetColumnHandle newResultColumn = null ; if ( str != null ) { List < ColumnHintHandle > columnHints = DataUtil . getColumnHints ( dataset ) ; ColumnHintHandle temp = null ; for ( int i = 0 ; i < ( columnHints . size ( ) ) ; i ++ ) { ColumnHintHandle columnHintHandle = ( ( ColumnHintHandle ) ( columnHints . get ( i ) ) ) ; if ( ( str . equals ( columnHintHandle . getColumnName ( ) ) ) || ( str . equals ( columnHintHandle . getAlias ( ) ) ) ) { temp = columnHintHandle ; break ; } } if ( temp == null ) { return dataHandle ; } List columnList = DataUtil . getColumnList ( dataset ) ; for ( int i = 0 ; i < ( columnList . size ( ) ) ; i ++ ) { ResultSetColumnHandle resultSetColumn = ( ( ResultSetColumnHandle ) ( columnList . get ( i ) ) ) ; if ( ( temp != null ) && ( ( temp . getAlias ( ) . equals ( resultSetColumn . getColumnName ( ) ) ) || ( temp . getColumnName ( ) . equals ( resultSetColumn . getColumnName ( ) ) ) ) ) { newResultColumn = resultSetColumn ; break ; } } <START_BUG> List < ColumnHintHandle > columnHints = DataUtil . getColumnHints ( dataset ) ; <END_BUG> for ( ColumnHintHandle columnHint : columnHints ) { if ( ( str . equals ( columnHint . getColumnName ( ) ) ) || ( str . equals ( columnHint . getAlias ( ) ) ) ) { type = columnHint . getAnalysis ( ) ; break ; } } if ( ANALYSIS_TYPE_DIMENSION . equals ( type ) ) { boolean hasGroup = false ; SlotHandle slotHandle = tableHandle . getGroups ( ) ; for ( Object o : slotHandle . getContents ( ) ) { GroupHandle group = ( ( GroupHandle ) ( o ) ) ; if ( ( group . getName ( ) . equals ( temp . getColumnName ( ) ) ) || ( group . getName ( ) . equals ( temp . getAlias ( ) ) ) ) hasGroup = true ; } if ( ! hasGroup ) { ComputedColumn bindingColumn = StructureFactory . newComputedColumn ( tableHandle , model . getColumnName ( ) ) ; bindingColumn . setDataType ( model . getDataType ( ) ) ; ExpressionUtility . setBindingColumnExpression ( model , bindingColumn ) ; bindingColumn . setDisplayName ( UIUtil . getColumnDisplayName ( model ) ) ; String displayKey = UIUtil . getColumnDisplayNameKey ( model ) ; if ( displayKey != null ) bindingColumn . setDisplayNameID ( displayKey ) ; tableHandle . addColumnBinding ( bindingColumn , false ) ; dataHandle . setResultSetColumn ( model . getColumnName ( ) ) ; bindingColumn = StructureFactory . newComputedColumn ( tableHandle , newResultColumn . getColumnName ( ) ) ; bindingColumn . setDataType ( newResultColumn . getDataType ( ) ) ; ExpressionUtility . setBindingColumnExpression ( newResultColumn , bindingColumn ) ; bindingColumn . setDisplayName ( UIUtil . getColumnDisplayName ( newResultColumn ) ) ; displayKey = UIUtil . getColumnDisplayNameKey ( newResultColumn ) ; if ( displayKey != null ) bindingColumn . setDisplayNameID ( displayKey ) ; tableHandle . addColumnBinding ( bindingColumn , false ) ; int index = - 1 ; if ( target instanceof CellHandle ) { CellHandle cellTarget = ( ( CellHandle ) ( target ) ) ;

Fix:
columnHints = DataUtil . getColumnHints ( dataset ) ;