int (int offset) { if (myCallExpression == null) return offset - 1; List<Couple<Integer>> replacements = PropertyFoldingBuilder.format(myCallExpression).second; if (replacements == null) return offset - 1; Iterator<Couple<Integer>> it = replacements.iterator(); int diff = 0; while (it.hasNext()) { Couple<Integer> start = it.next(); Couple<Integer> end = it.next(); if (offset <= start.second) return offset + start.first - start.second - 1; if (offset < end.second) return end.first - 2; diff = end.second - end.first; } return offset - diff - 1; }