test_class.declarator: accessDenied
test_class.modifier: private
test_class.original_string: private GoogleJsonResponseException accessDenied;
test_class.type: GoogleJsonResponseException
test_class.var_name: accessDenied
test_class.declarator: statusOk
test_class.modifier: private
test_class.original_string: private GoogleJsonResponseException statusOk;
test_class.type: GoogleJsonResponseException
test_class.var_name: statusOk
test_class.declarator: notFound
test_class.modifier: private
test_class.original_string: private GoogleJsonResponseException notFound;
test_class.type: GoogleJsonResponseException
test_class.var_name: notFound
test_class.declarator: badRange
test_class.modifier: private
test_class.original_string: private GoogleJsonResponseException badRange;
test_class.type: GoogleJsonResponseException
test_class.var_name: badRange
test_class.declarator: alreadyExists
test_class.modifier: private
test_class.original_string: private GoogleJsonResponseException alreadyExists;
test_class.type: GoogleJsonResponseException
test_class.var_name: alreadyExists
test_class.declarator: rateLimited
test_class.modifier: private
test_class.original_string: private GoogleJsonResponseException rateLimited;
test_class.type: GoogleJsonResponseException
test_class.var_name: rateLimited
test_class.declarator: notRateLimited
test_class.modifier: private
test_class.original_string: private GoogleJsonResponseException notRateLimited;
test_class.type: GoogleJsonResponseException
test_class.var_name: notRateLimited
test_class.declarator: quotaExceeded
test_class.modifier: private
test_class.original_string: private GoogleJsonResponseException quotaExceeded;
test_class.type: GoogleJsonResponseException
test_class.var_name: quotaExceeded
test_class.declarator: resourceNotReady
test_class.modifier: private
test_class.original_string: private GoogleJsonResponseException resourceNotReady;
test_class.type: GoogleJsonResponseException
test_class.var_name: resourceNotReady
test_class.declarator: bigqueryRateLimited
test_class.modifier: private
test_class.original_string: private GoogleJsonResponseException bigqueryRateLimited;
test_class.type: GoogleJsonResponseException
test_class.var_name: bigqueryRateLimited
test_class.declarator: POSSIBLE_RATE_LIMIT = 429
test_class.modifier: private static final
test_class.original_string: private static final int POSSIBLE_RATE_LIMIT = 429;
test_class.type: int
test_class.var_name: POSSIBLE_RATE_LIMIT
test_class.declarator: errorExtractor = ApiErrorExtractor.INSTANCE
test_class.modifier: private final
test_class.original_string: private final ApiErrorExtractor errorExtractor = ApiErrorExtractor.INSTANCE;
test_class.type: ApiErrorExtractor
test_class.var_name: errorExtractor
test_class.file: util/src/test/java/com/google/cloud/hadoop/util/ApiErrorExtractorTest.java
test_class.identifier: ApiErrorExtractorTest
test_case.body: @Test
    public void testSocketError() {
      // Check true cases.
      Throwable socketError1 = new SocketTimeoutException("socket error 1");
      assertThat(errorExtractor.socketError(socketError1)).isTrue();
      assertThat(errorExtractor.socketError(new Exception(socketError1))).isTrue();
      assertThat(errorExtractor.socketError(new IOException(new IOException(socketError1)))).isTrue();
  
      Throwable socketError2 = new SocketException("socket error 2");
      assertThat(errorExtractor.socketError(socketError2)).isTrue();
      assertThat(errorExtractor.socketError(new Exception(socketError2))).isTrue();
      assertThat(errorExtractor.socketError(new IOException(new IOException(socketError2)))).isTrue();
  
      Throwable socketError3 = new SSLException("ssl exception", new EOFException("eof"));
      assertThat(errorExtractor.socketError(socketError3)).isTrue();
      assertThat(errorExtractor.socketError(new Exception(socketError3))).isTrue();
      assertThat(errorExtractor.socketError(new IOException(new IOException(socketError3)))).isTrue();
  
      // Check false cases.
      Throwable notSocketError = new Exception("not socket error");
      Throwable notIOError = new Exception("not io error");
      assertThat(errorExtractor.socketError(notSocketError)).isFalse();
      assertThat(errorExtractor.socketError(new IOException(notSocketError))).isFalse();
      assertThat(errorExtractor.socketError(new SSLException("handshake failed", notIOError)))
          .isFalse();
    }
test_case.class_method_signature: ApiErrorExtractorTest.testSocketError()
test_case.full_signature: @Test public void testSocketError()
test_case.identifier: testSocketError
test_case.invocations: isTrue assertThat socketError isTrue assertThat socketError isTrue assertThat socketError isTrue assertThat socketError isTrue assertThat socketError isTrue assertThat socketError isTrue assertThat socketError isTrue assertThat socketError isTrue assertThat socketError isFalse assertThat socketError isFalse assertThat socketError isFalse assertThat socketError
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSocketError()
focal_class.declarator: INSTANCE = new ApiErrorExtractor()
focal_class.modifier: public static final
focal_class.original_string: public static final ApiErrorExtractor INSTANCE = new ApiErrorExtractor();
focal_class.type: ApiErrorExtractor
focal_class.var_name: INSTANCE
focal_class.declarator: STATUS_CODE_RANGE_NOT_SATISFIABLE = 416
focal_class.modifier: public static final
focal_class.original_string: public static final int STATUS_CODE_RANGE_NOT_SATISFIABLE = 416;
focal_class.type: int
focal_class.var_name: STATUS_CODE_RANGE_NOT_SATISFIABLE
focal_class.declarator: GLOBAL_DOMAIN = "global"
focal_class.modifier: public static final
focal_class.original_string: public static final String GLOBAL_DOMAIN = "global";
focal_class.type: String
focal_class.var_name: GLOBAL_DOMAIN
focal_class.declarator: USAGE_LIMITS_DOMAIN = "usageLimits"
focal_class.modifier: public static final
focal_class.original_string: public static final String USAGE_LIMITS_DOMAIN = "usageLimits";
focal_class.type: String
focal_class.var_name: USAGE_LIMITS_DOMAIN
focal_class.declarator: RATE_LIMITED_REASON = "rateLimitExceeded"
focal_class.modifier: public static final
focal_class.original_string: public static final String RATE_LIMITED_REASON = "rateLimitExceeded";
focal_class.type: String
focal_class.var_name: RATE_LIMITED_REASON
focal_class.declarator: USER_RATE_LIMITED_REASON = "userRateLimitExceeded"
focal_class.modifier: public static final
focal_class.original_string: public static final String USER_RATE_LIMITED_REASON = "userRateLimitExceeded";
focal_class.type: String
focal_class.var_name: USER_RATE_LIMITED_REASON
focal_class.declarator: QUOTA_EXCEEDED_REASON = "quotaExceeded"
focal_class.modifier: public static final
focal_class.original_string: public static final String QUOTA_EXCEEDED_REASON = "quotaExceeded";
focal_class.type: String
focal_class.var_name: QUOTA_EXCEEDED_REASON
focal_class.declarator: ACCOUNT_DISABLED_REASON = "accountDisabled"
focal_class.modifier: public static final
focal_class.original_string: public static final String ACCOUNT_DISABLED_REASON = "accountDisabled";
focal_class.type: String
focal_class.var_name: ACCOUNT_DISABLED_REASON
focal_class.declarator: ACCESS_NOT_CONFIGURED_REASON = "accessNotConfigured"
focal_class.modifier: public static final
focal_class.original_string: public static final String ACCESS_NOT_CONFIGURED_REASON = "accessNotConfigured";
focal_class.type: String
focal_class.var_name: ACCESS_NOT_CONFIGURED_REASON
focal_class.declarator: RESOURCE_NOT_READY_REASON = "resourceNotReady"
focal_class.modifier: public static final
focal_class.original_string: public static final String RESOURCE_NOT_READY_REASON = "resourceNotReady";
focal_class.type: String
focal_class.var_name: RESOURCE_NOT_READY_REASON
focal_class.declarator: FIELD_SIZE_TOO_LARGE_REASON = "fieldSizeTooLarge"
focal_class.modifier: public static final
focal_class.original_string: public static final String FIELD_SIZE_TOO_LARGE_REASON = "fieldSizeTooLarge";
focal_class.type: String
focal_class.var_name: FIELD_SIZE_TOO_LARGE_REASON
focal_class.declarator: USER_PROJECT_MISSING_MESSAGE =
        "Bucket is requester pays bucket but no user project provided."
focal_class.modifier: public static final
focal_class.original_string: public static final String USER_PROJECT_MISSING_MESSAGE =
        "Bucket is requester pays bucket but no user project provided.";
focal_class.type: String
focal_class.var_name: USER_PROJECT_MISSING_MESSAGE
focal_class.declarator: DEBUG_INFO_FIELD = "debugInfo"
focal_class.modifier: private static final
focal_class.original_string: private static final String DEBUG_INFO_FIELD = "debugInfo";
focal_class.type: String
focal_class.var_name: DEBUG_INFO_FIELD
focal_class.file: util/src/main/java/com/google/cloud/hadoop/util/ApiErrorExtractor.java
focal_class.identifier: ApiErrorExtractor
focal_class.class_method_signature: ApiErrorExtractor.requestFailure(IOException e)
focal_class.full_signature: public boolean requestFailure(IOException e)
focal_class.identifier: requestFailure
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean requestFailure(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.accessDenied(IOException e)
focal_class.full_signature: public boolean accessDenied(IOException e)
focal_class.identifier: accessDenied
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean accessDenied(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.badRequest(IOException e)
focal_class.full_signature: public boolean badRequest(IOException e)
focal_class.identifier: badRequest
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean badRequest(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.unauthorized(IOException e)
focal_class.full_signature: public boolean unauthorized(IOException e)
focal_class.identifier: unauthorized
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean unauthorized(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.accessDeniedNonRecoverable(IOException e)
focal_class.full_signature: public boolean accessDeniedNonRecoverable(IOException e)
focal_class.identifier: accessDeniedNonRecoverable
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean accessDeniedNonRecoverable(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.clientError(IOException e)
focal_class.full_signature: public boolean clientError(IOException e)
focal_class.identifier: clientError
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean clientError(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.internalServerError(IOException e)
focal_class.full_signature: public boolean internalServerError(IOException e)
focal_class.identifier: internalServerError
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean internalServerError(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.itemAlreadyExists(IOException e)
focal_class.full_signature: public boolean itemAlreadyExists(IOException e)
focal_class.identifier: itemAlreadyExists
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean itemAlreadyExists(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.itemNotFound(IOException e)
focal_class.full_signature: public boolean itemNotFound(IOException e)
focal_class.identifier: itemNotFound
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean itemNotFound(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.fieldSizeTooLarge(IOException e)
focal_class.full_signature: public boolean fieldSizeTooLarge(IOException e)
focal_class.identifier: fieldSizeTooLarge
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean fieldSizeTooLarge(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.resourceNotReady(IOException e)
focal_class.full_signature: public boolean resourceNotReady(IOException e)
focal_class.identifier: resourceNotReady
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean resourceNotReady(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.preconditionNotMet(IOException e)
focal_class.full_signature: public boolean preconditionNotMet(IOException e)
focal_class.identifier: preconditionNotMet
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean preconditionNotMet(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.rangeNotSatisfiable(IOException e)
focal_class.full_signature: public boolean rangeNotSatisfiable(IOException e)
focal_class.identifier: rangeNotSatisfiable
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean rangeNotSatisfiable(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.rateLimited(IOException e)
focal_class.full_signature: public boolean rateLimited(IOException e)
focal_class.identifier: rateLimited
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean rateLimited(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.quotaExceeded(IOException e)
focal_class.full_signature: public boolean quotaExceeded(IOException e)
focal_class.identifier: quotaExceeded
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean quotaExceeded(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.userProjectMissing(IOException e)
focal_class.full_signature: public boolean userProjectMissing(IOException e)
focal_class.identifier: userProjectMissing
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean userProjectMissing(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.ioError(Throwable throwable)
focal_class.full_signature: public boolean ioError(Throwable throwable)
focal_class.identifier: ioError
focal_class.modifiers: public
focal_class.parameters: (Throwable throwable)
focal_class.return: boolean
focal_class.signature: boolean ioError(Throwable throwable)
focal_class.class_method_signature: ApiErrorExtractor.socketError(Throwable throwable)
focal_class.full_signature: public boolean socketError(Throwable throwable)
focal_class.identifier: socketError
focal_class.modifiers: public
focal_class.parameters: (Throwable throwable)
focal_class.return: boolean
focal_class.signature: boolean socketError(Throwable throwable)
focal_class.class_method_signature: ApiErrorExtractor.readTimedOut(IOException e)
focal_class.full_signature: public boolean readTimedOut(IOException e)
focal_class.identifier: readTimedOut
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: boolean
focal_class.signature: boolean readTimedOut(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.getErrorMessage(IOException e)
focal_class.full_signature: public String getErrorMessage(IOException e)
focal_class.identifier: getErrorMessage
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: String
focal_class.signature: String getErrorMessage(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.toUserPresentableException(IOException e, String action)
focal_class.full_signature: public IOException toUserPresentableException(IOException e, String action)
focal_class.identifier: toUserPresentableException
focal_class.modifiers: public
focal_class.parameters: (IOException e, String action)
focal_class.return: IOException
focal_class.signature: IOException toUserPresentableException(IOException e, String action)
focal_class.class_method_signature: ApiErrorExtractor.toUserPresentableMessage(IOException e, @Nullable String action)
focal_class.full_signature: public String toUserPresentableMessage(IOException e, @Nullable String action)
focal_class.identifier: toUserPresentableMessage
focal_class.modifiers: public
focal_class.parameters: (IOException e, @Nullable String action)
focal_class.return: String
focal_class.signature: String toUserPresentableMessage(IOException e, @Nullable String action)
focal_class.class_method_signature: ApiErrorExtractor.toUserPresentableMessage(IOException e)
focal_class.full_signature: public String toUserPresentableMessage(IOException e)
focal_class.identifier: toUserPresentableMessage
focal_class.modifiers: public
focal_class.parameters: (IOException e)
focal_class.return: String
focal_class.signature: String toUserPresentableMessage(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.getDebugInfo(IOException e)
focal_class.full_signature: @Nullable public String getDebugInfo(IOException e)
focal_class.identifier: getDebugInfo
focal_class.modifiers: @Nullable public
focal_class.parameters: (IOException e)
focal_class.return: String
focal_class.signature: String getDebugInfo(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.getHttpStatusCode(GoogleJsonResponseException e)
focal_class.full_signature: protected int getHttpStatusCode(GoogleJsonResponseException e)
focal_class.identifier: getHttpStatusCode
focal_class.modifiers: protected
focal_class.parameters: (GoogleJsonResponseException e)
focal_class.return: int
focal_class.signature: int getHttpStatusCode(GoogleJsonResponseException e)
focal_class.class_method_signature: ApiErrorExtractor.getErrorInfo(IOException e)
focal_class.full_signature: @Nullable protected ErrorInfo getErrorInfo(IOException e)
focal_class.identifier: getErrorInfo
focal_class.modifiers: @Nullable protected
focal_class.parameters: (IOException e)
focal_class.return: ErrorInfo
focal_class.signature: ErrorInfo getErrorInfo(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.getJsonError(IOException e)
focal_class.full_signature: @Nullable protected GoogleJsonError getJsonError(IOException e)
focal_class.identifier: getJsonError
focal_class.modifiers: @Nullable protected
focal_class.parameters: (IOException e)
focal_class.return: GoogleJsonError
focal_class.signature: GoogleJsonError getJsonError(IOException e)
focal_class.class_method_signature: ApiErrorExtractor.recursiveCheckForCode(IOException e, int code)
focal_class.full_signature: protected boolean recursiveCheckForCode(IOException e, int code)
focal_class.identifier: recursiveCheckForCode
focal_class.modifiers: protected
focal_class.parameters: (IOException e, int code)
focal_class.return: boolean
focal_class.signature: boolean recursiveCheckForCode(IOException e, int code)
focal_class.class_method_signature: ApiErrorExtractor.getJsonResponseException(Throwable throwable)
focal_class.full_signature: @Nullable public static GoogleJsonResponseException getJsonResponseException(Throwable throwable)
focal_class.identifier: getJsonResponseException
focal_class.modifiers: @Nullable public static
focal_class.parameters: (Throwable throwable)
focal_class.return: GoogleJsonResponseException
focal_class.signature: GoogleJsonResponseException getJsonResponseException(Throwable throwable)
focal_method.body: public boolean socketError(Throwable throwable) {
      if (throwable instanceof SocketException || throwable instanceof SocketTimeoutException) {
        return true;
      }
      Throwable cause = throwable.getCause();
      // Subset of SSL exceptions that are caused by IO errors (e.g. SSLHandshakeException due to
      // unexpected connection closure) is also a socket error.
      if (throwable instanceof SSLException && cause != null && ioError(cause)) {
        return true;
      }
      return cause != null && socketError(cause);
    }
focal_method.class_method_signature: ApiErrorExtractor.socketError(Throwable throwable)
focal_method.full_signature: public boolean socketError(Throwable throwable)
focal_method.identifier: socketError
focal_method.invocations: getCause ioError socketError
focal_method.modifiers: public
focal_method.parameters: (Throwable throwable)
focal_method.return: boolean
focal_method.signature: boolean socketError(Throwable throwable)