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

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import kg.apc.charting.AbstractGraphRow;
import kg.apc.jmeter.JMeterPluginsUtils;
import kg.apc.jmeter.graphs.AbstractOverTimeVisualizer;
import kg.apc.jmeter.gui.ButtonPanelAddCopyRemove;
import org.apache.jmeter.gui.util.PowerTableModel;
import org.apache.jmeter.samplers.SampleResult;
import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.testelement.property.CollectionProperty;
import org.apache.jmeter.testelement.property.JMeterProperty;
import org.apache.jmeter.testelement.property.NullProperty;
import org.apache.jmeter.testelement.property.PropertyIterator;
import org.apache.jorphan.logging.LoggingManager;
import org.apache.log.Logger;

/**
 *
 * @author <NAME>
 */
public class PageDataExtractorOverTimeGui extends AbstractOverTimeVisualizer {

   private static final String REGEXPS_PROPERTY = "regexps";
   private static final Logger log = LoggingManager.getLoggerForClass();
   private PowerTableModel tableModel;
   private JTable grid;
   public static final String[] columnIdentifiers = new String[]{
      "Chart label", "Regular expression value extractor", "Delta"
   };
   public static final Class[] columnClasses = new Class[]{
      String.class, String.class, Boolean.class
   };
   private static Object[] defaultValues = new Object[]{
      "", "", false
   };
   private CollectionProperty regExps = null;
   private HashMap<String, Pattern> patterns = new HashMap<String, Pattern>();

   private ArrayList<Object> cmdRegExps = null;

   private HashMap<String, Double> oldValues = new HashMap<String, Double>();

   public PageDataExtractorOverTimeGui() {
      setGranulation(1000);
      graphPanel.getGraphObject().setYAxisLabel("Metrics Extracted");
      graphPanel.getGraphObject().getChartSettings().setExpendRows(true);
   }

   @Override
   protected JSettingsPanel createSettingsPanel() {
      return new JSettingsPanel(this,
              JSettingsPanel.GRADIENT_OPTION
              | JSettingsPanel.MAXY_OPTION
              | JSettingsPanel.RELATIVE_TIME_OPTION
              | JSettingsPanel.AUTO_EXPAND_OPTION
              | JSettingsPanel.MARKERS_OPTION_DISABLED);
   }

   @Override
   public String getStaticLabel() {
      return JMeterPluginsUtils.prefixLabel("Page Data Extractor");
   }

   @Override
   public String getLabelResource() {
      return getClass().getSimpleName();
   }

   @Override
   public String getWikiPage() {
      return "PageDataExtractor";
   }<commit_msg>fix setting panel init values<commit_after>package kg.apc.jmeter.vizualizers;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import kg.apc.charting.AbstractGraphRow;
import kg.apc.jmeter.JMeterPluginsUtils;
import kg.apc.jmeter.graphs.AbstractOverTimeVisualizer;
import kg.apc.jmeter.gui.ButtonPanelAddCopyRemove;
import org.apache.jmeter.gui.util.PowerTableModel;
import org.apache.jmeter.samplers.SampleResult;
import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.testelement.property.CollectionProperty;
import org.apache.jmeter.testelement.property.JMeterProperty;
import org.apache.jmeter.testelement.property.NullProperty;
import org.apache.jmeter.testelement.property.PropertyIterator;
import org.apache.jorphan.logging.LoggingManager;
import org.apache.log.Logger;

/**
 *
 * @author <NAME>
 */
public class PageDataExtractorOverTimeGui extends AbstractOverTimeVisualizer {

   private static final String REGEXPS_PROPERTY = "regexps";
   private static final Logger log = LoggingManager.getLoggerForClass();
   private PowerTableModel tableModel;
   private JTable grid;
   public static final String[] columnIdentifiers = new String[]{
      "Chart label", "Regular expression value extractor", "Delta"
   };
   public static final Class[] columnClasses = new Class[]{
      String.class, String.class, Boolean.class
   };
   private static Object[] defaultValues = new Object[]{
      "", "", false
   };
   private CollectionProperty regExps = null;
   private HashMap<String, Pattern> patterns = new HashMap<String, Pattern>();

   private ArrayList<Object> cmdRegExps = null;

   private HashMap<String, Double> oldValues = new HashMap<String, Double>();

   public PageDataExtractorOverTimeGui() {
      setGranulation(1000);
      graphPanel.getGraphObject().setYAxisLabel("Metrics Extracted");
      graphPanel.getGraphObject().getChartSettings().setExpendRows(true);
   }

   @Override
   protected JSettingsPanel createSettingsPanel() {
      return new JSettingsPanel(this,
              JSettingsPanel.GRADIENT_OPTION
              | JSettingsPanel.MAXY_OPTION
              | JSettingsPanel.RELATIVE_TIME_OPTION
              | JSettingsPanel.AUTO_EXPAND_OPTION
              | JSettingsPanel.MARKERS_OPTION);
   }

   @Override
   public String getStaticLabel() {
      return JMeterPluginsUtils.prefixLabel("Page Data Extractor");
   }

   @Override
   public String getLabelResource() {
      return getClass().getSimpleName();
   }

   @Override
   public String getWikiPage() {
      return "PageDataExtractor";
   }
{'fraction_non_alphanumeric': 0.09625487205558379, 'fraction_numerical': 0.0013557024233180816, 'mean_word_length': 4.469879518072289, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '5833147', 'n_tokens_mistral': 1706, 'n_tokens_neox': 1669, 'n_words': 348}