获取同胞中同名元素的数量
@param e
@return
185528
public static int sameTagElNums(Element e,Scope scope){
        Elements context = new Elements();
        Elements els = e.parent().getElementsByTag(e.tagName());
        for (Element el:els){
            if (scope.context().contains(el)){
                context.add(el);
            }
        }
        return context.size();
    }
185139
public static org.w3c.dom.Element findAnchorElement(org.w3c.dom.Element e)
    {
        if ("a".equalsIgnoreCase(e.getTagName().trim()))
            return e;
        else if (e.getParentNode() != null && e.getParentNode().getNodeType() == Node.ELEMENT_NODE)
            return findAnchorElement((org.w3c.dom.Element) e.getParentNode());
        else
            return null;
    }
1015720
private static Elements getElementsByTag(Element e, String tag) {
        Elements es = e.getElementsByTag(tag);
        es.remove(e);
        return es;
    }
295589
public static String extName(String fileName) {
		if (fileName == null) {
			return null;
		}
		int index = fileName.lastIndexOf(StrUtil.DOT);
		if (index == -1) {
			return StrUtil.EMPTY;
		} else {
			String ext = fileName.substring(index + 1);
			// 扩展名中不能包含路径相关的符号
			return StrUtil.containsAny(ext, UNIX_SEPARATOR, WINDOWS_SEPARATOR) ? StrUtil.EMPTY : ext;
		}
	}
948242
@Override
    public E ceiling(E e)
    {
        int idx = indexOf(e);
        if (idx >= 1)
        {
            return list.get(idx);
        }
        else
        {
            int ip = insertPoint(idx);
            if (ip < list.size())
            {
                return list.get(ip);
            }
            else
            {
                return null;
            }
        }
    }
909375
public static String getElementSetter(Element element) {
		// 後続処理注意 hogeに対して sethoge が取得される. setHoge ではない.
		String setterName = null;
		if (isPrimitiveBoolean(element)) {
			Pattern pattern = Pattern.compile("^is[^a-z].*$");
			Matcher matcher = pattern.matcher(element.getSimpleName().toString());
			if (matcher.matches()) {
				// boolean isHoge; に対して setIsHoge ではなく setHoge が生成される
				setterName = "set" + element.getSimpleName().toString().substring(2);
			}
		}
		if (setterName == null) {
			setterName = "set" + element.getSimpleName().toString();
		}

		Element setter = null;
		for (Element method : ElementFilter.methodsIn(element.getEnclosingElement()
			.getEnclosedElements())) {
			String methodName = method.getSimpleName().toString();

			if (setterName.equalsIgnoreCase(methodName)) {
				if (isStatic(method) == false && isPublic(method) || isPackagePrivate(method)) {
					setter = method;
					break;
				}
			}
		}
		if (setter != null) {
			return setter.getSimpleName().toString();
		} else {
			return null;
		}
	}
846577
private Object getMemberKey(Element element) {
        if (utils.isConstructor(element)) {
            return utils.getSimpleName(element) + utils.flatSignature((ExecutableElement)element);
        } else if (utils.isMethod(element)) {
            return getClassMember((ExecutableElement) element);
        } else if (utils.isField(element) || utils.isEnumConstant(element) || utils.isAnnotationType(element)) {
            return utils.getSimpleName(element);
        } else { // it's a class or interface
            String classOrIntName = utils.getSimpleName(element);
            //Strip off the containing class name because we only want the member name.
            classOrIntName = classOrIntName.indexOf('.') != 0
                    ? classOrIntName.substring(classOrIntName.lastIndexOf('.'))
                    : classOrIntName;
            return "clint" + classOrIntName;
        }
    }
996023
function(id) {
    if (id && (id = id.trim())) {

      // js embend 同名.html 而 同名.html 又开启了依赖同名.js，然后就出现了，自己依赖自己了。
      // 所以这里做了 id !== this.id 的判断
      if (id !== this.id && !~this.requires.indexOf(id)) {
        this.requires.push(id);
      }

      // 如果在异步依赖中，则需要把它删了。
      var idx;
      if (~(idx = this.asyncs.indexOf(id))) {
        this.asyncs.splice(idx, 1);
      }

      return id;
    }
    return false;
  }
1005438
public static String formatException(final Exception e) {
    final StringBuilder sb = new StringBuilder();
    Throwable t = e;
    while (t != null) {
      sb.append(t.getMessage()).append("\n");
      t = t.getCause();
    }
    return sb.toString();
  }
33849
static String getDeepName(final Element element) {
        if (element == null) {
            return "";
        }
        return getDeepName(element.getParentElement()) + '/' + element.getName();
    }
680736
public T get(final int key) {
		int index = ((key & 0x7FFFFFFF) % elementKeys.length);

		long m = elementKeys[index];
		if (key == m) {
			return elementValues[index];
		}

		return null;
	}
254530
@Override
	public boolean add(E e) {
		if (capacity <= linkedBlockingDeque.size())
			linkedBlockingDeque.removeFirst();
		return linkedBlockingDeque.add(e);
	}
1342163
public O removeObject(O e) {
    int pos = index.getInt(e);
    return (pos >= 0) ? removeAt(pos) : null;
  }
278861
@JsonProperty("e")
    @JsonSerialize(using = Base64UrlJsonSerializer.class)
    @JsonDeserialize(using = Base64UrlJsonDeserializer.class)
    public byte[] e() {
        return ByteExtensions.clone(this.e);
    }
413328
public long getCount(E e) {
    if (counters.containsKey(e)) {
      return counters.get(e).getCount();
    } else {
      return 0l;
    }
  }
409090
@Deprecated
  public Object f(com.google.gwt.user.client.Element e, int i) {
    setElement(e);
    setIndex(i);
    Widget w = GQuery.getAssociatedWidget(e);
    if (w != null) {
      f(w, i);
    } else {
      f(e.<com.google.gwt.dom.client.Element> cast());
    }
    return null;
  }
313573
protected SofaRpcException convertToRpcException(Exception e) {
        SofaRpcException exception;
        if (e instanceof SofaRpcException) {
            exception = (SofaRpcException) e;
        }
        // 超时
        else if (e instanceof InvokeTimeoutException) {
            exception = new SofaTimeOutException(e);
        }
        // 服务器忙
        else if (e instanceof InvokeServerBusyException) {
            exception = new SofaRpcException(RpcErrorType.SERVER_BUSY, e);
        }
        // 序列化
        else if (e instanceof SerializationException) {
            boolean isServer = ((SerializationException) e).isServerSide();
            exception = isServer ? new SofaRpcException(RpcErrorType.SERVER_SERIALIZE, e)
                : new SofaRpcException(RpcErrorType.CLIENT_SERIALIZE, e);
        }
        // 反序列化
        else if (e instanceof DeserializationException) {
            boolean isServer = ((DeserializationException) e).isServerSide();
            exception = isServer ? new SofaRpcException(RpcErrorType.SERVER_DESERIALIZE, e)
                : new SofaRpcException(RpcErrorType.CLIENT_DESERIALIZE, e);
        }
        // 长连接断连
        else if (e instanceof ConnectionClosedException) {
            exception = new SofaRpcException(RpcErrorType.CLIENT_NETWORK, e);
        }
        // 客户端发送失败
        else if (e instanceof InvokeSendFailedException) {
            exception = new SofaRpcException(RpcErrorType.CLIENT_NETWORK, e);
        }
        // 服务端未知异常
        else if (e instanceof InvokeServerException) {
            exception = new SofaRpcException(RpcErrorType.SERVER_UNDECLARED_ERROR, e.getCause());
        }
        // 客户端未知
        else {
            exception = new SofaRpcException(RpcErrorType.CLIENT_UNDECLARED_ERROR, e);
        }
        return exception;
    }