Program: 138445
Project: 138445
Buggy source:
public void createPreviewCharts(final ScrolledForm form,final Composite composite,final boolean isCreate){
  List<Composite> previewChartList=new ArrayList<Composite>();
  if (ColumnsetPackage.eINSTANCE.getWeakCorrelationIndicator() == columnSetMultiIndicator.eClass()) {
    GraphBuilder gBuilder=new GraphBuilder();
    gBuilder.setTotalWeight(columnSetMultiIndicator.getCount());
    List<Object[]> listRows=columnSetMultiIndicator.getListRows();
    if (listRows != null) {
      JungGraphGenerator generator=new JungGraphGenerator(gBuilder,listRows);
      generator.generate(composite,false,true);
    }
  }
 else {
    List<MetadataColumn> numericOrDateList=new ArrayList<MetadataColumn>();
    if (ColumnsetPackage.eINSTANCE.getCountAvgNullIndicator() == columnSetMultiIndicator.eClass()) {
      numericOrDateList=columnSetMultiIndicator.getNumericColumns();
    }
    if (ColumnsetPackage.eINSTANCE.getMinMaxDateIndicator() == columnSetMultiIndicator.eClass()) {
      numericOrDateList=columnSetMultiIndicator.getDateColumns();
    }
    for (    MetadataColumn column : numericOrDateList) {
      final MetadataColumn tdColumn=(MetadataColumn)column;
      ExpandableComposite exComp=toolkit.createExpandableComposite(composite,ExpandableComposite.TREE_NODE | ExpandableComposite.CLIENT_INDENT);
      exComp.setText(DefaultMessagesImpl.getString("String_Node_Str",tdColumn.getName()));
      exComp.setLayout(new GridLayout());
      exComp.setData(columnSetMultiIndicator);
      previewChartList.add(exComp);
      final Composite comp=toolkit.createComposite(exComp);
      comp.setLayout(new GridLayout());
      comp.setLayoutData(new GridData(GridData.FILL_BOTH));
      if (tdColumn != null) {
        IRunnableWithProgress rwp=new IRunnableWithProgress(){
          public void run(          final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
            monitor.beginTask(DefaultMessagesImpl.getString("String_Node_Str",tdColumn.getName()),IProgressMonitor.UNKNOWN);
            Display.getDefault().asyncExec(new Runnable(){
              public void run(){
                new HideSeriesChartComposite(comp,analysis,columnSetMultiIndicator,tdColumn,false);
              }
            }
);
            monitor.done();
          }
        }
;
        try {
          new ProgressMonitorDialog(getSite().getShell()).run(true,false,rwp);
        }
 catch (        Exception ex) {
          log.error(ex,ex);
        }
      }
      exComp.addExpansionListener(new ExpansionAdapter(){
        @Override public void expansionStateChanged(        ExpansionEvent e){
          getChartComposite().layout();
          form.reflow(true);
        }
      }
);
      exComp.setExpanded(true);
      exComp.setClient(comp);
    }
  }
  if (!previewChartList.isEmpty()) {
    this.previewChartCompsites=previewChartList.toArray(new Composite[previewChartList.size()]);
  }
}

Fixed version (ground truth):
public void createPreviewCharts(final ScrolledForm form,final Composite composite,final boolean isCreate){
  List<Composite> previewChartList=new ArrayList<Composite>();
  if (ColumnsetPackage.eINSTANCE.getWeakCorrelationIndicator() == columnSetMultiIndicator.eClass()) {
    GraphBuilder gBuilder=new GraphBuilder();
    gBuilder.setTotalWeight(columnSetMultiIndicator.getCount());
    List<Object[]> listRows=columnSetMultiIndicator.getListRows();
    if (listRows != null) {
      JungGraphGenerator generator=new JungGraphGenerator(gBuilder,listRows);
      generator.generate(composite,false,true);
    }
  }
 else {
    List<ModelElement> numericOrDateList=new ArrayList<ModelElement>();
    if (ColumnsetPackage.eINSTANCE.getCountAvgNullIndicator() == columnSetMultiIndicator.eClass()) {
      numericOrDateList=columnSetMultiIndicator.getNumericColumns();
    }
    if (ColumnsetPackage.eINSTANCE.getMinMaxDateIndicator() == columnSetMultiIndicator.eClass()) {
      numericOrDateList=columnSetMultiIndicator.getDateColumns();
    }
    for (    ModelElement column : numericOrDateList) {
      final MetadataColumn tdColumn=(MetadataColumn)column;
      ExpandableComposite exComp=toolkit.createExpandableComposite(composite,ExpandableComposite.TREE_NODE | ExpandableComposite.CLIENT_INDENT);
      exComp.setText(DefaultMessagesImpl.getString("String_Node_Str",tdColumn.getName()));
      exComp.setLayout(new GridLayout());
      exComp.setData(columnSetMultiIndicator);
      previewChartList.add(exComp);
      final Composite comp=toolkit.createComposite(exComp);
      comp.setLayout(new GridLayout());
      comp.setLayoutData(new GridData(GridData.FILL_BOTH));
      if (tdColumn != null) {
        IRunnableWithProgress rwp=new IRunnableWithProgress(){
          public void run(          final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
            monitor.beginTask(DefaultMessagesImpl.getString("String_Node_Str",tdColumn.getName()),IProgressMonitor.UNKNOWN);
            Display.getDefault().asyncExec(new Runnable(){
              public void run(){
                new HideSeriesChartComposite(comp,analysis,columnSetMultiIndicator,tdColumn,false);
              }
            }
);
            monitor.done();
          }
        }
;
        try {
          new ProgressMonitorDialog(getSite().getShell()).run(true,false,rwp);
        }
 catch (        Exception ex) {
          log.error(ex,ex);
        }
      }
      exComp.addExpansionListener(new ExpansionAdapter(){
        @Override public void expansionStateChanged(        ExpansionEvent e){
          getChartComposite().layout();
          form.reflow(true);
        }
      }
);
      exComp.setExpanded(true);
      exComp.setClient(comp);
    }
  }
  if (!previewChartList.isEmpty()) {
    this.previewChartCompsites=previewChartList.toArray(new Composite[previewChartList.size()]);
  }
}