int (int indexOfPage) { if (indexOfPage == 0) { return 0; } if (indexOfPage >= 1 && indexOfPage <= symbolOffsetToEndOfPage.size()) { return symbolOffsetToEndOfPage.get(indexOfPage - 1); } int emergencyResult = 0; if (indexOfPage > symbolOffsetToEndOfPage.size()) { emergencyResult = symbolOffsetToEndOfPage.get(symbolOffsetToEndOfPage.size() - 1); } LOG.info(new IllegalArgumentException( "Large File Editor Subsystem] DocumentOfPagesModel.getSymbolOffsetToStartOfPage(...):" + " indexOfPage=" + indexOfPage + " symbolOffsetToEndOfPage.size()=" + symbolOffsetToEndOfPage.size())); return emergencyResult; }