<commit_before>package replicant;

import arez.Disposable;
import arez.Observer;
import java.util.Objects;
import java.util.function.Consumer;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
 * Container describing the Container and state in client.
 */
final class ConnectorEntry
  implements Disposable
{
  /**
   * The cost to attempt to modify action on DataLoader.
   */
  private static final int ACTION_COST = 10000;
  static final int REQUIRED_REGEN_PER_MILLISECOND = ACTION_COST;
  static final int OPTIONAL_REGEN_PER_MILLISECOND = REQUIRED_REGEN_PER_MILLISECOND / 5;

  @Nonnull
  private final Connector _connector;
  /**
   * The monitor observer that will remove connector from context if it is independent disposed.
   */
  @Nullable
  private Observer _monitor;
  /**
   * Does the system require this DataLoader to be present to be operational.
   */
  private boolean _required;
  private final RateLimitedValue _rateLimiter;

  ConnectorEntry( @Nonnull final Connector connector, final boolean required )
  {
    _connector = Objects.requireNonNull( connector );
    _required = required;

    final int regenRate = required ? REQUIRED_REGEN_PER_MILLISECOND : OPTIONAL_REGEN_PER_MILLISECOND;
    _rateLimiter = new RateLimitedValue( System.currentTimeMillis(), regenRate, ACTION_COST * 2 );
  }

  boolean attemptAction( @Nonnull final Consumer<Connector> action )
  {
    return getRateLimiter().attempt( System.currentTimeMillis(), ACTION_COST, () -> action.accept( getConnector() ) );
  }

  @Nonnull
  final RateLimitedValue getRateLimiter()
  {
    return _rateLimiter;
  }

  /**
   * Return the Connector the entry represents.
   *
   * @return the Connector the entry represents.
   */
  @Nonnull
  Connector getConnector()
  {
    return _connector;
  }

  boolean isRequired()
  {<commit_msg>Remove final qualifier in final class<commit_after>package replicant;

import arez.Disposable;
import arez.Observer;
import java.util.Objects;
import java.util.function.Consumer;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
 * Container describing the Container and state in client.
 */
final class ConnectorEntry
  implements Disposable
{
  /**
   * The cost to attempt to modify action on DataLoader.
   */
  private static final int ACTION_COST = 10000;
  static final int REQUIRED_REGEN_PER_MILLISECOND = ACTION_COST;
  static final int OPTIONAL_REGEN_PER_MILLISECOND = REQUIRED_REGEN_PER_MILLISECOND / 5;

  @Nonnull
  private final Connector _connector;
  /**
   * The monitor observer that will remove connector from context if it is independent disposed.
   */
  @Nullable
  private Observer _monitor;
  /**
   * Does the system require this DataLoader to be present to be operational.
   */
  private boolean _required;
  private final RateLimitedValue _rateLimiter;

  ConnectorEntry( @Nonnull final Connector connector, final boolean required )
  {
    _connector = Objects.requireNonNull( connector );
    _required = required;

    final int regenRate = required ? REQUIRED_REGEN_PER_MILLISECOND : OPTIONAL_REGEN_PER_MILLISECOND;
    _rateLimiter = new RateLimitedValue( System.currentTimeMillis(), regenRate, ACTION_COST * 2 );
  }

  boolean attemptAction( @Nonnull final Consumer<Connector> action )
  {
    return getRateLimiter().attempt( System.currentTimeMillis(), ACTION_COST, () -> action.accept( getConnector() ) );
  }

  @Nonnull
  RateLimitedValue getRateLimiter()
  {
    return _rateLimiter;
  }

  /**
   * Return the Connector the entry represents.
   *
   * @return the Connector the entry represents.
   */
  @Nonnull
  Connector getConnector()
  {
    return _connector;
  }

  boolean isRequired()
  {
{'fraction_non_alphanumeric': 0.07717215326497572, 'fraction_numerical': 0.0037776578521316784, 'mean_word_length': 4.029850746268656, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6607741', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1103, 'n_words': 320}