test_class.file: feya/libraries/archive_diff/diff.shared/src/test/java/com/google/archivepatcher/shared/TypedRangeTest.java
test_class.identifier: TypedRangeTest
test_case.body: @Test
    public void testHashCode() {
      TypedRange<String> range1a = new TypedRange<String>(123, 456, "hi mom");
      TypedRange<String> range1b = new TypedRange<String>(123, 456, "hi mom");
      Assert.assertEquals(range1a.hashCode(), range1b.hashCode());
      Set<Integer> hashCodes = new HashSet<Integer>();
      hashCodes.add(range1a.hashCode());
      hashCodes.add(new TypedRange<String>(123 + 1, 456, "hi mom").hashCode()); // offset changed
      hashCodes.add(new TypedRange<String>(123, 456 + 1, "hi mom").hashCode()); // length changed
      hashCodes.add(new TypedRange<String>(123 + 1, 456, "x").hashCode()); // metadata changed
      hashCodes.add(new TypedRange<String>(123 + 1, 456, null).hashCode()); // no metadata at all
      // Assert that all 4 hash codes are unique
      Assert.assertEquals(5, hashCodes.size());
    }
test_case.class_method_signature: TypedRangeTest.testHashCode()
test_case.full_signature: @Test public void testHashCode()
test_case.identifier: testHashCode
test_case.invocations: assertEquals hashCode hashCode add hashCode add hashCode add hashCode add hashCode add hashCode assertEquals size
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testHashCode()
focal_class.declarator: offset
focal_class.modifier: private final
focal_class.original_string: private final long offset;
focal_class.type: long
focal_class.var_name: offset
focal_class.declarator: length
focal_class.modifier: private final
focal_class.original_string: private final long length;
focal_class.type: long
focal_class.var_name: length
focal_class.declarator: metadata
focal_class.modifier: private final
focal_class.original_string: private final T metadata;
focal_class.type: T
focal_class.var_name: metadata
focal_class.file: feya/libraries/archive_diff/diff.shared/src/main/java/com/google/archivepatcher/shared/TypedRange.java
focal_class.identifier: TypedRange
focal_class.interfaces: implements Comparable<TypedRange<T>>
focal_class.class_method_signature: TypedRange.TypedRange(long offset, long length, T metadata)
focal_class.full_signature: public  TypedRange(long offset, long length, T metadata)
focal_class.identifier: TypedRange
focal_class.modifiers: public
focal_class.parameters: (long offset, long length, T metadata)
focal_class.signature:  TypedRange(long offset, long length, T metadata)
focal_class.class_method_signature: TypedRange.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: TypedRange.getOffset()
focal_class.full_signature: public long getOffset()
focal_class.identifier: getOffset
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getOffset()
focal_class.class_method_signature: TypedRange.getLength()
focal_class.full_signature: public long getLength()
focal_class.identifier: getLength
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getLength()
focal_class.class_method_signature: TypedRange.getMetadata()
focal_class.full_signature: public T getMetadata()
focal_class.identifier: getMetadata
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: T
focal_class.signature: T getMetadata()
focal_class.class_method_signature: TypedRange.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: TypedRange.equals(Object obj)
focal_class.full_signature: @Override public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_class.class_method_signature: TypedRange.compareTo(TypedRange<T> other)
focal_class.full_signature: @Override public int compareTo(TypedRange<T> other)
focal_class.identifier: compareTo
focal_class.modifiers: @Override public
focal_class.parameters: (TypedRange<T> other)
focal_class.return: int
focal_class.signature: int compareTo(TypedRange<T> other)
focal_method.body: @Override
    public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result + (int) (length ^ (length >>> 32));
      result = prime * result + ((metadata == null) ? 0 : metadata.hashCode());
      result = prime * result + (int) (offset ^ (offset >>> 32));
      return result;
    }
focal_method.class_method_signature: TypedRange.hashCode()
focal_method.full_signature: @Override public int hashCode()
focal_method.identifier: hashCode
focal_method.invocations: hashCode
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: int
focal_method.signature: int hashCode()