<commit_before>/*
 * Created on 9. jan.. 2007
 *
 * Copyright (c) 2005, <NAME> <<EMAIL> strategoxt.org>
 * 
 * Licensed under the GNU General Public License, v2
 */
package org.spoofax.interpreter.library.ssl;

import org.spoofax.interpreter.core.IContext;
import org.spoofax.interpreter.core.InterpreterException;
import org.spoofax.interpreter.library.AbstractPrimitive;
import org.spoofax.interpreter.stratego.Strategy;
import org.spoofax.interpreter.terms.IStrategoAppl;
import org.spoofax.interpreter.terms.IStrategoPlaceholder;
import org.spoofax.interpreter.terms.IStrategoTerm;
import org.spoofax.interpreter.terms.IStrategoTuple;

public class SSL_get_arguments extends AbstractPrimitive {

    public SSL_get_arguments() {
        super("SSL_get_arguments", 0, 1);
    }
    
    @Override
    public boolean call(IContext env, Strategy[] svars, IStrategoTerm[] tvars)
            throws InterpreterException {
        switch(tvars[0].getTermType()) {
        case IStrategoTerm.APPL:
            IStrategoAppl a = (IStrategoAppl) tvars[0];
            env.setCurrent(env.getFactory().makeList(a.getAllSubterms()));
            return true;
        case IStrategoTerm.INT:
        case IStrategoTerm.STRING:
        case IStrategoTerm.REAL:
            env.setCurrent(env.getFactory().makeList());
            return true;
        case IStrategoTerm.LIST:
            env.setCurrent(tvars[0]);
            return true;
        case IStrategoTerm.TUPLE:
            IStrategoTuple tuple = (IStrategoTuple) tvars[0];
            env.setCurrent(env.getFactory().makeList(tuple.getAllSubterms()));
            return true;
        case IStrategoTerm.PLACEHOLDER:
            IStrategoPlaceholder placeholder = (IStrategoPlaceholder) tvars[0];
            env.setCurrent(placeholder.getTemplate());
            return true;
        default:
            throw new IllegalStateException("SSL_get_arguments failed for " + tvars[0]);
        }
    }

}
<commit_msg><make-placeholder>1 ; get-arguments shoudl result in [1] in stead of 1<commit_after>/*
 * Created on 9. jan.. 2007
 *
 * Copyright (c) 2005, <NAME> <karltk near strategoxt.org>
 * 
 * Licensed under the GNU General Public License, v2
 */
package org.spoofax.interpreter.library.ssl;

import org.spoofax.interpreter.core.IContext;
import org.spoofax.interpreter.core.InterpreterException;
import org.spoofax.interpreter.library.AbstractPrimitive;
import org.spoofax.interpreter.stratego.Strategy;
import org.spoofax.interpreter.terms.IStrategoAppl;
import org.spoofax.interpreter.terms.IStrategoPlaceholder;
import org.spoofax.interpreter.terms.IStrategoTerm;
import org.spoofax.interpreter.terms.IStrategoTuple;

public class SSL_get_arguments extends AbstractPrimitive {

    public SSL_get_arguments() {
        super("SSL_get_arguments", 0, 1);
    }
    
    @Override
    public boolean call(IContext env, Strategy[] svars, IStrategoTerm[] tvars)
            throws InterpreterException {
        switch(tvars[0].getTermType()) {
        case IStrategoTerm.APPL:
            IStrategoAppl a = (IStrategoAppl) tvars[0];
            env.setCurrent(env.getFactory().makeList(a.getAllSubterms()));
            return true;
        case IStrategoTerm.INT:
        case IStrategoTerm.STRING:
        case IStrategoTerm.REAL:
            env.setCurrent(env.getFactory().makeList());
            return true;
        case IStrategoTerm.LIST:
            env.setCurrent(tvars[0]);
            return true;
        case IStrategoTerm.TUPLE:
            IStrategoTuple tuple = (IStrategoTuple) tvars[0];
            env.setCurrent(env.getFactory().makeList(tuple.getAllSubterms()));
            return true;
        case IStrategoTerm.PLACEHOLDER:
            IStrategoPlaceholder placeholder = (IStrategoPlaceholder) tvars[0];
            env.setCurrent(env.getFactory().makeList(placeholder.getTemplate()));
            return true;
        default:
            throw new IllegalStateException("SSL_get_arguments failed for " + tvars[0]);
        }
    }

}

{'fraction_non_alphanumeric': 0.10174129353233831, 'fraction_numerical': 0.009701492537313432, 'mean_word_length': 2.997017892644135, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5941104', 'n_tokens_mistral': 1299, 'n_tokens_neox': 1263, 'n_words': 226}