Program: 136490
Project: 136490
Buggy source:
@Override protected void createResultSection(Composite parent){
  resultSection=createSection(form,parent,DefaultMessagesImpl.getString("String_Node_Str"),null);
  Composite collapseExpandComposite=toolkit.createComposite(resultSection);
  GridLayout gdLayout=new GridLayout();
  gdLayout.numColumns=2;
  collapseExpandComposite.setLayout(gdLayout);
  createCollapseAllLink(collapseExpandComposite);
  createExpandAllLink(collapseExpandComposite);
  resultSection.setTextClient(collapseExpandComposite);
  chartTableComposite=toolkit.createComposite(resultSection);
  chartTableComposite.setLayout(new GridLayout());
  chartTableComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
  final ModelElementIndicator[] modelElementIndicatores=masterPage.getCurrentModelElementIndicators();
  uiPagination=new UIPagination(toolkit,chartTableComposite);
  int pageSize=IndicatorPaginationInfo.getPageSize();
  int totalPages=modelElementIndicatores.length / pageSize;
  List<ModelElementIndicator> modelElementIndLs=null;
  for (int index=0; index < totalPages; index++) {
    modelElementIndLs=new ArrayList<ModelElementIndicator>();
    for (int idx=0; idx < pageSize; idx++) {
      modelElementIndLs.add(modelElementIndicatores[index * pageSize + idx]);
    }
    IndicatorPaginationInfo pginfo=new ResultPaginationInfo(form,modelElementIndLs,masterPage,uiPagination);
    uiPagination.addPage(pginfo);
  }
  int left=modelElementIndicatores.length % pageSize;
  if (left != 0) {
    modelElementIndLs=new ArrayList<ModelElementIndicator>();
    for (int leftIdx=0; leftIdx < left; leftIdx++) {
      modelElementIndLs.add(modelElementIndicatores[totalPages * pageSize + leftIdx]);
    }
    IndicatorPaginationInfo pginfo=new ResultPaginationInfo(form,modelElementIndLs,masterPage,uiPagination);
    uiPagination.addPage(pginfo);
  }
  chartComposite=toolkit.createComposite(chartTableComposite);
  chartComposite.setLayout(new GridLayout());
  chartComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
  resultSection.setClient(chartTableComposite);
  uiPagination.setChartComposite(chartComposite);
  uiPagination.init();
  chartComposite.layout();
  chartComposite.pack();
}

Fixed version (ground truth):
@Override protected void createResultSection(Composite parent){
  resultSection=createSection(form,parent,DefaultMessagesImpl.getString("String_Node_Str"),null);
  Composite collapseExpandComposite=toolkit.createComposite(resultSection);
  GridLayout gdLayout=new GridLayout();
  gdLayout.numColumns=2;
  collapseExpandComposite.setLayout(gdLayout);
  createCollapseAllLink(collapseExpandComposite);
  createExpandAllLink(collapseExpandComposite);
  resultSection.setTextClient(collapseExpandComposite);
  Composite chartTableComposite=toolkit.createComposite(resultSection);
  chartTableComposite.setLayout(new GridLayout());
  chartTableComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
  final ModelElementIndicator[] modelElementIndicatores=masterPage.getCurrentModelElementIndicators();
  uiPagination=new UIPagination(toolkit,chartTableComposite);
  int pageSize=IndicatorPaginationInfo.getPageSize();
  int totalPages=modelElementIndicatores.length / pageSize;
  List<ModelElementIndicator> modelElementIndLs=null;
  for (int index=0; index < totalPages; index++) {
    modelElementIndLs=new ArrayList<ModelElementIndicator>();
    for (int idx=0; idx < pageSize; idx++) {
      modelElementIndLs.add(modelElementIndicatores[index * pageSize + idx]);
    }
    IndicatorPaginationInfo pginfo=new ResultPaginationInfo(form,modelElementIndLs,masterPage,uiPagination);
    uiPagination.addPage(pginfo);
  }
  int left=modelElementIndicatores.length % pageSize;
  if (left != 0) {
    modelElementIndLs=new ArrayList<ModelElementIndicator>();
    for (int leftIdx=0; leftIdx < left; leftIdx++) {
      modelElementIndLs.add(modelElementIndicatores[totalPages * pageSize + leftIdx]);
    }
    IndicatorPaginationInfo pginfo=new ResultPaginationInfo(form,modelElementIndLs,masterPage,uiPagination);
    uiPagination.addPage(pginfo);
  }
  chartComposite=toolkit.createComposite(chartTableComposite);
  chartComposite.setLayout(new GridLayout());
  chartComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
  resultSection.setClient(chartTableComposite);
  uiPagination.setChartComposite(chartComposite);
  uiPagination.init();
  chartComposite.layout();
  chartComposite.pack();
}