Buggy code:
public class StatDialogController { private Application app ; private Kernel kernel ; private Construction cons ; private MyTable spreadsheetTable ; private SpreadsheetView spView ; private StatDialog sd ; private StatGeo statGeo ; private Object dataSource ; private ArrayList < GeoElement > dataArray ; public ArrayList < GeoElement > getDataArray ( ) { } private GeoList dataSelected ; public GeoList getDataSelected ( ) { } private int mode ; private boolean leftToRight = true ; public void setLeftToRight ( boolean leftToRight ) { } private GeoElement geoRegression ; public GeoElement getRegressionModel ( ) { } public void setRegressionModel ( GeoFunction regressionModel ) { } public StatDialogController ( Application app , SpreadsheetView spView , StatDialog statDialog ) { } protected boolean setDataSource ( ) { } protected boolean isInDataSource ( GeoElement geo ) { } protected void loadDataLists ( ) { if ( ( dataSource ) == null ) return ; CellRangeProcessor crProcessor = spreadsheetTable . getCellRangeProcessor ( ) ; boolean scanByColumn = true ; boolean copyByValue = false ; boolean doStoreUndo = false ; boolean isSorted = false ; boolean doCreateFreePoints = false ; boolean setLabel = false ; if ( ( dataSelected ) != null ) dataSelected . remove ( ) ; if ( ( dataSource ) instanceof GeoList ) { } else { ArrayList < CellRange > cellRangeList = ( ( ArrayList < CellRange > ) ( dataSource ) ) ; switch ( mode ) { case StatDialog . MODE_ONEVAR : dataSelected = ( ( GeoList ) ( crProcessor . createList ( cellRangeList , scanByColumn , copyByValue , isSorted , doStoreUndo , NUMERIC , setLabel ) ) ) ; break ; case StatDialog . MODE_REGRESSION : if ( ( ( cellRangeList . size ( ) ) == 1 ) && ( cellRangeList . get ( 0 ) . isPointList ( ) ) ) { dataSelected = ( ( GeoList ) ( crProcessor . createList ( cellRangeList , scanByColumn , copyByValue , isSorted , doStoreUndo , POINT , setLabel ) ) ) ; } else { dataSelected = crProcessor . createPointGeoList ( cellRangeList , copyByValue , leftToRight , isSorted , doStoreUndo , doCreateFreePoints ) ; } break ; case StatDialog . MODE_MULTIVAR : cons . setSuppressLabelCreation ( true ) ; <START_BUG> dataSelected = crProcessor . createCollectionList ( ( ( ArrayList < CellRange > ) ( dataSource ) ) , true ) ; <END_BUG> cons . setSuppressLabelCreation ( false ) ; break ; } } if ( ( dataSelected ) != null ) { if ( ( dataArray ) == null ) dataArray = new ArrayList < GeoElement > ( ) ; dataArray . clear ( ) ; for ( int i = 0 ; i < ( dataSelected . size ( ) ) ; i ++ ) { dataArray . add ( i , dataSelected . get ( i ) ) ; } } if ( ( mode ) != ( StatDialog . MODE_MULTIVAR ) ) { sd . getDataPanel ( ) . loadDataTable ( dataArray ) ; } } public void updateSelectedDataList ( int index , boolean doAdd ) { } public String [ ] getDataTitles ( ) { } public void swapXY ( ) { } public void updateDialog ( boolean doSetDataSource ) { } public void updateAllStatPanels ( boolean doCreateGeo ) { } protected void handleRemovedDataGeo ( GeoElement geo ) { } public void setRegressionGeo ( ) { } public void removeRegressionGeo ( ) { } public void removeDataListSelected ( ) { } public void removeStatGeos ( ) { } private static void removeStatGeo ( GeoElement statGeo ) { } public SummaryStatistics getSummaryStatistics ( GeoList dataList ) { } public double [ ] getValueArray ( GeoList dataList ) { } }

Fix:
dataSelected = crProcessor . createCollectionList ( ( ( ArrayList < CellRange > ) ( dataSource ) ) , true , false ) ;