Buggy code:
if ( ! _matched ) { _switchResult = CollectionLiterals . < XExpression > newArrayList ( x ) ; } final List < XExpression > children = _switchResult ; boolean _or = false ; boolean _equals = Objects . equal ( open , null ) ; if ( _equals ) { _or = true ; } else { boolean _equals_1 = Objects . equal ( close , null ) ; _or = _equals_1 ; } if ( _or ) { } else { boolean _isEmpty = children . isEmpty ( ) ; if ( _isEmpty ) { IHiddenRegion _nextHiddenRegion = open . getNextHiddenRegion ( ) ; boolean _containsComment = _nextHiddenRegion . containsComment ( ) ; if ( _containsComment ) { final Procedure1 < IHiddenRegionFormatter > _function = new Procedure1 < IHiddenRegionFormatter > ( ) { @ Override public void apply ( final IHiddenRegionFormatter it ) { it . newLine ( ) ; it . increaseIndentation ( ) ; it . decreaseIndentation ( ) ; } } ; format . append ( open , _function ) ; } else { final Procedure1 < IHiddenRegionFormatter > _function_1 = new Procedure1 < IHiddenRegionFormatter > ( ) { @ Override public void apply ( final IHiddenRegionFormatter it ) { it . noSpace ( ) ; } } ; format . append ( open , _function_1 ) ; } } else { IHiddenRegion _previousHiddenRegion = close . getPreviousHiddenRegion ( ) ; boolean _isMultiline = _previousHiddenRegion . isMultiline ( ) ; if ( _isMultiline ) { final Procedure1 < IHiddenRegionFormatter > _function_2 = new Procedure1 < IHiddenRegionFormatter > ( ) { @ Override public void apply ( final IHiddenRegionFormatter it ) { it . oneSpace ( ) ; } } ; final ISemanticRegion last = this . formatClosureParams ( expr , open , format , _function_2 ) ; this . formatExpressionsMultiline ( children , last , close , format ) ; } else { IHiddenRegion _previousHiddenRegion_1 = open . getPreviousHiddenRegion ( ) ; ISemanticRegion _nextSemanticRegion = _previousHiddenRegion_1 . getNextSemanticRegion ( ) ; final int offset = _nextSemanticRegion . getEndOffset ( ) ; int _offset = close . getOffset ( ) ; final int length = _offset - offset ; final ISubFormatter _function_3 = new ISubFormatter ( ) { @ Override public void format ( final IFormattableSubDocument doc ) throws FormattingNotApplicableException { @ Extension final IFormattableSubDocument it = doc . requireFitsInLine ( ) ; final Procedure1 < IHiddenRegionFormatter > _function = new Procedure1 < IHiddenRegionFormatter > ( ) { @ Override public void apply ( final IHiddenRegionFormatter it ) { it . noSpace ( ) ; } } ; final ISemanticRegion last = XbaseFormatter . this . formatClosureParams ( expr , open , it , _function ) ; final Procedure1 < IHiddenRegionFormatter > _function_1 = new Procedure1 < IHiddenRegionFormatter > ( ) { @ Override public void apply ( final IHiddenRegionFormatter it ) { it . noSpace ( ) ; } } ; it . append ( last , _function_1 ) ; for ( final XExpression c : children ) { { XbaseFormatter . this . format ( c , it ) ; final ISemanticRegion semicolon = XbaseFormatter . this . regionAccess . immediatelyFollowingKeyword ( c , ";" ) ; boolean _notEquals = ! ( Objects . equal ( semicolon , null ) ) ; if ( _notEquals ) { final Procedure1 < IHiddenRegionFormatter > _function_2 = new Procedure1 < IHiddenRegionFormatter > ( ) { @ Override public void apply ( final IHiddenRegionFormatter it ) { it . noSpace ( ) ; } } ; ISemanticRegion _prepend = it . prepend ( semicolon , _function_2 ) ; final Procedure1 < IHiddenRegionFormatter > _function_3 = new Procedure1 < IHiddenRegionFormatter > ( ) { @ Override public void apply ( final IHiddenRegionFormatter it ) { XExpression _last = IterableExtensions . < XExpression > last ( children ) ; boolean _equals = Objects . equal ( c , _last ) ; if ( _equals ) { it . noSpace ( ) ; } else { it . oneSpace ( ) ; } } } ; it . append ( _prepend , _function_3 ) ; } else { final Procedure1 < IHiddenRegionFormatter > _function_4 = new Procedure1 < IHiddenRegionFormatter > ( ) { @ Override public void apply ( final IHiddenRegionFormatter it ) { XExpression _last = IterableExtensions . < XExpression > last ( children ) ; boolean _equals = Objects . equal ( c , _last ) ; if ( _equals ) { it . noSpace ( ) ; } else { it . oneSpace ( ) ; } } } ; it . < XExpression > append ( c , _function_4 ) ; } } } } } ; final ISubFormatter _function_4 = new ISubFormatter ( ) { @ Override public void format ( final IFormattableSubDocument doc ) throws FormattingNotApplicableException { final Procedure1 < IHiddenRegionFormatter > _function = new Procedure1 < IHiddenRegionFormatter > ( ) { @ Override public void apply ( final IHiddenRegionFormatter it ) { it . oneSpace ( ) ; } } ; <START_BUG> final ISemanticRegion last = XbaseFormatter . this . formatClosureParams ( expr , open , format , _function ) ; <END_BUG> XbaseFormatter . this . formatExpressionsMultiline ( children , last , close , doc ) ; } } ; format . formatConditionally ( offset , length , _function_3 , _function_4 ) ; } } } } protected void _format ( final XInstanceOfExpression expr , @ Extension final IFormattableDocument doc ) { } protected void formatExpressionsMultiline ( final Collection < ? extends XExpression > expressions , final ISemanticRegion open , final ISemanticRegion close , @ Extension final IFormattableDocument format ) { } protected void formatExpressionsSingleline ( final Collection < ? extends XExpression > expressions , final ISemanticRegion open , final ISemanticRegion close , @ Extension final IFormattableDocument format ) { } protected boolean isMultilineOrInNewLine ( final EObject obj ) { } public void format ( final Object expr , final IFormattableDocument format ) { } @ Pure public XbaseGrammarAccess getGrammar ( ) { } }

Fix:
final ISemanticRegion last = XbaseFormatter . this . formatClosureParams ( expr , open , doc , _function ) ;