nus-yam/ex-repair huggingface dataset:
Program: 152823
Project: 152823
Buggy source:
/** 
 * Validates the remote server supports custom revision properties.
 * @param context {@link AbstractProject}.
 * @param value value to validate.
 * @return {@link FormValidation}.
 * @throws java.io.IOException IOException.
 * @throws javax.servlet.ServletException ServletException.
 */
public FormValidation doCheckRevisionPropertiesSupported(@AncestorInPath AbstractProject context,@QueryParameter String value) throws IOException, ServletException {
  String v=Util.fixNull(value).trim();
  if (v.length() == 0) {
    return FormValidation.ok();
  }
  if (!Hudson.getInstance().hasPermission(Hudson.ADMINISTER)) {
    return FormValidation.ok();
  }
  try {
    SVNURL repoURL=SVNURL.parseURIDecoded(v);
    if (checkRepositoryPath(context,repoURL) != SVNNodeKind.NONE) {
      return FormValidation.ok();
    }
    SVNRepository repository=null;
    try {
      repository=getRepository(context,repoURL);
      if (repository.hasCapability(SVNCapability.LOG_REVPROPS)) {
        return FormValidation.ok();
      }
    }
  finally {
      if (repository != null) {
        repository.closeSession();
      }
    }
  }
 catch (  SVNException e) {
    String message="String_Node_Str";
    message+="String_Node_Str" + Util.escape(v) + "String_Node_Str"+ Util.escape(e.getErrorMessage().getFullMessage());
    LOGGER.log(Level.INFO,"String_Node_Str" + v,e);
    return FormValidation.errorWithMarkup(message);
  }
  return FormValidation.warning(Messages.SubversionSCM_excludedRevprop_notSupported(v));
}

Fixed version (ground truth):
/** 
 * Validates the remote server supports custom revision properties.
 * @param context {@link AbstractProject}.
 * @param value value to validate.
 * @return {@link FormValidation}.
 * @throws java.io.IOException            IOException.
 * @throws javax.servlet.ServletException ServletException.
 */
public FormValidation doCheckRevisionPropertiesSupported(@AncestorInPath AbstractProject context,@QueryParameter String value) throws IOException, ServletException {
  String v=Util.fixNull(value).trim();
  if (v.length() == 0) {
    return FormValidation.ok();
  }
  if (!Hudson.getInstance().hasPermission(Hudson.ADMINISTER)) {
    return FormValidation.ok();
  }
  try {
    SVNURL repoURL=SVNURL.parseURIDecoded(v);
    if (checkRepositoryPath(context,repoURL) != SVNNodeKind.NONE) {
      return FormValidation.ok();
    }
    SVNRepository repository=null;
    try {
      repository=getRepository(context,repoURL);
      if (repository.hasCapability(SVNCapability.LOG_REVPROPS)) {
        return FormValidation.ok();
      }
    }
  finally {
      if (repository != null) {
        repository.closeSession();
      }
    }
  }
 catch (  SVNException e) {
    String message="String_Node_Str";
    message+="String_Node_Str" + Util.escape(v) + "String_Node_Str"+ Util.escape(e.getErrorMessage().getFullMessage());
    LOGGER.log(Level.INFO,"String_Node_Str" + v,e);
    return FormValidation.errorWithMarkup(message);
  }
  return FormValidation.warning(Messages.SubversionSCM_excludedRevprop_notSupported(v));
}
Program: 152824
Project: 152824
Buggy source:
/** 
 * Validates the excludeUsers field.
 * @param value value to validate.
 * @return {@link FormValidation}.
 * @throws java.io.IOException IOException.
 * @throws javax.servlet.ServletException ServletException.
 */
public FormValidation doCheckExcludedUsers(@QueryParameter String value) throws IOException, ServletException {
  for (  String user : Util.fixNull(value).trim().split("String_Node_Str")) {
    user=user.trim();
    if ("String_Node_Str".equals(user)) {
      continue;
    }
    if (!validateExcludedUser(user)) {
      return FormValidation.error("String_Node_Str" + user);
    }
  }
  return FormValidation.ok();
}

Fixed version (ground truth):
/** 
 * Validates the excludeUsers field.
 * @param value value to validate.
 * @return {@link FormValidation}.
 * @throws java.io.IOException            IOException.
 * @throws javax.servlet.ServletException ServletException.
 */
public FormValidation doCheckExcludedUsers(@QueryParameter String value) throws IOException, ServletException {
  for (  String user : Util.fixNull(value).trim().split("String_Node_Str")) {
    user=user.trim();
    if ("String_Node_Str".equals(user)) {
      continue;
    }
    if (!validateExcludedUser(user)) {
      return FormValidation.error("String_Node_Str" + user);
    }
  }
  return FormValidation.ok();
}
Program: 152825
Project: 152825
Buggy source:
/** 
 * Checks whether build location contains specified revision.
 * @param url url to verify.
 * @param lastCompletedBuild build.
 * @return true if build location contains specified revision.
 */
boolean isRevisionSpecifiedInBuildLocation(String url,AbstractBuild<?,?> lastCompletedBuild){
  for (  ModuleLocation location : getLocations(lastCompletedBuild)) {
    if (location.getURL() != null && location.getURL().contains(url)) {
      SVNRevision revision=getRevisionFromRemoteUrl(location.getOriginRemote());
      if (isRevisionPresent(revision)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks whether build locations contain specified revision.
 * @param url url to verify.
 * @param locations module locations.
 * @return true if build locations contain specified revision.
 */
boolean isRevisionSpecifiedInBuildLocation(String url,ModuleLocation[] locations){
  if (null != locations) {
    for (    ModuleLocation location : locations) {
      if (location.getURL() != null && location.getURL().contains(url)) {
        SVNRevision revision=getRevisionFromRemoteUrl(location.getOriginRemote());
        if (isRevisionPresent(revision)) {
          return true;
        }
      }
    }
  }
  return false;
}
Program: 152826
Project: 152826
Buggy source:
/** 
 * Validates the excludeRegions Regex.
 * @param value value to validate.
 * @return {@link FormValidation}.
 * @throws java.io.IOException IOException.
 * @throws javax.servlet.ServletException ServletException.
 */
public FormValidation doCheckExcludedRegions(@QueryParameter String value) throws IOException, ServletException {
  for (  String region : Util.fixNull(value).trim().split("String_Node_Str")) {
    try {
      Pattern.compile(region);
    }
 catch (    PatternSyntaxException e) {
      return FormValidation.error("String_Node_Str" + e.getMessage());
    }
  }
  return FormValidation.ok();
}

Fixed version (ground truth):
/** 
 * Validates the excludeRegions Regex.
 * @param value value to validate.
 * @return {@link FormValidation}.
 * @throws java.io.IOException            IOException.
 * @throws javax.servlet.ServletException ServletException.
 */
public FormValidation doCheckExcludedRegions(@QueryParameter String value) throws IOException, ServletException {
  for (  String region : Util.fixNull(value).trim().split("String_Node_Str")) {
    try {
      Pattern.compile(region);
    }
 catch (    PatternSyntaxException e) {
      return FormValidation.error("String_Node_Str" + e.getMessage());
    }
  }
  return FormValidation.ok();
}
Program: 152827
Project: 152827
Buggy source:
SubversionChangeLogSet(AbstractBuild build,List<LogEntry> logs){
  super(build);
  Collections.sort(logs,new Comparator<LogEntry>(){
    public int compare(    LogEntry a,    LogEntry b){
      return b.getRevision() - a.getRevision();
    }
  }
);
  this.logs=Collections.unmodifiableList(logs);
  for (  LogEntry log : logs) {
    log.setParent(this);
  }
}

Fixed version (ground truth):
SubversionChangeLogSet(AbstractBuild build,List<LogEntry> logs){
  super(build);
  this.logs=prepareChangeLogEntries(logs);
}
Program: 152828
Project: 152828
Buggy source:
/** 
 * Submits the authentication info.
 */
public void doPostCredential(StaplerRequest req,StaplerResponse rsp) throws IOException, ServletException {
  Hudson.getInstance().checkPermission(Hudson.ADMINISTER);
  MultipartFormDataParser parser=new MultipartFormDataParser(req);
  StringWriter log=new StringWriter();
  PrintWriter logWriter=new PrintWriter(log);
  UserProvidedCredential upc=UserProvidedCredential.fromForm(req,parser);
  try {
    postCredential(parser.get("String_Node_Str"),upc,logWriter);
    rsp.sendRedirect("String_Node_Str");
  }
 catch (  SVNException e) {
    logWriter.println("String_Node_Str" + e.getErrorMessage());
    req.setAttribute("String_Node_Str",log.toString());
    req.setAttribute("String_Node_Str",true);
    req.setAttribute("String_Node_Str",e);
    rsp.forward(Hudson.getInstance(),"String_Node_Str",req);
  }
 finally {
    upc.close();
  }
}

Fixed version (ground truth):
/** 
 * Submits the authentication info.
 */
public void doPostCredential(StaplerRequest req,StaplerResponse rsp) throws IOException, ServletException {
  Hudson.getInstance().checkPermission(Item.CONFIGURE);
  MultipartFormDataParser parser=new MultipartFormDataParser(req);
  StringWriter log=new StringWriter();
  PrintWriter logWriter=new PrintWriter(log);
  UserProvidedCredential upc=UserProvidedCredential.fromForm(req,parser);
  try {
    postCredential(parser.get("String_Node_Str"),upc,logWriter);
    rsp.sendRedirect("String_Node_Str");
  }
 catch (  SVNException e) {
    logWriter.println("String_Node_Str" + e.getErrorMessage());
    req.setAttribute("String_Node_Str",log.toString());
    req.setAttribute("String_Node_Str",true);
    req.setAttribute("String_Node_Str",e);
    rsp.forward(Hudson.getInstance(),"String_Node_Str",req);
  }
 finally {
    upc.close();
  }
}
Program: 152830
Project: 152830
Buggy source:
/** 
 * Figures out which revision to check out. If   {@link #remote} is {@code url@rev}, then this method returns that specific revision.
 * @param defaultValue If "@NNN" portion is not in the URL, this value will be returned. Normally, this is the SVN revision timestamped at the build date.
 */
public SVNRevision getRevision(SVNRevision defaultValue){
  int idx=remote.lastIndexOf('@');
  if (idx > 0) {
    String n=remote.substring(idx + 1);
    return SVNRevision.parse(n);
  }
  return defaultValue;
}

Fixed version (ground truth):
/** 
 * Figures out which revision to check out. If   {@link #remote} is {@code url@rev}, then this method returns that specific revision.
 * @param defaultValue If "@NNN" portion is not in the URL, this value will be returned. Normally, this is the SVN revision timestamped at the build date.
 */
public SVNRevision getRevision(SVNRevision defaultValue){
  SVNRevision revision=getRevisionFromRemoteUrl(remote);
  return revision != null ? revision : defaultValue;
}
Program: 152831
Project: 152831
Buggy source:
/** 
 * Returns the pure URL portion of   {@link #remote} by removingpossible "@NNN" suffix.
 */
public String getURL(){
  int idx=remote.lastIndexOf('@');
  if (idx > 0) {
    String n=remote.substring(idx + 1);
    SVNRevision r=SVNRevision.parse(n);
    if ((r != null) && (r.isValid())) {
      return remote.substring(0,idx);
    }
  }
  return remote;
}

Fixed version (ground truth):
/** 
 * Returns the pure URL portion of   {@link #remote} by removingpossible "@NNN" suffix.
 */
public String getURL(){
  return getUrlWithoutRevision(remote);
}
Program: 152832
Project: 152832
Buggy source:
private void verify(SubversionSCM lhs,SubversionSCM rhs){
  ModuleLocation[] ll=lhs.getLocations();
  ModuleLocation[] rl=rhs.getLocations();
  assertEquals(ll.length,rl.length);
  for (int i=0; i < ll.length; i++) {
    assertEquals(ll[i].getLocalDir(),rl[i].getLocalDir());
    assertEquals(ll[i].remote,rl[i].remote);
  }
  assertEquals(lhs.isUseUpdate(),rhs.isUseUpdate());
  assertEquals(lhs.getExcludedRegions(),rhs.getExcludedRegions());
  assertEquals(lhs.getExcludedUsers(),rhs.getExcludedUsers());
  assertEquals(lhs.getExcludedRevprop(),rhs.getExcludedRevprop());
  assertEquals(lhs.getExcludedCommitMessages(),rhs.getExcludedCommitMessages());
}

Fixed version (ground truth):
private void verify(SubversionSCM lhs,SubversionSCM rhs){
  ModuleLocation[] ll=lhs.getLocations();
  ModuleLocation[] rl=rhs.getLocations();
  assertEquals(ll.length,rl.length);
  for (int i=0; i < ll.length; i++) {
    assertEquals(ll[i].getLocalDir(),rl[i].getLocalDir());
    assertEquals(ll[i].remote,rl[i].remote);
  }
  assertEquals(lhs.isUseUpdate(),rhs.isUseUpdate());
  assertNullEquals(lhs.getExcludedRegions(),rhs.getExcludedRegions());
  assertNullEquals(lhs.getExcludedUsers(),rhs.getExcludedUsers());
  assertNullEquals(lhs.getExcludedRevprop(),rhs.getExcludedRevprop());
  assertNullEquals(lhs.getExcludedCommitMessages(),rhs.getExcludedCommitMessages());
  assertNullEquals(lhs.getIncludedRegions(),rhs.getIncludedRegions());
}
Program: 152833
Project: 152833
Buggy source:
public void testConfigRoundtrip() throws Exception {
  FreeStyleProject p=createFreeStyleProject();
  SubversionSCM scm=new SubversionSCM(Arrays.asList(new ModuleLocation("String_Node_Str","String_Node_Str"),new ModuleLocation("String_Node_Str","String_Node_Str")),true,new Sventon(new URL("String_Node_Str"),"String_Node_Str"),"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  p.setScm(scm);
  submit(new WebClient().getPage(p,"String_Node_Str").getFormByName("String_Node_Str"));
  verify(scm,(SubversionSCM)p.getScm());
  scm=new SubversionSCM(Arrays.asList(new ModuleLocation("String_Node_Str","String_Node_Str")),false,null,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  p.setScm(scm);
  submit(new WebClient().getPage(p,"String_Node_Str").getFormByName("String_Node_Str"));
  verify(scm,(SubversionSCM)p.getScm());
}

Fixed version (ground truth):
public void testConfigRoundtrip() throws Exception {
  setJavaNetCredential();
  FreeStyleProject p=createFreeStyleProject();
  SubversionSCM scm=new SubversionSCM(Arrays.asList(new ModuleLocation("String_Node_Str","String_Node_Str"),new ModuleLocation("String_Node_Str","String_Node_Str")),true,new Sventon(new URL("String_Node_Str"),"String_Node_Str"),"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  p.setScm(scm);
  submit(new WebClient().getPage(p,"String_Node_Str").getFormByName("String_Node_Str"));
  verify(scm,(SubversionSCM)p.getScm());
  scm=new SubversionSCM(Arrays.asList(new ModuleLocation("String_Node_Str","String_Node_Str")),false,null,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  p.setScm(scm);
  submit(new WebClient().getPage(p,"String_Node_Str").getFormByName("String_Node_Str"));
  verify(scm,(SubversionSCM)p.getScm());
}
Program: 152835
Project: 152835
Buggy source:
/** 
 * Parses the credential information from a form submission.
 */
public static UserProvidedCredential fromForm(StaplerRequest req,MultipartFormDataParser parser) throws IOException {
  CrumbIssuer crumbIssuer=Hudson.getInstance().getCrumbIssuer();
  if (crumbIssuer != null && !crumbIssuer.validateCrumb(req,parser))   throw HttpResponses.error(HttpServletResponse.SC_FORBIDDEN,new IOException("String_Node_Str"));
  String kind=parser.get("String_Node_Str");
  int idx=Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str").indexOf(kind);
  String username=parser.get("String_Node_Str" + idx);
  String password=parser.get("String_Node_Str" + idx);
  final File keyFile;
  final FileItem item;
  if (idx <= 1) {
    keyFile=null;
    item=null;
  }
 else {
    item=parser.getFileItem(kind.equals("String_Node_Str") ? "String_Node_Str" : "String_Node_Str");
    keyFile=File.createTempFile("String_Node_Str","String_Node_Str");
    if (item != null) {
      try {
        item.write(keyFile);
      }
 catch (      Exception e) {
        throw new IOException2(e);
      }
      if (PuTTYKey.isPuTTYKeyFile(keyFile)) {
        LOGGER.info("String_Node_Str" + keyFile + "String_Node_Str");
        new PuTTYKey(keyFile,null).toOpenSSH(keyFile);
      }
    }
  }
  return new UserProvidedCredential(username,password,keyFile){
    @Override public void close() throws IOException {
      if (keyFile != null)       keyFile.delete();
      if (item != null)       item.delete();
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Parses the credential information from a form submission.
 */
public static UserProvidedCredential fromForm(StaplerRequest req,MultipartFormDataParser parser) throws IOException {
  CrumbIssuer crumbIssuer=Hudson.getInstance().getCrumbIssuer();
  if (crumbIssuer != null && !crumbIssuer.validateCrumb(req,parser))   throw HttpResponses.error(SC_FORBIDDEN,new IOException("String_Node_Str"));
  String kind=parser.get("String_Node_Str");
  int idx=Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str").indexOf(kind);
  String username=parser.get("String_Node_Str" + idx);
  String password=parser.get("String_Node_Str" + idx);
  final File keyFile;
  final FileItem item;
  if (idx <= 1) {
    keyFile=null;
    item=null;
  }
 else {
    item=parser.getFileItem(kind.equals("String_Node_Str") ? "String_Node_Str" : "String_Node_Str");
    keyFile=File.createTempFile("String_Node_Str","String_Node_Str");
    if (item != null) {
      try {
        item.write(keyFile);
      }
 catch (      Exception e) {
        throw new IOException2(e);
      }
      if (PuTTYKey.isPuTTYKeyFile(keyFile)) {
        LOGGER.info("String_Node_Str" + keyFile + "String_Node_Str");
        new PuTTYKey(keyFile,null).toOpenSSH(keyFile);
      }
    }
  }
  return new UserProvidedCredential(username,password,keyFile){
    @Override public void close() throws IOException {
      if (keyFile != null)       keyFile.delete();
      if (item != null)       item.delete();
    }
  }
;
}
Program: 152836
Project: 152836
Buggy source:
@Override public SVNAuthentication getFirstAuthentication(String kind,String realm,SVNURL url) throws SVNException {
  authenticationAttempted=true;
  if (kind.equals(ISVNAuthenticationManager.USERNAME))   return new SVNUserNameAuthentication(username,false);
  if (kind.equals(ISVNAuthenticationManager.PASSWORD)) {
    logWriter.println("String_Node_Str" + username + "String_Node_Str");
    cred=new PasswordCredential(username,password);
  }
  if (kind.equals(ISVNAuthenticationManager.SSH)) {
    if (keyFile == null) {
      logWriter.println("String_Node_Str" + username + "String_Node_Str");
      cred=new PasswordCredential(username,password);
    }
 else {
      logWriter.println("String_Node_Str" + username);
      cred=new SshPublicKeyCredential(username,password,keyFile);
    }
  }
  if (kind.equals(ISVNAuthenticationManager.SSL)) {
    logWriter.println("String_Node_Str");
    cred=new SslClientCertificateCredential(keyFile,password);
  }
  if (cred == null) {
    logWriter.println("String_Node_Str" + kind);
    return null;
  }
  return cred.createSVNAuthentication(kind);
}

Fixed version (ground truth):
@Override public SVNAuthentication getFirstAuthentication(String kind,String realm,SVNURL url) throws SVNException {
  authenticationAttempted=true;
  if (kind.equals(ISVNAuthenticationManager.USERNAME))   return new SVNUserNameAuthentication(username,false);
  if (kind.equals(ISVNAuthenticationManager.PASSWORD)) {
    logWriter.println("String_Node_Str" + username + "String_Node_Str");
    cred=new PasswordCredential(username,password);
  }
  if (kind.equals(ISVNAuthenticationManager.SSH)) {
    if (keyFile == null) {
      logWriter.println("String_Node_Str" + username + "String_Node_Str");
      cred=new PasswordCredential(username,password);
    }
 else {
      logWriter.println("String_Node_Str" + username);
      cred=new SshPublicKeyCredential(username,password,keyFile);
    }
  }
  if (kind.equals(ISVNAuthenticationManager.SSL)) {
    logWriter.println("String_Node_Str");
    try {
      cred=new SslClientCertificateCredential(keyFile,password);
    }
 catch (    IOException e) {
      e.printStackTrace(logWriter);
      return null;
    }
  }
  if (cred == null) {
    logWriter.println("String_Node_Str" + kind);
    return null;
  }
  return cred.createSVNAuthentication(kind);
}
Program: 152838
Project: 152838
Buggy source:
public String[] getExcludedRegionsNormalized(){
  return excludedRegions == null ? null : excludedRegions.split("String_Node_Str");
}

Fixed version (ground truth):
public String[] getExcludedRegionsNormalized(){
  return (excludedRegions == null || excludedRegions.trim().equals("String_Node_Str")) ? null : excludedRegions.split("String_Node_Str");
}
Program: 152839
Project: 152839
Buggy source:
public String[] getExcludedUsersNormalized(){
  if (excludedUsers == null) {
    return null;
  }
  ArrayList<String> users=new ArrayList<String>();
  for (  String user : excludedUsers.split("String_Node_Str")) {
    users.add(user.trim());
  }
  return users.toArray(new String[users.size()]);
}

Fixed version (ground truth):
public String[] getExcludedUsersNormalized(){
  if (excludedUsers == null || excludedUsers.trim().equals("String_Node_Str")) {
    return null;
  }
  ArrayList<String> users=new ArrayList<String>();
  for (  String user : excludedUsers.split("String_Node_Str")) {
    users.add(user.trim());
  }
  return users.toArray(new String[users.size()]);
}
Program: 152840
Project: 152840
Buggy source:
public String[] getExcludedCommitMessagesNormalized(){
  return excludedCommitMessages == null ? new String[0] : excludedCommitMessages.split("String_Node_Str");
}

Fixed version (ground truth):
public String[] getExcludedCommitMessagesNormalized(){
  return (excludedCommitMessages == null || excludedCommitMessages.trim().equals("String_Node_Str")) ? new String[0] : excludedCommitMessages.split("String_Node_Str");
}
Program: 152841
Project: 152841
Buggy source:
public CheckOutTask(AbstractBuild<?,?> build,SubversionSCM parent,Date timestamp,boolean update,TaskListener listener){
  this.authProvider=parent.getDescriptor().createAuthenticationProvider();
  this.timestamp=timestamp;
  this.update=update;
  this.listener=listener;
  this.locations=parent.getLocations(build);
  revisions=build.getAction(RevisionParameterAction.class);
}

Fixed version (ground truth):
public CheckOutTask(AbstractBuild<?,?> build,SubversionSCM parent,Date timestamp,boolean update,boolean revert,TaskListener listener){
  this.authProvider=parent.getDescriptor().createAuthenticationProvider();
  this.timestamp=timestamp;
  this.update=update;
  this.revert=revert;
  this.listener=listener;
  this.locations=parent.getLocations(build);
  revisions=build.getAction(RevisionParameterAction.class);
}
Program: 152842
Project: 152842
Buggy source:
/** 
 * Performs the checkout or update, depending on the configuration and workspace state. <p> Use canonical path to avoid SVNKit/symlink problem as described in https://wiki.svnkit.com/SVNKit_FAQ
 * @return nullif the operation failed. Otherwise the set of local workspace paths (relative to the workspace root) that has loaded due to svn:external.
 */
private List<External> checkout(AbstractBuild build,FilePath workspace,TaskListener listener) throws IOException, InterruptedException {
  if (repositoryLocationsNoLongerExist(build,listener)) {
    Run lsb=build.getProject().getLastSuccessfulBuild();
    if (lsb != null && build.getNumber() - lsb.getNumber() > 10 && build.getTimestamp().getTimeInMillis() - lsb.getTimestamp().getTimeInMillis() > TimeUnit2.DAYS.toMillis(1)) {
      listener.getLogger().println("String_Node_Str" + build.getProject().getName() + "String_Node_Str");
      build.getProject().makeDisabled(true);
      return null;
    }
  }
  Boolean isUpdatable=useUpdate && workspace.act(new IsUpdatableTask(build,this,listener));
  return workspace.act(new CheckOutTask(build,this,build.getTimestamp().getTime(),isUpdatable,listener));
}

Fixed version (ground truth):
/** 
 * Performs the checkout or update, depending on the configuration and workspace state. <p> Use canonical path to avoid SVNKit/symlink problem as described in https://wiki.svnkit.com/SVNKit_FAQ
 * @return nullif the operation failed. Otherwise the set of local workspace paths (relative to the workspace root) that has loaded due to svn:external.
 */
private List<External> checkout(AbstractBuild build,FilePath workspace,TaskListener listener) throws IOException, InterruptedException {
  if (repositoryLocationsNoLongerExist(build,listener)) {
    Run lsb=build.getProject().getLastSuccessfulBuild();
    if (lsb != null && build.getNumber() - lsb.getNumber() > 10 && build.getTimestamp().getTimeInMillis() - lsb.getTimestamp().getTimeInMillis() > TimeUnit2.DAYS.toMillis(1)) {
      listener.getLogger().println("String_Node_Str" + build.getProject().getName() + "String_Node_Str");
      build.getProject().makeDisabled(true);
      return null;
    }
  }
  Boolean isUpdatable=useUpdate && workspace.act(new IsUpdatableTask(build,this,listener));
  return workspace.act(new CheckOutTask(build,this,build.getTimestamp().getTime(),isUpdatable,doRevert,listener));
}
Program: 152844
Project: 152844
Buggy source:
private SVNLogHandler(TaskListener listener,Pattern[] excludedPatterns,String[] excludedUsers,String excludedRevprop){
  this.listener=listener;
  this.excludedPatterns=excludedPatterns == null ? new Pattern[0] : excludedPatterns;
  this.excludedUsers=excludedUsers == null ? new String[0] : excludedUsers;
  this.excludedRevprop=excludedRevprop;
}

Fixed version (ground truth):
private SVNLogHandler(TaskListener listener,Pattern[] excludedPatterns,String[] excludedUsers,String excludedRevprop){
  this.listener=listener;
  this.excludedPatterns=excludedPatterns == null ? new Pattern[0] : excludedPatterns;
  this.excludedUsers=new HashSet<String>(Arrays.asList(excludedUsers == null ? new String[0] : excludedUsers));
  this.excludedRevprop=excludedRevprop;
}
Program: 152845
Project: 152845
Buggy source:
public Boolean invoke(File ws,VirtualChannel channel) throws IOException {
  for (  ModuleLocation l : locations) {
    String moduleName=l.getLocalDir();
    File module=new File(ws,moduleName).getCanonicalFile();
    if (!module.exists()) {
      listener.getLogger().println("String_Node_Str" + module + "String_Node_Str");
      return false;
    }
    try {
      SVNInfo svnkitInfo=parseSvnInfo(module,authProvider);
      SvnInfo svnInfo=new SvnInfo(svnkitInfo);
      String url=l.getURL();
      if (!svnInfo.url.equals(url)) {
        listener.getLogger().println("String_Node_Str" + url);
        return false;
      }
    }
 catch (    SVNException e) {
      if (e.getErrorMessage().getErrorCode() == SVNErrorCode.WC_NOT_DIRECTORY) {
        listener.getLogger().println("String_Node_Str" + module);
      }
 else {
        listener.getLogger().println("String_Node_Str" + module);
        e.printStackTrace(listener.error(e.getMessage()));
        return false;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
public Boolean invoke(File ws,VirtualChannel channel) throws IOException {
  for (  ModuleLocation l : locations) {
    String moduleName=l.getLocalDir();
    File module=new File(ws,moduleName).getCanonicalFile();
    if (!module.exists()) {
      listener.getLogger().println("String_Node_Str" + module + "String_Node_Str");
      return false;
    }
    try {
      SVNInfo svnkitInfo=parseSvnInfo(module,authProvider);
      SvnInfo svnInfo=new SvnInfo(svnkitInfo);
      String url=l.getURL();
      if (!svnInfo.url.equals(url)) {
        listener.getLogger().println("String_Node_Str" + url);
        return false;
      }
    }
 catch (    SVNException e) {
      if (e.getErrorMessage().getErrorCode() == SVNErrorCode.WC_NOT_DIRECTORY) {
        listener.getLogger().println("String_Node_Str" + module);
      }
 else {
        listener.getLogger().println("String_Node_Str" + module);
        e.printStackTrace(listener.error(e.getMessage()));
      }
      return false;
    }
  }
  return true;
}
Program: 152846
Project: 152846
Buggy source:
/** 
 * Creates   {@link ISVNAuthenticationProvider} backed by {@link #credentials}. This method must be invoked on the master, but the returned object is remotable. <p> Therefore, to access   {@link ISVNAuthenticationProvider}, you need to call this method on the master, then pass the object to the slave side, then call  {@link SubversionSCM#createSvnClientManager(ISVNAuthenticationProvider)} on the slave.
 * @see SubversionSCM#createSvnClientManager(ISVNAuthenticationProvider)
 */
public ISVNAuthenticationProvider createAuthenticationProvider(){
  return new SVNAuthenticationProviderImpl(remotableProvider);
}

Fixed version (ground truth):
/** 
 * Creates   {@link ISVNAuthenticationProvider} backed by {@link #credentials}. This method must be invoked on the master, but the returned object is remotable. <p> Therefore, to access   {@link ISVNAuthenticationProvider}, you need to call this method on the master, then pass the object to the slave side, then call  {@link SubversionSCM#createSvnClientManager(ISVNAuthenticationProvider)} on the slave.
 * @see SubversionSCM#createSvnClientManager(ISVNAuthenticationProvider)
 */
public ISVNAuthenticationProvider createAuthenticationProvider(){
  return new SVNAuthenticationProviderImpl(remotableProvider.get());
}
Program: 152847
Project: 152847
Buggy source:
@Override public URL getFileLink(Path path) throws IOException {
  if (path.getEditType() == EditType.DELETE)   return null;
  int r=path.getLogEntry().getRevision();
  return new URL(url,String.format("String_Node_Str",repositoryInstance,encodePath(getPath(path)),r));
}

Fixed version (ground truth):
@Override public URL getFileLink(Path path) throws IOException {
  if (path.getEditType() == EditType.DELETE)   return null;
  int r=path.getLogEntry().getRevision();
  return new URL(url,String.format("String_Node_Str",encodePath(repositoryInstance),encodePath(getPath(path)),r));
}
Program: 152848
Project: 152848
Buggy source:
@Override public URL getChangeSetLink(LogEntry changeSet) throws IOException {
  return new URL(url,String.format("String_Node_Str",repositoryInstance,changeSet.getRevision()));
}

Fixed version (ground truth):
@Override public URL getChangeSetLink(LogEntry changeSet) throws IOException {
  return new URL(url,String.format("String_Node_Str",encodePath(repositoryInstance),changeSet.getRevision()));
}
Program: 152849
Project: 152849
Buggy source:
@Override public URL getDiffLink(Path path) throws IOException {
  if (path.getEditType() != EditType.EDIT)   return null;
  int r=path.getLogEntry().getRevision();
  return new URL(url,String.format("String_Node_Str",repositoryInstance,encodePath(getPath(path)),r));
}

Fixed version (ground truth):
@Override public URL getDiffLink(Path path) throws IOException {
  if (path.getEditType() != EditType.EDIT)   return null;
  int r=path.getLogEntry().getRevision();
  return new URL(url,String.format("String_Node_Str",encodePath(repositoryInstance),encodePath(getPath(path)),r));
}
Program: 152850
Project: 152850
Buggy source:
/** 
 * Trims off the root module portion to compute the path within FishEye.
 */
private String getPath(Path path){
  String s=trimHeadSlash(path.getValue());
  if (s.startsWith(repositoryInstance))   s=trimHeadSlash(s.substring(repositoryInstance.length()));
  return s;
}

Fixed version (ground truth):
/** 
 * Trims off the root module portion to compute the path within FishEye.
 */
private String getPath(Path path){
  String s=trimHeadSlash(path.getValue());
  return s;
}
Program: 152851
Project: 152851
Buggy source:
private static String encodePath(String path) throws UnsupportedEncodingException {
  StringBuilder buf=new StringBuilder();
  if (path.startsWith("String_Node_Str")) {
    buf.append('/');
  }
  boolean first=true;
  for (  String pathElement : path.split("String_Node_Str")) {
    if (first) {
      first=false;
    }
 else {
      buf.append('/');
    }
    buf.append(URLEncoder.encode(pathElement,URL_CHARSET));
  }
  if (path.endsWith("String_Node_Str")) {
    buf.append('/');
  }
  return buf.toString();
}

Fixed version (ground truth):
private static String encodePath(String path) throws UnsupportedEncodingException {
  StringBuilder buf=new StringBuilder();
  if (path.startsWith("String_Node_Str")) {
    buf.append('/');
  }
  boolean first=true;
  for (  String pathElement : path.split("String_Node_Str")) {
    if (first) {
      first=false;
    }
 else {
      buf.append('/');
    }
    buf.append(URLEncoder.encode(pathElement,URL_CHARSET));
  }
  if (path.endsWith("String_Node_Str")) {
    buf.append('/');
  }
  return buf.toString().replace("String_Node_Str","String_Node_Str");
}
Program: 152852
Project: 152852
Buggy source:
@Override public void run(){
  for (  RecognitionListener l : listeners)   l.onVadStateChanged(state);
}

Fixed version (ground truth):
@Override public void run(){
  RecognitionListener[] emptyArray=new RecognitionListener[0];
  for (  RecognitionListener listener : listeners.toArray(emptyArray))   listener.onVadStateChanged(state);
}
Program: 152853
Project: 152853
Buggy source:
public void removeListener(RecognitionListener listener){
  listeners.remove(listener);
}

Fixed version (ground truth):
public void removeListener(RecognitionListener listener){
synchronized (listeners) {
    listeners.remove(listener);
  }
}
Program: 152854
Project: 152854
Buggy source:
public void addListener(RecognitionListener listener){
  listeners.add(listener);
}

Fixed version (ground truth):
public void addListener(RecognitionListener listener){
synchronized (listeners) {
    listeners.add(listener);
  }
}
Program: 152855
Project: 152855
Buggy source:
/** 
 * Called by the connection manager I/O writer thread to instruct this connection to write its pending outgoing messages.
 */
public void writeMessages(){
  try {
    ByteBuffer frame;
    while ((frame=_outq.peek()) != null) {
      _chan.write(frame);
      if (frame.remaining() > 0) {
        _cmgr.requeueWriter(this);
        return;
      }
      _outq.poll();
    }
  }
 catch (  NotYetConnectedException nyce) {
    _cmgr.requeueWriter(this);
  }
catch (  IOException ioe) {
    _outq.clear();
    _input.onSendError(ioe);
    onClose(ioe);
  }
}

Fixed version (ground truth):
/** 
 * Called by the connection manager I/O writer thread to instruct this connection to write its pending outgoing messages.
 */
public void writeMessages(){
  try {
    ByteBuffer frame;
    while ((frame=_outq.peek()) != null) {
      if (_chan == null) {
        return;
      }
      _chan.write(frame);
      if (frame.remaining() > 0) {
        _cmgr.requeueWriter(this);
        return;
      }
      _outq.poll();
    }
  }
 catch (  NotYetConnectedException nyce) {
    _cmgr.requeueWriter(this);
  }
catch (  IOException ioe) {
    _outq.clear();
    _input.onSendError(ioe);
    onClose(ioe);
  }
}
Program: 152856
Project: 152856
Buggy source:
public void send(ByteBuffer buffer){
  ByteBuffer frame=ByteBuffer.allocate(buffer.limit() - buffer.capacity());
  buffer.put(frame);
  _outq.offer(frame);
  _cmgr.queueWriter(this);
}

Fixed version (ground truth):
public void send(ByteBuffer buffer){
  ByteBuffer frame=ByteBuffer.allocate(buffer.limit() - buffer.position());
  frame.put(buffer);
  frame.flip();
  _outq.offer(frame);
  _cmgr.queueWriter(this);
}
Program: 152857
Project: 152857
Buggy source:
public void onMessage(ByteBuffer data){
  try {
    _bin.setBuffer(data);
    Upstream msg=_sin.<Upstream>readValue();
    msg.dispatch(this);
  }
 catch (  Throwable t) {
    log.warning("String_Node_Str","String_Node_Str",this);
  }
}

Fixed version (ground truth):
public void onMessage(ByteBuffer data){
  try {
    _bin.setBuffer(data);
    Upstream msg=_sin.<Upstream>readValue();
    msg.dispatch(this);
  }
 catch (  Throwable t) {
    log.warning("String_Node_Str","String_Node_Str",this,t);
  }
}
Program: 152858
Project: 152858
Buggy source:
public void save(Configuration credentials){
  Properties props=new Properties();
  props.setProperty(Keys.AMAZON_ACCESS_KEY_ID.name(),credentials.getAccessKeyId());
  props.setProperty(Keys.AMAZON_SECRET_ACCESS_KEY.name(),credentials.getSecretAccessKey());
  props.setProperty(Keys.PROXY_HOST.name(),credentials.getProxyHost());
  props.setProperty(Keys.PROXY_PORT.name(),Integer.toString(credentials.getProxyPort()));
  props.setProperty(Keys.PROXY_USERNAME.name(),credentials.getProxyUsername());
  props.setProperty(Keys.PROXY_PASSWORD.name(),credentials.getProxyPassword());
  props.setProperty(Keys.USE_SSL.name(),Boolean.toString(credentials.isUseSecureProtocol()));
  saveProperties(props);
}

Fixed version (ground truth):
public void save(Configuration credentials){
  Properties props=new Properties();
  setProperty(props,Keys.AMAZON_ACCESS_KEY_ID,credentials.getAccessKeyId());
  setProperty(props,Keys.AMAZON_SECRET_ACCESS_KEY,credentials.getSecretAccessKey());
  setProperty(props,Keys.PROXY_HOST,credentials.getProxyHost());
  setProperty(props,Keys.PROXY_PORT,credentials.getProxyPort());
  setProperty(props,Keys.PROXY_USERNAME,credentials.getProxyUsername());
  setProperty(props,Keys.PROXY_PASSWORD,credentials.getProxyPassword());
  setProperty(props,Keys.USE_SSL,credentials.isUseSecureProtocol());
  saveProperties(props);
}
Program: 152859
Project: 152859
Buggy source:
public void filesDropped(final File[] files){
  if (controller.isShowingObjects()) {
    uploadFiles(files);
  }
 else {
    worker.executeOnEventLoop(new Runnable(){
      public void run(){
        selectBucketAndUploadFiles(files);
      }
    }
);
  }
}

Fixed version (ground truth):
public void filesDropped(final File[] files){
  if (controller.isShowingObjects()) {
    worker.executeInBackground(new Runnable(){
      public void run(){
        uploadFiles(files);
      }
    }
);
  }
 else {
    worker.executeOnEventLoop(new Runnable(){
      public void run(){
        selectBucketAndUploadFiles(files);
      }
    }
);
  }
}
Program: 152860
Project: 152860
Buggy source:
public void run(){
  dialog.begin();
  try {
    uploadFiles(resolveKeys(files));
    dialog.append("String_Node_Str");
  }
  finally {
    dialog.finish();
  }
}

Fixed version (ground truth):
public void run(){
  controller.selectBucket(bucketName);
  controller.showObjects();
  uploadFiles(files);
}
Program: 152861
Project: 152861
Buggy source:
private void selectBucketAndUploadFiles(File[] files){
  List<String> names=model.getCurrentNames();
  String bucketName=display.selectOption("String_Node_Str","String_Node_Str",names);
  if (bucketName != null) {
    controller.selectBucket(bucketName);
    controller.showObjects();
    uploadFiles(files);
  }
}

Fixed version (ground truth):
private void selectBucketAndUploadFiles(final File[] files){
  List<String> names=model.getCurrentNames();
  final String bucketName=display.selectOption("String_Node_Str","String_Node_Str",names);
  if (bucketName != null) {
    worker.executeInBackground(new Runnable(){
      public void run(){
        controller.selectBucket(bucketName);
        controller.showObjects();
        uploadFiles(files);
      }
    }
);
  }
}
Program: 152862
Project: 152862
Buggy source:
private void attemptObjectCreation(String bucketName,String objectKey,File file){
  dialog.next();
  try {
    dialog.append("String_Node_Str",file.getAbsolutePath(),fileSize.format(file.length()));
    controller.createObject(bucketName,objectKey,file,dialog);
    dialog.append("String_Node_Str");
  }
 catch (  Throwable e) {
    logger.warn("String_Node_Str" + file,e);
    dialog.append("String_Node_Str",e.toString());
  }
}

Fixed version (ground truth):
private void attemptObjectCreation(String bucketName,String objectKey,File file){
  dialog.next();
  try {
    dialog.append("String_Node_Str",file.getAbsolutePath(),fileSize.format(file.length()));
    controller.createObject(bucketName,objectKey,file,dialog);
    dialog.append("String_Node_Str");
  }
 catch (  RuntimeException e) {
    logger.warn("String_Node_Str" + file,e);
    dialog.append("String_Node_Str",e.toString());
  }
}
Program: 152863
Project: 152863
Buggy source:
public void next(){
  progress.setValue(0);
  progress.setIndeterminate(true);
}

Fixed version (ground truth):
public void next(){
  worker.executeOnEventLoop(new Runnable(){
    public void run(){
      progress.setValue(0);
      progress.setIndeterminate(true);
    }
  }
);
}
Program: 152864
Project: 152864
Buggy source:
public void processed(long count,long length){
  if (progress.isIndeterminate()) {
    progress.setMinimum(0);
    progress.setMaximum((int)length);
    progress.setStringPainted(true);
    progress.setIndeterminate(false);
  }
  progress.setValue((int)count);
}

Fixed version (ground truth):
public void processed(final long count,final long length){
  worker.executeOnEventLoop(new Runnable(){
    public void run(){
      if (progress.isIndeterminate()) {
        progress.setMinimum(0);
        progress.setMaximum((int)length);
        progress.setStringPainted(true);
        progress.setIndeterminate(false);
      }
      progress.setValue((int)count);
    }
  }
);
}
Program: 152865
Project: 152865
Buggy source:
public void run(){
  closeButton.setEnabled(true);
}

Fixed version (ground truth):
public void run(){
  if (progress.isIndeterminate()) {
    progress.setMinimum(0);
    progress.setMaximum((int)length);
    progress.setStringPainted(true);
    progress.setIndeterminate(false);
  }
  progress.setValue((int)count);
}
Program: 152866
Project: 152866
Buggy source:
public Configuration(String accessKeyId,String secretAccessKey,String proxyHost,String proxyPort,String proxyUserName,String proxyPassword,String ntlmHost,String ntlmDomain,String useSecureProtocol){
  super.setConnectionTimeout(10000);
  super.setSocketTimeout(10000);
  this.accessKeyId=accessKeyId;
  this.secretAccessKey=secretAccessKey;
  this.ntlmHost=ntlmHost;
  this.ntlmDomain=ntlmDomain;
  if (StringUtils.isNotEmpty(proxyHost)) {
    super.setProxyHost(proxyHost);
  }
  if (NumberUtils.isDigits(proxyPort)) {
    super.setProxyPort(Integer.parseInt(proxyPort));
  }
  if (StringUtils.isNotEmpty(proxyUserName)) {
    super.setProxyUsername(proxyUserName);
  }
  if (StringUtils.isNotEmpty(proxyPassword)) {
    super.setProxyPassword(proxyPassword);
  }
  if (dontUse(useSecureProtocol)) {
    super.setProtocol(Protocol.HTTP);
  }
}

Fixed version (ground truth):
public Configuration(String accessKeyId,String secretAccessKey,String proxyHost,String proxyPort,String proxyUserName,String proxyPassword,String ntlmHost,String ntlmDomain,String useSecureProtocol){
  super.setConnectionTimeout(10000);
  super.setSocketTimeout(50000);
  this.accessKeyId=accessKeyId;
  this.secretAccessKey=secretAccessKey;
  this.ntlmHost=ntlmHost;
  this.ntlmDomain=ntlmDomain;
  if (StringUtils.isNotEmpty(proxyHost)) {
    super.setProxyHost(proxyHost);
  }
  if (NumberUtils.isDigits(proxyPort)) {
    super.setProxyPort(Integer.parseInt(proxyPort));
  }
  if (StringUtils.isNotEmpty(proxyUserName)) {
    super.setProxyUsername(proxyUserName);
  }
  if (StringUtils.isNotEmpty(proxyPassword)) {
    super.setProxyPassword(proxyPassword);
  }
  if (StringUtils.isNotEmpty(useSecureProtocol) && !BooleanUtils.toBoolean(useSecureProtocol)) {
    super.setProtocol(Protocol.HTTP);
  }
}
Program: 152867
Project: 152867
Buggy source:
public boolean objectExists(String bucketName,String objectKey){
  return client.getObjectMetadata(bucketName,objectKey) != null;
}

Fixed version (ground truth):
public boolean objectExists(String bucketName,String objectKey){
  ObjectListing objectListing=client.listObjects(bucketName,objectKey);
  for (  S3ObjectSummary summary : objectListing.getObjectSummaries()) {
    if (summary.getKey().equals(objectKey)) {
      return true;
    }
  }
  return false;
}
Program: 152868
Project: 152868
Buggy source:
public List<S3Object> listObjectsInBucket(String bucketName){
  List<S3Object> objects=newArrayList();
  ObjectListing objectListing=client.listObjects(bucketName);
  List<S3ObjectSummary> summaries=objectListing.getObjectSummaries();
  for (  S3ObjectSummary summary : summaries) {
    DateTime lastModified=new DateTime(summary.getLastModified());
    lastModified=lastModified.toDateTime(DateTimeZone.getDefault());
    objects.add(new S3Object(summary.getKey(),summary.getSize(),lastModified.toLocalDateTime()));
  }
  return objects;
}

Fixed version (ground truth):
public List<S3Object> listObjectsInBucket(String bucketName){
  List<S3Object> objects=newArrayList();
  ObjectListing objectListing=client.listObjects(bucketName);
  for (  S3ObjectSummary summary : objectListing.getObjectSummaries()) {
    DateTime lastModified=new DateTime(summary.getLastModified());
    lastModified=lastModified.toDateTime(DateTimeZone.getDefault());
    objects.add(new S3Object(summary.getKey(),summary.getSize(),lastModified.toLocalDateTime()));
  }
  return objects;
}
Program: 152869
Project: 152869
Buggy source:
@Test public void shouldCreateDownloadAndDeleteObject() throws Exception {
  String bucketName="String_Node_Str" + UUID.randomUUID();
  Service service=new WebClientService(credentials);
  service.createBucket(bucketName);
  File file=folder.newFile("String_Node_Str");
  FileUtils.writeStringToFile(file,UUID.randomUUID().toString());
  service.createObject(bucketName,file.getName(),file,new NullProgressListener());
  assertTrue("String_Node_Str",service.objectExists(bucketName,file.getName()));
  assertThat(service.listObjectsInBucket(bucketName),hasItem(object(file.getName())));
  List<S3Object> objects=service.listObjectsInBucket(bucketName);
  assertThat("String_Node_Str",objects.size(),equalTo(1));
  S3Object object=objects.get(0);
  assertThat("String_Node_Str",object.getKey(),equalTo(file.getName()));
  assertThat("String_Node_Str",object.getSize(),equalTo(file.length()));
  File saved=folder.newFile("String_Node_Str");
  service.downloadObject(bucketName,file.getName(),saved,new NullProgressListener());
  assertThat("String_Node_Str",Files.computeMD5(saved),equalTo(Files.computeMD5(file)));
  service.deleteObject(bucketName,file.getName());
  objects=service.listObjectsInBucket(bucketName);
  assertThat("String_Node_Str",objects.size(),equalTo(0));
  assertThat(service.listObjectsInBucket(bucketName),not(hasItem(object(file.getName()))));
  service.deleteBucket(bucketName);
}

Fixed version (ground truth):
@Test public void shouldCreateDownloadAndDeleteObject() throws Exception {
  String bucketName="String_Node_Str" + UUID.randomUUID();
  Service service=new WebClientService(credentials);
  service.createBucket(bucketName);
  File file=folder.newFile("String_Node_Str");
  FileUtils.writeStringToFile(file,UUID.randomUUID().toString());
  assertFalse("String_Node_Str",service.objectExists(bucketName,file.getName()));
  service.createObject(bucketName,file.getName(),file,new NullProgressListener());
  assertTrue("String_Node_Str",service.objectExists(bucketName,file.getName()));
  assertThat(service.listObjectsInBucket(bucketName),hasItem(object(file.getName())));
  List<S3Object> objects=service.listObjectsInBucket(bucketName);
  assertThat("String_Node_Str",objects.size(),equalTo(1));
  S3Object object=objects.get(0);
  assertThat("String_Node_Str",object.getKey(),equalTo(file.getName()));
  assertThat("String_Node_Str",object.getSize(),equalTo(file.length()));
  File saved=folder.newFile("String_Node_Str");
  service.downloadObject(bucketName,file.getName(),saved,new NullProgressListener());
  assertThat("String_Node_Str",Files.computeMD5(saved),equalTo(Files.computeMD5(file)));
  service.deleteObject(bucketName,file.getName());
  objects=service.listObjectsInBucket(bucketName);
  assertThat("String_Node_Str",objects.size(),equalTo(0));
  assertThat(service.listObjectsInBucket(bucketName),not(hasItem(object(file.getName()))));
  service.deleteBucket(bucketName);
}