return myDelegate;
}
@Override
public int hostToInjected(int hostOffset) {
synchronized (myLock) {
<BUG>if (hostOffset < myShreds.get(0).getHostRangeMarker().getStartOffset()) return myShreds.get(0).getPrefix().length();
int offset = 0;</BUG>
for (int i = 0; i < myShreds.size(); i++) {
offset += myShreds.get(i).getPrefix().length();
<BUG>Segment currentRange = myShreds.get(i).getHostRangeMarker();
Segment nextRange = i == myShreds.size() - 1 ? null : myShreds.get(i + 1).getHostRangeMarker();</BUG>
if (nextRange == null || hostOffset < nextRange.getStartOffset()) {

return myDelegate;
}
@Override
public int hostToInjected(int hostOffset) {
synchronized (myLock) {
Segment hostRangeMarker = myShreds.get(0).getHostRangeMarker();
if (hostRangeMarker == null || hostOffset < hostRangeMarker.getStartOffset()) return myShreds.get(0).getPrefix().length();
int offset = 0;
for (int i = 0; i < myShreds.size(); i++) {
offset += myShreds.get(i).getPrefix().length();
Segment currentRange = myShreds.get(i).getHostRangeMarker();
if (currentRange == null) continue;
Segment nextRange = i == myShreds.size() - 1 ? null : myShreds.get(i + 1).getHostRangeMarker();
if (nextRange == null || hostOffset < nextRange.getStartOffset()) {
