test_class.file: flink-core/src/test/java/org/apache/flink/util/AbstractIDTest.java
test_class.identifier: AbstractIDTest
test_class.superclass: extends TestLogger
test_case.body: @Test
  	public void testCompare() {
  		try {
  			AbstractID id1 = new AbstractID(0, 0);
  			AbstractID id2 = new AbstractID(1, 0);
  			AbstractID id3 = new AbstractID(0, 1);
  			AbstractID id4 = new AbstractID(-1, 0);
  			AbstractID id5 = new AbstractID(0, -1);
  			AbstractID id6 = new AbstractID(-1, -1);
  			
  			AbstractID id7 = new AbstractID(Long.MAX_VALUE, Long.MAX_VALUE);
  			AbstractID id8 = new AbstractID(Long.MIN_VALUE, Long.MIN_VALUE);
  			AbstractID id9 = new AbstractID(Long.MAX_VALUE, Long.MIN_VALUE);
  			AbstractID id10 = new AbstractID(Long.MIN_VALUE, Long.MAX_VALUE);
  			
  			// test self equality
  			assertEquals(0, id1.compareTo(CommonTestUtils.createCopyWritable(id1)));
  			assertEquals(0, id2.compareTo(CommonTestUtils.createCopyWritable(id2)));
  			assertEquals(0, id3.compareTo(CommonTestUtils.createCopyWritable(id3)));
  			assertEquals(0, id4.compareTo(CommonTestUtils.createCopyWritable(id4)));
  			assertEquals(0, id5.compareTo(CommonTestUtils.createCopyWritable(id5)));
  			assertEquals(0, id6.compareTo(CommonTestUtils.createCopyWritable(id6)));
  			assertEquals(0, id7.compareTo(CommonTestUtils.createCopyWritable(id7)));
  			assertEquals(0, id8.compareTo(CommonTestUtils.createCopyWritable(id8)));
  			assertEquals(0, id9.compareTo(CommonTestUtils.createCopyWritable(id9)));
  			assertEquals(0, id10.compareTo(CommonTestUtils.createCopyWritable(id10)));
  			
  			// test order
  			assertCompare(id1, id2, -1);
  			assertCompare(id1, id3, -1);
  			assertCompare(id1, id4, 1);
  			assertCompare(id1, id5, 1);
  			assertCompare(id1, id6, 1);
  			assertCompare(id2, id5, 1);
  			assertCompare(id3, id5, 1);
  			assertCompare(id2, id6, 1);
  			assertCompare(id3, id6, 1);
  			assertCompare(id1, id7, -1);
  			assertCompare(id1, id8, 1);
  			assertCompare(id7, id8, 1);
  			assertCompare(id9, id10, -1);
  			assertCompare(id7, id9, 1);
  			assertCompare(id7, id10, 1);
  			assertCompare(id8, id9, -1);
  			assertCompare(id8, id10, -1);
  		}
  		catch (Exception e) {
  			e.printStackTrace();
  			fail(e.getMessage());
  		}
  	}
test_case.class_method_signature: AbstractIDTest.testCompare()
test_case.full_signature: @Test public void testCompare()
test_case.identifier: testCompare
test_case.invocations: assertEquals compareTo createCopyWritable assertEquals compareTo createCopyWritable assertEquals compareTo createCopyWritable assertEquals compareTo createCopyWritable assertEquals compareTo createCopyWritable assertEquals compareTo createCopyWritable assertEquals compareTo createCopyWritable assertEquals compareTo createCopyWritable assertEquals compareTo createCopyWritable assertEquals compareTo createCopyWritable assertCompare assertCompare assertCompare assertCompare assertCompare assertCompare assertCompare assertCompare assertCompare assertCompare assertCompare assertCompare assertCompare assertCompare assertCompare assertCompare assertCompare printStackTrace fail getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCompare()
focal_class.declarator: serialVersionUID = 1L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 1L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: RND = new Random()
focal_class.modifier: private static final
focal_class.original_string: private static final Random RND = new Random();
focal_class.type: Random
focal_class.var_name: RND
focal_class.declarator: SIZE_OF_LONG = 8
focal_class.modifier: private static final
focal_class.original_string: private static final int SIZE_OF_LONG = 8;
focal_class.type: int
focal_class.var_name: SIZE_OF_LONG
focal_class.declarator: SIZE = 2 * SIZE_OF_LONG
focal_class.modifier: public static final
focal_class.original_string: public static final int SIZE = 2 * SIZE_OF_LONG;
focal_class.type: int
focal_class.var_name: SIZE
focal_class.declarator: upperPart
focal_class.modifier: protected
focal_class.original_string: protected long upperPart;
focal_class.type: long
focal_class.var_name: upperPart
focal_class.declarator: lowerPart
focal_class.modifier: protected
focal_class.original_string: protected long lowerPart;
focal_class.type: long
focal_class.var_name: lowerPart
focal_class.declarator: toString
focal_class.modifier: private
focal_class.original_string: private String toString;
focal_class.type: String
focal_class.var_name: toString
focal_class.file: flink-core/src/main/java/org/apache/flink/util/AbstractID.java
focal_class.identifier: AbstractID
focal_class.interfaces: implements IOReadableWritable, Comparable<AbstractID>, java.io.Serializable
focal_class.class_method_signature: AbstractID.AbstractID(byte[] bytes)
focal_class.full_signature: public  AbstractID(byte[] bytes)
focal_class.identifier: AbstractID
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes)
focal_class.signature:  AbstractID(byte[] bytes)
focal_class.class_method_signature: AbstractID.AbstractID(long lowerPart, long upperPart)
focal_class.full_signature: public  AbstractID(long lowerPart, long upperPart)
focal_class.identifier: AbstractID
focal_class.modifiers: public
focal_class.parameters: (long lowerPart, long upperPart)
focal_class.signature:  AbstractID(long lowerPart, long upperPart)
focal_class.class_method_signature: AbstractID.AbstractID(AbstractID id)
focal_class.full_signature: public  AbstractID(AbstractID id)
focal_class.identifier: AbstractID
focal_class.modifiers: public
focal_class.parameters: (AbstractID id)
focal_class.signature:  AbstractID(AbstractID id)
focal_class.class_method_signature: AbstractID.AbstractID()
focal_class.full_signature: public  AbstractID()
focal_class.identifier: AbstractID
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  AbstractID()
focal_class.class_method_signature: AbstractID.getLowerPart()
focal_class.full_signature: public long getLowerPart()
focal_class.identifier: getLowerPart
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getLowerPart()
focal_class.class_method_signature: AbstractID.getUpperPart()
focal_class.full_signature: public long getUpperPart()
focal_class.identifier: getUpperPart
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getUpperPart()
focal_class.class_method_signature: AbstractID.getBytes()
focal_class.full_signature: public byte[] getBytes()
focal_class.identifier: getBytes
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] getBytes()
focal_class.class_method_signature: AbstractID.read(DataInputView in)
focal_class.full_signature: @Override public void read(DataInputView in)
focal_class.identifier: read
focal_class.modifiers: @Override public
focal_class.parameters: (DataInputView in)
focal_class.return: void
focal_class.signature: void read(DataInputView in)
focal_class.class_method_signature: AbstractID.write(DataOutputView out)
focal_class.full_signature: @Override public void write(DataOutputView out)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (DataOutputView out)
focal_class.return: void
focal_class.signature: void write(DataOutputView out)
focal_class.class_method_signature: AbstractID.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: AbstractID.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: AbstractID.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: AbstractID.compareTo(AbstractID o)
focal_class.full_signature: @Override public int compareTo(AbstractID o)
focal_class.identifier: compareTo
focal_class.modifiers: @Override public
focal_class.parameters: (AbstractID o)
focal_class.return: int
focal_class.signature: int compareTo(AbstractID o)
focal_class.class_method_signature: AbstractID.byteArrayToLong(byte[] ba, int offset)
focal_class.full_signature: private static long byteArrayToLong(byte[] ba, int offset)
focal_class.identifier: byteArrayToLong
focal_class.modifiers: private static
focal_class.parameters: (byte[] ba, int offset)
focal_class.return: long
focal_class.signature: long byteArrayToLong(byte[] ba, int offset)
focal_class.class_method_signature: AbstractID.longToByteArray(long l, byte[] ba, int offset)
focal_class.full_signature: private static void longToByteArray(long l, byte[] ba, int offset)
focal_class.identifier: longToByteArray
focal_class.modifiers: private static
focal_class.parameters: (long l, byte[] ba, int offset)
focal_class.return: void
focal_class.signature: void longToByteArray(long l, byte[] ba, int offset)
focal_method.body: @Override
  	public int compareTo(AbstractID o) {
  		int diff1 = (this.upperPart < o.upperPart) ? -1 : ((this.upperPart == o.upperPart) ? 0 : 1);
  		int diff2 = (this.lowerPart < o.lowerPart) ? -1 : ((this.lowerPart == o.lowerPart) ? 0 : 1);
  		return diff1 == 0 ? diff2 : diff1;
  	}
focal_method.class_method_signature: AbstractID.compareTo(AbstractID o)
focal_method.full_signature: @Override public int compareTo(AbstractID o)
focal_method.identifier: compareTo
focal_method.modifiers: @Override public
focal_method.parameters: (AbstractID o)
focal_method.return: int
focal_method.signature: int compareTo(AbstractID o)