( 1 ) Functionality F2::shipOrder
orderData getOrderData() { }
void ship(sellOrderData) {
if(orderData.Number < 0 ∣ ∣ !(checkISBN(orderData.ISBN))
 {// return error} 
N = F6::getCurrentN(orderData.ISBN);
if((N − orderData.Number) < 0) {
  //return error
  
}
else {
 //ship order
   
 F6::updateAvail(sellOrderData)
   
}
}
//other methods to support the shipment
( 2 ) Functionality F6::ManageAvailability
Boolean verifyAvail() { }
updateAvail (orderData, SalePurchase) {
if (SalePurchase == “Sale”) {
if ((currentN − orderData.Number) < 0) {
   //return error
   ⋯
 }
else {
  //execute update
  currentN = currentN - orderData.Number
  
 }
}
else if (SalePurchase == “Purchase”) {
   currentN = currentN + orderData.Number
//!! –-check on Maximum Capacity missed–– !!
  
 }
}
else { //error }
}
// other methods
( 3 ) Functionality F2::shipOrder, modified after F6 Implementation
string SalePurchase = “sale”;
orderData getOrderData() { }
void ship(sellOrderData) {
if(orderData.Number < 0 ∣ ∣ !(checkISBN(orderData.ISBN))
     && !(stringIsValid(SalePurchase))
// return error
//!–-wrong logical condition ––!
N = F6::getCurrentN(orderData.ISBN);
if((N - orderData.Number) < 0) { //return error }
else { //ship order
  F6::updateAvail(sellOrderData, SalePurchase) }
} //other methods to support the shipment
Algorithm 1: Regression bugs in an online bookstore.