Returns {@code true} if the argument descriptors {@code desc1}
and {@code desc2} are equal (return type is ignored), ignoring
the last {@code offset} parameters of {@code desc2}.
349376
@Requires({
    "desc1 != null",
    "desc2 != null",
    "offset >= 0"
  })
  private boolean descArgumentsMatch(String desc1, String desc2, int offset) {
    Type[] types1 = Type.getArgumentTypes(desc1);
    Type[] types2 = Type.getArgumentTypes(desc2);

    if (types2.length - types1.length != offset) {
      return false;
    }
    for (int i = 0; i < types1.length; ++i) {
      if (!types1[i].equals(types2[i])) {
        return false;
      }
    }
    return true;
  }
284758
public boolean precedesOrEqualsForAllOffsetTypesInBoth(final OffsetGroup other) {
    return charOffset().precedesOrEquals(other.charOffset())
        && edtOffset().precedesOrEquals(other.edtOffset())
        && (!byteOffset().isPresent() || !other.byteOffset().isPresent()
                || byteOffset().get().precedesOrEquals(other.byteOffset().get()))
        && (!asrTime().isPresent() || !other.asrTime().isPresent()
                || asrTime().get().precedesOrEquals(other.asrTime().get()));
  }
523673
public static boolean notEquals(final Object object1, final Object object2) {
        return object1 != null && !object1.equals(object2) || object1 == null && object2 != null;
    }
656891
def same_position?(pos1, pos2)
      return unless pos1 && pos2
      pos1.line == pos2.line && pos1.offset == pos2.offset
    end
767380
def _equal(a, b, identityLong, relicCompare):
    
    # Check for an identity comparison.
    if isinstance(b, (long, int)) and b == identityLong:
        return a.isIdentity()

    # Verify type and fix normalization for a valid comparison.
    assertSameType(a, b)
    a.normalize()
    b.normalize()

    # Compare the elements using the relic function.
    return relicCompare(byref(a), byref(b)) == EQUAL
963091
public static boolean isSameType(@Nonnull TypeMirror t1, @Nonnull TypeMirror t2) {
        String t1Name = toUniqueString(t1);
        String t2Name = toUniqueString(t2);

        return t1Name.equals(t2Name);
    }
377824
private boolean isEqual(Object fld1, Object fld2)
    {
        if (fld1 == null || fld2 == null)
        {
            return (fld1 == fld2);
        }
        else if ((fld1 instanceof BigDecimal) && (fld2 instanceof BigDecimal))
        {
            return (((BigDecimal) fld1).compareTo((BigDecimal) fld2) == 0);
        }
        else if ((fld1 instanceof Date) && (fld2 instanceof Date))
        {
            return (((Date) fld1).getTime() == ((Date) fld2).getTime());
        }
        else
        {
            return fld1.equals(fld2);
        }
    }
544249
@Override
  public boolean doIsEquals(NormalAnnotationExpr first, NormalAnnotationExpr second) {

    boolean equals = true;

    if (!first.getName().equals(second.getName())) equals = false;

    if (equals == true) {

      if (first.getPairs() == null) return second.getPairs() == null;

      if (!isSmallerHasEqualsInBigger(first.getPairs(), second.getPairs(), true)) return false;

    }

    return equals;
  }
233705
@GwtIncompatible("incompatible method")
    private static boolean arrayMemberEquals(final Class<?> componentType, final Object o1, final Object o2) {
        if (componentType.isAnnotation()) {
            return annotationArrayMemberEquals((Annotation[]) o1, (Annotation[]) o2);
        }
        if (componentType.equals(Byte.TYPE)) {
            return Arrays.equals((byte[]) o1, (byte[]) o2);
        }
        if (componentType.equals(Short.TYPE)) {
            return Arrays.equals((short[]) o1, (short[]) o2);
        }
        if (componentType.equals(Integer.TYPE)) {
            return Arrays.equals((int[]) o1, (int[]) o2);
        }
        if (componentType.equals(Character.TYPE)) {
            return Arrays.equals((char[]) o1, (char[]) o2);
        }
        if (componentType.equals(Long.TYPE)) {
            return Arrays.equals((long[]) o1, (long[]) o2);
        }
        if (componentType.equals(Float.TYPE)) {
            return Arrays.equals((float[]) o1, (float[]) o2);
        }
        if (componentType.equals(Double.TYPE)) {
            return Arrays.equals((double[]) o1, (double[]) o2);
        }
        if (componentType.equals(Boolean.TYPE)) {
            return Arrays.equals((boolean[]) o1, (boolean[]) o2);
        }
        return Arrays.equals((Object[]) o1, (Object[]) o2);
    }
798754
private static boolean namedNodeMapsAreEqual(final NamedNodeMap a, final NamedNodeMap b) {
        if (a == b) {
            return true;
        }
        if ((a == null) || (b == null)) {
            return false;
        }
        if (a.getLength() != b.getLength()) {
            return false;
        }

        List<Node> listA = new ArrayList<Node>(a.getLength());
        List<Node> listB = new ArrayList<Node>(a.getLength());

        for (int i = 0; i < a.getLength(); ++i) {
            listA.add(a.item(i));
            listB.add(b.item(i));
        }

        Collections.sort(listA, ATTRIBUTE_NODE_COMPARATOR);
        Collections.sort(listB, ATTRIBUTE_NODE_COMPARATOR);
        for (Node n1 : listA) {
            if (!nodesAreEqual(n1, listB.remove(0))) {
                return false;
            }
        }
        return true;
    }
1314818
public static boolean arrayEquals(
      Object leftBase, long leftOffset, Object rightBase, long rightOffset, final long length) {
    int i = 0;

    // check if stars align and we can get both offsets to be aligned
    if ((leftOffset % 8) == (rightOffset % 8)) {
      while ((leftOffset + i) % 8 != 0 && i < length) {
        if (Platform.getByte(leftBase, leftOffset + i) !=
            Platform.getByte(rightBase, rightOffset + i)) {
              return false;
        }
        i += 1;
      }
    }
    // for architectures that support unaligned accesses, chew it up 8 bytes at a time
    if (unaligned || (((leftOffset + i) % 8 == 0) && ((rightOffset + i) % 8 == 0))) {
      while (i <= length - 8) {
        if (Platform.getLong(leftBase, leftOffset + i) !=
            Platform.getLong(rightBase, rightOffset + i)) {
              return false;
        }
        i += 8;
      }
    }
    // this will finish off the unaligned comparisons, or do the entire aligned
    // comparison whichever is needed.
    while (i < length) {
      if (Platform.getByte(leftBase, leftOffset + i) !=
          Platform.getByte(rightBase, rightOffset + i)) {
            return false;
      }
      i += 1;
    }
    return true;
  }
1035904
public final static boolean objectEquals(Object a, Object b) {
        return a == null ?
                b == null ? true : false :
                    b == null ? false : a.equals(b);
    }
1173129
public static boolean argEquals(LToSrtBiFuncDelta the, Object that) {
		return Null.<LToSrtBiFuncDelta> equals(the, that, (one, two) -> {
			if (one.getClass() != two.getClass()) {
				return false;
			}

			LToSrtBiFuncDelta other = (LToSrtBiFuncDelta) two;

			return LBiObjSrtTriple.argEquals(one.function, one.deltaFunction, one.lastValue(), other.function, other.deltaFunction, other.lastValue());
		});
	}
367043
public static boolean isEqualOrNull( Map s1,
                                         Map s2 ) {
        if ( s1 == null
                && s2 == null ) {
            return true;
        } else if ( s1 != null
                && s2 != null
                && s1.size() == s2.size() ) {
            return true;
        }
        return false;
    }
323197
public static boolean shapeEquals(int[] shape1, int[] shape2) {
        if (isColumnVectorShape(shape1) && isColumnVectorShape(shape2)) {
            return Arrays.equals(shape1, shape2);
        }

        if (isRowVectorShape(shape1) && isRowVectorShape(shape2)) {
            int[] shape1Comp = squeeze(shape1);
            int[] shape2Comp = squeeze(shape2);
            return Arrays.equals(shape1Comp, shape2Comp);
        }

        //scalars
        if(shape1.length == 0 || shape2.length == 0) {
            if(shape1.length == 0 && shapeIsScalar(shape2)) {
                return true;
            }

            if(shape2.length == 0 && shapeIsScalar(shape1)) {
                return true;
            }
        }


        shape1 = squeeze(shape1);
        shape2 = squeeze(shape2);

        return scalarEquals(shape1, shape2) || Arrays.equals(shape1, shape2);
    }
1352844
static boolean areSignaturesEqual(Class[] from, Class[] to)
    {
        if (from.length != to.length)
            return false;

        for (int i = 0; i < from.length; i++)
            if (from[i] != to[i])
                return false;

        return true;
    }
633297
private static boolean multiPointEqualsMultiPoint_(MultiPoint multipoint_a,
			MultiPoint multipoint_b, double tolerance,
			ProgressTracker progress_tracker) {
		Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
		multipoint_a.queryEnvelope2D(env_a);
		multipoint_b.queryEnvelope2D(env_b);

		if (!envelopeEqualsEnvelope_(env_a, env_b, tolerance, progress_tracker))
			return false;

		if (multiPointExactlyEqualsMultiPoint_(multipoint_a, multipoint_b,
				tolerance, progress_tracker))
			return true;

		return multiPointCoverageMultiPoint_(multipoint_a, multipoint_b,
				tolerance, false, true, false, progress_tracker);
	}