Program: 119086
Project: 119086
Buggy source:
/** 
 * yzhang MainComposite constructor comment.
 * @param parent
 * @param style
 */
public MainComposite(Composite parent,int style,TabbedPropertySheetWidgetFactory factory,IRepositoryViewObject obj){
  super(parent,style,factory,obj);
  IBrandingService brandingService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
  boolean allowVerchange=brandingService.getBrandingConfiguration().isAllowChengeVersion();
  allowEnableControl=enableControl;
  property=repositoryObject.getProperty();
  Item item=property.getItem();
  if (item != null && item instanceof ProcessItem) {
    allowEnableControl=true;
    if (!PluginChecker.isMapReducePluginLoader() && !PluginChecker.isStormPluginLoader()) {
      allowEnableControl=enableControl;
    }
  }
  FormLayout layout=new FormLayout();
  setLayout(layout);
  FormData thisFormData=new FormData();
  thisFormData.left=new FormAttachment(0,0);
  thisFormData.right=new FormAttachment(100,0);
  thisFormData.top=new FormAttachment(0,0);
  thisFormData.bottom=new FormAttachment(100,0);
  setLayoutData(thisFormData);
  Composite composite=widgetFactory.createFlatFormComposite(this);
  FormData compositeData=new FormData();
  compositeData.left=new FormAttachment(0,0);
  compositeData.right=new FormAttachment(100,0);
  compositeData.top=new FormAttachment(0,0);
  compositeData.bottom=new FormAttachment(100,0);
  composite.setLayoutData(thisFormData);
  nameText=widgetFactory.createText(composite,"String_Node_Str");
  FormData data=new FormData();
  data.left=new FormAttachment(0,AbstractPropertySection.STANDARD_LABEL_WIDTH);
  data.right=new FormAttachment(50,0);
  data.top=new FormAttachment(0,ITabbedPropertyConstants.VSPACE);
  nameText.setLayoutData(data);
  String nameContent=repositoryObject.getLabel();
  nameText.setText(nameContent != null ? nameContent : "String_Node_Str");
  nameText.setEnabled(allowEnableControl);
  CLabel nameLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
  data=new FormData();
  data.left=new FormAttachment(0,0);
  data.right=new FormAttachment(nameText,-ITabbedPropertyConstants.HSPACE);
  data.top=new FormAttachment(nameText,0,SWT.CENTER);
  nameLabel.setLayoutData(data);
  Text authorText=widgetFactory.createText(composite,"String_Node_Str");
  authorText.setEnabled(false);
  data=new FormData();
  data.left=new FormAttachment(0,AbstractPropertySection.STANDARD_LABEL_WIDTH);
  data.right=new FormAttachment(70,0);
  data.top=new FormAttachment(nameLabel,ITabbedPropertyConstants.VSPACE);
  authorText.setLayoutData(data);
  User user=repositoryObject.getAuthor();
  if (user != null) {
    String author=user.getLogin();
    authorText.setText(author != null ? author : "String_Node_Str");
  }
 else {
    authorText.setText(nameContent);
  }
  authorText.setEnabled(enableControl);
  CLabel authorLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
  data=new FormData();
  data.left=new FormAttachment(0,0);
  data.right=new FormAttachment(authorText,-ITabbedPropertyConstants.HSPACE);
  data.top=new FormAttachment(authorText,0,SWT.CENTER);
  authorLabel.setLayoutData(data);
  if (allowVerchange) {
    btnDown=widgetFactory.createButton(composite,"String_Node_Str",SWT.PUSH);
    data=new FormData();
    data.right=new FormAttachment(100,0);
    data.top=new FormAttachment(authorText,0,SWT.CENTER);
    btnDown.setLayoutData(data);
    btnDown.setEnabled(allowEnableControl);
    btnUp=widgetFactory.createButton(composite,"String_Node_Str",SWT.PUSH);
    data=new FormData();
    data.right=new FormAttachment(btnDown,0);
    data.top=new FormAttachment(authorText,0,SWT.CENTER);
    btnUp.setLayoutData(data);
    btnUp.setEnabled(allowEnableControl);
    versionText=widgetFactory.createText(composite,"String_Node_Str");
    data=new FormData();
    data.left=new FormAttachment(authorText,AbstractPropertySection.STANDARD_LABEL_WIDTH);
    data.right=new FormAttachment(btnUp,-2);
    data.top=new FormAttachment(authorText,0,SWT.CENTER);
    versionText.setLayoutData(data);
    String version=repositoryObject.getVersion();
    versionText.setText(version != null ? version : "String_Node_Str");
    versionText.setEnabled(allowEnableControl);
    CLabel versionLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
    data=new FormData();
    data.left=new FormAttachment(authorText,ITabbedPropertyConstants.HSPACE * 3);
    data.right=new FormAttachment(versionText,-ITabbedPropertyConstants.HSPACE);
    data.top=new FormAttachment(versionText,0,SWT.CENTER);
    versionLabel.setLayoutData(data);
  }
  if (allowEnableControl) {
    jobTypeCCombo=widgetFactory.createCCombo(composite,SWT.READ_ONLY | SWT.DROP_DOWN);
    data=new FormData();
    data.left=new FormAttachment(0,AbstractPropertySection.STANDARD_LABEL_WIDTH);
    data.right=new FormAttachment(70,0);
    data.top=new FormAttachment(authorLabel,ITabbedPropertyConstants.VSPACE);
    jobTypeCCombo.setLayoutData(data);
    jobTypeCCombo.setItems(JobType.getJobTypeToDispaly());
    jobTypeCCombo.setText(ConvertJobsUtil.getJobTypeFromFramework(item));
    jobTypeValue=jobTypeCCombo.getText();
    jobTypeCCombo.setEnabled(allowEnableControl);
    CLabel jobTypeLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
    data=new FormData();
    data.left=new FormAttachment(0,0);
    data.right=new FormAttachment(jobTypeCCombo,-ITabbedPropertyConstants.HSPACE);
    data.top=new FormAttachment(jobTypeCCombo,0,SWT.CENTER);
    jobTypeLabel.setLayoutData(data);
    jobFrameworkCCombo=widgetFactory.createCCombo(composite,SWT.READ_ONLY | SWT.DROP_DOWN);
    data=new FormData();
    data.left=new FormAttachment(jobTypeCCombo,AbstractPropertySection.STANDARD_LABEL_WIDTH);
    data.right=new FormAttachment(100,0);
    data.top=new FormAttachment(authorLabel,ITabbedPropertyConstants.VSPACE);
    jobFrameworkCCombo.setLayoutData(data);
    jobFrameworkCCombo.setItems(ConvertJobsUtil.getFrameworkItemsByJobType(item));
    Object frameworkObj=ConvertJobsUtil.getFramework(item);
    if (frameworkObj != null) {
      String framework=ConvertJobsUtil.getFramework(item).toString();
      jobFrameworkCCombo.setText(framework != null ? framework : "String_Node_Str");
    }
    frameworkValue=jobFrameworkCCombo.getText();
    jobFrameworkCCombo.setEnabled(allowEnableControl);
    CLabel jobFrameworkLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
    data=new FormData();
    data.left=new FormAttachment(jobTypeCCombo,ITabbedPropertyConstants.HSPACE);
    data.right=new FormAttachment(jobFrameworkCCombo,-ITabbedPropertyConstants.HSPACE);
    data.top=new FormAttachment(jobFrameworkCCombo,0,SWT.CENTER);
    jobFrameworkLabel.setLayoutData(data);
    purposeText=widgetFactory.createText(composite,"String_Node_Str");
    data=new FormData();
    data.left=new FormAttachment(0,AbstractPropertySection.STANDARD_LABEL_WIDTH);
    data.right=new FormAttachment(70,0);
    data.top=new FormAttachment(jobTypeLabel,ITabbedPropertyConstants.VSPACE);
    purposeText.setLayoutData(data);
    String content=repositoryObject.getPurpose();
    purposeText.setText(content != null ? content : "String_Node_Str");
    purposeText.setEnabled(allowEnableControl);
    CLabel purposeLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
    data=new FormData();
    data.left=new FormAttachment(0,0);
    data.right=new FormAttachment(purposeText,-ITabbedPropertyConstants.HSPACE);
    data.top=new FormAttachment(purposeText,0,SWT.CENTER);
    purposeLabel.setLayoutData(data);
    statusText=widgetFactory.createCCombo(composite,SWT.READ_ONLY | SWT.BORDER);
    data=new FormData();
    data.left=new FormAttachment(purposeText,AbstractPropertySection.STANDARD_LABEL_WIDTH);
    data.right=new FormAttachment(100,0);
    data.top=new FormAttachment(jobTypeLabel,ITabbedPropertyConstants.VSPACE);
    statusText.setLayoutData(data);
    String status=repositoryObject.getStatusCode();
    statusText.setText(status != null ? status : "String_Node_Str");
    statusText.setItems(Status.getStatusToDispaly());
    statusText.setEnabled(allowEnableControl);
  }
 else {
    purposeText=widgetFactory.createText(composite,"String_Node_Str");
    data=new FormData();
    data.left=new FormAttachment(0,AbstractPropertySection.STANDARD_LABEL_WIDTH);
    data.right=new FormAttachment(70,0);
    data.top=new FormAttachment(authorLabel,ITabbedPropertyConstants.VSPACE);
    purposeText.setLayoutData(data);
    String content=repositoryObject.getPurpose();
    purposeText.setText(content != null ? content : "String_Node_Str");
    purposeText.setEnabled(enableControl);
    CLabel purposeLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
    data=new FormData();
    data.left=new FormAttachment(0,0);
    data.right=new FormAttachment(purposeText,-ITabbedPropertyConstants.HSPACE);
    data.top=new FormAttachment(purposeText,0,SWT.CENTER);
    purposeLabel.setLayoutData(data);
    statusText=widgetFactory.createCCombo(composite,SWT.READ_ONLY | SWT.BORDER);
    data=new FormData();
    data.left=new FormAttachment(purposeText,AbstractPropertySection.STANDARD_LABEL_WIDTH);
    data.right=new FormAttachment(100,0);
    data.top=new FormAttachment(authorLabel,ITabbedPropertyConstants.VSPACE);
    statusText.setLayoutData(data);
    String status=repositoryObject.getStatusCode();
    statusText.setText(status != null ? status : "String_Node_Str");
    statusText.setEnabled(enableControl);
  }
  CLabel statusLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
  data=new FormData();
  data.left=new FormAttachment(purposeText,ITabbedPropertyConstants.HSPACE * 3);
  data.right=new FormAttachment(statusText,-ITabbedPropertyConstants.HSPACE);
  data.top=new FormAttachment(statusText,0,SWT.CENTER);
  statusLabel.setLayoutData(data);
  descriptionText=widgetFactory.createText(composite,"String_Node_Str",SWT.MULTI | SWT.V_SCROLL | SWT.WRAP);
  data=new FormData();
  data.left=new FormAttachment(0,AbstractPropertySection.STANDARD_LABEL_WIDTH);
  data.right=new FormAttachment(100,0);
  data.top=new FormAttachment(statusText,ITabbedPropertyConstants.VSPACE);
  data.height=NB_LINES * descriptionText.getLineHeight();
  descriptionText.setLayoutData(data);
  String description=repositoryObject.getDescription();
  descriptionText.setText(description != null ? description : "String_Node_Str");
  descriptionText.setEnabled(true);
  descriptionText.setEditable(allowEnableControl);
  CLabel descriptionLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
  data=new FormData();
  data.left=new FormAttachment(0,0);
  data.right=new FormAttachment(descriptionText,-ITabbedPropertyConstants.HSPACE);
  data.top=new FormAttachment(descriptionText,0,SWT.TOP);
  descriptionLabel.setLayoutData(data);
  Text creationDate=widgetFactory.createText(composite,"String_Node_Str");
  data=new FormData();
  data.left=new FormAttachment(0,AbstractPropertySection.STANDARD_LABEL_WIDTH);
  data.right=new FormAttachment(33,0);
  data.top=new FormAttachment(descriptionText,ITabbedPropertyConstants.VSPACE);
  creationDate.setLayoutData(data);
  creationDate.setEnabled(false);
  Date cDate=repositoryObject.getCreationDate();
  creationDate.setText(cDate != null ? FORMATTER.format(cDate) : "String_Node_Str");
  creationDate.setEnabled(enableControl);
  CLabel creationLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
  data=new FormData();
  data.left=new FormAttachment(0,0);
  data.right=new FormAttachment(creationDate,-ITabbedPropertyConstants.HSPACE);
  data.top=new FormAttachment(creationDate,0,SWT.CENTER);
  creationLabel.setLayoutData(data);
  Text modificationDate=widgetFactory.createText(composite,"String_Node_Str");
  data=new FormData();
  data.left=new FormAttachment(creationDate,AbstractPropertySection.STANDARD_LABEL_WIDTH + 25);
  data.right=new FormAttachment(66,0);
  data.top=new FormAttachment(descriptionText,ITabbedPropertyConstants.VSPACE);
  modificationDate.setLayoutData(data);
  modificationDate.setEnabled(false);
  Date mDate=repositoryObject.getModificationDate();
  modificationDate.setText(mDate != null ? FORMATTER.format(mDate) : "String_Node_Str");
  modificationDate.setEnabled(enableControl);
  CLabel modificationLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
  data=new FormData();
  data.left=new FormAttachment(creationDate,ITabbedPropertyConstants.HSPACE * 3);
  data.right=new FormAttachment(modificationDate,-ITabbedPropertyConstants.HSPACE);
  data.top=new FormAttachment(modificationDate,0,SWT.CENTER);
  modificationLabel.setLayoutData(data);
  if (allowEnableControl) {
    btnConfirm=widgetFactory.createButton(composite,"String_Node_Str",SWT.PUSH);
    data=new FormData();
    data.right=new FormAttachment(100,0);
    data.top=new FormAttachment(modificationDate,0,SWT.CENTER);
    btnConfirm.setLayoutData(data);
    btnConfirm.setEnabled(enableControl);
    nameText.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      final ModifyEvent e){
        evaluateTextField();
      }
    }
);
    jobTypeCCombo.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      final ModifyEvent e){
        ConvertJobsUtil.updateJobFrameworkPart(jobTypeCCombo.getText(),jobFrameworkCCombo);
        evaluateTextField();
      }
    }
);
    jobFrameworkCCombo.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      final ModifyEvent e){
        evaluateTextField();
      }
    }
);
    purposeText.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      final ModifyEvent e){
        evaluateTextField();
      }
    }
);
    statusText.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      final ModifyEvent e){
        evaluateTextField();
      }
    }
);
    descriptionText.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      final ModifyEvent e){
        evaluateTextField();
      }
    }
);
    if (allowVerchange) {
      btnUp.addSelectionListener(new SelectionAdapter(){
        @Override public void widgetSelected(        SelectionEvent e){
          String version=property.getVersion();
          if (lastVersionFound != null && VersionUtils.compareTo(lastVersionFound,version) > 0) {
            version=lastVersionFound;
          }
          version=VersionUtils.upMajor(version);
          versionText.setText(version);
          lastVersionFound=version;
          evaluateTextField();
        }
      }
);
      btnDown.addSelectionListener(new SelectionAdapter(){
        @Override public void widgetSelected(        SelectionEvent e){
          String version=property.getVersion();
          if (lastVersionFound != null && VersionUtils.compareTo(lastVersionFound,version) > 0) {
            version=lastVersionFound;
          }
          version=VersionUtils.upMinor(version);
          versionText.setText(version);
          lastVersionFound=version;
          evaluateTextField();
        }
      }
);
      btnConfirm.addSelectionListener(new SelectionAdapter(){
        @Override public void widgetSelected(        SelectionEvent e){
          final IProxyRepositoryFactory proxyRepositoryFactory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
          if (nameText == null || nameText.isDisposed() || versionText == null || versionText.isDisposed() || purposeText == null || purposeText.isDisposed() || jobTypeCCombo == null || jobTypeCCombo.isDisposed() || jobFrameworkCCombo == null || jobFrameworkCCombo.isDisposed() || statusText == null || statusText.isDisposed() || descriptionText == null || descriptionText.isDisposed()) {
            return;
          }
          DeleteActionCache.getInstance().closeOpenedEditor(repositoryObject);
          if (!nameText.getText().equals(StringUtils.trimToEmpty(repositoryObject.getLabel()))) {
          }
          if (!versionText.getText().equals(StringUtils.trimToEmpty(repositoryObject.getVersion()))) {
            property.setVersion(versionText.getText());
          }
          if (!jobTypeCCombo.getText().equals(StringUtils.trimToEmpty(jobTypeValue))) {
          }
          if (!jobFrameworkCCombo.getText().equals(StringUtils.trimToEmpty(frameworkValue))) {
            if (property.getAdditionalProperties().containsKey(ConvertJobsUtil.FRAMEWORK)) {
              property.getAdditionalProperties().removeKey(ConvertJobsUtil.FRAMEWORK);
            }
            property.getAdditionalProperties().put(ConvertJobsUtil.FRAMEWORK,jobFrameworkCCombo.getText());
          }
          if (!purposeText.getText().equals(StringUtils.trimToEmpty(repositoryObject.getPurpose()))) {
            property.setPurpose(purposeText.getText());
          }
          if (!statusText.getText().equals(StringUtils.trimToEmpty(repositoryObject.getStatusCode()))) {
            property.setStatusCode(statusText.getText());
          }
          if (!descriptionText.getText().equals(StringUtils.trimToEmpty(repositoryObject.getDescription()))) {
            property.setDescription(descriptionText.getText());
          }
          boolean convert=true;
          if (jobTypeCCombo.getText().equals(StringUtils.trimToEmpty(jobTypeValue))) {
            if (!jobFrameworkCCombo.getText().equals(StringUtils.trimToEmpty(frameworkValue))) {
              convert=false;
            }
          }
          if (convert) {
            Item newItem=ConvertJobsUtil.createOperation(nameText.getText(),jobTypeCCombo.getText(),jobFrameworkCCombo.getText(),repositoryObject);
            IWorkspaceRunnable runnable=new IWorkspaceRunnable(){
              @Override public void run(              final IProgressMonitor monitor) throws CoreException {
                try {
                  proxyRepositoryFactory.unlock(repositoryObject);
                  proxyRepositoryFactory.deleteObjectPhysical(repositoryObject);
                  proxyRepositoryFactory.saveProject(ProjectManager.getInstance().getCurrentProject());
                }
 catch (                PersistenceException e1) {
                  e1.printStackTrace();
                }
catch (                LoginException e) {
                  e.printStackTrace();
                }
              }
            }
;
            IWorkspace workspace=ResourcesPlugin.getWorkspace();
            try {
              ISchedulingRule schedulingRule=workspace.getRoot();
              workspace.run(runnable,schedulingRule,IWorkspace.AVOID_UPDATE,null);
            }
 catch (            CoreException e1) {
              MessageBoxExceptionHandler.process(e1.getCause());
            }
            if (newItem != null) {
              openEditorOperation(newItem);
            }
          }
 else {
            openEditorOperation(property.getItem());
            try {
              proxyRepositoryFactory.save(ProjectManager.getInstance().getCurrentProject(),property.getItem(),false);
            }
 catch (            PersistenceException e1) {
              e1.printStackTrace();
            }
          }
        }
      }
);
    }
  }
}

Fixed version (ground truth):
/** 
 * yzhang MainComposite constructor comment.
 * @param parent
 * @param style
 */
public MainComposite(Composite parent,int style,TabbedPropertySheetWidgetFactory factory,IRepositoryViewObject obj){
  super(parent,style,factory,obj);
  IBrandingService brandingService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
  boolean allowVerchange=brandingService.getBrandingConfiguration().isAllowChengeVersion();
  allowEnableControl=false;
  enableControl=false;
  String framework=null;
  if (obj instanceof RepositoryViewObject || obj instanceof IProcess2) {
    if (obj instanceof RepositoryViewObject) {
      framework=((RepositoryViewObject)obj).getFramework();
    }
 else {
      framework=(String)((IProcess2)obj).getAdditionalProperties().get(ConvertJobsUtil.FRAMEWORK);
    }
    if (ERepositoryObjectType.getAllTypesOfProcess().contains(repositoryObject.getRepositoryObjectType())) {
      allowEnableControl=true;
      enableControl=true;
      if (!PluginChecker.isMapReducePluginLoader() && !PluginChecker.isStormPluginLoader()) {
        allowEnableControl=false;
      }
    }
  }
  FormLayout layout=new FormLayout();
  setLayout(layout);
  FormData thisFormData=new FormData();
  thisFormData.left=new FormAttachment(0,0);
  thisFormData.right=new FormAttachment(100,0);
  thisFormData.top=new FormAttachment(0,0);
  thisFormData.bottom=new FormAttachment(100,0);
  setLayoutData(thisFormData);
  Composite composite=widgetFactory.createFlatFormComposite(this);
  FormData compositeData=new FormData();
  compositeData.left=new FormAttachment(0,0);
  compositeData.right=new FormAttachment(100,0);
  compositeData.top=new FormAttachment(0,0);
  compositeData.bottom=new FormAttachment(100,0);
  composite.setLayoutData(thisFormData);
  nameText=widgetFactory.createText(composite,"String_Node_Str");
  FormData data=new FormData();
  data.left=new FormAttachment(0,AbstractPropertySection.STANDARD_LABEL_WIDTH);
  data.right=new FormAttachment(50,0);
  data.top=new FormAttachment(0,ITabbedPropertyConstants.VSPACE);
  nameText.setLayoutData(data);
  String nameContent=repositoryObject.getLabel();
  nameText.setText(nameContent != null ? nameContent : "String_Node_Str");
  nameText.setEnabled(allowEnableControl);
  CLabel nameLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
  data=new FormData();
  data.left=new FormAttachment(0,0);
  data.right=new FormAttachment(nameText,-ITabbedPropertyConstants.HSPACE);
  data.top=new FormAttachment(nameText,0,SWT.CENTER);
  nameLabel.setLayoutData(data);
  Text authorText=widgetFactory.createText(composite,"String_Node_Str");
  authorText.setEnabled(false);
  data=new FormData();
  data.left=new FormAttachment(0,AbstractPropertySection.STANDARD_LABEL_WIDTH);
  data.right=new FormAttachment(70,0);
  data.top=new FormAttachment(nameLabel,ITabbedPropertyConstants.VSPACE);
  authorText.setLayoutData(data);
  User user=repositoryObject.getAuthor();
  if (user != null) {
    String author=user.getLogin();
    authorText.setText(author != null ? author : "String_Node_Str");
  }
 else {
    authorText.setText(nameContent);
  }
  authorText.setEnabled(false);
  CLabel authorLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
  data=new FormData();
  data.left=new FormAttachment(0,0);
  data.right=new FormAttachment(authorText,-ITabbedPropertyConstants.HSPACE);
  data.top=new FormAttachment(authorText,0,SWT.CENTER);
  authorLabel.setLayoutData(data);
  if (allowVerchange) {
    btnDown=widgetFactory.createButton(composite,"String_Node_Str",SWT.PUSH);
    data=new FormData();
    data.right=new FormAttachment(100,0);
    data.top=new FormAttachment(authorText,0,SWT.CENTER);
    btnDown.setLayoutData(data);
    btnDown.setEnabled(allowEnableControl);
    btnUp=widgetFactory.createButton(composite,"String_Node_Str",SWT.PUSH);
    data=new FormData();
    data.right=new FormAttachment(btnDown,0);
    data.top=new FormAttachment(authorText,0,SWT.CENTER);
    btnUp.setLayoutData(data);
    btnUp.setEnabled(allowEnableControl);
    versionText=widgetFactory.createText(composite,"String_Node_Str");
    data=new FormData();
    data.left=new FormAttachment(authorText,AbstractPropertySection.STANDARD_LABEL_WIDTH);
    data.right=new FormAttachment(btnUp,-2);
    data.top=new FormAttachment(authorText,0,SWT.CENTER);
    versionText.setLayoutData(data);
    String version=repositoryObject.getVersion();
    versionText.setText(version != null ? version : "String_Node_Str");
    versionText.setEnabled(allowEnableControl);
    CLabel versionLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
    data=new FormData();
    data.left=new FormAttachment(authorText,ITabbedPropertyConstants.HSPACE * 3);
    data.right=new FormAttachment(versionText,-ITabbedPropertyConstants.HSPACE);
    data.top=new FormAttachment(versionText,0,SWT.CENTER);
    versionLabel.setLayoutData(data);
  }
  if (allowEnableControl) {
    jobTypeCCombo=widgetFactory.createCCombo(composite,SWT.READ_ONLY | SWT.DROP_DOWN);
    data=new FormData();
    data.left=new FormAttachment(0,AbstractPropertySection.STANDARD_LABEL_WIDTH);
    data.right=new FormAttachment(70,0);
    data.top=new FormAttachment(authorLabel,ITabbedPropertyConstants.VSPACE);
    jobTypeCCombo.setLayoutData(data);
    jobTypeCCombo.setItems(JobType.getJobTypeToDispaly());
    jobTypeCCombo.setText(ConvertJobsUtil.getJobTypeFromFramework(framework));
    jobTypeValue=jobTypeCCombo.getText();
    jobTypeCCombo.setEnabled(allowEnableControl);
    CLabel jobTypeLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
    data=new FormData();
    data.left=new FormAttachment(0,0);
    data.right=new FormAttachment(jobTypeCCombo,-ITabbedPropertyConstants.HSPACE);
    data.top=new FormAttachment(jobTypeCCombo,0,SWT.CENTER);
    jobTypeLabel.setLayoutData(data);
    jobFrameworkCCombo=widgetFactory.createCCombo(composite,SWT.READ_ONLY | SWT.DROP_DOWN);
    data=new FormData();
    data.left=new FormAttachment(jobTypeCCombo,AbstractPropertySection.STANDARD_LABEL_WIDTH);
    data.right=new FormAttachment(100,0);
    data.top=new FormAttachment(authorLabel,ITabbedPropertyConstants.VSPACE);
    jobFrameworkCCombo.setLayoutData(data);
    jobFrameworkCCombo.setItems(ConvertJobsUtil.getFrameworkItemsByJobType(repositoryObject.getRepositoryObjectType()));
    jobFrameworkCCombo.setText(framework != null ? framework : "String_Node_Str");
    frameworkValue=jobFrameworkCCombo.getText();
    jobFrameworkCCombo.setEnabled(allowEnableControl);
    CLabel jobFrameworkLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
    data=new FormData();
    data.left=new FormAttachment(jobTypeCCombo,ITabbedPropertyConstants.HSPACE);
    data.right=new FormAttachment(jobFrameworkCCombo,-ITabbedPropertyConstants.HSPACE);
    data.top=new FormAttachment(jobFrameworkCCombo,0,SWT.CENTER);
    jobFrameworkLabel.setLayoutData(data);
    purposeText=widgetFactory.createText(composite,"String_Node_Str");
    data=new FormData();
    data.left=new FormAttachment(0,AbstractPropertySection.STANDARD_LABEL_WIDTH);
    data.right=new FormAttachment(70,0);
    data.top=new FormAttachment(jobTypeLabel,ITabbedPropertyConstants.VSPACE);
    purposeText.setLayoutData(data);
    String content=repositoryObject.getPurpose();
    purposeText.setText(content != null ? content : "String_Node_Str");
    purposeText.setEnabled(allowEnableControl);
    CLabel purposeLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
    data=new FormData();
    data.left=new FormAttachment(0,0);
    data.right=new FormAttachment(purposeText,-ITabbedPropertyConstants.HSPACE);
    data.top=new FormAttachment(purposeText,0,SWT.CENTER);
    purposeLabel.setLayoutData(data);
    statusText=widgetFactory.createCCombo(composite,SWT.READ_ONLY | SWT.BORDER);
    data=new FormData();
    data.left=new FormAttachment(purposeText,AbstractPropertySection.STANDARD_LABEL_WIDTH);
    data.right=new FormAttachment(100,0);
    data.top=new FormAttachment(jobTypeLabel,ITabbedPropertyConstants.VSPACE);
    statusText.setLayoutData(data);
    String status=repositoryObject.getStatusCode();
    statusText.setText(status != null ? status : "String_Node_Str");
    statusText.setItems(Status.getStatusToDispaly());
    statusText.setEnabled(allowEnableControl);
  }
 else {
    purposeText=widgetFactory.createText(composite,"String_Node_Str");
    data=new FormData();
    data.left=new FormAttachment(0,AbstractPropertySection.STANDARD_LABEL_WIDTH);
    data.right=new FormAttachment(70,0);
    data.top=new FormAttachment(authorLabel,ITabbedPropertyConstants.VSPACE);
    purposeText.setLayoutData(data);
    String content=repositoryObject.getPurpose();
    purposeText.setText(content != null ? content : "String_Node_Str");
    purposeText.setEnabled(enableControl);
    CLabel purposeLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
    data=new FormData();
    data.left=new FormAttachment(0,0);
    data.right=new FormAttachment(purposeText,-ITabbedPropertyConstants.HSPACE);
    data.top=new FormAttachment(purposeText,0,SWT.CENTER);
    purposeLabel.setLayoutData(data);
    statusText=widgetFactory.createCCombo(composite,SWT.READ_ONLY | SWT.BORDER);
    data=new FormData();
    data.left=new FormAttachment(purposeText,AbstractPropertySection.STANDARD_LABEL_WIDTH);
    data.right=new FormAttachment(100,0);
    data.top=new FormAttachment(authorLabel,ITabbedPropertyConstants.VSPACE);
    statusText.setLayoutData(data);
    String status=repositoryObject.getStatusCode();
    statusText.setText(status != null ? status : "String_Node_Str");
    statusText.setEnabled(enableControl);
  }
  CLabel statusLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
  data=new FormData();
  data.left=new FormAttachment(purposeText,ITabbedPropertyConstants.HSPACE * 3);
  data.right=new FormAttachment(statusText,-ITabbedPropertyConstants.HSPACE);
  data.top=new FormAttachment(statusText,0,SWT.CENTER);
  statusLabel.setLayoutData(data);
  descriptionText=widgetFactory.createText(composite,"String_Node_Str",SWT.MULTI | SWT.V_SCROLL | SWT.WRAP);
  data=new FormData();
  data.left=new FormAttachment(0,AbstractPropertySection.STANDARD_LABEL_WIDTH);
  data.right=new FormAttachment(100,0);
  data.top=new FormAttachment(statusText,ITabbedPropertyConstants.VSPACE);
  data.height=NB_LINES * descriptionText.getLineHeight();
  descriptionText.setLayoutData(data);
  String description=repositoryObject.getDescription();
  descriptionText.setText(description != null ? description : "String_Node_Str");
  descriptionText.setEnabled(true);
  descriptionText.setEditable(allowEnableControl);
  CLabel descriptionLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
  data=new FormData();
  data.left=new FormAttachment(0,0);
  data.right=new FormAttachment(descriptionText,-ITabbedPropertyConstants.HSPACE);
  data.top=new FormAttachment(descriptionText,0,SWT.TOP);
  descriptionLabel.setLayoutData(data);
  Text creationDate=widgetFactory.createText(composite,"String_Node_Str");
  data=new FormData();
  data.left=new FormAttachment(0,AbstractPropertySection.STANDARD_LABEL_WIDTH);
  data.right=new FormAttachment(33,0);
  data.top=new FormAttachment(descriptionText,ITabbedPropertyConstants.VSPACE);
  creationDate.setLayoutData(data);
  creationDate.setEnabled(false);
  Date cDate=repositoryObject.getCreationDate();
  creationDate.setText(cDate != null ? FORMATTER.format(cDate) : "String_Node_Str");
  creationDate.setEnabled(enableControl);
  CLabel creationLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
  data=new FormData();
  data.left=new FormAttachment(0,0);
  data.right=new FormAttachment(creationDate,-ITabbedPropertyConstants.HSPACE);
  data.top=new FormAttachment(creationDate,0,SWT.CENTER);
  creationLabel.setLayoutData(data);
  Text modificationDate=widgetFactory.createText(composite,"String_Node_Str");
  data=new FormData();
  data.left=new FormAttachment(creationDate,AbstractPropertySection.STANDARD_LABEL_WIDTH + 25);
  data.right=new FormAttachment(66,0);
  data.top=new FormAttachment(descriptionText,ITabbedPropertyConstants.VSPACE);
  modificationDate.setLayoutData(data);
  modificationDate.setEnabled(false);
  Date mDate=repositoryObject.getModificationDate();
  modificationDate.setText(mDate != null ? FORMATTER.format(mDate) : "String_Node_Str");
  modificationDate.setEnabled(enableControl);
  CLabel modificationLabel=widgetFactory.createCLabel(composite,Messages.getString("String_Node_Str"));
  data=new FormData();
  data.left=new FormAttachment(creationDate,ITabbedPropertyConstants.HSPACE * 3);
  data.right=new FormAttachment(modificationDate,-ITabbedPropertyConstants.HSPACE);
  data.top=new FormAttachment(modificationDate,0,SWT.CENTER);
  modificationLabel.setLayoutData(data);
  if (allowEnableControl) {
    btnConfirm=widgetFactory.createButton(composite,"String_Node_Str",SWT.PUSH);
    data=new FormData();
    data.right=new FormAttachment(100,0);
    data.top=new FormAttachment(modificationDate,0,SWT.CENTER);
    btnConfirm.setLayoutData(data);
    btnConfirm.setEnabled(enableControl);
    nameText.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      final ModifyEvent e){
        evaluateTextField();
      }
    }
);
    jobTypeCCombo.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      final ModifyEvent e){
        ConvertJobsUtil.updateJobFrameworkPart(jobTypeCCombo.getText(),jobFrameworkCCombo);
        evaluateTextField();
      }
    }
);
    jobFrameworkCCombo.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      final ModifyEvent e){
        evaluateTextField();
      }
    }
);
    purposeText.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      final ModifyEvent e){
        evaluateTextField();
      }
    }
);
    statusText.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      final ModifyEvent e){
        evaluateTextField();
      }
    }
);
    descriptionText.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      final ModifyEvent e){
        evaluateTextField();
      }
    }
);
    if (allowVerchange) {
      btnUp.addSelectionListener(new SelectionAdapter(){
        @Override public void widgetSelected(        SelectionEvent e){
          String version=repositoryObject.getVersion();
          if (lastVersionFound != null && VersionUtils.compareTo(lastVersionFound,version) > 0) {
            version=lastVersionFound;
          }
          version=VersionUtils.upMajor(version);
          versionText.setText(version);
          lastVersionFound=version;
          evaluateTextField();
        }
      }
);
      btnDown.addSelectionListener(new SelectionAdapter(){
        @Override public void widgetSelected(        SelectionEvent e){
          String version=repositoryObject.getVersion();
          if (lastVersionFound != null && VersionUtils.compareTo(lastVersionFound,version) > 0) {
            version=lastVersionFound;
          }
          version=VersionUtils.upMinor(version);
          versionText.setText(version);
          lastVersionFound=version;
          evaluateTextField();
        }
      }
);
      btnConfirm.addSelectionListener(new SelectionAdapter(){
        @Override public void widgetSelected(        SelectionEvent e){
          final IProxyRepositoryFactory proxyRepositoryFactory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
          if (nameText == null || nameText.isDisposed() || versionText == null || versionText.isDisposed() || purposeText == null || purposeText.isDisposed() || jobTypeCCombo == null || jobTypeCCombo.isDisposed() || jobFrameworkCCombo == null || jobFrameworkCCombo.isDisposed() || statusText == null || statusText.isDisposed() || descriptionText == null || descriptionText.isDisposed()) {
            return;
          }
          Property property=repositoryObject.getProperty();
          DeleteActionCache.getInstance().closeOpenedEditor(repositoryObject);
          if (!nameText.getText().equals(StringUtils.trimToEmpty(repositoryObject.getLabel()))) {
          }
          if (!versionText.getText().equals(StringUtils.trimToEmpty(repositoryObject.getVersion()))) {
            property.setVersion(versionText.getText());
          }
          if (!jobTypeCCombo.getText().equals(StringUtils.trimToEmpty(jobTypeValue))) {
          }
          if (!jobFrameworkCCombo.getText().equals(StringUtils.trimToEmpty(frameworkValue))) {
            if (property.getAdditionalProperties().containsKey(ConvertJobsUtil.FRAMEWORK)) {
              property.getAdditionalProperties().removeKey(ConvertJobsUtil.FRAMEWORK);
            }
            property.getAdditionalProperties().put(ConvertJobsUtil.FRAMEWORK,jobFrameworkCCombo.getText());
          }
          if (!purposeText.getText().equals(StringUtils.trimToEmpty(repositoryObject.getPurpose()))) {
            property.setPurpose(purposeText.getText());
          }
          if (!statusText.getText().equals(StringUtils.trimToEmpty(repositoryObject.getStatusCode()))) {
            property.setStatusCode(statusText.getText());
          }
          if (!descriptionText.getText().equals(StringUtils.trimToEmpty(repositoryObject.getDescription()))) {
            property.setDescription(descriptionText.getText());
          }
          boolean convert=true;
          if (jobTypeCCombo.getText().equals(StringUtils.trimToEmpty(jobTypeValue))) {
            if (!jobFrameworkCCombo.getText().equals(StringUtils.trimToEmpty(frameworkValue))) {
              convert=false;
            }
          }
          if (convert) {
            Item newItem=ConvertJobsUtil.createOperation(nameText.getText(),jobTypeCCombo.getText(),jobFrameworkCCombo.getText(),repositoryObject);
            IWorkspaceRunnable runnable=new IWorkspaceRunnable(){
              @Override public void run(              final IProgressMonitor monitor) throws CoreException {
                try {
                  proxyRepositoryFactory.unlock(repositoryObject);
                  proxyRepositoryFactory.deleteObjectPhysical(repositoryObject);
                  proxyRepositoryFactory.saveProject(ProjectManager.getInstance().getCurrentProject());
                }
 catch (                PersistenceException e1) {
                  e1.printStackTrace();
                }
catch (                LoginException e) {
                  e.printStackTrace();
                }
              }
            }
;
            IWorkspace workspace=ResourcesPlugin.getWorkspace();
            try {
              ISchedulingRule schedulingRule=workspace.getRoot();
              workspace.run(runnable,schedulingRule,IWorkspace.AVOID_UPDATE,null);
            }
 catch (            CoreException e1) {
              MessageBoxExceptionHandler.process(e1.getCause());
            }
            if (newItem != null) {
              openEditorOperation(newItem);
            }
          }
 else {
            openEditorOperation(property.getItem());
            try {
              proxyRepositoryFactory.save(ProjectManager.getInstance().getCurrentProject(),property.getItem(),false);
            }
 catch (            PersistenceException e1) {
              e1.printStackTrace();
            }
          }
        }
      }
);
    }
  }
}