Program: 111464
Project: 111464
Buggy source:
protected File buildDockerFolderTar(File dockerFolder){
  Preconditions.checkArgument(dockerFolder.exists(),"String_Node_Str",dockerFolder);
  Preconditions.checkArgument(dockerFolder.isDirectory(),"String_Node_Str",dockerFolder);
  Preconditions.checkState(new File(dockerFolder,"String_Node_Str").exists(),"String_Node_Str" + dockerFolder);
  String archiveNameWithOutExtension=UUID.randomUUID().toString();
  File dockerFolderTar=null;
  try {
    File dockerFile=new File(dockerFolder,"String_Node_Str");
    List<String> dockerFileContent=FileUtils.readLines(dockerFile);
    if (dockerFileContent.size() <= 0) {
      throw new DockerClientException(String.format("String_Node_Str",dockerFile));
    }
    List<String> ignores=new ArrayList<String>();
    File dockerIgnoreFile=new File(dockerFolder,"String_Node_Str");
    if (dockerIgnoreFile.exists()) {
      int lineNumber=0;
      List<String> dockerIgnoreFileContent=FileUtils.readLines(dockerIgnoreFile);
      for (      String pattern : dockerIgnoreFileContent) {
        lineNumber++;
        pattern=pattern.trim();
        if (pattern.isEmpty()) {
          continue;
        }
        pattern=FilenameUtils.normalize(pattern);
        try {
          if (GoLangFileMatch.match(pattern,"String_Node_Str")) {
            throw new DockerClientException(String.format("String_Node_Str",pattern,lineNumber));
          }
          ignores.add(pattern);
        }
 catch (        GoLangFileMatchException e) {
          throw new DockerClientException(String.format("String_Node_Str",pattern,lineNumber));
        }
      }
    }
    List<File> filesToAdd=new ArrayList<File>();
    filesToAdd.add(dockerFile);
    Map<String,String> environmentMap=new HashMap<String,String>();
    int lineNumber=0;
    for (    String cmd : dockerFileContent) {
      lineNumber++;
      if (cmd.trim().isEmpty() || cmd.startsWith("String_Node_Str"))       continue;
      final Matcher envMatcher=ENV_PATTERN.matcher(cmd.trim());
      if (envMatcher.find()) {
        if (envMatcher.groupCount() != 2)         throw new DockerClientException(String.format("String_Node_Str",lineNumber));
        String variable=envMatcher.group(1).trim();
        String value=envMatcher.group(2).trim();
        environmentMap.put(variable,value);
      }
      final Matcher matcher=ADD_OR_COPY_PATTERN.matcher(cmd.trim());
      if (matcher.find()) {
        if (matcher.groupCount() != 3) {
          throw new DockerClientException(String.format("String_Node_Str",lineNumber));
        }
        String extractedResource=matcher.group(2);
        String resource=filterForEnvironmentVars(extractedResource,environmentMap).trim();
        if (isFileResource(resource)) {
          File src=new File(resource);
          if (!src.isAbsolute()) {
            src=new File(dockerFolder,resource).getCanonicalFile();
          }
 else {
            throw new DockerClientException(String.format("String_Node_Str",src,dockerFolder));
          }
          if (!src.exists()) {
            throw new DockerClientException(String.format("String_Node_Str",src));
          }
          if (src.isDirectory()) {
            Collection<File> files=FileUtils.listFiles(src,new GoLangMatchFileFilter(src,ignores),TrueFileFilter.INSTANCE);
            filesToAdd.addAll(files);
          }
 else           if (!GoLangFileMatch.match(ignores,CompressArchiveUtil.relativize(dockerFolder,src))) {
            filesToAdd.add(src);
          }
 else {
            throw new DockerClientException(String.format("String_Node_Str",src));
          }
        }
      }
    }
    return CompressArchiveUtil.archiveTARFiles(dockerFolder,filesToAdd,archiveNameWithOutExtension);
  }
 catch (  IOException ex) {
    FileUtils.deleteQuietly(dockerFolderTar);
    throw new DockerClientException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
protected File buildDockerFolderTar(File dockerFolder){
  Preconditions.checkArgument(dockerFolder.exists(),"String_Node_Str",dockerFolder);
  Preconditions.checkArgument(dockerFolder.isDirectory(),"String_Node_Str",dockerFolder);
  Preconditions.checkState(new File(dockerFolder,"String_Node_Str").exists(),"String_Node_Str" + dockerFolder);
  String archiveNameWithOutExtension=UUID.randomUUID().toString();
  File dockerFolderTar=null;
  try {
    File dockerFile=new File(dockerFolder,"String_Node_Str");
    List<String> dockerFileContent=FileUtils.readLines(dockerFile);
    if (dockerFileContent.size() <= 0) {
      throw new DockerClientException(String.format("String_Node_Str",dockerFile));
    }
    List<String> ignores=new ArrayList<String>();
    File dockerIgnoreFile=new File(dockerFolder,"String_Node_Str");
    if (dockerIgnoreFile.exists()) {
      int lineNumber=0;
      List<String> dockerIgnoreFileContent=FileUtils.readLines(dockerIgnoreFile);
      for (      String pattern : dockerIgnoreFileContent) {
        lineNumber++;
        pattern=pattern.trim();
        if (pattern.isEmpty()) {
          continue;
        }
        pattern=FilenameUtils.normalize(pattern);
        try {
          if (GoLangFileMatch.match(pattern,"String_Node_Str")) {
            throw new DockerClientException(String.format("String_Node_Str",pattern,lineNumber));
          }
          ignores.add(pattern);
        }
 catch (        GoLangFileMatchException e) {
          throw new DockerClientException(String.format("String_Node_Str",pattern,lineNumber));
        }
      }
    }
    List<File> filesToAdd=new ArrayList<File>();
    filesToAdd.add(dockerFile);
    Map<String,String> environmentMap=new HashMap<String,String>();
    int lineNumber=0;
    for (    String cmd : dockerFileContent) {
      lineNumber++;
      if (cmd.trim().isEmpty() || cmd.startsWith("String_Node_Str"))       continue;
      final Matcher envMatcher=ENV_PATTERN.matcher(cmd.trim());
      if (envMatcher.find()) {
        if (envMatcher.groupCount() != 2)         throw new DockerClientException(String.format("String_Node_Str",lineNumber));
        String variable=envMatcher.group(1).trim();
        String value=envMatcher.group(2).trim();
        environmentMap.put(variable,value);
      }
      final Matcher matcher=ADD_OR_COPY_PATTERN.matcher(cmd.trim());
      if (matcher.find()) {
        if (matcher.groupCount() != 3) {
          throw new DockerClientException(String.format("String_Node_Str",lineNumber));
        }
        String extractedResource=matcher.group(2);
        String resource=filterForEnvironmentVars(extractedResource,environmentMap).trim();
        if (isFileResource(resource)) {
          File src=new File(resource);
          if (!src.isAbsolute()) {
            src=new File(dockerFolder,resource).getCanonicalFile();
          }
 else {
            throw new DockerClientException(String.format("String_Node_Str",src,dockerFolder));
          }
          if (src.isDirectory()) {
            Collection<File> files=FileUtils.listFiles(src,new GoLangMatchFileFilter(src,ignores),TrueFileFilter.INSTANCE);
            filesToAdd.addAll(files);
          }
 else           if (!src.exists()) {
            filesToAdd.addAll(resolveWildcards(src,ignores));
          }
 else           if (!GoLangFileMatch.match(ignores,CompressArchiveUtil.relativize(dockerFolder,src))) {
            filesToAdd.add(src);
          }
 else {
            throw new DockerClientException(String.format("String_Node_Str",src));
          }
        }
      }
    }
    return CompressArchiveUtil.archiveTARFiles(dockerFolder,filesToAdd,archiveNameWithOutExtension);
  }
 catch (  IOException ex) {
    FileUtils.deleteQuietly(dockerFolderTar);
    throw new DockerClientException("String_Node_Str",ex);
  }
}