<commit_before>package org.batfish.question.specifiers;

import static com.google.common.base.MoreObjects.firstNonNull;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSortedSet;
import java.util.SortedSet;
import javax.annotation.Nullable;
import org.batfish.datamodel.ForwardingAction;
import org.batfish.datamodel.HeaderSpace;
import org.batfish.datamodel.Protocol;
import org.batfish.datamodel.SubRange;
import org.batfish.datamodel.questions.Question;
import org.batfish.question.ReachabilityParameters;
import org.batfish.specifier.AllNodesNodeSpecifier;
import org.batfish.specifier.FlexibleInferFromLocationIpSpaceSpecifierFactory;
import org.batfish.specifier.FlexibleLocationSpecifierFactory;
import org.batfish.specifier.IpSpaceSpecifier;
import org.batfish.specifier.IpSpaceSpecifierFactory;
import org.batfish.specifier.LocationSpecifier;
import org.batfish.specifier.LocationSpecifierFactory;
import org.batfish.specifier.NameRegexNodeSpecifierFactory;
import org.batfish.specifier.NodeNameRegexConnectedHostsIpSpaceSpecifierFactory;
import org.batfish.specifier.NodeSpecifier;
import org.batfish.specifier.NodeSpecifierFactory;

/**
 * A version of reachability question that supports {@link LocationSpecifier location} and {@link
 * IpSpaceSpecifier ipSpace} specifiers.
 */
public final class SpecifiersReachabilityQuestion extends Question {
  private static final String DEFAULT_DESTINATION_IP_SPACE_SPECIFIER_FACTORY =
      NodeNameRegexConnectedHostsIpSpaceSpecifierFactory.NAME;

  private static final String DEFAULT_SOURCE_IP_SPACE_SPECIFIER_FACTORY =
      FlexibleInferFromLocationIpSpaceSpecifierFactory.NAME;

  private static final String DEFAULT_SOURCE_LOCATION_SPECIFIER_FACTORY =
      FlexibleLocationSpecifierFactory.NAME;

  private static final String PROP_ACTIONS = "actions";

  private static final String PROP_DESTINATION_IP_SPACE_SPECIFIER_FACTORY =
      "destinationIpSpaceSpecifierFactory";

  private static final String PROP_DESTINATION_IP_SPACE_SPECIFIER_INPUT =
      "destinationIpSpaceSpecifierInput";

  private static final String PROP_DST_PORTS = "dstPorts";

  private static final String PROP_DST_PROTOCOLS = "dstProtocols";

  private static final String PROP_FINAL_NODES_SPECIFIER_FACTORY = "finalNodesSpecifierFactory";

  private static final String PROP_FINAL_NODES_SPECIFIER_INPUT = "finalNodesSpecifierInput";

  private static final String PROP_FORBIDDEN_TRANSIT_NODES_NODE_SPECIFIER_INPUT =
      "forbiddenTransitNodesNodeSpecifierFactory";

  private static final String PROP_FORBIDDEN_TRANSIT_NODES_NODE_SPECIFIER_FACTORY =
      "forbiddenTransitNodesNodeSpecifierInput";

  private static final String PROP_SOURCE_IP_SPACE_SPECIFIER_FACTORY =
      "sourceIpSpaceSpecifierFactory";

  private static final String PROP_SOURCE_IP_SPACE_SPECIFIER_INPUT = "sourceIpSpaceSpecifierInput";

  private static final String PROP_SOURCE_LOCATION_SPECIFIER_FACTORY =
      "sourceLocationSpecifierFactory";<commit_msg>fix the prop names for forbidden transit nodes (#2160)<commit_after>package org.batfish.question.specifiers;

import static com.google.common.base.MoreObjects.firstNonNull;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSortedSet;
import java.util.SortedSet;
import javax.annotation.Nullable;
import org.batfish.datamodel.ForwardingAction;
import org.batfish.datamodel.HeaderSpace;
import org.batfish.datamodel.Protocol;
import org.batfish.datamodel.SubRange;
import org.batfish.datamodel.questions.Question;
import org.batfish.question.ReachabilityParameters;
import org.batfish.specifier.AllNodesNodeSpecifier;
import org.batfish.specifier.FlexibleInferFromLocationIpSpaceSpecifierFactory;
import org.batfish.specifier.FlexibleLocationSpecifierFactory;
import org.batfish.specifier.IpSpaceSpecifier;
import org.batfish.specifier.IpSpaceSpecifierFactory;
import org.batfish.specifier.LocationSpecifier;
import org.batfish.specifier.LocationSpecifierFactory;
import org.batfish.specifier.NameRegexNodeSpecifierFactory;
import org.batfish.specifier.NodeNameRegexConnectedHostsIpSpaceSpecifierFactory;
import org.batfish.specifier.NodeSpecifier;
import org.batfish.specifier.NodeSpecifierFactory;

/**
 * A version of reachability question that supports {@link LocationSpecifier location} and {@link
 * IpSpaceSpecifier ipSpace} specifiers.
 */
public final class SpecifiersReachabilityQuestion extends Question {
  private static final String DEFAULT_DESTINATION_IP_SPACE_SPECIFIER_FACTORY =
      NodeNameRegexConnectedHostsIpSpaceSpecifierFactory.NAME;

  private static final String DEFAULT_SOURCE_IP_SPACE_SPECIFIER_FACTORY =
      FlexibleInferFromLocationIpSpaceSpecifierFactory.NAME;

  private static final String DEFAULT_SOURCE_LOCATION_SPECIFIER_FACTORY =
      FlexibleLocationSpecifierFactory.NAME;

  private static final String PROP_ACTIONS = "actions";

  private static final String PROP_DESTINATION_IP_SPACE_SPECIFIER_FACTORY =
      "destinationIpSpaceSpecifierFactory";

  private static final String PROP_DESTINATION_IP_SPACE_SPECIFIER_INPUT =
      "destinationIpSpaceSpecifierInput";

  private static final String PROP_DST_PORTS = "dstPorts";

  private static final String PROP_DST_PROTOCOLS = "dstProtocols";

  private static final String PROP_FINAL_NODES_SPECIFIER_FACTORY = "finalNodesSpecifierFactory";

  private static final String PROP_FINAL_NODES_SPECIFIER_INPUT = "finalNodesSpecifierInput";

  private static final String PROP_FORBIDDEN_TRANSIT_NODES_NODE_SPECIFIER_INPUT =
      "forbiddenTransitNodesNodeSpecifierInput";

  private static final String PROP_FORBIDDEN_TRANSIT_NODES_NODE_SPECIFIER_FACTORY =
      "forbiddenTransitNodesNodeSpecifierFactory";

  private static final String PROP_SOURCE_IP_SPACE_SPECIFIER_FACTORY =
      "sourceIpSpaceSpecifierFactory";

  private static final String PROP_SOURCE_IP_SPACE_SPECIFIER_INPUT = "sourceIpSpaceSpecifierInput";

  private static final String PROP_SOURCE_LOCATION_SPECIFIER_FACTORY =
      "sourceLocationSpecifierFactory";
{'fraction_non_alphanumeric': 0.057628194951579614, 'fraction_numerical': 0.0006350214319733291, 'mean_word_length': 7.388814913448735, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '4269511', 'n_tokens_mistral': 1910, 'n_tokens_neox': 1830, 'n_words': 331}