@Test public void testColumn() { assertEquals(TokenizerUtils.getColumnOfPosition(classContent, 970), 29); assertEquals(TokenizerUtils.getColumnOfPosition(classContent, 980), 13); assertEquals(TokenizerUtils.getColumnOfPosition(classContent, 1565), 17); }
public static int getColumnOfPosition(final String code, final int position) { checkPositionIndex(position, code.length()); int newLinePosition = code.substring(0, position).lastIndexOf("\n"); if (newLinePosition == -1) { newLinePosition = 0; } final int tabCount = StringUtils.countMatches( code.substring(newLinePosition, position), "\t"); return position - newLinePosition + (TAB_INDENT_SIZE - 1) * tabCount; }
TokenizerUtils { public static int getColumnOfPosition(final String code, final int position) { checkPositionIndex(position, code.length()); int newLinePosition = code.substring(0, position).lastIndexOf("\n"); if (newLinePosition == -1) { newLinePosition = 0; } final int tabCount = StringUtils.countMatches( code.substring(newLinePosition, position), "\t"); return position - newLinePosition + (TAB_INDENT_SIZE - 1) * tabCount; } }
TokenizerUtils { public static int getColumnOfPosition(final String code, final int position) { checkPositionIndex(position, code.length()); int newLinePosition = code.substring(0, position).lastIndexOf("\n"); if (newLinePosition == -1) { newLinePosition = 0; } final int tabCount = StringUtils.countMatches( code.substring(newLinePosition, position), "\t"); return position - newLinePosition + (TAB_INDENT_SIZE - 1) * tabCount; } private  TokenizerUtils(); }
TokenizerUtils { public static int getColumnOfPosition(final String code, final int position) { checkPositionIndex(position, code.length()); int newLinePosition = code.substring(0, position).lastIndexOf("\n"); if (newLinePosition == -1) { newLinePosition = 0; } final int tabCount = StringUtils.countMatches( code.substring(newLinePosition, position), "\t"); return position - newLinePosition + (TAB_INDENT_SIZE - 1) * tabCount; } private  TokenizerUtils(); static int getColumnOfPosition(final String code, final int position); final static StringBuffer joinFullTokens(
			final List<FullToken> tokens, final StringBuffer sb); final static StringBuffer joinTokens(final List<String> tokens); final static StringBuffer joinTokens(final List<String> tokens,
			final StringBuffer sb); static final void removeSentenceStartEndFullTokens(
			final List<FullToken> tokenSequence); static final void removeSentenceStartEndTokens(
			final List<String> tokenSequence); static ITokenizer tokenizerForClass(final String tokenizerClass,
			final String tokenizerArguments); static ITokenizer tokenizerForClass(final String tokenizerClass,
			final Boolean tokenizerArguments); static ITokenizer tokenizerForClass(final String tokenizerClass); }
TokenizerUtils { public static int getColumnOfPosition(final String code, final int position) { checkPositionIndex(position, code.length()); int newLinePosition = code.substring(0, position).lastIndexOf("\n"); if (newLinePosition == -1) { newLinePosition = 0; } final int tabCount = StringUtils.countMatches( code.substring(newLinePosition, position), "\t"); return position - newLinePosition + (TAB_INDENT_SIZE - 1) * tabCount; } private  TokenizerUtils(); static int getColumnOfPosition(final String code, final int position); final static StringBuffer joinFullTokens(
			final List<FullToken> tokens, final StringBuffer sb); final static StringBuffer joinTokens(final List<String> tokens); final static StringBuffer joinTokens(final List<String> tokens,
			final StringBuffer sb); static final void removeSentenceStartEndFullTokens(
			final List<FullToken> tokenSequence); static final void removeSentenceStartEndTokens(
			final List<String> tokenSequence); static ITokenizer tokenizerForClass(final String tokenizerClass,
			final String tokenizerArguments); static ITokenizer tokenizerForClass(final String tokenizerClass,
			final Boolean tokenizerArguments); static ITokenizer tokenizerForClass(final String tokenizerClass); static final int TAB_INDENT_SIZE; }