Patches - ManyBugs Benchmark

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

ID Project Subject ID Error Type Generated Patch Developer Patch
1 Libtiff ee65c74 Test Case Failure
- if (!dir->tdir_count || !w || (tsize_t)dir->tdir_count / w != cc)
+ if ((tsize_t)dir->tdir_count != (tsize_t)dir->tdir_count)
            
eec4c06
2 Libtiff 865f7b2 Test Case Failure
- if (tif->tif_rawcc > 0
+ if (0 < tif->tif_rawcc
  && (tif->tif_flags & TIFF_BEENWRITING) != 0
  && !TIFFFlushData1(tif))
            
371336d
3 Libtiff 7d6e298 Test Case Failure
- tif->tif_fields = NULL;
+ tif->tif_fields = tif->tif_fields;
            
7d6e298
4 gzip 884ef6d16c Test Case Failure
- if ((z_len == 0 && !decompress) || z_len > MAX_SUFFIX) {
+ if ((MAX_SUFFIX < z_len) || (0 == z_len)) {
            
884ef6d16c
5 gzip f17cbd13a1 Test Case Failure
+ ifd = 0; 
            
f17cbd13a1