Program: 129638
Project: 129638
Buggy source:
public void createSalesforceModuleWizard(RepositoryNode node,final boolean forceReadOnly){
  SalesforceSchemaConnection connection=null;
  MetadataTable metadataTable=null;
  boolean creation=false;
  if (node.getType() == ENodeType.REPOSITORY_ELEMENT) {
    ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
    String tableLabel=(String)node.getProperties(EProperties.LABEL);
    SalesforceSchemaConnectionItem item=null;
    if (nodeType == ERepositoryObjectType.METADATA_CON_TABLE) {
      item=(SalesforceSchemaConnectionItem)node.getParent().getObject().getProperty().getItem();
      connection=(SalesforceSchemaConnection)item.getConnection();
      metadataTable=TableHelper.findByLabel(connection,tableLabel);
      creation=false;
    }
 else     if (nodeType == ERepositoryObjectType.METADATA_SALESFORCE_SCHEMA) {
      item=(SalesforceSchemaConnectionItem)node.getObject().getProperty().getItem();
      connection=(SalesforceSchemaConnection)item.getConnection();
      metadataTable=ConnectionFactory.eINSTANCE.createMetadataTable();
      String nextId=ProxyRepositoryFactory.getInstance().getNextId();
      metadataTable.setId(nextId);
      metadataTable.setLabel(getStringIndexed(metadataTable.getLabel()));
      creation=true;
    }
 else     if (nodeType == ERepositoryObjectType.METADATA_SALESFORCE_MODULE) {
      item=(SalesforceSchemaConnectionItem)node.getObject().getProperty().getItem();
      connection=(SalesforceSchemaConnection)item.getConnection();
      metadataTable=ConnectionFactory.eINSTANCE.createMetadataTable();
      String nextId=ProxyRepositoryFactory.getInstance().getNextId();
      metadataTable.setId(nextId);
      metadataTable.setLabel(getStringIndexed(metadataTable.getLabel()));
      creation=false;
    }
 else {
      return;
    }
    initContextMode(item);
    SalesforceModulesWizard salesforceSchemaWizard=new SalesforceModulesWizard(PlatformUI.getWorkbench(),creation,node.getObject(),metadataTable,getExistingNames(),forceReadOnly,null,null);
    WizardDialog wizardDialog=new WizardDialog(Display.getCurrent().getActiveShell(),salesforceSchemaWizard);
    handleWizard(node,wizardDialog);
  }
}

Fixed version (ground truth):
public void createSalesforceModuleWizard(RepositoryNode node,final boolean forceReadOnly){
  SalesforceSchemaConnection connection=null;
  MetadataTable metadataTable=null;
  boolean creation=false;
  if (node.getType() == ENodeType.REPOSITORY_ELEMENT) {
    ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
    String tableLabel=(String)node.getProperties(EProperties.LABEL);
    SalesforceSchemaConnectionItem item=null;
    if (nodeType == ERepositoryObjectType.METADATA_CON_TABLE) {
      item=(SalesforceSchemaConnectionItem)node.getParent().getObject().getProperty().getItem();
      connection=(SalesforceSchemaConnection)item.getConnection();
      metadataTable=TableHelper.findByLabel(connection,tableLabel);
      creation=false;
    }
 else     if (nodeType == ERepositoryObjectType.METADATA_SALESFORCE_SCHEMA) {
      item=(SalesforceSchemaConnectionItem)node.getObject().getProperty().getItem();
      connection=(SalesforceSchemaConnection)item.getConnection();
      metadataTable=ConnectionFactory.eINSTANCE.createMetadataTable();
      String nextId=ProxyRepositoryFactory.getInstance().getNextId();
      metadataTable.setId(nextId);
      metadataTable.setLabel(getStringIndexed(metadataTable.getLabel()));
      creation=false;
    }
 else     if (nodeType == ERepositoryObjectType.METADATA_SALESFORCE_MODULE) {
      item=(SalesforceSchemaConnectionItem)node.getObject().getProperty().getItem();
      connection=(SalesforceSchemaConnection)item.getConnection();
      metadataTable=ConnectionFactory.eINSTANCE.createMetadataTable();
      String nextId=ProxyRepositoryFactory.getInstance().getNextId();
      metadataTable.setId(nextId);
      metadataTable.setLabel(getStringIndexed(metadataTable.getLabel()));
      creation=false;
    }
 else {
      return;
    }
    initContextMode(item);
    SalesforceModulesWizard salesforceSchemaWizard=new SalesforceModulesWizard(PlatformUI.getWorkbench(),creation,node.getObject(),metadataTable,getExistingNames(),forceReadOnly,null,null);
    WizardDialog wizardDialog=new WizardDialog(Display.getCurrent().getActiveShell(),salesforceSchemaWizard);
    handleWizard(node,wizardDialog);
  }
}