private static int getTrimmedTextLength(ASTNode first, ASTNode last) {
    StringBuilder buffer = new StringBuilder();
    while (first != last.getTreeNext()) {
      buffer.append(first.getText());
      first = first.getTreeNext();
    }
    return buffer.toString().trim().length();
  }
private static int getTrimmedTextLength(ASTNode first, ASTNode last)