// Path: src/main/java/codemining/java/codeutils/scopes/AllScopeExtractor.java
// public static final class AllScopeSnippetExtractor implements
// 		IScopeExtractor {
// 
// 	public AllScopeSnippetExtractor() {
// 		allExtractors = Lists.newArrayList();
// 		allExtractors
// 				.add(new VariableScopeExtractor.VariableScopeSnippetExtractor());
// 		allExtractors
// 				.add(new MethodScopeExtractor.MethodScopeSnippetExtractor(
// 						true));
// 		allExtractors
// 				.add(new TypenameScopeExtractor.TypenameSnippetExtractor(
// 						true));
// 	}
// 
// 	public AllScopeSnippetExtractor(final boolean variables,
// 			final boolean methods, final boolean types) {
// 		allExtractors = Lists.newArrayList();
// 		checkArgument(variables | methods | types,
// 				"At least one option must be set");
// 		if (variables) {
// 			allExtractors
// 					.add(new VariableScopeExtractor.VariableScopeSnippetExtractor());
// 		}
// 		if (methods) {
// 			allExtractors
// 					.add(new MethodScopeExtractor.MethodScopeSnippetExtractor(
// 							true));
// 		}
// 		if (types) {
// 			allExtractors
// 					.add(new TypenameScopeExtractor.TypenameSnippetExtractor(
// 							true));
// 		}
// 	}
// 
// 	private final List<IScopeExtractor> allExtractors;
// 
// 	@Override
// 	public Multimap<Scope, String> getFromFile(final File file)
// 			throws IOException {
// 		final Multimap<Scope, String> scopes = TreeMultimap.create();
// 		for (final IScopeExtractor extractor : allExtractors) {
// 			scopes.putAll(extractor.getFromFile(file));
// 		}
// 		return scopes;
// 	}
// 
// 	@Override
// 	public Multimap<Scope, String> getFromNode(ASTNode node) {
// 		final Multimap<Scope, String> scopes = TreeMultimap.create();
// 		for (final IScopeExtractor extractor : allExtractors) {
// 			scopes.putAll(extractor.getFromNode(node));
// 		}
// 		return scopes;
// 	}
// 
// 	@Override
// 	public Multimap<Scope, String> getFromString(final String file,
// 			final ParseType parseType) {
// 		final Multimap<Scope, String> scopes = TreeMultimap.create();
// 		for (final IScopeExtractor extractor : allExtractors) {
// 			scopes.putAll(extractor.getFromString(file, parseType));
// 		}
// 		return scopes;
// 	}
// }
// 
// Path: src/main/java/codemining/languagetools/IScopeExtractor.java
// public interface IScopeExtractor {
// 	Multimap<Scope, String> getFromFile(final File file) throws IOException;
// 
// 	Multimap<Scope, String> getFromNode(final ASTNode node);
// 
// 	Multimap<Scope, String> getFromString(final String code,
// 			final ParseType parseType);
// }


import java.io.File;
import java.io.IOException;
import codemining.java.codeutils.scopes.AllScopeExtractor.AllScopeSnippetExtractor;
import codemining.languagetools.IScopeExtractor;
package codemining.java.codeutils.scopes;



public class ScopesTUI {

	/**
	 * @param name
	 * @return
	 * @throws UnsupportedOperationException
	 */
	public static IScopeExtractor getScopeExtractorByName(final String name)
			throws UnsupportedOperationException {
		final IScopeExtractor scopeExtractor;
		if (name.equals("variable")) {
			scopeExtractor = new VariableScopeExtractor.VariableScopeSnippetExtractor();
		} else if (name.equals("method")) {
			scopeExtractor = new MethodScopeExtractor.MethodScopeSnippetExtractor(
					true);
		} else if (name.equals("type")) {
			scopeExtractor = new TypenameScopeExtractor.TypenameSnippetExtractor(
					true);
		} else if (name.equals("all")) {
// Path: src/main/java/codemining/java/codeutils/scopes/AllScopeExtractor.java
// public static final class AllScopeSnippetExtractor implements
// 		IScopeExtractor {
// 
// 	public AllScopeSnippetExtractor() {
// 		allExtractors = Lists.newArrayList();
// 		allExtractors
// 				.add(new VariableScopeExtractor.VariableScopeSnippetExtractor());
// 		allExtractors
// 				.add(new MethodScopeExtractor.MethodScopeSnippetExtractor(
// 						true));
// 		allExtractors
// 				.add(new TypenameScopeExtractor.TypenameSnippetExtractor(
// 						true));
// 	}
// 
// 	public AllScopeSnippetExtractor(final boolean variables,
// 			final boolean methods, final boolean types) {
// 		allExtractors = Lists.newArrayList();
// 		checkArgument(variables | methods | types,
// 				"At least one option must be set");
// 		if (variables) {
// 			allExtractors
// 					.add(new VariableScopeExtractor.VariableScopeSnippetExtractor());
// 		}
// 		if (methods) {
// 			allExtractors
// 					.add(new MethodScopeExtractor.MethodScopeSnippetExtractor(
// 							true));
// 		}
// 		if (types) {
// 			allExtractors
// 					.add(new TypenameScopeExtractor.TypenameSnippetExtractor(
// 							true));
// 		}
// 	}
// 
// 	private final List<IScopeExtractor> allExtractors;
// 
// 	@Override
// 	public Multimap<Scope, String> getFromFile(final File file)
// 			throws IOException {
// 		final Multimap<Scope, String> scopes = TreeMultimap.create();
// 		for (final IScopeExtractor extractor : allExtractors) {
// 			scopes.putAll(extractor.getFromFile(file));
// 		}
// 		return scopes;
// 	}
// 
// 	@Override
// 	public Multimap<Scope, String> getFromNode(ASTNode node) {
// 		final Multimap<Scope, String> scopes = TreeMultimap.create();
// 		for (final IScopeExtractor extractor : allExtractors) {
// 			scopes.putAll(extractor.getFromNode(node));
// 		}
// 		return scopes;
// 	}
// 
// 	@Override
// 	public Multimap<Scope, String> getFromString(final String file,
// 			final ParseType parseType) {
// 		final Multimap<Scope, String> scopes = TreeMultimap.create();
// 		for (final IScopeExtractor extractor : allExtractors) {
// 			scopes.putAll(extractor.getFromString(file, parseType));
// 		}
// 		return scopes;
// 	}
// }
// 
// Path: src/main/java/codemining/languagetools/IScopeExtractor.java
// public interface IScopeExtractor {
// 	Multimap<Scope, String> getFromFile(final File file) throws IOException;
// 
// 	Multimap<Scope, String> getFromNode(final ASTNode node);
// 
// 	Multimap<Scope, String> getFromString(final String code,
// 			final ParseType parseType);
// }


// Path: src/main/java/codemining/java/codeutils/scopes/ScopesTUI.java
import java.io.File;
import java.io.IOException;
import codemining.java.codeutils.scopes.AllScopeExtractor.AllScopeSnippetExtractor;
import codemining.languagetools.IScopeExtractor;

package codemining.java.codeutils.scopes;



public class ScopesTUI {

	/**
	 * @param name
	 * @return
	 * @throws UnsupportedOperationException
	 */
	public static IScopeExtractor getScopeExtractorByName(final String name)
			throws UnsupportedOperationException {
		final IScopeExtractor scopeExtractor;
		if (name.equals("variable")) {
			scopeExtractor = new VariableScopeExtractor.VariableScopeSnippetExtractor();
		} else if (name.equals("method")) {
			scopeExtractor = new MethodScopeExtractor.MethodScopeSnippetExtractor(
					true);
		} else if (name.equals("type")) {
			scopeExtractor = new TypenameScopeExtractor.TypenameSnippetExtractor(
					true);
		} else if (name.equals("all")) {
			scopeExtractor = new AllScopeSnippetExtractor();