// Path: src/main/java/codemining/languagetools/bindings/TokenNameBinding.java
// public class TokenNameBinding implements Serializable {
// 	private static final long serialVersionUID = 2020613810485746430L;
// 
// 	/**
// 	 * The tokens of source code.
// 	 */
// 	public final List<String> sourceCodeTokens;
// 
// 	/**
// 	 * The positions in sourceCodeTokens that contain the given name.
// 	 */
// 	public final Set<Integer> nameIndexes;
// 
// 	/**
// 	 * Features of the binding
// 	 */
// 	public final Set<String> features;
// 
// 	public TokenNameBinding(final Set<Integer> nameIndexes,
// 			final List<String> sourceCodeTokens, final Set<String> features) {
// 		checkArgument(nameIndexes.size() > 0);
// 		checkArgument(sourceCodeTokens.size() > 0);
// 		this.nameIndexes = Collections.unmodifiableSet(nameIndexes);
// 		this.sourceCodeTokens = Collections.unmodifiableList(sourceCodeTokens);
// 		this.features = features;
// 	}
// 
// 	@Override
// 	public boolean equals(final Object obj) {
// 		if (this == obj) {
// 			return true;
// 		}
// 		if (obj == null) {
// 			return false;
// 		}
// 		if (getClass() != obj.getClass()) {
// 			return false;
// 		}
// 		final TokenNameBinding other = (TokenNameBinding) obj;
// 		return Objects.equal(nameIndexes, other.nameIndexes)
// 				&& Objects.equal(features, other.features)
// 				&& Objects.equal(sourceCodeTokens, other.sourceCodeTokens);
// 	}
// 
// 	public String getName() {
// 		return sourceCodeTokens.get(nameIndexes.iterator().next());
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return Objects.hashCode(sourceCodeTokens, nameIndexes, features);
// 	}
// 
// 	/**
// 	 * Rename this name to the given binding. The source code tokens included in
// 	 * this struct, now represent the new structure.
// 	 *
// 	 * @param name
// 	 * @return
// 	 */
// 	public TokenNameBinding renameTo(final String name) {
// 		final List<String> renamedCode = Lists.newArrayList(sourceCodeTokens);
// 		for (final int position : nameIndexes) {
// 			renamedCode.set(position, name);
// 		}
// 		return new TokenNameBinding(nameIndexes, renamedCode, features);
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return getName() + nameIndexes + " " + features;
// 	}
// }


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import java.util.List;
import java.util.Set;
import codemining.languagetools.bindings.TokenNameBinding;
import com.google.common.collect.Sets;
/**
 * 
 */
package codemining.java.codeutils.binding;





/**
 * Utility class for testing bindings.
 * 
 * @author Miltos Allamanis <m.allamanis@ed.ac.uk>
 * 
 */
public class BindingTester {

	private BindingTester() {
	}

// Path: src/main/java/codemining/languagetools/bindings/TokenNameBinding.java
// public class TokenNameBinding implements Serializable {
// 	private static final long serialVersionUID = 2020613810485746430L;
// 
// 	/**
// 	 * The tokens of source code.
// 	 */
// 	public final List<String> sourceCodeTokens;
// 
// 	/**
// 	 * The positions in sourceCodeTokens that contain the given name.
// 	 */
// 	public final Set<Integer> nameIndexes;
// 
// 	/**
// 	 * Features of the binding
// 	 */
// 	public final Set<String> features;
// 
// 	public TokenNameBinding(final Set<Integer> nameIndexes,
// 			final List<String> sourceCodeTokens, final Set<String> features) {
// 		checkArgument(nameIndexes.size() > 0);
// 		checkArgument(sourceCodeTokens.size() > 0);
// 		this.nameIndexes = Collections.unmodifiableSet(nameIndexes);
// 		this.sourceCodeTokens = Collections.unmodifiableList(sourceCodeTokens);
// 		this.features = features;
// 	}
// 
// 	@Override
// 	public boolean equals(final Object obj) {
// 		if (this == obj) {
// 			return true;
// 		}
// 		if (obj == null) {
// 			return false;
// 		}
// 		if (getClass() != obj.getClass()) {
// 			return false;
// 		}
// 		final TokenNameBinding other = (TokenNameBinding) obj;
// 		return Objects.equal(nameIndexes, other.nameIndexes)
// 				&& Objects.equal(features, other.features)
// 				&& Objects.equal(sourceCodeTokens, other.sourceCodeTokens);
// 	}
// 
// 	public String getName() {
// 		return sourceCodeTokens.get(nameIndexes.iterator().next());
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return Objects.hashCode(sourceCodeTokens, nameIndexes, features);
// 	}
// 
// 	/**
// 	 * Rename this name to the given binding. The source code tokens included in
// 	 * this struct, now represent the new structure.
// 	 *
// 	 * @param name
// 	 * @return
// 	 */
// 	public TokenNameBinding renameTo(final String name) {
// 		final List<String> renamedCode = Lists.newArrayList(sourceCodeTokens);
// 		for (final int position : nameIndexes) {
// 			renamedCode.set(position, name);
// 		}
// 		return new TokenNameBinding(nameIndexes, renamedCode, features);
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return getName() + nameIndexes + " " + features;
// 	}
// }


// Path: src/test/java/codemining/java/codeutils/binding/BindingTester.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import java.util.List;
import java.util.Set;
import codemining.languagetools.bindings.TokenNameBinding;
import com.google.common.collect.Sets;

/**
 * 
 */
package codemining.java.codeutils.binding;





/**
 * Utility class for testing bindings.
 * 
 * @author Miltos Allamanis <m.allamanis@ed.ac.uk>
 * 
 */
public class BindingTester {

	private BindingTester() {
	}

	public static void checkAllBindings(final List<TokenNameBinding> bindings) {