if (parseResult != null)
{
IPreferenceValues configuration = preferencesProvider.getPreferenceValues(outputResource);
try
{
<BUG>List<TextReplacement> edits = formatter.format(outputResource, 0, parseResult.getRootNode().getLength(), new FormattingPreferenceValues(configuration));
BufferedInputStream bufferedInputStream = new BufferedInputStream(resourceSet.getURIConverter().createInputStream(outputResource.getURI()));</BUG>
byte[] input = new byte[bufferedInputStream.available()];
bufferedInputStream.read(input);
bufferedInputStream.close();

if (parseResult != null)
{
IPreferenceValues configuration = preferencesProvider.getPreferenceValues(outputResource);
try
{
FormatterRequest request = new FormatterRequest();
request.setTextRegionAccess(new NodeModelBasedRegionAccessBuilder().withResource(outputResource).create());
request.setPreferences(new TypedPreferenceValues(configuration));
request.addRegion(parseResult.getRootNode().getTotalTextRegion());
List<ITextReplacement> edits = formatter.format(request);
BufferedInputStream bufferedInputStream = new BufferedInputStream(resourceSet.getURIConverter().createInputStream(outputResource.getURI()));
byte[] input = new byte[bufferedInputStream.available()];
bufferedInputStream.read(input);
bufferedInputStream.close();
