<commit_before>package org.enoir.graphvizapi;

/**
 * Created by frank on 2014/11/19.
 */
public class BaseGraphObject {
    private String id;
    public BaseGraphObject(String id) {
        this.id = id;
    }

    public String getId(){
        return this.id;
    }
    public void setId(String id){
        this.id = id;
    }
}
<commit_msg>Add genDotString abstract method in BaseGraphObject.<commit_after>package org.enoir.graphvizapi;

import org.w3c.dom.Attr;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by frank on 2014/11/19.
 */
public abstract class BaseGraphObject {
    private String id;
    private List<Attributes> attrList;
    public BaseGraphObject(String id) {
        this.id = id;
        attrList = new ArrayList<Attributes>();
    }

    public void addAttributes(Attributes attr){
        this.attrList.add(attr);
    }

    public void removeAttributes(String name){
        List<Attributes> removeList = new ArrayList<Attributes>();
        for(Attributes attr : this.attrList){
            if(attr.getAttrName().equals(name)){
                removeList.add(attr);
            }
        }
        if(removeList.size()==0){
            //TODO maybe throw exception
        }
        for(Attributes attr: removeList){
            this.attrList.remove(attr);
        }
    }

    public String getId(){
        return this.id;
    }
    public void setId(String id){
        this.id = id;
    }
    abstract public String genDotString();
}

{'fraction_non_alphanumeric': 0.107981220657277, 'fraction_numerical': 0.012072434607645875, 'mean_word_length': 2.2863436123348015, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4150490', 'n_tokens_mistral': 450, 'n_tokens_neox': 432, 'n_words': 107}