SVNDebugLog.logInfo("copy-from-source-instructions: " + sourceInstructions + ", source view length: " + myDiffWindowBuilder.getDiffWindow().getSourceViewLength());
    private int getContents(byte[] buffer) throws SVNException {        int remaining = buffer.length;        int targetPos = 0;        /* Special case for when there are no delta reps, only a plain         * text.          */        if(myRepStateList.isEmpty()){            int copyLength = remaining > mySourceState.end - mySourceState.offset ? (int)(mySourceState.end - mySourceState.offset) : remaining;            int r = copyLength;            try{                r = mySourceState.file.read(buffer, 0, copyLength);            }catch(IOException ioe){                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, ioe.getLocalizedMessage());                SVNErrorManager.error(err, ioe);            }            mySourceState.offset += r;            return r;        }        while(remaining > 0){            if(myBuffer != null){                //copy bytes to buffer and mobe the bufPos pointer                /* Determine how much to copy from the buffer. */                int copyLength = myBuffer.length - myBufPos;                if(copyLength > remaining){                    copyLength = remaining;                }                /* Actually copy the data. */                System.arraycopy(myBuffer, myBufPos, buffer, targetPos, copyLength);                myBufPos += copyLength;                targetPos += copyLength;                remaining -= copyLength;                /* If the buffer is all used up, clear it.                  */                if(myBufPos == myBuffer.length){                    myBuffer = null;                    myBufPos = 0;                }            }else{                FSRepresentationState resultState = (FSRepresentationState)myRepStateList.getFirst();                if(resultState.offset == resultState.end){                    break;                }                int startIndex = 0;                for(ListIterator states = myRepStateList.listIterator(); states.hasNext();){                    FSRepresentationState curState = (FSRepresentationState)states.next();                    startIndex = myRepStateList.indexOf(curState);                    myDiffWindowBuilder.reset(SVNDiffWindowBuilder.OFFSET);                    try{                        long currentPos = curState.file.getFilePointer();                        myDiffWindowBuilder.accept(curState.file);                        //go back to the beginning of the window's offsets section                        curState.file.seek(currentPos);                    }catch(IOException ioe){                        SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, ioe.getLocalizedMessage());                        SVNErrorManager.error(err, ioe);                    }                    SVNDiffInstruction[] instructions = SVNDiffWindowBuilder.createInstructions(myDiffWindowBuilder.getInstructionsData());                    int sourceInstructions = 0;                    for(int i = 0; i < instructions.length; i++){                        if(instructions[i].type == SVNDiffInstruction.COPY_FROM_SOURCE){                            sourceInstructions++;                        }                    }                    SVNDebugLog.logInfo("copy-from-source-instructions: " + sourceInstructions + ", source view length: " + myDiffWindowBuilder.getDiffWindow().getSourceViewLength());                    if(sourceInstructions == 0){                        break;                    }                }                myBuffer = getNextTextChunk(startIndex);            }        }        return targetPos;    }