nus-yam/ex-repair huggingface dataset:
Program: 10887
Project: 10887
Buggy source:
public static File createTemporaryFile(String folderName,String fileName) throws IOException {
  File tempFolder=File.createTempFile(folderName,null);
  tempFolder.delete();
  tempFolder.mkdirs();
  tempFolder.setExecutable(true);
  File targetFile=new File(tempFolder,fileName);
  targetFile.delete();
  targetFile.createNewFile();
  targetFile.setExecutable(true);
  targetFile.setWritable(true);
  return targetFile;
}

Fixed version (ground truth):
/** 
 * Creates a temporary folder and file with the given names. It is the responsibility of the caller to properly dispose the folder and file after it is created
 * @param folderName
 * @param fileName
 * @return
 * @throws IOException
 */
public static File createTemporaryFile(String folderName,String fileName) throws IOException {
  File tempFolder=File.createTempFile(folderName,null);
  tempFolder.delete();
  tempFolder.mkdirs();
  tempFolder.setExecutable(true);
  File targetFile=new File(tempFolder,fileName);
  targetFile.delete();
  targetFile.createNewFile();
  targetFile.setExecutable(true);
  targetFile.setWritable(true);
  return targetFile;
}
Program: 10888
Project: 10888
Buggy source:
public static void setOptionVariableValues(ServiceCommand serviceCommand,Map<String,String> variableToValueMap){
  CommandOptions commandOptions=serviceCommand.getOptions();
  if (commandOptions == null || commandOptions.getOptions() == null) {
    return;
  }
  String options=commandOptions.getOptions();
  StringBuffer variableBuffer=null;
  StringBuffer resolvedOptions=new StringBuffer(options);
  int dollarSignIndex=-1;
  for (int i=0; i < resolvedOptions.length(); i++) {
    if (resolvedOptions.charAt(i) == '$') {
      dollarSignIndex=i;
      variableBuffer=new StringBuffer();
    }
 else     if ((resolvedOptions.charAt(i) == '}' || i == resolvedOptions.length() - 1) && variableBuffer != null) {
      if (variableBuffer.length() > 0) {
        String variable=variableBuffer.toString();
        String value=variableToValueMap.get(variable);
        int endingIndex=i + 1;
        if (value != null && dollarSignIndex >= 0 && (endingIndex <= resolvedOptions.length())) {
          resolvedOptions.replace(dollarSignIndex,endingIndex,"String_Node_Str");
          resolvedOptions.insert(dollarSignIndex,value);
        }
      }
      variableBuffer=null;
      dollarSignIndex=-1;
    }
 else     if (variableBuffer != null && resolvedOptions.charAt(i) != '{') {
      variableBuffer.append(resolvedOptions.charAt(i));
    }
  }
  CommandOptions resolvedOp=new CommandOptions();
  resolvedOp.setOptions(resolvedOptions.toString());
  serviceCommand.setOptions(resolvedOp);
}

Fixed version (ground truth):
public static void setOptionVariableValues(ServiceCommand serviceCommand,Map<String,String> variableToValueMap){
  CommandOptions commandOptions=serviceCommand.getOptions();
  if (commandOptions == null || commandOptions.getOptions() == null) {
    return;
  }
  String options=commandOptions.getOptions();
  StringBuffer variableBuffer=null;
  StringBuffer resolvedOptions=new StringBuffer(options);
  int dollarSignIndex=-1;
  for (int i=0; i < resolvedOptions.length(); ) {
    boolean inserted=false;
    if (resolvedOptions.charAt(i) == '$') {
      dollarSignIndex=i;
      variableBuffer=new StringBuffer();
    }
 else     if ((resolvedOptions.charAt(i) == '}' || i == resolvedOptions.length() - 1) && variableBuffer != null) {
      if (variableBuffer.length() > 0) {
        String variable=variableBuffer.toString();
        String value=variableToValueMap.get(variable);
        int endingIndex=i + 1;
        if (value != null && dollarSignIndex >= 0 && (endingIndex <= resolvedOptions.length())) {
          resolvedOptions.replace(dollarSignIndex,endingIndex,"String_Node_Str");
          resolvedOptions.insert(dollarSignIndex,value);
          i=dollarSignIndex + value.length();
          inserted=true;
        }
      }
      variableBuffer=null;
      dollarSignIndex=-1;
    }
 else     if (variableBuffer != null && resolvedOptions.charAt(i) != '{') {
      variableBuffer.append(resolvedOptions.charAt(i));
    }
    if (!inserted) {
      i++;
    }
  }
  CommandOptions resolvedOp=new CommandOptions();
  resolvedOp.setOptions(resolvedOptions.toString());
  serviceCommand.setOptions(resolvedOp);
}
Program: 10889
Project: 10889
Buggy source:
protected File getScriptFile() throws IOException {
  File scriptFile=getTempScriptFile();
  if (scriptFile != null && scriptFile.exists()) {
    StringWriter options=new StringWriter();
    options.append(serviceCommand.getExternalApplicationLaunchInfo().getExecutableName());
    String appOptions=ServiceCommand.getSerialisedOptions(serviceCommand);
    if (appOptions != null) {
      options.append(' ');
      options.append(appOptions);
    }
    FileOutputStream outStream=null;
    try {
      outStream=new FileOutputStream(scriptFile);
      OutputStreamWriter outWriter=new OutputStreamWriter(outStream);
      BufferedWriter writer=new BufferedWriter(outWriter);
      writer.write(options.toString());
      writer.flush();
      if (!changePermission(scriptFile)) {
        CloudFoundryPlugin.logError("String_Node_Str" + scriptFile.getAbsolutePath() + "String_Node_Str");
        return null;
      }
    }
 catch (    IOException e) {
      CloudFoundryPlugin.logError(e);
    }
 finally {
      if (outStream != null) {
        IOUtils.closeQuietly(outStream);
      }
    }
  }
  return scriptFile;
}

Fixed version (ground truth):
protected File getScriptFile(String options) throws IOException {
  if (options == null || options.length() == 0) {
    return null;
  }
  File scriptFile=getTempScriptFile();
  if (scriptFile != null && scriptFile.exists()) {
    FileOutputStream outStream=null;
    try {
      outStream=new FileOutputStream(scriptFile);
      OutputStreamWriter outWriter=new OutputStreamWriter(outStream);
      BufferedWriter writer=new BufferedWriter(outWriter);
      writer.write(options);
      writer.flush();
      if (!changePermission(scriptFile)) {
        CloudFoundryPlugin.logError("String_Node_Str" + scriptFile.getAbsolutePath() + "String_Node_Str");
        return null;
      }
    }
 catch (    IOException e) {
      CloudFoundryPlugin.logError(e);
    }
 finally {
      if (outStream != null) {
        IOUtils.closeQuietly(outStream);
      }
    }
  }
  return scriptFile;
}
Program: 10890
Project: 10890
Buggy source:
protected boolean addExternalToolCommand(List<String> processCommands) throws IOException {
  if (Platform.OS_MACOSX.equals(PlatformUtil.getOS())) {
    File scriptFile=getScriptFile();
    if (scriptFile != null && scriptFile.exists()) {
      processCommands.add(scriptFile.getAbsolutePath());
      return true;
    }
  }
 else {
    processCommands.add(serviceCommand.getExternalApplicationLaunchInfo().getExecutableName());
    if (serviceCommand.getOptions() != null) {
      for (      CommandOption option : serviceCommand.getOptions()) {
        processCommands.add(option.getOption());
      }
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
protected boolean addExternalToolCommand(List<String> processCommands) throws IOException {
  String appOptions=serviceCommand.getOptions() != null ? serviceCommand.getOptions().getOptions() : null;
  if (Platform.OS_MACOSX.equals(PlatformUtil.getOS())) {
    StringWriter optionsWr=new StringWriter();
    optionsWr.append(serviceCommand.getExternalApplicationLaunchInfo().getExecutableName());
    if (appOptions != null) {
      optionsWr.append(' ');
      optionsWr.append(appOptions);
    }
    File scriptFile=getScriptFile(optionsWr.toString());
    if (scriptFile != null && scriptFile.exists()) {
      processCommands.add(scriptFile.getAbsolutePath());
      return true;
    }
  }
 else {
    processCommands.add(serviceCommand.getExternalApplicationLaunchInfo().getExecutableName());
    if (appOptions != null) {
      processCommands.add(appOptions);
    }
    return true;
  }
  return false;
}
Program: 10891
Project: 10891
Buggy source:
public void setOptions(List<CommandOption> options){
  this.options=options;
}

Fixed version (ground truth):
public void setOptions(CommandOptions options){
  this.options=options;
}
Program: 10892
Project: 10892
Buggy source:
/** 
 * @return a copy of the options, or null if no options are set
 */
public List<CommandOption> getOptions(){
  return options != null ? new ArrayList<CommandOption>(options) : null;
}

Fixed version (ground truth):
public CommandOptions getOptions(){
  return options;
}
Program: 10893
Project: 10893
Buggy source:
public static boolean isOptionValueSet(CommandOption option){
  return option.getValue() != null && option.getValue().trim().startsWith("String_Node_Str");
}

Fixed version (ground truth):
public static boolean isOptionValueSet(CommandOption option){
  return option.getValue() != null && !option.getValue().trim().startsWith("String_Node_Str");
}
Program: 10894
Project: 10894
Buggy source:
public CommandDisplayPart(ServiceCommand serviceCommand){
  this.serviceCommand=serviceCommand;
}

Fixed version (ground truth):
public CommandDisplayPart(ServiceCommand serviceCommand){
  this.serviceCommand=serviceCommand != null ? serviceCommand : new ServiceCommand();
}
Program: 10895
Project: 10895
Buggy source:
protected void setInitialValues(){
  if (serviceCommand != null) {
    locationVal=serviceCommand.getExternalApplicationLaunchInfo().getExecutableName();
    if (locationVal != null) {
      locationField.setText(locationVal);
    }
    displayNameVal=serviceCommand.getExternalApplicationLaunchInfo().getDisplayName();
    if (displayNameVal != null) {
      displayName.setText(displayNameVal);
    }
    optionsVal=ServiceCommand.getSerialisedOptions(serviceCommand);
    if (optionsVal != null) {
      options.setText(optionsVal);
    }
    terminalLocationVal=serviceCommand.getCommandTerminal() != null ? serviceCommand.getCommandTerminal().getTerminalLaunchCommand() : null;
    if (terminalLocationVal != null) {
      terminalLocation.setText(terminalLocationVal);
    }
  }
}

Fixed version (ground truth):
protected void setInitialValues(){
  if (serviceCommand != null) {
    locationVal=serviceCommand.getExternalApplicationLaunchInfo().getExecutableName();
    if (locationVal != null) {
      locationField.setText(locationVal);
    }
    displayNameVal=serviceCommand.getExternalApplicationLaunchInfo().getDisplayName();
    if (displayNameVal != null) {
      displayName.setText(displayNameVal);
    }
    optionsVal=ServiceCommand.getSerialisedOptions(serviceCommand);
    if (optionsVal != null) {
      options.setText(optionsVal);
    }
    if (serviceCommand.getCommandTerminal() != null) {
      terminalLocationVal=serviceCommand.getCommandTerminal().getTerminalLaunchCommand();
      if (terminalLocationVal != null) {
        terminalLocation.setText(terminalLocationVal);
      }
    }
  }
}
Program: 10896
Project: 10896
Buggy source:
public void modifyText(ModifyEvent event){
  option.setValue(text.getText());
  notifyChange(new PartChangeEvent(option,Status.OK_STATUS));
}

Fixed version (ground truth):
public void modifyText(ModifyEvent event){
  option.setValue(text.getText());
  validate();
}
Program: 10897
Project: 10897
Buggy source:
protected void createOptionLabel(final CommandOption option,Composite parent){
  Label serverLabel=new Label(parent,SWT.NONE);
  GridDataFactory.fillDefaults().grab(false,false).applyTo(serverLabel);
  serverLabel.setText(option.getOption() + "String_Node_Str");
  final Text text=new Text(parent,SWT.BORDER);
  GridDataFactory.fillDefaults().grab(true,false).applyTo(text);
  text.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent event){
      option.setValue(text.getText());
      notifyChange(new PartChangeEvent(option,Status.OK_STATUS));
    }
  }
);
}

Fixed version (ground truth):
protected void createOptionLabel(final CommandOption option,Composite parent){
  Label serverLabel=new Label(parent,SWT.NONE);
  GridDataFactory.fillDefaults().grab(false,false).applyTo(serverLabel);
  serverLabel.setText(option.getOption() + "String_Node_Str");
  final Text text=new Text(parent,SWT.BORDER);
  GridDataFactory.fillDefaults().grab(true,false).applyTo(text);
  text.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent event){
      option.setValue(text.getText());
      validate();
    }
  }
);
}
Program: 10898
Project: 10898
Buggy source:
public ServiceCommand getServiceCommand(){
  if (displayPart != null) {
    String location=displayPart.getLocation();
    String options=displayPart.getOptions();
    String displayName=displayPart.getDisplayName();
    String terminalLocation=displayPart.getTerminalLocation();
    ServiceCommand editedCommand=new ServiceCommand();
    if (terminalLocation != null) {
      CommandTerminal terminal=new CommandTerminal();
      terminal.setTerminalLaunchCommand(terminalLocation);
      editedCommand.setCommandTerminal(terminal);
    }
    ExternalApplicationLaunchInfo appInfo=new ExternalApplicationLaunchInfo();
    appInfo.setDisplayName(displayName);
    appInfo.setExecutableName(location);
    editedCommand.setExternalApplicationLaunchInfo(appInfo);
    ServiceCommand.covertToOptions(editedCommand,options);
    serviceCommand=editedCommand;
  }
  return serviceCommand;
}

Fixed version (ground truth):
public ServiceCommand getServiceCommand(){
  if (displayPart != null) {
    serviceCommand=displayPart.getServiceCommand();
  }
  return serviceCommand;
}
Program: 10899
Project: 10899
Buggy source:
public void handleChange(PartChangeEvent event){
  CommandOption firstUnsetOption=getFirstUnsetOption();
  if (firstUnsetOption != null) {
    setErrorMessage("String_Node_Str" + firstUnsetOption.getOption());
    setPageComplete(false);
  }
 else {
    setErrorMessage(null);
  }
}

Fixed version (ground truth):
public void handleChange(PartChangeEvent event){
  status=event.getStatus();
  if (status != null && !status.isOK()) {
    setErrorMessage(status.getMessage());
    setPageComplete(false);
  }
 else {
    setErrorMessage(null);
    setPageComplete(true);
  }
}
Program: 10900
Project: 10900
Buggy source:
public boolean isPageComplete(){
  return getFirstUnsetOption() == null;
}

Fixed version (ground truth):
public boolean isPageComplete(){
  return status == null || status.isOK();
}
Program: 10901
Project: 10901
Buggy source:
public void createControl(Composite parent){
  IWizard wizard=getWizard();
  unsetOptions=(wizard instanceof UnsetOptionsWizard) ? ((UnsetOptionsWizard)wizard).getCommandOptions() : null;
  UnsetOptionsPart part=new UnsetOptionsPart(unsetOptions);
  part.addPartChangeListener(new IPartChangeListener(){
    public void handleChange(    PartChangeEvent event){
      CommandOption firstUnsetOption=getFirstUnsetOption();
      if (firstUnsetOption != null) {
        setErrorMessage("String_Node_Str" + firstUnsetOption.getOption());
        setPageComplete(false);
      }
 else {
        setErrorMessage(null);
      }
    }
  }
);
  Control control=part.createControl(parent);
  setControl(control);
}

Fixed version (ground truth):
public void createControl(Composite parent){
  IWizard wizard=getWizard();
  unsetOptions=(wizard instanceof UnsetOptionsWizard) ? ((UnsetOptionsWizard)wizard).getCommandOptions() : null;
  UnsetOptionsPart part=new UnsetOptionsPart(unsetOptions);
  part.addPartChangeListener(new IPartChangeListener(){
    public void handleChange(    PartChangeEvent event){
      status=event.getStatus();
      if (status != null && !status.isOK()) {
        setErrorMessage(status.getMessage());
        setPageComplete(false);
      }
 else {
        setErrorMessage(null);
        setPageComplete(true);
      }
    }
  }
);
  Control control=part.createControl(parent);
  setControl(control);
}
Program: 10902
Project: 10902
Buggy source:
protected boolean isValidDescriptor(DeploymentDescriptor descriptor){
  if (descriptor == null) {
    return false;
  }
  if (descriptor.deploymentMode == null) {
    return false;
  }
  ApplicationInfo info=descriptor.applicationInfo;
  if (info == null || info.getAppName() == null || info.getFramework() == null) {
    return false;
  }
  DeploymentInfo deploymentInfo=descriptor.deploymentInfo;
  if (deploymentInfo == null || deploymentInfo.getDeploymentName() == null || ((descriptor.staging == null || !CloudApplication.STANDALONE.equals(descriptor.staging.getFramework())) && (deploymentInfo.getUris() == null || deploymentInfo.getUris().isEmpty()))) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
protected boolean isValidDescriptor(DeploymentDescriptor descriptor){
  if (descriptor == null || descriptor.deploymentMode == null) {
    return false;
  }
  ApplicationInfo info=descriptor.applicationInfo;
  if (info == null || info.getAppName() == null || info.getFramework() == null) {
    return false;
  }
  DeploymentInfo deploymentInfo=descriptor.deploymentInfo;
  if (deploymentInfo == null || deploymentInfo.getDeploymentName() == null || deploymentInfo.getMemory() <= 0 || ((descriptor.staging == null || !CloudApplication.STANDALONE.equals(descriptor.staging.getFramework())) && (deploymentInfo.getUris() == null || deploymentInfo.getUris().isEmpty()))) {
    return false;
  }
  return true;
}
Program: 10904
Project: 10904
Buggy source:
public DeploymentDescriptor getUpdatedDescriptor(IProgressMonitor monitor) throws CoreException {
  DeploymentDescriptor descriptor=new DeploymentDescriptor();
  ApplicationInfo appInfo=appModule.getLastApplicationInfo();
  if (appInfo == null) {
    appInfo=new ApplicationInfo(appModule.getApplicationId());
    String framework=org.cloudfoundry.ide.eclipse.internal.server.core.CloudUtil.getFramework(appModule);
    appInfo.setFramework(framework);
  }
  descriptor.applicationInfo=appInfo;
  DeploymentInfo deploymentInfo=appModule.getLastDeploymentInfo();
  if (deploymentInfo == null) {
    deploymentInfo=new DeploymentInfo();
    deploymentInfo.setMemory(512);
  }
  descriptor.deploymentInfo=deploymentInfo;
  descriptor.staging=appModule.getStaging();
  descriptor.deploymentMode=ApplicationAction.START;
  descriptor.deploymentInfo.setUris(uris);
  return descriptor;
}

Fixed version (ground truth):
public DeploymentDescriptor getUpdatedDescriptor(IProgressMonitor monitor) throws CoreException {
  DeploymentDescriptor descriptor=new DeploymentDescriptor();
  ApplicationInfo appInfo=appModule.getLastApplicationInfo();
  if (appInfo == null) {
    appInfo=new ApplicationInfo(appModule.getApplicationId());
    String framework=org.cloudfoundry.ide.eclipse.internal.server.core.CloudUtil.getFramework(appModule);
    appInfo.setFramework(framework);
  }
  descriptor.applicationInfo=appInfo;
  DeploymentInfo deploymentInfo=appModule.getLastDeploymentInfo();
  if (deploymentInfo == null) {
    deploymentInfo=new DeploymentInfo();
    deploymentInfo.setDeploymentName(appModule.getApplicationId());
    deploymentInfo.setMemory(CloudUtil.DEFAULT_MEMORY);
  }
  descriptor.deploymentInfo=deploymentInfo;
  descriptor.staging=appModule.getStaging();
  descriptor.deploymentMode=ApplicationAction.START;
  descriptor.deploymentInfo.setUris(uris);
  return descriptor;
}
Program: 10906
Project: 10906
Buggy source:
/** 
 * Only returns a list of servers that actually have services. Skips servers with no services. Returns a new and updated copy of the servers every time it is called. Changes to the list will not be reflected until explicitly persisted using a persistence or save API.
 * @param monitor
 * @return
 * @throws CoreException
 */
public List<ExternalToolLaunchCommandsServer> getUpdatedServerServiceCommands(IProgressMonitor monitor) throws CoreException {
  List<CloudFoundryServer> cfServers=CloudServerUtil.getCloudServers();
  List<ExternalToolLaunchCommandsServer> servicesServer=new ArrayList<ExternalToolLaunchCommandsServer>();
  for (  CloudFoundryServer cfServer : cfServers) {
    ExternalToolLaunchCommandsServer server=cfServer.getUpdatedTunnelServiceCommands(monitor);
    if (server != null && server.getServices() != null && !server.getServices().isEmpty()) {
      servicesServer.add(server);
    }
  }
  return servicesServer;
}

Fixed version (ground truth):
/** 
 * Only returns a list of servers that actually have services. Skips servers with no services. Returns a new and updated copy of the servers every time it is called. Changes to the list will not be reflected until explicitly persisted using a persistence or save API. This is a synchronous operation.
 * @param monitor
 * @return
 * @throws CoreException
 */
public List<ExternalToolLaunchCommandsServer> getUpdatedServerServiceCommands(IProgressMonitor monitor) throws CoreException {
  List<CloudFoundryServer> cfServers=CloudServerUtil.getCloudServers();
  List<ExternalToolLaunchCommandsServer> servicesServer=new ArrayList<ExternalToolLaunchCommandsServer>();
  for (  CloudFoundryServer cfServer : cfServers) {
    ExternalToolLaunchCommandsServer server=cfServer.getUpdatedTunnelServiceCommands(monitor);
    if (server != null && server.getServices() != null && !server.getServices().isEmpty()) {
      servicesServer.add(server);
    }
  }
  return servicesServer;
}
Program: 10907
Project: 10907
Buggy source:
private void fillServicesContextMenu(IMenuManager manager){
  IStructuredSelection selection=(IStructuredSelection)servicesViewer.getSelection();
  if (selection.isEmpty()) {
    return;
  }
  manager.add(new DeleteServicesAction(selection,cloudServer.getBehaviour(),editorPage));
  List<IAction> caldecottAction=new TunnelActionProvider(cloudServer).getCaldecottActions(selection,editorPage);
  for (  IAction action : caldecottAction) {
    manager.add(action);
  }
}

Fixed version (ground truth):
private void fillServicesContextMenu(IMenuManager manager){
  IStructuredSelection selection=(IStructuredSelection)servicesViewer.getSelection();
  if (selection.isEmpty()) {
    return;
  }
  manager.add(new DeleteServicesAction(selection,cloudServer.getBehaviour(),editorPage));
  List<IAction> caldecottAction=new TunnelActionProvider(cloudServer).getTunnelActions(selection,editorPage);
  for (  IAction action : caldecottAction) {
    manager.add(action);
  }
}
Program: 10908
Project: 10908
Buggy source:
protected ExternalToolsCommandWizardPage(List<ExternalToolLaunchCommandsServer> actualServers,CloudFoundryServer cloudServer){
  super("String_Node_Str");
  setTitle("String_Node_Str");
  setDescription("String_Node_Str");
  ImageDescriptor banner=CloudFoundryImages.getWizardBanner(cloudServer.getServer().getServerType().getId());
  if (banner != null) {
    setImageDescriptor(banner);
  }
}

Fixed version (ground truth):
protected ExternalToolsCommandWizardPage(List<ExternalToolLaunchCommandsServer> originalServer,CloudFoundryServer cloudServer){
  super("String_Node_Str");
  setTitle("String_Node_Str");
  setDescription("String_Node_Str");
  ImageDescriptor banner=CloudFoundryImages.getWizardBanner(cloudServer.getServer().getServerType().getId());
  if (banner != null) {
    setImageDescriptor(banner);
  }
  this.originalServer=originalServer;
}
Program: 10909
Project: 10909
Buggy source:
protected void setServerInput(){
  if (serversToUpdate == null) {
    serversToUpdate=new ArrayList<ExternalToolLaunchCommandsServer>();
  }
  serversViewer.setInput(serversToUpdate);
  setServiceCommandInput(null);
  setStatus(null);
}

Fixed version (ground truth):
protected void setServerInput(){
  if (serversToUpdate == null) {
    serversToUpdate=new ArrayList<ExternalToolLaunchCommandsServer>();
  }
  serversViewer.setInput(serversToUpdate.toArray());
  serversViewer.setExpandedElements(serversToUpdate.toArray());
  setServiceCommandInput(null);
  setStatus(null);
}
Program: 10910
Project: 10910
Buggy source:
public Composite createControl(Composite parent){
  derivedShell=parent.getShell();
  Label serverLabel=new Label(parent,SWT.NONE);
  GridDataFactory.fillDefaults().grab(false,false).applyTo(serverLabel);
  serverLabel.setText("String_Node_Str");
  Composite generalArea=new Composite(parent,SWT.NONE);
  GridLayoutFactory.fillDefaults().numColumns(2).applyTo(generalArea);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(generalArea);
  createViewerArea(generalArea);
  createButtonAreas(generalArea);
  setServerInput();
  initUIState();
  return generalArea;
}

Fixed version (ground truth):
public Composite createControl(Composite parent){
  derivedShell=parent.getShell();
  Composite generalArea=new Composite(parent,SWT.NONE);
  GridLayoutFactory.fillDefaults().numColumns(2).applyTo(generalArea);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(generalArea);
  Label serverLabel=new Label(parent,SWT.NONE);
  GridDataFactory.fillDefaults().grab(false,false).span(2,0).applyTo(serverLabel);
  serverLabel.setText("String_Node_Str");
  createViewerArea(generalArea);
  createButtonAreas(generalArea);
  setServerInput();
  initUIState();
  return generalArea;
}
Program: 10911
Project: 10911
Buggy source:
public IStatus performAction(IProgressMonitor monitor) throws CoreException {
  Job job=getJob();
  IWorkbenchSiteProgressService service=(IWorkbenchSiteProgressService)editorPage.getEditorSite().getService(IWorkbenchSiteProgressService.class);
  if (service != null) {
    service.schedule(job,0L,true);
  }
 else {
    job.schedule();
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
@Override public IStatus performAction(IProgressMonitor monitor) throws CoreException {
  for (  String serviceName : servicesWithTunnels) {
    try {
      handler.stopAndDeleteCaldecottTunnel(serviceName,monitor);
    }
 catch (    CoreException e) {
      CloudFoundryPlugin.logError("String_Node_Str" + serviceName,e);
    }
  }
  return Status.OK_STATUS;
}
Program: 10912
Project: 10912
Buggy source:
@Override protected IStatus run(IProgressMonitor monitor){
  try {
    List<ExternalToolLaunchCommandsServer> originalServers=new ServiceCommandHelper().getUpdatedServerServiceCommands(monitor);
    Shell shell=getShell();
    if (shell != null) {
      ExternalToolsCommandWizard wizard=new ExternalToolsCommandWizard(originalServers,cloudServer);
      WizardDialog dialog=new WizardDialog(getShell(),wizard);
      if (dialog.open() == Window.OK) {
        List<ExternalToolLaunchCommandsServer> updatedServers=wizard.getExternalToolLaunchCommandsServer();
        try {
          new ServiceCommandHelper().saveServerServiceCommands(updatedServers,null);
        }
 catch (        CoreException e) {
          CloudFoundryPlugin.logError(e);
        }
      }
    }
  }
 catch (  CoreException e) {
    CloudFoundryPlugin.logError(e);
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
public void run(){
  UIJob job=getUIJob();
  IWorkbenchSiteProgressService service=(IWorkbenchSiteProgressService)editorPage.getEditorSite().getService(IWorkbenchSiteProgressService.class);
  if (service != null) {
    service.schedule(job,0L,true);
  }
 else {
    job.schedule();
  }
}
Program: 10913
Project: 10913
Buggy source:
protected Map<String,String> getTunnelInfo(final CloudFoundryOperations client,final String serviceName,IProgressMonitor monitor) throws CoreException {
  monitor.setTaskName("String_Node_Str");
  int ticks=5;
  long sleepTime=2000;
  Map<String,String> info=new AbstractWaitWithProgressJob<Map<String,String>>(ticks,sleepTime){
    @Override protected Map<String,String> runInWait(    IProgressMonitor monitor){
      if (client instanceof CloudFoundryClient) {
        return TunnelHelper.getTunnelServiceInfo((CloudFoundryClient)client,serviceName);
      }
      return null;
    }
  }
.run(monitor);
  if (info == null) {
    CloudFoundryPlugin.logError("String_Node_Str" + serviceName + "String_Node_Str");
  }
  return info;
}

Fixed version (ground truth):
protected Map<String,String> getTunnelInfo(final CloudFoundryOperations client,final String serviceName,IProgressMonitor monitor) throws CoreException {
  monitor.setTaskName("String_Node_Str");
  int attempts=10;
  long sleepTime=2000;
  Map<String,String> info=new AbstractWaitWithProgressJob<Map<String,String>>(attempts,sleepTime){
    @Override protected Map<String,String> runInWait(    IProgressMonitor monitor){
      if (client instanceof CloudFoundryClient) {
        return TunnelHelper.getTunnelServiceInfo((CloudFoundryClient)client,serviceName);
      }
      return null;
    }
    @Override protected boolean shouldRetryOnError(    Throwable t){
      return true;
    }
  }
.run(monitor);
  if (info == null) {
    CloudFoundryPlugin.logError("String_Node_Str" + serviceName + "String_Node_Str");
  }
  return info;
}
Program: 10914
Project: 10914
Buggy source:
protected String getTunnelUri(final CloudFoundryOperations client,IProgressMonitor progress) throws CoreException {
  int ticks=10;
  long sleep=3000;
  progress.setTaskName("String_Node_Str");
  String url=new AbstractWaitWithProgressJob<String>(ticks,sleep){
    @Override protected String runInWait(    IProgressMonitor monitor) throws CoreException {
      if (client instanceof CloudFoundryClient) {
        return TunnelHelper.getTunnelUri((CloudFoundryClient)client);
      }
      return null;
    }
  }
.run(progress);
  return url;
}

Fixed version (ground truth):
protected String getTunnelUri(final CloudFoundryOperations client,IProgressMonitor progress) throws CoreException {
  int attempts=10;
  long sleep=3000;
  progress.setTaskName("String_Node_Str");
  String url=new AbstractWaitWithProgressJob<String>(attempts,sleep){
    @Override protected String runInWait(    IProgressMonitor monitor) throws CoreException {
      if (client instanceof CloudFoundryClient) {
        return TunnelHelper.getTunnelUri((CloudFoundryClient)client);
      }
      return null;
    }
    protected boolean shouldRetryOnError(    Throwable t){
      return true;
    }
  }
.run(progress);
  return url;
}
Program: 10915
Project: 10915
Buggy source:
protected void updateUrlCombo(CloudURL lastAddedEditedUrl){
  String newSelection=null;
  String oldSelection=null;
  if (urlCombo.getSelectionIndex() >= 0) {
    oldSelection=urlCombo.getItem(urlCombo.getSelectionIndex());
  }
 else {
    if (cfServer != null && cfServer.getUrl() != null) {
      oldSelection=cfServer.getUrl();
    }
  }
  List<CloudURL> cloudUrls=CloudUiUtil.getAllUrls(serverTypeId);
  String[] updatedUrls=new String[cloudUrls.size()];
  if (lastAddedEditedUrl != null) {
    newSelection=lastAddedEditedUrl.getUrl();
  }
  int selectionIndex=-1;
  for (int i=0; i < cloudUrls.size(); i++) {
    String currUrl=cloudUrls.get(i).getUrl();
    updatedUrls[i]=cloudUrls.get(i).getName() + "String_Node_Str" + currUrl;
    if (newSelection != null && updatedUrls[i].contains(newSelection)) {
      selectionIndex=i;
    }
  }
  if ((newSelection == null || selectionIndex < 0) && oldSelection != null) {
    for (int i=0; i < updatedUrls.length; i++) {
      if (updatedUrls[i].contains(oldSelection)) {
        selectionIndex=i;
      }
    }
  }
  if (selectionIndex < 0 && cloudUrls.size() > 0) {
    selectionIndex=0;
  }
  urlCombo.setItems(updatedUrls);
  if (selectionIndex < 0) {
    urlCombo.deselectAll();
  }
 else {
    urlCombo.select(selectionIndex);
  }
  comboIndex=selectionIndex;
}

Fixed version (ground truth):
protected void updateUrlCombo(CloudURL lastAddedEditedUrl){
  String newSelection=null;
  String oldSelection=null;
  if (urlCombo.getSelectionIndex() >= 0) {
    oldSelection=urlCombo.getItem(urlCombo.getSelectionIndex());
  }
 else {
    if (cfServer != null && cfServer.getUrl() != null) {
      oldSelection=cfServer.getUrl();
    }
  }
  List<CloudURL> cloudUrls=CloudUiUtil.getAllUrls(serverTypeId);
  String[] updatedUrls=new String[cloudUrls.size()];
  if (lastAddedEditedUrl != null) {
    newSelection=getComboURLDisplay(lastAddedEditedUrl);
  }
  int selectionIndex=-1;
  for (int i=0; i < cloudUrls.size(); i++) {
    updatedUrls[i]=getComboURLDisplay(cloudUrls.get(i));
    if (newSelection != null && updatedUrls[i].equals(newSelection)) {
      selectionIndex=i;
    }
  }
  if ((newSelection == null || selectionIndex < 0) && oldSelection != null) {
    for (int i=0; i < updatedUrls.length; i++) {
      if (updatedUrls[i].contains(oldSelection)) {
        selectionIndex=i;
        break;
      }
    }
  }
  if (selectionIndex < 0 && cloudUrls.size() > 0) {
    selectionIndex=0;
  }
  urlCombo.setItems(updatedUrls);
  if (selectionIndex < 0) {
    urlCombo.deselectAll();
  }
 else {
    urlCombo.select(selectionIndex);
  }
  comboIndex=selectionIndex;
}
Program: 10916
Project: 10916
Buggy source:
public void setTunnelServiceCommands(ServicesServer server) throws CoreException {
  if (server == null) {
    return;
  }
  String json=new TunnelServiceCommandHelper().getTunnelServiceCommands(server);
  if (json == null) {
    json="String_Node_Str";
  }
  internalSetTunnelServiceCommands(json);
}

Fixed version (ground truth):
public void setTunnelServiceCommands(ServicesServer server) throws CoreException {
  if (server == null) {
    return;
  }
  String json=new TunnelServiceCommandHelper(this).serialiseServerServiceCommands(server);
  if (json == null) {
    json="String_Node_Str";
  }
  internalSetTunnelServiceCommands(json);
}
Program: 10917
Project: 10917
Buggy source:
protected void internalSetTunnelServiceCommands(String commands) throws CoreException {
  setAttribute(TUNNEL_SERVICE_COMMANDS_PROPERTY,(String)null);
  if (getServerWorkingCopy() != null) {
    getServerWorkingCopy().save(true,null);
  }
}

Fixed version (ground truth):
protected void internalSetTunnelServiceCommands(String commands) throws CoreException {
  IServerWorkingCopy wc=getServer().createWorkingCopy();
  wc.setAttribute(TUNNEL_SERVICE_COMMANDS_PROPERTY,commands);
  wc.save(true,null);
}
Program: 10918
Project: 10918
Buggy source:
public ServicesServer getTunnelServiceCommands(){
  String commands=internalGetTunnelServiceCommands();
  ServicesServer server=null;
  if (commands != null) {
    return new TunnelServiceCommandHelper().getTunnelServiceCommands(commands);
  }
  return server;
}

Fixed version (ground truth):
/** 
 * Returns the commands associated with the current services in the server. Changes to services since the last command persistance are also taken into account, where new entries for new services are added, and commands for non-existing services are removed.
 * @param monitor
 * @return
 * @throws CoreException
 */
public ServicesServer getTunnelServiceCommands(IProgressMonitor monitor) throws CoreException {
  String commands=internalGetTunnelServiceCommands();
  ServicesServer server=new TunnelServiceCommandHelper(this).parseAndUpdateTunnelServiceCommands(commands,monitor);
  return server;
}
Program: 10919
Project: 10919
Buggy source:
public IStatus isValid(){
  String message=null;
  boolean isValid=true;
  if (URLNameValidation.isEmpty(url)) {
    if (!isStandAloneApp) {
      message=EMPTY_URL_ERROR;
      isValid=false;
    }
  }
 else   if (new URLNameValidation(url).hasInvalidCharacters()) {
    message=INVALID_CHARACTERS_ERROR;
    isValid=false;
  }
  if (isValid && isStandAloneApp && URLNameValidation.isEmpty(startCommand)) {
    message=INVALID_START_COMMAND;
    isValid=false;
  }
  if (!isValid) {
    return CloudFoundryPlugin.getErrorStatus(message != null ? message : "String_Node_Str");
  }
 else {
    return Status.OK_STATUS;
  }
}

Fixed version (ground truth):
public IStatus isValid(){
  String message=null;
  boolean isValid=true;
  if (ValueValidationUtil.isEmpty(url)) {
    if (!isStandAloneApp) {
      message=EMPTY_URL_ERROR;
      isValid=false;
    }
  }
 else   if (new URLNameValidation(url).hasInvalidCharacters()) {
    message=INVALID_CHARACTERS_ERROR;
    isValid=false;
  }
  if (isValid && isStandAloneApp && ValueValidationUtil.isEmpty(startCommand)) {
    message=INVALID_START_COMMAND;
    isValid=false;
  }
  if (!isValid) {
    return CloudFoundryPlugin.getErrorStatus(message != null ? message : "String_Node_Str");
  }
 else {
    return Status.OK_STATUS;
  }
}
Program: 10920
Project: 10920
Buggy source:
public boolean hasInvalidCharacters(){
  if (!isEmpty(value)) {
    Matcher matcher=VALID_CHARS.matcher(value);
    return !matcher.matches();
  }
  return true;
}

Fixed version (ground truth):
public boolean hasInvalidCharacters(){
  if (!ValueValidationUtil.isEmpty(value)) {
    Matcher matcher=VALID_CHARS.matcher(value);
    return !matcher.matches();
  }
  return true;
}
Program: 10921
Project: 10921
Buggy source:
protected String getServiceVendor(String serviceName,IProgressMonitor monitor) throws CoreException {
  List<CloudService> services=cloudServer.getBehaviour().getServices(monitor);
  if (services != null) {
    for (    CloudService service : services) {
      if (serviceName.equals(service.getName())) {
        return service.getVendor();
      }
    }
  }
  return null;
}

Fixed version (ground truth):
protected String getServiceVendor(String serviceName,IProgressMonitor monitor) throws CoreException {
  List<CloudService> services=cloudServer.getBehaviour().getServices(monitor);
  if (services != null) {
    for (    CloudService service : services) {
      if (serviceName.equals(service.getName())) {
        return cloudServer.supportsCloudSpaces() ? service.getLabel() : service.getVendor();
      }
    }
  }
  return null;
}
Program: 10922
Project: 10922
Buggy source:
public static Test suite(boolean heartbeat){
  TestSuite suite=new ManagedTestSuite(AllCloudFoundryTests.class.getName());
  if (!heartbeat) {
    suite.addTestSuite(CloudFoundryServerBehaviourTest.class);
  }
  suite.addTestSuite(ServerCredentialsStoreTest.class);
  suite.addTestSuite(CloudFoundryServerTest.class);
  suite.addTestSuite(CloudUtilTest.class);
  suite.addTestSuite(DeploymentURLTest.class);
  suite.addTestSuite(CloudFoundryServicesTest.class);
  suite.addTestSuite(CloudFoundryConsoleTest.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(boolean heartbeat){
  TestSuite suite=new ManagedTestSuite(AllCloudFoundryTests.class.getName());
  if (!heartbeat) {
    suite.addTestSuite(CloudFoundryServerBehaviourTest.class);
  }
  suite.addTestSuite(ServerCredentialsStoreTest.class);
  suite.addTestSuite(CloudFoundryServerTest.class);
  suite.addTestSuite(CloudUtilTest.class);
  suite.addTestSuite(DeploymentURLTest.class);
  suite.addTestSuite(CloudFoundryServicesTest.class);
  suite.addTestSuite(CloudFoundryConsoleTest.class);
  suite.addTestSuite(CaldecottTunnelTest.class);
  return suite;
}
Program: 10923
Project: 10923
Buggy source:
public void testConnectToNonSecureUrl() throws Exception {
  CloudFoundryClient client=CloudFoundryPlugin.getDefault().getCloudFoundryClientFactory().getCloudFoundryClient("String_Node_Str");
  CloudInfo cloudInfo=client.getCloudInfo();
  Assert.assertNotNull(cloudInfo);
}

Fixed version (ground truth):
public void testConnectToNonSecureUrl() throws Exception {
  CloudFoundryOperations client=CloudFoundryPlugin.getDefault().getCloudFoundryClientFactory().getCloudFoundryClient("String_Node_Str");
  CloudInfo cloudInfo=client.getCloudInfo();
  Assert.assertNotNull(cloudInfo);
}
Program: 10924
Project: 10924
Buggy source:
public void testConnectToSecureUrl() throws Exception {
  CloudFoundryClient client=CloudFoundryPlugin.getDefault().getCloudFoundryClientFactory().getCloudFoundryClient("String_Node_Str");
  CloudInfo cloudInfo=client.getCloudInfo();
  Assert.assertNotNull(cloudInfo);
}

Fixed version (ground truth):
public void testConnectToSecureUrl() throws Exception {
  CloudFoundryOperations client=CloudFoundryPlugin.getDefault().getCloudFoundryClientFactory().getCloudFoundryClient("String_Node_Str");
  CloudInfo cloudInfo=client.getCloudInfo();
  Assert.assertNotNull(cloudInfo);
}
Program: 10925
Project: 10925
Buggy source:
public void testDeleteModuleExternally() throws Exception {
  harness.createProjectAndAddModule("String_Node_Str");
  IModule[] modules=server.getModules();
  serverBehavior.deployOrStartModule(modules,true,null);
  URI uri=new URI("String_Node_Str" + harness.getUrl("String_Node_Str") + "String_Node_Str");
  assertEquals("String_Node_Str",getContent(uri));
  List<CloudApplication> applications=serverBehavior.getApplications(new NullProgressMonitor());
  boolean found=false;
  for (  CloudApplication application : applications) {
    if (application.getName().equals("String_Node_Str")) {
      found=true;
      break;
    }
  }
  assertTrue(found);
  CloudFoundryClient client=CloudFoundryPlugin.getDefault().getCloudFoundryClientFactory().getCloudFoundryClient(CloudFoundryTestFixture.VCLOUDLABS.getUsername(),CloudFoundryTestFixture.VCLOUDLABS.getPassword(),CloudFoundryTestFixture.VCLOUDLABS.getUrl());
  client.login();
  client.deleteApplication("String_Node_Str");
  serverBehavior.refreshModules(new NullProgressMonitor());
  applications=serverBehavior.getApplications(new NullProgressMonitor());
  found=false;
  for (  CloudApplication application : applications) {
    if (application.getName().equals("String_Node_Str")) {
      found=true;
      break;
    }
  }
  assertFalse(found);
}

Fixed version (ground truth):
public void testDeleteModuleExternally() throws Exception {
  harness.createProjectAndAddModule("String_Node_Str");
  IModule[] modules=server.getModules();
  serverBehavior.deployOrStartModule(modules,true,null);
  URI uri=new URI("String_Node_Str" + harness.getUrl("String_Node_Str") + "String_Node_Str");
  assertEquals("String_Node_Str",getContent(uri));
  List<CloudApplication> applications=serverBehavior.getApplications(new NullProgressMonitor());
  boolean found=false;
  for (  CloudApplication application : applications) {
    if (application.getName().equals("String_Node_Str")) {
      found=true;
      break;
    }
  }
  assertTrue(found);
  CloudFoundryOperations client=CloudFoundryPlugin.getDefault().getCloudFoundryClientFactory().getCloudFoundryClient(CloudFoundryTestFixture.VCLOUDLABS.getUsername(),CloudFoundryTestFixture.VCLOUDLABS.getPassword(),CloudFoundryTestFixture.VCLOUDLABS.getUrl());
  client.login();
  client.deleteApplication("String_Node_Str");
  serverBehavior.refreshModules(new NullProgressMonitor());
  applications=serverBehavior.getApplications(new NullProgressMonitor());
  found=false;
  for (  CloudApplication application : applications) {
    if (application.getName().equals("String_Node_Str")) {
      found=true;
      break;
    }
  }
  assertFalse(found);
}
Program: 10926
Project: 10926
Buggy source:
public void testStartModuleInvalidPassword() throws Exception {
  harness.createProjectAndAddModule("String_Node_Str");
  IModule[] modules=server.getModules();
  assertEquals("String_Node_Str" + Arrays.toString(modules),1,modules.length);
  int moduleState=server.getModulePublishState(modules);
  assertEquals(IServer.PUBLISH_STATE_UNKNOWN,moduleState);
  Field field=null;
  CloudFoundryClient client=null;
  Object oldValue=null;
  try {
    client=getClient();
    field=CloudFoundryClient.class.getDeclaredField("String_Node_Str");
    field.setAccessible(true);
    oldValue=field.get(client);
    field.set(client,"String_Node_Str");
    client.login();
    serverBehavior.deployOrStartModule(modules,true,null);
    fail("String_Node_Str");
  }
 catch (  Exception e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
 finally {
    if (field != null && client != null && oldValue != null) {
      field.set(client,oldValue);
    }
  }
}

Fixed version (ground truth):
public void testStartModuleInvalidPassword() throws Exception {
  harness.createProjectAndAddModule("String_Node_Str");
  IModule[] modules=server.getModules();
  assertEquals("String_Node_Str" + Arrays.toString(modules),1,modules.length);
  int moduleState=server.getModulePublishState(modules);
  assertEquals(IServer.PUBLISH_STATE_UNKNOWN,moduleState);
  Field field=null;
  CloudFoundryOperations client=null;
  Object oldValue=null;
  try {
    client=getClient();
    field=CloudFoundryClient.class.getDeclaredField("String_Node_Str");
    field.setAccessible(true);
    oldValue=field.get(client);
    field.set(client,"String_Node_Str");
    client.login();
    serverBehavior.deployOrStartModule(modules,true,null);
    fail("String_Node_Str");
  }
 catch (  Exception e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
 finally {
    if (field != null && client != null && oldValue != null) {
      field.set(client,oldValue);
    }
  }
}
Program: 10927
Project: 10927
Buggy source:
public void testCreateApplicationInvalidProxy() throws Exception {
  getClient();
  IProxyService proxyService=CloudFoundryPlugin.getDefault().getProxyService();
  boolean systemProxiesEnabled=proxyService.isSystemProxiesEnabled();
  boolean proxiesEnabled=proxyService.isProxiesEnabled();
  IProxyData[] oldData=proxyService.getProxyData();
  try {
    proxyService.setSystemProxiesEnabled(false);
    proxyService.setProxiesEnabled(true);
    IProxyData[] data=proxyService.getProxyData();
    data[0].setHost("String_Node_Str");
    data[0].setPort(8080);
    proxyService.setProxyData(data);
    try {
      List<String> uris=new ArrayList<String>();
      uris.add("String_Node_Str");
      CloudFoundryClient client=getClient();
      client.createApplication("String_Node_Str",DeploymentConstants.SPRING,128,uris,new ArrayList<String>());
      fail("String_Node_Str");
    }
 catch (    Exception e) {
      assertTrue("String_Node_Str" + e,e instanceof ResourceAccessException);
      assertEquals("String_Node_Str",e.getCause().getMessage());
    }
  }
  finally {
    proxyService.setSystemProxiesEnabled(systemProxiesEnabled);
    proxyService.setProxiesEnabled(proxiesEnabled);
    proxyService.setProxyData(oldData);
  }
}

Fixed version (ground truth):
public void testCreateApplicationInvalidProxy() throws Exception {
  getClient();
  IProxyService proxyService=CloudFoundryPlugin.getDefault().getProxyService();
  boolean systemProxiesEnabled=proxyService.isSystemProxiesEnabled();
  boolean proxiesEnabled=proxyService.isProxiesEnabled();
  IProxyData[] oldData=proxyService.getProxyData();
  try {
    proxyService.setSystemProxiesEnabled(false);
    proxyService.setProxiesEnabled(true);
    IProxyData[] data=proxyService.getProxyData();
    data[0].setHost("String_Node_Str");
    data[0].setPort(8080);
    proxyService.setProxyData(data);
    try {
      List<String> uris=new ArrayList<String>();
      uris.add("String_Node_Str");
      CloudFoundryOperations client=getClient();
      client.createApplication("String_Node_Str",DeploymentConstants.SPRING,128,uris,new ArrayList<String>());
      fail("String_Node_Str");
    }
 catch (    Exception e) {
      assertTrue("String_Node_Str" + e,e instanceof ResourceAccessException);
      assertEquals("String_Node_Str",e.getCause().getMessage());
    }
  }
  finally {
    proxyService.setSystemProxiesEnabled(systemProxiesEnabled);
    proxyService.setProxiesEnabled(proxiesEnabled);
    proxyService.setProxyData(oldData);
  }
}