Buggy code:
if ( ( showOrderDetailPop ) == null ) showOrderDetailPop = "visibility:hidden;display:none;" ; if ( ( showConfirmDeleteOrderPop ) == null ) showConfirmDeleteOrderPop = "visibility:hidden;display:none;" ; if ( ( showSaveSuccessPop ) == null ) showSaveSuccessPop = "visibility:hidden;display:none;" ; if ( ( poYpop ) == null ) poYpop = 100L ; if ( ( poXpop ) == null ) poXpop = 100L ; Hashtable < String , OrdersDTO > hashOrders ; if ( ( selectedStatus ) == null ) selectedStatus = - 1 ; sizeResult = ( ( Long ) ( session . getAttribute ( "sizeResult" ) ) ) ; totalOrders = ( ( Long ) ( session . getAttribute ( "totalOrders" ) ) ) ; if ( ( totalOrders ) == null ) totalOrders = 0L ; asc = ( ( Integer ) ( session . getAttribute ( "asc" ) ) ) ; if ( ( asc ) == null ) asc = 0 ; if ( ( sizeResult ) == null ) sizeResult = 0L ; if ( ( indexOrder ) == null ) indexOrder = 0 ; userPrivileges = ( ( UsersPrivilegesDTO ) ( session . getAttribute ( "userPrivileges" ) ) ) ; usersPrivShippedToInvoiced = ( ( UsersPrivilegesDTO ) ( session . getAttribute ( "usersPrivShippedToInvoiced" ) ) ) ; usersPrivChangeShippedStatus = ( ( UsersPrivilegesDTO ) ( session . getAttribute ( "usersPrivChangeShippedStatus" ) ) ) ; hashStatus = ( ( HashMap < Integer , String > ) ( session . getAttribute ( "hashStatus" ) ) ) ; if ( ( hashStatus ) == null ) { hashStatus = new HashMap < Integer , String > ( ) ; hashStatus . put ( 0 , "" ) ; hashStatus . put ( 1 , "open" ) ; hashStatus . put ( 2 , "progress" ) ; } List < Integer > listIndexColumn = new ArrayList < Integer > ( ) ; listStatus = ( ( ArrayList < OrdersDTO > ) ( session . getAttribute ( "listStatus" ) ) ) ; if ( ( listStatus ) == null ) { listStatus = new ArrayList < OrdersDTO > ( ) ; OrdersDTO orderDTOOpen = new OrdersDTO ( ) ; orderDTOOpen . setStatus ( "open" ) ; orderDTOOpen . setId ( 0L ) ; listStatus . add ( orderDTOOpen ) ; OrdersDTO orderDTOProgress = new OrdersDTO ( ) ; orderDTOProgress . setStatus ( "progress" ) ; orderDTOProgress . setId ( 1L ) ; listStatus . add ( orderDTOProgress ) ; if ( ( usersPrivChangeShippedStatus ) != null ) { OrdersDTO orderDTOShipped = new OrdersDTO ( ) ; orderDTOShipped . setStatus ( "shipped" ) ; orderDTOShipped . setId ( 2L ) ; listStatus . add ( orderDTOShipped ) ; } } try { listProvinces = ( ( List < ProvinceDTO > ) ( session . getAttribute ( "listProvinces" ) ) ) ; if ( ( listProvinces ) == null ) listProvinces = productService . getAllProvinces ( ) ; orderNotSavedAtFirst = ( ( Boolean ) ( session . getAttribute ( "listNotSavedAtFirst" ) ) ) ; BasicUserDTO basicUserDTO = new BasicUserDTO ( ) ; basicUserDTO . setTypeId ( ReportOrders . USER_TYPE ) ; List < User > usersListSession = ( ( List < User > ) ( session . getAttribute ( "usersListSession" ) ) ) ; if ( usersListSession == null ) { List < UserSessionDTO > listAllUsers = userService . getAllUsers ( basicUserDTO ) ; usersList = new ArrayList < User > ( ) ; for ( UserSessionDTO userDTO : listAllUsers ) { User user = new User ( ) ; user . setId ( userDTO . getId ( ) ) ; user . setLogin ( userDTO . getLogin ( ) ) ; usersList . add ( user ) ; } session . setAttribute ( "usersListSession" , usersList ) ; } else { usersList = usersListSession ; } listOrdersDTO = ( ( ArrayList < OrdersDTO > ) ( session . getAttribute ( "listOrdersDTOReport" ) ) ) ; reportDateBetween = ( ( Integer ) ( session . getAttribute ( "reportDateBetween" ) ) ) ; if ( ( reportDateBetween ) == null ) { reportDateBetween = 0 ; session . setAttribute ( "reportDateBetween" , reportDateBetween ) ; } switchBetweenClientLoginAndPoNumber = ( ( Integer ) ( session . getAttribute ( "switchBetweenClientLoginAndPoNumber" ) ) ) ; if ( ( switchBetweenClientLoginAndPoNumber ) == null ) { switchBetweenClientLoginAndPoNumber = 0 ; session . setAttribute ( "switchBetweenClientLoginAndPoNumber" , switchBetweenClientLoginAndPoNumber ) ; } switchBetweenLsOrderAndClientOrderId = ( ( Integer ) ( session . getAttribute ( "switchBetweenLsOrderAndClientOrderId" ) ) ) ; if ( ( switchBetweenLsOrderAndClientOrderId ) == null ) { switchBetweenLsOrderAndClientOrderId = 0 ; session . setAttribute ( "switchBetweenLsOrderAndClientOrderId" , switchBetweenLsOrderAndClientOrderId ) ; } switchBetweenStatusAndClientOther = ( ( Integer ) ( session . getAttribute ( "switchBetweenStatusAndClientOther" ) ) ) ; if ( ( switchBetweenStatusAndClientOther ) == null ) { switchBetweenStatusAndClientOther = 0 ; session . setAttribute ( "switchBetweenStatusAndClientOther" , switchBetweenStatusAndClientOther ) ; } if ( ( ( selectAllOrdersSignal ) != null ) && ( ( selectAllOrdersSignal ) != 0L ) ) { if ( ( checkBoxItem ) != null ) { session . setAttribute ( "checkBoxItem" , checkBoxItem ) ; session . setAttribute ( "allOrdersSelectedSignal" , 0L ) ; if ( checkBoxItem ) session . setAttribute ( "allOrdersSelectedSignal" , 1L ) ; } } checkBoxItem = ( ( Boolean ) ( session . getAttribute ( "checkBoxItem" ) ) ) ; if ( ( checkBoxItem ) == null ) checkBoxItem = false ; creationDateStart = null ; SimpleDateFormat frm = new SimpleDateFormat ( "dd//MM//yyyy" ) ; if ( ( ( strCreationDateStart ) != null ) && ( ! ( "" . equals ( strCreationDateStart ) ) ) ) { try { Date date = frm . parse ( strCreationDateStart ) ; creationDateStart = date ; creationDateStartArg = date ; } catch ( Exception pe ) { creationDateStart = null ; addActionError ( "Please<seq2seq4repair_space>enter<seq2seq4repair_space>a<seq2seq4repair_space>date<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>correct<seq2seq4repair_space>format" ) ; } } if ( ( creationDateStart ) == null ) { Date date = frm . parse ( "01//01//1900" ) ; creationDateStartArg = date ; } creationDateEnd = null ; if ( ( ( strCreationDateEnd ) != null ) && ( ! ( "" . equals ( strCreationDateEnd ) ) ) ) { frm = new SimpleDateFormat ( "dd//MM//yyyy" ) ; try { Date date = frm . parse ( strCreationDateEnd ) ; creationDateEnd = date ; creationDateEndArg = date ; } catch ( Exception pe ) { creationDateEnd = null ; addActionError ( "Please<seq2seq4repair_space>enter<seq2seq4repair_space>a<seq2seq4repair_space>date<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>correct<seq2seq4repair_space>format" ) ; } } if ( ( creationDateEnd ) == null ) { creationDateEndArg = new Date ( ) ; } status = getStatusSelected ( selectedStatus ) ; nextListPages = ( ( Integer ) ( session . getAttribute ( "nextListPages" ) ) ) ; if ( ( nextListPages ) == null ) nextListPages = 0 ; if ( ( ( indexSet ) == null ) || ( ( indexSet ) == ( - 1 ) ) ) { indexSet = ( ( Integer ) ( session . getAttribute ( "indexSet" ) ) ) ; if ( ( indexSet ) == null ) indexSet = 0 ; } listIndexSet = ( ( List < OrdersDTO > ) ( session . getAttribute ( "listIndexSet" ) ) ) ; if ( ( listIndexSet ) == null ) initalizeListIndexSet ( session , orderService ) ; if ( ( ( dateBetweenSignal ) != null ) && ( ( dateBetweenSignal ) != 0L ) ) { reportDateBetween = ( ( ( reportDateBetween ) == null ) || ( ( reportDateBetween ) == 0 ) ) ? 1 : 0 ; listOrdersDTO = new ArrayList < OrdersDTO > ( ) ; session . setAttribute ( "listOrdersDTOReport" , listOrdersDTO ) ; session . setAttribute ( "reportDateBetween" , reportDateBetween ) ; return SUCCESS ; } if ( ( ( switchBetweenClientLoginAndPoNumberSignal ) != null ) && ( ( switchBetweenClientLoginAndPoNumberSignal ) != 0L ) ) { switchBetweenClientLoginAndPoNumber = ( ( ( switchBetweenClientLoginAndPoNumber ) == null ) || ( ( switchBetweenClientLoginAndPoNumber ) == 0 ) ) ? 1 : 0 ; listOrdersDTO = new ArrayList < OrdersDTO > ( ) ; session . setAttribute ( "listOrdersDTOReport" , listOrdersDTO ) ; session . setAttribute ( "switchBetweenClientLoginAndPoNumber" , switchBetweenClientLoginAndPoNumber ) ; return SUCCESS ; } if ( ( ( switchBetweenLsOrderAndClientOrderIdSignal ) != null ) && ( ( switchBetweenLsOrderAndClientOrderIdSignal ) != 0L ) ) { switchBetweenLsOrderAndClientOrderId = ( ( ( switchBetweenLsOrderAndClientOrderId ) == null ) || ( ( switchBetweenLsOrderAndClientOrderId ) == 0 ) ) ? 1 : 0 ; listOrdersDTO = new ArrayList < OrdersDTO > ( ) ; session . setAttribute ( "listOrdersDTOReport" , listOrdersDTO ) ; session . setAttribute ( "switchBetweenLsOrderAndClientOrderId" , switchBetweenLsOrderAndClientOrderId ) ; return SUCCESS ; } if ( ( ( switchBetweenStatusAndClientOtherSignal ) != null ) && ( ( switchBetweenStatusAndClientOtherSignal ) != 0L ) ) { switchBetweenStatusAndClientOther = ( ( ( switchBetweenStatusAndClientOther ) == null ) || ( ( switchBetweenStatusAndClientOther ) == 0 ) ) ? 1 : 0 ; listOrdersDTO = new ArrayList < OrdersDTO > ( ) ; session . setAttribute ( "listOrdersDTOReport" , listOrdersDTO ) ; <START_BUG> session . setAttribute ( "switchBetweenLsOrderAndClientOrderId" , switchBetweenStatusAndClientOther ) ; <END_BUG>

Fix:
session . setAttribute ( "switchBetweenStatusAndClientOther" , switchBetweenStatusAndClientOther ) ;