// Path: src/main/java/codemining/languagetools/ITokenizer.java
// public static class FullToken implements Serializable {
// 
// 	private static final long serialVersionUID = -49456240173307314L;
// 
// 	public static final Function<FullToken, String> TOKEN_NAME_CONVERTER = new Function<FullToken, String>() {
// 		@Override
// 		public String apply(final FullToken input) {
// 			return input.token;
// 		}
// 	};
// 
// 	public final String token;
// 
// 	public final String tokenType;
// 
// 	public FullToken(final FullToken other) {
// 		token = other.token;
// 		tokenType = other.tokenType;
// 	}
// 
// 	public FullToken(final String tokName, final String tokType) {
// 		token = tokName;
// 		tokenType = tokType;
// 	}
// 
// 	@Override
// 	public boolean equals(final Object obj) {
// 		if (!(obj instanceof FullToken)) {
// 			return false;
// 		}
// 		final FullToken other = (FullToken) obj;
// 		return other.token.equals(token)
// 				&& other.tokenType.equals(tokenType);
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return Objects.hashCode(token, tokenType);
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return token + " (" + tokenType + ")";
// 	}
// 
// }


import java.awt.Color;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Map.Entry;
import java.util.SortedMap;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringEscapeUtils;
import codemining.languagetools.ITokenizer.FullToken;
import codemining.util.SettingsLoader;
				appendLineDiv(buf, true);
			} else {
				buf.append(c);
			}
		}

	}

	private void appendLineDiv(final StringBuffer buf,
			final boolean closePrevious) {
		if (closePrevious) {
			buf.append("<br/></div>\n");
		}
		buf.append("<div class='line' id='C" + lineNumber + "'>");
		lineNumber++;
	}

	/**
	 * Return a StringBuffer with colored tokens as specified from the
	 * coloredTokens. There should be one-to-one correspondence with the actual
	 * tokens.
	 */
	public StringBuffer getHTMLwithColors(
			final List<ColoredToken> coloredTokens, final File codeFile)
			throws IOException, InstantiationException, IllegalAccessException {
		final String code = FileUtils.readFileToString(codeFile);
		lineNumber = 1;

		final StringBuffer buf = new StringBuffer();

// Path: src/main/java/codemining/languagetools/ITokenizer.java
// public static class FullToken implements Serializable {
// 
// 	private static final long serialVersionUID = -49456240173307314L;
// 
// 	public static final Function<FullToken, String> TOKEN_NAME_CONVERTER = new Function<FullToken, String>() {
// 		@Override
// 		public String apply(final FullToken input) {
// 			return input.token;
// 		}
// 	};
// 
// 	public final String token;
// 
// 	public final String tokenType;
// 
// 	public FullToken(final FullToken other) {
// 		token = other.token;
// 		tokenType = other.tokenType;
// 	}
// 
// 	public FullToken(final String tokName, final String tokType) {
// 		token = tokName;
// 		tokenType = tokType;
// 	}
// 
// 	@Override
// 	public boolean equals(final Object obj) {
// 		if (!(obj instanceof FullToken)) {
// 			return false;
// 		}
// 		final FullToken other = (FullToken) obj;
// 		return other.token.equals(token)
// 				&& other.tokenType.equals(tokenType);
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return Objects.hashCode(token, tokenType);
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return token + " (" + tokenType + ")";
// 	}
// 
// }


// Path: src/main/java/codemining/languagetools/CodePrinter.java
import java.awt.Color;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Map.Entry;
import java.util.SortedMap;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringEscapeUtils;
import codemining.languagetools.ITokenizer.FullToken;
import codemining.util.SettingsLoader;

				appendLineDiv(buf, true);
			} else {
				buf.append(c);
			}
		}

	}

	private void appendLineDiv(final StringBuffer buf,
			final boolean closePrevious) {
		if (closePrevious) {
			buf.append("<br/></div>\n");
		}
		buf.append("<div class='line' id='C" + lineNumber + "'>");
		lineNumber++;
	}

	/**
	 * Return a StringBuffer with colored tokens as specified from the
	 * coloredTokens. There should be one-to-one correspondence with the actual
	 * tokens.
	 */
	public StringBuffer getHTMLwithColors(
			final List<ColoredToken> coloredTokens, final File codeFile)
			throws IOException, InstantiationException, IllegalAccessException {
		final String code = FileUtils.readFileToString(codeFile);
		lineNumber = 1;

		final StringBuffer buf = new StringBuffer();

		final SortedMap<Integer, FullToken> toks = tokenizer