synchronized (GapContent.this) {  int mark = positionMarks[index];  assert mark <= gapStart || mark >= gapEnd : "mark: " + mark + ", gapStart: " + gapStart + ", gapEnd: " + gapEnd; int res = mark; if (mark > gapStart) res -= (gapEnd - gapStart); return res; }
return mark.getOffset();
    public int getOffset()    {      synchronized (GapContent.this)        {          // Fetch the actual mark.          int mark = positionMarks[index];      // Check precondition.      assert mark <= gapStart || mark >= gapEnd : "mark: " + mark                                               + ", gapStart: " + gapStart                                               + ", gapEnd: " + gapEnd;          int res = mark;          if (mark > gapStart)            res -= (gapEnd - gapStart);          return res;        }    }