<commit_before>/*
 * Copyright (C) 2013-2014 <NAME>
 * Copyright (C) 2014-2015 University of Passau, Germany
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301  USA
 *
 * Contributors:
 *     <NAME> <<EMAIL>>
 */
package de.fosd.jdime.matcher;

import de.fosd.jdime.common.Artifact;
import de.fosd.jdime.common.MergeContext;

/**
 * This interface should be implemented by Matcher classes that compare
 * <code>Artifact</code>s and compute <code>Matching</code>s.
 * <p>
 * Based on the computed <code>Matching</code>, the <code>Merge</code>
 * implementation (see also <code>MergeInterface</code>) amalgamates a new,
 * unified <code>Artifact</code>.
 *
 * @author <NAME>
 *
 * @param <T> type of <code>Artifact</code>
 */
public interface MatchingInterface<T extends Artifact<T>> {

	/**
	 * Returns a tree of <code>Matching</code>s for the provided
	 * <code>Artifact</code>s.
	 *
	 * @param context <code>MergeContext</code>
	 * @param left <code>Artifact</code>
	 * @param right <code>Artifact</code>
	 * @param lookAhead How many levels to keep searching for matches in the
	 * subtree if the currently compared nodes are not equal. If there are no
	 * matches within the specified number of levels, do not look for matches
	 * deeper in the subtree. If this is set to LOOKAHEAD_OFF, the matcher will
	 * stop looking for subtree matches if two nodes do not match. If this is
	 * set to LOOKAHEAD_FULL, the matcher will look at the entire subtree.  The
	 * default ist to do no look-ahead matching.
	 * @return tree of <code>Matching</code>s
	 */
	Matchings<T> match(final MergeContext context, final T left, final T right, int lookAhead);
}<commit_msg>update and reformat documentation<commit_after>/*
 * Copyright (C) 2013-2014 <NAME>
 * Copyright (C) 2014-2015 University of Passau, Germany
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301  USA
 *
 * Contributors:
 *     <NAME> <<EMAIL>>
 */
package de.fosd.jdime.matcher;

import de.fosd.jdime.common.Artifact;
import de.fosd.jdime.common.MergeContext;
import de.fosd.jdime.merge.MergeInterface;

/**
 * This interface should be implemented by <code>Matcher</code> classes that compare <code>Artifact</code>s and compute
 * <code>Matching</code>s.
 * <p>
 * Based on the computed <code>Matchings</code>, the <code>Merge</code> implementation (see {@link MergeInterface})
 * amalgamates a new, unified <code>Artifact</code>.
 *
 * @param <T>
 * 		type of <code>Artifact</code>
 * @author <NAME>
 */
public interface MatchingInterface<T extends Artifact<T>> {

	/**
	 * Returns a <code>Set</code> of <code>Matching</code>s for the provided <code>Artifact</code>s.
	 *
	 * @param context
	 * 		the <code>MergeContext</code> of the merge operation
	 * @param left
	 * 		the left <code>Artifact</code> to compare
	 * @param right
	 * 		the right <code>Artifact</code> to compare
	 * @param lookAhead
	 * 		How many levels to keep searching for matches in the subtree if the currently compared nodes are not equal. If
	 * 		there are no matches within the specified number of levels, do not look for matches deeper in the subtree. If
	 * 		this is set to LOOKAHEAD_OFF, the matcher will stop looking for subtree matches if two nodes do not match. If
	 * 		this is set to LOOKAHEAD_FULL, the matcher will look at the entire subtree.  The default ist to do no
	 * 		look-ahead matching.
	 * @return a <code>Set</code> of <code>Matching</code>s
	 */
	Matchings<T> match(MergeContext context, T left, T right, int lookAhead);
}
{'fraction_non_alphanumeric': 0.09423868312757201, 'fraction_numerical': 0.011934156378600824, 'mean_word_length': 3.960204081632653, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 79, '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': '2267334', 'n_tokens_mistral': 1487, 'n_tokens_neox': 1389, 'n_words': 610}