}
@NotNull
public List<String> getLines(int from, int to) {
ArrayList<String> result = new ArrayList<String>();
for (int i = from; i <= to; i++) {
<BUG>if (i >= myDocument.getLineCount()) break;
final String line = getLine(i);
result.add(line);
</BUG>
}

}
public int getLineNum(int offset) {
return myDocument.getLineNumber(offset);
}
@NotNull
public List<String> getLines() {
return getLines(0, getLineCount(myDocument) - 1);
}
@NotNull
public List<String> getLines(int from, int to) {
ArrayList<String> result = new ArrayList<String>();
for (int i = from; i <= to; i++) {
result.add(getLine(i));
}
