<commit_before>package de.bmoth.App;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.File;
import java.io.IOException;

/**
 * Created by Julia on 04.05.2017.
 */

@XmlRootElement
public class PersonalPreference {

    String prefdir;

    public PersonalPreference() {
        this.prefdir = System.getProperty("user.dir");
    }

    public int getPrefID() {
        return prefID;
    }
    @XmlAttribute
    public void setPrefID(int prefID) {
        this.prefID = prefID;
    }

    int prefID;


    public String getPrefdir() {
        return prefdir;
    }

    @XmlElement
    public void setPrefdir(String prefdir) {
        this.prefdir = prefdir;
    }

public static void savePrefToFile(PersonalPreference personalPreference){

        try {
            File file = new File(System.getProperty("user.dir").concat("/src/main/resources/de/bmoth/App/pref.xml"));
            if(!file.exists()){
                try {
                    file.createNewFile();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            JAXBContext jaxbContext = JAXBContext.newInstance(PersonalPreference.class);<commit_msg>del redundant code?<commit_after>package de.bmoth.App;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.File;
import java.io.IOException;

/**
 * Created by Julia on 04.05.2017.
 */

@XmlRootElement
public class PersonalPreference {

    String prefdir;

    public PersonalPreference() {
        this.prefdir = System.getProperty("user.dir");
    }

    public int getPrefID() {
        return prefID;
    }
    @XmlAttribute
    public void setPrefID(int prefID) {
        this.prefID = prefID;
    }

    int prefID;


    public String getPrefdir() {
        return prefdir;
    }

    @XmlElement
    public void setPrefdir(String prefdir) {
        this.prefdir = prefdir;
    }

public static void savePrefToFile(PersonalPreference personalPreference){

        try {
            File file = new File(System.getProperty("user.dir").concat("/src/main/resources/de/bmoth/App/pref.xml"));

            JAXBContext jaxbContext = JAXBContext.newInstance(PersonalPreference.class);
{'fraction_non_alphanumeric': 0.10457271364317841, 'fraction_numerical': 0.005997001499250375, 'mean_word_length': 2.7751060820367752, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, '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': '6433739', 'n_tokens_mistral': 822, 'n_tokens_neox': 807, 'n_words': 156}