Initializes ReadTimeParser with configuration values set by the
        site author.
497974
def initialize_settings(self, sender):
        
        try:
            self.initialized = True

            settings_content_types = sender.settings.get(
                'READTIME_CONTENT_SUPPORT', self.content_type_supported)
            self._set_supported_content_type(settings_content_types)

            lang_settings = sender.settings.get(
                'READTIME_WPM', self.lang_settings)
            self._set_lang_settings(lang_settings)
        except Exception as e:
            raise Exception("ReadTime Plugin: %s" % str(e))
1096240
@Override
    protected void initializeImpl()
    {
        //get values
        this.host=this.factoryConfigurationHolder.getConfigurationValue(FaxClientSpiConfigurationConstants.HOST_PROPERTY_KEY);
        if(this.host==null)
        {
            throw new FaxException("Host name not defined in fax4j.properties. Property: "+FaxClientSpiConfigurationConstants.HOST_PROPERTY_KEY);
        }
        String valueStr=this.factoryConfigurationHolder.getConfigurationValue(FaxClientSpiConfigurationConstants.PORT_PROPERTY_KEY);
        if(valueStr==null)
        {
            this.port=HylaFaxClientSpi.DEFAULT_PORT_PROPERTY_VALUE;
        }
        else
        {
            this.port=Integer.parseInt(valueStr);
        }
        this.userName=this.factoryConfigurationHolder.getConfigurationValue(FaxClientSpiConfigurationConstants.USER_NAME_PROPERTY_KEY);
        if(this.userName==null)
        {
            throw new FaxException("User name not defined in fax4j.properties. Property: "+FaxClientSpiConfigurationConstants.USER_NAME_PROPERTY_KEY);
        }
        this.password=this.factoryConfigurationHolder.getConfigurationValue(FaxClientSpiConfigurationConstants.PASSWORD_PROPERTY_KEY);
        this.enableAdminOperations=Boolean.parseBoolean(this.factoryConfigurationHolder.getConfigurationValue(FaxClientSpiConfigurationConstants.ENABLE_ADMIN_OPERATIONS_PROPERTY_KEY));
        valueStr=this.factoryConfigurationHolder.getConfigurationValue(FaxClientSpiConfigurationConstants.MODE_PROPERTY_KEY);
        if(valueStr==null)
        {
            throw new FaxException("Mode not defined in fax4j.properties. Property: "+FaxClientSpiConfigurationConstants.MODE_PROPERTY_KEY);
        }
        this.mode=valueStr.charAt(0);
        valueStr=this.factoryConfigurationHolder.getConfigurationValue(FaxClientSpiConfigurationConstants.TYPE_PROPERTY_KEY);
        if(valueStr==null)
        {
            throw new FaxException("Type not defined in fax4j.properties. Property: "+FaxClientSpiConfigurationConstants.TYPE_PROPERTY_KEY);
        }
        this.type=valueStr.charAt(0);
    }
217530
private void setupParse ()
  {
    XMLReader p = getParent();
    if (p == null) {
      throw new NullPointerException(XSLMessages.createMessage(XSLTErrorResources.ER_NO_PARENT_FOR_FILTER, null)); //"No parent for filter");
    }
    
    ContentHandler ch = m_transformer.getInputContentHandler();
//    if(ch instanceof SourceTreeHandler)
//      ((SourceTreeHandler)ch).setUseMultiThreading(true);
    p.setContentHandler(ch);
    p.setEntityResolver(this);
    p.setDTDHandler(this);
    p.setErrorHandler(this);
  }
962839
@Override
	public void initialize() {
		/*
		 * Two resource providers are defined. Each one handles a specific
		 * type of resource.
		 */
		List<IResourceProvider> providers = new ArrayList<>();
		providers.add(new PatientResourceProvider());
		providers.add(new OrganizationResourceProvider());
		setResourceProviders(providers);
		
		/*
		 * Use a narrative generator. This is a completely optional step, 
		 * but can be useful as it causes HAPI to generate narratives for
		 * resources which don't otherwise have one.
		 */
		INarrativeGenerator narrativeGen = new DefaultThymeleafNarrativeGenerator();
		getFhirContext().setNarrativeGenerator(narrativeGen);

		/*
		 * Enable CORS
		 */
		CorsConfiguration config = new CorsConfiguration();
		CorsInterceptor corsInterceptor = new CorsInterceptor(config);
		config.addAllowedHeader("Accept");
		config.addAllowedHeader("Content-Type");
		config.addAllowedOrigin("*");
		config.addExposedHeader("Location");
		config.addExposedHeader("Content-Location");
		config.setAllowedMethods(Arrays.asList("GET","POST","PUT","DELETE","OPTIONS"));
		registerInterceptor(corsInterceptor);

		/*
		 * This server interceptor causes the server to return nicely
		 * formatter and coloured responses instead of plain JSON/XML if
		 * the request is coming from a browser window. It is optional,
		 * but can be nice for testing.
		 */
		registerInterceptor(new ResponseHighlighterInterceptor());
		
		/*
		 * Tells the server to return pretty-printed responses by default
		 */
		setDefaultPrettyPrint(true);
		
	}
1233711
def initialize(self, name=None, dbname=None, base=None, generator=None,
                   case=None, namespaces=None):

        self.name = none_or(name, str)
        

        self.dbname = none_or(dbname, str)
        """
        The dbname of the site. : str | `None`
        """

        self.base = none_or(base, str)
        """
        TODO: ??? : str | `None`
        """

        self.generator = none_or(generator, str)
        """
        TODO: ??? : str | `None`
        """

        self.case = none_or(case, str)
        """
        TODO: ??? : str | `None`
        """

        self.namespaces = none_or(namespaces, list)
        """
        A list of :class:`mwtypes.Namespace` | `None`
        """
247891
private function initDefaultAnnotationReader()
    {
        if (null !== self::$defaultAnnotationReader) {
            return;
        }

        $docParser = new DocParser();
        $docParser->setImports([
            'Bits' => 'KonstantinKuklin\\DoctrineCompressedFields\\Annotation',
        ]);
        $docParser->setIgnoreNotImportedAnnotations(true);

        $reader = new AnnotationReader($docParser);

        AnnotationRegistry::registerFile(__DIR__ . '/../Annotation/Hub.php');
        AnnotationRegistry::registerFile(__DIR__ . '/../Annotation/Mask.php');
        $reader = new CachedReader($reader, new VoidCache());

        self::$defaultAnnotationReader = $reader;
    }
1106456
private void initInputFormat() {
		ClassLoader userCodeClassLoader = getUserCodeClassLoader();
		// obtain task configuration (including stub parameters)
		Configuration taskConf = getTaskConfiguration();
		this.config = new TaskConfig(taskConf);

		try {
			this.format = config.<InputFormat<OT, InputSplit>>getStubWrapper(userCodeClassLoader)
					.getUserCodeObject(InputFormat.class, userCodeClassLoader);

			// check if the class is a subclass, if the check is required
			if (!InputFormat.class.isAssignableFrom(this.format.getClass())) {
				throw new RuntimeException("The class '" + this.format.getClass().getName() + "' is not a subclass of '" +
						InputFormat.class.getName() + "' as is required.");
			}
		}
		catch (ClassCastException ccex) {
			throw new RuntimeException("The stub class is not a proper subclass of " + InputFormat.class.getName(),
					ccex);
		}

		Thread thread = Thread.currentThread();
		ClassLoader original = thread.getContextClassLoader();
		// configure the stub. catch exceptions here extra, to report them as originating from the user code
		try {
			thread.setContextClassLoader(userCodeClassLoader);
			this.format.configure(this.config.getStubParameters());
		}
		catch (Throwable t) {
			throw new RuntimeException("The user defined 'configure()' method caused an error: " + t.getMessage(), t);
		}
		finally {
			thread.setContextClassLoader(original);
		}

		// get the factory for the type serializer
		this.serializerFactory = this.config.getOutputSerializer(userCodeClassLoader);
	}
1184892
private void setupParse ()
    {
    if (parent == null) {
        throw new NullPointerException("No parent for filter");
    }
    parent.setEntityResolver(this);
    parent.setDTDHandler(this);
    parent.setContentHandler(this);
    parent.setErrorHandler(this);
    }
755571
private void setupParser ()
    {
    // catch an illegal "nonsense" state.
    if (!prefixes && !namespaces)
        throw new IllegalStateException ();

    nsSupport.reset();
    if (uris)
        nsSupport.setNamespaceDeclUris (true);

    if (entityResolver != null) {
        parser.setEntityResolver(entityResolver);
    }
    if (dtdHandler != null) {
        parser.setDTDHandler(dtdHandler);
    }
    if (errorHandler != null) {
        parser.setErrorHandler(errorHandler);
    }
    parser.setDocumentHandler(this);
    locator = null;
    }
851012
public function init(){
		// set the htmleditor "content_css" based on the active site
		$htmlEditorConfig = HtmlEditorConfig::get_active();
		$site = Multisites::inst()->getActiveSite();
		if($site && $theme = $site->getSiteTheme()){

			$editorCSS = Config::inst()->get(CMSMain::class, 'multisites_editor_css_dir');
			if (isset($editorCSS[$theme])) {
				$cssFile = THEMES_DIR . "/$theme/" . $editorCSS[$theme] . "/editor.css";
			} else {
				$cssFile = THEMES_DIR . "/$theme/css/editor.css";
			}
			
			if(file_exists(BASE_PATH . '/' . $cssFile)){
				// NOTE: This ensures editor.css is invalided properly when it's updated.
				$cssFile = $cssFile.'?m='.filemtime(BASE_PATH.'/'.$cssFile);
				
				$htmlEditorConfig->setOption('content_css', $cssFile);
				
				if($this->owner->getRequest()->isAjax() && $this->owner instanceof CMSPageEditController){
					// Add editor css path to header so javascript can update ssTinyMceConfig.content_css
					$this->owner->getResponse()->addHeader('X-HTMLEditor_content_css', $cssFile);	
				}
				
			}	
		}
	}
740131
def _init_metadata(self):
        """"""
        ItemTextsFormRecord._init_metadata(self)
        ItemFilesFormRecord._init_metadata(self)
        edXBaseFormRecord._init_metadata(self)
        IRTItemFormRecord._init_metadata(self)
        TimeValueFormRecord._init_metadata(self)
        ProvenanceFormRecord._init_metadata(self)
        super(edXItemFormRecord, self)._init_metadata()
610718
public void setReadTimeout(int readTimeout) {
		this.client = this.client.newBuilder()
				.readTimeout(readTimeout, TimeUnit.MILLISECONDS)
				.build();
	}
1349558
void initialize() {
        // Cancel any running tasks
        Timer oldTimer = timer;
        timer = new Timer(true);
        if (Objects.nonNull(oldTimer)) {
            oldTimer.cancel();
        }
        // (re)initialize
        LoaderConfigurator configurator = new LoaderConfigurator(this);
        defaultLoaderServiceFacade = new DefaultLoaderServiceFacade(timer, listener, resources);
        configurator.load();
    }
240688
private void initialize() {
        frmSsTraceParser = new JFrame();
        frmSsTraceParser.setTitle("SS7 Trace Parser");
        frmSsTraceParser.setResizable(false);
        frmSsTraceParser.setBounds(100, 100, 569, 716);
        frmSsTraceParser.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JPanel panel = new JPanel();
        frmSsTraceParser.getContentPane().add(panel, BorderLayout.SOUTH);

        btnStart = new JButton("Start");
        btnStart.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                if (tfFilePath.getText() == null || tfFilePath.getText().equals("")) {
                    JOptionPane.showMessageDialog(null, "The FilePath must be set");
                    return;
                }

                // saving parameters
                Ss7ParseParameters newPar = new Ss7ParseParameters();

                if (rdbtnTpActerna.isSelected())
                    newPar.setFileTypeN(ParseDriverType.Acterna);
                if (rdbtnTpSimpleSeq.isSelected())
                    newPar.setFileTypeN(ParseDriverType.SimpleSeq);
                if (rdbtnTpPcap.isSelected())
                    newPar.setFileTypeN(ParseDriverType.Pcap);
                if (rdbtnHexStream.isSelected())
                    newPar.setFileTypeN(ParseDriverType.HexStream);

                if (rdbtnMap.isSelected())
                    newPar.setParseProtocol(ParseProtocol.Map);
                if (rdbtnCap.isSelected())
                    newPar.setParseProtocol(ParseProtocol.Cap);
                if (rdbtnIsup.isSelected())
                    newPar.setParseProtocol(ParseProtocol.Isup);

                if (rdbtnITU.isSelected())
                    newPar.setSccpProtocolVersion(SccpProtocolVersion.ITU);
                if (rdbtnANSI.isSelected())
                    newPar.setSccpProtocolVersion(SccpProtocolVersion.ANSI);

                newPar.setSourceFilePath(tfFilePath.getText());

                if (cbApplicationContextFilter.isSelected()) {
                    try {
                        newPar.setApplicationContextFilter(Integer.parseInt(tfApplicationContextFilter.getText()));
                    } catch (NumberFormatException ee) {
                        JOptionPane
                                .showMessageDialog(null,
                                        "Can not parse ApplicationContextFilter the value. \nIt should be an Integer.\nParsing without ApplicationContextFilter");
                    }
                }
                if (cbDialogIdFilter.isSelected()) {
                    try {
                        if (!tfDialogIdFilter.getText().equals(""))
                            newPar.setDialogIdFilter(Long.parseLong(tfDialogIdFilter.getText()));
                    } catch (NumberFormatException ee) {
                        JOptionPane
                                .showMessageDialog(null,
                                        "Can not parse ApplicationContextFilter the value. \nIt should be an Integer.\nParsing without ApplicationContextFilter");
                    }
                    try {
                        if (!tfDialogIdFilter2.getText().equals(""))
                            newPar.setDialogIdFilter2(Long.parseLong(tfDialogIdFilter2.getText()));
                    } catch (NumberFormatException ee) {
                        JOptionPane
                                .showMessageDialog(null,
                                        "Can not parse ApplicationContextFilter2 the value. \nIt should be an Integer.\nParsing without ApplicationContextFilter2");
                    }
                }
                if (cbOpcDpcFilter.isSelected()) {
                    try {
                        String[] ss = tfOpcDpcFilter.getText().split(",");
                        int ii1 = ss.length;
                        Integer[] ires = new Integer[ii1];
                        for (int i1 = 0; i1 < ii1; i1++) {
                            String s = ss[i1];
                            s = s.trim();
                            ires[i1] = Integer.parseInt(s);
                        }
                        newPar.setOpcDpcFilter(ires);
                    } catch (NumberFormatException ee) {
                        JOptionPane.showMessageDialog(null,
                                "Can not parse OpcDpcFilter the value. \nIt should be a set of Integers.\nParsing without OpcDpcFilter");
                    }
                }
                if (cbMsgLog.isSelected()) {
                    newPar.setMsgLogFilePath(tfMsgLog.getText());
                }
                if (cbTcapData.isSelected()) {
                    newPar.setTcapMsgData(true);
                }
                if (cbDialogDet.isSelected()) {
                    newPar.setDetailedDialog(true);
                }
                if (cbCompDet.isSelected()) {
                    newPar.setDetailedComponents(true);
                }
                if (cbRecordingDialogMessageChain.isSelected()) {
                    newPar.setMessageChainFilePath(tfRecordingDialogMessageChain.getText());
                }

                try {
                    BufferedOutputStream bis = new BufferedOutputStream(new FileOutputStream(persistFile));
                    XMLEncoder d = new XMLEncoder(bis);
                    d.writeObject(newPar);
                    d.close();
                } catch (Exception ee) {
                    ee.printStackTrace();
                    JOptionPane.showMessageDialog(null,
                            "Failed when saving the parameter file Ss7ParseParameters.xml: " + ee.getMessage());
                }

                btnStart.setEnabled(false);
                btnGetStatisticInfo.setEnabled(false);
                btnStop.setEnabled(true);

                // starting parsing
                task = new SS7TraceParser(persistDir, newPar);
                task.parse();
            }
        });
        panel.add(btnStart);

        btnStop = new JButton("Stop");
        btnStop.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (task != null)
                    task.interrupt();
            }
        });
        btnStop.setEnabled(false);
        panel.add(btnStop);

        btnGetStatisticInfo = new JButton("Get statistic info");
        btnGetStatisticInfo.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                getStatisticInfo();
            }
        });
        panel.add(btnGetStatisticInfo);

        JPanel panel_1 = new JPanel();
        frmSsTraceParser.getContentPane().add(panel_1, BorderLayout.CENTER);
        panel_1.setLayout(null);

        JPanel panel_2 = new JPanel();
        panel_2.setBorder(new LineBorder(new Color(0, 0, 0)));
        panel_2.setBounds(10, 11, 543, 58);
        panel_1.add(panel_2);
        panel_2.setLayout(null);

        rdbtnTpActerna = new JRadioButton("Acterna");
        rdbtnTpActerna.setSelected(true);
        buttonGroup.add(rdbtnTpActerna);
        rdbtnTpActerna.setBounds(6, 28, 109, 23);
        panel_2.add(rdbtnTpActerna);

        JLabel lblSelectAFile = new JLabel("Trace file type");
        lblSelectAFile.setBounds(15, 11, 154, 14);
        panel_2.add(lblSelectAFile);

        rdbtnTpSimpleSeq = new JRadioButton("Simple sequence");
        buttonGroup.add(rdbtnTpSimpleSeq);
        rdbtnTpSimpleSeq.setBounds(137, 28, 126, 23);
        panel_2.add(rdbtnTpSimpleSeq);

        rdbtnTpPcap = new JRadioButton("Pcap");
        buttonGroup.add(rdbtnTpPcap);
        rdbtnTpPcap.setBounds(275, 28, 101, 23);
        panel_2.add(rdbtnTpPcap);

        rdbtnHexStream = new JRadioButton("Hex stream");
        buttonGroup.add(rdbtnHexStream);
        rdbtnHexStream.setBounds(380, 27, 127, 25);
        panel_2.add(rdbtnHexStream);

        tfFilePath = new JTextField();
        tfFilePath.setBounds(20, 187, 481, 20);
        panel_1.add(tfFilePath);
        tfFilePath.setColumns(10);

        JButton btnFilePath = new JButton(". . .");
        btnFilePath.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JFileChooser chooser = new JFileChooser();
                String filterName = null;
                if (rdbtnTpActerna.isSelected())
                    filterName = "Acterna";
                if (rdbtnTpSimpleSeq.isSelected())
                    filterName = "Simple";
                if (rdbtnTpPcap.isSelected())
                    filterName = "Pcap";
                if (rdbtnHexStream.isSelected())
                    filterName = "HexStream";
                TraceFileFilter filter = new TraceFileFilter(filterName);
                chooser.setFileFilter(filter);
                chooser.addChoosableFileFilter(filter);
                File f = new File(tfFilePath.getText());
                chooser.setSelectedFile(f);
                chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);

                int returnVal = chooser.showOpenDialog(frmSsTraceParser);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    File f2 = chooser.getSelectedFile();
                    if (f2 != null && f2.exists())
                        tfFilePath.setText(f2.getPath());
                    else
                        JOptionPane.showMessageDialog(null, "File does not exists - try again");
                }
            }
        });
        btnFilePath.setBounds(511, 186, 52, 23);
        panel_1.add(btnFilePath);

        JLabel lblPathToThe = new JLabel("Trace file path");
        lblPathToThe.setBounds(20, 172, 153, 14);
        panel_1.add(lblPathToThe);

        this.cbApplicationContextFilter = new JCheckBox("ApplicationContext filter");
        cbApplicationContextFilter.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                tfApplicationContextFilter.setEnabled(cbApplicationContextFilter.isSelected());
            }
        });
        cbApplicationContextFilter.setBounds(20, 216, 210, 23);
        panel_1.add(cbApplicationContextFilter);

        cbMsgLog = new JCheckBox("Messages logging");
        cbMsgLog.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                btnMsgLog.setEnabled(cbMsgLog.isSelected());
                tfMsgLog.setEnabled(cbMsgLog.isSelected());
                cbTcapData.setEnabled(cbMsgLog.isSelected());
                cbDialogDet.setEnabled(cbMsgLog.isSelected());
                cbCompDet.setEnabled(cbMsgLog.isSelected());
            }
        });
        cbMsgLog.setBounds(20, 308, 210, 23);
        panel_1.add(cbMsgLog);

        tfApplicationContextFilter = new JTextField();
        tfApplicationContextFilter.setEnabled(false);
        tfApplicationContextFilter.setBounds(236, 217, 153, 20);
        panel_1.add(tfApplicationContextFilter);
        tfApplicationContextFilter.setColumns(10);

        cbDialogIdFilter = new JCheckBox("DialogId filter");
        cbDialogIdFilter.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                tfDialogIdFilter.setEnabled(cbDialogIdFilter.isSelected());
                tfDialogIdFilter2.setEnabled(cbDialogIdFilter.isSelected());
            }
        });
        cbDialogIdFilter.setBounds(20, 247, 210, 23);
        panel_1.add(cbDialogIdFilter);

        tfDialogIdFilter = new JTextField();
        tfDialogIdFilter.setEnabled(false);
        tfDialogIdFilter.setColumns(10);
        tfDialogIdFilter.setBounds(236, 248, 153, 20);
        panel_1.add(tfDialogIdFilter);

        pnMsgLog = new JPanel();
        pnMsgLog.setBorder(new LineBorder(new Color(0, 0, 0)));
        pnMsgLog.setBounds(10, 338, 553, 136);
        panel_1.add(pnMsgLog);
        pnMsgLog.setLayout(null);

        tfMsgLog = new JTextField();
        tfMsgLog.setBounds(10, 27, 433, 20);
        pnMsgLog.add(tfMsgLog);
        tfMsgLog.setEnabled(false);
        tfMsgLog.setColumns(10);

        JLabel lblMessageLogFile = new JLabel("Message log file path");
        lblMessageLogFile.setBounds(10, 11, 153, 14);
        pnMsgLog.add(lblMessageLogFile);

        timer = new javax.swing.Timer(100, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (task != null) {
                    if (curMsgCount != task.getMsgCount()) {
                        curMsgCount = task.getMsgCount();
                        String s1 = ((Integer) curMsgCount).toString();
                        tfMsgCnt.setText(s1);
                    }

                    if (task.isFinished()) {
                        String errorMsg = task.getErrorMessage();
                        btnStart.setEnabled(true);
                        btnGetStatisticInfo.setEnabled(true);
                        btnStop.setEnabled(false);
                        parseData = task.getStatisticData();
                        task = null;

                        if (errorMsg != null)
                            JOptionPane.showMessageDialog(null, "Error: " + errorMsg);
                        else
                            JOptionPane.showMessageDialog(null, "Success");
                    }
                }
            }
        });
        timer.start();

        btnMsgLog = new JButton(". . .");
        btnMsgLog.setEnabled(false);
        btnMsgLog.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JFileChooser chooser = new JFileChooser();
                File f = new File(tfMsgLog.getText());
                chooser.setSelectedFile(f);
                chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);

                int returnVal = chooser.showOpenDialog(frmSsTraceParser);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    File f2 = chooser.getSelectedFile();
                    tfMsgLog.setText(f2.getPath());
                }
            }
        });
        btnMsgLog.setBounds(453, 26, 52, 23);
        pnMsgLog.add(btnMsgLog);

        cbTcapData = new JCheckBox("Store in the log TCAP message source data");
//        cbTcapData.addItemListener(new ItemListener() {
//            public void itemStateChanged(ItemEvent e) {
//                cbDialogDet.setEnabled(cbTcapData.isSelected());
//                cbCompDet.setEnabled(cbTcapData.isSelected());
//            }
//        });
        cbTcapData.setBounds(10, 50, 296, 23);
        pnMsgLog.add(cbTcapData);

        cbDialogDet = new JCheckBox("Write dialog portion details");
        cbDialogDet.setBounds(10, 76, 296, 23);
        pnMsgLog.add(cbDialogDet);

        cbCompDet = new JCheckBox("Write components portion details");
        cbCompDet.setBounds(10, 102, 296, 23);
        pnMsgLog.add(cbCompDet);

        lblMessagesPerformed = new JLabel("Messages performed");
        lblMessagesPerformed.setBounds(10, 592, 140, 14);
        panel_1.add(lblMessagesPerformed);

        tfMsgCnt = new JTextField();
        tfMsgCnt.setEditable(false);
        tfMsgCnt.setBounds(160, 589, 86, 20);
        panel_1.add(tfMsgCnt);
        tfMsgCnt.setColumns(10);

        tfDialogIdFilter2 = new JTextField();
        tfDialogIdFilter2.setEnabled(false);
        tfDialogIdFilter2.setColumns(10);
        tfDialogIdFilter2.setBounds(399, 248, 153, 20);
        panel_1.add(tfDialogIdFilter2);

        panel_3 = new JPanel();
        panel_3.setBorder(new LineBorder(new Color(0, 0, 0)));
        panel_3.setLayout(null);
        panel_3.setBounds(10, 69, 543, 58);
        panel_1.add(panel_3);

        rdbtnMap = new JRadioButton("MAP");
        buttonGroup_1.add(rdbtnMap);
        rdbtnMap.setSelected(true);
        rdbtnMap.setBounds(6, 28, 109, 23);
        panel_3.add(rdbtnMap);

        lblProtocol = new JLabel("Protocol");
        lblProtocol.setBounds(15, 11, 154, 14);
        panel_3.add(lblProtocol);

        rdbtnCap = new JRadioButton("CAP");
        buttonGroup_1.add(rdbtnCap);
        rdbtnCap.setBounds(119, 28, 99, 23);
        panel_3.add(rdbtnCap);

        rdbtnIsup = new JRadioButton("ISUP");
        buttonGroup_1.add(rdbtnIsup);
        rdbtnIsup.setBounds(228, 28, 99, 23);
        panel_3.add(rdbtnIsup);

        cbOpcDpcFilter = new JCheckBox("Opc / Dpc filter (Ex: \"120,130\")");
        cbOpcDpcFilter.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent arg0) {
                tfOpcDpcFilter.setEnabled(cbOpcDpcFilter.isSelected());
            }
        });
        cbOpcDpcFilter.setBounds(20, 278, 210, 23);
        panel_1.add(cbOpcDpcFilter);

        tfOpcDpcFilter = new JTextField();
        tfOpcDpcFilter.setEnabled(false);
        tfOpcDpcFilter.setColumns(10);
        tfOpcDpcFilter.setBounds(236, 279, 317, 20);
        panel_1.add(tfOpcDpcFilter);

        cbRecordingDialogMessageChain = new JCheckBox("Recording of dialog message chains log");
        cbRecordingDialogMessageChain.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                tfRecordingDialogMessageChain.setEnabled(cbRecordingDialogMessageChain.isSelected());
                btnRecordingDialogMessageChain.setEnabled(cbRecordingDialogMessageChain.isSelected());
            }
        });
        cbRecordingDialogMessageChain.setBounds(20, 486, 338, 23);
        panel_1.add(cbRecordingDialogMessageChain);

        JPanel pnDialogMessageMessage = new JPanel();
        pnDialogMessageMessage.setBorder(new LineBorder(new Color(0, 0, 0)));
        pnDialogMessageMessage.setBounds(10, 516, 553, 65);
        panel_1.add(pnDialogMessageMessage);
        pnDialogMessageMessage.setLayout(null);

        JLabel lblDialogMessageMessage = new JLabel("Dialog message message chains log file path");
        lblDialogMessageMessage.setBounds(10, 11, 265, 14);
        pnDialogMessageMessage.add(lblDialogMessageMessage);

        tfRecordingDialogMessageChain = new JTextField();
        tfRecordingDialogMessageChain.setBounds(10, 27, 433, 20);
        pnDialogMessageMessage.add(tfRecordingDialogMessageChain);
        tfRecordingDialogMessageChain.setEnabled(false);
        tfRecordingDialogMessageChain.setColumns(10);

        btnRecordingDialogMessageChain = new JButton(". . .");
        btnRecordingDialogMessageChain.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                JFileChooser chooser = new JFileChooser();
                File f = new File(tfRecordingDialogMessageChain.getText());
                chooser.setSelectedFile(f);
                chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);

                int returnVal = chooser.showOpenDialog(frmSsTraceParser);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    File f2 = chooser.getSelectedFile();
                    tfRecordingDialogMessageChain.setText(f2.getPath());
                }
            }
        });
        btnRecordingDialogMessageChain.setBounds(453, 26, 52, 23);
        pnDialogMessageMessage.add(btnRecordingDialogMessageChain);
        btnRecordingDialogMessageChain.setEnabled(false);

        JPanel panel_4 = new JPanel();
        panel_4.setLayout(null);
        panel_4.setBorder(new LineBorder(new Color(0, 0, 0)));
        panel_4.setBounds(10, 128, 543, 37);
        panel_1.add(panel_4);

        rdbtnITU = new JRadioButton("ITU-T");
        buttonGroup_2.add(rdbtnITU);
        rdbtnITU.setSelected(true);
        rdbtnITU.setBounds(200, 7, 109, 23);
        panel_4.add(rdbtnITU);

        JLabel lblProtocolMua = new JLabel("Protocol M3ua / SCCP");
        lblProtocolMua.setBounds(15, 11, 154, 14);
        panel_4.add(lblProtocolMua);

        rdbtnANSI = new JRadioButton("ANSI");
        buttonGroup_2.add(rdbtnANSI);
        rdbtnANSI.setBounds(313, 7, 99, 23);
        panel_4.add(rdbtnANSI);
    }
621857
protected void initialize() {
	if (host == null && path == null) {
		try {
			URL url = new URL(fileURL);
			host = url.getHost();
			path = url.getPath();
		} catch (MalformedURLException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
	}
	if (host == null || host.trim().equals("")) {
		host = DEFAULT_HOST;
	}
	if (path == null || path.trim().equals("")) {
		path = fileURL;
	}

    currentMap = new HashMap();
    additionalLines = new ArrayList();
    matchingKeywords = new ArrayList();

    if (timestampFormat != null) {
      dateFormat = new SimpleDateFormat(quoteTimeStampChars(timestampFormat));
      timestampPatternText = convertTimestamp();
    }
    //if custom level definitions exist, parse them
    updateCustomLevelDefinitionMap();
    try {
      if (filterExpression != null) {
        expressionRule = ExpressionRule.getRule(filterExpression);
      }
    } catch (Exception e) {
      getLogger().warn("Invalid filter expression: " + filterExpression, e);
    }

    List buildingKeywords = new ArrayList();

    String newPattern = logFormat;

    int index = 0;
    String current = newPattern;
    //build a list of property names and temporarily replace the property with an empty string,
    //we'll rebuild the pattern later
    List propertyNames = new ArrayList();
    while (index > -1) {
        if (current.indexOf(PROP_START) > -1 && current.indexOf(PROP_END) > -1) {
            index = current.indexOf(PROP_START);
            String longPropertyName = current.substring(current.indexOf(PROP_START), current.indexOf(PROP_END) + 1);
            String shortProp = getShortPropertyName(longPropertyName);
            buildingKeywords.add(shortProp);
            propertyNames.add(longPropertyName);
            current = current.substring(longPropertyName.length() + 1 + index);
            newPattern = singleReplace(newPattern, longPropertyName, new Integer(buildingKeywords.size() -1).toString());
        } else {
            //no properties
            index = -1;
        }
    }

    /*
     * we're using a treemap, so the index will be used as the key to ensure
     * keywords are ordered correctly
     *
     * examine pattern, adding keywords to an index-based map patterns can
     * contain only one of these per entry...properties are the only 'keyword'
     * that can occur multiple times in an entry
     */
    Iterator iter = keywords.iterator();
    while (iter.hasNext()) {
      String keyword = (String) iter.next();
      int index2 = newPattern.indexOf(keyword);
      if (index2 > -1) {
        buildingKeywords.add(keyword);
        newPattern = singleReplace(newPattern, keyword, new Integer(buildingKeywords.size() -1).toString());
      }
    }

    String buildingInt = "";

    for (int i=0;i<newPattern.length();i++) {
        String thisValue = String.valueOf(newPattern.substring(i, i+1));
        if (isInteger(thisValue)) {
            buildingInt = buildingInt + thisValue;
        } else {
            if (isInteger(buildingInt)) {
                matchingKeywords.add(buildingKeywords.get(Integer.parseInt(buildingInt)));
            }
            //reset
            buildingInt = "";
        }
    }

    //if the very last value is an int, make sure to add it
    if (isInteger(buildingInt)) {
        matchingKeywords.add(buildingKeywords.get(Integer.parseInt(buildingInt)));
    }

    newPattern = replaceMetaChars(newPattern);

    //compress one or more spaces in the pattern into the [ ]+ regexp
    //(supports padding of level in log files)
    newPattern = newPattern.replaceAll(MULTIPLE_SPACES_REGEXP, MULTIPLE_SPACES_REGEXP);
    newPattern = newPattern.replaceAll(Pattern.quote(PATTERN_WILDCARD), REGEXP_DEFAULT_WILDCARD);
    //use buildingKeywords here to ensure correct order
    for (int i = 0;i<buildingKeywords.size();i++) {
      String keyword = (String) buildingKeywords.get(i);
      //make the final keyword greedy (we're assuming it's the message)
      if (i == (buildingKeywords.size() - 1)) {
        newPattern = singleReplace(newPattern, String.valueOf(i), GREEDY_GROUP);
      } else if (TIMESTAMP.equals(keyword)) {
        newPattern = singleReplace(newPattern, String.valueOf(i), "(" + timestampPatternText + ")");
      } else if (LOGGER.equals(keyword) || LEVEL.equals(keyword)) {
        newPattern = singleReplace(newPattern, String.valueOf(i), NOSPACE_GROUP);
      } else {
        newPattern = singleReplace(newPattern, String.valueOf(i), DEFAULT_GROUP);
      }
    }

    regexp = newPattern;
    getLogger().debug("regexp is " + regexp);
  }
1137148
@Override
	public void init() {

		RepositoryConfigurationExtension extension = new SolrRepositoryConfigExtension();
		RepositoryBeanDefinitionParser parser = new RepositoryBeanDefinitionParser(extension);

		registerBeanDefinitionParser("repositories", parser);
		registerBeanDefinitionParser("embedded-solr-server", new EmbeddedSolrServerBeanDefinitionParser());
		registerBeanDefinitionParser("solr-client", new HttpSolrClientBeanDefinitionParser());
	}
155526
public void init(Configuration configuration) throws Exception {
        if (configuration.getBootstrapPropertyResolver().getProperty(CONTEXT_TIMEOUT_NAME) != null) {
            log.debug("Configuring context timeout with value ", configuration.getBootstrapPropertyResolver().getProperty(CONTEXT_TIMEOUT_NAME));
            try {
                contextTimeout = Long.parseLong(configuration.getBootstrapPropertyResolver().getProperty(CONTEXT_TIMEOUT_NAME));
            } catch (NumberFormatException e) {
                log.warn("Init parameter ", CONTEXT_TIMEOUT_NAME, " is not a parsable long, timeout will be ", " instead");
                contextTimeout = DEFAULT_CONTEXT_TIMEOUT;
            }
        }
    }