Program: 129225
Project: 129225
Buggy source:
public LdifFileWizard(IWorkbench workbench,boolean creation,RepositoryNode node,String[] existingNames){
  super(workbench,creation);
  this.selection=selection;
  this.existingNames=existingNames;
  setNeedsProgressMonitor(true);
  setDefaultPageImageDescriptor(ImageProvider.getImageDesc(ECoreImage.METADATA_FILE_LDIF_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.createLdifFileConnection();
connection.setName(ERepositoryObjectType.METADATA_FILE_LDIF.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.createLdifFileConnectionItem();
connectionItem.setProperty(connectionProperty);
connectionItem.setConnection(connection);
break;
case REPOSITORY_ELEMENT:
connection=(LdifFileConnection)((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().getLabel();
this.originalVersion=this.connectionItem.getProperty().getVersion();
this.originalDescription=this.connectionItem.getProperty().getDescription();
this.originalPurpose=this.connectionItem.getProperty().getPurpose();
this.originalStatus=this.connectionItem.getProperty().getStatusCode();
}
initConnection();
}

Fixed version (ground truth):
public LdifFileWizard(IWorkbench workbench,boolean creation,RepositoryNode node,String[] existingNames){
  super(workbench,creation);
  this.selection=selection;
  this.existingNames=existingNames;
  setNeedsProgressMonitor(true);
  setDefaultPageImageDescriptor(ImageProvider.getImageDesc(ECoreImage.METADATA_FILE_LDIF_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.createLdifFileConnection();
connection.setName(ERepositoryObjectType.METADATA_FILE_LDIF.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.createLdifFileConnectionItem();
connectionItem.setProperty(connectionProperty);
connectionItem.setConnection(connection);
break;
case REPOSITORY_ELEMENT:
connection=(LdifFileConnection)((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().getLabel();
this.originalVersion=this.connectionItem.getProperty().getVersion();
this.originalDescription=this.connectionItem.getProperty().getDescription();
this.originalPurpose=this.connectionItem.getProperty().getPurpose();
this.originalStatus=this.connectionItem.getProperty().getStatusCode();
}
initConnection();
}