teb-update / lemire_javaewah-JavaEWAH-1.2.3.json
TestEvo-Bench-Anonymous's picture
Upload 59 files
fd1caa7 verified
raw
history blame
265 kB
[
{
"task_id": "lemire_javaewah-JavaEWAH-1.2.3__385866e_fcf8684__EWAHCompressedBitmapTest_e1abd8c1",
"project_name": "lemire_javaewah-JavaEWAH-1.2.3",
"git_clone_url": "https://github.com/lemire/javaewah.git",
"rev1": "385866e36056b4f02e57df2ca4945dcdb05bfa72",
"rev2": "fcf8684de40c8392b012e8fc39db0f505349dc10",
"rev1_date": "2014-12-09T19:48:06Z",
"rev2_date": "2014-12-09T20:32:32Z",
"git_diff_url": "https://github.com/lemire/javaewah/compare/385866e36056b4f02e57df2ca4945dcdb05bfa72...fcf8684de40c8392b012e8fc39db0f505349dc10",
"test_file": "src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java",
"test_changes": [
{
"change_id": "41_lemire_javaewah-JavaEWAH-1.2.3_385866e_fcf8684_EWAHCompressedBitmapTest",
"test_sign": "com/googlecode/javaewah/EWAHCompressedBitmapTest.compareSetAndSetSizeInBits2:()V",
"class": "EWAHCompressedBitmapTest",
"method": "compareSetAndSetSizeInBits2",
"module": "",
"junit_selector": "com.googlecode.javaewah.EWAHCompressedBitmapTest#compareSetAndSetSizeInBits2",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer, bitmap2.buffer);\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java"
],
"old_test_lnum": [
"502-519"
],
"new_test_lnum": [
"502-519"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0l) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == ~0l) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"focal_method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_old": "1352-1405",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_new": "1444-1496",
"dependency_updated": "updated",
"score": 0.5129,
"signal_scores": {
"nc": 0.0,
"lcs_u": 1.0,
"ed": 0.4815,
"class": 1.0,
"tfidf": 0.2927
}
},
{
"dep_id": 1,
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"file_path_old": "src/main/java/com/googlecode/javaewah/LongArray.java",
"line_nums_old": "39-42",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": 0.2051,
"signal_scores": {
"nc": 0.0,
"lcs_u": 0.5,
"ed": 0.1111,
"class": 0.0,
"tfidf": 0.4189
}
}
],
"coverage_gold": 0.5925925925925926,
"branch_coverage_gold": 2.1258,
"method_coverage_gold": 6.6852,
"line_coverage_gold": 3.7978,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z"
],
"all_deps_old": [
"com/googlecode/javaewah/LongArray.getWords:()[J",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
},
{
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah/LongArray.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "error",
"new_on_new": "pass"
}
},
{
"change_id": "42_lemire_javaewah-JavaEWAH-1.2.3_385866e_fcf8684_EWAHCompressedBitmapTest",
"test_sign": "com/googlecode/javaewah/EWAHCompressedBitmapTest.compareSetAndSetSizeInBits:()V",
"class": "EWAHCompressedBitmapTest",
"method": "compareSetAndSetSizeInBits",
"module": "",
"junit_selector": "com.googlecode.javaewah.EWAHCompressedBitmapTest#compareSetAndSetSizeInBits",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer, bitmap2.buffer);\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java"
],
"old_test_lnum": [
"482-500"
],
"new_test_lnum": [
"482-500"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0l) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == ~0l) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"focal_method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_old": "1352-1405",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_new": "1444-1496",
"dependency_updated": "updated",
"score": 0.5159,
"signal_scores": {
"nc": 0.0,
"lcs_u": 1.0,
"ed": 0.5,
"class": 1.0,
"tfidf": 0.2927
}
},
{
"dep_id": 1,
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"file_path_old": "src/main/java/com/googlecode/javaewah/LongArray.java",
"line_nums_old": "39-42",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": 0.2058,
"signal_scores": {
"nc": 0.0,
"lcs_u": 0.5,
"ed": 0.1154,
"class": 0.0,
"tfidf": 0.4189
}
}
],
"coverage_gold": 0.5,
"branch_coverage_gold": 2.0815,
"method_coverage_gold": 6.6852,
"line_coverage_gold": 3.6854,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z"
],
"all_deps_old": [
"com/googlecode/javaewah/LongArray.getWords:()[J",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
},
{
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah/LongArray.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "error",
"new_on_new": "pass"
}
}
],
"version": "JavaEWAH-1.2.3",
"java_version": 8
},
{
"task_id": "lemire_javaewah-JavaEWAH-1.2.3__385866e_fcf8684__EWAHCompressedBitmap32Test_e1abd8c1",
"project_name": "lemire_javaewah-JavaEWAH-1.2.3",
"git_clone_url": "https://github.com/lemire/javaewah.git",
"rev1": "385866e36056b4f02e57df2ca4945dcdb05bfa72",
"rev2": "fcf8684de40c8392b012e8fc39db0f505349dc10",
"rev1_date": "2014-12-09T19:48:06Z",
"rev2_date": "2014-12-09T20:32:32Z",
"git_diff_url": "https://github.com/lemire/javaewah/compare/385866e36056b4f02e57df2ca4945dcdb05bfa72...fcf8684de40c8392b012e8fc39db0f505349dc10",
"test_file": "src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java",
"test_changes": [
{
"change_id": "38_lemire_javaewah-JavaEWAH-1.2.3_385866e_fcf8684_EWAHCompressedBitmap32Test",
"test_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32Test.compareSetAndSetSizeInBits2:()V",
"class": "EWAHCompressedBitmap32Test",
"method": "compareSetAndSetSizeInBits2",
"module": "",
"junit_selector": "com.googlecode.javaewah32.EWAHCompressedBitmap32Test#compareSetAndSetSizeInBits2",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer, bitmap2.buffer);\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java"
],
"old_test_lnum": [
"475-492"
],
"new_test_lnum": [
"475-492"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == (~0)) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"focal_method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 1,
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_old": "1362-1415",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_new": "1473-1525",
"dependency_updated": "updated",
"score": 0.5241,
"signal_scores": {
"nc": 0.0,
"lcs_u": 1.0,
"ed": 0.4815,
"class": 1.0,
"tfidf": 0.3404
}
},
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"file_path_old": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"line_nums_old": "39-42",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": 0.2051,
"signal_scores": {
"nc": 0.0,
"lcs_u": 0.5,
"ed": 0.1111,
"class": 0.0,
"tfidf": 0.4189
}
}
],
"coverage_gold": 0.5925925925925926,
"branch_coverage_gold": 2.0815,
"method_coverage_gold": 6.546,
"line_coverage_gold": 3.8876,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z"
],
"all_deps_old": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/IntArray.getWords:()[I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
},
{
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "error",
"new_on_new": "pass"
}
},
{
"change_id": "39_lemire_javaewah-JavaEWAH-1.2.3_385866e_fcf8684_EWAHCompressedBitmap32Test",
"test_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32Test.compareSetAndSetSizeInBits:()V",
"class": "EWAHCompressedBitmap32Test",
"method": "compareSetAndSetSizeInBits",
"module": "",
"junit_selector": "com.googlecode.javaewah32.EWAHCompressedBitmap32Test#compareSetAndSetSizeInBits",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer, bitmap2.buffer);\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java"
],
"old_test_lnum": [
"455-473"
],
"new_test_lnum": [
"455-473"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == (~0)) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"focal_method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 1,
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_old": "1362-1415",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_new": "1473-1525",
"dependency_updated": "updated",
"score": 0.5272,
"signal_scores": {
"nc": 0.0,
"lcs_u": 1.0,
"ed": 0.5,
"class": 1.0,
"tfidf": 0.3404
}
},
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"file_path_old": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"line_nums_old": "39-42",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": 0.2058,
"signal_scores": {
"nc": 0.0,
"lcs_u": 0.5,
"ed": 0.1154,
"class": 0.0,
"tfidf": 0.4189
}
}
],
"coverage_gold": 0.5,
"branch_coverage_gold": 2.0372,
"method_coverage_gold": 6.546,
"line_coverage_gold": 3.7753,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z"
],
"all_deps_old": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/IntArray.getWords:()[I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
},
{
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "error",
"new_on_new": "pass"
}
}
],
"version": "JavaEWAH-1.2.3",
"java_version": 8
},
{
"task_id": "lemire_javaewah-JavaEWAH-1.2.3__89d1b82_4c7ab29__EWAHCompressedBitmapTest_a546a340",
"project_name": "lemire_javaewah-JavaEWAH-1.2.3",
"git_clone_url": "https://github.com/lemire/javaewah.git",
"rev1": "89d1b82193d15316c653d9c0beb77805a4993114",
"rev2": "4c7ab2916911835abfa483803befac5c5c914838",
"rev1_date": "2016-04-26T20:45:09Z",
"rev2_date": "2016-04-27T00:31:54Z",
"git_diff_url": "https://github.com/lemire/javaewah/compare/89d1b82193d15316c653d9c0beb77805a4993114...4c7ab2916911835abfa483803befac5c5c914838",
"test_file": "src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java",
"test_changes": [
{
"change_id": "47_lemire_javaewah-JavaEWAH-1.2.3_89d1b82_4c7ab29_EWAHCompressedBitmapTest",
"test_sign": "com/googlecode/javaewah/EWAHCompressedBitmapTest.OKaserBugReportJuly2013:()V",
"class": "EWAHCompressedBitmapTest",
"method": "OKaserBugReportJuly2013",
"module": "",
"junit_selector": "com.googlecode.javaewah.EWAHCompressedBitmapTest#OKaserBugReportJuly2013",
"old_test_code": "@SuppressWarnings({ \"deprecation\", \"boxing\" })\n@Test\npublic void OKaserBugReportJuly2013() {\n System.out.println(\"testing OKaserBugReportJuly2013\");\n int[][] data = { {}, { 5, 6, 7, 8, 9 }, { 1 }, { 2 }, { 2, 5, 7 }, { 1 }, { 2 }, { 1, 6, 9 }, { 1, 3, 4, 6, 8, 9 }, { 1, 3, 4, 6, 8, 9 }, { 1, 3, 6, 8, 9 }, { 2, 5, 7 }, { 2, 5, 7 }, { 1, 3, 9 }, { 3, 8, 9 } };\n EWAHCompressedBitmap[] toBeOred = new EWAHCompressedBitmap[data.length];\n Set<Integer> bruteForceAnswer = new HashSet<Integer>();\n for (int i = 0; i < toBeOred.length; ++i) {\n toBeOred[i] = new EWAHCompressedBitmap();\n for (int j : data[i]) {\n toBeOred[i].set(j);\n bruteForceAnswer.add(j);\n }\n toBeOred[i].setSizeInBits(1000, false);\n }\n long rightcard = bruteForceAnswer.size();\n EWAHCompressedBitmap e1 = FastAggregation.or(toBeOred);\n Assert.assertEquals(rightcard, e1.cardinality());\n EWAHCompressedBitmap e2 = FastAggregation.bufferedor(65536, toBeOred);\n Assert.assertEquals(rightcard, e2.cardinality());\n EWAHCompressedBitmap foo = new EWAHCompressedBitmap();\n FastAggregation.legacy_orWithContainer(foo, toBeOred);\n Assert.assertEquals(rightcard, foo.cardinality());\n}",
"new_test_code": "@SuppressWarnings({ \"deprecation\", \"boxing\" })\n@Test\npublic void OKaserBugReportJuly2013() {\n System.out.println(\"testing OKaserBugReportJuly2013\");\n int[][] data = { {}, { 5, 6, 7, 8, 9 }, { 1 }, { 2 }, { 2, 5, 7 }, { 1 }, { 2 }, { 1, 6, 9 }, { 1, 3, 4, 6, 8, 9 }, { 1, 3, 4, 6, 8, 9 }, { 1, 3, 6, 8, 9 }, { 2, 5, 7 }, { 2, 5, 7 }, { 1, 3, 9 }, { 3, 8, 9 } };\n EWAHCompressedBitmap[] toBeOred = new EWAHCompressedBitmap[data.length];\n Set<Integer> bruteForceAnswer = new HashSet<Integer>();\n for (int i = 0; i < toBeOred.length; ++i) {\n toBeOred[i] = new EWAHCompressedBitmap();\n for (int j : data[i]) {\n toBeOred[i].set(j);\n bruteForceAnswer.add(j);\n }\n toBeOred[i].setSizeInBits(1000, false);\n }\n long rightcard = bruteForceAnswer.size();\n EWAHCompressedBitmap e1 = FastAggregation.or(toBeOred);\n Assert.assertEquals(rightcard, e1.cardinality());\n EWAHCompressedBitmap e2 = FastAggregation.bufferedor(65536, toBeOred);\n Assert.assertEquals(rightcard, e2.cardinality());\n EWAHCompressedBitmap foo = new EWAHCompressedBitmap();\n FastAggregation.orToContainer(foo, toBeOred);\n Assert.assertEquals(rightcard, foo.cardinality());\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java"
],
"old_test_lnum": [
"1243-1272"
],
"new_test_lnum": [
"1243-1272"
],
"old_production_code": "@Deprecated\npublic static void legacy_orWithContainer(final BitmapStorage container, final EWAHCompressedBitmap... bitmaps) {\n if (bitmaps.length == 2) {\n bitmaps[0].orToContainer(bitmaps[1], container);\n return;\n }\n final EWAHCompressedBitmap[] sortedBitmaps = bitmaps.clone();\n Arrays.sort(sortedBitmaps, new Comparator<EWAHCompressedBitmap>() {\n\n @Override\n public int compare(EWAHCompressedBitmap a, EWAHCompressedBitmap b) {\n return a.sizeInBits() < b.sizeInBits() ? 1 : a.sizeInBits() == b.sizeInBits() ? 0 : -1;\n }\n });\n final IteratingBufferedRunningLengthWord[] rlws = new IteratingBufferedRunningLengthWord[bitmaps.length];\n int maxAvailablePos = 0;\n for (EWAHCompressedBitmap bitmap : sortedBitmaps) {\n EWAHIterator iterator = bitmap.getEWAHIterator();\n if (iterator.hasNext()) {\n rlws[maxAvailablePos++] = new IteratingBufferedRunningLengthWord(iterator);\n }\n }\n if (maxAvailablePos == 0) {\n container.setSizeInBitsWithinLastWord(0);\n return;\n }\n int maxSize = sortedBitmaps[0].sizeInBits();\n while (true) {\n long maxOneRl = 0;\n long minZeroRl = Long.MAX_VALUE;\n long minSize = Long.MAX_VALUE;\n int numEmptyRl = 0;\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord rlw = rlws[i];\n long size = rlw.size();\n if (size == 0) {\n maxAvailablePos = i;\n break;\n }\n minSize = Math.min(minSize, size);\n if (rlw.getRunningBit()) {\n long rl = rlw.getRunningLength();\n maxOneRl = Math.max(maxOneRl, rl);\n minZeroRl = 0;\n if (rl == 0 && size > 0) {\n numEmptyRl++;\n }\n } else {\n long rl = rlw.getRunningLength();\n minZeroRl = Math.min(minZeroRl, rl);\n if (rl == 0 && size > 0) {\n numEmptyRl++;\n }\n }\n }\n if (maxAvailablePos == 0) {\n break;\n } else if (maxAvailablePos == 1) {\n rlws[0].discharge(container);\n break;\n }\n if (maxOneRl > 0) {\n container.addStreamOfEmptyWords(true, maxOneRl);\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord rlw = rlws[i];\n rlw.discardFirstWords(maxOneRl);\n }\n } else if (minZeroRl > 0) {\n container.addStreamOfEmptyWords(false, minZeroRl);\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord rlw = rlws[i];\n rlw.discardFirstWords(minZeroRl);\n }\n } else {\n int index = 0;\n if (numEmptyRl == 1) {\n IteratingBufferedRunningLengthWord emptyRl = null;\n long minNonEmptyRl = Long.MAX_VALUE;\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord rlw = rlws[i];\n long rl = rlw.getRunningLength();\n if (rl == 0) {\n assert emptyRl == null;\n emptyRl = rlw;\n } else {\n minNonEmptyRl = Math.min(minNonEmptyRl, rl);\n }\n }\n long wordsToWrite = minNonEmptyRl > minSize ? minSize : minNonEmptyRl;\n if (emptyRl != null)\n emptyRl.writeLiteralWords((int) wordsToWrite, container);\n index += wordsToWrite;\n }\n while (index < minSize) {\n long word = 0;\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord rlw = rlws[i];\n if (rlw.getRunningLength() <= index) {\n word |= rlw.getLiteralWordAt(index - (int) rlw.getRunningLength());\n }\n }\n container.addWord(word);\n index++;\n }\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord rlw = rlws[i];\n rlw.discardFirstWords(minSize);\n }\n }\n }\n container.setSizeInBitsWithinLastWord(maxSize);\n}",
"new_production_code": "",
"focal_file_path": "src/main/java/com/googlecode/javaewah/FastAggregation.java",
"focal_method_sign": "com/googlecode/javaewah/FastAggregation.legacy_orWithContainer:(Lcom/googlecode/javaewah/BitmapStorage;[Lcom/googlecode/javaewah/EWAHCompressedBitmap;)V",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah/FastAggregation.legacy_orWithContainer:(Lcom/googlecode/javaewah/BitmapStorage;[Lcom/googlecode/javaewah/EWAHCompressedBitmap;)V",
"file_path_old": "src/main/java/com/googlecode/javaewah/FastAggregation.java",
"line_nums_old": "456-600",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.7283950617283951,
"branch_coverage_gold": 5.789,
"method_coverage_gold": 10.0571,
"line_coverage_gold": 8.2487,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.cardinality:()I",
"com/googlecode/javaewah/FastAggregation.bufferedor:(I[Lcom/googlecode/javaewah/EWAHCompressedBitmap;)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/FastAggregation.or:([Lcom/googlecode/javaewah/EWAHCompressedBitmap;)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/FastAggregation.orToContainer:(Lcom/googlecode/javaewah/BitmapStorage;[Lcom/googlecode/javaewah/EWAHCompressedBitmap;)V",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z"
],
"all_deps_old": [
"com/googlecode/javaewah/FastAggregation.legacy_orWithContainer:(Lcom/googlecode/javaewah/BitmapStorage;[Lcom/googlecode/javaewah/EWAHCompressedBitmap;)V",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.cardinality:()I",
"com/googlecode/javaewah/FastAggregation.bufferedor:(I[Lcom/googlecode/javaewah/EWAHCompressedBitmap;)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/FastAggregation.or:([Lcom/googlecode/javaewah/EWAHCompressedBitmap;)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah/FastAggregation.legacy_orWithContainer:(Lcom/googlecode/javaewah/BitmapStorage;[Lcom/googlecode/javaewah/EWAHCompressedBitmap;)V",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah/FastAggregation.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
}
],
"version": "JavaEWAH-1.2.3",
"java_version": 8
},
{
"task_id": "lemire_javaewah-JavaEWAH-1.2.3__89d1b82_4c7ab29__IteratorAggregationTest_93a006a6",
"project_name": "lemire_javaewah-JavaEWAH-1.2.3",
"git_clone_url": "https://github.com/lemire/javaewah.git",
"rev1": "89d1b82193d15316c653d9c0beb77805a4993114",
"rev2": "4c7ab2916911835abfa483803befac5c5c914838",
"rev1_date": "2016-04-26T20:45:09Z",
"rev2_date": "2016-04-27T00:31:54Z",
"git_diff_url": "https://github.com/lemire/javaewah/compare/89d1b82193d15316c653d9c0beb77805a4993114...4c7ab2916911835abfa483803befac5c5c914838",
"test_file": "src/test/java/com/googlecode/javaewah/IteratorAggregationTest.java",
"test_changes": [
{
"change_id": "44_lemire_javaewah-JavaEWAH-1.2.3_89d1b82_4c7ab29_IteratorAggregationTest",
"test_sign": "com/googlecode/javaewah/IteratorAggregationTest.testWideOr:()V",
"class": "IteratorAggregationTest",
"method": "testWideOr",
"module": "",
"junit_selector": "com.googlecode.javaewah.IteratorAggregationTest#testWideOr",
"old_test_code": "@SuppressWarnings(\"deprecation\")\n@Test\npublic void testWideOr() {\n for (int nbr = 3; nbr <= 24; nbr += 3) {\n for (int N = 100; N < 1000; N += 100) {\n System.out.println(\"testWideOr N = \" + N);\n Iterator<EWAHCompressedBitmap[]> i = getCollections(N, 3);\n while (i.hasNext()) {\n EWAHCompressedBitmap[] x = i.next();\n EWAHCompressedBitmap tanswer = EWAHCompressedBitmap.or(x);\n EWAHCompressedBitmap container = new EWAHCompressedBitmap();\n FastAggregation.legacy_orWithContainer(container, x);\n assertTrue(container.equals(tanswer));\n EWAHCompressedBitmap x1 = IteratorUtil.materialize(IteratorAggregation.bufferedor(IteratorUtil.toIterators(x)));\n assertTrue(x1.equals(tanswer));\n }\n System.gc();\n }\n }\n}",
"new_test_code": "@SuppressWarnings(\"deprecation\")\n@Test\npublic void testWideOr() {\n for (int nbr = 3; nbr <= 24; nbr += 3) {\n for (int N = 100; N < 1000; N += 100) {\n System.out.println(\"testWideOr N = \" + N);\n Iterator<EWAHCompressedBitmap[]> i = getCollections(N, 3);\n while (i.hasNext()) {\n EWAHCompressedBitmap[] x = i.next();\n EWAHCompressedBitmap tanswer = EWAHCompressedBitmap.or(x);\n EWAHCompressedBitmap container = new EWAHCompressedBitmap();\n FastAggregation.orToContainer(container, x);\n assertTrue(container.equals(tanswer));\n EWAHCompressedBitmap x1 = IteratorUtil.materialize(IteratorAggregation.bufferedor(IteratorUtil.toIterators(x)));\n assertTrue(x1.equals(tanswer));\n }\n System.gc();\n }\n }\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah/IteratorAggregationTest.java"
],
"old_test_lnum": [
"117-141"
],
"new_test_lnum": [
"117-141"
],
"old_production_code": "@Deprecated\npublic static void legacy_orWithContainer(final BitmapStorage container, final EWAHCompressedBitmap... bitmaps) {\n if (bitmaps.length == 2) {\n bitmaps[0].orToContainer(bitmaps[1], container);\n return;\n }\n final EWAHCompressedBitmap[] sortedBitmaps = bitmaps.clone();\n Arrays.sort(sortedBitmaps, new Comparator<EWAHCompressedBitmap>() {\n\n @Override\n public int compare(EWAHCompressedBitmap a, EWAHCompressedBitmap b) {\n return a.sizeInBits() < b.sizeInBits() ? 1 : a.sizeInBits() == b.sizeInBits() ? 0 : -1;\n }\n });\n final IteratingBufferedRunningLengthWord[] rlws = new IteratingBufferedRunningLengthWord[bitmaps.length];\n int maxAvailablePos = 0;\n for (EWAHCompressedBitmap bitmap : sortedBitmaps) {\n EWAHIterator iterator = bitmap.getEWAHIterator();\n if (iterator.hasNext()) {\n rlws[maxAvailablePos++] = new IteratingBufferedRunningLengthWord(iterator);\n }\n }\n if (maxAvailablePos == 0) {\n container.setSizeInBitsWithinLastWord(0);\n return;\n }\n int maxSize = sortedBitmaps[0].sizeInBits();\n while (true) {\n long maxOneRl = 0;\n long minZeroRl = Long.MAX_VALUE;\n long minSize = Long.MAX_VALUE;\n int numEmptyRl = 0;\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord rlw = rlws[i];\n long size = rlw.size();\n if (size == 0) {\n maxAvailablePos = i;\n break;\n }\n minSize = Math.min(minSize, size);\n if (rlw.getRunningBit()) {\n long rl = rlw.getRunningLength();\n maxOneRl = Math.max(maxOneRl, rl);\n minZeroRl = 0;\n if (rl == 0 && size > 0) {\n numEmptyRl++;\n }\n } else {\n long rl = rlw.getRunningLength();\n minZeroRl = Math.min(minZeroRl, rl);\n if (rl == 0 && size > 0) {\n numEmptyRl++;\n }\n }\n }\n if (maxAvailablePos == 0) {\n break;\n } else if (maxAvailablePos == 1) {\n rlws[0].discharge(container);\n break;\n }\n if (maxOneRl > 0) {\n container.addStreamOfEmptyWords(true, maxOneRl);\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord rlw = rlws[i];\n rlw.discardFirstWords(maxOneRl);\n }\n } else if (minZeroRl > 0) {\n container.addStreamOfEmptyWords(false, minZeroRl);\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord rlw = rlws[i];\n rlw.discardFirstWords(minZeroRl);\n }\n } else {\n int index = 0;\n if (numEmptyRl == 1) {\n IteratingBufferedRunningLengthWord emptyRl = null;\n long minNonEmptyRl = Long.MAX_VALUE;\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord rlw = rlws[i];\n long rl = rlw.getRunningLength();\n if (rl == 0) {\n assert emptyRl == null;\n emptyRl = rlw;\n } else {\n minNonEmptyRl = Math.min(minNonEmptyRl, rl);\n }\n }\n long wordsToWrite = minNonEmptyRl > minSize ? minSize : minNonEmptyRl;\n if (emptyRl != null)\n emptyRl.writeLiteralWords((int) wordsToWrite, container);\n index += wordsToWrite;\n }\n while (index < minSize) {\n long word = 0;\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord rlw = rlws[i];\n if (rlw.getRunningLength() <= index) {\n word |= rlw.getLiteralWordAt(index - (int) rlw.getRunningLength());\n }\n }\n container.addWord(word);\n index++;\n }\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord rlw = rlws[i];\n rlw.discardFirstWords(minSize);\n }\n }\n }\n container.setSizeInBitsWithinLastWord(maxSize);\n}",
"new_production_code": "",
"focal_file_path": "src/main/java/com/googlecode/javaewah/FastAggregation.java",
"focal_method_sign": "com/googlecode/javaewah/FastAggregation.legacy_orWithContainer:(Lcom/googlecode/javaewah/BitmapStorage;[Lcom/googlecode/javaewah/EWAHCompressedBitmap;)V",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah/FastAggregation.legacy_orWithContainer:(Lcom/googlecode/javaewah/BitmapStorage;[Lcom/googlecode/javaewah/EWAHCompressedBitmap;)V",
"file_path_old": "src/main/java/com/googlecode/javaewah/FastAggregation.java",
"line_nums_old": "456-600",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.8333333333333334,
"branch_coverage_gold": 7.1612,
"method_coverage_gold": 12.8,
"line_coverage_gold": 9.4508,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.or:([Lcom/googlecode/javaewah/EWAHCompressedBitmap;)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/IteratorAggregationTest.getCollections:(II)Ljava/util/Iterator",
"com/googlecode/javaewah/IteratorAggregationTest$1.hasNext:()Z",
"com/googlecode/javaewah/FastAggregation.orToContainer:(Lcom/googlecode/javaewah/BitmapStorage;[Lcom/googlecode/javaewah/EWAHCompressedBitmap;)V",
"com/googlecode/javaewah/IteratorUtil.toIterators:([Lcom/googlecode/javaewah/EWAHCompressedBitmap;)[Lcom/googlecode/javaewah/IteratingRLW",
"com/googlecode/javaewah/IteratorAggregation.bufferedor:([Lcom/googlecode/javaewah/IteratingRLW;)Lcom/googlecode/javaewah/IteratingRLW",
"com/googlecode/javaewah/IteratorUtil.materialize:(Lcom/googlecode/javaewah/IteratingRLW;)Lcom/googlecode/javaewah/EWAHCompressedBitmap"
],
"all_deps_old": [
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.or:([Lcom/googlecode/javaewah/EWAHCompressedBitmap;)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/IteratorAggregationTest.getCollections:(II)Ljava/util/Iterator",
"com/googlecode/javaewah/IteratorAggregationTest$1.hasNext:()Z",
"com/googlecode/javaewah/FastAggregation.legacy_orWithContainer:(Lcom/googlecode/javaewah/BitmapStorage;[Lcom/googlecode/javaewah/EWAHCompressedBitmap;)V",
"com/googlecode/javaewah/IteratorUtil.toIterators:([Lcom/googlecode/javaewah/EWAHCompressedBitmap;)[Lcom/googlecode/javaewah/IteratingRLW",
"com/googlecode/javaewah/IteratorAggregation.bufferedor:([Lcom/googlecode/javaewah/IteratingRLW;)Lcom/googlecode/javaewah/IteratingRLW",
"com/googlecode/javaewah/IteratorUtil.materialize:(Lcom/googlecode/javaewah/IteratingRLW;)Lcom/googlecode/javaewah/EWAHCompressedBitmap"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah/FastAggregation.legacy_orWithContainer:(Lcom/googlecode/javaewah/BitmapStorage;[Lcom/googlecode/javaewah/EWAHCompressedBitmap;)V",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah/FastAggregation.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
}
],
"version": "JavaEWAH-1.2.3",
"java_version": 8
},
{
"task_id": "lemire_javaewah-JavaEWAH-1.2.3__89d1b82_4c7ab29__EWAHCompressedBitmap32Test_a546a340",
"project_name": "lemire_javaewah-JavaEWAH-1.2.3",
"git_clone_url": "https://github.com/lemire/javaewah.git",
"rev1": "89d1b82193d15316c653d9c0beb77805a4993114",
"rev2": "4c7ab2916911835abfa483803befac5c5c914838",
"rev1_date": "2016-04-26T20:45:09Z",
"rev2_date": "2016-04-27T00:31:54Z",
"git_diff_url": "https://github.com/lemire/javaewah/compare/89d1b82193d15316c653d9c0beb77805a4993114...4c7ab2916911835abfa483803befac5c5c914838",
"test_file": "src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java",
"test_changes": [
{
"change_id": "45_lemire_javaewah-JavaEWAH-1.2.3_89d1b82_4c7ab29_EWAHCompressedBitmap32Test",
"test_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32Test.OKaserBugReportJuly2013:()V",
"class": "EWAHCompressedBitmap32Test",
"method": "OKaserBugReportJuly2013",
"module": "",
"junit_selector": "com.googlecode.javaewah32.EWAHCompressedBitmap32Test#OKaserBugReportJuly2013",
"old_test_code": "@SuppressWarnings({ \"deprecation\", \"boxing\" })\n@Test\npublic void OKaserBugReportJuly2013() {\n System.out.println(\"testing OKaserBugReportJuly2013\");\n int[][] data = { {}, { 5, 6, 7, 8, 9 }, { 1 }, { 2 }, { 2, 5, 7 }, { 1 }, { 2 }, { 1, 6, 9 }, { 1, 3, 4, 6, 8, 9 }, { 1, 3, 4, 6, 8, 9 }, { 1, 3, 6, 8, 9 }, { 2, 5, 7 }, { 2, 5, 7 }, { 1, 3, 9 }, { 3, 8, 9 } };\n EWAHCompressedBitmap32[] toBeOred = new EWAHCompressedBitmap32[data.length];\n Set<Integer> bruteForceAnswer = new HashSet<Integer>();\n for (int i = 0; i < toBeOred.length; ++i) {\n toBeOred[i] = new EWAHCompressedBitmap32();\n for (int j : data[i]) {\n toBeOred[i].set(j);\n bruteForceAnswer.add(j);\n }\n toBeOred[i].setSizeInBits(1000, false);\n }\n long rightcard = bruteForceAnswer.size();\n EWAHCompressedBitmap32 foo = new EWAHCompressedBitmap32();\n FastAggregation32.legacy_orWithContainer(foo, toBeOred);\n Assert.assertEquals(rightcard, foo.cardinality());\n EWAHCompressedBitmap32 e1 = FastAggregation.or(toBeOred);\n Assert.assertEquals(rightcard, e1.cardinality());\n EWAHCompressedBitmap32 e2 = FastAggregation32.bufferedor(65536, toBeOred);\n Assert.assertEquals(rightcard, e2.cardinality());\n}",
"new_test_code": "@SuppressWarnings({ \"deprecation\", \"boxing\" })\n@Test\npublic void OKaserBugReportJuly2013() {\n System.out.println(\"testing OKaserBugReportJuly2013\");\n int[][] data = { {}, { 5, 6, 7, 8, 9 }, { 1 }, { 2 }, { 2, 5, 7 }, { 1 }, { 2 }, { 1, 6, 9 }, { 1, 3, 4, 6, 8, 9 }, { 1, 3, 4, 6, 8, 9 }, { 1, 3, 6, 8, 9 }, { 2, 5, 7 }, { 2, 5, 7 }, { 1, 3, 9 }, { 3, 8, 9 } };\n EWAHCompressedBitmap32[] toBeOred = new EWAHCompressedBitmap32[data.length];\n Set<Integer> bruteForceAnswer = new HashSet<Integer>();\n for (int i = 0; i < toBeOred.length; ++i) {\n toBeOred[i] = new EWAHCompressedBitmap32();\n for (int j : data[i]) {\n toBeOred[i].set(j);\n bruteForceAnswer.add(j);\n }\n toBeOred[i].setSizeInBits(1000, false);\n }\n long rightcard = bruteForceAnswer.size();\n EWAHCompressedBitmap32 foo = new EWAHCompressedBitmap32();\n FastAggregation32.orToContainer(foo, toBeOred);\n Assert.assertEquals(rightcard, foo.cardinality());\n EWAHCompressedBitmap32 e1 = FastAggregation.or(toBeOred);\n Assert.assertEquals(rightcard, e1.cardinality());\n EWAHCompressedBitmap32 e2 = FastAggregation32.bufferedor(65536, toBeOred);\n Assert.assertEquals(rightcard, e2.cardinality());\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java"
],
"old_test_lnum": [
"1191-1221"
],
"new_test_lnum": [
"1244-1274"
],
"old_production_code": "@Deprecated\npublic static void legacy_orWithContainer(final BitmapStorage32 container, final EWAHCompressedBitmap32... bitmaps) {\n if (bitmaps.length == 2) {\n bitmaps[0].orToContainer(bitmaps[1], container);\n return;\n }\n final EWAHCompressedBitmap32[] sortedBitmaps = bitmaps.clone();\n Arrays.sort(sortedBitmaps, new Comparator<EWAHCompressedBitmap32>() {\n\n @Override\n public int compare(EWAHCompressedBitmap32 a, EWAHCompressedBitmap32 b) {\n return a.sizeInBits() < b.sizeInBits() ? 1 : a.sizeInBits() == b.sizeInBits() ? 0 : -1;\n }\n });\n final IteratingBufferedRunningLengthWord32[] rlws = new IteratingBufferedRunningLengthWord32[bitmaps.length];\n int maxAvailablePos = 0;\n for (EWAHCompressedBitmap32 bitmap : sortedBitmaps) {\n EWAHIterator32 iterator = bitmap.getEWAHIterator();\n if (iterator.hasNext()) {\n rlws[maxAvailablePos++] = new IteratingBufferedRunningLengthWord32(iterator);\n }\n }\n if (maxAvailablePos == 0) {\n container.setSizeInBitsWithinLastWord(0);\n return;\n }\n int maxSize = sortedBitmaps[0].sizeInBits();\n while (true) {\n int maxOneRl = 0;\n int minZeroRl = Integer.MAX_VALUE;\n int minSize = Integer.MAX_VALUE;\n int numEmptyRl = 0;\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord32 rlw = rlws[i];\n int size = rlw.size();\n if (size == 0) {\n maxAvailablePos = i;\n break;\n }\n minSize = Math.min(minSize, size);\n if (rlw.getRunningBit()) {\n int rl = rlw.getRunningLength();\n maxOneRl = Math.max(maxOneRl, rl);\n minZeroRl = 0;\n if (rl == 0 && size > 0) {\n numEmptyRl++;\n }\n } else {\n int rl = rlw.getRunningLength();\n minZeroRl = Math.min(minZeroRl, rl);\n if (rl == 0 && size > 0) {\n numEmptyRl++;\n }\n }\n }\n if (maxAvailablePos == 0) {\n break;\n } else if (maxAvailablePos == 1) {\n rlws[0].discharge(container);\n break;\n }\n if (maxOneRl > 0) {\n container.addStreamOfEmptyWords(true, maxOneRl);\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord32 rlw = rlws[i];\n rlw.discardFirstWords(maxOneRl);\n }\n } else if (minZeroRl > 0) {\n container.addStreamOfEmptyWords(false, minZeroRl);\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord32 rlw = rlws[i];\n rlw.discardFirstWords(minZeroRl);\n }\n } else {\n int index = 0;\n if (numEmptyRl == 1) {\n IteratingBufferedRunningLengthWord32 emptyRl = null;\n int minNonEmptyRl = Integer.MAX_VALUE;\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord32 rlw = rlws[i];\n int rl = rlw.getRunningLength();\n if (rl == 0) {\n assert emptyRl == null;\n emptyRl = rlw;\n } else {\n minNonEmptyRl = Math.min(minNonEmptyRl, rl);\n }\n }\n int wordsToWrite = minNonEmptyRl > minSize ? minSize : minNonEmptyRl;\n if (emptyRl != null)\n emptyRl.writeLiteralWords(wordsToWrite, container);\n index += wordsToWrite;\n }\n while (index < minSize) {\n int word = 0;\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord32 rlw = rlws[i];\n if (rlw.getRunningLength() <= index) {\n word |= rlw.getLiteralWordAt(index - rlw.getRunningLength());\n }\n }\n container.addWord(word);\n index++;\n }\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord32 rlw = rlws[i];\n rlw.discardFirstWords(minSize);\n }\n }\n }\n container.setSizeInBitsWithinLastWord(maxSize);\n}",
"new_production_code": "",
"focal_file_path": "src/main/java/com/googlecode/javaewah32/FastAggregation32.java",
"focal_method_sign": "com/googlecode/javaewah32/FastAggregation32.legacy_orWithContainer:(Lcom/googlecode/javaewah32/BitmapStorage32;[Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)V",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah32/FastAggregation32.legacy_orWithContainer:(Lcom/googlecode/javaewah32/BitmapStorage32;[Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)V",
"file_path_old": "src/main/java/com/googlecode/javaewah32/FastAggregation32.java",
"line_nums_old": "397-541",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.7160493827160493,
"branch_coverage_gold": 5.789,
"method_coverage_gold": 10.0571,
"line_coverage_gold": 8.3731,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah32/FastAggregation32.bufferedor:(I[Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/FastAggregation32.orToContainer:(Lcom/googlecode/javaewah32/BitmapStorage32;[Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)V",
"com/googlecode/javaewah/FastAggregation.or:([Lcom/googlecode/javaewah/LogicalElement;)Lcom/googlecode/javaewah/LogicalElement",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.cardinality:()I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z"
],
"all_deps_old": [
"com/googlecode/javaewah32/FastAggregation32.bufferedor:(I[Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/FastAggregation32.legacy_orWithContainer:(Lcom/googlecode/javaewah32/BitmapStorage32;[Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)V",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.cardinality:()I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah32/FastAggregation32.legacy_orWithContainer:(Lcom/googlecode/javaewah32/BitmapStorage32;[Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)V",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/FastAggregation32.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
}
],
"version": "JavaEWAH-1.2.3",
"java_version": 8
},
{
"task_id": "lemire_javaewah-JavaEWAH-1.2.3__89d1b82_4c7ab29__IteratorAggregation32Test_93a006a6",
"project_name": "lemire_javaewah-JavaEWAH-1.2.3",
"git_clone_url": "https://github.com/lemire/javaewah.git",
"rev1": "89d1b82193d15316c653d9c0beb77805a4993114",
"rev2": "4c7ab2916911835abfa483803befac5c5c914838",
"rev1_date": "2016-04-26T20:45:09Z",
"rev2_date": "2016-04-27T00:31:54Z",
"git_diff_url": "https://github.com/lemire/javaewah/compare/89d1b82193d15316c653d9c0beb77805a4993114...4c7ab2916911835abfa483803befac5c5c914838",
"test_file": "src/test/java/com/googlecode/javaewah32/IteratorAggregation32Test.java",
"test_changes": [
{
"change_id": "46_lemire_javaewah-JavaEWAH-1.2.3_89d1b82_4c7ab29_IteratorAggregation32Test",
"test_sign": "com/googlecode/javaewah32/IteratorAggregation32Test.testWideOr:()V",
"class": "IteratorAggregation32Test",
"method": "testWideOr",
"module": "",
"junit_selector": "com.googlecode.javaewah32.IteratorAggregation32Test#testWideOr",
"old_test_code": "@SuppressWarnings(\"deprecation\")\n@Test\npublic void testWideOr() {\n for (int nbr = 3; nbr <= 24; nbr += 3) {\n for (int N = 100; N < 1000; N += 100) {\n System.out.println(\"testWideOr N = \" + N);\n Iterator<EWAHCompressedBitmap32[]> i = getCollections(N, 3);\n while (i.hasNext()) {\n EWAHCompressedBitmap32[] x = i.next();\n EWAHCompressedBitmap32 tanswer = EWAHCompressedBitmap32.or(x);\n EWAHCompressedBitmap32 container = new EWAHCompressedBitmap32();\n FastAggregation32.legacy_orWithContainer(container, x);\n assertTrue(container.equals(tanswer));\n EWAHCompressedBitmap32 x1 = IteratorUtil32.materialize(IteratorAggregation32.bufferedor(IteratorUtil32.toIterators(x)));\n assertTrue(x1.equals(tanswer));\n }\n System.gc();\n }\n }\n}",
"new_test_code": "@SuppressWarnings(\"deprecation\")\n@Test\npublic void testWideOr() {\n for (int nbr = 3; nbr <= 24; nbr += 3) {\n for (int N = 100; N < 1000; N += 100) {\n System.out.println(\"testWideOr N = \" + N);\n Iterator<EWAHCompressedBitmap32[]> i = getCollections(N, 3);\n while (i.hasNext()) {\n EWAHCompressedBitmap32[] x = i.next();\n EWAHCompressedBitmap32 tanswer = EWAHCompressedBitmap32.or(x);\n EWAHCompressedBitmap32 container = new EWAHCompressedBitmap32();\n FastAggregation32.orToContainer(container, x);\n assertTrue(container.equals(tanswer));\n EWAHCompressedBitmap32 x1 = IteratorUtil32.materialize(IteratorAggregation32.bufferedor(IteratorUtil32.toIterators(x)));\n assertTrue(x1.equals(tanswer));\n }\n System.gc();\n }\n }\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah32/IteratorAggregation32Test.java"
],
"old_test_lnum": [
"120-146"
],
"new_test_lnum": [
"120-146"
],
"old_production_code": "@Deprecated\npublic static void legacy_orWithContainer(final BitmapStorage32 container, final EWAHCompressedBitmap32... bitmaps) {\n if (bitmaps.length == 2) {\n bitmaps[0].orToContainer(bitmaps[1], container);\n return;\n }\n final EWAHCompressedBitmap32[] sortedBitmaps = bitmaps.clone();\n Arrays.sort(sortedBitmaps, new Comparator<EWAHCompressedBitmap32>() {\n\n @Override\n public int compare(EWAHCompressedBitmap32 a, EWAHCompressedBitmap32 b) {\n return a.sizeInBits() < b.sizeInBits() ? 1 : a.sizeInBits() == b.sizeInBits() ? 0 : -1;\n }\n });\n final IteratingBufferedRunningLengthWord32[] rlws = new IteratingBufferedRunningLengthWord32[bitmaps.length];\n int maxAvailablePos = 0;\n for (EWAHCompressedBitmap32 bitmap : sortedBitmaps) {\n EWAHIterator32 iterator = bitmap.getEWAHIterator();\n if (iterator.hasNext()) {\n rlws[maxAvailablePos++] = new IteratingBufferedRunningLengthWord32(iterator);\n }\n }\n if (maxAvailablePos == 0) {\n container.setSizeInBitsWithinLastWord(0);\n return;\n }\n int maxSize = sortedBitmaps[0].sizeInBits();\n while (true) {\n int maxOneRl = 0;\n int minZeroRl = Integer.MAX_VALUE;\n int minSize = Integer.MAX_VALUE;\n int numEmptyRl = 0;\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord32 rlw = rlws[i];\n int size = rlw.size();\n if (size == 0) {\n maxAvailablePos = i;\n break;\n }\n minSize = Math.min(minSize, size);\n if (rlw.getRunningBit()) {\n int rl = rlw.getRunningLength();\n maxOneRl = Math.max(maxOneRl, rl);\n minZeroRl = 0;\n if (rl == 0 && size > 0) {\n numEmptyRl++;\n }\n } else {\n int rl = rlw.getRunningLength();\n minZeroRl = Math.min(minZeroRl, rl);\n if (rl == 0 && size > 0) {\n numEmptyRl++;\n }\n }\n }\n if (maxAvailablePos == 0) {\n break;\n } else if (maxAvailablePos == 1) {\n rlws[0].discharge(container);\n break;\n }\n if (maxOneRl > 0) {\n container.addStreamOfEmptyWords(true, maxOneRl);\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord32 rlw = rlws[i];\n rlw.discardFirstWords(maxOneRl);\n }\n } else if (minZeroRl > 0) {\n container.addStreamOfEmptyWords(false, minZeroRl);\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord32 rlw = rlws[i];\n rlw.discardFirstWords(minZeroRl);\n }\n } else {\n int index = 0;\n if (numEmptyRl == 1) {\n IteratingBufferedRunningLengthWord32 emptyRl = null;\n int minNonEmptyRl = Integer.MAX_VALUE;\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord32 rlw = rlws[i];\n int rl = rlw.getRunningLength();\n if (rl == 0) {\n assert emptyRl == null;\n emptyRl = rlw;\n } else {\n minNonEmptyRl = Math.min(minNonEmptyRl, rl);\n }\n }\n int wordsToWrite = minNonEmptyRl > minSize ? minSize : minNonEmptyRl;\n if (emptyRl != null)\n emptyRl.writeLiteralWords(wordsToWrite, container);\n index += wordsToWrite;\n }\n while (index < minSize) {\n int word = 0;\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord32 rlw = rlws[i];\n if (rlw.getRunningLength() <= index) {\n word |= rlw.getLiteralWordAt(index - rlw.getRunningLength());\n }\n }\n container.addWord(word);\n index++;\n }\n for (int i = 0; i < maxAvailablePos; i++) {\n IteratingBufferedRunningLengthWord32 rlw = rlws[i];\n rlw.discardFirstWords(minSize);\n }\n }\n }\n container.setSizeInBitsWithinLastWord(maxSize);\n}",
"new_production_code": "",
"focal_file_path": "src/main/java/com/googlecode/javaewah32/FastAggregation32.java",
"focal_method_sign": "com/googlecode/javaewah32/FastAggregation32.legacy_orWithContainer:(Lcom/googlecode/javaewah32/BitmapStorage32;[Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)V",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah32/FastAggregation32.legacy_orWithContainer:(Lcom/googlecode/javaewah32/BitmapStorage32;[Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)V",
"file_path_old": "src/main/java/com/googlecode/javaewah32/FastAggregation32.java",
"line_nums_old": "397-541",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.84,
"branch_coverage_gold": 7.6329,
"method_coverage_gold": 12.9143,
"line_coverage_gold": 9.9689,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.or:([Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/IteratorAggregation32Test.getCollections:(II)Ljava/util/Iterator",
"com/googlecode/javaewah32/IteratorAggregation32Test$1.hasNext:()Z",
"com/googlecode/javaewah32/FastAggregation32.orToContainer:(Lcom/googlecode/javaewah32/BitmapStorage32;[Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)V",
"com/googlecode/javaewah32/IteratorUtil32.toIterators:([Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)[Lcom/googlecode/javaewah32/IteratingRLW32",
"com/googlecode/javaewah32/IteratorAggregation32.bufferedor:([Lcom/googlecode/javaewah32/IteratingRLW32;)Lcom/googlecode/javaewah32/IteratingRLW32",
"com/googlecode/javaewah32/IteratorUtil32.materialize:(Lcom/googlecode/javaewah32/IteratingRLW32;)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32"
],
"all_deps_old": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.or:([Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/IteratorAggregation32Test.getCollections:(II)Ljava/util/Iterator",
"com/googlecode/javaewah32/IteratorAggregation32Test$1.hasNext:()Z",
"com/googlecode/javaewah32/FastAggregation32.legacy_orWithContainer:(Lcom/googlecode/javaewah32/BitmapStorage32;[Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)V",
"com/googlecode/javaewah32/IteratorUtil32.toIterators:([Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)[Lcom/googlecode/javaewah32/IteratingRLW32",
"com/googlecode/javaewah32/IteratorAggregation32.bufferedor:([Lcom/googlecode/javaewah32/IteratingRLW32;)Lcom/googlecode/javaewah32/IteratingRLW32",
"com/googlecode/javaewah32/IteratorUtil32.materialize:(Lcom/googlecode/javaewah32/IteratingRLW32;)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah32/FastAggregation32.legacy_orWithContainer:(Lcom/googlecode/javaewah32/BitmapStorage32;[Lcom/googlecode/javaewah32/EWAHCompressedBitmap32;)V",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/FastAggregation32.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
}
],
"version": "JavaEWAH-1.2.3",
"java_version": 8
},
{
"task_id": "lemire_javaewah-JavaEWAH-1.2.3__bb73d72_d8eaa82__EWAHCompressedBitmapTest_e1abd8c1",
"project_name": "lemire_javaewah-JavaEWAH-1.2.3",
"git_clone_url": "https://github.com/lemire/javaewah.git",
"rev1": "bb73d721a7c3e382541c91a3573f8ae84f8f394c",
"rev2": "d8eaa824dd60cc4bbeb4643c5bf64f6a5fcf549b",
"rev1_date": "2014-12-31T23:13:11Z",
"rev2_date": "2015-01-01T00:51:49Z",
"git_diff_url": "https://github.com/lemire/javaewah/compare/bb73d721a7c3e382541c91a3573f8ae84f8f394c...d8eaa824dd60cc4bbeb4643c5bf64f6a5fcf549b",
"test_file": "src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java",
"test_changes": [
{
"change_id": "3_lemire_javaewah-JavaEWAH-1.2.3_bb73d72_d8eaa82_EWAHCompressedBitmapTest",
"test_sign": "com/googlecode/javaewah/EWAHCompressedBitmapTest.compareSetAndSetSizeInBits2:()V",
"class": "EWAHCompressedBitmapTest",
"method": "compareSetAndSetSizeInBits2",
"module": "",
"junit_selector": "com.googlecode.javaewah.EWAHCompressedBitmapTest#compareSetAndSetSizeInBits2",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertEquals(bitmap1.buffer.sizeInWords(), bitmap2.buffer.sizeInWords());\n for (int i = 0; i < bitmap1.buffer.sizeInWords(); i++) {\n Assert.assertEquals(bitmap1.buffer.getWord(i), bitmap2.buffer.getWord(i));\n }\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java"
],
"old_test_lnum": [
"613-630"
],
"new_test_lnum": [
"616-636"
],
"old_production_code": "@Override\npublic long[] getWords() {\n return this.buffer;\n}",
"new_production_code": "",
"focal_file_path": "src/main/java/com/googlecode/javaewah/LongArray.java",
"focal_method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"file_path_old": "src/main/java/com/googlecode/javaewah/LongArray.java",
"line_nums_old": "56-59",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.6140350877192983,
"branch_coverage_gold": 2.1034,
"method_coverage_gold": 7.0197,
"line_coverage_gold": 3.9991,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/LongArray.getWord:(I)J",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/LongArray.sizeInWords:()I"
],
"all_deps_old": [
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/LongArray.getWords:()[J"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah/LongArray.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
},
{
"change_id": "4_lemire_javaewah-JavaEWAH-1.2.3_bb73d72_d8eaa82_EWAHCompressedBitmapTest",
"test_sign": "com/googlecode/javaewah/EWAHCompressedBitmapTest.compareSetAndSetSizeInBits:()V",
"class": "EWAHCompressedBitmapTest",
"method": "compareSetAndSetSizeInBits",
"module": "",
"junit_selector": "com.googlecode.javaewah.EWAHCompressedBitmapTest#compareSetAndSetSizeInBits",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertEquals(bitmap1.buffer.sizeInWords(), bitmap2.buffer.sizeInWords());\n for (int i = 0; i < bitmap1.buffer.sizeInWords(); i++) {\n Assert.assertEquals(bitmap1.buffer.getWord(i), bitmap2.buffer.getWord(i));\n }\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java"
],
"old_test_lnum": [
"593-611"
],
"new_test_lnum": [
"593-614"
],
"old_production_code": "@Override\npublic long[] getWords() {\n return this.buffer;\n}",
"new_production_code": "",
"focal_file_path": "src/main/java/com/googlecode/javaewah/LongArray.java",
"focal_method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"file_path_old": "src/main/java/com/googlecode/javaewah/LongArray.java",
"line_nums_old": "56-59",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.5263157894736842,
"branch_coverage_gold": 2.0596,
"method_coverage_gold": 7.0197,
"line_coverage_gold": 3.8916,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/LongArray.getWord:(I)J",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/LongArray.sizeInWords:()I"
],
"all_deps_old": [
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/LongArray.getWords:()[J"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah/LongArray.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
}
],
"version": "JavaEWAH-1.2.3",
"java_version": 8
},
{
"task_id": "lemire_javaewah-JavaEWAH-1.2.3__bb73d72_d8eaa82__EWAHCompressedBitmap32Test_e1abd8c1",
"project_name": "lemire_javaewah-JavaEWAH-1.2.3",
"git_clone_url": "https://github.com/lemire/javaewah.git",
"rev1": "bb73d721a7c3e382541c91a3573f8ae84f8f394c",
"rev2": "d8eaa824dd60cc4bbeb4643c5bf64f6a5fcf549b",
"rev1_date": "2014-12-31T23:13:11Z",
"rev2_date": "2015-01-01T00:51:49Z",
"git_diff_url": "https://github.com/lemire/javaewah/compare/bb73d721a7c3e382541c91a3573f8ae84f8f394c...d8eaa824dd60cc4bbeb4643c5bf64f6a5fcf549b",
"test_file": "src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java",
"test_changes": [
{
"change_id": "1_lemire_javaewah-JavaEWAH-1.2.3_bb73d72_d8eaa82_EWAHCompressedBitmap32Test",
"test_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32Test.compareSetAndSetSizeInBits2:()V",
"class": "EWAHCompressedBitmap32Test",
"method": "compareSetAndSetSizeInBits2",
"module": "",
"junit_selector": "com.googlecode.javaewah32.EWAHCompressedBitmap32Test#compareSetAndSetSizeInBits2",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertEquals(bitmap1.buffer.sizeInWords(), bitmap2.buffer.sizeInWords());\n for (int i = 0; i < bitmap1.buffer.sizeInWords(); i++) {\n Assert.assertEquals(bitmap1.buffer.getWord(i), bitmap2.buffer.getWord(i));\n }\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java"
],
"old_test_lnum": [
"528-545"
],
"new_test_lnum": [
"531-551"
],
"old_production_code": "@Override\npublic int[] getWords() {\n return this.buffer;\n}",
"new_production_code": "",
"focal_file_path": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"focal_method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"file_path_old": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"line_nums_old": "56-59",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.6140350877192983,
"branch_coverage_gold": 2.1034,
"method_coverage_gold": 7.0197,
"line_coverage_gold": 4.1496,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/IntArray.getWord:(I)I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/IntArray.sizeInWords:()I"
],
"all_deps_old": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/IntArray.getWords:()[I"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
},
{
"change_id": "2_lemire_javaewah-JavaEWAH-1.2.3_bb73d72_d8eaa82_EWAHCompressedBitmap32Test",
"test_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32Test.compareSetAndSetSizeInBits:()V",
"class": "EWAHCompressedBitmap32Test",
"method": "compareSetAndSetSizeInBits",
"module": "",
"junit_selector": "com.googlecode.javaewah32.EWAHCompressedBitmap32Test#compareSetAndSetSizeInBits",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertEquals(bitmap1.buffer.sizeInWords(), bitmap2.buffer.sizeInWords());\n for (int i = 0; i < bitmap1.buffer.sizeInWords(); i++) {\n Assert.assertEquals(bitmap1.buffer.getWord(i), bitmap2.buffer.getWord(i));\n }\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java"
],
"old_test_lnum": [
"508-526"
],
"new_test_lnum": [
"508-529"
],
"old_production_code": "@Override\npublic int[] getWords() {\n return this.buffer;\n}",
"new_production_code": "",
"focal_file_path": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"focal_method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"file_path_old": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"line_nums_old": "56-59",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.5263157894736842,
"branch_coverage_gold": 2.0596,
"method_coverage_gold": 7.0197,
"line_coverage_gold": 4.0421,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/IntArray.getWord:(I)I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/IntArray.sizeInWords:()I"
],
"all_deps_old": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/IntArray.getWords:()[I"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
}
],
"version": "JavaEWAH-1.2.3",
"java_version": 8
},
{
"task_id": "lemire_javaewah-JavaEWAH-1.2.3__ef6629e_5b73664__EWAHCompressedBitmapTest_e1abd8c1",
"project_name": "lemire_javaewah-JavaEWAH-1.2.3",
"git_clone_url": "https://github.com/lemire/javaewah.git",
"rev1": "ef6629e74595db71402e85570fedd224d00a47b3",
"rev2": "5b73664471072e8aed9c54faa6cd815732fca5f4",
"rev1_date": "2015-01-02T14:40:36Z",
"rev2_date": "2015-01-02T14:40:53Z",
"git_diff_url": "https://github.com/lemire/javaewah/compare/ef6629e74595db71402e85570fedd224d00a47b3...5b73664471072e8aed9c54faa6cd815732fca5f4",
"test_file": "src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java",
"test_changes": [
{
"change_id": "30_lemire_javaewah-JavaEWAH-1.2.3_ef6629e_5b73664_EWAHCompressedBitmapTest",
"test_sign": "com/googlecode/javaewah/EWAHCompressedBitmapTest.compareSetAndSetSizeInBits2:()V",
"class": "EWAHCompressedBitmapTest",
"method": "compareSetAndSetSizeInBits2",
"module": "",
"junit_selector": "com.googlecode.javaewah.EWAHCompressedBitmapTest#compareSetAndSetSizeInBits2",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertEquals(bitmap1.buffer.sizeInWords(), bitmap2.buffer.sizeInWords());\n for (int i = 0; i < bitmap1.buffer.sizeInWords(); i++) {\n Assert.assertEquals(bitmap1.buffer.getWord(i), bitmap2.buffer.getWord(i));\n }\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java"
],
"old_test_lnum": [
"613-630"
],
"new_test_lnum": [
"616-636"
],
"old_production_code": "@Override\npublic long[] getWords() {\n return this.buffer;\n}",
"new_production_code": "",
"focal_file_path": "src/main/java/com/googlecode/javaewah/LongArray.java",
"focal_method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"file_path_old": "src/main/java/com/googlecode/javaewah/LongArray.java",
"line_nums_old": "56-59",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.6140350877192983,
"branch_coverage_gold": 2.1034,
"method_coverage_gold": 7.0197,
"line_coverage_gold": 3.9991,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/LongArray.getWord:(I)J",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/LongArray.sizeInWords:()I"
],
"all_deps_old": [
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/LongArray.getWords:()[J"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah/LongArray.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
},
{
"change_id": "31_lemire_javaewah-JavaEWAH-1.2.3_ef6629e_5b73664_EWAHCompressedBitmapTest",
"test_sign": "com/googlecode/javaewah/EWAHCompressedBitmapTest.compareSetAndSetSizeInBits:()V",
"class": "EWAHCompressedBitmapTest",
"method": "compareSetAndSetSizeInBits",
"module": "",
"junit_selector": "com.googlecode.javaewah.EWAHCompressedBitmapTest#compareSetAndSetSizeInBits",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertEquals(bitmap1.buffer.sizeInWords(), bitmap2.buffer.sizeInWords());\n for (int i = 0; i < bitmap1.buffer.sizeInWords(); i++) {\n Assert.assertEquals(bitmap1.buffer.getWord(i), bitmap2.buffer.getWord(i));\n }\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java"
],
"old_test_lnum": [
"593-611"
],
"new_test_lnum": [
"593-614"
],
"old_production_code": "@Override\npublic long[] getWords() {\n return this.buffer;\n}",
"new_production_code": "",
"focal_file_path": "src/main/java/com/googlecode/javaewah/LongArray.java",
"focal_method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"file_path_old": "src/main/java/com/googlecode/javaewah/LongArray.java",
"line_nums_old": "56-59",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.5263157894736842,
"branch_coverage_gold": 2.0596,
"method_coverage_gold": 7.0197,
"line_coverage_gold": 3.8916,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/LongArray.getWord:(I)J",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/LongArray.sizeInWords:()I"
],
"all_deps_old": [
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/LongArray.getWords:()[J"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah/LongArray.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
}
],
"version": "JavaEWAH-1.2.3",
"java_version": 8
},
{
"task_id": "lemire_javaewah-JavaEWAH-1.2.3__ef6629e_5b73664__EWAHCompressedBitmap32Test_e1abd8c1",
"project_name": "lemire_javaewah-JavaEWAH-1.2.3",
"git_clone_url": "https://github.com/lemire/javaewah.git",
"rev1": "ef6629e74595db71402e85570fedd224d00a47b3",
"rev2": "5b73664471072e8aed9c54faa6cd815732fca5f4",
"rev1_date": "2015-01-02T14:40:36Z",
"rev2_date": "2015-01-02T14:40:53Z",
"git_diff_url": "https://github.com/lemire/javaewah/compare/ef6629e74595db71402e85570fedd224d00a47b3...5b73664471072e8aed9c54faa6cd815732fca5f4",
"test_file": "src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java",
"test_changes": [
{
"change_id": "28_lemire_javaewah-JavaEWAH-1.2.3_ef6629e_5b73664_EWAHCompressedBitmap32Test",
"test_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32Test.compareSetAndSetSizeInBits2:()V",
"class": "EWAHCompressedBitmap32Test",
"method": "compareSetAndSetSizeInBits2",
"module": "",
"junit_selector": "com.googlecode.javaewah32.EWAHCompressedBitmap32Test#compareSetAndSetSizeInBits2",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertEquals(bitmap1.buffer.sizeInWords(), bitmap2.buffer.sizeInWords());\n for (int i = 0; i < bitmap1.buffer.sizeInWords(); i++) {\n Assert.assertEquals(bitmap1.buffer.getWord(i), bitmap2.buffer.getWord(i));\n }\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java"
],
"old_test_lnum": [
"528-545"
],
"new_test_lnum": [
"531-551"
],
"old_production_code": "@Override\npublic int[] getWords() {\n return this.buffer;\n}",
"new_production_code": "",
"focal_file_path": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"focal_method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"file_path_old": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"line_nums_old": "56-59",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.6140350877192983,
"branch_coverage_gold": 2.1034,
"method_coverage_gold": 7.0197,
"line_coverage_gold": 4.1496,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/IntArray.getWord:(I)I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/IntArray.sizeInWords:()I"
],
"all_deps_old": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/IntArray.getWords:()[I"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
},
{
"change_id": "29_lemire_javaewah-JavaEWAH-1.2.3_ef6629e_5b73664_EWAHCompressedBitmap32Test",
"test_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32Test.compareSetAndSetSizeInBits:()V",
"class": "EWAHCompressedBitmap32Test",
"method": "compareSetAndSetSizeInBits",
"module": "",
"junit_selector": "com.googlecode.javaewah32.EWAHCompressedBitmap32Test#compareSetAndSetSizeInBits",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertEquals(bitmap1.buffer.sizeInWords(), bitmap2.buffer.sizeInWords());\n for (int i = 0; i < bitmap1.buffer.sizeInWords(); i++) {\n Assert.assertEquals(bitmap1.buffer.getWord(i), bitmap2.buffer.getWord(i));\n }\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java"
],
"old_test_lnum": [
"508-526"
],
"new_test_lnum": [
"508-529"
],
"old_production_code": "@Override\npublic int[] getWords() {\n return this.buffer;\n}",
"new_production_code": "",
"focal_file_path": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"focal_method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"file_path_old": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"line_nums_old": "56-59",
"file_path_new": null,
"line_nums_new": null,
"dependency_updated": "deleted",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.5263157894736842,
"branch_coverage_gold": 2.0596,
"method_coverage_gold": 7.0197,
"line_coverage_gold": 4.0421,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/IntArray.getWord:(I)I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/IntArray.sizeInWords:()I"
],
"all_deps_old": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/IntArray.getWords:()[I"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"change_type": "DELETE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"file_path_new": null,
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
}
],
"version": "JavaEWAH-1.2.3",
"java_version": 8
},
{
"task_id": "lemire_javaewah-JavaEWAH-1.2.3__ef715f1_385866e__EWAHCompressedBitmapTest_1d1a55a7",
"project_name": "lemire_javaewah-JavaEWAH-1.2.3",
"git_clone_url": "https://github.com/lemire/javaewah.git",
"rev1": "ef715f15a1e17b3b2f4d079ca19ba24a972f3f65",
"rev2": "385866e36056b4f02e57df2ca4945dcdb05bfa72",
"rev1_date": "2014-12-09T18:41:32Z",
"rev2_date": "2014-12-09T19:48:06Z",
"git_diff_url": "https://github.com/lemire/javaewah/compare/ef715f15a1e17b3b2f4d079ca19ba24a972f3f65...385866e36056b4f02e57df2ca4945dcdb05bfa72",
"test_file": "src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java",
"test_changes": [
{
"change_id": "34_lemire_javaewah-JavaEWAH-1.2.3_ef715f1_385866e_EWAHCompressedBitmapTest",
"test_sign": "com/googlecode/javaewah/EWAHCompressedBitmapTest.testsetSizeInBits:()V",
"class": "EWAHCompressedBitmapTest",
"method": "testsetSizeInBits",
"module": "",
"junit_selector": "com.googlecode.javaewah.EWAHCompressedBitmapTest#testsetSizeInBits",
"old_test_code": "@Test\npublic void testsetSizeInBits() {\n System.out.println(\"testing setSizeInBits\");\n for (int k = 0; k < 4096; ++k) {\n EWAHCompressedBitmap ewah = new EWAHCompressedBitmap();\n ewah.setSizeInBits(k, false);\n Assert.assertEquals(ewah.sizeInBits, k);\n Assert.assertEquals(ewah.cardinality(), 0);\n EWAHCompressedBitmap ewah2 = new EWAHCompressedBitmap();\n ewah2.setSizeInBits(k, false);\n Assert.assertEquals(ewah2.sizeInBits, k);\n Assert.assertEquals(ewah2.cardinality(), 0);\n EWAHCompressedBitmap ewah3 = new EWAHCompressedBitmap();\n for (int i = 0; i < k; ++i) {\n ewah3.set(i);\n }\n Assert.assertEquals(ewah3.sizeInBits, k);\n Assert.assertEquals(ewah3.cardinality(), k);\n EWAHCompressedBitmap ewah4 = new EWAHCompressedBitmap();\n ewah4.setSizeInBits(k, true);\n Assert.assertEquals(ewah4.sizeInBits, k);\n Assert.assertEquals(ewah4.cardinality(), k);\n }\n}",
"new_test_code": "@Test\npublic void testsetSizeInBits() {\n System.out.println(\"testing setSizeInBits\");\n for (int k = 0; k < 4096; ++k) {\n EWAHCompressedBitmap ewah = new EWAHCompressedBitmap();\n ewah.setSizeInBits(k, false);\n Assert.assertEquals(ewah.sizeInBits(), k);\n Assert.assertEquals(ewah.cardinality(), 0);\n EWAHCompressedBitmap ewah2 = new EWAHCompressedBitmap();\n ewah2.setSizeInBits(k, false);\n Assert.assertEquals(ewah2.sizeInBits(), k);\n Assert.assertEquals(ewah2.cardinality(), 0);\n EWAHCompressedBitmap ewah3 = new EWAHCompressedBitmap();\n for (int i = 0; i < k; ++i) {\n ewah3.set(i);\n }\n Assert.assertEquals(ewah3.sizeInBits(), k);\n Assert.assertEquals(ewah3.cardinality(), k);\n EWAHCompressedBitmap ewah4 = new EWAHCompressedBitmap();\n ewah4.setSizeInBits(k, true);\n Assert.assertEquals(ewah4.sizeInBits(), k);\n Assert.assertEquals(ewah4.cardinality(), k);\n }\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java"
],
"old_test_lnum": [
"1481-1504"
],
"new_test_lnum": [
"1481-1504"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == ~0l) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0l) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"focal_method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_old": "1444-1496",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_new": "1352-1405",
"dependency_updated": "updated",
"score": 0.7647,
"signal_scores": {
"nc": 1.0,
"lcs_u": 1.0,
"ed": 1.0,
"class": 1.0,
"tfidf": 0.0
}
},
{
"dep_id": 1,
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.cardinality:()I",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_old": "531-544",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_new": "530-543",
"dependency_updated": "updated",
"score": 0.2904,
"signal_scores": {
"nc": 0.0,
"lcs_u": 0.3636,
"ed": 0.2308,
"class": 1.0,
"tfidf": 0.0
}
}
],
"coverage_gold": 0.5357142857142857,
"branch_coverage_gold": 2.1701,
"method_coverage_gold": 5.6579,
"line_coverage_gold": 3.1781,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah/EWAHCompressedBitmap.sizeInBits:()I",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.cardinality:()I"
],
"all_deps_old": [
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.cardinality:()I"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
},
{
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.cardinality:()I",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
},
{
"change_id": "35_lemire_javaewah-JavaEWAH-1.2.3_ef715f1_385866e_EWAHCompressedBitmapTest",
"test_sign": "com/googlecode/javaewah/EWAHCompressedBitmapTest.compareSetAndSetSizeInBits2:()V",
"class": "EWAHCompressedBitmapTest",
"method": "compareSetAndSetSizeInBits2",
"module": "",
"junit_selector": "com.googlecode.javaewah.EWAHCompressedBitmapTest#compareSetAndSetSizeInBits2",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer, bitmap2.buffer);\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java"
],
"old_test_lnum": [
"502-519"
],
"new_test_lnum": [
"502-519"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == ~0l) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0l) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"focal_method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_old": "1444-1496",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_new": "1352-1405",
"dependency_updated": "updated",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.6071428571428571,
"branch_coverage_gold": 2.1258,
"method_coverage_gold": 7.3684,
"line_coverage_gold": 4.0609,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah/LongArray.getWords:()[J",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap"
],
"all_deps_old": [
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "error",
"new_on_new": "pass"
}
},
{
"change_id": "36_lemire_javaewah-JavaEWAH-1.2.3_ef715f1_385866e_EWAHCompressedBitmapTest",
"test_sign": "com/googlecode/javaewah/EWAHCompressedBitmapTest.compareSetAndSetSizeInBits:()V",
"class": "EWAHCompressedBitmapTest",
"method": "compareSetAndSetSizeInBits",
"module": "",
"junit_selector": "com.googlecode.javaewah.EWAHCompressedBitmapTest#compareSetAndSetSizeInBits",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer, bitmap2.buffer);\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java"
],
"old_test_lnum": [
"482-500"
],
"new_test_lnum": [
"482-500"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == ~0l) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0l) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"focal_method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_old": "1444-1496",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_new": "1352-1405",
"dependency_updated": "updated",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.5178571428571429,
"branch_coverage_gold": 2.0815,
"method_coverage_gold": 7.3684,
"line_coverage_gold": 3.9506,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah/LongArray.getWords:()[J",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap"
],
"all_deps_old": [
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "error",
"new_on_new": "pass"
}
}
],
"version": "JavaEWAH-1.2.3",
"java_version": 8
},
{
"task_id": "lemire_javaewah-JavaEWAH-1.2.3__ef715f1_385866e__EWAHCompressedBitmap32Test_1d1a55a7",
"project_name": "lemire_javaewah-JavaEWAH-1.2.3",
"git_clone_url": "https://github.com/lemire/javaewah.git",
"rev1": "ef715f15a1e17b3b2f4d079ca19ba24a972f3f65",
"rev2": "385866e36056b4f02e57df2ca4945dcdb05bfa72",
"rev1_date": "2014-12-09T18:41:32Z",
"rev2_date": "2014-12-09T19:48:06Z",
"git_diff_url": "https://github.com/lemire/javaewah/compare/ef715f15a1e17b3b2f4d079ca19ba24a972f3f65...385866e36056b4f02e57df2ca4945dcdb05bfa72",
"test_file": "src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java",
"test_changes": [
{
"change_id": "32_lemire_javaewah-JavaEWAH-1.2.3_ef715f1_385866e_EWAHCompressedBitmap32Test",
"test_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32Test.compareSetAndSetSizeInBits2:()V",
"class": "EWAHCompressedBitmap32Test",
"method": "compareSetAndSetSizeInBits2",
"module": "",
"junit_selector": "com.googlecode.javaewah32.EWAHCompressedBitmap32Test#compareSetAndSetSizeInBits2",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer, bitmap2.buffer);\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java"
],
"old_test_lnum": [
"475-492"
],
"new_test_lnum": [
"475-492"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == (~0)) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"focal_method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_old": "1473-1525",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_new": "1362-1415",
"dependency_updated": "updated",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.6071428571428571,
"branch_coverage_gold": 2.1258,
"method_coverage_gold": 7.3684,
"line_coverage_gold": 4.2154,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/IntArray.getWords:()[I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32"
],
"all_deps_old": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "error",
"new_on_new": "pass"
}
},
{
"change_id": "33_lemire_javaewah-JavaEWAH-1.2.3_ef715f1_385866e_EWAHCompressedBitmap32Test",
"test_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32Test.compareSetAndSetSizeInBits:()V",
"class": "EWAHCompressedBitmap32Test",
"method": "compareSetAndSetSizeInBits",
"module": "",
"junit_selector": "com.googlecode.javaewah32.EWAHCompressedBitmap32Test#compareSetAndSetSizeInBits",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer, bitmap2.buffer);\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java"
],
"old_test_lnum": [
"455-473"
],
"new_test_lnum": [
"455-473"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == (~0)) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"focal_method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_old": "1473-1525",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_new": "1362-1415",
"dependency_updated": "updated",
"score": null,
"signal_scores": {}
}
],
"coverage_gold": 0.5178571428571429,
"branch_coverage_gold": 2.0815,
"method_coverage_gold": 7.3684,
"line_coverage_gold": 4.1051,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/IntArray.getWords:()[I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32"
],
"all_deps_old": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "error",
"new_on_new": "pass"
}
},
{
"change_id": "37_lemire_javaewah-JavaEWAH-1.2.3_ef715f1_385866e_EWAHCompressedBitmap32Test",
"test_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32Test.testsetSizeInBits:()V",
"class": "EWAHCompressedBitmap32Test",
"method": "testsetSizeInBits",
"module": "",
"junit_selector": "com.googlecode.javaewah32.EWAHCompressedBitmap32Test#testsetSizeInBits",
"old_test_code": "@Test\npublic void testsetSizeInBits() {\n System.out.println(\"testing setSizeInBits\");\n for (int k = 0; k < 4096; ++k) {\n EWAHCompressedBitmap32 ewah = new EWAHCompressedBitmap32();\n ewah.setSizeInBits(k, false);\n Assert.assertEquals(ewah.sizeInBits, k);\n Assert.assertEquals(ewah.cardinality(), 0);\n EWAHCompressedBitmap32 ewah2 = new EWAHCompressedBitmap32();\n ewah2.setSizeInBits(k, false);\n Assert.assertEquals(ewah2.sizeInBits, k);\n Assert.assertEquals(ewah2.cardinality(), 0);\n EWAHCompressedBitmap32 ewah3 = new EWAHCompressedBitmap32();\n for (int i = 0; i < k; ++i) {\n ewah3.set(i);\n }\n Assert.assertEquals(ewah3.sizeInBits, k);\n Assert.assertEquals(ewah3.cardinality(), k);\n EWAHCompressedBitmap32 ewah4 = new EWAHCompressedBitmap32();\n ewah4.setSizeInBits(k, true);\n Assert.assertEquals(ewah4.sizeInBits, k);\n Assert.assertEquals(ewah4.cardinality(), k);\n }\n}",
"new_test_code": "@Test\npublic void testsetSizeInBits() {\n System.out.println(\"testing setSizeInBits\");\n for (int k = 0; k < 4096; ++k) {\n EWAHCompressedBitmap32 ewah = new EWAHCompressedBitmap32();\n ewah.setSizeInBits(k, false);\n Assert.assertEquals(ewah.sizeInBits(), k);\n Assert.assertEquals(ewah.cardinality(), 0);\n EWAHCompressedBitmap32 ewah2 = new EWAHCompressedBitmap32();\n ewah2.setSizeInBits(k, false);\n Assert.assertEquals(ewah2.sizeInBits(), k);\n Assert.assertEquals(ewah2.cardinality(), 0);\n EWAHCompressedBitmap32 ewah3 = new EWAHCompressedBitmap32();\n for (int i = 0; i < k; ++i) {\n ewah3.set(i);\n }\n Assert.assertEquals(ewah3.sizeInBits(), k);\n Assert.assertEquals(ewah3.cardinality(), k);\n EWAHCompressedBitmap32 ewah4 = new EWAHCompressedBitmap32();\n ewah4.setSizeInBits(k, true);\n Assert.assertEquals(ewah4.sizeInBits(), k);\n Assert.assertEquals(ewah4.cardinality(), k);\n }\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java"
],
"old_test_lnum": [
"1415-1438"
],
"new_test_lnum": [
"1415-1438"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == (~0)) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"focal_method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_old": "1473-1525",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_new": "1362-1415",
"dependency_updated": "updated",
"score": 0.7647,
"signal_scores": {
"nc": 1.0,
"lcs_u": 1.0,
"ed": 1.0,
"class": 1.0,
"tfidf": 0.0
}
},
{
"dep_id": 1,
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.cardinality:()I",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_old": "544-559",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_new": "541-556",
"dependency_updated": "updated",
"score": 0.2904,
"signal_scores": {
"nc": 0.0,
"lcs_u": 0.3636,
"ed": 0.2308,
"class": 1.0,
"tfidf": 0.0
}
}
],
"coverage_gold": 0.5517241379310345,
"branch_coverage_gold": 2.1701,
"method_coverage_gold": 5.6579,
"line_coverage_gold": 3.2885,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.cardinality:()I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.sizeInBits:()I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z"
],
"all_deps_old": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.cardinality:()I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
},
{
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.cardinality:()I",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
}
],
"version": "JavaEWAH-1.2.3",
"java_version": 8
},
{
"task_id": "lemire_javaewah-JavaEWAH-1.2.3__fcf8684_60bce91__EWAHCompressedBitmapTest_1d1a55a7",
"project_name": "lemire_javaewah-JavaEWAH-1.2.3",
"git_clone_url": "https://github.com/lemire/javaewah.git",
"rev1": "fcf8684de40c8392b012e8fc39db0f505349dc10",
"rev2": "60bce91399e21acc4c13a9e4e8bc453c00530204",
"rev1_date": "2014-12-09T20:32:32Z",
"rev2_date": "2014-12-09T20:32:44Z",
"git_diff_url": "https://github.com/lemire/javaewah/compare/fcf8684de40c8392b012e8fc39db0f505349dc10...60bce91399e21acc4c13a9e4e8bc453c00530204",
"test_file": "src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java",
"test_changes": [
{
"change_id": "24_lemire_javaewah-JavaEWAH-1.2.3_fcf8684_60bce91_EWAHCompressedBitmapTest",
"test_sign": "com/googlecode/javaewah/EWAHCompressedBitmapTest.testsetSizeInBits:()V",
"class": "EWAHCompressedBitmapTest",
"method": "testsetSizeInBits",
"module": "",
"junit_selector": "com.googlecode.javaewah.EWAHCompressedBitmapTest#testsetSizeInBits",
"old_test_code": "@Test\npublic void testsetSizeInBits() {\n System.out.println(\"testing setSizeInBits\");\n for (int k = 0; k < 4096; ++k) {\n EWAHCompressedBitmap ewah = new EWAHCompressedBitmap();\n ewah.setSizeInBits(k, false);\n Assert.assertEquals(ewah.sizeInBits, k);\n Assert.assertEquals(ewah.cardinality(), 0);\n EWAHCompressedBitmap ewah2 = new EWAHCompressedBitmap();\n ewah2.setSizeInBits(k, false);\n Assert.assertEquals(ewah2.sizeInBits, k);\n Assert.assertEquals(ewah2.cardinality(), 0);\n EWAHCompressedBitmap ewah3 = new EWAHCompressedBitmap();\n for (int i = 0; i < k; ++i) {\n ewah3.set(i);\n }\n Assert.assertEquals(ewah3.sizeInBits, k);\n Assert.assertEquals(ewah3.cardinality(), k);\n EWAHCompressedBitmap ewah4 = new EWAHCompressedBitmap();\n ewah4.setSizeInBits(k, true);\n Assert.assertEquals(ewah4.sizeInBits, k);\n Assert.assertEquals(ewah4.cardinality(), k);\n }\n}",
"new_test_code": "@Test\npublic void testsetSizeInBits() {\n System.out.println(\"testing setSizeInBits\");\n for (int k = 0; k < 4096; ++k) {\n EWAHCompressedBitmap ewah = new EWAHCompressedBitmap();\n ewah.setSizeInBits(k, false);\n Assert.assertEquals(ewah.sizeInBits(), k);\n Assert.assertEquals(ewah.cardinality(), 0);\n EWAHCompressedBitmap ewah2 = new EWAHCompressedBitmap();\n ewah2.setSizeInBits(k, false);\n Assert.assertEquals(ewah2.sizeInBits(), k);\n Assert.assertEquals(ewah2.cardinality(), 0);\n EWAHCompressedBitmap ewah3 = new EWAHCompressedBitmap();\n for (int i = 0; i < k; ++i) {\n ewah3.set(i);\n }\n Assert.assertEquals(ewah3.sizeInBits(), k);\n Assert.assertEquals(ewah3.cardinality(), k);\n EWAHCompressedBitmap ewah4 = new EWAHCompressedBitmap();\n ewah4.setSizeInBits(k, true);\n Assert.assertEquals(ewah4.sizeInBits(), k);\n Assert.assertEquals(ewah4.cardinality(), k);\n }\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java"
],
"old_test_lnum": [
"1481-1504"
],
"new_test_lnum": [
"1481-1504"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == ~0l) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0l) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"focal_method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_old": "1444-1496",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_new": "1352-1405",
"dependency_updated": "updated",
"score": 0.7647,
"signal_scores": {
"nc": 1.0,
"lcs_u": 1.0,
"ed": 1.0,
"class": 1.0,
"tfidf": 0.0
}
},
{
"dep_id": 1,
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.cardinality:()I",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_old": "531-544",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_new": "530-543",
"dependency_updated": "updated",
"score": 0.2904,
"signal_scores": {
"nc": 0.0,
"lcs_u": 0.3636,
"ed": 0.2308,
"class": 1.0,
"tfidf": 0.0
}
}
],
"coverage_gold": 0.5357142857142857,
"branch_coverage_gold": 2.1701,
"method_coverage_gold": 5.6579,
"line_coverage_gold": 3.1781,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah/EWAHCompressedBitmap.sizeInBits:()I",
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.cardinality:()I",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z"
],
"all_deps_old": [
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.cardinality:()I",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
},
{
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.cardinality:()I",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
},
{
"change_id": "25_lemire_javaewah-JavaEWAH-1.2.3_fcf8684_60bce91_EWAHCompressedBitmapTest",
"test_sign": "com/googlecode/javaewah/EWAHCompressedBitmapTest.compareSetAndSetSizeInBits2:()V",
"class": "EWAHCompressedBitmapTest",
"method": "compareSetAndSetSizeInBits2",
"module": "",
"junit_selector": "com.googlecode.javaewah.EWAHCompressedBitmapTest#compareSetAndSetSizeInBits2",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer, bitmap2.buffer);\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java"
],
"old_test_lnum": [
"502-519"
],
"new_test_lnum": [
"502-519"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == ~0l) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0l) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"focal_method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_old": "1444-1496",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_new": "1352-1405",
"dependency_updated": "updated",
"score": 0.5129,
"signal_scores": {
"nc": 0.0,
"lcs_u": 1.0,
"ed": 0.4815,
"class": 1.0,
"tfidf": 0.2927
}
},
{
"dep_id": 1,
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"file_path_old": null,
"line_nums_old": null,
"file_path_new": "src/main/java/com/googlecode/javaewah/LongArray.java",
"line_nums_new": "39-42",
"dependency_updated": "inserted",
"score": 0.2051,
"signal_scores": {
"nc": 0.0,
"lcs_u": 0.5,
"ed": 0.1111,
"class": 0.0,
"tfidf": 0.4189
}
}
],
"coverage_gold": 0.6071428571428571,
"branch_coverage_gold": 2.1258,
"method_coverage_gold": 7.3684,
"line_coverage_gold": 4.0609,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/LongArray.getWords:()[J"
],
"all_deps_old": [
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
},
{
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"change_type": "ADD",
"file_path_old": null,
"file_path_new": "src/main/java/com/googlecode/javaewah/LongArray.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "error",
"new_on_new": "pass"
}
},
{
"change_id": "26_lemire_javaewah-JavaEWAH-1.2.3_fcf8684_60bce91_EWAHCompressedBitmapTest",
"test_sign": "com/googlecode/javaewah/EWAHCompressedBitmapTest.compareSetAndSetSizeInBits:()V",
"class": "EWAHCompressedBitmapTest",
"method": "compareSetAndSetSizeInBits",
"module": "",
"junit_selector": "com.googlecode.javaewah.EWAHCompressedBitmapTest#compareSetAndSetSizeInBits",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer, bitmap2.buffer);\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap bitmap1 = EWAHCompressedBitmap.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap bitmap2 = EWAHCompressedBitmap.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah/EWAHCompressedBitmapTest.java"
],
"old_test_lnum": [
"482-500"
],
"new_test_lnum": [
"482-500"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == ~0l) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0l) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0l) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final long mask = ((~0l) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"focal_method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_old": "1444-1496",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"line_nums_new": "1352-1405",
"dependency_updated": "updated",
"score": 0.5159,
"signal_scores": {
"nc": 0.0,
"lcs_u": 1.0,
"ed": 0.5,
"class": 1.0,
"tfidf": 0.2927
}
},
{
"dep_id": 1,
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"file_path_old": null,
"line_nums_old": null,
"file_path_new": "src/main/java/com/googlecode/javaewah/LongArray.java",
"line_nums_new": "39-42",
"dependency_updated": "inserted",
"score": 0.2058,
"signal_scores": {
"nc": 0.0,
"lcs_u": 0.5,
"ed": 0.1154,
"class": 0.0,
"tfidf": 0.4189
}
}
],
"coverage_gold": 0.5178571428571429,
"branch_coverage_gold": 2.0815,
"method_coverage_gold": 7.3684,
"line_coverage_gold": 3.9506,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"com/googlecode/javaewah/LongArray.getWords:()[J"
],
"all_deps_old": [
"com/googlecode/javaewah/EWAHCompressedBitmap.set:(I)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.bitmapOf:([I)Lcom/googlecode/javaewah/EWAHCompressedBitmap",
"com/googlecode/javaewah/EWAHCompressedBitmap.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah/EWAHCompressedBitmap.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"file_path_new": "src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
},
{
"method_sign": "com/googlecode/javaewah/LongArray.getWords:()[J",
"change_type": "ADD",
"file_path_old": null,
"file_path_new": "src/main/java/com/googlecode/javaewah/LongArray.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "error",
"new_on_new": "pass"
}
}
],
"version": "JavaEWAH-1.2.3",
"java_version": 8
},
{
"task_id": "lemire_javaewah-JavaEWAH-1.2.3__fcf8684_60bce91__EWAHCompressedBitmap32Test_1d1a55a7",
"project_name": "lemire_javaewah-JavaEWAH-1.2.3",
"git_clone_url": "https://github.com/lemire/javaewah.git",
"rev1": "fcf8684de40c8392b012e8fc39db0f505349dc10",
"rev2": "60bce91399e21acc4c13a9e4e8bc453c00530204",
"rev1_date": "2014-12-09T20:32:32Z",
"rev2_date": "2014-12-09T20:32:44Z",
"git_diff_url": "https://github.com/lemire/javaewah/compare/fcf8684de40c8392b012e8fc39db0f505349dc10...60bce91399e21acc4c13a9e4e8bc453c00530204",
"test_file": "src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java",
"test_changes": [
{
"change_id": "22_lemire_javaewah-JavaEWAH-1.2.3_fcf8684_60bce91_EWAHCompressedBitmap32Test",
"test_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32Test.compareSetAndSetSizeInBits2:()V",
"class": "EWAHCompressedBitmap32Test",
"method": "compareSetAndSetSizeInBits2",
"module": "",
"junit_selector": "com.googlecode.javaewah32.EWAHCompressedBitmap32Test#compareSetAndSetSizeInBits2",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer, bitmap2.buffer);\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits2() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = 0; i < WORD_IN_BITS / 2; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS; i < WORD_IN_BITS * 3 / 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, true);\n bitmap2.setSizeInBits(WORD_IN_BITS, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java"
],
"old_test_lnum": [
"475-492"
],
"new_test_lnum": [
"475-492"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == (~0)) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"focal_method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 1,
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_old": "1473-1525",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_new": "1362-1415",
"dependency_updated": "updated",
"score": 0.5241,
"signal_scores": {
"nc": 0.0,
"lcs_u": 1.0,
"ed": 0.4815,
"class": 1.0,
"tfidf": 0.3404
}
},
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"file_path_old": null,
"line_nums_old": null,
"file_path_new": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"line_nums_new": "39-42",
"dependency_updated": "inserted",
"score": 0.2051,
"signal_scores": {
"nc": 0.0,
"lcs_u": 0.5,
"ed": 0.1111,
"class": 0.0,
"tfidf": 0.4189
}
}
],
"coverage_gold": 0.6071428571428571,
"branch_coverage_gold": 2.1258,
"method_coverage_gold": 7.3684,
"line_coverage_gold": 4.2154,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/IntArray.getWords:()[I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z"
],
"all_deps_old": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"change_type": "ADD",
"file_path_old": null,
"file_path_new": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
},
{
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "error",
"new_on_new": "pass"
}
},
{
"change_id": "23_lemire_javaewah-JavaEWAH-1.2.3_fcf8684_60bce91_EWAHCompressedBitmap32Test",
"test_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32Test.compareSetAndSetSizeInBits:()V",
"class": "EWAHCompressedBitmap32Test",
"method": "compareSetAndSetSizeInBits",
"module": "",
"junit_selector": "com.googlecode.javaewah32.EWAHCompressedBitmap32Test#compareSetAndSetSizeInBits",
"old_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer, bitmap2.buffer);\n}",
"new_test_code": "@Test\npublic void compareSetAndSetSizeInBits() {\n EWAHCompressedBitmap32 bitmap1 = EWAHCompressedBitmap32.bitmapOf();\n for (int i = WORD_IN_BITS / 2; i < WORD_IN_BITS; ++i) {\n bitmap1.set(i);\n }\n for (int i = WORD_IN_BITS * 3 / 2; i < WORD_IN_BITS * 2; ++i) {\n bitmap1.set(i);\n }\n EWAHCompressedBitmap32 bitmap2 = EWAHCompressedBitmap32.bitmapOf();\n bitmap2.setSizeInBits(WORD_IN_BITS / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS, true);\n bitmap2.setSizeInBits(WORD_IN_BITS * 3 / 2, false);\n bitmap2.setSizeInBits(WORD_IN_BITS * 2, true);\n Assert.assertEquals(bitmap1, bitmap2);\n Assert.assertArrayEquals(bitmap1.buffer.getWords(), bitmap2.buffer.getWords());\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java"
],
"old_test_lnum": [
"455-473"
],
"new_test_lnum": [
"455-473"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == (~0)) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"focal_method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 1,
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_old": "1473-1525",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_new": "1362-1415",
"dependency_updated": "updated",
"score": 0.5272,
"signal_scores": {
"nc": 0.0,
"lcs_u": 1.0,
"ed": 0.5,
"class": 1.0,
"tfidf": 0.3404
}
},
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"file_path_old": null,
"line_nums_old": null,
"file_path_new": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"line_nums_new": "39-42",
"dependency_updated": "inserted",
"score": 0.2058,
"signal_scores": {
"nc": 0.0,
"lcs_u": 0.5,
"ed": 0.1154,
"class": 0.0,
"tfidf": 0.4189
}
}
],
"coverage_gold": 0.5178571428571429,
"branch_coverage_gold": 2.0815,
"method_coverage_gold": 7.3684,
"line_coverage_gold": 4.1051,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/IntArray.getWords:()[I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z"
],
"all_deps_old": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.equals:(Ljava/lang/Object;)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.bitmapOf:([I)Lcom/googlecode/javaewah32/EWAHCompressedBitmap32",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah32/IntArray.getWords:()[I",
"change_type": "ADD",
"file_path_old": null,
"file_path_new": "src/main/java/com/googlecode/javaewah32/IntArray.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
},
{
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "error",
"new_on_new": "pass"
}
},
{
"change_id": "27_lemire_javaewah-JavaEWAH-1.2.3_fcf8684_60bce91_EWAHCompressedBitmap32Test",
"test_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32Test.testsetSizeInBits:()V",
"class": "EWAHCompressedBitmap32Test",
"method": "testsetSizeInBits",
"module": "",
"junit_selector": "com.googlecode.javaewah32.EWAHCompressedBitmap32Test#testsetSizeInBits",
"old_test_code": "@Test\npublic void testsetSizeInBits() {\n System.out.println(\"testing setSizeInBits\");\n for (int k = 0; k < 4096; ++k) {\n EWAHCompressedBitmap32 ewah = new EWAHCompressedBitmap32();\n ewah.setSizeInBits(k, false);\n Assert.assertEquals(ewah.sizeInBits, k);\n Assert.assertEquals(ewah.cardinality(), 0);\n EWAHCompressedBitmap32 ewah2 = new EWAHCompressedBitmap32();\n ewah2.setSizeInBits(k, false);\n Assert.assertEquals(ewah2.sizeInBits, k);\n Assert.assertEquals(ewah2.cardinality(), 0);\n EWAHCompressedBitmap32 ewah3 = new EWAHCompressedBitmap32();\n for (int i = 0; i < k; ++i) {\n ewah3.set(i);\n }\n Assert.assertEquals(ewah3.sizeInBits, k);\n Assert.assertEquals(ewah3.cardinality(), k);\n EWAHCompressedBitmap32 ewah4 = new EWAHCompressedBitmap32();\n ewah4.setSizeInBits(k, true);\n Assert.assertEquals(ewah4.sizeInBits, k);\n Assert.assertEquals(ewah4.cardinality(), k);\n }\n}",
"new_test_code": "@Test\npublic void testsetSizeInBits() {\n System.out.println(\"testing setSizeInBits\");\n for (int k = 0; k < 4096; ++k) {\n EWAHCompressedBitmap32 ewah = new EWAHCompressedBitmap32();\n ewah.setSizeInBits(k, false);\n Assert.assertEquals(ewah.sizeInBits(), k);\n Assert.assertEquals(ewah.cardinality(), 0);\n EWAHCompressedBitmap32 ewah2 = new EWAHCompressedBitmap32();\n ewah2.setSizeInBits(k, false);\n Assert.assertEquals(ewah2.sizeInBits(), k);\n Assert.assertEquals(ewah2.cardinality(), 0);\n EWAHCompressedBitmap32 ewah3 = new EWAHCompressedBitmap32();\n for (int i = 0; i < k; ++i) {\n ewah3.set(i);\n }\n Assert.assertEquals(ewah3.sizeInBits(), k);\n Assert.assertEquals(ewah3.cardinality(), k);\n EWAHCompressedBitmap32 ewah4 = new EWAHCompressedBitmap32();\n ewah4.setSizeInBits(k, true);\n Assert.assertEquals(ewah4.sizeInBits(), k);\n Assert.assertEquals(ewah4.cardinality(), k);\n }\n}",
"old_test_file_path": [
"src/test/java/com/googlecode/javaewah32/EWAHCompressedBitmap32Test.java"
],
"old_test_lnum": [
"1415-1438"
],
"new_test_lnum": [
"1415-1438"
],
"old_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer[this.actualSizeInWords - 1] == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.actualSizeInWords--;\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n if (this.buffer[this.actualSizeInWords - 1] == (~0)) {\n this.buffer[this.actualSizeInWords - 1] = 0;\n --this.actualSizeInWords;\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n this.buffer[this.actualSizeInWords - 1] |= ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"new_production_code": "public boolean setSizeInBits(final int size, final boolean defaultValue) {\n if (size <= this.sizeInBits) {\n return false;\n }\n if ((this.sizeInBits % WORD_IN_BITS) != 0) {\n if (!defaultValue) {\n if (this.rlw.getNumberOfLiteralWords() > 0) {\n final int bitsToAdd = size - this.sizeInBits;\n final int usedBitsInLast = this.sizeInBits % WORD_IN_BITS;\n final int freeBitsInLast = WORD_IN_BITS - usedBitsInLast;\n if (this.buffer.getLastWord() == 0) {\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n this.buffer.removeLastWord();\n this.sizeInBits -= usedBitsInLast;\n } else if (usedBitsInLast > 0) {\n this.sizeInBits += Math.min(bitsToAdd, freeBitsInLast);\n }\n }\n } else {\n if (this.rlw.getNumberOfLiteralWords() == 0) {\n this.rlw.setRunningLength(this.rlw.getRunningLength() - 1);\n insertLiteralWord(0);\n }\n final int maskWidth = Math.min(WORD_IN_BITS - this.sizeInBits % WORD_IN_BITS, size - this.sizeInBits);\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n if (this.buffer.getLastWord() == ~0) {\n this.buffer.removeLastWord();\n this.rlw.setNumberOfLiteralWords(this.rlw.getNumberOfLiteralWords() - 1);\n insertEmptyWord(true);\n }\n this.sizeInBits += maskWidth;\n }\n }\n this.addStreamOfEmptyWords(defaultValue, (size / WORD_IN_BITS) - (this.sizeInBits / WORD_IN_BITS));\n if (this.sizeInBits < size) {\n final int dist = distanceInWords(size - 1);\n if (dist > 0) {\n insertLiteralWord(0);\n }\n if (defaultValue) {\n final int maskWidth = size - this.sizeInBits;\n final int maskShift = this.sizeInBits % WORD_IN_BITS;\n final int mask = ((~0) >>> (WORD_IN_BITS - maskWidth)) << maskShift;\n this.buffer.orLastWord(mask);\n }\n this.sizeInBits = size;\n }\n return true;\n}",
"focal_file_path": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"focal_method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"focal_all_deps_scored": [
{
"dep_id": 0,
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_old": "1473-1525",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_new": "1362-1415",
"dependency_updated": "updated",
"score": 0.7647,
"signal_scores": {
"nc": 1.0,
"lcs_u": 1.0,
"ed": 1.0,
"class": 1.0,
"tfidf": 0.0
}
},
{
"dep_id": 1,
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.cardinality:()I",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_old": "544-559",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"line_nums_new": "541-556",
"dependency_updated": "updated",
"score": 0.2904,
"signal_scores": {
"nc": 0.0,
"lcs_u": 0.3636,
"ed": 0.2308,
"class": 1.0,
"tfidf": 0.0
}
}
],
"coverage_gold": 0.5517241379310345,
"branch_coverage_gold": 2.1701,
"method_coverage_gold": 5.6579,
"line_coverage_gold": 3.2885,
"is_traceback": false,
"commit_gap": {
"count": 0,
"skipped_commits": []
},
"test_is_refactoring_only": false,
"has_test_dep_change": false,
"all_deps_new": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.cardinality:()I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.sizeInBits:()I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z"
],
"all_deps_old": [
"com/googlecode/javaewah32/EWAHCompressedBitmap32.set:(I)Z",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.cardinality:()I",
"com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z"
],
"deps_changes": [
{
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.setSizeInBits:(IZ)Z",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
},
{
"method_sign": "com/googlecode/javaewah32/EWAHCompressedBitmap32.cardinality:()I",
"change_type": "UPDATE",
"file_path_old": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"file_path_new": "src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java",
"source": "production",
"is_test_dependency": false,
"is_refactoring_only": false
}
],
"variant_result": {
"old_on_old": "pass",
"old_on_new": "error",
"new_on_old": "pass",
"new_on_new": "pass"
}
}
],
"version": "JavaEWAH-1.2.3",
"java_version": 8
}
]