<commit_before>﻿using System;
using IronRuby.Builtins;
using System.Collections.Generic;


namespace rho.common
{
    public class RhoParams
    {
        protected Object m_pParams;

        public RhoParams(Object p)
        {
            m_pParams = p;
        }

        public RhoParams(RhoParams copy)
        {
            m_pParams = copy.m_pParams;
        }

        protected Object findHashParam(String name)
        {
    	    if ( !(m_pParams is Hash) ) 
    		    return null;

            return ((Hash)m_pParams)[name];
         }

        public String getString(String szName)
        {
            return getString(szName, "");
        }

        public String getString(String szName, String szDefValue)
        {
            Object value = findHashParam(szName);
            String strRes = value != null ? value.ToString() : "";
            if (strRes.length() == 0 && szDefValue != null && szDefValue.length() > 0)<commit_msg>fixed bug in findHashParam function<commit_after>﻿using System;
using IronRuby.Builtins;
using System.Collections.Generic;


namespace rho.common
{
    public class RhoParams
    {
        protected Object m_pParams;

        public RhoParams(Object p)
        {
            m_pParams = p;
        }

        public RhoParams(RhoParams copy)
        {
            m_pParams = copy.m_pParams;
        }

        protected Object findHashParam(String name)
        {
    	    if ( !(m_pParams is Hash) ) 
    		    return null;
            
            Object val = null;
            Hash values = (Hash)m_pParams;
            values.TryGetValue((object)MutableString.Create(name), out val);
            return (val != null) ? val : null;
         }

        public String getString(String szName)
        {
            return getString(szName, "");
        }

        public String getString(String szName, String szDefValue)
        {
            Object value = findHashParam(szName);
            String strRes = value != null ? value.ToString() : "";
            if (strRes.length() == 0 && szDefValue != null && szDefValue.length() > 0)
{'fraction_non_alphanumeric': 0.09386973180076628, 'fraction_numerical': 0.0019157088122605363, 'mean_word_length': 1.7927807486631016, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3620518', 'n_tokens_mistral': 607, 'n_tokens_neox': 577, 'n_words': 141}