Program: 96192
Project: 96192
Buggy source:
/** 
 * ask for a TC Name and returns a new TC Editor
 * @return SpecTestCaseEditor
 */
private TestCaseEditor askForNewTC(){
  TestCaseEditor editor=null;
  String standardName=InitialValueConstants.DEFAULT_TEST_CASE_NAME_OBSERVED;
  int index=1;
  String newName=standardName + index;
  final Set<String> usedNames=new HashSet<String>();
  for (  Object node : GeneralStorage.getInstance().getProject().getSpecObjCont().getSpecObjList()) {
    if (Persistor.isPoSubclass((INodePO)node,ITestCasePO.class) && ((INodePO)node).getName().startsWith(standardName)) {
      usedNames.add(((INodePO)node).getName());
    }
  }
  while (usedNames.contains(newName)) {
    index++;
    newName=standardName + index;
  }
  InputDialog dialog=createDialog(newName,usedNames);
  dialog.setHelpAvailable(true);
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  Plugin.getHelpSystem().setHelp(dialog.getShell(),ContextHelpIds.DIALOG_OBS_TC_SAVE);
  dialog.open();
  if (Window.OK == dialog.getReturnCode()) {
    String tcName=dialog.getName();
    final INodePO parentPO=GeneralStorage.getInstance().getProject();
    ISpecTestCasePO recSpecTestCase=NodeMaker.createSpecTestCasePO(tcName);
    try {
      NodePM.addAndPersistChildNode(parentPO,recSpecTestCase,null,NodePM.getCmdHandleChild(parentPO,recSpecTestCase));
      DataEventDispatcher.getInstance().fireDataChangedListener(recSpecTestCase,DataState.Added,UpdateState.all);
      editor=(TestCaseEditor)AbstractOpenHandler.openEditor(recSpecTestCase);
    }
 catch (    PMException e) {
      PMExceptionHandler.handlePMExceptionForMasterSession(e);
    }
catch (    ProjectDeletedException e) {
      PMExceptionHandler.handleGDProjectDeletedException();
    }
  }
  dialog.close();
  return editor;
}

Fixed version (ground truth):
/** 
 * ask for a TC Name and returns a new TC Editor
 * @return SpecTestCaseEditor
 */
private TestCaseEditor askForNewTC(){
  TestCaseEditor editor=null;
  String standardName=InitialValueConstants.DEFAULT_TEST_CASE_NAME_OBSERVED;
  int index=1;
  String newName=standardName + index;
  final Set<String> usedNames=new HashSet<String>();
  for (  Object node : GeneralStorage.getInstance().getProject().getSpecObjCont().getSpecObjList()) {
    if (Persistor.isPoSubclass((INodePO)node,ITestCasePO.class) && ((INodePO)node).getName().startsWith(standardName)) {
      usedNames.add(((INodePO)node).getName());
    }
  }
  while (usedNames.contains(newName)) {
    index++;
    newName=standardName + index;
  }
  InputDialog dialog=createDialog(newName,usedNames);
  dialog.setHelpAvailable(true);
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  Plugin.getHelpSystem().setHelp(dialog.getShell(),ContextHelpIds.DIALOG_OBS_TC_SAVE);
  dialog.open();
  if (Window.OK == dialog.getReturnCode()) {
    String tcName=dialog.getName();
    final INodePO parentPO=ISpecObjContPO.TCB_ROOT_NODE;
    ISpecTestCasePO recSpecTestCase=NodeMaker.createSpecTestCasePO(tcName);
    try {
      NodePM.addAndPersistChildNode(parentPO,recSpecTestCase,null,NodePM.getCmdHandleChild(parentPO,recSpecTestCase));
      DataEventDispatcher.getInstance().fireDataChangedListener(recSpecTestCase,DataState.Added,UpdateState.all);
      editor=(TestCaseEditor)AbstractOpenHandler.openEditor(recSpecTestCase);
    }
 catch (    PMException e) {
      PMExceptionHandler.handlePMExceptionForMasterSession(e);
    }
catch (    ProjectDeletedException e) {
      PMExceptionHandler.handleGDProjectDeletedException();
    }
  }
  dialog.close();
  return editor;
}