Program: 118503
Project: 118503
Buggy source:
public GenericConnWizard(IWorkbench workbench,boolean creation,RepositoryNode node,String[] existingNames){
  super(workbench,creation);
  this.existingNames=existingNames;
  repNode=node;
  wizardService=GenericWizardServiceFactory.getGenericWizardService();
  ENodeType nodeType=node.getType();
switch (nodeType) {
case SIMPLE_FOLDER:
case REPOSITORY_ELEMENT:
    pathToSave=RepositoryNodeUtilities.getPath(node);
  break;
case SYSTEM_FOLDER:
pathToSave=new Path("String_Node_Str");
break;
}
switch (nodeType) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
connection=GenericMetadataFactory.eINSTANCE.createGenericConnection();
connectionProperty=PropertiesFactory.eINSTANCE.createProperty();
connectionProperty.setId(ProxyRepositoryFactory.getInstance().getNextId());
connectionProperty.setAuthor(((RepositoryContext)CoreRuntimePlugin.getInstance().getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY)).getUser());
connectionProperty.setVersion(VersionUtils.DEFAULT_VERSION);
connectionProperty.setStatusCode("String_Node_Str");
connectionItem=GenericMetadataFactory.eINSTANCE.createGenericConnectionItem();
connectionItem.setProperty(connectionProperty);
connectionItem.setConnection(connection);
break;
case REPOSITORY_ELEMENT:
RepositoryObject object=new RepositoryObject(node.getObject().getProperty());
setRepositoryObject(object);
connection=(GenericConnection)((ConnectionItem)object.getProperty().getItem()).getConnection();
connectionProperty=object.getProperty();
connectionItem=(ConnectionItem)object.getProperty().getItem();
isRepositoryObjectEditable();
initLockStrategy();
break;
}
if (!creation) {
this.originalLabel=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();
}
compService=new GenericWizardInternalService().getComponentService();
compService.setRepository(new GenericRepository());
IWizardContainer container=this.getContainer();
if (container instanceof GenericWizardDialog) {
((GenericWizardDialog)container).setCompService(compService);
}
ConnectionContextHelper.checkContextMode(connectionItem);
setHelpAvailable(false);
}

Fixed version (ground truth):
public GenericConnWizard(IWorkbench workbench,boolean creation,RepositoryNode node,String[] existingNames){
  super(workbench,creation);
  this.existingNames=existingNames;
  repNode=node;
  wizardService=GenericWizardServiceFactory.getGenericWizardService();
  ENodeType nodeType=node.getType();
switch (nodeType) {
case SIMPLE_FOLDER:
case REPOSITORY_ELEMENT:
    pathToSave=RepositoryNodeUtilities.getPath(node);
  break;
case SYSTEM_FOLDER:
pathToSave=new Path("String_Node_Str");
break;
}
switch (nodeType) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
connection=GenericMetadataFactory.eINSTANCE.createGenericConnection();
connectionProperty=PropertiesFactory.eINSTANCE.createProperty();
connectionProperty.setId(ProxyRepositoryFactory.getInstance().getNextId());
connectionProperty.setAuthor(((RepositoryContext)CoreRuntimePlugin.getInstance().getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY)).getUser());
connectionProperty.setVersion(VersionUtils.DEFAULT_VERSION);
connectionProperty.setStatusCode("String_Node_Str");
connectionItem=GenericMetadataFactory.eINSTANCE.createGenericConnectionItem();
connectionItem.setProperty(connectionProperty);
connectionItem.setConnection(connection);
break;
case REPOSITORY_ELEMENT:
RepositoryObject object=new RepositoryObject(node.getObject().getProperty());
setRepositoryObject(object);
connection=(GenericConnection)((ConnectionItem)object.getProperty().getItem()).getConnection();
connectionProperty=object.getProperty();
connectionItem=(ConnectionItem)object.getProperty().getItem();
isRepositoryObjectEditable();
initLockStrategy();
break;
}
if (!creation) {
this.originalLabel=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();
}
compService=new ComponentServiceWithValueEvaluator(new GenericWizardInternalService().getComponentService(),new MetadataContextPropertyValueEvaluator(connection));
compService.setRepository(new GenericRepository());
IWizardContainer container=this.getContainer();
if (container instanceof GenericWizardDialog) {
((GenericWizardDialog)container).setCompService(compService);
}
ConnectionContextHelper.checkContextMode(connectionItem);
setHelpAvailable(false);
}