Program: 139481
Project: 139481
Buggy source:
/** 
 * DOC qzhang Comment method "refreshSumSection".
 * @param summarySection
 */
private void refreshSumSection(){
  fillDataProvider();
  if (sumSectionClient != null && !sumSectionClient.isDisposed()) {
    Control[] children=sumSectionClient.getChildren();
    for (    Control control : children) {
      control.dispose();
    }
  }
  Composite leftComp=new Composite(sumSectionClient,SWT.NONE);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(leftComp);
  leftComp.setLayout(new GridLayout());
  Composite rightComp=new Composite(sumSectionClient,SWT.NONE);
  rightComp.setLayout(new GridLayout());
  GridDataFactory.fillDefaults().grab(true,true).applyTo(rightComp);
  TdProviderConnection providerConnection=DataProviderHelper.getTdProviderConnection(tdDataProvider).getObject();
  String connectionStr=providerConnection.getConnectionString();
  Properties pameterProperties=SupportDBUrlStore.getInstance().getDBPameterProperties(connectionStr);
  String labelContent=pameterProperties.getProperty(org.talend.dq.PluginConstant.DBTYPE_PROPERTY);
  Label leftLabel=new Label(leftComp,SWT.NONE);
  leftLabel.setText(DefaultMessagesImpl.getString("String_Node_Str") + (labelContent == null ? PluginConstant.EMPTY_STRING : labelContent));
  leftLabel.setLayoutData(new GridData());
  leftLabel=new Label(leftComp,SWT.NONE);
  labelContent=pameterProperties.getProperty(org.talend.dq.PluginConstant.HOSTNAME_PROPERTY);
  leftLabel.setText(DefaultMessagesImpl.getString("String_Node_Str") + (labelContent == null ? PluginConstant.EMPTY_STRING : labelContent));
  leftLabel.setLayoutData(new GridData());
  leftLabel=new Label(leftComp,SWT.NONE);
  labelContent=pameterProperties.getProperty(org.talend.dq.PluginConstant.PORT_PROPERTY);
  leftLabel.setText(DefaultMessagesImpl.getString("String_Node_Str") + (labelContent == null ? PluginConstant.EMPTY_STRING : labelContent));
  leftLabel.setLayoutData(new GridData());
  leftLabel=new Label(leftComp,SWT.NONE);
  labelContent=DataProviderHelper.getUser(providerConnection);
  leftLabel.setText(DefaultMessagesImpl.getString("String_Node_Str") + (labelContent == null ? PluginConstant.EMPTY_STRING : labelContent));
  leftLabel.setLayoutData(new GridData());
  List<TdCatalog> tdCatalogs=getCatalogs();
  List<TdSchema> tdSchema=DataProviderHelper.getTdSchema(tdDataProvider);
  leftLabel=new Label(leftComp,SWT.NONE);
  leftLabel.setText(DefaultMessagesImpl.getString("String_Node_Str",tdCatalogs.size()));
  leftLabel.setLayoutData(new GridData());
  leftLabel=new Label(leftComp,SWT.NONE);
  leftLabel.setText(DefaultMessagesImpl.getString("String_Node_Str",tdSchema.size()));
  leftLabel.setLayoutData(new GridData());
  ExecutionInformations resultMetadata=analysis.getResults().getResultMetadata();
  Label rightLabel=new Label(rightComp,SWT.NONE);
  rightLabel.setText(DefaultMessagesImpl.getString("String_Node_Str",getFormatDateStr(analysis.getCreationDate())));
  rightLabel.setLayoutData(new GridData());
  rightLabel=new Label(rightComp,SWT.NONE);
  rightLabel.setText(DefaultMessagesImpl.getString("String_Node_Str",getFormatDateStr(resultMetadata.getExecutionDate())));
  rightLabel.setLayoutData(new GridData());
  rightLabel=new Label(rightComp,SWT.NONE);
  rightLabel.setText(DefaultMessagesImpl.getString("String_Node_Str",resultMetadata.getExecutionDuration() / 1000.0d));
  rightLabel.setLayoutData(new GridData());
  rightLabel=new Label(rightComp,SWT.NONE);
  String executeStatus=(resultMetadata.isLastRunOk() ? DefaultMessagesImpl.getString("String_Node_Str") : DefaultMessagesImpl.getString("String_Node_Str",resultMetadata.getMessage()));
  rightLabel.setText(DefaultMessagesImpl.getString("String_Node_Str") + (resultMetadata.getExecutionNumber() == 0 ? PluginConstant.EMPTY_STRING : executeStatus));
  if (!resultMetadata.isLastRunOk()) {
    rightLabel.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_RED));
  }
  rightLabel.setLayoutData(new GridData());
  rightLabel=new Label(rightComp,SWT.NONE);
  rightLabel.setText(DefaultMessagesImpl.getString("String_Node_Str",resultMetadata.getExecutionNumber()));
  rightLabel.setLayoutData(new GridData());
  rightLabel=new Label(rightComp,SWT.NONE);
  rightLabel.setText(DefaultMessagesImpl.getString("String_Node_Str",getFormatDateStr(resultMetadata.getExecutionDate())));
  rightLabel.setLayoutData(new GridData());
  sumSectionClient.layout();
}

Fixed version (ground truth):
/** 
 * DOC qzhang Comment method "refreshSumSection".
 * @param summarySection
 */
private void refreshSumSection(){
  fillDataProvider();
  if (tdDataProvider == null) {
    return;
  }
  if (sumSectionClient != null && !sumSectionClient.isDisposed()) {
    Control[] children=sumSectionClient.getChildren();
    for (    Control control : children) {
      control.dispose();
    }
  }
  Composite leftComp=new Composite(sumSectionClient,SWT.NONE);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(leftComp);
  leftComp.setLayout(new GridLayout());
  Composite rightComp=new Composite(sumSectionClient,SWT.NONE);
  rightComp.setLayout(new GridLayout());
  GridDataFactory.fillDefaults().grab(true,true).applyTo(rightComp);
  TdProviderConnection providerConnection=DataProviderHelper.getTdProviderConnection(tdDataProvider).getObject();
  String connectionStr=providerConnection.getConnectionString();
  Properties pameterProperties=SupportDBUrlStore.getInstance().getDBPameterProperties(connectionStr);
  String labelContent=pameterProperties.getProperty(org.talend.dq.PluginConstant.DBTYPE_PROPERTY);
  Label leftLabel=new Label(leftComp,SWT.NONE);
  leftLabel.setText(DefaultMessagesImpl.getString("String_Node_Str") + (labelContent == null ? PluginConstant.EMPTY_STRING : labelContent));
  leftLabel.setLayoutData(new GridData());
  leftLabel=new Label(leftComp,SWT.NONE);
  labelContent=pameterProperties.getProperty(org.talend.dq.PluginConstant.HOSTNAME_PROPERTY);
  leftLabel.setText(DefaultMessagesImpl.getString("String_Node_Str") + (labelContent == null ? PluginConstant.EMPTY_STRING : labelContent));
  leftLabel.setLayoutData(new GridData());
  leftLabel=new Label(leftComp,SWT.NONE);
  labelContent=pameterProperties.getProperty(org.talend.dq.PluginConstant.PORT_PROPERTY);
  leftLabel.setText(DefaultMessagesImpl.getString("String_Node_Str") + (labelContent == null ? PluginConstant.EMPTY_STRING : labelContent));
  leftLabel.setLayoutData(new GridData());
  leftLabel=new Label(leftComp,SWT.NONE);
  labelContent=DataProviderHelper.getUser(providerConnection);
  leftLabel.setText(DefaultMessagesImpl.getString("String_Node_Str") + (labelContent == null ? PluginConstant.EMPTY_STRING : labelContent));
  leftLabel.setLayoutData(new GridData());
  List<TdCatalog> tdCatalogs=getCatalogs();
  List<TdSchema> tdSchema=DataProviderHelper.getTdSchema(tdDataProvider);
  leftLabel=new Label(leftComp,SWT.NONE);
  leftLabel.setText(DefaultMessagesImpl.getString("String_Node_Str",tdCatalogs.size()));
  leftLabel.setLayoutData(new GridData());
  leftLabel=new Label(leftComp,SWT.NONE);
  leftLabel.setText(DefaultMessagesImpl.getString("String_Node_Str",tdSchema.size()));
  leftLabel.setLayoutData(new GridData());
  ExecutionInformations resultMetadata=analysis.getResults().getResultMetadata();
  Label rightLabel=new Label(rightComp,SWT.NONE);
  rightLabel.setText(DefaultMessagesImpl.getString("String_Node_Str",getFormatDateStr(analysis.getCreationDate())));
  rightLabel.setLayoutData(new GridData());
  rightLabel=new Label(rightComp,SWT.NONE);
  rightLabel.setText(DefaultMessagesImpl.getString("String_Node_Str",getFormatDateStr(resultMetadata.getExecutionDate())));
  rightLabel.setLayoutData(new GridData());
  rightLabel=new Label(rightComp,SWT.NONE);
  rightLabel.setText(DefaultMessagesImpl.getString("String_Node_Str",resultMetadata.getExecutionDuration() / 1000.0d));
  rightLabel.setLayoutData(new GridData());
  rightLabel=new Label(rightComp,SWT.NONE);
  String executeStatus=(resultMetadata.isLastRunOk() ? DefaultMessagesImpl.getString("String_Node_Str") : DefaultMessagesImpl.getString("String_Node_Str",resultMetadata.getMessage()));
  rightLabel.setText(DefaultMessagesImpl.getString("String_Node_Str") + (resultMetadata.getExecutionNumber() == 0 ? PluginConstant.EMPTY_STRING : executeStatus));
  if (!resultMetadata.isLastRunOk()) {
    rightLabel.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_RED));
  }
  rightLabel.setLayoutData(new GridData());
  rightLabel=new Label(rightComp,SWT.NONE);
  rightLabel.setText(DefaultMessagesImpl.getString("String_Node_Str",resultMetadata.getExecutionNumber()));
  rightLabel.setLayoutData(new GridData());
  rightLabel=new Label(rightComp,SWT.NONE);
  rightLabel.setText(DefaultMessagesImpl.getString("String_Node_Str",getFormatDateStr(resultMetadata.getExecutionDate())));
  rightLabel.setLayoutData(new GridData());
  sumSectionClient.layout();
}