MethodCallData (TokenList tokens, int nullIndex) { if (!tokens.hasType(tokens.forwardWhile(nullIndex + 1, JavaParserUtil.WS_COMMENTS), RPARENTH, COMMA)) return null; int i = tokens.backWhile(nullIndex - 1, JavaParserUtil.WS_COMMENTS); if (!tokens.hasType(i, LPARENTH, COMMA)) return null; int commaCount = 0; while (true) { if (tokens.hasType(i, null, SEMICOLON, EQ, RBRACE)) { return null; } IElementType type = tokens.getTokenType(i); if (type == COMMA) { commaCount++; } else if (type == LPARENTH) { String name = findMethodName(tokens, i); return name == null ? null : new MethodCallData(name, commaCount); } i = tokens.backWithBraceMatching(i, LPARENTH, RPARENTH); } }