<commit_before>package kg.apc.jmeter.samplers;

import org.apache.jmeter.samplers.AbstractSampler;
import org.apache.jmeter.samplers.Entry;
import org.apache.jmeter.samplers.SampleResult;

/**
 *
 * @author apc
 */
public class DummySampler
      extends AbstractSampler
{
   /**
    *
    */
   public static final String IS_SUCCESSFUL = "SUCCESFULL";
   /**
    *
    */
   public static final String RESPONSE_CODE = "RESPONSE_CODE";
   /**
    *
    */
   public static final String RESPONSE_MESSAGE = "RESPONSE_MESSAGE";
   /**
    *
    */
   public static final String RESPONSE_DATA = "RESPONSE_DATA";
   /**
    *
    */
   public static final String RESPONSE_TIME = "RESPONSE_TIME";

   public SampleResult sample(Entry e)
   {
      SampleResult res = new SampleResult();
      // response time
      res.sampleStart();
      try
      {
         Thread.sleep(getResponseTime());
      }
      catch (InterruptedException ex)
      {
      }
      res.sampleEnd();

      res.setSampleLabel(getName());

      // source data
      res.setSamplerData(getResponseData());

      // response code
      res.setResponseCode(getResponseCode());
      res.setResponseMessage(getResponseMessage());
      res.setSuccessful(isSuccessfull());

      // responde data
      res.setDataType(SampleResult.TEXT);
      res.setResponseData(getResponseData().getBytes());

      return res;
   }

   /**
    *
    * @param selected
    */
   public void setSuccessful(boolean selected)
   {
      setProperty(IS_SUCCESSFUL, selected);
   }

   /**<commit_msg>Tried to fix null results<commit_after>package kg.apc.jmeter.samplers;

import org.apache.jmeter.samplers.AbstractSampler;
import org.apache.jmeter.samplers.Entry;
import org.apache.jmeter.samplers.SampleResult;

/**
 *
 * @author apc
 */
public class DummySampler
      extends AbstractSampler
{
   /**
    *
    */
   public static final String IS_SUCCESSFUL = "SUCCESFULL";
   /**
    *
    */
   public static final String RESPONSE_CODE = "RESPONSE_CODE";
   /**
    *
    */
   public static final String RESPONSE_MESSAGE = "RESPONSE_MESSAGE";
   /**
    *
    */
   public static final String RESPONSE_DATA = "RESPONSE_DATA";
   /**
    *
    */
   public static final String RESPONSE_TIME = "RESPONSE_TIME";

   public SampleResult sample(Entry e)
   {
      SampleResult res = new SampleResult();
      res.setSampleLabel(getName());

      // source data
      res.setSamplerData(getResponseData());

      // response code
      res.setResponseCode(getResponseCode());
      res.setResponseMessage(getResponseMessage());
      res.setSuccessful(isSuccessfull());

      // responde data
      res.setDataType(SampleResult.TEXT);
      res.setResponseData(getResponseData().getBytes());

      // response time
      res.sampleStart();
      try
      {
         Thread.sleep(getResponseTime());
      }
      catch (InterruptedException ex)
      {
      }
      res.sampleEnd();

      return res;
   }

   /**
    *
    * @param selected
    */
   public void setSuccessful(boolean selected)
   {
      setProperty(IS_SUCCESSFUL, selected);
   }

   /**
{'fraction_non_alphanumeric': 0.11610006414368185, 'fraction_numerical': 0.0, 'mean_word_length': 2.500561167227834, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5002402', 'n_tokens_mistral': 988, 'n_tokens_neox': 969, 'n_words': 174}