<commit_before>package org.apache.jena.query.util;

import org.apache.jena.query.Dataset;

public class DatasetLib {

    public static Dataset union(final Dataset d1, final Dataset d2) {
        // TODO
        throw new UnsupportedOperationException();
    }

    public static Dataset intersection(final Dataset d1, final Dataset d2) {
        // TODO
        throw new UnsupportedOperationException();
    }

    public static Dataset difference(final Dataset d1, final Dataset d2) {
        // TODO
        throw new UnsupportedOperationException();
    }
}<commit_msg>Adding method impls to DatasetLib<commit_after>package org.apache.jena.query.util;

import org.apache.jena.query.Dataset;
import org.apache.jena.query.DatasetFactory;
import org.apache.jena.sparql.util.Context;
import org.apache.jena.sparql.util.DifferenceDatasetGraph;
import org.apache.jena.sparql.util.UnionDatasetGraph;

public class DatasetLib {

	public static Dataset union(final Dataset d1, final Dataset d2) {
		return DatasetFactory.wrap(new UnionDatasetGraph(d1.asDatasetGraph(), d2.asDatasetGraph()));
	}

	public static Dataset union(final Dataset d1, final Dataset d2, Context c) {
		return DatasetFactory.wrap(new UnionDatasetGraph(d1.asDatasetGraph(), d2.asDatasetGraph(), c));
	}

	public static Dataset intersection(final Dataset d1, final Dataset d2) {
		// TODO
		throw new UnsupportedOperationException();
	}

	public static Dataset difference(final Dataset d1, final Dataset d2) {
		return DatasetFactory.wrap(new DifferenceDatasetGraph(d1.asDatasetGraph(), d2.asDatasetGraph()));
	}

	public static Dataset difference(final Dataset d1, final Dataset d2, Context c) {
		return DatasetFactory.wrap(new DifferenceDatasetGraph(d1.asDatasetGraph(), d2.asDatasetGraph(), c));
	}
}
{'fraction_non_alphanumeric': 0.09542631281761717, 'fraction_numerical': 0.01355166572557877, 'mean_word_length': 4.5375, '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': '4153669', 'n_tokens_mistral': 549, 'n_tokens_neox': 549, 'n_words': 136}