The local function on_gui_checked_state_changed is defined twice in the scripts/editor.lua, in lines 753 and 1172. Both events are used (lines 810 and 1407), but the name duplication isn't good for the code readability. These event handlers have different bodies BTW.