Buggy code:
public class DepositEndpointSelectionLayoutListener implements LayoutClickListener { private static final long serialVersionUID = 3913787093238168593L ; private Logger LOG = LoggerFactory . getLogger ( DepositEndpointSelectionLayoutListener . class ) ; final ILabsInvestigationAction labsInvestigationAction ; final ILabsPanel labsPanel ; public DepositEndpointSelectionLayoutListener ( final ILabsInvestigationAction labsInvestigationAction , final ILabsPanel labsPanel ) { } @ Override public void layoutClick ( LayoutClickEvent event ) { final Component component = event . getComponent ( ) ; final String addNewItemProperty = "Add<seq2seq4repair_space>new..." ; if ( ! ( component instanceof HorizontalLayout ) ) { LOG . error ( "This<seq2seq4repair_space>listener<seq2seq4repair_space>is<seq2seq4repair_space>defined<seq2seq4repair_space>only<seq2seq4repair_space>for<seq2seq4repair_space>horizontalLayout" ) ; return ; } Component dataComponent = null ; try { if ( ( dataComponent = ( ( HorizontalLayout ) ( component ) ) . getComponent ( 1 ) ) == null ) { return ; } if ( dataComponent instanceof Label ) { final BeanItemContainer < String > itemContainer = new BeanItemContainer < String > ( String . class ) ; for ( Iterator < String > iterator = ELabsCache . getDepositEndpoints ( ) . iterator ( ) ; iterator . hasNext ( ) ; ) { String element = iterator . next ( ) ; itemContainer . addItem ( element ) ; } itemContainer . addItem ( addNewItemProperty ) ; final Component newComponent = LabsLayoutHelper . createDynamicComboBoxFieldForInvestigation ( this . labsInvestigationAction , null , null , itemContainer ) ; if ( newComponent != null ) { ( ( HorizontalLayout ) ( component ) ) . replaceComponent ( dataComponent , newComponent ) ; ( ( HorizontalLayout ) ( component ) ) . setComponentAlignment ( ( ( HorizontalLayout ) ( component ) ) . getComponent ( 1 ) , MIDDLE_LEFT ) ; ( ( HorizontalLayout ) ( component ) ) . setDescription ( USER_DESCR_ON_HOR_LAYOUT_TO_SAVE ) ; ( ( Label ) ( ( ( HorizontalLayout ) ( component ) ) . getComponent ( 0 ) ) ) . setDescription ( USER_DESCR_ON_LABEL_TO_SAVE ) ; if ( newComponent instanceof ComboBox ) { ( ( ComboBox ) ( newComponent ) ) . addListener ( new Property . ValueChangeListener ( ) { private static final long serialVersionUID = 310234702020385025L ; private Window addOnWindow = null ; @ Override public void valueChange ( ValueChangeEvent event ) { if ( ( event . getProperty ( ) . getValue ( ) . equals ( addNewItemProperty ) ) && ( ( addOnWindow ) == null ) ) { DepositEndpointSelectionLayoutListener . this . labsPanel . getReference ( ) . getApplication ( ) . getMainWindow ( ) . addWindow ( ( addOnWindow = new AddNewEndpointURIWindow ( new AddNewEndpointURIWindow . Callback ( ) { @ Override public void onAcceptAction ( String inputURLText ) { itemContainer . removeItem ( addNewItemProperty ) ; itemContainer . addItem ( inputURLText ) ; itemContainer . addItem ( addNewItemProperty ) ; ( ( ComboBox ) ( newComponent ) ) . select ( inputURLText ) ; addOnWindow = null ; } @ Override public void onRefuseAction ( ) { ( ( ComboBox ) ( newComponent ) ) . select ( ELabsCache . getDefaultDepositEndpoint ( ) ) ; } <START_BUG> } , true ) ) ) ; <END_BUG> } } } ) ; } } } else if ( dataComponent instanceof ComboBox ) { if ( ! ( event . getChildComponent ( ) . equals ( dataComponent ) ) ) { LabsLayoutHelper . switchToLabelFromEditedField ( ( ( HorizontalLayout ) ( component ) ) ) ; } } else { LOG . error ( ( "Listener<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>bound<seq2seq4repair_space>to<seq2seq4repair_space>this<seq2seq4repair_space>type<seq2seq4repair_space>of<seq2seq4repair_space>UI<seq2seq4repair_space>component:<seq2seq4repair_space>" + ( dataComponent . getClass ( ) . getSimpleName ( ) ) ) ) ; } } catch ( IndexOutOfBoundsException e ) { LOG . error ( e . getLocalizedMessage ( ) ) ; } } }

Fix:
} , false ) ) ) ;