Program: 136934
Project: 136934
Buggy source:
/** 
 * DOC talend Comment method "initTableViewerForMapDB".
 * @param parent
 * @param table
 * @param ddEditorInput
 */
@SuppressWarnings("String_Node_Str") private void initTableViewerForMapDB(final Composite parent,final Table table,DrillDownEditorInput ddEditorInput){
  table.setLinesVisible(true);
  table.setHeaderVisible(true);
  tableView.setLabelProvider(new DrillDownResultLabelProvider());
  tableView.setContentProvider(new DrillDownResultContentProvider());
  final PageableController controller=new PageableController(MapDBPageConstant.NUMBER_PER_PAGE);
  table.setData(ddEditorInput.getDataSetForMapDB(controller.getPageSize()));
  Analysis analysis=ddEditorInput.getAnalysis();
  AnalysisType analysisType=analysis.getParameters().getAnalysisType();
  IPageLoader<PageResult<Object[]>> pageLoader=null;
  AbstractDB<Object> mapDB=ddEditorInput.getMapDB();
  Indicator generateMapDBIndicator=ddEditorInput.getGenerateMapDBIndicator();
  MapDBManager.getInstance().addDBRef(generateMapDBIndicator.getMapDBFile());
  Long itemsSize=ddEditorInput.getItemSize(mapDB);
  if (AnalysisType.COLUMN_SET == analysisType) {
    pageLoader=new MapDBPageLoader<Object>(mapDB,ddEditorInput.getCurrIndicator(),itemsSize);
  }
 else {
    ColumnFilter filter=ddEditorInput.getColumnFilter();
    pageLoader=new MapDBPageLoader<Object>(mapDB,null,itemsSize,filter);
  }
  controller.addPageChangedListener(PageLoaderStrategyHelper.createLoadPageAndReplaceItemsListener(controller,tableView,pageLoader,PageResultContentProvider.getInstance(),null));
  controller.addPageChangedListener(new PageChangedAdapter(){
    @Override public void pageIndexChanged(    int oldPageIndex,    int newPageIndex,    PageableController controller){
      Object data=table.getData();
      if (data != null && SqlExplorerUtils.getDefault().isInstanceofTalendDataSet(data)) {
        long totalSize=controller.getTotalElements();
        long pageSize=controller.getPageSize();
        long pageIndex=controller.getPageOffset();
        long fromIndex=pageIndex;
        long toIndex=pageIndex + pageSize;
        if (toIndex > totalSize) {
          toIndex=totalSize;
        }
        SqlExplorerUtils.getDefault().resetTalendDataSetIndex(data,fromIndex,toIndex);
        parent.layout();
      }
    }
  }
);
  ResultAndNavigationPageGraphicsRenderer resultAndNavigationPageGraphicsRenderer=new ResultAndNavigationPageGraphicsRenderer(parent,SWT.NONE,controller);
  resultAndNavigationPageGraphicsRenderer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  createColumns(tableView,controller,((DrillDownEditorInput)this.getEditorInput()));
  controller.setCurrentPage(0);
}

Fixed version (ground truth):
/** 
 * DOC talend Comment method "initTableViewerForMapDB".
 * @param parent
 * @param table
 * @param ddEditorInput
 */
@SuppressWarnings("String_Node_Str") private void initTableViewerForMapDB(final Composite parent,final Table table,DrillDownEditorInput ddEditorInput){
  table.setLinesVisible(true);
  table.setHeaderVisible(true);
  tableView.setLabelProvider(new DrillDownResultLabelProvider());
  tableView.setContentProvider(new DrillDownResultContentProvider());
  final PageableController controller=new PageableController(MapDBPageConstant.NUMBER_PER_PAGE);
  table.setData(ddEditorInput.getDataSetForMapDB(controller.getPageSize()));
  Analysis analysis=ddEditorInput.getAnalysis();
  AnalysisType analysisType=analysis.getParameters().getAnalysisType();
  IPageLoader<PageResult<Object[]>> pageLoader=null;
  AbstractDB<Object> mapDB=ddEditorInput.getMapDB();
  Indicator generateMapDBIndicator=ddEditorInput.getGenerateMapDBIndicator();
  MapDBManager.getInstance().addDBRef(MapDBUtils.getMapDBFile(generateMapDBIndicator));
  Long itemsSize=ddEditorInput.getItemSize(mapDB);
  if (AnalysisType.COLUMN_SET == analysisType) {
    pageLoader=new MapDBPageLoader<Object>(mapDB,IDataValidationFactory.INSTANCE.createValidation(ddEditorInput.getCurrIndicator()),itemsSize);
  }
 else {
    ColumnFilter filter=ddEditorInput.getColumnFilter();
    pageLoader=new MapDBPageLoader<Object>(mapDB,null,itemsSize,filter);
  }
  controller.addPageChangedListener(PageLoaderStrategyHelper.createLoadPageAndReplaceItemsListener(controller,tableView,pageLoader,PageResultContentProvider.getInstance(),null));
  controller.addPageChangedListener(new PageChangedAdapter(){
    @Override public void pageIndexChanged(    int oldPageIndex,    int newPageIndex,    PageableController controller){
      Object data=table.getData();
      if (data != null && SqlExplorerUtils.getDefault().isInstanceofTalendDataSet(data)) {
        long totalSize=controller.getTotalElements();
        long pageSize=controller.getPageSize();
        long pageIndex=controller.getPageOffset();
        long fromIndex=pageIndex;
        long toIndex=pageIndex + pageSize;
        if (toIndex > totalSize) {
          toIndex=totalSize;
        }
        SqlExplorerUtils.getDefault().resetTalendDataSetIndex(data,fromIndex,toIndex);
        parent.layout();
      }
    }
  }
);
  ResultAndNavigationPageGraphicsRenderer resultAndNavigationPageGraphicsRenderer=new ResultAndNavigationPageGraphicsRenderer(parent,SWT.NONE,controller);
  resultAndNavigationPageGraphicsRenderer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  createColumns(tableView,controller,((DrillDownEditorInput)this.getEditorInput()));
  controller.setCurrentPage(0);
}