Program: 94358
Project: 94358
Buggy source:
@SuppressFBWarnings(value="String_Node_Str",justification="String_Node_Str") public MapFile.Reader getReader() throws IOException {
  if (reader == null) {
    FileSystem fs=path.getFileSystem(conf);
    Path qualifiedPath=path.makeQualified(fs);
    URI pathUri=qualifiedPath.toUri();
    URI indexUri=UriBuilder.fromUri(pathUri).path("String_Node_Str").build();
    URI dataUri=UriBuilder.fromUri(pathUri).path("String_Node_Str").build();
    String scheme=pathUri.getScheme().toLowerCase();
    if ("String_Node_Str".equals(scheme) || "String_Node_Str".equals(scheme) || "String_Node_Str".equals(scheme)) {
      S3Cache localS3Cache=S3Utils.getS3Cache();
      File cacheDir=S3Utils.getCacheDir();
      log.debug("String_Node_Str" + cacheDir.getAbsolutePath());
      File tmpBucketDir=new File(S3Utils.getCacheDir(),pathUri.getHost());
      File tmpIndexFile=new File(tmpBucketDir,indexUri.getPath().substring(1));
      File tmpDataFile=new File(tmpBucketDir,dataUri.getPath().substring(1));
      Path tryLocalPath=new Path("String_Node_Str" + tmpIndexFile.getParentFile().getAbsolutePath());
      log.debug("String_Node_Str" + tmpIndexFile.getAbsolutePath());
      cacheEntry=localS3Cache.getEntry(path.toString(),tryLocalPath,tmpIndexFile,tmpDataFile);
      if (cacheEntry != null) {
        cacheEntry.readLock();
        localPath=cacheEntry.getLocalPath();
      }
 else {
        localPath=new Path("String_Node_Str" + tmpIndexFile.getParentFile().getAbsolutePath());
        cacheEntry=localS3Cache.createEntry(localPath,tmpIndexFile,tmpDataFile);
        boolean writeLocked=cacheEntry.tryWriteLock();
        if (writeLocked) {
          try {
            localS3Cache.addEntry(path.toString(),cacheEntry);
            AmazonS3 s3Client=new AmazonS3Client(new DefaultAWSCredentialsProviderChain());
            FileUtils.forceMkdir(tmpDataFile.getParentFile());
            try (FileOutputStream fosData=new FileOutputStream(tmpDataFile)){
              long dataSize=copyFileFromS3(s3Client,dataUri,tmpDataFile,fosData);
              log.debug("String_Node_Str" + dataUri + "String_Node_Str"+ tmpDataFile.getAbsolutePath()+ "String_Node_Str"+ dataSize);
            }
             long indexSize=copyFileFromS3(s3Client,indexUri,tmpIndexFile,cacheEntry.getPrimaryFileOutputStream());
            log.debug("String_Node_Str" + indexUri + "String_Node_Str"+ tmpIndexFile.getAbsolutePath()+ "String_Node_Str"+ indexSize);
            log.debug("String_Node_Str" + indexUri + "String_Node_Str"+ indexSize);
          }
  finally {
            log.debug("String_Node_Str" + Thread.currentThread().getId() + "String_Node_Str"+ cacheEntry);
            cacheEntry.releaseWriteLock();
            cacheEntry.readLock();
          }
        }
 else {
          cacheEntry.readLock();
        }
      }
      log.debug("String_Node_Str" + localPath);
      reader=new MapFile.Reader(localPath,conf);
    }
 else {
      log.debug("String_Node_Str" + path);
      localPath=null;
      reader=new MapFile.Reader(path,conf);
    }
  }
  return reader;
}

Fixed version (ground truth):
@SuppressFBWarnings(value="String_Node_Str",justification="String_Node_Str") public MapFile.Reader getReader() throws IOException {
  if (reader == null) {
    FileSystem fs=path.getFileSystem(conf);
    Path qualifiedPath=path.makeQualified(fs);
    URI pathUri=qualifiedPath.toUri();
    URI indexUri=UriBuilder.fromUri(pathUri).path("String_Node_Str").build();
    URI dataUri=UriBuilder.fromUri(pathUri).path("String_Node_Str").build();
    String scheme=pathUri.getScheme().toLowerCase();
    if ("String_Node_Str".equals(scheme) || "String_Node_Str".equals(scheme) || "String_Node_Str".equals(scheme)) {
      S3Cache localS3Cache=S3Utils.getS3Cache();
      File cacheDir=S3Utils.getCacheDir();
      log.debug("String_Node_Str" + cacheDir.getAbsolutePath());
      File tmpBucketDir=new File(S3Utils.getCacheDir(),pathUri.getHost());
      File tmpIndexFile=new File(tmpBucketDir,indexUri.getPath().substring(1));
      File tmpDataFile=new File(tmpBucketDir,dataUri.getPath().substring(1));
      Path tryLocalPath=new Path("String_Node_Str" + tmpIndexFile.getParentFile().getAbsolutePath());
      log.debug("String_Node_Str" + tmpIndexFile.getAbsolutePath());
      cacheEntry=localS3Cache.getEntry(path.toString(),tryLocalPath,tmpIndexFile,tmpDataFile);
      if (cacheEntry != null) {
        cacheEntry.readLock();
        localPath=cacheEntry.getLocalPath();
      }
 else {
        localPath=new Path("String_Node_Str" + tmpIndexFile.getParentFile().getAbsolutePath());
        cacheEntry=localS3Cache.createEntry(localPath,tmpIndexFile,tmpDataFile);
        boolean writeLocked=cacheEntry.tryWriteLock();
        if (writeLocked) {
          try {
            localS3Cache.addEntry(path.toString(),cacheEntry);
            AmazonS3 s3Client=getS3Client(conf,scheme);
            FileUtils.forceMkdir(tmpDataFile.getParentFile());
            try (FileOutputStream fosData=new FileOutputStream(tmpDataFile)){
              long dataSize=copyFileFromS3(s3Client,dataUri,tmpDataFile,fosData);
              log.debug("String_Node_Str" + dataUri + "String_Node_Str"+ tmpDataFile.getAbsolutePath()+ "String_Node_Str"+ dataSize);
            }
             long indexSize=copyFileFromS3(s3Client,indexUri,tmpIndexFile,cacheEntry.getPrimaryFileOutputStream());
            log.debug("String_Node_Str" + indexUri + "String_Node_Str"+ tmpIndexFile.getAbsolutePath()+ "String_Node_Str"+ indexSize);
            log.debug("String_Node_Str" + indexUri + "String_Node_Str"+ indexSize);
          }
  finally {
            log.debug("String_Node_Str" + Thread.currentThread().getId() + "String_Node_Str"+ cacheEntry);
            cacheEntry.releaseWriteLock();
            cacheEntry.readLock();
          }
        }
 else {
          cacheEntry.readLock();
        }
      }
      log.debug("String_Node_Str" + localPath);
      reader=new MapFile.Reader(localPath,conf);
    }
 else {
      log.debug("String_Node_Str" + path);
      localPath=null;
      reader=new MapFile.Reader(path,conf);
    }
  }
  return reader;
}