<commit_before>package ch.hevs.aislab.magpie.event;

import ch.hevs.aislab.magpie.environment.Services;
import alice.tuprolog.Term;

public class LogicTupleEvent extends MagpieEvent {

	private String logicRepresentation;
	
	public LogicTupleEvent(Term t) {
		this.type = Services.LOGIC_TUPLE;
		this.logicRepresentation = t.toString();	
	}
	
	public LogicTupleEvent(String name, String[] args) {
		this.type = Services.LOGIC_TUPLE;
		
		String tuple = name + "(";
		
		for(int i=0; i<args.length; i++) {
			tuple = tuple + args[i] + ",";
		}
		
		// Remove the last comma and close the parenthesis
		tuple = tuple.substring(0, tuple.length() - 1);
		tuple = tuple + ")";
		
		this.logicRepresentation = tuple;
	}
	
	/**
	 * It gives the tuple representation of the event.
	 * 
	 * @return
	 */
	public String toTuple(){
		return this.logicRepresentation;
	}
}
<commit_msg>Changed array by multiple arguments in cstr, new cstr with string<commit_after>package ch.hevs.aislab.magpie.event;

import ch.hevs.aislab.magpie.environment.Services;
import alice.tuprolog.Term;

public class LogicTupleEvent extends MagpieEvent {

	private String logicRepresentation;
	
	public LogicTupleEvent(Term term) {
		this.type = Services.LOGIC_TUPLE;
		this.logicRepresentation = term.toString();
	}

    public LogicTupleEvent(String logicEvent) {
        this.type = Services.LOGIC_TUPLE;

        // This checks if the Term is correct
        Term term = Term.createTerm(logicEvent);
        this.logicRepresentation = term.toString();

    }

    /**
     * Creates a logic tuple with format: name(arg1,arg2,...,argN)
     * @param name
     * @param args
     */
	public LogicTupleEvent(String name, String ... args) {
		this.type = Services.LOGIC_TUPLE;
		
		String tuple = name + "(";
		
		for(int i=0; i<args.length; i++) {
			tuple = tuple + args[i] + ",";
		}
		
		// Remove the last comma and close the parenthesis
		tuple = tuple.substring(0, tuple.length() - 1);
		tuple = tuple + ")";
		
		this.logicRepresentation = tuple;
	}
	
	/**
	 * It returns the tuple representation of the event
	 * 
	 * @return
	 */
	public String toTuple(){
		return logicRepresentation;
	}
}

{'fraction_non_alphanumeric': 0.11813567143516382, 'fraction_numerical': 0.0036917397323488694, 'mean_word_length': 3.2426614481409004, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6204506', 'n_tokens_mistral': 771, 'n_tokens_neox': 675, 'n_words': 174}