<commit_before>package org.testng.xml;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import org.testng.TestNG;
import org.testng.internal.AnnotationTypeEnum;
import org.testng.reporters.XMLStringBuffer;

/**
 * This class describes the tag &lt;test&gt;  in testng.xml.
 * 
 * @author <a href = "mailto:cedric&#64;beust.com"><NAME></a>
 * @author <a href = 'mailto:the_mindstorm[at]evolva[dot]ro'><NAME></a>
 */
public class XmlTest implements Serializable, Cloneable {
  private final XmlSuite m_suite;
  private String m_name = TestNG.DEFAULT_COMMAND_LINE_SUITE_NAME;
  private Integer m_verbose;
  private Boolean m_isJUnit;
  private int m_threadCount= -1;

  private List<XmlClass> m_xmlClasses = new ArrayList<XmlClass>();
  
  private List<String> m_includedGroups = new ArrayList<String>();
  private List<String> m_excludedGroups = new ArrayList<String>();

  private final Map<String, List<String>> m_metaGroups = new HashMap<String, List<String>>();
  private Map<String, String> m_parameters = new HashMap<String, String>();
  private String m_parallel;
  
  /** */
  private AnnotationTypeEnum m_annotations;
  
  // BeanShell expression
  private String m_expression;
  private List<XmlMethodSelector> m_methodSelectors = new ArrayList<XmlMethodSelector>();
  // test level packages
  private List<XmlPackage> m_xmlPackages = new ArrayList<XmlPackage>();
  
  private String m_timeOut;

  /**
   * Constructs a <code>XmlTest</code> and adds it to suite's list of tests. 
   *
   * @param suite the parent suite.
   */
  public XmlTest(XmlSuite suite) {
    m_suite = suite;
    m_suite.getTests().add(this);
  }

  public void setXmlPackages(List<XmlPackage> packages) {
    m_xmlPackages = packages;
  }
  
  public List<XmlPackage> getXmlPackages() {
    return m_xmlPackages;
  }
  
  public List<XmlMethodSelector> getMethodSelectors() {
    return m_methodSelectors;
  }

  public void setMethodSelectors(List<XmlMethodSelector> methodSelectors) {
    m_methodSelectors = methodSelectors;
  }
  
  /**
   * Returns the suite this test is part of.
   * @return the suite this test is part of.
   */
  public XmlSuite getSuite() {
    return m_suite;
  }
  
  /**
   * @return Returns the includedGroups.
   */
  public List<String> getIncludedGroups() {
    return m_includedGroups;
  }
  
  /**
   * Sets the XML Classes.
   * @param classes The classes to set.
   * @deprecated use setXmlClasses
   */
  public void setClassNames(List<XmlClass> classes) {
    m_xmlClasses = classes;
  }
    
  /**
   * @return Returns the classes.
   */
  public List<XmlClass> getXmlClasses() {
    return m_xmlClasses;
  }
  
  /**
   * Sets the XML Classes.
   * @param classes The classes to set.
   */
  public void setXmlClasses(List<XmlClass> classes) {
    m_xmlClasses = classes;
  }
  
  /**
   * @return Returns the name.
   */
  public String getName() {
    return m_name;
  }
  
  /**
   * @param name The name to set.
   */
  public void setName(String name) {
    m_name = name;
  }

  /**
   * @param v
   */
  public void setVerbose(int v) {
    m_verbose = Integer.valueOf(v);
  }

  public int getThreadCount() {
    return m_threadCount > 0 ? m_threadCount : getSuite().getThreadCount();
  }

  public void setThreadCount(int threadCount) {
    m_threadCount = threadCount;
  }
  
  /**
   * @param g
   */
  public void setIncludedGroups(List<String> g) {
    m_includedGroups = g;
  }

  /**
   * @param g The excludedGrousps to set.
   */
  public void setExcludedGroups(List<String> g) {
    m_excludedGroups = g;
  }

  /**
   * @return Returns the excludedGroups.<commit_msg>replcae Integer.valuteOf() back to new Integer() to support JDK1.4<commit_after>package org.testng.xml;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import org.testng.TestNG;
import org.testng.internal.AnnotationTypeEnum;
import org.testng.reporters.XMLStringBuffer;

/**
 * This class describes the tag &lt;test&gt;  in testng.xml.
 * 
 * @author <a href = "mailto:cedric&#64;beust.com"><NAME></a>
 * @author <a href = 'mailto:the_mindstorm[at]evolva[dot]ro'><NAME></a>
 */
public class XmlTest implements Serializable, Cloneable {
  private final XmlSuite m_suite;
  private String m_name = TestNG.DEFAULT_COMMAND_LINE_SUITE_NAME;
  private Integer m_verbose;
  private Boolean m_isJUnit;
  private int m_threadCount= -1;

  private List<XmlClass> m_xmlClasses = new ArrayList<XmlClass>();
  
  private List<String> m_includedGroups = new ArrayList<String>();
  private List<String> m_excludedGroups = new ArrayList<String>();

  private final Map<String, List<String>> m_metaGroups = new HashMap<String, List<String>>();
  private Map<String, String> m_parameters = new HashMap<String, String>();
  private String m_parallel;
  
  /** */
  private AnnotationTypeEnum m_annotations;
  
  // BeanShell expression
  private String m_expression;
  private List<XmlMethodSelector> m_methodSelectors = new ArrayList<XmlMethodSelector>();
  // test level packages
  private List<XmlPackage> m_xmlPackages = new ArrayList<XmlPackage>();
  
  private String m_timeOut;

  /**
   * Constructs a <code>XmlTest</code> and adds it to suite's list of tests. 
   *
   * @param suite the parent suite.
   */
  public XmlTest(XmlSuite suite) {
    m_suite = suite;
    m_suite.getTests().add(this);
  }

  public void setXmlPackages(List<XmlPackage> packages) {
    m_xmlPackages = packages;
  }
  
  public List<XmlPackage> getXmlPackages() {
    return m_xmlPackages;
  }
  
  public List<XmlMethodSelector> getMethodSelectors() {
    return m_methodSelectors;
  }

  public void setMethodSelectors(List<XmlMethodSelector> methodSelectors) {
    m_methodSelectors = methodSelectors;
  }
  
  /**
   * Returns the suite this test is part of.
   * @return the suite this test is part of.
   */
  public XmlSuite getSuite() {
    return m_suite;
  }
  
  /**
   * @return Returns the includedGroups.
   */
  public List<String> getIncludedGroups() {
    return m_includedGroups;
  }
  
  /**
   * Sets the XML Classes.
   * @param classes The classes to set.
   * @deprecated use setXmlClasses
   */
  public void setClassNames(List<XmlClass> classes) {
    m_xmlClasses = classes;
  }
    
  /**
   * @return Returns the classes.
   */
  public List<XmlClass> getXmlClasses() {
    return m_xmlClasses;
  }
  
  /**
   * Sets the XML Classes.
   * @param classes The classes to set.
   */
  public void setXmlClasses(List<XmlClass> classes) {
    m_xmlClasses = classes;
  }
  
  /**
   * @return Returns the name.
   */
  public String getName() {
    return m_name;
  }
  
  /**
   * @param name The name to set.
   */
  public void setName(String name) {
    m_name = name;
  }

  /**
   * @param v
   */
  public void setVerbose(int v) {
    m_verbose = new Integer( v);
  }

  public int getThreadCount() {
    return m_threadCount > 0 ? m_threadCount : getSuite().getThreadCount();
  }

  public void setThreadCount(int threadCount) {
    m_threadCount = threadCount;
  }
  
  /**
   * @param g
   */
  public void setIncludedGroups(List<String> g) {
    m_includedGroups = g;
  }

  /**
   * @param g The excludedGrousps to set.
   */
  public void setExcludedGroups(List<String> g) {
    m_excludedGroups = g;
  }

  /**
   * @return Returns the excludedGroups.
{'fraction_non_alphanumeric': 0.11071047008547008, 'fraction_numerical': 0.0013354700854700855, 'mean_word_length': 3.4104829210836276, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 73, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 18}, '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': '7642813', 'n_tokens_mistral': 2477, 'n_tokens_neox': 2427, 'n_words': 613}