<commit_before>/*
 * Copyright (c) 2013 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */

package com.google.api.client.http;

import com.google.api.client.util.BackOff;
import com.google.api.client.util.BackOffUtils;
import com.google.api.client.util.Beta;
import com.google.api.client.util.Preconditions;
import com.google.api.client.util.Sleeper;

import java.io.IOException;

/**
 * {@link Beta} <br/>
 * Back-off handler which handles an abnormal HTTP response with {@link BackOff}.
 *
 * <p>
 * It is designed to work with only one {@link HttpRequest} at a time. As a result you MUST create a
 * new instance of {@link HttpBackOffIOExceptionHandler} with a new instance of {@link BackOff} for
 * each instance of {@link HttpRequest}.
 * </p>
 *
 * <p>
 * Sample usage:
 * </p>
 *
 * <pre>
  request.setUnsuccessfulResponseHandler(
    new HttpBackOffUnsuccessfulResponseHandler(new ExponentialBackOff()));
 * </pre><commit_msg>CLEANUP: Fix copypasta in JavaDoc for a HTTP Java API class.<commit_after>/*
 * Copyright (c) 2013 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */

package com.google.api.client.http;

import com.google.api.client.util.BackOff;
import com.google.api.client.util.BackOffUtils;
import com.google.api.client.util.Beta;
import com.google.api.client.util.Preconditions;
import com.google.api.client.util.Sleeper;

import java.io.IOException;

/**
 * {@link Beta} <br/>
 * Back-off handler which handles an abnormal HTTP response with {@link BackOff}.
 *
 * <p>
 * It is designed to work with only one {@link HttpRequest} at a time. As a result you MUST create a
 * new instance of {@link HttpBackOffUnsuccessfulResponseHandler} with a new instance of
 * {@link BackOff} for each instance of {@link HttpRequest}.
 * </p>
 *
 * <p>
 * Sample usage:
 * </p>
 *
 * <pre>
  request.setUnsuccessfulResponseHandler(
    new HttpBackOffUnsuccessfulResponseHandler(new ExponentialBackOff()));
 * </pre>
{'fraction_non_alphanumeric': 0.10230352303523035, 'fraction_numerical': 0.005420054200542005, 'mean_word_length': 4.126736111111111, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2898768', 'n_tokens_mistral': 844, 'n_tokens_neox': 837, 'n_words': 333}