Buggy code:
public class ShoppingLogic { private static final Logger log = Logger . getLogger ( ShoppingLogic . class ) ; public static ActionErrors viewShoppingCart ( HttpServletRequest request , ShoppingForm form ) { } public static ActionErrors obtainParOrder ( HttpServletRequest request , ShoppingForm form ) throws Exception { ShoppingCartForm shoppingCartForm = form . getShoppingCartForm ( ) ; ActionErrors errors = ShoppingCartLogic . inventoryInit ( request , shoppingCartForm ) ; shoppingCartForm = ( ( ShoppingCartForm ) ( request . getSession ( ) . getAttribute ( INVENTORY_SHOPPING_CART_FORM ) ) ) ; if ( ( shoppingCartForm != null ) && ( ( shoppingCartForm . getShoppingCart ( ) ) != null ) ) { ShoppingLogic . setParOrderDateTimeInfo ( request , form ) ; <START_BUG> if ( errors . isEmpty ( ) ) { <END_BUG> errors = ShoppingCartLogic . recalInvCartQty ( request , shoppingCartForm ) ; } } return errors ; } public static ActionErrors saveParOrder ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors removeItemFromCart ( HttpServletRequest request , ShoppingForm form ) { } public static ActionErrors removeInvItemFromCart ( HttpServletRequest request , ShoppingForm form ) { } private static long [ ] prepareSelectedItmes ( ShoppingForm form ) { } @ SuppressWarnings ( "rawtypes" ) public static ActionErrors removeSelectedUserShoppingListItem ( HttpServletRequest request , ShoppingForm form ) throws Exception , RemoteException { } @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) private static List getRemainingItems ( List items , long [ ] selectedItems ) { } public static ActionErrors removeAllItemsFromCart ( HttpServletRequest request , ShoppingForm form ) { } public static ActionErrors reCalculateAndSaveShoppingCart ( HttpServletRequest request , ShoppingForm form ) { } public static ActionErrors initCatalogShopping ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors navigateCatalogProducts ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors printDetail ( HttpServletResponse response , HttpServletRequest request , ShoppingForm form , String action , MessageResources mResources ) throws Exception { } public static ActionErrors addToCart ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors showItemDetails ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors showItemDocumentFromE3Storage ( HttpServletRequest request , UserShopForm userShopForm , HttpServletResponse response ) throws Exception { } public static ActionErrors showItemDocumentFromDb ( HttpServletRequest request , UserShopForm userShopForm , HttpServletResponse response ) throws Exception { } public static ActionErrors itemToCart ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors itemToParOrder ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors getSelectedShoppingListItems ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors selectShoppingList ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors deleteShoppingList ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors renameShoppingList ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors createShoppingList ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors shopByLists ( HttpServletRequest request , ShoppingForm form ) throws Exception { } private static Map < Integer , Integer > countItemsInShoppingLists ( HttpServletRequest request , OrderGuideDataVector shoppingListDV , int orderBy ) { } public static ActionErrors updateQuantity ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static Map < String , Object > searchForShoppingListItem ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors addItemsToExistingShoppingList ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors newUserShoppingList ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static Map < String , Object > searchForProductCatalogItem ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors addCatalogItemsToCart ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static boolean canEditShoppingList ( HttpServletRequest request , ShoppingForm form ) { } public static ActionErrors addShoppingListItemsToParOrder ( HttpServletRequest request , ShoppingForm form ) throws Exception { } private static void setParOrderDateTimeInfo ( HttpServletRequest request , ShoppingForm form ) { } public static ActionErrors validateQuantities ( HttpServletRequest request , ShoppingCartForm cartForm , boolean isParOrder ) { } public static ActionMessages getPAROrderInfoMessages ( HttpServletRequest request , ShoppingCartForm cartForm ) { } public static ActionErrors addCatalogItemsToParOrder ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static boolean isUserBrowseOnly ( HttpServletRequest request , ShoppingForm form ) { } public static ActionErrors addAllCartItemsToShoppingList ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors createUserShoppingList ( HttpServletRequest request , EditOrderGuideForm editOrderGuideForm ) throws Exception { } public static ActionErrors updateLocationBudgetChart ( HttpServletRequest request ) { } public static boolean areItemQtysUpdated ( ShoppingCartForm shoppingCartForm ) { } private static int calculateItemCount ( MenuItemView menuItem , Map < Integer , ProductDataVector > itemMap ) { } public static boolean isExcludeOrderFromBudgetUpdated ( HttpServletRequest request , ShoppingForm shoppingForm ) { } public static ActionErrors updateOrderGuide ( HttpServletRequest request , ShoppingForm shoppingForm ) { } public static OrderGuideData getOrderGuideOfCart ( HttpServletRequest request ) { } private static ActionErrors prepareCartItems ( HttpServletRequest request , UserShopForm pForm ) throws Exception { } public static ActionErrors addQuickShopItemsToCart ( HttpServletRequest request , ShoppingForm shoppingForm ) throws Exception { } public static ActionErrors resolveQuickShopSkuCollisions ( HttpServletRequest request , ShoppingForm shoppingForm ) throws Exception { } public static ActionErrors printOrExportShoppingListItems ( HttpServletResponse response , HttpServletRequest request , ShoppingForm form , String action , MessageResources mResources ) throws Exception { } public static void refreshShoppingLists ( HttpServletRequest request ) { } public static void recalcShoppingLists ( HttpServletRequest request , ShoppingForm shoppingForm ) { } public static ActionErrors showGroupItemDetails ( HttpServletRequest request , ShoppingForm form ) throws Exception { } public static ActionErrors clearQty ( HttpServletRequest request , ShoppingForm form ) throws Exception { } private static long [ ] getAddSelected ( String [ ] quantityS , int [ ] itemsIds ) { } private static ShoppingCartItemDataVector prepareMultiProductGroupItems ( HttpServletRequest request , ShoppingCartItemDataVector items , int catalogId , int siteId ) throws Exception { }

Fix:
if ( ( errors . isEmpty ( ) ) && ( ! ( ShopTool . isPhysicalCartAvailable ( request ) ) ) ) {