<commit_before>(function ($) {
    $.expandingTextarea = $.extend({
        autoInitialize: true,
        initialSelector: "textarea.expanding"
    }, $.expandingTextarea || {});
    
    var cloneCSSProperties = [
        'lineHeight', 'textDecoration', 'letterSpacing',
        'fontSize', 'fontFamily', 'fontStyle', 
        'fontWeight', 'textTransform', 'textAlign', 
        'direction', 'wordSpacing', 'fontSizeAdjust', 
        'whiteSpace', 'wordWrap', 
        'borderLeftWidth', 'borderRightWidth',
        'borderTopWidth','borderBottomWidth',
        'paddingLeft', 'paddingRight',
        'paddingTop','paddingBottom',
        'marginLeft', 'marginRight',
        'marginTop','marginBottom',
        'boxSizing', 'webkitBoxSizing', 'mozBoxSizing', 'msBoxSizing'
    ];
    
    var textareaCSS = {
        position: "absolute",
        height: "100%",
        resize: "none"
    };
    
    var preCSS = {
        visibility: "hidden",
        border: "0 solid"
    };
    
    var containerCSS = {
        position: "relative"
    };
    
    function resize() {
        $(this).parent().find("div").text(this.value + ' ');
    }
    
    $.fn.expandingTextarea = function(o) {
        
        if (o === "resize") {
            return this.trigger("input.expanding");
        }
        
        if (o === "destroy") {
            this.filter(".expanding-init").removeClass('expanding-init').each(function() {
                var textarea = $(this);
                var container = textarea.closest('.expandingText');
                
                textarea
                    .insertBefore(container)
                    .css(textarea.data('originalCss') || {})
                    .attr('style', textarea.data('originalStyle') || '')
                    .removeData('originalCss originalStyle');
                
                container.remove();
            });
            
            return this;
        }<commit_msg>use same method to get parent<commit_after>(function ($) {
    $.expandingTextarea = $.extend({
        autoInitialize: true,
        initialSelector: "textarea.expanding"
    }, $.expandingTextarea || {});
    
    var cloneCSSProperties = [
        'lineHeight', 'textDecoration', 'letterSpacing',
        'fontSize', 'fontFamily', 'fontStyle', 
        'fontWeight', 'textTransform', 'textAlign', 
        'direction', 'wordSpacing', 'fontSizeAdjust', 
        'whiteSpace', 'wordWrap', 
        'borderLeftWidth', 'borderRightWidth',
        'borderTopWidth','borderBottomWidth',
        'paddingLeft', 'paddingRight',
        'paddingTop','paddingBottom',
        'marginLeft', 'marginRight',
        'marginTop','marginBottom',
        'boxSizing', 'webkitBoxSizing', 'mozBoxSizing', 'msBoxSizing'
    ];
    
    var textareaCSS = {
        position: "absolute",
        height: "100%",
        resize: "none"
    };
    
    var preCSS = {
        visibility: "hidden",
        border: "0 solid"
    };
    
    var containerCSS = {
        position: "relative"
    };
    
    function resize() {
        $(this).closest('.expandingText').find("div").text(this.value + ' ');
    }
    
    $.fn.expandingTextarea = function(o) {
        
        if (o === "resize") {
            return this.trigger("input.expanding");
        }
        
        if (o === "destroy") {
            this.filter(".expanding-init").removeClass('expanding-init').each(function() {
                var textarea = $(this);
                var container = textarea.closest('.expandingText');
                
                textarea
                    .insertBefore(container)
                    .css(textarea.data('originalCss') || {})
                    .attr('style', textarea.data('originalStyle') || '')
                    .removeData('originalCss originalStyle');
                
                container.remove();
            });
            
            return this;
        }
{'fraction_non_alphanumeric': 0.1476664116296863, 'fraction_numerical': 0.00204029584289722, 'mean_word_length': 1.8114695340501792, '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': '1243758', 'n_tokens_mistral': 1077, 'n_tokens_neox': 1041, 'n_words': 177}