<commit_before>/**
 * 
 */
package jayhorn;



import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.CmdLineParser;

import jayhorn.checker.Checker;
import jayhorn.solver.ProverFactory;
import jayhorn.solver.princess.PrincessProverFactory;
import jayhorn.solver.z3.Z3ProverFactory;
import soottocfg.cfg.Program;
import soottocfg.soot.SootToCfg;
import soottocfg.soot.SootToCfg.MemModel;

public class Main {
	
    private static String parseResult(String solver, boolean result)
    {
    	if (result){
			return "SAFE";
		}else{
			return "UNSAFE";
		}
    }
    /**
     * Safety Analysis with JayHorn
     * @param options
     * @param factory
     */
    public static void safetyAnalysis(ProverFactory factory){
  		Log.info("Building CFG  ... ");
  		String outDir = Options.v().getOut();
  		String outName = null;
  		if (outDir!=null) {
  			String in = Options.v().getJavaInput();
  			outName = in.substring(in.lastIndexOf('/'), in.length()).replace(".java", "").replace(".class", "");
  		}
  		SootToCfg soot2cfg = new SootToCfg(true, false, MemModel.PullPush, outDir, outName);
  		soot2cfg.run(Options.v().getJavaInput(), Options.v().getClasspath());	<commit_msg>Re-fix index out of range error (got lost in merge).<commit_after>/**
 * 
 */
package jayhorn;



import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.CmdLineParser;

import jayhorn.checker.Checker;
import jayhorn.solver.ProverFactory;
import jayhorn.solver.princess.PrincessProverFactory;
import jayhorn.solver.z3.Z3ProverFactory;
import soottocfg.cfg.Program;
import soottocfg.soot.SootToCfg;
import soottocfg.soot.SootToCfg.MemModel;

public class Main {
	
    private static String parseResult(String solver, boolean result)
    {
    	if (result){
			return "SAFE";
		}else{
			return "UNSAFE";
		}
    }
    /**
     * Safety Analysis with JayHorn
     * @param options
     * @param factory
     */
    public static void safetyAnalysis(ProverFactory factory){
  		Log.info("Building CFG  ... ");
  		String outDir = Options.v().getOut();
  		String outName = null;
  		if (outDir!=null) {
  			String in = Options.v().getJavaInput();
  			outName = in.substring(in.lastIndexOf('/') + 1, in.length()).replace(".java", "").replace(".class", "");
  		}
  		SootToCfg soot2cfg = new SootToCfg(true, false, MemModel.PullPush, outDir, outName);
  		soot2cfg.run(Options.v().getJavaInput(), Options.v().getClasspath());	
{'fraction_non_alphanumeric': 0.13769009453349773, 'fraction_numerical': 0.005343197698314837, 'mean_word_length': 3.698841698841699, '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': '5922764', 'n_tokens_mistral': 896, 'n_tokens_neox': 862, 'n_words': 166}