Mutation check done on all accepted tasks; mutant fixes; dump filter in proxy
- skip sy-subrc lines and CDS type lengths; CDS literal mutants; mutate helper classes - proxy: sap_short_dumps shows only dumps of the current run - 26/26 tasks pass; results in docs/faz1-tasarim.md 11g Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
56
tasks_gen/eval/G0009/faulty/m0_shipping_cost_calc.clas.abap
Normal file
56
tasks_gen/eval/G0009/faulty/m0_shipping_cost_calc.clas.abap
Normal file
@@ -0,0 +1,56 @@
|
||||
CLASS {{p}}shipping_cost_calc DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
||||
PUBLIC SECTION.
|
||||
INTERFACES {{p}}if_shipping_cost.
|
||||
|
||||
PRIVATE SECTION.
|
||||
METHODS base_rate
|
||||
IMPORTING iv_weight TYPE {{p}}if_shipping_cost=>ty_weight
|
||||
RETURNING VALUE(rv_rate) TYPE {{p}}if_shipping_cost=>ty_amount.
|
||||
|
||||
METHODS express_surcharge
|
||||
IMPORTING iv_rate TYPE {{p}}if_shipping_cost=>ty_amount
|
||||
RETURNING VALUE(rv_surcharge) TYPE {{p}}if_shipping_cost=>ty_amount.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}shipping_cost_calc IMPLEMENTATION.
|
||||
METHOD {{p}}if_shipping_cost~calculate.
|
||||
IF iv_weight <= 0.
|
||||
rv_cost = 0.
|
||||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
DATA(lv_cost) = base_rate( iv_weight ).
|
||||
|
||||
IF iv_express <> abap_true.
|
||||
lv_cost = lv_cost + express_surcharge( lv_cost ).
|
||||
ENDIF.
|
||||
|
||||
IF lv_cost < {{p}}if_shipping_cost=>c_rate-min_charge.
|
||||
rv_cost = {{p}}if_shipping_cost=>c_rate-min_charge.
|
||||
ELSE.
|
||||
rv_cost = lv_cost.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD base_rate.
|
||||
IF iv_weight <= 1.
|
||||
rv_rate = '4.90'.
|
||||
ELSEIF iv_weight <= 5.
|
||||
rv_rate = '8.50'.
|
||||
ELSEIF iv_weight <= 10.
|
||||
rv_rate = '12.00'.
|
||||
ELSEIF iv_weight <= {{p}}if_shipping_cost=>c_rate-bulk_weight.
|
||||
rv_rate = '18.75'.
|
||||
ELSE.
|
||||
DATA(lv_started_kg) = CONV i(
|
||||
ceil( iv_weight - {{p}}if_shipping_cost=>c_rate-bulk_weight ) ).
|
||||
rv_rate = '18.75' + lv_started_kg * {{p}}if_shipping_cost=>c_rate-bulk_step.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD express_surcharge.
|
||||
rv_surcharge = round( val = iv_rate * {{p}}if_shipping_cost=>c_rate-express_percent / 100
|
||||
dec = 2 ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
56
tasks_gen/eval/G0009/faulty/m1_shipping_cost_calc.clas.abap
Normal file
56
tasks_gen/eval/G0009/faulty/m1_shipping_cost_calc.clas.abap
Normal file
@@ -0,0 +1,56 @@
|
||||
CLASS {{p}}shipping_cost_calc DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
||||
PUBLIC SECTION.
|
||||
INTERFACES {{p}}if_shipping_cost.
|
||||
|
||||
PRIVATE SECTION.
|
||||
METHODS base_rate
|
||||
IMPORTING iv_weight TYPE {{p}}if_shipping_cost=>ty_weight
|
||||
RETURNING VALUE(rv_rate) TYPE {{p}}if_shipping_cost=>ty_amount.
|
||||
|
||||
METHODS express_surcharge
|
||||
IMPORTING iv_rate TYPE {{p}}if_shipping_cost=>ty_amount
|
||||
RETURNING VALUE(rv_surcharge) TYPE {{p}}if_shipping_cost=>ty_amount.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}shipping_cost_calc IMPLEMENTATION.
|
||||
METHOD {{p}}if_shipping_cost~calculate.
|
||||
IF iv_weight <= 0.
|
||||
rv_cost = 0.
|
||||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
DATA(lv_cost) = base_rate( iv_weight ).
|
||||
|
||||
IF iv_express = abap_true.
|
||||
lv_cost = lv_cost - express_surcharge( lv_cost ).
|
||||
ENDIF.
|
||||
|
||||
IF lv_cost < {{p}}if_shipping_cost=>c_rate-min_charge.
|
||||
rv_cost = {{p}}if_shipping_cost=>c_rate-min_charge.
|
||||
ELSE.
|
||||
rv_cost = lv_cost.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD base_rate.
|
||||
IF iv_weight <= 1.
|
||||
rv_rate = '4.90'.
|
||||
ELSEIF iv_weight <= 5.
|
||||
rv_rate = '8.50'.
|
||||
ELSEIF iv_weight <= 10.
|
||||
rv_rate = '12.00'.
|
||||
ELSEIF iv_weight <= {{p}}if_shipping_cost=>c_rate-bulk_weight.
|
||||
rv_rate = '18.75'.
|
||||
ELSE.
|
||||
DATA(lv_started_kg) = CONV i(
|
||||
ceil( iv_weight - {{p}}if_shipping_cost=>c_rate-bulk_weight ) ).
|
||||
rv_rate = '18.75' + lv_started_kg * {{p}}if_shipping_cost=>c_rate-bulk_step.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD express_surcharge.
|
||||
rv_surcharge = round( val = iv_rate * {{p}}if_shipping_cost=>c_rate-express_percent / 100
|
||||
dec = 2 ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
56
tasks_gen/eval/G0009/faulty/m2_shipping_cost_calc.clas.abap
Normal file
56
tasks_gen/eval/G0009/faulty/m2_shipping_cost_calc.clas.abap
Normal file
@@ -0,0 +1,56 @@
|
||||
CLASS {{p}}shipping_cost_calc DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
||||
PUBLIC SECTION.
|
||||
INTERFACES {{p}}if_shipping_cost.
|
||||
|
||||
PRIVATE SECTION.
|
||||
METHODS base_rate
|
||||
IMPORTING iv_weight TYPE {{p}}if_shipping_cost=>ty_weight
|
||||
RETURNING VALUE(rv_rate) TYPE {{p}}if_shipping_cost=>ty_amount.
|
||||
|
||||
METHODS express_surcharge
|
||||
IMPORTING iv_rate TYPE {{p}}if_shipping_cost=>ty_amount
|
||||
RETURNING VALUE(rv_surcharge) TYPE {{p}}if_shipping_cost=>ty_amount.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}shipping_cost_calc IMPLEMENTATION.
|
||||
METHOD {{p}}if_shipping_cost~calculate.
|
||||
IF iv_weight <= 0.
|
||||
rv_cost = 0.
|
||||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
DATA(lv_cost) = base_rate( iv_weight ).
|
||||
|
||||
IF iv_express = abap_true.
|
||||
lv_cost = lv_cost + express_surcharge( lv_cost ).
|
||||
ENDIF.
|
||||
|
||||
IF lv_cost < {{p}}if_shipping_cost=>c_rate-min_charge.
|
||||
rv_cost = {{p}}if_shipping_cost=>c_rate-min_charge.
|
||||
ELSE.
|
||||
rv_cost = lv_cost.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD base_rate.
|
||||
IF iv_weight > 1.
|
||||
rv_rate = '4.90'.
|
||||
ELSEIF iv_weight <= 5.
|
||||
rv_rate = '8.50'.
|
||||
ELSEIF iv_weight <= 10.
|
||||
rv_rate = '12.00'.
|
||||
ELSEIF iv_weight <= {{p}}if_shipping_cost=>c_rate-bulk_weight.
|
||||
rv_rate = '18.75'.
|
||||
ELSE.
|
||||
DATA(lv_started_kg) = CONV i(
|
||||
ceil( iv_weight - {{p}}if_shipping_cost=>c_rate-bulk_weight ) ).
|
||||
rv_rate = '18.75' + lv_started_kg * {{p}}if_shipping_cost=>c_rate-bulk_step.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD express_surcharge.
|
||||
rv_surcharge = round( val = iv_rate * {{p}}if_shipping_cost=>c_rate-express_percent / 100
|
||||
dec = 2 ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
56
tasks_gen/eval/G0009/faulty/m3_shipping_cost_calc.clas.abap
Normal file
56
tasks_gen/eval/G0009/faulty/m3_shipping_cost_calc.clas.abap
Normal file
@@ -0,0 +1,56 @@
|
||||
CLASS {{p}}shipping_cost_calc DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
||||
PUBLIC SECTION.
|
||||
INTERFACES {{p}}if_shipping_cost.
|
||||
|
||||
PRIVATE SECTION.
|
||||
METHODS base_rate
|
||||
IMPORTING iv_weight TYPE {{p}}if_shipping_cost=>ty_weight
|
||||
RETURNING VALUE(rv_rate) TYPE {{p}}if_shipping_cost=>ty_amount.
|
||||
|
||||
METHODS express_surcharge
|
||||
IMPORTING iv_rate TYPE {{p}}if_shipping_cost=>ty_amount
|
||||
RETURNING VALUE(rv_surcharge) TYPE {{p}}if_shipping_cost=>ty_amount.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}shipping_cost_calc IMPLEMENTATION.
|
||||
METHOD {{p}}if_shipping_cost~calculate.
|
||||
IF iv_weight <= 0.
|
||||
rv_cost = 0.
|
||||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
DATA(lv_cost) = base_rate( iv_weight ).
|
||||
|
||||
IF iv_express = abap_true.
|
||||
lv_cost = lv_cost + express_surcharge( lv_cost ).
|
||||
ENDIF.
|
||||
|
||||
IF lv_cost < {{p}}if_shipping_cost=>c_rate-min_charge.
|
||||
rv_cost = {{p}}if_shipping_cost=>c_rate-min_charge.
|
||||
ELSE.
|
||||
rv_cost = lv_cost.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD base_rate.
|
||||
IF iv_weight <= 1.
|
||||
rv_rate = '4.90'.
|
||||
ELSEIF iv_weight <= 5.
|
||||
rv_rate = '8.50'.
|
||||
ELSEIF iv_weight <= 10.
|
||||
rv_rate = '12.00'.
|
||||
ELSEIF iv_weight <= {{p}}if_shipping_cost=>c_rate-bulk_weight.
|
||||
rv_rate = '18.75'.
|
||||
ELSE.
|
||||
DATA(lv_started_kg) = CONV i(
|
||||
ceil( iv_weight - {{p}}if_shipping_cost=>c_rate-bulk_weight ) ).
|
||||
rv_rate = '18.75' - lv_started_kg * {{p}}if_shipping_cost=>c_rate-bulk_step.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD express_surcharge.
|
||||
rv_surcharge = round( val = iv_rate * {{p}}if_shipping_cost=>c_rate-express_percent / 100
|
||||
dec = 2 ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user