nus-yam/ex-repair huggingface dataset:
Program: 118932
Project: 118932
Buggy source:
protected String buildExportZip(ProcessItem processItem,IProgressMonitor progressMonitor) throws ProcessorException {
  Map<ExportChoice,Object> exportChoiceMap=JobScriptsManagerFactory.getDefaultExportChoiceMap();
  exportChoiceMap.put(ExportChoice.needLauncher,false);
  exportChoiceMap.put(ExportChoice.needJobItem,false);
  exportChoiceMap.put(ExportChoice.needJobScript,true);
  exportChoiceMap.put(ExportChoice.needSourceCode,false);
  exportChoiceMap.put(ExportChoice.binaries,true);
  exportChoiceMap.put(ExportChoice.includeLibs,true);
  if (progressMonitor.isCanceled()) {
    throw new ProcessorException(new InterruptedException());
  }
  final String archiveFilePath=Path.fromOSString(CorePlugin.getDefault().getPreferenceStore().getString(ITalendCorePrefConstants.FILE_PATH_TEMP)) + "String_Node_Str" + getFilePathPrefix()+ "String_Node_Str"+ process.getName()+ "String_Node_Str";
  try {
    exportChoiceMap.put(ExportChoice.needContext,true);
    String contextName=processItem.getProcess().getDefaultContext();
    exportChoiceMap.put(ExportChoice.contextName,contextName);
    buildJob(archiveFilePath,processItem,processItem.getProperty().getVersion(),contextName,exportChoiceMap,JobExportType.POJO,progressMonitor);
  }
 catch (  Exception e) {
    throw new ProcessorException(e);
  }
  ProcessorUtilities.resetExportConfig();
  return archiveFilePath;
}

Fixed version (ground truth):
protected String buildExportZip(ProcessItem processItem,IProgressMonitor progressMonitor) throws ProcessorException {
  Map<ExportChoice,Object> exportChoiceMap=JobScriptsManagerFactory.getDefaultExportChoiceMap();
  exportChoiceMap.put(ExportChoice.needLauncher,false);
  exportChoiceMap.put(ExportChoice.needJobItem,false);
  if (CommonsPlugin.isDebugMode()) {
    exportChoiceMap.put(ExportChoice.needSourceCode,true);
  }
 else {
    exportChoiceMap.put(ExportChoice.needSourceCode,false);
  }
  exportChoiceMap.put(ExportChoice.binaries,true);
  exportChoiceMap.put(ExportChoice.includeLibs,true);
  if (progressMonitor.isCanceled()) {
    throw new ProcessorException(new InterruptedException());
  }
  final String archiveFilePath=Path.fromOSString(CorePlugin.getDefault().getPreferenceStore().getString(ITalendCorePrefConstants.FILE_PATH_TEMP)).append(getFilePathPrefix() + '_' + process.getName()+ FileExtensions.ZIP_FILE_SUFFIX).toString();
  try {
    exportChoiceMap.put(ExportChoice.needContext,true);
    String contextName=processItem.getProcess().getDefaultContext();
    exportChoiceMap.put(ExportChoice.contextName,contextName);
    buildJob(archiveFilePath,processItem,processItem.getProperty().getVersion(),contextName,exportChoiceMap,JobExportType.POJO,progressMonitor);
  }
 catch (  Exception e) {
    throw new ProcessorException(e);
  }
 finally {
    ProcessorUtilities.resetExportConfig();
  }
  return archiveFilePath;
}
Program: 118933
Project: 118933
Buggy source:
protected String getNeededModulesJarStr(){
  final boolean exportingJob=ProcessorUtilities.isExportConfig();
  final String classPathSeparator=extractClassPathSeparator();
  final String libPrefixPath=getRootWorkingDir(true);
  final File libDir=JavaProcessorUtilities.getJavaProjectLibFolder();
  if (libDir == null) {
    return "String_Node_Str";
  }
  Set<ModuleNeeded> neededModules=getNeededModules();
  JavaProcessorUtilities.checkJavaProjectLib(neededModules);
  Set<String> neededLibraries=new HashSet<String>();
  for (  ModuleNeeded neededModule : neededModules) {
    neededLibraries.add(neededModule.getModuleName());
  }
  File[] jarFiles=libDir.listFiles(FilesUtils.getAcceptJARFilesFilter());
  StringBuffer libPath=new StringBuffer();
  if (jarFiles != null && jarFiles.length > 0) {
    for (    File jarFile : jarFiles) {
      if (jarFile.isFile() && neededLibraries.contains(jarFile.getName())) {
        libPath.append(libPrefixPath);
        String singleLibPath=new Path(jarFile.getAbsolutePath()).toPortableString();
        if (exportingJob) {
          singleLibPath=singleLibPath.replace(new Path(libDir.getAbsolutePath()).toPortableString(),getBaseLibPath());
        }
        libPath.append(singleLibPath).append(classPathSeparator);
      }
    }
  }
  final int lastSep=libPath.length() - 1;
  if (libPath.length() != 0 && classPathSeparator.equals(String.valueOf(libPath.charAt(lastSep)))) {
    libPath.deleteCharAt(lastSep);
  }
  return libPath.toString();
}

Fixed version (ground truth):
protected String getNeededModulesJarStr(){
  final boolean exportingJob=ProcessorUtilities.isExportConfig();
  final String classPathSeparator=extractClassPathSeparator();
  final String libPrefixPath=getRootWorkingDir(true);
  final File libDir=JavaProcessorUtilities.getJavaProjectLibFolder();
  if (libDir == null) {
    return "String_Node_Str";
  }
  Set<ModuleNeeded> neededModules=getNeededModules();
  JavaProcessorUtilities.checkJavaProjectLib(neededModules);
  Set<String> neededLibraries=new HashSet<String>();
  for (  ModuleNeeded neededModule : neededModules) {
    neededLibraries.add(neededModule.getModuleName());
  }
  File[] jarFiles=libDir.listFiles(FilesUtils.getAcceptJARFilesFilter());
  StringBuffer libPath=new StringBuffer();
  if (jarFiles != null && jarFiles.length > 0) {
    for (    File jarFile : jarFiles) {
      if (jarFile.isFile() && neededLibraries.contains(jarFile.getName())) {
        String singleLibPath=new Path(jarFile.getAbsolutePath()).toPortableString();
        if (exportingJob) {
          libPath.append(libPrefixPath);
          singleLibPath=singleLibPath.replace(new Path(libDir.getAbsolutePath()).toPortableString(),getBaseLibPath());
        }
        libPath.append(singleLibPath).append(classPathSeparator);
      }
    }
  }
  final int lastSep=libPath.length() - 1;
  if (libPath.length() != 0 && classPathSeparator.equals(String.valueOf(libPath.charAt(lastSep)))) {
    libPath.deleteCharAt(lastSep);
  }
  return libPath.toString();
}
Program: 118934
Project: 118934
Buggy source:
public TableEntryLocation(String prefix,String tableName,String columnName,String sufix){
  this.prefix=prefix.trim();
  this.tableName=tableName.trim();
  this.columnName=columnName.trim();
  this.sufix=sufix.trim();
}

Fixed version (ground truth):
public TableEntryLocation(String prefix,String tableName,String columnName,String sufix){
  this.prefix=(prefix == null ? null : prefix.trim());
  this.tableName=(tableName == null ? null : tableName.trim());
  this.columnName=(columnName == null ? null : columnName.trim());
  this.sufix=(sufix == null ? null : sufix.trim());
}
Program: 118935
Project: 118935
Buggy source:
@Override public void transform(NodeType node){
  if (node == null) {
    return;
  }
  ElementParameterType dataAction=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  if ("String_Node_Str".equals(dataAction.getValue())) {
    ComponentUtilities.setNodeValue(node,"String_Node_Str","String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void transform(NodeType node){
  if (node == null) {
    return;
  }
  ElementParameterType dataAction=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  if (dataAction != null && "String_Node_Str".equals(dataAction.getValue())) {
    ComponentUtilities.setNodeValue(node,"String_Node_Str","String_Node_Str");
  }
}
Program: 118936
Project: 118936
Buggy source:
@Override public ExecutionResult execute(Item item){
  final ProcessType processType=getProcessType(item);
  String[] compNames={"String_Node_Str"};
  IComponentConversion conversion=new IComponentConversion(){
    @Override public void transform(    NodeType node){
      if (node == null) {
        return;
      }
      ElementParameterType dataAction=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
      if ("String_Node_Str".equals(dataAction.getValue())) {
        ComponentUtilities.setNodeValue(node,"String_Node_Str","String_Node_Str");
      }
    }
  }
;
  for (  String name : compNames) {
    IComponentFilter filter=new NameComponentFilter(name);
    try {
      ModifyComponentsAction.searchAndModify(item,processType,filter,Arrays.<IComponentConversion>asList(conversion));
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
      return ExecutionResult.FAILURE;
    }
  }
  return ExecutionResult.SUCCESS_NO_ALERT;
}

Fixed version (ground truth):
@Override public ExecutionResult execute(Item item){
  final ProcessType processType=getProcessType(item);
  String[] compNames={"String_Node_Str"};
  IComponentConversion conversion=new IComponentConversion(){
    @Override public void transform(    NodeType node){
      if (node == null) {
        return;
      }
      ElementParameterType dataAction=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
      if (dataAction != null && "String_Node_Str".equals(dataAction.getValue())) {
        ComponentUtilities.setNodeValue(node,"String_Node_Str","String_Node_Str");
      }
    }
  }
;
  for (  String name : compNames) {
    IComponentFilter filter=new NameComponentFilter(name);
    try {
      ModifyComponentsAction.searchAndModify(item,processType,filter,Arrays.<IComponentConversion>asList(conversion));
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
      return ExecutionResult.FAILURE;
    }
  }
  return ExecutionResult.SUCCESS_NO_ALERT;
}
Program: 118937
Project: 118937
Buggy source:
@Override public void run(){
  MessageDialog.openError(Display.getDefault().getActiveShell(),Messages.getString("String_Node_Str"),e.getTargetException().getLocalizedMessage());
}

Fixed version (ground truth):
@Override public Boolean run() throws Throwable {
  ProxyRepositoryFactory.getInstance().initialize();
  return null;
}
Program: 118939
Project: 118939
Buggy source:
@Override public void transform(NodeType node){
  if (node == null) {
    return;
  }
  ElementParameterType cf=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  if (cf != null) {
    ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
    ComponentUtilities.setNodeValue(node,"String_Node_Str",cf.getValue());
  }
  ElementParameterType actionForCF=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  if (actionForCF != null) {
    ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
    ComponentUtilities.setNodeValue(node,"String_Node_Str",actionForCF.getValue());
  }
}

Fixed version (ground truth):
@Override public void transform(NodeType node){
  if (node == null) {
    return;
  }
  ElementParameterType cf=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  if (cf != null) {
    if (ComponentUtilities.getNodeProperty(node,"String_Node_Str") == null) {
      ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
    }
    ComponentUtilities.getNodeProperty(node,"String_Node_Str").setValue(cf.getValue());
  }
  ElementParameterType actionForCF=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
  if (actionForCF != null) {
    if (ComponentUtilities.getNodeProperty(node,"String_Node_Str") == null) {
      ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
    }
    ComponentUtilities.getNodeProperty(node,"String_Node_Str").setValue(actionForCF.getValue());
  }
}
Program: 118940
Project: 118940
Buggy source:
@Override public ExecutionResult execute(Item item){
  final ProcessType processType=getProcessType(item);
  String[] compNames={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  IComponentConversion conversion=new IComponentConversion(){
    @Override public void transform(    NodeType node){
      if (node == null) {
        return;
      }
      ElementParameterType cf=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
      if (cf != null) {
        ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
        ComponentUtilities.setNodeValue(node,"String_Node_Str",cf.getValue());
      }
      ElementParameterType actionForCF=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
      if (actionForCF != null) {
        ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
        ComponentUtilities.setNodeValue(node,"String_Node_Str",actionForCF.getValue());
      }
    }
  }
;
  for (  String name : compNames) {
    IComponentFilter filter=new NameComponentFilter(name);
    try {
      ModifyComponentsAction.searchAndModify(item,processType,filter,Arrays.<IComponentConversion>asList(conversion));
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
      return ExecutionResult.FAILURE;
    }
  }
  return ExecutionResult.SUCCESS_NO_ALERT;
}

Fixed version (ground truth):
@Override public ExecutionResult execute(Item item){
  final ProcessType processType=getProcessType(item);
  String[] compNames={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  IComponentConversion conversion=new IComponentConversion(){
    @Override public void transform(    NodeType node){
      if (node == null) {
        return;
      }
      ElementParameterType cf=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
      if (cf != null) {
        if (ComponentUtilities.getNodeProperty(node,"String_Node_Str") == null) {
          ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
        }
        ComponentUtilities.getNodeProperty(node,"String_Node_Str").setValue(cf.getValue());
      }
      ElementParameterType actionForCF=ComponentUtilities.getNodeProperty(node,"String_Node_Str");
      if (actionForCF != null) {
        if (ComponentUtilities.getNodeProperty(node,"String_Node_Str") == null) {
          ComponentUtilities.addNodeProperty(node,"String_Node_Str","String_Node_Str");
        }
        ComponentUtilities.getNodeProperty(node,"String_Node_Str").setValue(actionForCF.getValue());
      }
    }
  }
;
  for (  String name : compNames) {
    IComponentFilter filter=new NameComponentFilter(name);
    try {
      ModifyComponentsAction.searchAndModify(item,processType,filter,Arrays.<IComponentConversion>asList(conversion));
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
      return ExecutionResult.FAILURE;
    }
  }
  return ExecutionResult.SUCCESS_NO_ALERT;
}
Program: 118941
Project: 118941
Buggy source:
@Override public int compare(ICompletionProposal arg0,ICompletionProposal arg1){
  if (arg1 instanceof TalendCompletionProposal && (!(arg0 instanceof TalendCompletionProposal))) {
    return 1;
  }
 else   if (arg1 instanceof TalendCompletionProposal && (arg0 instanceof TalendCompletionProposal)) {
    TalendCompletionProposal a=(TalendCompletionProposal)arg0;
    TalendCompletionProposal b=(TalendCompletionProposal)arg1;
    return a.getType().compareTo(b.getType());
  }
  return 0;
}

Fixed version (ground truth):
@Override public int compare(ICompletionProposal arg0,ICompletionProposal arg1){
  if (arg1 instanceof TalendCompletionProposal && (!(arg0 instanceof TalendCompletionProposal))) {
    return 1;
  }
 else   if (arg0 instanceof TalendCompletionProposal && (!(arg1 instanceof TalendCompletionProposal))) {
    return -1;
  }
 else   if (arg1 instanceof TalendCompletionProposal && (arg0 instanceof TalendCompletionProposal)) {
    TalendCompletionProposal a=(TalendCompletionProposal)arg0;
    TalendCompletionProposal b=(TalendCompletionProposal)arg1;
    return a.getType().compareTo(b.getType());
  }
  return 0;
}
Program: 118943
Project: 118943
Buggy source:
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  try {
    ProxyRepositoryFactory.getInstance().initialize();
  }
 catch (  PersistenceException e) {
    throw new InvocationTargetException(e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  MessageDialog.openError(Display.getDefault().getActiveShell(),Messages.getString("String_Node_Str"),e.getTargetException().getLocalizedMessage());
}
Program: 118946
Project: 118946
Buggy source:
@Override public void done(IJobChangeEvent event){
  if (event.getJob().equals(backgroundGUIUpdate)) {
    if (branchesViewer != null && !branchesViewer.getCombo().isDisposed()) {
      branchesViewer.getCombo().getDisplay().syncExec(new Runnable(){
        @Override public void run(){
          branchesViewer.setInput(projectBranches);
          branchesViewer.setSelection(new StructuredSelection(new Object[]{"String_Node_Str"}));
          branchesViewer.getCombo().setEnabled(projectViewer.getControl().isEnabled());
        }
      }
);
    }
  }
}

Fixed version (ground truth):
@Override public void done(IJobChangeEvent event){
  if (event.getJob().equals(backgroundGUIUpdate)) {
    if (branchesViewer != null && !branchesViewer.getCombo().isDisposed()) {
      branchesViewer.getCombo().getDisplay().syncExec(new Runnable(){
        @Override public void run(){
          if (branchesViewer == null || branchesViewer.getControl() == null || branchesViewer.getControl().isDisposed()) {
            return;
          }
          branchesViewer.setInput(projectBranches);
          branchesViewer.setSelection(new StructuredSelection(new Object[]{"String_Node_Str"}));
          branchesViewer.getCombo().setEnabled(projectViewer.getControl().isEnabled());
        }
      }
);
    }
  }
}
Program: 118947
Project: 118947
Buggy source:
private void refreshMonitorComposite(){
  if (monitorComposite != null && !monitorComposite.isDisposed()) {
    monitorComposite.dispose();
  }
  initGraphicComponents(this);
  monitorComposite.layout();
}

Fixed version (ground truth):
public void refreshMonitorComposite(){
  if (monitorComposite != null && !monitorComposite.isDisposed()) {
    monitorComposite.dispose();
  }
  initGraphicComponents(this);
  monitorComposite.layout();
}
Program: 118948
Project: 118948
Buggy source:
private void runningProcessChanged(){
  refresh();
}

Fixed version (ground truth):
private void runningProcessChanged(){
  refresh();
  if (dc != null && dc instanceof MemoryRuntimeComposite) {
    ((MemoryRuntimeComposite)dc).refreshMonitorComposite();
  }
}
Program: 118951
Project: 118951
Buggy source:
@Override public void execute(){
  if (this.location != null) {
    this.nodeContainer.getNode().setLocation(this.location);
  }
  updatePaletteRecentlyUsedList();
  AbstractProcessProvider provider=AbstractProcessProvider.findProcessProviderFromPID(nodeContainer.getNode().getComponent().getPluginExtension());
  IElementParameter ep=nodeContainer.getNode().getElementParameter(EParameterName.UNIQUE_NAME.getName());
  process.addUniqueNodeName(ep.getValue().toString());
  if (provider == null || (provider != null && provider.containNodeInMemoryNotProcess())) {
    this.process.addNodeContainer(this.nodeContainer);
    process.checkStartNodes();
    nodeContainer.getNode().checkAndRefreshNode();
    if (nodeContainer.getNode().getComponent().getComponentType() == EComponentType.JOBLET) {
      IUpdateItemType jobletContextType=UpdateManagerProviderDetector.INSTANCE.getUpdateItemType(UpdateManagerHelper.TYPE_JOBLET_CONTEXT);
      if (jobletContextType != null) {
        process.getUpdateManager().update(jobletContextType);
      }
    }
  }
 else {
    String name=provider.getComponentProcess().getName() + "String_Node_Str" + provider.getComponentProcess().getVersion();
    MessageDialog warningMessageDialog=new MessageDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),"String_Node_Str",null,"String_Node_Str" + name + "String_Node_Str",MessageDialog.OK,new String[]{"String_Node_Str"},0);
    warningMessageDialog.open();
  }
}

Fixed version (ground truth):
@Override public void execute(){
  if (this.location != null) {
    this.nodeContainer.getNode().setLocation(this.location);
  }
  updatePaletteRecentlyUsedList();
  AbstractProcessProvider provider=AbstractProcessProvider.findProcessProviderFromPID(nodeContainer.getNode().getComponent().getPluginExtension());
  IElementParameter ep=nodeContainer.getNode().getElementParameter(EParameterName.UNIQUE_NAME.getName());
  process.addUniqueNodeName(ep.getValue().toString());
  if (provider == null || (provider != null && provider.containNodeInMemoryNotProcess())) {
    this.process.addNodeContainer(this.nodeContainer);
    process.checkStartNodes();
    nodeContainer.getNode().checkAndRefreshNode();
    refreshRelatedNodes();
    if (nodeContainer.getNode().getComponent().getComponentType() == EComponentType.JOBLET) {
      IUpdateItemType jobletContextType=UpdateManagerProviderDetector.INSTANCE.getUpdateItemType(UpdateManagerHelper.TYPE_JOBLET_CONTEXT);
      if (jobletContextType != null) {
        process.getUpdateManager().update(jobletContextType);
      }
    }
  }
 else {
    String name=provider.getComponentProcess().getName() + "String_Node_Str" + provider.getComponentProcess().getVersion();
    MessageDialog warningMessageDialog=new MessageDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),"String_Node_Str",null,"String_Node_Str" + name + "String_Node_Str",MessageDialog.OK,new String[]{"String_Node_Str"},0);
    warningMessageDialog.open();
  }
}
Program: 118957
Project: 118957
Buggy source:
/** 
 * Checks if there are unloaded nodes.If there are some nodes unloaded, throws PersistenceException.
 * @throws PersistenceException PersistenceException
 */
@Override public void checkLoadNodes() throws PersistenceException {
  if (unloadedNode == null || unloadedNode.isEmpty()) {
    return;
  }
  String errorMessage=null;
  if (unloadedNode.size() == 1) {
    errorMessage=Messages.getString("String_Node_Str",unloadedNode.get(0));
  }
 else {
    StringBuilder curentName=new StringBuilder();
    for (    NodeType component : unloadedNode) {
      curentName.append(component.getComponentName()).append("String_Node_Str");
    }
    curentName.deleteCharAt(curentName.length() - 1);
    errorMessage=Messages.getString("String_Node_Str",curentName.toString());
  }
  PersistenceException ex=new PersistenceException(errorMessage);
  throw ex;
}

Fixed version (ground truth):
/** 
 * Checks if there are unloaded nodes.If there are some nodes unloaded, throws PersistenceException.
 * @throws PersistenceException PersistenceException
 */
@Override public void checkLoadNodes() throws PersistenceException {
  if (unloadedNode == null || unloadedNode.isEmpty()) {
    return;
  }
  String errorMessage=null;
  if (unloadedNode.size() == 1) {
    errorMessage=Messages.getString("String_Node_Str",unloadedNode.get(0).getComponentName());
  }
 else {
    StringBuilder curentName=new StringBuilder();
    for (    NodeType component : unloadedNode) {
      curentName.append(component.getComponentName()).append("String_Node_Str");
    }
    curentName.deleteCharAt(curentName.length() - 1);
    errorMessage=Messages.getString("String_Node_Str",curentName.toString());
  }
  PersistenceException ex=new PersistenceException(errorMessage);
  throw ex;
}
Program: 118958
Project: 118958
Buggy source:
/** 
 * DOC amaumont Comment method "createPreview".
 * @param configurationElements
 * @return
 * @throws CoreException
 */
private static IPreview createPreview(String type) throws CoreException {
  IExtensionRegistry registry=Platform.getExtensionRegistry();
  IConfigurationElement[] configurationElements=registry.getConfigurationElementsFor("String_Node_Str");
  forceStopPreview();
  IPreview preview=null;
  if (configurationElements.length > 0) {
    preview=(IPreview)configurationElements[0].createExecutableExtension("String_Node_Str");
  }
  for (  IConfigurationElement configurationElement : configurationElements) {
    if (type != null && !type.isEmpty()) {
      String fileType=configurationElement.getAttribute("String_Node_Str");
      if (fileType == null || fileType.isEmpty() || !fileType.equals(type)) {
        continue;
      }
    }
    IPreview pre=(IPreview)configurationElement.createExecutableExtension("String_Node_Str");
    if (!PluginChecker.isOnlyTopLoaded() && !pre.isTopPreview()) {
      preview=pre;
    }
  }
  if (preview == null) {
    log.error(Messages.getString("String_Node_Str") + Messages.getString("String_Node_Str"));
  }
  currentPreview=preview;
  return preview;
}

Fixed version (ground truth):
/** 
 * DOC amaumont Comment method "createPreview".
 * @param configurationElements
 * @return
 * @throws CoreException
 */
private static IPreview createPreview(String type) throws CoreException {
  IExtensionRegistry registry=Platform.getExtensionRegistry();
  IConfigurationElement[] configurationElements=registry.getConfigurationElementsFor("String_Node_Str");
  forceStopPreview();
  IPreview preview=null;
  if (configurationElements.length > 0) {
    preview=(IPreview)configurationElements[0].createExecutableExtension("String_Node_Str");
  }
  for (  IConfigurationElement configurationElement : configurationElements) {
    String fileType=configurationElement.getAttribute("String_Node_Str");
    if (type == null && fileType != null) {
      continue;
    }
 else     if (type != null) {
      if (fileType == null) {
        continue;
      }
 else       if (!fileType.equals(type)) {
        continue;
      }
    }
    IPreview pre=(IPreview)configurationElement.createExecutableExtension("String_Node_Str");
    if (!PluginChecker.isOnlyTopLoaded() && !pre.isTopPreview()) {
      preview=pre;
    }
  }
  if (preview == null) {
    log.error(Messages.getString("String_Node_Str") + Messages.getString("String_Node_Str"));
  }
  currentPreview=preview;
  return preview;
}
Program: 118959
Project: 118959
Buggy source:
public Object[] getChildren(Object parentElement){
  if (parentElement instanceof Job) {
    return ((Job)parentElement).getCategories().toArray();
  }
 else   if (parentElement instanceof Category) {
    return ((Category)parentElement).getItems().toArray();
  }
  return null;
}

Fixed version (ground truth):
@Override public Object[] getChildren(Object parentElement){
  if (parentElement instanceof Job) {
    return ((Job)parentElement).getCategories().toArray();
  }
 else   if (parentElement instanceof Category) {
    return ((Category)parentElement).getItems().toArray();
  }
  return null;
}
Program: 118960
Project: 118960
Buggy source:
public Object getParent(Object element){
  if (element instanceof Job) {
    return null;
  }
 else   if (element instanceof Category) {
    return ((Category)element).getParent();
  }
 else   if (element instanceof Item) {
    return ((Item)element).getParent();
  }
  return null;
}

Fixed version (ground truth):
@Override public Object getParent(Object element){
  if (element instanceof Job) {
    return null;
  }
 else   if (element instanceof Category) {
    return ((Category)element).getParent();
  }
 else   if (element instanceof Item) {
    return ((Item)element).getParent();
  }
  return null;
}
Program: 118961
Project: 118961
Buggy source:
public boolean hasChildren(Object element){
  if (element instanceof Job) {
    return !((Job)element).getCategories().isEmpty();
  }
 else   if (element instanceof Category) {
    return !((Category)element).getItems().isEmpty();
  }
 else   if (element instanceof Item) {
    return false;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean hasChildren(Object element){
  if (element instanceof Job) {
    return !((Job)element).getCategories().isEmpty();
  }
 else   if (element instanceof Category) {
    return !((Category)element).getItems().isEmpty();
  }
 else   if (element instanceof Item) {
    return false;
  }
  return false;
}
Program: 118963
Project: 118963
Buggy source:
public void dispose(){
}

Fixed version (ground truth):
@Override public void dispose(){
}
Program: 118964
Project: 118964
Buggy source:
public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
}

Fixed version (ground truth):
@Override public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
}
Program: 118966
Project: 118966
Buggy source:
public void cleanBeforeGenerate(int options) throws ProcessorException {
  if (this.getProcess().isNeedRegenerateCode() || this.getProcess() instanceof IProcess2 && ((IProcess2)this.getProcess()).isProcessModified()) {
  }
 else {
    return;
  }
  if (BitwiseOptionUtils.containOption(options,CLEAN_JAVA_CODES)) {
    IFolder javaCodeFolder=getCodeProject().getFolder(this.getSrcCodePath().removeLastSegments(1));
    cleanFolder(javaCodeFolder);
    IFolder classCodeFolder=getCodeProject().getFolder(this.getCompiledCodePath().removeLastSegments(1));
    cleanFolder(classCodeFolder);
  }
  if (BitwiseOptionUtils.containOption(options,CLEAN_CONTEXTS)) {
    IFolder srcContextFolder=getCodeProject().getFolder(this.getSrcContextPath().removeLastSegments(1));
    cleanFolder(srcContextFolder);
    IFolder classContextFolder=getCodeProject().getFolder(this.getCompiledContextPath().removeLastSegments(1));
    cleanFolder(classContextFolder);
  }
  if (BitwiseOptionUtils.containOption(options,CLEAN_DATA_SETS) && isTestJob) {
    IFolder srcDatasetFolder=getCodeProject().getFolder(this.getSrcDataSetPath());
    cleanFolder(srcDatasetFolder);
  }
}

Fixed version (ground truth):
public void cleanBeforeGenerate(int options) throws ProcessorException {
  setDoClean(false);
  if (this.getProcess().isNeedRegenerateCode() || this.getProcess() instanceof IProcess2 && ((IProcess2)this.getProcess()).isProcessModified()) {
    setDoClean(true);
  }
 else {
    return;
  }
  if (BitwiseOptionUtils.containOption(options,CLEAN_JAVA_CODES)) {
    IFolder javaCodeFolder=getCodeProject().getFolder(this.getSrcCodePath().removeLastSegments(1));
    cleanFolder(javaCodeFolder);
    IFolder classCodeFolder=getCodeProject().getFolder(this.getCompiledCodePath().removeLastSegments(1));
    cleanFolder(classCodeFolder);
  }
  if (BitwiseOptionUtils.containOption(options,CLEAN_CONTEXTS)) {
    IFolder srcContextFolder=getCodeProject().getFolder(this.getSrcContextPath().removeLastSegments(1));
    cleanFolder(srcContextFolder);
    IFolder classContextFolder=getCodeProject().getFolder(this.getCompiledContextPath().removeLastSegments(1));
    cleanFolder(classContextFolder);
  }
  if (BitwiseOptionUtils.containOption(options,CLEAN_DATA_SETS) && isTestJob) {
    IFolder srcDatasetFolder=getCodeProject().getFolder(this.getSrcDataSetPath());
    cleanFolder(srcDatasetFolder);
  }
}
Program: 118972
Project: 118972
Buggy source:
protected AbstractLoginActionPage getFirstTimeStartupPageIfNeeded(){
  AbstractLoginActionPage loginPage=null;
  Project[] projects=LoginHelper.getInstance().getProjects(LoginHelper.createDefaultLocalConnection());
  if (projects == null || projects.length == 0) {
    List<ConnectionBean> storedConnections=LoginHelper.getInstance().getStoredConnections();
    if (storedConnections == null || storedConnections.isEmpty() || (storedConnections.size() == 1 && !LoginHelper.isRemoteConnection(storedConnections.get(0)))) {
      loginPage=new LoginFirstTimeStartupActionPage(base,this,SWT.NONE);
    }
  }
  return loginPage;
}

Fixed version (ground truth):
protected AbstractLoginActionPage getFirstTimeStartupPageIfNeeded(){
  AbstractLoginActionPage loginPage=null;
  Project[] projects=LoginHelper.getInstance().getProjects(LoginHelper.createDefaultLocalConnection());
  if (projects == null || projects.length == 0) {
    List<ConnectionBean> storedConnections=LoginHelper.getInstance().getStoredConnections();
    if (storedConnections == null || storedConnections.isEmpty() || (storedConnections.size() == 1 && !LoginHelper.isRemoteConnection(storedConnections.get(0)) && LoginHelper.isWorkspaceSame(storedConnections.get(0)))) {
      loginPage=new LoginFirstTimeStartupActionPage(base,this,SWT.NONE);
    }
  }
  return loginPage;
}
Program: 118975
Project: 118975
Buggy source:
public boolean isWorkSpaceSame(){
  ConnectionBean iBean=getConnection();
  if (iBean == null) {
    return false;
  }
  if (RepositoryPlugin.getDefault().getBundle().getBundleContext().getProperty("String_Node_Str") != null) {
    return true;
  }
  String workspace=iBean.getWorkSpace();
  String defaultPath=new Path(Platform.getInstanceLocation().getURL().getPath()).toFile().getPath();
  if (EnvironmentUtils.isWindowsSystem()) {
    return workspace.equalsIgnoreCase(defaultPath);
  }
 else {
    return workspace.equals(defaultPath);
  }
}

Fixed version (ground truth):
public boolean isWorkSpaceSame(){
  return LoginHelper.isWorkspaceSame(getConnection());
}
Program: 118976
Project: 118976
Buggy source:
public String getBranch(){
  Project project=getProject();
  if (branchesViewer != null && !branchesViewer.getSelection().isEmpty() && project != null) {
    IStructuredSelection ss=(IStructuredSelection)branchesViewer.getSelection();
    String branch=(String)ss.getFirstElement();
    return branch;
  }
  return null;
}

Fixed version (ground truth):
public String getBranch(){
  Project project=getProject();
  boolean isRemoteConnection=LoginHelper.isRemoteConnection(getConnection());
  if (branchesViewer != null && isRemoteConnection && !branchesViewer.getSelection().isEmpty() && project != null) {
    IStructuredSelection ss=(IStructuredSelection)branchesViewer.getSelection();
    String branch=(String)ss.getFirstElement();
    return branch;
  }
 else   if (!isRemoteConnection && project != null) {
    List<ProjectReference> referenceProjects=project.getEmfProject().getReferencedProjects();
    String currentBranch=null;
    if (referenceProjects != null && !referenceProjects.isEmpty()) {
      boolean allBranchesAreSame=true;
      for (      ProjectReference referenceProject : referenceProjects) {
        String branchFromReference=referenceProject.getBranch();
        if (currentBranch == null) {
          if (branchFromReference == null) {
            branchFromReference="String_Node_Str";
          }
          currentBranch=branchFromReference;
          continue;
        }
        if (!currentBranch.equals(branchFromReference)) {
          allBranchesAreSame=false;
          break;
        }
      }
      if (!allBranchesAreSame) {
        currentBranch="String_Node_Str";
      }
    }
 else {
      currentBranch="String_Node_Str";
    }
    return currentBranch;
  }
  return null;
}
Program: 118978
Project: 118978
Buggy source:
@Override public void checkStartNodes(){
  for (  INode node : nodes) {
    if ((Boolean)node.getPropertyValue(EParameterName.STARTABLE.getName())) {
      if (node.isActivate()) {
        boolean checkIfCanBeStart=node.checkIfCanBeStart();
        node.setStart(checkIfCanBeStart);
      }
    }
  }
  if (!isDuplicate()) {
    for (    INode inode : nodes) {
      Node node=(Node)inode;
      node.calculateSubtreeStartAndEnd();
    }
    ConnectionListController.updateConnectionList(this);
    updateSubjobContainers();
  }
}

Fixed version (ground truth):
@Override public void checkStartNodes(){
  for (  INode node : new ArrayList<>(nodes)) {
    if ((Boolean)node.getPropertyValue(EParameterName.STARTABLE.getName())) {
      if (node.isActivate()) {
        boolean checkIfCanBeStart=node.checkIfCanBeStart();
        node.setStart(checkIfCanBeStart);
      }
    }
  }
  if (!isDuplicate()) {
    for (    INode inode : nodes) {
      Node node=(Node)inode;
      node.calculateSubtreeStartAndEnd();
    }
    ConnectionListController.updateConnectionList(this);
    updateSubjobContainers();
  }
}
Program: 118979
Project: 118979
Buggy source:
public String getBranch(){
  Project project=getProject();
  if (branchesViewer != null && !branchesViewer.getSelection().isEmpty() && project != null) {
    IStructuredSelection ss=(IStructuredSelection)branchesViewer.getSelection();
    String branch=(String)ss.getFirstElement();
    return branch;
  }
  return null;
}

Fixed version (ground truth):
public String getBranch(){
  Project project=getProject();
  boolean isRemoteConnection=LoginHelper.isRemoteConnection(getConnection());
  if (branchesViewer != null && isRemoteConnection && !branchesViewer.getSelection().isEmpty() && project != null) {
    IStructuredSelection ss=(IStructuredSelection)branchesViewer.getSelection();
    String branch=(String)ss.getFirstElement();
    return branch;
  }
 else   if (!isRemoteConnection && project != null) {
    List<ProjectReference> referenceProjects=project.getEmfProject().getReferencedProjects();
    String currentBranch=null;
    if (referenceProjects != null && !referenceProjects.isEmpty()) {
      boolean allBranchesAreSame=true;
      for (      ProjectReference referenceProject : referenceProjects) {
        String branchFromReference=referenceProject.getBranch();
        if (currentBranch == null) {
          if (branchFromReference == null) {
            branchFromReference="String_Node_Str";
          }
          currentBranch=branchFromReference;
          continue;
        }
        if (!currentBranch.equals(branchFromReference)) {
          allBranchesAreSame=false;
          break;
        }
      }
      if (!allBranchesAreSame) {
        currentBranch="String_Node_Str";
      }
    }
 else {
      currentBranch="String_Node_Str";
    }
    return currentBranch;
  }
  return null;
}
Program: 118981
Project: 118981
Buggy source:
@Override public void checkStartNodes(){
  for (  INode node : nodes) {
    if ((Boolean)node.getPropertyValue(EParameterName.STARTABLE.getName())) {
      if (node.isActivate()) {
        boolean checkIfCanBeStart=node.checkIfCanBeStart();
        node.setStart(checkIfCanBeStart);
      }
    }
  }
  if (!isDuplicate()) {
    for (    INode inode : nodes) {
      Node node=(Node)inode;
      node.calculateSubtreeStartAndEnd();
    }
    ConnectionListController.updateConnectionList(this);
    updateSubjobContainers();
  }
}

Fixed version (ground truth):
@Override public void checkStartNodes(){
  for (  INode node : new ArrayList<>(nodes)) {
    if ((Boolean)node.getPropertyValue(EParameterName.STARTABLE.getName())) {
      if (node.isActivate()) {
        boolean checkIfCanBeStart=node.checkIfCanBeStart();
        node.setStart(checkIfCanBeStart);
      }
    }
  }
  if (!isDuplicate()) {
    for (    INode inode : nodes) {
      Node node=(Node)inode;
      node.calculateSubtreeStartAndEnd();
    }
    ConnectionListController.updateConnectionList(this);
    updateSubjobContainers();
  }
}
Program: 118982
Project: 118982
Buggy source:
@Override protected void createContents(Composite composite){
  tableViewer=new TableViewer(composite,SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL);
  final Table table=tableViewer.getTable();
  table.setLinesVisible(true);
  table.setHeaderVisible(false);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true);
  gd.horizontalAlignment=SWT.FILL;
  gd.verticalAlignment=SWT.FILL;
  table.setLayoutData(gd);
  TableViewerColumn column=new TableViewerColumn(tableViewer,SWT.NONE);
  table.addPaintListener(new PaintListener(){
    public void paintControl(    PaintEvent e){
      TableColumn[] columns=table.getColumns();
      int clientWidth=table.getBounds().width;
      columns[0].setWidth(clientWidth);
    }
  }
);
  if (editable) {
    column.setEditingSupport(new FieldEditingSupport(tableViewer,0));
  }
  tableViewer.setLabelProvider(new TableLabelProvider());
  tableViewer.setContentProvider(new ContentProvider());
}

Fixed version (ground truth):
@Override protected void createContents(Composite composite){
  tableViewer=new TableViewer(composite,SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL);
  final Table table=tableViewer.getTable();
  table.setLinesVisible(true);
  table.setHeaderVisible(false);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true);
  gd.horizontalAlignment=SWT.FILL;
  gd.verticalAlignment=SWT.FILL;
  table.setLayoutData(gd);
  TableViewerColumn column=new TableViewerColumn(tableViewer,SWT.NONE);
  table.addListener(SWT.Resize,new Listener(){
    public void handleEvent(    Event event){
      TableColumn[] columns=table.getColumns();
      int clientWidth=table.getBounds().width;
      columns[0].setWidth(clientWidth);
    }
  }
);
  if (editable) {
    column.setEditingSupport(new FieldEditingSupport(tableViewer,0));
  }
  tableViewer.setLabelProvider(new TableLabelProvider());
  tableViewer.setContentProvider(new ContentProvider());
}
Program: 118983
Project: 118983
Buggy source:
@Override protected void createContents(Composite composite){
  tableViewer=new TableViewer(composite,SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL);
  final Table table=tableViewer.getTable();
  table.setLinesVisible(true);
  table.setHeaderVisible(false);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true);
  gd.horizontalAlignment=SWT.FILL;
  gd.verticalAlignment=SWT.FILL;
  table.setLayoutData(gd);
  TableViewerColumn column=new TableViewerColumn(tableViewer,SWT.NONE);
  table.addPaintListener(new PaintListener(){
    public void paintControl(    PaintEvent e){
      TableColumn[] columns=table.getColumns();
      int clientWidth=table.getBounds().width;
      columns[0].setWidth(clientWidth);
    }
  }
);
  if (editable) {
    column.setEditingSupport(new FieldEditingSupport(tableViewer,0));
  }
  tableViewer.setLabelProvider(new TableLabelProvider());
  tableViewer.setContentProvider(new ContentProvider());
}

Fixed version (ground truth):
@Override protected void createContents(Composite composite){
  tableViewer=new TableViewer(composite,SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL);
  final Table table=tableViewer.getTable();
  table.setLinesVisible(true);
  table.setHeaderVisible(false);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true);
  gd.horizontalAlignment=SWT.FILL;
  gd.verticalAlignment=SWT.FILL;
  table.setLayoutData(gd);
  TableViewerColumn column=new TableViewerColumn(tableViewer,SWT.NONE);
  table.addListener(SWT.Resize,new Listener(){
    public void handleEvent(    Event event){
      TableColumn[] columns=table.getColumns();
      int clientWidth=table.getBounds().width;
      columns[0].setWidth(clientWidth);
    }
  }
);
  if (editable) {
    column.setEditingSupport(new FieldEditingSupport(tableViewer,0));
  }
  tableViewer.setLabelProvider(new TableLabelProvider());
  tableViewer.setContentProvider(new ContentProvider());
}
Program: 118988
Project: 118988
Buggy source:
protected AbstractLoginActionPage getFirstTimeStartupPageIfNeeded(){
  AbstractLoginActionPage loginPage=null;
  Project[] projects=LoginHelper.getInstance().getProjects(LoginHelper.createDefaultLocalConnection());
  if (projects == null || projects.length == 0) {
    List<ConnectionBean> storedConnections=LoginHelper.getInstance().getStoredConnections();
    if (storedConnections == null || storedConnections.isEmpty() || (storedConnections.size() == 1 && !LoginHelper.isRemoteConnection(storedConnections.get(0)))) {
      loginPage=new LoginFirstTimeStartupActionPage(base,this,SWT.NONE);
    }
  }
  return loginPage;
}

Fixed version (ground truth):
protected AbstractLoginActionPage getFirstTimeStartupPageIfNeeded(){
  AbstractLoginActionPage loginPage=null;
  Project[] projects=LoginHelper.getInstance().getProjects(LoginHelper.createDefaultLocalConnection());
  if (projects == null || projects.length == 0) {
    List<ConnectionBean> storedConnections=LoginHelper.getInstance().getStoredConnections();
    if (storedConnections == null || storedConnections.isEmpty() || (storedConnections.size() == 1 && !LoginHelper.isRemoteConnection(storedConnections.get(0)) && LoginHelper.isWorkspaceSame(storedConnections.get(0)))) {
      loginPage=new LoginFirstTimeStartupActionPage(base,this,SWT.NONE);
    }
  }
  return loginPage;
}
Program: 118991
Project: 118991
Buggy source:
public boolean isWorkSpaceSame(){
  ConnectionBean iBean=getConnection();
  if (iBean == null) {
    return false;
  }
  if (RepositoryPlugin.getDefault().getBundle().getBundleContext().getProperty("String_Node_Str") != null) {
    return true;
  }
  String workspace=iBean.getWorkSpace();
  String defaultPath=new Path(Platform.getInstanceLocation().getURL().getPath()).toFile().getPath();
  if (EnvironmentUtils.isWindowsSystem()) {
    return workspace.equalsIgnoreCase(defaultPath);
  }
 else {
    return workspace.equals(defaultPath);
  }
}

Fixed version (ground truth):
public boolean isWorkSpaceSame(){
  return LoginHelper.isWorkspaceSame(getConnection());
}
Program: 118992
Project: 118992
Buggy source:
@Override public Composite getContainer(){
  return super.getContainer();
}

Fixed version (ground truth):
@Override public Composite getContainer(){
  return this.container;
}
Program: 118993
Project: 118993
Buggy source:
@Override public int getActivePage(){
  return super.getActivePage();
}

Fixed version (ground truth):
@Override public int getActivePage(){
  CTabFolder tabFolder=getTabFolder();
  if (tabFolder != null && !tabFolder.isDisposed()) {
    return tabFolder.getSelectionIndex();
  }
  return -1;
}
Program: 118995
Project: 118995
Buggy source:
protected void resetProjectOperationSelection(final boolean needCheckError){
  selectExistingProject.setSelection(true);
  refreshProjectListAreaEnable(selectExistingProject.isEnabled());
  importDemoProject.setSelection(false);
  executeImportDemoProject.setVisible(false);
  importLocalProject.setSelection(false);
  executeImportLocalProject.setVisible(false);
  createSandBoxProject.setSelection(false);
  executeCreateSandBoxProject.setVisible(false);
  createNewProject.setSelection(false);
  createNewProject.setText(Messages.getString("String_Node_Str"));
  newProjectName.setVisible(false);
  executeCreateNewProject.setVisible(false);
  if (needCheckError) {
    try {
      checkErrors();
    }
 catch (    PersistenceException e) {
      CommonExceptionHandler.process(e);
    }
  }
 else {
    changeFinishButtonAction();
    refreshUIFinishButtonEnable();
    finishButton.getShell().setDefaultButton(finishButton);
  }
}

Fixed version (ground truth):
protected void resetProjectOperationSelection(final boolean needCheckError){
  selectExistingProject.setSelection(true);
  finishButtonAction=FINISH_ACTION_OPEN_PROJECT;
  refreshProjectListAreaEnable(selectExistingProject.isEnabled());
  importDemoProject.setSelection(false);
  executeImportDemoProject.setVisible(false);
  importLocalProject.setSelection(false);
  executeImportLocalProject.setVisible(false);
  createSandBoxProject.setSelection(false);
  executeCreateSandBoxProject.setVisible(false);
  createNewProject.setSelection(false);
  createNewProject.setText(Messages.getString("String_Node_Str"));
  newProjectName.setVisible(false);
  executeCreateNewProject.setVisible(false);
  if (needCheckError) {
    try {
      checkErrors();
    }
 catch (    PersistenceException e) {
      CommonExceptionHandler.process(e);
    }
  }
 else {
    changeFinishButtonAction();
    finishButton.getShell().setDefaultButton(finishButton);
  }
}
Program: 118996
Project: 118996
Buggy source:
protected void refreshProjectOperationAreaEnable(boolean isEnable){
  refreshProjectListAreaEnable(isEnable && selectExistingProject.getSelection());
  projectOperationArea.setEnabled(isEnable);
  selectExistingProject.setEnabled(isEnable);
  importDemoProject.setEnabled(isEnable);
  executeImportDemoProject.setEnabled(isEnable);
  importLocalProject.setEnabled(isEnable);
  executeImportLocalProject.setEnabled(isEnable);
  createSandBoxProject.setEnabled(isEnable);
  executeCreateSandBoxProject.setEnabled(isEnable);
  createNewProject.setEnabled(isEnable);
  executeCreateNewProject.setEnabled(isEnable);
}

Fixed version (ground truth):
protected void refreshProjectOperationAreaEnable(boolean isEnable){
  refreshProjectListAreaEnable(isEnable && selectExistingProject.getSelection());
  projectOperationArea.setEnabled(isEnable);
  selectExistingProject.setEnabled(isEnable);
  importDemoProject.setEnabled(isEnable);
  executeImportDemoProject.setEnabled(isEnable);
  importLocalProject.setEnabled(isEnable);
  executeImportLocalProject.setEnabled(isEnable);
  createSandBoxProject.setEnabled(isEnable);
  executeCreateSandBoxProject.setEnabled(isEnable);
  createNewProject.setEnabled(isEnable);
  executeCreateNewProject.setEnabled(isEnable);
  alwaysAsk.setEnabled(isEnable);
}