Program: 129216
Project: 129216
Buggy source:
public DelimitedFileWizard(IWorkbench workbench,boolean creation,RepositoryNode node,String[] existingNames){
  super(workbench,creation);
  this.existingNames=existingNames;
  setNeedsProgressMonitor(true);
  setDefaultPageImageDescriptor(ImageProvider.getImageDesc(ECoreImage.METADATA_FILE_DELIMITED_WIZ));
switch (node.getType()) {
case SIMPLE_FOLDER:
case REPOSITORY_ELEMENT:
    pathToSave=RepositoryNodeUtilities.getPath(node);
  break;
case SYSTEM_FOLDER:
pathToSave=new Path("String_Node_Str");
break;
}
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
connection=ConnectionFactory.eINSTANCE.createDelimitedFileConnection();
connection.setName(ERepositoryObjectType.METADATA_FILE_DELIMITED.getKey());
MetadataTable metadataTable=ConnectionFactory.eINSTANCE.createMetadataTable();
IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
metadataTable.setId(factory.getNextId());
RecordFile record=(RecordFile)ConnectionHelper.getPackage(connection.getName(),(Connection)connection,RecordFile.class);
if (record != null) {
PackageHelper.addMetadataTable(metadataTable,record);
}
 else {
RecordFile newrecord=RecordFactory.eINSTANCE.createRecordFile();
newrecord.setName(connection.getName());
ConnectionHelper.addPackage(newrecord,connection);
PackageHelper.addMetadataTable(metadataTable,newrecord);
}
connectionProperty=PropertiesFactory.eINSTANCE.createProperty();
connectionProperty.setAuthor(((RepositoryContext)CoreRuntimePlugin.getInstance().getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY)).getUser());
connectionProperty.setVersion(VersionUtils.DEFAULT_VERSION);
connectionProperty.setStatusCode("String_Node_Str");
connectionItem=PropertiesFactory.eINSTANCE.createDelimitedFileConnectionItem();
connectionItem.setProperty(connectionProperty);
connectionItem.setConnection(connection);
break;
case REPOSITORY_ELEMENT:
connection=(DelimitedFileConnection)((ConnectionItem)node.getObject().getProperty().getItem()).getConnection();
connectionProperty=node.getObject().getProperty();
connectionItem=(ConnectionItem)node.getObject().getProperty().getItem();
setRepositoryObject(node.getObject());
isRepositoryObjectEditable();
initLockStrategy();
break;
}
if (!creation) {
this.originaleObjectLabel=this.connectionItem.getProperty().getDisplayName();
this.originalVersion=this.connectionItem.getProperty().getVersion();
this.originalDescription=this.connectionItem.getProperty().getDescription();
this.originalPurpose=this.connectionItem.getProperty().getPurpose();
this.originalStatus=this.connectionItem.getProperty().getStatusCode();
originalConn=FileConnectionContextUtils.cloneOriginalValueConnection(connection);
}
initConnection();
}

Fixed version (ground truth):
public DelimitedFileWizard(IWorkbench workbench,boolean creation,RepositoryNode node,String[] existingNames){
  super(workbench,creation);
  this.existingNames=existingNames;
  setNeedsProgressMonitor(true);
  setDefaultPageImageDescriptor(ImageProvider.getImageDesc(ECoreImage.METADATA_FILE_DELIMITED_WIZ));
switch (node.getType()) {
case SIMPLE_FOLDER:
case REPOSITORY_ELEMENT:
    pathToSave=RepositoryNodeUtilities.getPath(node);
  break;
case SYSTEM_FOLDER:
pathToSave=new Path("String_Node_Str");
break;
}
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
connection=ConnectionFactory.eINSTANCE.createDelimitedFileConnection();
connection.setName(ERepositoryObjectType.METADATA_FILE_DELIMITED.getKey());
MetadataTable metadataTable=ConnectionFactory.eINSTANCE.createMetadataTable();
IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
metadataTable.setId(factory.getNextId());
RecordFile record=(RecordFile)ConnectionHelper.getPackage(connection.getName(),connection,RecordFile.class);
if (record != null) {
PackageHelper.addMetadataTable(metadataTable,record);
}
 else {
RecordFile newrecord=RecordFactory.eINSTANCE.createRecordFile();
newrecord.setName(connection.getName());
ConnectionHelper.addPackage(newrecord,connection);
PackageHelper.addMetadataTable(metadataTable,newrecord);
}
connectionProperty=PropertiesFactory.eINSTANCE.createProperty();
connectionProperty.setAuthor(((RepositoryContext)CoreRuntimePlugin.getInstance().getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY)).getUser());
connectionProperty.setVersion(VersionUtils.DEFAULT_VERSION);
connectionProperty.setStatusCode("String_Node_Str");
connectionItem=PropertiesFactory.eINSTANCE.createDelimitedFileConnectionItem();
connectionItem.setProperty(connectionProperty);
connectionItem.setConnection(connection);
break;
case REPOSITORY_ELEMENT:
connection=(DelimitedFileConnection)((ConnectionItem)node.getObject().getProperty().getItem()).getConnection();
connectionProperty=node.getObject().getProperty();
connectionItem=(ConnectionItem)node.getObject().getProperty().getItem();
setRepositoryObject(node.getObject());
isRepositoryObjectEditable();
initLockStrategy();
break;
}
if (!creation) {
this.originaleObjectLabel=this.connectionItem.getProperty().getDisplayName();
this.originalVersion=this.connectionItem.getProperty().getVersion();
this.originalDescription=this.connectionItem.getProperty().getDescription();
this.originalPurpose=this.connectionItem.getProperty().getPurpose();
this.originalStatus=this.connectionItem.getProperty().getStatusCode();
originalConn=FileConnectionContextUtils.cloneOriginalValueConnection(connection);
}
initConnection();
}