<commit_before>// Derived from Spoon.java in square/spoon
// https://github.com/square/spoon/blob/94584b46f6152e7033c2e3fe9997c8491d6fedd1/spoon-client/src/main/java/com/squareup/spoon/Spoon.java
/*
   Copyright 2013 Square, 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.
 */

// This file contains significant modifications from the original work

package tools.fastlane.screengrab;

import android.content.Context;
import android.support.test.InstrumentationRegistry;

import java.util.HashMap;
import java.util.regex.Pattern;

public class Screengrab {
    private static final Pattern TAG_PATTERN = Pattern.compile("[a-zA-Z0-9_-]+");

    private static ScreenshotStrategy defaultScreenshotStrategy = new DecorViewScreenshotStrategy();

    /**
     * @return The default {@link ScreenshotStrategy} used in {@link #screenshot(String)} invocations
     */
    public static ScreenshotStrategy getDefaultScreenshotStrategy() {
        return defaultScreenshotStrategy;
    }

    /**
     * Set a {@link ScreenshotStrategy} to be used by default for subsequent {@link #screenshot(String)}<commit_msg>Revert "[WIP] Remove copyright" (#8849)<commit_after>// Derived from Spoon.java in square/spoon
// https://github.com/square/spoon/blob/94584b46f6152e7033c2e3fe9997c8491d6fedd1/spoon-client/src/main/java/com/squareup/spoon/Spoon.java
/*
   Copyright 2013 Square, 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.
 */

// This file contains significant modifications from the original work
// Modifications Copyright 2015, Twitter Inc

package tools.fastlane.screengrab;

import android.content.Context;
import android.support.test.InstrumentationRegistry;

import java.util.HashMap;
import java.util.regex.Pattern;

public class Screengrab {
    private static final Pattern TAG_PATTERN = Pattern.compile("[a-zA-Z0-9_-]+");

    private static ScreenshotStrategy defaultScreenshotStrategy = new DecorViewScreenshotStrategy();

    /**
     * @return The default {@link ScreenshotStrategy} used in {@link #screenshot(String)} invocations
     */
    public static ScreenshotStrategy getDefaultScreenshotStrategy() {
        return defaultScreenshotStrategy;
    }

    /**
     * Set a {@link ScreenshotStrategy} to be used by default for subsequent {@link #screenshot(String)}
{'fraction_non_alphanumeric': 0.08133535660091047, 'fraction_numerical': 0.024886191198786038, 'mean_word_length': 4.0785824345146375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4048241', 'n_tokens_mistral': 962, 'n_tokens_neox': 903, 'n_words': 312}