Program: 129229
Project: 129229
Buggy source:
public FilePositionalWizard(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_POSITIONAL_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.createPositionalFileConnection();
connection.setName(ERepositoryObjectType.METADATA_FILE_POSITIONAL.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.createPositionalFileConnectionItem();
connectionItem.setProperty(connectionProperty);
connectionItem.setConnection(connection);
break;
case REPOSITORY_ELEMENT:
connection=(PositionalFileConnection)((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 FilePositionalWizard(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_POSITIONAL_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.createPositionalFileConnection();
connection.setName(ERepositoryObjectType.METADATA_FILE_POSITIONAL.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.createPositionalFileConnectionItem();
connectionItem.setProperty(connectionProperty);
connectionItem.setConnection(connection);
break;
case REPOSITORY_ELEMENT:
connection=(PositionalFileConnection)((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();
}