bufferedInputStream.close();
String text = new String(input, outputResource.getEncoding());
StringBuilder builder = new StringBuilder(text);
for (int i = edits.size(); --i >= 0; )
{
<BUG>TextReplacement replacement = edits.get(i);

builder.replace(replacement.getOffset(), replacement.getOffset() + replacement.getLength(), replacement.getText());
</BUG>
}

bufferedInputStream.close();
String text = new String(input, outputResource.getEncoding());
StringBuilder builder = new StringBuilder(text);
for (int i = edits.size(); --i >= 0; )
{
ITextReplacement replacement = edits.get(i);
int offset = replacement.getOffset();
builder.replace(offset, offset + replacement.getLength(), replacement.getReplacementText());
}
