nus-yam/ex-repair huggingface dataset:
Program: 129612
Project: 129612
Buggy source:
/** 
 * This method determine if the 'Finish' button is enable This method is called when 'Finish' button is pressed in the wizard. We will create an operation and run it using wizard as execution context.
 */
public boolean performFinish(){
  boolean formIsPerformed;
  if (fileWizardPage3 == null) {
    formIsPerformed=fileWizardPage2.isPageComplete();
  }
 else {
    formIsPerformed=fileWizardPage3.isPageComplete();
  }
  if (formIsPerformed) {
    IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
    try {
      if (creation) {
        String nextId=factory.getNextId();
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        connectionProperty.setId(nextId);
        factory.create(connectionItem,fileWizardPage0.getDestinationPath());
      }
 else {
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        RepositoryUpdateManager.updateFileConnection(connectionItem);
        factory.save(connectionItem);
        closeLockStrategy();
      }
      ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());
    }
 catch (    PersistenceException e) {
      String detailError=e.toString();
      new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),detailError);
      log.error(Messages.getString("String_Node_Str") + "String_Node_Str" + detailError);
      return false;
    }
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * This method determine if the 'Finish' button is enable This method is called when 'Finish' button is pressed in the wizard. We will create an operation and run it using wizard as execution context.
 */
public boolean performFinish(){
  boolean formIsPerformed;
  if (fileWizardPage3 == null) {
    formIsPerformed=fileWizardPage2.isPageComplete();
  }
 else {
    formIsPerformed=fileWizardPage3.isPageComplete();
  }
  if (formIsPerformed) {
    IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
    try {
      if (creation) {
        String nextId=factory.getNextId();
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        connectionProperty.setId(nextId);
        factory.create(connectionItem,fileWizardPage0.getDestinationPath());
      }
 else {
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        RepositoryUpdateManager.updateFileConnection(connectionItem);
        updateConnectionItem();
      }
      ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());
    }
 catch (    Exception e) {
      String detailError=e.toString();
      new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),detailError);
      log.error(Messages.getString("String_Node_Str") + "String_Node_Str" + detailError);
      return false;
    }
    return true;
  }
 else {
    return false;
  }
}
Program: 129613
Project: 129613
Buggy source:
/** 
 * This method determine if the 'Finish' button is enable This method is called when 'Finish' button is pressed in the wizard. We will create an operation and run it using wizard as execution context.
 */
public boolean performFinish(){
  boolean formIsPerformed;
  if (regexpFileWizardPage3 == null) {
    formIsPerformed=regexpFileWizardPage2.isPageComplete();
  }
 else {
    formIsPerformed=regexpFileWizardPage3.isPageComplete();
  }
  if (formIsPerformed) {
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    try {
      if (creation) {
        String nextId=factory.getNextId();
        connectionProperty.setId(nextId);
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        factory.create(connectionItem,regexpFileWizardPage0.getDestinationPath());
      }
 else {
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        RepositoryUpdateManager.updateFileConnection(connectionItem);
        factory.save(connectionItem);
        closeLockStrategy();
      }
      factory.saveProject(ProjectManager.getInstance().getCurrentProject());
    }
 catch (    PersistenceException e) {
      String detailError=e.toString();
      new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),detailError);
      log.error(Messages.getString("String_Node_Str") + "String_Node_Str" + detailError);
      return false;
    }
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * This method determine if the 'Finish' button is enable This method is called when 'Finish' button is pressed in the wizard. We will create an operation and run it using wizard as execution context.
 */
public boolean performFinish(){
  boolean formIsPerformed;
  if (regexpFileWizardPage3 == null) {
    formIsPerformed=regexpFileWizardPage2.isPageComplete();
  }
 else {
    formIsPerformed=regexpFileWizardPage3.isPageComplete();
  }
  if (formIsPerformed) {
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    try {
      if (creation) {
        String nextId=factory.getNextId();
        connectionProperty.setId(nextId);
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        factory.create(connectionItem,regexpFileWizardPage0.getDestinationPath());
      }
 else {
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        RepositoryUpdateManager.updateFileConnection(connectionItem);
        updateConnectionItem();
      }
      factory.saveProject(ProjectManager.getInstance().getCurrentProject());
    }
 catch (    Exception e) {
      String detailError=e.toString();
      new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),detailError);
      log.error(Messages.getString("String_Node_Str") + "String_Node_Str" + detailError);
      return false;
    }
    return true;
  }
 else {
    return false;
  }
}
Program: 129614
Project: 129614
Buggy source:
@Override public boolean performFinish(){
  boolean formIsPerformed=false;
  formIsPerformed=page1.isPageComplete();
  if (formIsPerformed) {
    IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
    try {
      if (creation) {
        String nextId=factory.getNextId();
        connectionProperty.setId(nextId);
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        factory.create(connectionItem,salesforceSchemaWizardPage0.getDestinationPath());
      }
 else {
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        RepositoryUpdateManager.updateFileConnection(connectionItem);
        factory.save(connectionItem);
        closeLockStrategy();
      }
      ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());
    }
 catch (    PersistenceException e) {
      String detailError=e.toString();
      new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),detailError);
      log.error(Messages.getString("String_Node_Str") + "String_Node_Str" + detailError);
      return false;
    }
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  boolean formIsPerformed=false;
  formIsPerformed=page1.isPageComplete();
  if (formIsPerformed) {
    IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
    try {
      if (creation) {
        String nextId=factory.getNextId();
        connectionProperty.setId(nextId);
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        factory.create(connectionItem,salesforceSchemaWizardPage0.getDestinationPath());
      }
 else {
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        RepositoryUpdateManager.updateFileConnection(connectionItem);
        updateConnectionItem();
      }
      ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());
    }
 catch (    Exception e) {
      String detailError=e.toString();
      new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),detailError);
      log.error(Messages.getString("String_Node_Str") + "String_Node_Str" + detailError);
      return false;
    }
    return true;
  }
 else {
    return false;
  }
}
Program: 129615
Project: 129615
Buggy source:
/** 
 * This method determine if the 'Finish' button is enable This method is called when 'Finish' button is pressed in the wizard. We will create an operation and run it using wizard as execution context.
 */
@Override public boolean performFinish(){
  boolean formIsPerformed=true;
  connectionItem.setConnection((SalesforceSchemaConnection)EcoreUtil.copy(temConnection));
  if (formIsPerformed) {
    IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
    try {
      if (creation) {
        factory.create(connectionItem,new Path("String_Node_Str"));
      }
 else {
        RepositoryUpdateManager.updateFileConnection(connectionItem);
        factory.save(connectionItem);
        closeLockStrategy();
      }
      ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());
      ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());
    }
 catch (    PersistenceException e) {
      String detailError=e.toString();
      new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),detailError);
      log.error(Messages.getString("String_Node_Str") + "String_Node_Str" + detailError);
      return false;
    }
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * This method determine if the 'Finish' button is enable This method is called when 'Finish' button is pressed in the wizard. We will create an operation and run it using wizard as execution context.
 */
@Override public boolean performFinish(){
  boolean formIsPerformed=true;
  connectionItem.setConnection((SalesforceSchemaConnection)EcoreUtil.copy(temConnection));
  if (formIsPerformed) {
    IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
    try {
      if (creation) {
        factory.create(connectionItem,new Path("String_Node_Str"));
      }
 else {
        RepositoryUpdateManager.updateFileConnection(connectionItem);
        updateConnectionItem();
      }
      ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());
      ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());
    }
 catch (    Exception e) {
      String detailError=e.toString();
      new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),detailError);
      log.error(Messages.getString("String_Node_Str") + "String_Node_Str" + detailError);
      return false;
    }
    return true;
  }
 else {
    return false;
  }
}
Program: 129617
Project: 129617
Buggy source:
@Override public boolean performFinish(){
  if (isSinglePageOnly) {
    return true;
  }
  boolean formIsPerformed;
  if (ldapSchemaWizardPage4 == null) {
    formIsPerformed=ldapSchemaWizardPage3.isPageComplete();
  }
 else {
    formIsPerformed=ldapSchemaWizardPage4.isPageComplete();
  }
  if (formIsPerformed) {
    IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
    try {
      if (creation) {
        String nextId=factory.getNextId();
        connectionProperty.setId(nextId);
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        factory.create(connectionItem,ldapSchemaWizardPage0.getDestinationPath());
      }
 else {
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        RepositoryUpdateManager.updateMultiSchema(connectionItem,oldMetadataTable,oldTableMap);
        factory.save(connectionItem);
        closeLockStrategy();
      }
    }
 catch (    PersistenceException e) {
      String detailError=e.toString();
      new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),detailError);
      log.error(Messages.getString("String_Node_Str") + "String_Node_Str" + detailError);
      return false;
    }
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  if (isSinglePageOnly) {
    return true;
  }
  boolean formIsPerformed;
  if (ldapSchemaWizardPage4 == null) {
    formIsPerformed=ldapSchemaWizardPage3.isPageComplete();
  }
 else {
    formIsPerformed=ldapSchemaWizardPage4.isPageComplete();
  }
  if (formIsPerformed) {
    IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
    try {
      if (creation) {
        String nextId=factory.getNextId();
        connectionProperty.setId(nextId);
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        factory.create(connectionItem,ldapSchemaWizardPage0.getDestinationPath());
      }
 else {
        connectionProperty.setLabel(connectionProperty.getDisplayName());
        RepositoryUpdateManager.updateMultiSchema(connectionItem,oldMetadataTable,oldTableMap);
        updateConnectionItem();
      }
    }
 catch (    Exception e) {
      String detailError=e.toString();
      new ErrorDialogWidthDetailArea(getShell(),PID,Messages.getString("String_Node_Str"),detailError);
      log.error(Messages.getString("String_Node_Str") + "String_Node_Str" + detailError);
      return false;
    }
    return true;
  }
 else {
    return false;
  }
}
Program: 129620
Project: 129620
Buggy source:
@Override protected IStatus run(IProgressMonitor monitor){
  ERepositoryObjectType type=ERepositoryObjectType.getItemType(property.getItem());
  try {
    if (GlobalServiceRegister.getDefault().isServiceRegistered(IProxyRepositoryService.class)) {
      IProxyRepositoryService service=(IProxyRepositoryService)GlobalServiceRegister.getDefault().getService(IProxyRepositoryService.class);
      listExistingObjects=service.getProxyRepositoryFactory().getAll(type,true,false);
    }
  }
 catch (  PersistenceException e) {
    return new org.eclipse.core.runtime.Status(IStatus.ERROR,"String_Node_Str",1,"String_Node_Str",e);
  }
  retrieveNameFinished=true;
  return Status.OK_STATUS;
}

Fixed version (ground truth):
public void run(){
  evaluateTextField();
}
Program: 129621
Project: 129621
Buggy source:
protected void evaluateTextField(){
  if (nameText.getText().length() == 0) {
    nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
  }
 else   if (!Pattern.matches(RepositoryConstants.getPattern(getRepositoryObjectType()),nameText.getText()) || nameText.getText().trim().contains("String_Node_Str")) {
    nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
  }
 else   if (isKeywords(nameText.getText()) || "String_Node_Str".equalsIgnoreCase(nameText.getText())) {
    nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
  }
 else   if (nameModifiedByUser) {
    if (retrieveNameFinished) {
      if (!isValid(nameText.getText())) {
        nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
      }
 else {
        nameStatus=createOkStatus();
      }
    }
 else {
      nameStatus=createStatus(IStatus.ERROR,"String_Node_Str");
    }
  }
 else {
    nameStatus=createOkStatus();
  }
  if (property != null && nameStatus.getSeverity() == IStatus.OK) {
    property.setLabel(StringUtils.trimToNull(nameText.getText()));
  }
  updatePageStatus();
}

Fixed version (ground truth):
protected void evaluateTextField(){
  if (nameText == null || nameText.isDisposed()) {
    return;
  }
  if (nameText.getText().length() == 0) {
    nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
  }
 else   if (!Pattern.matches(RepositoryConstants.getPattern(getRepositoryObjectType()),nameText.getText()) || nameText.getText().trim().contains("String_Node_Str")) {
    nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
  }
 else   if (isKeywords(nameText.getText()) || "String_Node_Str".equalsIgnoreCase(nameText.getText())) {
    nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
  }
 else   if (nameModifiedByUser) {
    if (retrieveNameFinished) {
      if (!isValid(nameText.getText())) {
        nameStatus=createStatus(IStatus.ERROR,Messages.getString("String_Node_Str"));
      }
 else {
        nameStatus=createOkStatus();
      }
    }
 else {
      nameStatus=createStatus(IStatus.ERROR,"String_Node_Str");
    }
  }
 else {
    nameStatus=createOkStatus();
  }
  if (property != null && nameStatus.getSeverity() == IStatus.OK) {
    property.setLabel(StringUtils.trimToNull(nameText.getText()));
  }
  updatePageStatus();
}
Program: 129622
Project: 129622
Buggy source:
protected PropertiesWizardPage(String pageName,final Property property,IPath destinationPath,boolean readOnly,boolean editPath,String lastVersionFound){
  super(pageName);
  statusHelper=new StatusHelper(CoreRuntimePlugin.getInstance().getProxyRepositoryFactory());
  this.destinationPath=destinationPath;
  this.readOnly=readOnly;
  this.editPath=editPath;
  nameStatus=createOkStatus();
  purposeStatus=createOkStatus();
  commentStatus=createOkStatus();
  this.lastVersionFound=lastVersionFound;
  Job job=new Job("String_Node_Str"){
    @Override protected IStatus run(    IProgressMonitor monitor){
      ERepositoryObjectType type=ERepositoryObjectType.getItemType(property.getItem());
      try {
        if (GlobalServiceRegister.getDefault().isServiceRegistered(IProxyRepositoryService.class)) {
          IProxyRepositoryService service=(IProxyRepositoryService)GlobalServiceRegister.getDefault().getService(IProxyRepositoryService.class);
          listExistingObjects=service.getProxyRepositoryFactory().getAll(type,true,false);
        }
      }
 catch (      PersistenceException e) {
        return new org.eclipse.core.runtime.Status(IStatus.ERROR,"String_Node_Str",1,"String_Node_Str",e);
      }
      retrieveNameFinished=true;
      return Status.OK_STATUS;
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.BUILD);
  job.schedule();
  this.property=property;
}

Fixed version (ground truth):
protected PropertiesWizardPage(String pageName,final Property property,IPath destinationPath,boolean readOnly,boolean editPath,String lastVersionFound){
  super(pageName);
  statusHelper=new StatusHelper(CoreRuntimePlugin.getInstance().getProxyRepositoryFactory());
  this.destinationPath=destinationPath;
  this.readOnly=readOnly;
  this.editPath=editPath;
  nameStatus=createOkStatus();
  purposeStatus=createOkStatus();
  commentStatus=createOkStatus();
  this.lastVersionFound=lastVersionFound;
  Job job=new Job("String_Node_Str"){
    @Override protected IStatus run(    IProgressMonitor monitor){
      ERepositoryObjectType type=ERepositoryObjectType.getItemType(property.getItem());
      try {
        if (GlobalServiceRegister.getDefault().isServiceRegistered(IProxyRepositoryService.class)) {
          IProxyRepositoryService service=(IProxyRepositoryService)GlobalServiceRegister.getDefault().getService(IProxyRepositoryService.class);
          listExistingObjects=service.getProxyRepositoryFactory().getAll(type,true,false);
        }
      }
 catch (      PersistenceException e) {
        return new org.eclipse.core.runtime.Status(IStatus.ERROR,"String_Node_Str",1,"String_Node_Str",e);
      }
      retrieveNameFinished=true;
      Display d=Display.getDefault();
      if (d != null) {
        d.syncExec(new Runnable(){
          public void run(){
            evaluateTextField();
          }
        }
);
      }
      return Status.OK_STATUS;
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.BUILD);
  job.schedule();
  this.property=property;
}
Program: 129623
Project: 129623
Buggy source:
public String getText(Object element){
  return ((Folder)element).getName();
}

Fixed version (ground truth):
@Override public String getText(Object element){
  return ((Folder)element).getName();
}
Program: 129624
Project: 129624
Buggy source:
public Image getImage(Object element){
  ECoreImage image=(dialog.getExpandedState(element) ? ECoreImage.FOLDER_OPEN_ICON : ECoreImage.FOLDER_CLOSE_ICON);
  return ImageProvider.getImage(image);
}

Fixed version (ground truth):
@Override public Image getImage(Object element){
  ECoreImage image=(dialog.getExpandedState(element) ? ECoreImage.FOLDER_OPEN_ICON : ECoreImage.FOLDER_CLOSE_ICON);
  return ImageProvider.getImage(image);
}
Program: 129627
Project: 129627
Buggy source:
protected void updateContent(){
  if (property != null) {
    nameText.setText(StringUtils.trimToEmpty(property.getDisplayName()));
    purposeText.setText(StringUtils.trimToEmpty(property.getPurpose()));
    descriptionText.setText(StringUtils.trimToEmpty(property.getDescription()));
    authorText.setText(StringUtils.trimToEmpty(property.getAuthor().getLogin()));
    lockerText.setText("String_Node_Str");
    ProxyRepositoryFactory instance=ProxyRepositoryFactory.getInstance();
    Item item=property.getItem();
    if (instance.getStatus(item) == ERepositoryStatus.LOCK_BY_USER || (instance.getStatus(item) == ERepositoryStatus.LOCK_BY_OTHER)) {
      LockInfo lockInfo=instance.getLockInfo(item);
      if (lockInfo != null) {
        String locker=lockInfo.getUser();
        if (locker != null) {
          lockerText.setText(locker);
        }
      }
    }
    versionText.setText(property.getVersion());
    statusText.setText(statusHelper.getStatusLabel(property.getStatusCode()));
    if (destinationPath != null) {
      pathText.setText(destinationPath.toString());
    }
  }
  evaluateFields();
}

Fixed version (ground truth):
protected void updateContent(){
  if (property != null) {
    nameText.setText(StringUtils.trimToEmpty(property.getDisplayName()));
    purposeText.setText(StringUtils.trimToEmpty(property.getPurpose()));
    descriptionText.setText(StringUtils.trimToEmpty(property.getDescription()));
    authorText.setText(StringUtils.trimToEmpty(property.getAuthor().getLogin()));
    lockerText.setText("String_Node_Str");
    ProxyRepositoryFactory instance=ProxyRepositoryFactory.getInstance();
    Item item=property.getItem();
    if (instance.getStatus(item) == ERepositoryStatus.LOCK_BY_USER || (instance.getStatus(item) == ERepositoryStatus.LOCK_BY_OTHER)) {
      LockInfo lockInfo=instance.getLockInfo(item);
      if (lockInfo != null) {
        String locker=lockInfo.getUser();
        if (locker != null) {
          lockerText.setText(locker);
        }
      }
    }
    if (allowVerchange) {
      versionText.setText(property.getVersion());
    }
    statusText.setText(statusHelper.getStatusLabel(property.getStatusCode()));
    if (destinationPath != null) {
      pathText.setText(destinationPath.toString());
    }
  }
  evaluateFields();
}
Program: 129633
Project: 129633
Buggy source:
private static boolean updateQueryObject(Object parameter,boolean show,boolean onlySimpleShow,RepositoryNode node){
  Item item=node.getObject().getProperty().getItem();
  IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
  List<IRepositoryViewObject> updateList=new ArrayList<IRepositoryViewObject>();
  List<RelationshipItemBuilder.Relation> relations=null;
  if (parameter instanceof Query) {
    String id=item.getProperty().getId() + "String_Node_Str" + ((Query)parameter).getLabel();
    relations=RelationshipItemBuilder.getInstance().getItemsRelatedTo(id,RelationshipItemBuilder.LATEST_VERSION,RelationshipItemBuilder.QUERY_RELATION);
  }
  RepositoryUpdateManager repositoryUpdateManager=new RepositoryUpdateManager(parameter,relations){
    @Override public Set<EUpdateItemType> getTypes(){
      Set<EUpdateItemType> types=new HashSet<EUpdateItemType>();
      types.add(EUpdateItemType.NODE_QUERY);
      return types;
    }
  }
;
  return repositoryUpdateManager.doWork(show,onlySimpleShow);
}

Fixed version (ground truth):
private static boolean updateQueryObject(Object parameter,boolean show,boolean onlySimpleShow,RepositoryNode node){
  Item item=node.getObject().getProperty().getItem();
  IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
  List<IRepositoryViewObject> updateList=new ArrayList<IRepositoryViewObject>();
  List<RelationshipItemBuilder.Relation> relations=null;
  if (parameter instanceof Query) {
    String id=item.getProperty().getId() + "String_Node_Str" + ((Query)parameter).getLabel();
    relations=RelationshipItemBuilder.getInstance().getItemsRelatedTo(id,RelationshipItemBuilder.LATEST_VERSION,RelationshipItemBuilder.QUERY_RELATION);
  }
  RepositoryUpdateManager repositoryUpdateManager=new RepositoryUpdateManager(parameter,relations,true){
    @Override public Set<EUpdateItemType> getTypes(){
      Set<EUpdateItemType> types=new HashSet<EUpdateItemType>();
      types.add(EUpdateItemType.NODE_QUERY);
      return types;
    }
  }
;
  return repositoryUpdateManager.doWork(show,onlySimpleShow);
}
Program: 129634
Project: 129634
Buggy source:
public Saveable[] getSaveables(){
  return this.getActiveSaveables();
}

Fixed version (ground truth):
@Override public Saveable[] getSaveables(){
  Saveable[] superSaveables=super.getSaveables();
  Saveable[] allSavables=Arrays.copyOf(superSaveables,superSaveables.length + 1);
  allSavables[allSavables.length - 1]=editorSavable;
  return allSavables;
}
Program: 129635
Project: 129635
Buggy source:
@Override public void dispose(){
  IWorkspace workspace=ResourcesPlugin.getWorkspace();
  if (workspace != null && resouceChangeVisitor != null) {
    workspace.removeResourceChangeListener(resouceChangeVisitor);
  }
}

Fixed version (ground truth):
@Override public void dispose(){
  IWorkspace workspace=ResourcesPlugin.getWorkspace();
  if (workspace != null && resouceChangeVisitor != null) {
    workspace.removeResourceChangeListener(resouceChangeVisitor);
  }
  super.dispose();
}
Program: 129636
Project: 129636
Buggy source:
@Override public void dispose(){
  if (deleteFolderListener != null) {
    project.eAdapters().remove(deleteFolderListener);
  }
  super.dispose();
}

Fixed version (ground truth):
@Override public void dispose(){
  if (deleteFolderListener != null) {
    project.eAdapters().remove(deleteFolderListener);
    deleteFolderListener=null;
  }
  if (mergeRefListener != null) {
    IPreferenceStore preferenceStore=RepositoryManager.getPreferenceStore();
    preferenceStore.removePropertyChangeListener(mergeRefListener);
    mergeRefListener=null;
  }
  super.dispose();
}
Program: 129637
Project: 129637
Buggy source:
public static List<FOXTreeNode> parseMDMUpdateReport(Shell shell,boolean needConfirm){
  boolean fileExist=false;
  String filePath="String_Node_Str";
  try {
    Bundle b=Platform.getBundle("String_Node_Str");
    if (b == null)     return null;
    URL url=FileLocator.toFileURL(FileLocator.find(b,new Path("String_Node_Str"),null));
    if (url != null) {
      filePath=copyToTempFile(url,"String_Node_Str");
      fileExist=true;
    }
  }
 catch (  IOException e) {
    fileExist=false;
  }
  if (!fileExist) {
    return null;
  }
  boolean pass=true;
  if (needConfirm) {
    pass=MessageDialog.openConfirm(shell,"String_Node_Str","String_Node_Str");
  }
  if (pass) {
    try {
      if (XmlUtil.isXSDFile(filePath)) {
        XSDSchema xsdSchema=getXSDSchema(filePath);
        List<ATreeNode> allTreeNodes=new XSDPopulationUtil2().getAllRootNodes(xsdSchema);
        if (!allTreeNodes.isEmpty()) {
          return getFoxTreeNodesByRootNode(xsdSchema,allTreeNodes.get(0));
        }
      }
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
  }
  return null;
}

Fixed version (ground truth):
public static List<FOXTreeNode> parseMDMUpdateReport(Shell shell,boolean needConfirm){
  boolean fileExist=false;
  String filePath="String_Node_Str";
  try {
    Bundle b=Platform.getBundle("String_Node_Str");
    if (b == null)     return null;
    URL fileUrl=FileLocator.find(b,new Path("String_Node_Str"),null);
    if (fileUrl == null) {
      return null;
    }
    URL url=FileLocator.toFileURL(fileUrl);
    if (url != null) {
      filePath=copyToTempFile(url,"String_Node_Str");
      fileExist=true;
    }
  }
 catch (  IOException e) {
    fileExist=false;
  }
  if (!fileExist) {
    return null;
  }
  boolean pass=true;
  if (needConfirm) {
    pass=MessageDialog.openConfirm(shell,"String_Node_Str","String_Node_Str");
  }
  if (pass) {
    try {
      if (XmlUtil.isXSDFile(filePath)) {
        XSDSchema xsdSchema=getXSDSchema(filePath);
        List<ATreeNode> allTreeNodes=new XSDPopulationUtil2().getAllRootNodes(xsdSchema);
        if (!allTreeNodes.isEmpty()) {
          return getFoxTreeNodesByRootNode(xsdSchema,allTreeNodes.get(0));
        }
      }
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
  }
  return null;
}
Program: 129639
Project: 129639
Buggy source:
/** 
 * DOC ocarbone DatabaseTableWizard constructor comment.
 * @param workbench
 * @param idNodeDbConnection
 * @param metadataTable
 * @param existingNames
 * @param managerConnection
 */
@SuppressWarnings("String_Node_Str") public SalesforceModulesWizard(IWorkbench workbench,boolean creation,IRepositoryViewObject object,MetadataTable metadataTable,String[] existingNames,boolean forceReadOnly,ManagerConnection managerConnection,IMetadataConnection metadataConnection){
  super(workbench,creation,forceReadOnly);
  this.existingNames=existingNames;
  this.managerConnection=managerConnection;
  this.metadataConnection=metadataConnection;
  setNeedsProgressMonitor(true);
  setRepositoryObject(object);
  isRepositoryObjectEditable();
  initLockStrategy();
  this.selectedMetadataTable=metadataTable;
  this.connectionItem=(ConnectionItem)object.getProperty().getItem();
  if (connectionItem != null) {
    cloneBaseConnection((SalesforceSchemaConnection)connectionItem.getConnection());
  }
}

Fixed version (ground truth):
/** 
 * DOC ocarbone DatabaseTableWizard constructor comment.
 * @param workbench
 * @param idNodeDbConnection
 * @param metadataTable
 * @param existingNames
 * @param managerConnection
 */
public SalesforceModulesWizard(IWorkbench workbench,boolean creation,IRepositoryViewObject object,MetadataTable metadataTable,String[] existingNames,boolean forceReadOnly,ManagerConnection managerConnection,IMetadataConnection metadataConnection){
  super(workbench,creation,forceReadOnly);
  this.existingNames=existingNames;
  this.metadataConnection=metadataConnection;
  setNeedsProgressMonitor(true);
  setRepositoryObject(object);
  isRepositoryObjectEditable();
  initLockStrategy();
  this.connectionItem=(ConnectionItem)object.getProperty().getItem();
  if (connectionItem != null) {
    cloneBaseConnection((SalesforceSchemaConnection)connectionItem.getConnection());
  }
}
Program: 129643
Project: 129643
Buggy source:
/** 
 * TableForm Constructor to use by RCP Wizard.
 * @param parent
 * @param connection
 * @param page
 * @param metadataTable
 * @param page
 * @param managerConnection2
 */
public DatabaseTableForm(Composite parent,ConnectionItem connectionItem,MetadataTable metadataTable,ManagerConnection managerConnection,IWizardPage page,DatabaseConnection temConnection,IMetadataConnection metadataconnection){
  super(parent,SWT.NONE);
  this.managerConnection=managerConnection;
  this.connectionItem=connectionItem;
  this.parentWizardPage=page;
  this.temConnection=temConnection;
  this.metadataTable=metadataTable;
  this.metadataconnection=metadataconnection;
  final Set<MetadataTable> tables=ConnectionHelper.getTables(temConnection);
  for (  MetadataTable t : tables) {
    this.metadataTable=t;
    break;
  }
  this.typeName=EDatabaseTypeName.getTypeFromDbType(metadataconnection.getDbType());
  if (typeName != null && typeName.isUseProvider()) {
    this.provider=ExtractMetaDataFromDataBase.getProviderByDbType(metadataconnection.getDbType());
  }
  setupForm();
}

Fixed version (ground truth):
/** 
 * TableForm Constructor to use by RCP Wizard.
 * @param parent
 * @param connection
 * @param page
 * @param metadataTable
 * @param page
 * @param managerConnection2
 */
public DatabaseTableForm(Composite parent,ConnectionItem connectionItem,MetadataTable metadataTable,ManagerConnection managerConnection,IWizardPage page,DatabaseConnection temConnection,IMetadataConnection metadataconnection){
  super(parent,SWT.NONE);
  this.managerConnection=managerConnection;
  this.connectionItem=connectionItem;
  this.parentWizardPage=page;
  this.temConnection=temConnection;
  this.metadataTable=metadataTable;
  this.metadataconnection=metadataconnection;
  final Set<MetadataTable> tables=ConnectionHelper.getTables(temConnection);
  for (  MetadataTable t : tables) {
    if ((metadataTable != null && t.getLabel().equals(metadataTable.getLabel())) || metadataTable == null) {
      this.metadataTable=t;
      break;
    }
  }
  this.typeName=EDatabaseTypeName.getTypeFromDbType(metadataconnection.getDbType());
  if (typeName != null && typeName.isUseProvider()) {
    this.provider=ExtractMetaDataFromDataBase.getProviderByDbType(metadataconnection.getDbType());
  }
  setupForm();
}
Program: 129644
Project: 129644
Buggy source:
private void hideHiddenNodesDependsUserRight() throws JSONException {
  String[] userRights=getUserAuthorization();
  List<IRepositoryNode> nodes=new ArrayList<IRepositoryNode>(this.getChildren());
  for (  IRepositoryNode node : nodes) {
    ERepositoryObjectType contentType=node.getContentType();
    if (contentType == null) {
      continue;
    }
    String[] contentRight=contentType.getUserRight();
    if (contentRight != null && contentRight.length > 0 && userRights != null && userRights.length > 0) {
      for (int i=0; i < contentRight.length; i++) {
        if (!ArrayUtils.contains(userRights,contentRight[i])) {
          removeNode(this,node);
          removeContentType(contentType);
        }
      }
    }
  }
}

Fixed version (ground truth):
private void hideHiddenNodesDependsUserRight() throws JSONException {
  String[] userRights=getUserAuthorization();
  List<IRepositoryNode> nodes=new ArrayList<IRepositoryNode>(this.getChildren());
  for (  IRepositoryNode node : nodes) {
    ERepositoryObjectType contentType=node.getContentType();
    if (contentType == null) {
      continue;
    }
    String[] contentRight=contentType.getUserRight();
    if (contentRight != null && contentRight.length > 0 && userRights != null && userRights.length > 0) {
      for (int i=0; i < contentRight.length; i++) {
        if (!ArrayUtils.contains(userRights,contentRight[i])) {
          removeNode(this,node);
        }
      }
    }
  }
}
Program: 129645
Project: 129645
Buggy source:
/** 
 * DOC sgandon Comment method "registerAdapters".
 */
private void registerAdapters(){
  Platform.getAdapterManager().registerAdapters(new DescriptorAdapterFactory(),TalendRepositoryRoot.class);
}

Fixed version (ground truth):
/** 
 * DOC sgandon Comment method "registerAdapters".
 */
private void registerAdapters(){
  Platform.getAdapterManager().registerAdapters(new DescriptorAdapterFactory(),TalendRepositoryRoot.class);
  Platform.getAdapterManager().registerAdapters(new ContentAdapterFactory(),TalendRepositoryRoot.class);
}
Program: 129646
Project: 129646
Buggy source:
protected String[] getExtensionIdsToActivate(String perspectiveId){
  if (perspectiveFilterExtensionsReader == null) {
    perspectiveFilterExtensionsReader=new PerspectiveFilterRegistryReader(getActionProviderId());
    perspectiveFilterExtensionsReader.readRegistry();
  }
  INavigatorContentService contentService=getNavigatorContentService();
  String[] filteredIds=perspectiveFilterExtensionsReader.getContentProviderFilteredIds(contentService,perspectiveId);
  return filteredIds;
}

Fixed version (ground truth):
protected String[] getExtensionIdsToActivate(String perspectiveId){
  if (perspectiveFilterExtensionsReader == null) {
    perspectiveFilterExtensionsReader=new PerspectiveFilterRegistryReader(getActionProviderId());
    perspectiveFilterExtensionsReader.readRegistry();
  }
  INavigatorContentService contentService=getNavigatorContentService();
  String[] filteredIds=perspectiveFilterExtensionsReader.getContentProviderFilteredIds(contentService,perspectiveId);
  return RepositoryNodeFilterHelper.filterRemovedNavigatorContents(filteredIds);
}
Program: 129647
Project: 129647
Buggy source:
private void unfilterView(boolean restoring){
  refreshNavigatorContents(getNavigatorContentService().getVisibleExtensionIds(),restoring);
}

Fixed version (ground truth):
private void unfilterView(boolean restoring){
  refreshNavigatorContents(RepositoryNodeFilterHelper.filterRemovedNavigatorContents(getNavigatorContentService().getVisibleExtensionIds()),restoring);
}
Program: 129649
Project: 129649
Buggy source:
@Override protected void run() throws LoginException, PersistenceException {
  try {
    final Item newItem=factory.copy(item,path,true);
    newItem.getProperty().setLabel(newName);
    newItem.getProperty().setDisplayName(newName);
    if (newItem instanceof RoutineItem) {
      synDuplicatedRoutine((RoutineItem)newItem);
    }
    ICamelDesignerCoreService service=null;
    if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
      service=(ICamelDesignerCoreService)GlobalServiceRegister.getDefault().getService(ICamelDesignerCoreService.class);
    }
    if (service != null && service.isInstanceofCamelBeans(item)) {
      synDuplicatedBean(newItem);
    }
    if (newItem instanceof ProcessItem) {
      RelationshipItemBuilder.getInstance().addOrUpdateItem(newItem);
    }
    if (newItem instanceof ConnectionItem) {
      ConnectionItem connectionItem=(ConnectionItem)newItem;
      connectionItem.getConnection().getSupplierDependency().clear();
    }
    factory.save(newItem);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  IWorkspace workspace=ResourcesPlugin.getWorkspace();
  try {
    ISchedulingRule schedulingRule=workspace.getRoot();
    workspace.run(op,schedulingRule,IWorkspace.AVOID_UPDATE,monitor);
  }
 catch (  CoreException e) {
    throw new InvocationTargetException(e);
  }
}
Program: 129653
Project: 129653
Buggy source:
/** 
 * TableForm Constructor to use by RCP Wizard.
 * @param parent
 * @param connection
 * @param page
 * @param metadataTable
 * @param page
 * @param managerConnection2
 */
public DatabaseTableForm(Composite parent,ConnectionItem connectionItem,MetadataTable metadataTable,ManagerConnection managerConnection,IWizardPage page,DatabaseConnection temConnection,IMetadataConnection metadataconnection){
  super(parent,SWT.NONE);
  this.managerConnection=managerConnection;
  this.connectionItem=connectionItem;
  this.parentWizardPage=page;
  this.temConnection=temConnection;
  this.metadataTable=metadataTable;
  this.metadataconnection=metadataconnection;
  final Set<MetadataTable> tables=ConnectionHelper.getTables(temConnection);
  for (  MetadataTable t : tables) {
    this.metadataTable=t;
    break;
  }
  this.typeName=EDatabaseTypeName.getTypeFromDbType(metadataconnection.getDbType());
  if (typeName != null && typeName.isUseProvider()) {
    this.provider=ExtractMetaDataFromDataBase.getProviderByDbType(metadataconnection.getDbType());
  }
  setupForm();
}

Fixed version (ground truth):
/** 
 * TableForm Constructor to use by RCP Wizard.
 * @param parent
 * @param connection
 * @param page
 * @param metadataTable
 * @param page
 * @param managerConnection2
 */
public DatabaseTableForm(Composite parent,ConnectionItem connectionItem,MetadataTable metadataTable,ManagerConnection managerConnection,IWizardPage page,DatabaseConnection temConnection,IMetadataConnection metadataconnection){
  super(parent,SWT.NONE);
  this.managerConnection=managerConnection;
  this.connectionItem=connectionItem;
  this.parentWizardPage=page;
  this.temConnection=temConnection;
  this.metadataTable=metadataTable;
  this.metadataconnection=metadataconnection;
  final Set<MetadataTable> tables=ConnectionHelper.getTables(temConnection);
  for (  MetadataTable t : tables) {
    if ((metadataTable != null && t.getLabel().equals(metadataTable.getLabel())) || metadataTable == null) {
      this.metadataTable=t;
      break;
    }
  }
  this.typeName=EDatabaseTypeName.getTypeFromDbType(metadataconnection.getDbType());
  if (typeName != null && typeName.isUseProvider()) {
    this.provider=ExtractMetaDataFromDataBase.getProviderByDbType(metadataconnection.getDbType());
  }
  setupForm();
}
Program: 129654
Project: 129654
Buggy source:
private void runInProgressDialog(IRunnableWithProgress runnable){
  try {
    ProgressMonitorDialog progress=new ProgressMonitorDialog(getViewer().getControl().getShell());
    progress.run(false,false,runnable);
  }
 catch (  InvocationTargetException e) {
    ExceptionHandler.process(e);
  }
catch (  InterruptedException e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
private void runInProgressDialog(final IWorkspaceRunnable op){
  final IRunnableWithProgress iRunnableWithProgress=new IRunnableWithProgress(){
    public void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      IWorkspace workspace=ResourcesPlugin.getWorkspace();
      try {
        ISchedulingRule schedulingRule=workspace.getRoot();
        workspace.run(op,schedulingRule,IWorkspace.AVOID_UPDATE,monitor);
      }
 catch (      CoreException e) {
        throw new InvocationTargetException(e);
      }
    }
  }
;
  RepositoryWorkUnit<Object> repositoryWorkUnit=new RepositoryWorkUnit<Object>("String_Node_Str",this){
    @Override protected void run() throws LoginException, PersistenceException {
      try {
        ProgressMonitorDialog progress=new ProgressMonitorDialog(getViewer().getControl().getShell());
        progress.run(false,false,iRunnableWithProgress);
      }
 catch (      InvocationTargetException e) {
        ExceptionHandler.process(e);
      }
catch (      InterruptedException e) {
        ExceptionHandler.process(e);
      }
    }
  }
;
  repositoryWorkUnit.setAvoidUnloadResources(true);
  CoreRuntimePlugin.getInstance().getProxyRepositoryFactory().executeRepositoryWorkUnit(repositoryWorkUnit);
}
Program: 129655
Project: 129655
Buggy source:
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  IWorkspace workspace=ResourcesPlugin.getWorkspace();
  try {
    ISchedulingRule schedulingRule=workspace.getRoot();
    workspace.run(op,schedulingRule,IWorkspace.AVOID_UPDATE,monitor);
  }
 catch (  CoreException e) {
    throw new InvocationTargetException(e);
  }
}

Fixed version (ground truth):
@Override protected void run() throws LoginException, PersistenceException {
  try {
    for (    Object obj : ((StructuredSelection)data).toArray()) {
      final RepositoryNode sourceNode=(RepositoryNode)obj;
      monitor.subTask(Messages.getString("String_Node_Str") + sourceNode.getObject().getLabel());
      MoveObjectAction.getInstance().execute(sourceNode,targetNode,true);
    }
  }
 catch (  Exception e) {
    throw new PersistenceException(e);
  }
}
Program: 129657
Project: 129657
Buggy source:
private void clearTableItem(TableNode item,boolean deleteFromConnection){
  if (item == null) {
    return;
  }
  if (item != null && item instanceof TableNode) {
    TableNode node=(TableNode)item;
    if (node.getType() == TableNode.TABLE) {
      if (deleteFromConnection) {
        deleteTable(item);
      }
    }
  }
}

Fixed version (ground truth):
private void clearTableItem(TableNode item,boolean deleteFromConnection){
  if (item == null) {
    return;
  }
  if (item != null && item instanceof TableNode) {
    TableNode node=item;
    if (node.getType() == TableNode.TABLE) {
      if (deleteFromConnection) {
        deleteTable(item);
      }
    }
  }
}
Program: 129660
Project: 129660
Buggy source:
public static boolean isValid(String str){
  Pattern pattern=Pattern.compile("String_Node_Str");
  return pattern.matcher(str).matches();
}

Fixed version (ground truth):
public static boolean isValid(String str){
  Pattern pattern=Pattern.compile("String_Node_Str");
  ;
  return pattern.matcher(str).matches();
}
Program: 129661
Project: 129661
Buggy source:
@Override protected void run() throws LoginException, PersistenceException {
  try {
    final Item newItem=factory.copy(item,path,true);
    newItem.getProperty().setLabel(newName);
    newItem.getProperty().setDisplayName(newName);
    if (newItem instanceof RoutineItem) {
      synDuplicatedRoutine((RoutineItem)newItem);
    }
    ICamelDesignerCoreService service=null;
    if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
      service=(ICamelDesignerCoreService)GlobalServiceRegister.getDefault().getService(ICamelDesignerCoreService.class);
    }
    if (service != null && service.isInstanceofCamelBeans(item)) {
      synDuplicatedBean(newItem);
    }
    if (newItem instanceof ProcessItem) {
      RelationshipItemBuilder.getInstance().addOrUpdateItem((ProcessItem)newItem);
    }
    if (newItem instanceof ConnectionItem) {
      ConnectionItem connectionItem=(ConnectionItem)newItem;
      connectionItem.getConnection().getSupplierDependency().clear();
    }
    factory.save(newItem);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
@Override protected void run() throws LoginException, PersistenceException {
  try {
    final Item newItem=factory.copy(item,path,true);
    newItem.getProperty().setLabel(newName);
    newItem.getProperty().setDisplayName(newName);
    if (newItem instanceof RoutineItem) {
      synDuplicatedRoutine((RoutineItem)newItem);
    }
    ICamelDesignerCoreService service=null;
    if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
      service=(ICamelDesignerCoreService)GlobalServiceRegister.getDefault().getService(ICamelDesignerCoreService.class);
    }
    if (service != null && service.isInstanceofCamelBeans(item)) {
      synDuplicatedBean(newItem);
    }
    if (newItem instanceof ProcessItem) {
      RelationshipItemBuilder.getInstance().addOrUpdateItem(newItem);
    }
    if (newItem instanceof ConnectionItem) {
      ConnectionItem connectionItem=(ConnectionItem)newItem;
      connectionItem.getConnection().getSupplierDependency().clear();
    }
    factory.save(newItem);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}
Program: 129662
Project: 129662
Buggy source:
private void synDuplicatedRoutine(RoutineItem item){
  ICodeGeneratorService codeGenService=(ICodeGeneratorService)GlobalServiceRegister.getDefault().getService(ICodeGeneratorService.class);
  if (codeGenService != null) {
    codeGenService.createRoutineSynchronizer().renameRoutineClass((RoutineItem)item);
    try {
      codeGenService.createRoutineSynchronizer().syncRoutine((RoutineItem)item,true);
    }
 catch (    SystemException e) {
      ExceptionHandler.process(e);
    }
  }
}

Fixed version (ground truth):
private void synDuplicatedRoutine(RoutineItem item){
  ICodeGeneratorService codeGenService=(ICodeGeneratorService)GlobalServiceRegister.getDefault().getService(ICodeGeneratorService.class);
  if (codeGenService != null) {
    codeGenService.createRoutineSynchronizer().renameRoutineClass(item);
    try {
      codeGenService.createRoutineSynchronizer().syncRoutine(item,true);
    }
 catch (    SystemException e) {
      ExceptionHandler.process(e);
    }
  }
}