<commit_before>// Copyright 2017 The Bazel Authors. All rights reserved.
//
// 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.devtools.build.lib.rules.android;

import com.google.auto.value.AutoValue;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.analysis.RuleContext;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
import com.google.devtools.build.lib.packages.RuleErrorConsumer;
import com.google.devtools.build.lib.rules.java.JavaUtil;
import com.google.devtools.build.lib.syntax.Type;
import com.google.devtools.build.lib.util.Preconditions;
import com.google.devtools.build.lib.vfs.PathFragment;
import java.util.Objects;
import javax.annotation.Nullable;

/** The resources contributed by a single target. */
@AutoValue
@Immutable
public abstract class ResourceContainer {
  /** The type of resource in question: either asset or a resource. */
  public enum ResourceType {
    ASSETS("assets"),
    RESOURCES("resources");

    private final String attribute;

    private ResourceType(String attribute) {
      this.attribute = attribute;
    }

    public String getAttribute() {
      return attribute;
    }
  }

  public abstract Label getLabel();

  @Nullable
  public abstract String getJavaPackage();

  @Nullable
  public abstract String getRenameManifestPackage();

  public abstract boolean getConstantsInlined();

  @Nullable
  public abstract Artifact getApk();

  public abstract Artifact getManifest();

  @Nullable
  public abstract Artifact getJavaSourceJar();

  @Nullable
  public abstract Artifact getJavaClassJar();

  abstract ImmutableList<Artifact> getAssets();

  @VisibleForTesting
  public abstract ImmutableList<Artifact> getResources();

  public ImmutableList<Artifact> getArtifacts(ResourceType resourceType) {
    return resourceType == ResourceType.ASSETS ? getAssets() : getResources();
  }

  public Iterable<Artifact> getArtifacts() {
    return Iterables.concat(getAssets(), getResources());<commit_msg>Automated rollback of commit <PASSWORD>.<commit_after>// Copyright 2017 The Bazel Authors. All rights reserved.
//
// 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.devtools.build.lib.rules.android;

import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.analysis.RuleContext;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
import com.google.devtools.build.lib.packages.RuleErrorConsumer;
import com.google.devtools.build.lib.rules.java.JavaUtil;
import com.google.devtools.build.lib.syntax.Type;
import com.google.devtools.build.lib.util.Preconditions;
import com.google.devtools.build.lib.vfs.PathFragment;
import java.util.Objects;
import javax.annotation.Nullable;

/** The resources contributed by a single target. */
@AutoValue
@Immutable
public abstract class ResourceContainer {
  /** The type of resource in question: either asset or a resource. */
  public enum ResourceType {
    ASSETS("assets"),
    RESOURCES("resources");

    private final String attribute;

    private ResourceType(String attribute) {
      this.attribute = attribute;
    }

    public String getAttribute() {
      return attribute;
    }
  }

  public abstract Label getLabel();

  @Nullable
  public abstract String getJavaPackage();

  @Nullable
  public abstract String getRenameManifestPackage();

  public abstract boolean getConstantsInlined();

  @Nullable
  public abstract Artifact getApk();

  public abstract Artifact getManifest();

  @Nullable
  public abstract Artifact getJavaSourceJar();

  @Nullable
  public abstract Artifact getJavaClassJar();

  abstract ImmutableList<Artifact> getAssets();

  abstract ImmutableList<Artifact> getResources();

  public ImmutableList<Artifact> getArtifacts(ResourceType resourceType) {
    return resourceType == ResourceType.ASSETS ? getAssets() : getResources();
  }

  public Iterable<Artifact> getArtifacts() {
    return Iterables.concat(getAssets(), getResources());
{'fraction_non_alphanumeric': 0.0967741935483871, 'fraction_numerical': 0.0029493087557603687, 'mean_word_length': 4.503042596348885, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '20464', 'n_tokens_mistral': 1501, 'n_tokens_neox': 1450, 'n_words': 443}