Source:
public int compare(final ReadEndsForMarkDuplicates lhs, final ReadEndsForMarkDuplicates rhs) { int compareDifference = lhs.libraryId - rhs.libraryId; if (useBarcodes) { final ReadEndsForMarkDuplicatesWithBarcodes lhsWithBarcodes = (ReadEndsForMarkDuplicatesWithBarcodes) lhs; final ReadEndsForMarkDuplicatesWithBarcodes rhsWithBarcodes = (ReadEndsForMarkDuplicatesWithBarcodes) rhs; if (compareDifference == 0) { compareDifference = Integer.compare(lhsWithBarcodes.barcode, rhsWithBarcodes.barcode); } if (compareDifference == 0) { compareDifference = Integer.compare(lhsWithBarcodes.readOneBarcode, rhsWithBarcodes.readOneBarcode); } if (compareDifference == 0) { compareDifference = Integer.compare(lhsWithBarcodes.readTwoBarcode, rhsWithBarcodes.readTwoBarcode); } } if (compareDifference == 0) { compareDifference = lhs.read1ReferenceIndex - rhs.read1ReferenceIndex; } if (compareDifference == 0) { compareDifference = lhs.read1Coordinate - rhs.read1Coordinate; } if (compareDifference == 0) { compareDifference = lhs.orientation - rhs.orientation; } if (compareDifference == 0) { compareDifference = lhs.read2ReferenceIndex - rhs.read2ReferenceIndex; } if (compareDifference == 0) { compareDifference = lhs.read2Coordinate - rhs.read2Coordinate; } if (compareDifference == 0) compareDifference = lhs.hashCode() - rhs.hashCode(); if (compareDifference == 0) { compareDifference = (int) (lhs.read1IndexInFile - rhs.read1IndexInFile); } if (compareDifference == 0) { compareDifference = (int) (lhs.read2IndexInFile - rhs.read2IndexInFile); } return compareDifference; }

Target:
public int compare(final ReadEndsForMarkDuplicates lhs, final ReadEndsForMarkDuplicates rhs) { int compareDifference = lhs.libraryId - rhs.libraryId; if (useBarcodes) { final ReadEndsForMarkDuplicatesWithBarcodes lhsWithBarcodes = (ReadEndsForMarkDuplicatesWithBarcodes) lhs; final ReadEndsForMarkDuplicatesWithBarcodes rhsWithBarcodes = (ReadEndsForMarkDuplicatesWithBarcodes) rhs; if (compareDifference == 0) { compareDifference = Integer.compare(lhsWithBarcodes.barcode, rhsWithBarcodes.barcode); } if (compareDifference == 0) { compareDifference = Integer.compare(lhsWithBarcodes.readOneBarcode, rhsWithBarcodes.readOneBarcode); } if (compareDifference == 0) { compareDifference = Integer.compare(lhsWithBarcodes.readTwoBarcode, rhsWithBarcodes.readTwoBarcode); } } if (compareDifference == 0) { compareDifference = lhs.read1ReferenceIndex - rhs.read1ReferenceIndex; } if (compareDifference == 0) { compareDifference = lhs.read1Coordinate - rhs.read1Coordinate; } if (compareDifference == 0) { compareDifference = lhs.orientation - rhs.orientation; } if (compareDifference == 0) { compareDifference = lhs.read2ReferenceIndex - rhs.read2ReferenceIndex; } if (compareDifference == 0) { compareDifference = lhs.read2Coordinate - rhs.read2Coordinate; } if (compareDifference == 0) { compareDifference = lhs.getTile() - rhs.getTile(); } if (compareDifference == 0) { compareDifference = lhs.getX() - rhs.getX(); } if (compareDifference == 0) { compareDifference = lhs.getY() - rhs.getY(); } if (compareDifference == 0) { compareDifference = (int) (lhs.read1IndexInFile - rhs.read1IndexInFile); } if (compareDifference == 0) { compareDifference = (int) (lhs.read2IndexInFile - rhs.read2IndexInFile); } return compareDifference; }