Program: 125099
Project: 125099
Buggy source:
private void pressRetreiveSchemaButton(){
  ConnectionStatus connectionStatus=checkConnection(false);
  if (!connectionStatus.getResult()) {
    tableSettingsInfoLabel.setText(connectionStatus.getMessageException());
  }
 else {
    boolean doit=true;
    if (tableEditorView.getMetadataEditor().getBeanCount() > 0) {
      doit=MessageDialog.openConfirm(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
    }
    if (doit) {
      List<MetadataColumn> metadataColumns;
      try {
        HadoopOperationManager.getInstance().connectDFS(getConnectionBean());
        metadataColumns=ExtractMetaDataFromHDFS.extractColumns(getConnection(),metadataTable);
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
        return;
      }
      tableEditorView.getMetadataEditor().removeAll();
      List<MetadataColumn> metadataColumnsValid=new ArrayList<MetadataColumn>();
      Iterator iterate=metadataColumns.iterator();
      while (iterate.hasNext()) {
        MetadataColumn metadataColumn=(MetadataColumn)iterate.next();
        if (metadataColumn.getTalendType().equals(JavaTypesManager.DATE.getId()) || metadataColumn.getTalendType().equals(PerlTypesManager.DATE)) {
          if ("String_Node_Str".equals(metadataColumn.getPattern())) {
            metadataColumn.setPattern(TalendQuoteUtils.addQuotes("String_Node_Str"));
          }
        }
        String columnLabel=metadataColumn.getLabel();
        metadataColumn.setLabel(tableEditorView.getMetadataEditor().getNextGeneratedColumnName(columnLabel));
        metadataColumnsValid.add(metadataColumn);
      }
      tableEditorView.getMetadataEditor().addAll(metadataColumnsValid);
    }
  }
  updateRetreiveSchemaButton();
  changeTableNavigatorStatus(checkFieldsValue());
}

Fixed version (ground truth):
private void pressRetreiveSchemaButton(){
  ConnectionStatus connectionStatus=checkConnection(false);
  if (!connectionStatus.getResult()) {
    tableSettingsInfoLabel.setText(connectionStatus.getMessageException());
  }
 else {
    boolean doit=true;
    if (tableEditorView.getMetadataEditor().getBeanCount() > 0) {
      doit=MessageDialog.openConfirm(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
    }
    if (doit) {
      List<MetadataColumn> metadataColumns;
      try {
        HadoopOperationManager.getInstance().getDFS(getConnectionBean());
        metadataColumns=ExtractMetaDataFromHDFS.extractColumns(getConnection(),metadataTable);
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
        return;
      }
      tableEditorView.getMetadataEditor().removeAll();
      List<MetadataColumn> metadataColumnsValid=new ArrayList<MetadataColumn>();
      Iterator iterate=metadataColumns.iterator();
      while (iterate.hasNext()) {
        MetadataColumn metadataColumn=(MetadataColumn)iterate.next();
        if (metadataColumn.getTalendType().equals(JavaTypesManager.DATE.getId()) || metadataColumn.getTalendType().equals(PerlTypesManager.DATE)) {
          if ("String_Node_Str".equals(metadataColumn.getPattern())) {
            metadataColumn.setPattern(TalendQuoteUtils.addQuotes("String_Node_Str"));
          }
        }
        String columnLabel=metadataColumn.getLabel();
        metadataColumn.setLabel(tableEditorView.getMetadataEditor().getNextGeneratedColumnName(columnLabel));
        metadataColumnsValid.add(metadataColumn);
      }
      tableEditorView.getMetadataEditor().addAll(metadataColumnsValid);
    }
  }
  updateRetreiveSchemaButton();
  changeTableNavigatorStatus(checkFieldsValue());
}