Program: 54835
Project: 54835
Buggy source:
private final GoogleCredential getDefaultCredentialUnsynchronized(HttpTransport transport,JsonFactory jsonFactory) throws IOException {
  GoogleCredential credential=null;
  String credentialsPath=getEnv(CREDENTIAL_ENV_VAR);
  if (credentialsPath != null && credentialsPath.length() > 0) {
    InputStream credentialsStream=null;
    try {
      File credentialsFile=new File(credentialsPath);
      if (!credentialsFile.exists() || credentialsFile.isDirectory()) {
        throw new IOException("String_Node_Str");
      }
      credentialsStream=new FileInputStream(credentialsFile);
      credential=GoogleCredential.fromStream(credentialsStream,transport,jsonFactory);
    }
 catch (    IOException e) {
      throw OAuth2Utils.exceptionWithCause(new IOException(String.format("String_Node_Str",CREDENTIAL_ENV_VAR,credentialsPath,e.getMessage())),e);
    }
catch (    AccessControlException expected) {
    }
 finally {
      if (credentialsStream != null) {
        credentialsStream.close();
      }
    }
  }
  File wellKnownFileLocation=getWellKnownCredentialsFile();
  try {
    if (fileExists(wellKnownFileLocation)) {
      InputStream credentialsStream=null;
      try {
        credentialsStream=new FileInputStream(wellKnownFileLocation);
        credential=GoogleCredential.fromStream(credentialsStream,transport,jsonFactory);
      }
 catch (      IOException e) {
        throw new IOException(String.format("String_Node_Str",wellKnownFileLocation,e.getMessage()));
      }
 finally {
        if (credentialsStream != null) {
          credentialsStream.close();
        }
      }
    }
  }
 catch (  AccessControlException expected) {
  }
  if (credential == null) {
    credential=tryGetAppEngineCredential(transport,jsonFactory);
  }
  if (credential == null) {
    credential=tryGetComputeCredential(transport,jsonFactory);
  }
  return credential;
}

Fixed version (ground truth):
private final GoogleCredential getDefaultCredentialUnsynchronized(HttpTransport transport,JsonFactory jsonFactory) throws IOException {
  GoogleCredential credential=null;
  String credentialsPath=getEnv(CREDENTIAL_ENV_VAR);
  if (credentialsPath != null && credentialsPath.length() > 0) {
    InputStream credentialsStream=null;
    try {
      File credentialsFile=new File(credentialsPath);
      if (!credentialsFile.exists() || credentialsFile.isDirectory()) {
        throw new IOException("String_Node_Str");
      }
      credentialsStream=new FileInputStream(credentialsFile);
      credential=GoogleCredential.fromStream(credentialsStream,transport,jsonFactory);
    }
 catch (    IOException e) {
      throw OAuth2Utils.exceptionWithCause(new IOException(String.format("String_Node_Str",CREDENTIAL_ENV_VAR,credentialsPath,e.getMessage())),e);
    }
catch (    AccessControlException expected) {
    }
 finally {
      if (credentialsStream != null) {
        credentialsStream.close();
      }
    }
  }
  if (credential == null) {
    File wellKnownFileLocation=getWellKnownCredentialsFile();
    try {
      if (fileExists(wellKnownFileLocation)) {
        InputStream credentialsStream=null;
        try {
          credentialsStream=new FileInputStream(wellKnownFileLocation);
          credential=GoogleCredential.fromStream(credentialsStream,transport,jsonFactory);
        }
 catch (        IOException e) {
          throw new IOException(String.format("String_Node_Str",wellKnownFileLocation,e.getMessage()));
        }
 finally {
          if (credentialsStream != null) {
            credentialsStream.close();
          }
        }
      }
    }
 catch (    AccessControlException expected) {
    }
  }
  if (credential == null) {
    credential=tryGetAppEngineCredential(transport,jsonFactory);
  }
  if (credential == null) {
    credential=tryGetComputeCredential(transport,jsonFactory);
  }
  return credential;
}