int clientAreaHeight = getClientArea().height;
void calculateTopIndex() {	int oldTopIndex = topIndex;	int verticalIncrement = getVerticalIncrement();	int clientAreaHeight = getClientArea().height;		if (verticalIncrement == 0) {		return;	}	topIndex = Compatibility.ceil(verticalScrollOffset, verticalIncrement);	// Set top index to partially visible top line if no line is fully 	// visible but at least some of the widget client area is visible.	// Fixes bug 15088.	if (topIndex > 0) {		if (clientAreaHeight > 0) {			int bottomPixel = verticalScrollOffset + clientAreaHeight;			int fullLineTopPixel = topIndex * verticalIncrement;			int fullLineVisibleHeight = bottomPixel - fullLineTopPixel;			// set top index to partially visible line if no line fully fits in 			// client area or if space is available but not used (the latter should			// never happen because we use claimBottomFreeSpace)			if (fullLineVisibleHeight < verticalIncrement) {				topIndex--;			}		}		else 		if (topIndex >= content.getLineCount()) {			topIndex = content.getLineCount() - 1;		}	}	if (topIndex != oldTopIndex) {		topOffset = content.getOffsetAtLine(topIndex);		lineCache.calculate(topIndex, getPartialBottomIndex() - topIndex + 1);		setHorizontalScrollBar();	}}