Source:
<code>public void read( RECORD record, PageCursor primaryCursor, RecordLoad mode, int recordSize ) throws IOException { int primaryStartOffset = primaryCursor.getOffset(); byte headerByte = primaryCursor.getByte(); boolean inUse = isInUse( headerByte ); boolean doubleRecordUnit = has( headerByte, HEADER_BIT_RECORD_UNIT ); record.setUseFixedReferences( false ); if ( doubleRecordUnit ) { boolean firstRecordUnit = has( headerByte, HEADER_BIT_FIRST_RECORD_UNIT ); if ( !firstRecordUnit ) { record.clear(); primaryCursor.setCursorException( "Expected record to be the first unit in the chain, but record header says it's not" ); return; } long secondaryId = Reference.decode( primaryCursor ); long pageId = pageIdForRecord( secondaryId, primaryCursor.getCurrentPageSize(), recordSize ); int offset = offsetForId( secondaryId, primaryCursor.getCurrentPageSize(), recordSize ); PageCursor secondaryCursor = primaryCursor.openLinkedCursor( pageId ); <START> final boolean secondaryHasNext = secondaryCursor.next(); <END> if ( !secondaryHasNext || offset < 0 ) { record.clear(); primaryCursor.setCursorException( illegalSecondaryReferenceMessage( pageId ) ); return; } secondaryCursor.setOffset( offset + HEADER_BYTE); int primarySize = recordSize - (primaryCursor.getOffset() - primaryStartOffset); int secondarySize = recordSize - HEADER_BYTE; PageCursor composite = CompositePageCursor.compose( primaryCursor, primarySize, secondaryCursor, secondarySize ); doReadInternal( record, composite, recordSize, headerByte, inUse ); record.setSecondaryUnitId( secondaryId ); } else { record.setUseFixedReferences( isUseFixedReferences( headerByte ) ); doReadInternal( record, primaryCursor, recordSize, headerByte, inUse ); } }</code><technical_language>please touch formats, do do</technical_language>

Target:
public void read( RECORD record, PageCursor primaryCursor, RecordLoad mode, int recordSize ) throws IOException { int primaryStartOffset = primaryCursor.getOffset(); byte headerByte = primaryCursor.getByte(); boolean inUse = isInUse( headerByte ); boolean doubleRecordUnit = has( headerByte, HEADER_BIT_RECORD_UNIT ); record.setUseFixedReferences( false ); if ( doubleRecordUnit ) { boolean firstRecordUnit = has( headerByte, HEADER_BIT_FIRST_RECORD_UNIT ); if ( !firstRecordUnit ) { record.clear(); primaryCursor.setCursorException( "Expected record to be the first unit in the chain, but record header says it's not" ); return; } long secondaryId = Reference.decode( primaryCursor ); long pageId = pageIdForRecord( secondaryId, primaryCursor.getCurrentPageSize(), recordSize ); int offset = offsetForId( secondaryId, primaryCursor.getCurrentPageSize(), recordSize ); PageCursor secondaryCursor = primaryCursor.openLinkedCursor( pageId ); if ( (!secondaryCursor.next()) | offset < 0 ) { record.clear(); primaryCursor.setCursorException( illegalSecondaryReferenceMessage( pageId ) ); return; } secondaryCursor.setOffset( offset + HEADER_BYTE); int primarySize = recordSize - (primaryCursor.getOffset() - primaryStartOffset); int secondarySize = recordSize - HEADER_BYTE; PageCursor composite = CompositePageCursor.compose( primaryCursor, primarySize, secondaryCursor, secondarySize ); doReadInternal( record, composite, recordSize, headerByte, inUse ); record.setSecondaryUnitId( secondaryId ); } else { record.setUseFixedReferences( isUseFixedReferences( headerByte ) ); doReadInternal( record, primaryCursor, recordSize, headerByte, inUse ); } }