public static IMethod findSimilarMethod(IMethod method, IMethod[] methods) throws JavaModelException { boolean isConstructor= method.isConstructor(); for (int i= 0; i < methods.length; i++) { IMethod otherMethod= methods[i]; if (otherMethod.isConstructor() == isConstructor && method.isSimilar(otherMethod)) return otherMethod; } return null;
public static IMethod findSimilarMethod(IMethod method, IType type) throws JavaModelException { return findSimilarMethod(method, type.getMethods());
	public static IMethod findSimilarMethod(IMethod method, IMethod[] methods) throws JavaModelException {		boolean isConstructor= method.isConstructor();		for (int i= 0; i < methods.length; i++) {			IMethod otherMethod= methods[i];			if (otherMethod.isConstructor() == isConstructor && method.isSimilar(otherMethod))				return otherMethod;		}		return null;	}