Buggy code:
@ JavaScriptSupport public class ColumnSelector extends ControlContainer { private static final long serialVersionUID = 1L ; private enum EventType { COLUMN_UPDATED ; } private int nextId = 0 ; private List < ColumnStub > columns = new ArrayList < ColumnStub > ( ) ; private Map < Integer , ColumnStub > idColumnMap = new HashMap < Integer , ColumnStub > ( ) ; private Map < Integer , CheckBox > checkBoxes = new HashMap < Integer , CheckBox > ( ) ; private String cssClass = "j-listColSel" ; private Field fldOrder = null ; private int width = 580 ; private int height = 300 ; private boolean inAddMode = false ; private boolean immediateUpdate = false ; private boolean showActions = true ; private boolean hideInvisibles = false ; private boolean hideDescription = true ; private List < IColumnSelectorListener > listeners = new ArrayList < IColumnSelectorListener > ( ) ; private ValueChangedListener checkboxListener = new ValueChangedListener ( ) { private static final long serialVersionUID = 1L ; public void valueChanged ( ValueChangedEvent event ) { } } ; private Button btHideDescr ; private Button btHideInvis ; public ColumnSelector ( IControlContainer container ) { } public ColumnSelector ( IControlContainer container , String name ) { } public void addColumnSelectorListener ( IColumnSelectorListener listener ) { } public void removeColumnSelectorListener ( IColumnSelectorListener listener ) { } protected void fireEvent ( ColumnSelector . EventType type , ColumnSelectorEvent event ) { } private void init ( ) { } protected void updateOrder ( ) { } public String getCssClass ( ) { } public void setCssClass ( String cssClass ) { } public void actionOrderUpdated ( ) { } public void actionSelectAll ( ) { } public void actionHideDescription ( ) { } public void actionSelectNone ( ) { } public void actionHideInvisible ( ) { } public void addColumn ( ColumnStub column ) { columns . add ( column ) ; if ( ( column . getId ( ) ) == ( - 1 ) ) { column . setId ( ( ( nextId ) ++ ) ) ; } column . setSortIndex ( columns . size ( ) ) ; idColumnMap . put ( column . getId ( ) , column ) ; <START_BUG> if ( ! ( checkBoxes . containsKey ( ( "chk" + ( column . getId ( ) ) ) ) ) ) { <END_BUG> CheckBox chkbox = new CheckBox ( this , ( "chk" + ( column . getId ( ) ) ) ) ; chkbox . setChecked ( column . isVisible ( ) ) ; chkbox . addValueChangedListener ( checkboxListener ) ; checkBoxes . put ( column . getId ( ) , chkbox ) ; } try { inAddMode = true ; fldOrder . setValue ( ( ( ( fldOrder . getValue ( ) ) + ( column . getId ( ) ) ) + ";" ) ) ; } finally { inAddMode = false ; } } public List < ColumnStub > getColumns ( ) { } public int getWidth ( ) { } public void setWidth ( int width ) { } public int getHeight ( ) { } public void setHeight ( int height ) { } public boolean isImmediateUpdate ( ) { } public void setImmediateUpdate ( boolean immediateUpdate ) { } protected void onCheckboxStateChange ( ) { } public boolean isShowActions ( ) { } public void setShowActions ( boolean showActions ) { } public boolean isHideInvisibles ( ) { } public void setHideInvisibles ( boolean hideInvisibles ) { } public boolean isHideDescription ( ) { } public void setHideDescription ( boolean hideDescription ) { } }

Fix:
if ( ! ( checkBoxes . containsKey ( column . getId ( ) ) ) ) {