<commit_before>package soot.jimple.infoflow.android.TestApps;

import java.io.File;
import java.io.IOException;

import soot.jimple.infoflow.InfoflowResults;
import soot.jimple.infoflow.android.SetupApplication;

public class Test {
	
	static SetupApplication app = new SetupApplication();
	static String command;
	static boolean generate = false;
	
	private static boolean DEBUG = false;


	/**
	 * @param args[0] = path to apk-file
	 * @param args[1] = path to android-dir (path/android-platforms/)
	 */
	public static void main(String[] args) throws IOException, InterruptedException {
		if (args.length <2) {
			System.out.println("Incorrect arguments: [0] = apk-file, [1] = android-jar-directory");	
			return;
		}
		//start with cleanup:
		File outputDir = new File("JimpleOutput");
		if(outputDir.isDirectory()){
			boolean success = true;
			for(File f : outputDir.listFiles()){
				success = success && f.delete();
			}
			if(!success){
				System.err.println("Cleanup of output directory "+ outputDir + " failed!");
			}
		}
		app.setApkFileLocation(args[0]);
		app.setAndroidJar(args[1]);
		app.setMatrixFileLocation("SourcesAndSinks.txt");
		app.setEntryPointsFile("entrypoints-someLines.txt");
		app.setTaintWrapperFile("../../soot-infoflow/trunk/EasyTaintWrapperSource.txt");
		
		app.calculateSourcesSinksEntrypoints();
		
		if (DEBUG) {
			app.printEntrypoints();
			app.printSinks();
			app.printSources();
		}
		
		InfoflowResults results = app.runInfoflow();
		if (results == null)
			System.out.println("No results found.");
		else
			results.printResults();
	}

}<commit_msg>Changed taint wrapper file path to reflect new git repository directory structure<commit_after>package soot.jimple.infoflow.android.TestApps;

import java.io.File;
import java.io.IOException;

import soot.jimple.infoflow.InfoflowResults;
import soot.jimple.infoflow.android.SetupApplication;

public class Test {
	
	static SetupApplication app = new SetupApplication();
	static String command;
	static boolean generate = false;
	
	private static boolean DEBUG = false;


	/**
	 * @param args[0] = path to apk-file
	 * @param args[1] = path to android-dir (path/android-platforms/)
	 */
	public static void main(String[] args) throws IOException, InterruptedException {
		if (args.length <2) {
			System.out.println("Incorrect arguments: [0] = apk-file, [1] = android-jar-directory");	
			return;
		}
		//start with cleanup:
		File outputDir = new File("JimpleOutput");
		if(outputDir.isDirectory()){
			boolean success = true;
			for(File f : outputDir.listFiles()){
				success = success && f.delete();
			}
			if(!success){
				System.err.println("Cleanup of output directory "+ outputDir + " failed!");
			}
		}
		app.setApkFileLocation(args[0]);
		app.setAndroidJar(args[1]);
		app.setMatrixFileLocation("SourcesAndSinks.txt");
		app.setEntryPointsFile("entrypoints-someLines.txt");
		app.setTaintWrapperFile("../../soot-infoflow/trunk/EasyTaintWrapperSource.txt"); 
		
		app.calculateSourcesSinksEntrypoints();
		
		if (DEBUG) {
			app.printEntrypoints();
			app.printSinks();
			app.printSources();
		}
		
		InfoflowResults results = app.runInfoflow();
		if (results == null)
			System.out.println("No results found.");
		else
			results.printResults();
	}

}
{'fraction_non_alphanumeric': 0.13615455381784727, 'fraction_numerical': 0.004293161606869059, 'mean_word_length': 4.169572107765451, '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': '6981768', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1024, 'n_words': 221}