Patches - SVCOMP Benchmark

We list below the patches generated by our tool CPR, for the SVCOMP benchmark in our evaluation section of the paper.

ID Program Error Type Generated Patch Incorrect Source File Correct Source File
1 Insertion Sort Assertion Failure
 

-  if (i < 2) 
+  if (1 == 1) 

Source File Source File
2 Linear Search Assertion Failure
 
-  if (j == 20) 
+  if (1 == 0) 
         
Source File Source File
3 String Assertion Failure
 

-  found = (j > nc_B - 1) << i;
+  found = (j > nc_B - 1); 
  
Source File Source File
4 Eureka Assertion Failure
 
            
-  distance[x] = -1;  
+  distance[x] = distance[y] + Weight[j]; 
  
Source File Source File
5 Nested Delay Assertion Failure
 

-  else if(st == 1 && last >= SIZE)  
+  else if(st == 1 && last < SIZE) 
  
Source File Source File
6 Sum Assertion Failure
 

-  if (i < 4)  
+  if (i == i) 
  
Source File Source File
7 Bubble Sort Assertion Failure
 

-  if ( a[i - 1] < a[i] ) {  
+  if ( a[i - 1] > a[i] ) { 
  
Source File Source File
8 Unique List Assertion Failure
 

-  if ( set[ i ] == value ) return 0;  
+  if ( set[ i ] == value ) return size; 
  
Source File Source File
9 Standard Run Assertion Failure
 

-  if ( a[i] < 0 && !b[i] ) f = 0;  
+  if ( a[i] < 0 && b[i] ) f = 0; 
  
Source File Source File
10 Recursive Addition Assertion Failure
 

-  if (result == m - n) {  
+  if (result == m + n) { 
  
Source File Source File