<commit_before>package de.unifreiburg.cs.proglang.jgs;

import de.unifreiburg.cs.proglang.jgs.constraints.TypeDomain;
import de.unifreiburg.cs.proglang.jgs.constraints.secdomains.LowHigh;
import de.unifreiburg.cs.proglang.jgs.instrumentation.ACasts;
import de.unifreiburg.cs.proglang.jgs.instrumentation.Casts;
import de.unifreiburg.cs.proglang.jgs.instrumentation.CastsFromConstants;
import de.unifreiburg.cs.proglang.jgs.instrumentation.Methods;
import soot.Scene;
import soot.SootMethod;

import java.util.Collections;

public class TypeCheckExample {

    public static void main(String[] args) {

        ACasts<LowHigh.Level> casts =
                new CastsFromConstants<>(new TypeDomain<>(new LowHigh()),
                                         "<de.unifreiburg.cs.proglang.jgs.instrumentation.Casts: java.lang.Object cast(java.lang.Object)>",
                                         "<de.unifreiburg.cs.proglang.jgs.instrumentation.Casts: java.lang.Object castCx(java.lang.Object)>",
                                         "<de.unifreiburg.cs.proglang.jgs.instrumentation.Casts: java.lang.Object castCxEnd(java.lang.Object)>");
        Methods<LowHigh.Level> typeCheckResult = JgsCheck.typeCheck(
                "pkg.ScratchMonomorphic",
                new String[]{"GradualConstraints/JGSTestclasses/Scratch/src/main/java/pkg/ScratchMonomorphic.java"},
                new String[]{".", "GradualConstraints/JGSTestclasses/Scratch/target/scala-2.11/classes",
                        "GradualConstraints/JGSSupport/target/scala-2.11/classes"},
                Collections.<String, JgsCheck.Annotation>emptyMap(),
                Collections.<String, String>emptyMap(),
                new LowHigh(), casts
        );

        for (SootMethod m : Scene.v().getMainClass().getMethods()) {
            System.out.print("Checking vartyping of method: " + m + ": ");
            try {
                typeCheckResult.getVarTyping(m);
                System.out.println("ok");
            } catch (Exception e) {
                System.out.println(e.getMessage());
            }
        }<commit_msg>Fix method names of casts<commit_after>package de.unifreiburg.cs.proglang.jgs;

import de.unifreiburg.cs.proglang.jgs.constraints.TypeDomain;
import de.unifreiburg.cs.proglang.jgs.constraints.secdomains.LowHigh;
import de.unifreiburg.cs.proglang.jgs.instrumentation.ACasts;
import de.unifreiburg.cs.proglang.jgs.instrumentation.Casts;
import de.unifreiburg.cs.proglang.jgs.instrumentation.CastsFromConstants;
import de.unifreiburg.cs.proglang.jgs.instrumentation.Methods;
import soot.Scene;
import soot.SootMethod;

import java.util.Collections;

public class TypeCheckExample {

    public static void main(String[] args) {

        ACasts<LowHigh.Level> casts =
                new CastsFromConstants<>(new TypeDomain<>(new LowHigh()),
                                         "<de.unifreiburg.cs.proglang.jgs.support.Casts: java.lang.Object cast(java.lang.String,java.lang.Object)>",
                                         "<de.unifreiburg.cs.proglang.jgs.support.Casts: java.lang.Object castCx(java.lang.Object)>",
                                         "<de.unifreiburg.cs.proglang.jgs.support.Casts: java.lang.Object castCxEnd(java.lang.Object)>");
        Methods<LowHigh.Level> typeCheckResult = JgsCheck.typeCheck(
                "pkg.ScratchMonomorphic",
                new String[]{"GradualConstraints/JGSTestclasses/Scratch/src/main/java/pkg/ScratchMonomorphic.java"},
                new String[]{".", "GradualConstraints/JGSTestclasses/Scratch/target/scala-2.11/classes",
                        "GradualConstraints/JGSSupport/target/scala-2.11/classes"},
                Collections.<String, JgsCheck.Annotation>emptyMap(),
                Collections.<String, String>emptyMap(),
                new LowHigh(), casts
        );

        for (SootMethod m : Scene.v().getMainClass().getMethods()) {
            System.out.print("Checking vartyping of method: " + m + ": ");
            try {
                typeCheckResult.getVarTyping(m);
                System.out.println("ok");
            } catch (Exception e) {
                System.out.println(e.getMessage());
            }
        }
{'fraction_non_alphanumeric': 0.12242481648117452, 'fraction_numerical': 0.0028415818138763913, 'mean_word_length': 2.4313566206336312, 'pattern_counts': {'":': 2, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4336634', 'n_tokens_mistral': 1318, 'n_tokens_neox': 1279, 'n_words': 156}