logger.debug("addData() called with streamedData = " + streamedData);
int indexOfLastCharPlusOne;
if (streamedData.getColourMarkers().size() == 0) {
indexOfLastCharPlusOne = streamedData.getText().length();
} else {
<BUG>indexOfLastCharPlusOne = streamedData.getColourMarkers().get(0).position;
</BUG>
}
StringBuilder textToAppend = new StringBuilder(streamedData.getText().substring(0, indexOfLastCharPlusOne));
int currNewLineMarkerIndex = 0;

logger.debug("addData() called with streamedData = " + streamedData);
int indexOfLastCharPlusOne;
if (streamedData.getColourMarkers().size() == 0) {
indexOfLastCharPlusOne = streamedData.getText().length();
} else {
indexOfLastCharPlusOne = streamedData.getColourMarkers().get(0).charPos;
}
StringBuilder textToAppend = new StringBuilder(streamedData.getText().substring(0, indexOfLastCharPlusOne));
int currNewLineMarkerIndex = 0;
