Program: 126374
Project: 126374
Buggy source:
/** 
 * createTable.
 * @param tableItem
 */
protected void createTable(TableItem tableItem){
  String tableString=tableItem.getText(0);
  boolean checkConnectionIsDone=managerConnection.check(getIMetadataConnection(),true);
  if (!checkConnectionIsDone) {
    updateStatus(IStatus.WARNING,Messages.getString("String_Node_Str"));
    new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),managerConnection.getMessageException());
  }
 else {
    if (ExtractMetaDataFromDataBase.getTableTypeByTableName(tableString).equals(ETableTypes.TABLETYPE_TABLE.getName())) {
      dbtable=RelationalFactory.eINSTANCE.createTdTable();
    }
 else     if (ExtractMetaDataFromDataBase.getTableTypeByTableName(tableString).equals(ETableTypes.TABLETYPE_VIEW.getName())) {
      dbtable=RelationalFactory.eINSTANCE.createTdView();
    }
 else {
      dbtable=RelationalFactory.eINSTANCE.createTdTable();
    }
    dbtable.getTaggedValue().add(CoreFactory.eINSTANCE.createTaggedValue());
    List<TdColumn> metadataColumns=new ArrayList<TdColumn>();
    metadataColumns=ExtractMetaDataFromDataBase.returnMetadataColumnsFormTable(iMetadataConnection,tableItem.getText(0));
    tableItem.setText(2,"String_Node_Str" + metadataColumns.size());
    tableItem.setText(3,Messages.getString("String_Node_Str"));
    countSuccess++;
    IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
    initExistingNames();
    String labelName=IndiceHelper.getIndexedLabel(tableString,existingNames);
    if (forTemplate) {
      labelName=MetadataToolHelper.validateValue(labelName);
    }
    dbtable.setLabel(labelName);
    dbtable.setSourceName(tableItem.getText(0));
    dbtable.setId(factory.getNextId());
    dbtable.setTableType(ExtractMetaDataFromDataBase.getTableTypeByTableName(tableString));
    List<MetadataColumn> metadataColumnsValid=new ArrayList<MetadataColumn>();
    Iterator iterate=metadataColumns.iterator();
    while (iterate.hasNext()) {
      MetadataColumn metadataColumn=(MetadataColumn)iterate.next();
      metadataColumnsValid.add(metadataColumn);
      dbtable.getColumns().add(metadataColumn);
    }
    if (!ConnectionHelper.getTables(getConnection()).contains(dbtable) && !limitTemplateTable(dbtable)) {
    }
  }
}

Fixed version (ground truth):
/** 
 * createTable.
 * @param tableItem
 */
protected void createTable(TableItem tableItem){
  String tableString=tableItem.getText(0);
  boolean checkConnectionIsDone=managerConnection.check(getIMetadataConnection(),true);
  if (!checkConnectionIsDone) {
    updateStatus(IStatus.WARNING,Messages.getString("String_Node_Str"));
    new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),managerConnection.getMessageException());
  }
 else {
    if (ExtractMetaDataFromDataBase.getTableTypeByTableName(tableString).equals(ETableTypes.TABLETYPE_TABLE.getName())) {
      dbtable=RelationalFactory.eINSTANCE.createTdTable();
    }
 else     if (ExtractMetaDataFromDataBase.getTableTypeByTableName(tableString).equals(ETableTypes.TABLETYPE_VIEW.getName())) {
      dbtable=RelationalFactory.eINSTANCE.createTdView();
    }
 else {
      dbtable=RelationalFactory.eINSTANCE.createTdTable();
    }
    dbtable.getTaggedValue().add(CoreFactory.eINSTANCE.createTaggedValue());
    List<TdColumn> metadataColumns=new ArrayList<TdColumn>();
    metadataColumns=ExtractMetaDataFromDataBase.returnMetadataColumnsFormTable(iMetadataConnection,tableItem.getText(0));
    tableItem.setText(2,"String_Node_Str" + metadataColumns.size());
    tableItem.setText(3,Messages.getString("String_Node_Str"));
synchronized (countSuccess) {
      countSuccess++;
    }
    IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
    initExistingNames();
    String labelName=IndiceHelper.getIndexedLabel(tableString,existingNames);
    if (forTemplate) {
      labelName=MetadataToolHelper.validateValue(labelName);
    }
    dbtable.setLabel(labelName);
    dbtable.setSourceName(tableItem.getText(0));
    dbtable.setId(factory.getNextId());
    dbtable.setTableType(ExtractMetaDataFromDataBase.getTableTypeByTableName(tableString));
    List<MetadataColumn> metadataColumnsValid=new ArrayList<MetadataColumn>();
    Iterator iterate=metadataColumns.iterator();
    while (iterate.hasNext()) {
      MetadataColumn metadataColumn=(MetadataColumn)iterate.next();
      metadataColumnsValid.add(metadataColumn);
      dbtable.getColumns().add(metadataColumn);
    }
    if (!ConnectionHelper.getTables(getConnection()).contains(dbtable) && !limitTemplateTable(dbtable)) {
    }
  }
}