Program: 136493
Project: 136493
Buggy source:
@Override protected void render(){
  if (treeViewer != null) {
    treeViewer.setElements(modelElementIndicators.toArray(new ModelElementIndicator[modelElementIndicators.size()]),false);
  }
  if (previewChartList == null || uiPagination.getChartComposite() == null) {
    return;
  }
  previewChartList.clear();
  clearDynamicList();
  if (EditorPreferencePage.isHideGraphicsSectionForSettingsPage() || !TOPChartUtils.getInstance().isTOPChartInstalled()) {
    return;
  }
  for (  final ModelElementIndicator modelElementIndicator : modelElementIndicators) {
    final ExpandableComposite exComp=uiPagination.getToolkit().createExpandableComposite(uiPagination.getChartComposite(),ExpandableComposite.TREE_NODE | ExpandableComposite.CLIENT_INDENT);
    needDispostWidgets.add(exComp);
    exComp.setText(DefaultMessagesImpl.getString("String_Node_Str",modelElementIndicator.getElementName()));
    exComp.setLayout(new GridLayout());
    exComp.setData(modelElementIndicator);
    previewChartList.add(exComp);
    Composite comp=uiPagination.getToolkit().createComposite(exComp);
    comp.setLayout(new GridLayout());
    comp.setLayoutData(new GridData(GridData.FILL_BOTH));
    Map<EIndicatorChartType,List<IndicatorUnit>> indicatorComposite=CompositeIndicator.getInstance().getIndicatorComposite(modelElementIndicator);
    for (    EIndicatorChartType chartType : indicatorComposite.keySet()) {
      List<IndicatorUnit> units=indicatorComposite.get(chartType);
      if (!units.isEmpty()) {
        if (chartType == EIndicatorChartType.UDI_FREQUENCY) {
          for (          IndicatorUnit unit : units) {
            List<IndicatorUnit> specialUnit=new ArrayList<IndicatorUnit>();
            specialUnit.add(unit);
            createChart(comp,chartType,specialUnit);
          }
        }
 else {
          createChart(comp,chartType,units);
        }
      }
    }
    exComp.addExpansionListener(new ExpansionAdapter(){
      @Override public void expansionStateChanged(      ExpansionEvent e){
        uiPagination.getChartComposite().layout();
        form.reflow(true);
        if (e.getState()) {
          exComp.setExpanded(e.getState());
          exComp.getParent().pack();
        }
      }
    }
);
    exComp.setExpanded(true);
    exComp.setClient(comp);
    uiPagination.getChartComposite().layout();
  }
}

Fixed version (ground truth):
@Override protected void render(){
  if (treeViewer != null) {
    treeViewer.setElements(modelElementIndicators.toArray(new ModelElementIndicator[modelElementIndicators.size()]),false);
  }
  if (previewChartList == null || uiPagination.getChartComposite() == null) {
    return;
  }
  previewChartList.clear();
  clearDynamicList();
  if (EditorPreferencePage.isHideGraphicsSectionForSettingsPage() || !TOPChartUtils.getInstance().isTOPChartInstalled()) {
    return;
  }
  for (  ModelElementIndicator modelElementIndicator : modelElementIndicators) {
    final ExpandableComposite exComp=uiPagination.getToolkit().createExpandableComposite(uiPagination.getChartComposite(),ExpandableComposite.TREE_NODE | ExpandableComposite.CLIENT_INDENT);
    needDispostWidgets.add(exComp);
    exComp.setText(DefaultMessagesImpl.getString("String_Node_Str",modelElementIndicator.getElementName()));
    exComp.setLayout(new GridLayout());
    exComp.setData(modelElementIndicator);
    previewChartList.add(exComp);
    Composite comp=uiPagination.getToolkit().createComposite(exComp);
    comp.setLayout(new GridLayout());
    comp.setLayoutData(new GridData(GridData.FILL_BOTH));
    Map<EIndicatorChartType,List<IndicatorUnit>> indicatorComposite=CompositeIndicator.getInstance().getIndicatorComposite(modelElementIndicator);
    for (    EIndicatorChartType chartType : indicatorComposite.keySet()) {
      List<IndicatorUnit> units=indicatorComposite.get(chartType);
      if (!units.isEmpty()) {
        if (chartType == EIndicatorChartType.UDI_FREQUENCY) {
          for (          IndicatorUnit unit : units) {
            List<IndicatorUnit> specialUnit=new ArrayList<IndicatorUnit>();
            specialUnit.add(unit);
            createChart(comp,chartType,specialUnit);
          }
        }
 else {
          createChart(comp,chartType,units);
        }
      }
    }
    exComp.addExpansionListener(new ExpansionAdapter(){
      @Override public void expansionStateChanged(      ExpansionEvent e){
        uiPagination.getChartComposite().layout();
        form.reflow(true);
        if (e.getState()) {
          exComp.setExpanded(e.getState());
          exComp.getParent().pack();
        }
      }
    }
);
    exComp.setExpanded(true);
    exComp.setClient(comp);
    uiPagination.getChartComposite().layout();
  }
}