TestEvo-Bench-Anonymous commited on
Commit
319595d
·
verified ·
1 Parent(s): fd1caa7

Replace per-project files with combined data/train.jsonl (509 rows) + dataset card

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. CodePlato3721_shiro-redis-3.3.0.json +0 -266
  2. DerekYRC_mini-spring-main.json +0 -406
  3. Hakky54_ayza-v10.0.3.json +0 -176
  4. Project-Books_book-project-v0.1.0.json +0 -0
  5. README.md +118 -3
  6. Stratio_cassandra-lucene-index-3.11.3.0.json +0 -0
  7. aleksandr-m_gitflow-maven-plugin-v1.21.0.json +0 -312
  8. anthonyraymond_joal-2.1.37.json +0 -0
  9. apache_incubator-baremaps-v0.8.2.json +0 -119
  10. apilayer_restcountries-2.0.5.json +0 -879
  11. blockchain_thunder-v0.1.2-alpha.json +0 -787
  12. casbin_jcasbin-v1.99.0.json +0 -133
  13. data/train.jsonl +0 -0
  14. datafaker-net_datafaker-v2.4.2.json +0 -394
  15. datumbox_datumbox-framework-0.8.2.json +0 -0
  16. davidmoten_rtree-0.12.json +0 -448
  17. dialex_JColor-v5.5.1.json +0 -1713
  18. f4b6a3_uuid-creator-uuid-creator-6.1.1.json +0 -0
  19. ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3.json +0 -948
  20. fizzgate_fizz-gateway-node-v3.1.0.json +0 -503
  21. fusesource_jansi-jansi-2.4.2.json +0 -221
  22. gabrie-allaigre_sonar-gitlab-plugin-4.1.0-SNAPSHOT.json +0 -0
  23. gazbert_bxbot-v1.4.0.json +0 -276
  24. gitlab4j_gitlab4j-api-gitlab4j-api-6.0.0-rc.5.json +0 -0
  25. google_compile-testing-v0.23.0.json +0 -215
  26. guxingke_mini-jvm-0.0.1-SNAPSHOT.json +0 -271
  27. hcoles_pitest-pitest-parent-1.6.8.json +0 -513
  28. houbb_opencc4j-master.json +0 -1176
  29. j-easy_easy-random-easy-random-5.0.0.json +0 -0
  30. j-easy_easy-rules-easy-rules-4.1.0.json +0 -0
  31. java-diff-utils_java-diff-utils-java-diff-utils-parent-4.16.json +0 -182
  32. jfaster_mango-mango-2.0.1.json +0 -0
  33. jhy_jsoup-jsoup-1.22.1.json +0 -1554
  34. leangen_graphql-spqr-graphql-spqr-v0.12.4.json +0 -0
  35. lemire_javaewah-JavaEWAH-1.2.3.json +0 -0
  36. mirromutth_r2dbc-mysql-v0.8.2.RELEASE.json +0 -1147
  37. moditect_moditect-1.3.0.Final.json +0 -161
  38. monitorjbl_excel-streaming-reader-2.2.0.json +0 -576
  39. mttkay_signpost-oauth-signpost-2.1.1.json +0 -225
  40. networknt_json-schema-validator-3.0.0.json +0 -0
  41. openjdk_jol-0.17.json +0 -181
  42. pagehelper_Mybatis-PageHelper-v6.1.1.json +0 -496
  43. palatable_lambda-lambda-5.5.0.json +0 -257
  44. pedrovgs_Algorithms-master.json +0 -665
  45. pf4j_pf4j-release-3.15.0.json +0 -229
  46. projectdiscovery_nuclei-burp-plugin-v1.1.3.json +0 -210
  47. quicktheories_QuickTheories-quicktheories-parent-0.26.json +0 -0
  48. robert-bor_aho-corasick-v0.6.3.json +0 -0
  49. rubenlagus_TelegramBots-v9.3.0.json +0 -789
  50. scribejava_scribejava-scribejava-8.3.3.json +0 -845
CodePlato3721_shiro-redis-3.3.0.json DELETED
@@ -1,266 +0,0 @@
1
- [
2
- {
3
- "task_id": "CodePlato3721_shiro-redis-3.3.0__056ecf1_fb87fbd__RedisManagerTest_498d4c17",
4
- "project_name": "CodePlato3721_shiro-redis-3.3.0",
5
- "git_clone_url": "https://github.com/CodePlato3721/shiro-redis.git",
6
- "rev1": "056ecf1dff7084af80617c6fe856497ec477fc22",
7
- "rev2": "fb87fbd16b1f3a33697088071d5074054b75cb9c",
8
- "rev1_date": "2018-03-04T02:00:24Z",
9
- "rev2_date": "2018-03-04T02:14:43Z",
10
- "git_diff_url": "https://github.com/CodePlato3721/shiro-redis/compare/056ecf1dff7084af80617c6fe856497ec477fc22...fb87fbd16b1f3a33697088071d5074054b75cb9c",
11
- "test_file": "src/test/java/org/crazycake/shiro/RedisManagerTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "11_CodePlato3721_shiro-redis-3.3.0_056ecf1_fb87fbd_RedisManagerTest",
15
- "test_sign": "org/crazycake/shiro/RedisManagerTest.testSet:()V",
16
- "class": "RedisManagerTest",
17
- "method": "testSet",
18
- "module": "",
19
- "junit_selector": "org.crazycake.shiro.RedisManagerTest#testSet",
20
- "old_test_code": "@Test\npublic void testSet() {\n redisManager.set(testKey, testValue);\n redisManager.set(testKey, testValue, 0);\n verify(jedis, times(0)).expire(testKey, 0);\n redisManager.set(testKey, testValue, 700);\n verify(jedis, times(1)).expire(testKey, 700);\n redisManager.set(null, null);\n}",
21
- "new_test_code": "@Test\npublic void testSet() {\n redisManager.set(testKey, testValue);\n redisManager.set(null, null);\n}",
22
- "old_test_file_path": [
23
- "src/test/java/org/crazycake/shiro/RedisManagerTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "59-67"
27
- ],
28
- "new_test_lnum": [
29
- "59-63"
30
- ],
31
- "old_production_code": "@Override\npublic byte[] set(byte[] key, byte[] value, int expire) {\n if (key == null) {\n return null;\n }\n Jedis jedis = getJedis();\n try {\n jedis.set(key, value);\n if (expire != 0) {\n jedis.expire(key, expire);\n }\n } finally {\n jedis.close();\n }\n return value;\n}",
32
- "new_production_code": "",
33
- "focal_file_path": "src/main/java/org/crazycake/shiro/BaseRedisManager.java",
34
- "focal_method_sign": "org/crazycake/shiro/BaseRedisManager.set:([B[BI)[B",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "org/crazycake/shiro/BaseRedisManager.set:([B[BI)[B",
39
- "file_path_old": "src/main/java/org/crazycake/shiro/BaseRedisManager.java",
40
- "line_nums_old": "79-94",
41
- "file_path_new": null,
42
- "line_nums_new": null,
43
- "dependency_updated": "deleted",
44
- "score": null,
45
- "signal_scores": {}
46
- }
47
- ],
48
- "coverage_gold": 1.0,
49
- "branch_coverage_gold": 7.2917,
50
- "method_coverage_gold": 9.3458,
51
- "line_coverage_gold": 8.4337,
52
- "is_traceback": false,
53
- "commit_gap": {
54
- "count": 0,
55
- "skipped_commits": []
56
- },
57
- "test_is_refactoring_only": false,
58
- "has_test_dep_change": false,
59
- "all_deps_new": [
60
- "org/crazycake/shiro/BaseRedisManager.set:([B[B)[B"
61
- ],
62
- "all_deps_old": [
63
- "org/crazycake/shiro/BaseRedisManager.set:([B[B)[B",
64
- "org/crazycake/shiro/BaseRedisManager.set:([B[BI)[B"
65
- ],
66
- "deps_changes": [
67
- {
68
- "method_sign": "org/crazycake/shiro/BaseRedisManager.set:([B[BI)[B",
69
- "change_type": "DELETE",
70
- "file_path_old": "src/main/java/org/crazycake/shiro/BaseRedisManager.java",
71
- "file_path_new": null,
72
- "source": "production",
73
- "is_test_dependency": false,
74
- "is_refactoring_only": false
75
- }
76
- ],
77
- "variant_result": {
78
- "old_on_old": "pass",
79
- "old_on_new": "error",
80
- "new_on_old": "pass",
81
- "new_on_new": "pass"
82
- }
83
- }
84
- ],
85
- "version": "3.3.0",
86
- "java_version": 11
87
- },
88
- {
89
- "task_id": "CodePlato3721_shiro-redis-3.3.0__234a7ec_34d1af0__RedisCacheManagerTest_7f7deeaf",
90
- "project_name": "CodePlato3721_shiro-redis-3.3.0",
91
- "git_clone_url": "https://github.com/CodePlato3721/shiro-redis.git",
92
- "rev1": "234a7ec09972609aaf89da8c78aa677add3c55ff",
93
- "rev2": "34d1af0961cbe89b28480c8c6550898621ad01cb",
94
- "rev1_date": "2018-03-04T01:58:27Z",
95
- "rev2_date": "2018-03-04T02:00:11Z",
96
- "git_diff_url": "https://github.com/CodePlato3721/shiro-redis/compare/234a7ec09972609aaf89da8c78aa677add3c55ff...34d1af0961cbe89b28480c8c6550898621ad01cb",
97
- "test_file": "src/test/java/org/crazycake/shiro/RedisCacheManagerTest.java",
98
- "test_changes": [
99
- {
100
- "change_id": "18_CodePlato3721_shiro-redis-3.3.0_234a7ec_34d1af0_RedisCacheManagerTest",
101
- "test_sign": "org/crazycake/shiro/RedisCacheManagerTest.testGetCache:()V",
102
- "class": "RedisCacheManagerTest",
103
- "method": "testGetCache",
104
- "module": "",
105
- "junit_selector": "org.crazycake.shiro.RedisCacheManagerTest#testGetCache",
106
- "old_test_code": "@Test\npublic void testGetCache() {\n Cache cache = redisCacheManager.getCache(\"testCache1\");\n Cache cache1 = redisCacheManager.getCache(\"testCache1\");\n assertThat(cache, is(cache1));\n redisCacheManager.setKeyPrefix(\"testRedisManager1:\");\n Cache cache2 = redisCacheManager.getCache(\"testCache2\");\n assertThat(cache2.getClass().getName(), is(\"org.crazycake.shiro.RedisCache\"));\n RedisCache redisCache2 = (RedisCache) cache2;\n assertThat(redisCache2.getKeyPrefix(), is(\"testRedisManager1:testCache2:\"));\n}",
107
- "new_test_code": "@Test\npublic void testGetCache() {\n Cache cache = redisCacheManager.getCache(\"testCache1\");\n Cache cache1 = redisCacheManager.getCache(\"testCache1\");\n assertThat(cache, is(cache1));\n redisCacheManager.setKeyPrefix(\"testRedisManager1\");\n Cache cache2 = redisCacheManager.getCache(\"testCache2\");\n assertThat(cache2.getClass().getName(), is(\"org.crazycake.shiro.RedisCache\"));\n RedisCache redisCache2 = (RedisCache) cache2;\n assertThat(redisCache2.getKeyPrefix(), is(\"testRedisManager1\"));\n}",
108
- "old_test_file_path": [
109
- "src/test/java/org/crazycake/shiro/RedisCacheManagerTest.java"
110
- ],
111
- "old_test_lnum": [
112
- "23-35"
113
- ],
114
- "new_test_lnum": [
115
- "23-35"
116
- ],
117
- "old_production_code": "@Override\npublic <K, V> Cache<K, V> getCache(String name) throws CacheException {\n logger.debug(\"get cache, name=\" + name);\n Cache cache = caches.get(name);\n if (cache == null) {\n cache = new RedisCache<K, V>(redisManager, keySerializer, valueSerializer, keyPrefix + name + \":\");\n caches.put(name, cache);\n }\n return cache;\n}",
118
- "new_production_code": "@Override\npublic <K, V> Cache<K, V> getCache(String name) throws CacheException {\n logger.debug(\"get cache, name=\" + name);\n Cache cache = caches.get(name);\n if (cache == null) {\n cache = new RedisCache<K, V>(redisManager, keySerializer, valueSerializer, keyPrefix);\n caches.put(name, cache);\n }\n return cache;\n}",
119
- "focal_file_path": "src/main/java/org/crazycake/shiro/RedisCacheManager.java",
120
- "focal_method_sign": "org/crazycake/shiro/RedisCacheManager.getCache:(Ljava/lang/String;)Lorg/apache/shiro/cache/Cache",
121
- "focal_all_deps_scored": [
122
- {
123
- "dep_id": 0,
124
- "method_sign": "org/crazycake/shiro/RedisCacheManager.getCache:(Ljava/lang/String;)Lorg/apache/shiro/cache/Cache",
125
- "file_path_old": "src/main/java/org/crazycake/shiro/RedisCacheManager.java",
126
- "line_nums_old": "28-39",
127
- "file_path_new": "src/main/java/org/crazycake/shiro/RedisCacheManager.java",
128
- "line_nums_new": "29-40",
129
- "dependency_updated": "updated",
130
- "score": null,
131
- "signal_scores": {}
132
- }
133
- ],
134
- "coverage_gold": 1.0,
135
- "branch_coverage_gold": 3.0,
136
- "method_coverage_gold": 11.1111,
137
- "line_coverage_gold": 8.0378,
138
- "is_traceback": false,
139
- "commit_gap": {
140
- "count": 0,
141
- "skipped_commits": []
142
- },
143
- "test_is_refactoring_only": false,
144
- "has_test_dep_change": false,
145
- "all_deps_new": [
146
- "org/crazycake/shiro/RedisCacheManager.setKeyPrefix:(Ljava/lang/String;)V",
147
- "org/crazycake/shiro/RedisCacheManager.getCache:(Ljava/lang/String;)Lorg/apache/shiro/cache/Cache",
148
- "org/crazycake/shiro/RedisCache.getKeyPrefix:()Ljava/lang/String"
149
- ],
150
- "all_deps_old": [
151
- "org/crazycake/shiro/RedisCacheManager.setKeyPrefix:(Ljava/lang/String;)V",
152
- "org/crazycake/shiro/RedisCacheManager.getCache:(Ljava/lang/String;)Lorg/apache/shiro/cache/Cache",
153
- "org/crazycake/shiro/RedisCache.getKeyPrefix:()Ljava/lang/String"
154
- ],
155
- "deps_changes": [
156
- {
157
- "method_sign": "org/crazycake/shiro/RedisCacheManager.getCache:(Ljava/lang/String;)Lorg/apache/shiro/cache/Cache",
158
- "change_type": "UPDATE",
159
- "file_path_old": "src/main/java/org/crazycake/shiro/RedisCacheManager.java",
160
- "file_path_new": "src/main/java/org/crazycake/shiro/RedisCacheManager.java",
161
- "source": "production",
162
- "is_test_dependency": false,
163
- "is_refactoring_only": false
164
- }
165
- ],
166
- "variant_result": {
167
- "old_on_old": "pass",
168
- "old_on_new": "fail",
169
- "new_on_old": "fail",
170
- "new_on_new": "pass"
171
- }
172
- }
173
- ],
174
- "version": "3.3.0",
175
- "java_version": 11
176
- },
177
- {
178
- "task_id": "CodePlato3721_shiro-redis-3.3.0__34d1af0_056ecf1__RedisCacheManagerTest_7f7deeaf",
179
- "project_name": "CodePlato3721_shiro-redis-3.3.0",
180
- "git_clone_url": "https://github.com/CodePlato3721/shiro-redis.git",
181
- "rev1": "34d1af0961cbe89b28480c8c6550898621ad01cb",
182
- "rev2": "056ecf1dff7084af80617c6fe856497ec477fc22",
183
- "rev1_date": "2018-03-04T02:00:11Z",
184
- "rev2_date": "2018-03-04T02:00:24Z",
185
- "git_diff_url": "https://github.com/CodePlato3721/shiro-redis/compare/34d1af0961cbe89b28480c8c6550898621ad01cb...056ecf1dff7084af80617c6fe856497ec477fc22",
186
- "test_file": "src/test/java/org/crazycake/shiro/RedisCacheManagerTest.java",
187
- "test_changes": [
188
- {
189
- "change_id": "20_CodePlato3721_shiro-redis-3.3.0_34d1af0_056ecf1_RedisCacheManagerTest",
190
- "test_sign": "org/crazycake/shiro/RedisCacheManagerTest.testGetCache:()V",
191
- "class": "RedisCacheManagerTest",
192
- "method": "testGetCache",
193
- "module": "",
194
- "junit_selector": "org.crazycake.shiro.RedisCacheManagerTest#testGetCache",
195
- "old_test_code": "@Test\npublic void testGetCache() {\n Cache cache = redisCacheManager.getCache(\"testCache1\");\n Cache cache1 = redisCacheManager.getCache(\"testCache1\");\n assertThat(cache, is(cache1));\n redisCacheManager.setKeyPrefix(\"testRedisManager1\");\n Cache cache2 = redisCacheManager.getCache(\"testCache2\");\n assertThat(cache2.getClass().getName(), is(\"org.crazycake.shiro.RedisCache\"));\n RedisCache redisCache2 = (RedisCache) cache2;\n assertThat(redisCache2.getKeyPrefix(), is(\"testRedisManager1\"));\n}",
196
- "new_test_code": "@Test\npublic void testGetCache() {\n Cache cache = redisCacheManager.getCache(\"testCache1\");\n Cache cache1 = redisCacheManager.getCache(\"testCache1\");\n assertThat(cache, is(cache1));\n redisCacheManager.setKeyPrefix(\"testRedisManager1:\");\n Cache cache2 = redisCacheManager.getCache(\"testCache2\");\n assertThat(cache2.getClass().getName(), is(\"org.crazycake.shiro.RedisCache\"));\n RedisCache redisCache2 = (RedisCache) cache2;\n assertThat(redisCache2.getKeyPrefix(), is(\"testRedisManager1:testCache2:\"));\n}",
197
- "old_test_file_path": [
198
- "src/test/java/org/crazycake/shiro/RedisCacheManagerTest.java"
199
- ],
200
- "old_test_lnum": [
201
- "23-35"
202
- ],
203
- "new_test_lnum": [
204
- "23-35"
205
- ],
206
- "old_production_code": "@Override\npublic <K, V> Cache<K, V> getCache(String name) throws CacheException {\n logger.debug(\"get cache, name=\" + name);\n Cache cache = caches.get(name);\n if (cache == null) {\n cache = new RedisCache<K, V>(redisManager, keySerializer, valueSerializer, keyPrefix);\n caches.put(name, cache);\n }\n return cache;\n}",
207
- "new_production_code": "@Override\npublic <K, V> Cache<K, V> getCache(String name) throws CacheException {\n logger.debug(\"get cache, name=\" + name);\n Cache cache = caches.get(name);\n if (cache == null) {\n cache = new RedisCache<K, V>(redisManager, keySerializer, valueSerializer, keyPrefix + name + \":\");\n caches.put(name, cache);\n }\n return cache;\n}",
208
- "focal_file_path": "src/main/java/org/crazycake/shiro/RedisCacheManager.java",
209
- "focal_method_sign": "org/crazycake/shiro/RedisCacheManager.getCache:(Ljava/lang/String;)Lorg/apache/shiro/cache/Cache",
210
- "focal_all_deps_scored": [
211
- {
212
- "dep_id": 0,
213
- "method_sign": "org/crazycake/shiro/RedisCacheManager.getCache:(Ljava/lang/String;)Lorg/apache/shiro/cache/Cache",
214
- "file_path_old": "src/main/java/org/crazycake/shiro/RedisCacheManager.java",
215
- "line_nums_old": "29-40",
216
- "file_path_new": "src/main/java/org/crazycake/shiro/RedisCacheManager.java",
217
- "line_nums_new": "29-40",
218
- "dependency_updated": "updated",
219
- "score": null,
220
- "signal_scores": {}
221
- }
222
- ],
223
- "coverage_gold": 1.0,
224
- "branch_coverage_gold": 3.0,
225
- "method_coverage_gold": 11.1111,
226
- "line_coverage_gold": 8.0378,
227
- "is_traceback": false,
228
- "commit_gap": {
229
- "count": 0,
230
- "skipped_commits": []
231
- },
232
- "test_is_refactoring_only": false,
233
- "has_test_dep_change": false,
234
- "all_deps_new": [
235
- "org/crazycake/shiro/RedisCacheManager.setKeyPrefix:(Ljava/lang/String;)V",
236
- "org/crazycake/shiro/RedisCacheManager.getCache:(Ljava/lang/String;)Lorg/apache/shiro/cache/Cache",
237
- "org/crazycake/shiro/RedisCache.getKeyPrefix:()Ljava/lang/String"
238
- ],
239
- "all_deps_old": [
240
- "org/crazycake/shiro/RedisCacheManager.setKeyPrefix:(Ljava/lang/String;)V",
241
- "org/crazycake/shiro/RedisCacheManager.getCache:(Ljava/lang/String;)Lorg/apache/shiro/cache/Cache",
242
- "org/crazycake/shiro/RedisCache.getKeyPrefix:()Ljava/lang/String"
243
- ],
244
- "deps_changes": [
245
- {
246
- "method_sign": "org/crazycake/shiro/RedisCacheManager.getCache:(Ljava/lang/String;)Lorg/apache/shiro/cache/Cache",
247
- "change_type": "UPDATE",
248
- "file_path_old": "src/main/java/org/crazycake/shiro/RedisCacheManager.java",
249
- "file_path_new": "src/main/java/org/crazycake/shiro/RedisCacheManager.java",
250
- "source": "production",
251
- "is_test_dependency": false,
252
- "is_refactoring_only": false
253
- }
254
- ],
255
- "variant_result": {
256
- "old_on_old": "pass",
257
- "old_on_new": "fail",
258
- "new_on_old": "fail",
259
- "new_on_new": "pass"
260
- }
261
- }
262
- ],
263
- "version": "3.3.0",
264
- "java_version": 11
265
- }
266
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DerekYRC_mini-spring-main.json DELETED
@@ -1,406 +0,0 @@
1
- [
2
- {
3
- "task_id": "DerekYRC_mini-spring-main__b004b39_626cc53__DynamicProxyTest_08d64df3",
4
- "project_name": "DerekYRC_mini-spring-main",
5
- "git_clone_url": "https://github.com/DerekYRC/mini-spring.git",
6
- "rev1": "b004b39a741342b86aca8b50f6d1e41e5e22fd89",
7
- "rev2": "626cc53ec71324eb9c7bf01f12470092b42b3dd4",
8
- "rev1_date": "2025-12-19T02:22:17Z",
9
- "rev2_date": "2025-12-19T04:13:51Z",
10
- "git_diff_url": "https://github.com/DerekYRC/mini-spring/compare/b004b39a741342b86aca8b50f6d1e41e5e22fd89...626cc53ec71324eb9c7bf01f12470092b42b3dd4",
11
- "test_file": "src/test/java/org/springframework/test/aop/DynamicProxyTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "1_DerekYRC_mini-spring-main_b004b39_626cc53_DynamicProxyTest",
15
- "test_sign": "org/springframework/test/aop/DynamicProxyTest.testAdvisor:()V",
16
- "class": "DynamicProxyTest",
17
- "method": "testAdvisor",
18
- "module": "",
19
- "junit_selector": "org.springframework.test.aop.DynamicProxyTest#testAdvisor",
20
- "old_test_code": "@Test\npublic void testAdvisor() throws Exception {\n WorldService worldService = new WorldServiceImpl();\n String expression = \"execution(* org.springframework.test.service.WorldService.explode(..))\";\n AspectJExpressionPointcutAdvisor advisor = new AspectJExpressionPointcutAdvisor();\n advisor.setExpression(expression);\n MethodBeforeAdviceInterceptor methodInterceptor = new MethodBeforeAdviceInterceptor(new WorldServiceBeforeAdvice());\n advisor.setAdvice(methodInterceptor);\n ClassFilter classFilter = advisor.getPointcut().getClassFilter();\n if (classFilter.matches(worldService.getClass())) {\n ProxyFactory proxyFactory = new ProxyFactory();\n TargetSource targetSource = new TargetSource(worldService);\n proxyFactory.setTargetSource(targetSource);\n proxyFactory.addAdvisor(advisor);\n WorldService proxy = (WorldService) proxyFactory.getProxy();\n proxy.explode();\n }\n}",
21
- "new_test_code": "@Test\npublic void testAdvisor() throws Exception {\n WorldService worldService = new WorldServiceImpl();\n String expression = \"execution(* org.springframework.test.service.WorldService.explode(..))\";\n AspectJExpressionPointcutAdvisor advisor = new AspectJExpressionPointcutAdvisor();\n advisor.setExpression(expression);\n MethodBeforeAdviceInterceptor methodInterceptor = new MethodBeforeAdviceInterceptor(new WorldServiceBeforeAdvice());\n advisor.setAdvice(methodInterceptor);\n ClassFilter classFilter = advisor.getPointcut().getClassFilter();\n if (classFilter.matches(worldService.getClass())) {\n AdvisedSupport advisedSupport = new AdvisedSupport();\n TargetSource targetSource = new TargetSource(worldService);\n advisedSupport.setTargetSource(targetSource);\n advisedSupport.setMethodInterceptor((MethodInterceptor) advisor.getAdvice());\n advisedSupport.setMethodMatcher(advisor.getPointcut().getMethodMatcher());\n WorldService proxy = (WorldService) new ProxyFactory(advisedSupport).getProxy();\n proxy.explode();\n }\n}",
22
- "old_test_file_path": [
23
- "src/test/java/org/springframework/test/aop/DynamicProxyTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "83-107"
27
- ],
28
- "new_test_lnum": [
29
- "78-102"
30
- ],
31
- "old_production_code": "public void addAdvisor(Advisor advisor) {\n advisors.add(advisor);\n}",
32
- "new_production_code": "",
33
- "focal_file_path": "src/main/java/org/springframework/aop/AdvisedSupport.java",
34
- "focal_method_sign": "org/springframework/aop/AdvisedSupport.addAdvisor:(Lorg/springframework/aop/Advisor;)V",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 1,
38
- "method_sign": "org/springframework/aop/AdvisedSupport.addAdvisor:(Lorg/springframework/aop/Advisor;)V",
39
- "file_path_old": "src/main/java/org/springframework/aop/AdvisedSupport.java",
40
- "line_nums_old": "44-46",
41
- "file_path_new": null,
42
- "line_nums_new": null,
43
- "dependency_updated": "deleted",
44
- "score": 0.2766,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 0.7,
48
- "ed": 0.7,
49
- "class": 0.0,
50
- "tfidf": 0.1604
51
- }
52
- },
53
- {
54
- "dep_id": 2,
55
- "method_sign": "org/springframework/aop/AdvisedSupport.setMethodInterceptor:(Lorg/aopalliance/intercept/MethodInterceptor;)V",
56
- "file_path_old": null,
57
- "line_nums_old": null,
58
- "file_path_new": "src/main/java/org/springframework/aop/AdvisedSupport.java",
59
- "line_nums_new": "40-42",
60
- "dependency_updated": "inserted",
61
- "score": 0.0769,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 0.2,
65
- "ed": 0.15,
66
- "class": 0.0,
67
- "tfidf": 0.0717
68
- }
69
- },
70
- {
71
- "dep_id": 0,
72
- "method_sign": "org/springframework/aop/framework/CglibAopProxy$DynamicAdvisedInterceptor.intercept:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;Lnet/sf/cglib/proxy/MethodProxy;)Ljava/lang/Object",
73
- "file_path_old": "src/main/java/org/springframework/aop/framework/CglibAopProxy.java",
74
- "line_nums_old": "48-63",
75
- "file_path_new": "src/main/java/org/springframework/aop/framework/CglibAopProxy.java",
76
- "line_nums_new": "45-53",
77
- "dependency_updated": "updated",
78
- "score": 0.0417,
79
- "signal_scores": {
80
- "nc": 0.0,
81
- "lcs_u": 0.2222,
82
- "ed": 0.0,
83
- "class": 0.0,
84
- "tfidf": 0.0107
85
- }
86
- }
87
- ],
88
- "coverage_gold": 0.9615384615384616,
89
- "branch_coverage_gold": 1.4815,
90
- "method_coverage_gold": 14.5669,
91
- "line_coverage_gold": 8.4379,
92
- "is_traceback": false,
93
- "commit_gap": {
94
- "count": 0,
95
- "skipped_commits": []
96
- },
97
- "test_is_refactoring_only": false,
98
- "has_test_dep_change": false,
99
- "all_deps_new": [
100
- "org/springframework/aop/AdvisedSupport.setMethodMatcher:(Lorg/springframework/aop/MethodMatcher;)V",
101
- "org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.getPointcut:()Lorg/springframework/aop/Pointcut",
102
- "org/springframework/aop/aspectj/AspectJExpressionPointcut.getClassFilter:()Lorg/springframework/aop/ClassFilter",
103
- "org/springframework/aop/aspectj/AspectJExpressionPointcut.getMethodMatcher:()Lorg/springframework/aop/MethodMatcher",
104
- "org/springframework/aop/aspectj/AspectJExpressionPointcut.matches:(Ljava/lang/Class;)Z",
105
- "org/springframework/aop/framework/ProxyFactory.getProxy:()Ljava/lang/Object",
106
- "org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.getAdvice:()Lorg/aopalliance/aop/Advice",
107
- "org/springframework/aop/AdvisedSupport.setMethodInterceptor:(Lorg/aopalliance/intercept/MethodInterceptor;)V",
108
- "org/springframework/aop/framework/CglibAopProxy$DynamicAdvisedInterceptor.intercept:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;Lnet/sf/cglib/proxy/MethodProxy;)Ljava/lang/Object",
109
- "org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.setExpression:(Ljava/lang/String;)V",
110
- "org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.setAdvice:(Lorg/aopalliance/aop/Advice;)V",
111
- "org/springframework/aop/AdvisedSupport.setTargetSource:(Lorg/springframework/aop/TargetSource;)V"
112
- ],
113
- "all_deps_old": [
114
- "org/springframework/aop/AdvisedSupport.setTargetSource:(Lorg/springframework/aop/TargetSource;)V",
115
- "org/springframework/aop/framework/CglibAopProxy$DynamicAdvisedInterceptor.intercept:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;Lnet/sf/cglib/proxy/MethodProxy;)Ljava/lang/Object",
116
- "org/springframework/aop/aspectj/AspectJExpressionPointcut.getClassFilter:()Lorg/springframework/aop/ClassFilter",
117
- "org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.setExpression:(Ljava/lang/String;)V",
118
- "org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.getPointcut:()Lorg/springframework/aop/Pointcut",
119
- "org/springframework/aop/aspectj/AspectJExpressionPointcut.matches:(Ljava/lang/Class;)Z",
120
- "org/springframework/aop/AdvisedSupport.addAdvisor:(Lorg/springframework/aop/Advisor;)V",
121
- "org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.setAdvice:(Lorg/aopalliance/aop/Advice;)V",
122
- "org/springframework/aop/framework/ProxyFactory.getProxy:()Ljava/lang/Object"
123
- ],
124
- "deps_changes": [
125
- {
126
- "method_sign": "org/springframework/aop/framework/CglibAopProxy$DynamicAdvisedInterceptor.intercept:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;Lnet/sf/cglib/proxy/MethodProxy;)Ljava/lang/Object",
127
- "change_type": "UPDATE",
128
- "file_path_old": "src/main/java/org/springframework/aop/framework/CglibAopProxy.java",
129
- "file_path_new": "src/main/java/org/springframework/aop/framework/CglibAopProxy.java",
130
- "source": "production",
131
- "is_test_dependency": false,
132
- "is_refactoring_only": false
133
- },
134
- {
135
- "method_sign": "org/springframework/aop/AdvisedSupport.addAdvisor:(Lorg/springframework/aop/Advisor;)V",
136
- "change_type": "DELETE",
137
- "file_path_old": "src/main/java/org/springframework/aop/AdvisedSupport.java",
138
- "file_path_new": null,
139
- "source": "production",
140
- "is_test_dependency": false,
141
- "is_refactoring_only": false
142
- },
143
- {
144
- "method_sign": "org/springframework/aop/AdvisedSupport.setMethodInterceptor:(Lorg/aopalliance/intercept/MethodInterceptor;)V",
145
- "change_type": "ADD",
146
- "file_path_old": null,
147
- "file_path_new": "src/main/java/org/springframework/aop/AdvisedSupport.java",
148
- "source": "production",
149
- "is_test_dependency": false,
150
- "is_refactoring_only": false
151
- }
152
- ],
153
- "variant_result": {
154
- "old_on_old": "pass",
155
- "old_on_new": "error",
156
- "new_on_old": "error",
157
- "new_on_new": "pass"
158
- }
159
- },
160
- {
161
- "change_id": "2_DerekYRC_mini-spring-main_b004b39_626cc53_DynamicProxyTest",
162
- "test_sign": "org/springframework/test/aop/DynamicProxyTest.testBeforeAdvice:()V",
163
- "class": "DynamicProxyTest",
164
- "method": "testBeforeAdvice",
165
- "module": "",
166
- "junit_selector": "org.springframework.test.aop.DynamicProxyTest#testBeforeAdvice",
167
- "old_test_code": "@Test\npublic void testBeforeAdvice() throws Exception {\n String expression = \"execution(* org.springframework.test.service.WorldService.explode(..))\";\n AspectJExpressionPointcutAdvisor advisor = new AspectJExpressionPointcutAdvisor();\n advisor.setExpression(expression);\n MethodBeforeAdviceInterceptor methodInterceptor = new MethodBeforeAdviceInterceptor(new WorldServiceBeforeAdvice());\n advisor.setAdvice(methodInterceptor);\n advisedSupport.addAdvisor(advisor);\n ProxyFactory factory = (ProxyFactory) advisedSupport;\n WorldService proxy = (WorldService) factory.getProxy();\n proxy.explode();\n}",
168
- "new_test_code": "@Test\npublic void testBeforeAdvice() throws Exception {\n WorldServiceBeforeAdvice beforeAdvice = new WorldServiceBeforeAdvice();\n MethodBeforeAdviceInterceptor methodInterceptor = new MethodBeforeAdviceInterceptor(beforeAdvice);\n advisedSupport.setMethodInterceptor(methodInterceptor);\n WorldService proxy = (WorldService) new ProxyFactory(advisedSupport).getProxy();\n proxy.explode();\n}",
169
- "old_test_file_path": [
170
- "src/test/java/org/springframework/test/aop/DynamicProxyTest.java"
171
- ],
172
- "old_test_lnum": [
173
- "69-81"
174
- ],
175
- "new_test_lnum": [
176
- "67-76"
177
- ],
178
- "old_production_code": "public void addAdvisor(Advisor advisor) {\n advisors.add(advisor);\n}",
179
- "new_production_code": "",
180
- "focal_file_path": "src/main/java/org/springframework/aop/AdvisedSupport.java",
181
- "focal_method_sign": "org/springframework/aop/AdvisedSupport.addAdvisor:(Lorg/springframework/aop/Advisor;)V",
182
- "focal_all_deps_scored": [
183
- {
184
- "dep_id": 1,
185
- "method_sign": "org/springframework/aop/AdvisedSupport.addAdvisor:(Lorg/springframework/aop/Advisor;)V",
186
- "file_path_old": "src/main/java/org/springframework/aop/AdvisedSupport.java",
187
- "line_nums_old": "44-46",
188
- "file_path_new": null,
189
- "line_nums_new": null,
190
- "dependency_updated": "deleted",
191
- "score": 0.1622,
192
- "signal_scores": {
193
- "nc": 0.0,
194
- "lcs_u": 0.4,
195
- "ed": 0.25,
196
- "class": 0.0,
197
- "tfidf": 0.2142
198
- }
199
- },
200
- {
201
- "dep_id": 2,
202
- "method_sign": "org/springframework/aop/AdvisedSupport.setMethodInterceptor:(Lorg/aopalliance/intercept/MethodInterceptor;)V",
203
- "file_path_old": null,
204
- "line_nums_old": null,
205
- "file_path_new": "src/main/java/org/springframework/aop/AdvisedSupport.java",
206
- "line_nums_new": "40-42",
207
- "dependency_updated": "inserted",
208
- "score": 0.1456,
209
- "signal_scores": {
210
- "nc": 0.0,
211
- "lcs_u": 0.3,
212
- "ed": 0.2,
213
- "class": 0.0,
214
- "tfidf": 0.2538
215
- }
216
- },
217
- {
218
- "dep_id": 0,
219
- "method_sign": "org/springframework/aop/framework/CglibAopProxy$DynamicAdvisedInterceptor.intercept:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;Lnet/sf/cglib/proxy/MethodProxy;)Ljava/lang/Object",
220
- "file_path_old": "src/main/java/org/springframework/aop/framework/CglibAopProxy.java",
221
- "line_nums_old": "48-63",
222
- "file_path_new": "src/main/java/org/springframework/aop/framework/CglibAopProxy.java",
223
- "line_nums_new": "45-53",
224
- "dependency_updated": "updated",
225
- "score": 0.0942,
226
- "signal_scores": {
227
- "nc": 0.0,
228
- "lcs_u": 0.4444,
229
- "ed": 0.0833,
230
- "class": 0.0,
231
- "tfidf": 0.0086
232
- }
233
- }
234
- ],
235
- "coverage_gold": 0.9090909090909091,
236
- "branch_coverage_gold": 0.7407,
237
- "method_coverage_gold": 11.811,
238
- "line_coverage_gold": 7.1836,
239
- "is_traceback": false,
240
- "commit_gap": {
241
- "count": 0,
242
- "skipped_commits": []
243
- },
244
- "test_is_refactoring_only": false,
245
- "has_test_dep_change": false,
246
- "all_deps_new": [
247
- "org/springframework/aop/framework/ProxyFactory.getProxy:()Ljava/lang/Object",
248
- "org/springframework/aop/AdvisedSupport.setMethodInterceptor:(Lorg/aopalliance/intercept/MethodInterceptor;)V",
249
- "org/springframework/aop/framework/CglibAopProxy$DynamicAdvisedInterceptor.intercept:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;Lnet/sf/cglib/proxy/MethodProxy;)Ljava/lang/Object"
250
- ],
251
- "all_deps_old": [
252
- "org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.setExpression:(Ljava/lang/String;)V",
253
- "org/springframework/aop/framework/CglibAopProxy$DynamicAdvisedInterceptor.intercept:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;Lnet/sf/cglib/proxy/MethodProxy;)Ljava/lang/Object",
254
- "org/springframework/aop/AdvisedSupport.addAdvisor:(Lorg/springframework/aop/Advisor;)V",
255
- "org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.setAdvice:(Lorg/aopalliance/aop/Advice;)V",
256
- "org/springframework/aop/framework/ProxyFactory.getProxy:()Ljava/lang/Object"
257
- ],
258
- "deps_changes": [
259
- {
260
- "method_sign": "org/springframework/aop/framework/CglibAopProxy$DynamicAdvisedInterceptor.intercept:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;Lnet/sf/cglib/proxy/MethodProxy;)Ljava/lang/Object",
261
- "change_type": "UPDATE",
262
- "file_path_old": "src/main/java/org/springframework/aop/framework/CglibAopProxy.java",
263
- "file_path_new": "src/main/java/org/springframework/aop/framework/CglibAopProxy.java",
264
- "source": "production",
265
- "is_test_dependency": false,
266
- "is_refactoring_only": false
267
- },
268
- {
269
- "method_sign": "org/springframework/aop/AdvisedSupport.addAdvisor:(Lorg/springframework/aop/Advisor;)V",
270
- "change_type": "DELETE",
271
- "file_path_old": "src/main/java/org/springframework/aop/AdvisedSupport.java",
272
- "file_path_new": null,
273
- "source": "production",
274
- "is_test_dependency": false,
275
- "is_refactoring_only": false
276
- },
277
- {
278
- "method_sign": "org/springframework/aop/AdvisedSupport.setMethodInterceptor:(Lorg/aopalliance/intercept/MethodInterceptor;)V",
279
- "change_type": "ADD",
280
- "file_path_old": null,
281
- "file_path_new": "src/main/java/org/springframework/aop/AdvisedSupport.java",
282
- "source": "production",
283
- "is_test_dependency": false,
284
- "is_refactoring_only": false
285
- }
286
- ],
287
- "variant_result": {
288
- "old_on_old": "pass",
289
- "old_on_new": "error",
290
- "new_on_old": "error",
291
- "new_on_new": "pass"
292
- }
293
- },
294
- {
295
- "change_id": "3_DerekYRC_mini-spring-main_b004b39_626cc53_DynamicProxyTest",
296
- "test_sign": "org/springframework/test/aop/DynamicProxyTest.testProxyFactory:()V",
297
- "class": "DynamicProxyTest",
298
- "method": "testProxyFactory",
299
- "module": "",
300
- "junit_selector": "org.springframework.test.aop.DynamicProxyTest#testProxyFactory",
301
- "old_test_code": "@Test\npublic void testProxyFactory() throws Exception {\n ProxyFactory factory = (ProxyFactory) advisedSupport;\n factory.setProxyTargetClass(false);\n WorldService proxy = (WorldService) factory.getProxy();\n proxy.explode();\n factory.setProxyTargetClass(true);\n proxy = (WorldService) factory.getProxy();\n proxy.explode();\n}",
302
- "new_test_code": "@Test\npublic void testProxyFactory() throws Exception {\n advisedSupport.setProxyTargetClass(false);\n WorldService proxy = (WorldService) new ProxyFactory(advisedSupport).getProxy();\n proxy.explode();\n advisedSupport.setProxyTargetClass(true);\n proxy = (WorldService) new ProxyFactory(advisedSupport).getProxy();\n proxy.explode();\n}",
303
- "old_test_file_path": [
304
- "src/test/java/org/springframework/test/aop/DynamicProxyTest.java"
305
- ],
306
- "old_test_lnum": [
307
- "55-67"
308
- ],
309
- "new_test_lnum": [
310
- "54-65"
311
- ],
312
- "old_production_code": "@Override\npublic Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {\n Object target = advised.getTargetSource().getTarget();\n Class<?> targetClass = target.getClass();\n Object retVal = null;\n List<Object> chain = this.advised.getInterceptorsAndDynamicInterceptionAdvice(method, targetClass);\n CglibMethodInvocation methodInvocation = new CglibMethodInvocation(proxy, target, method, args, targetClass, chain, methodProxy);\n if (chain == null || chain.isEmpty()) {\n retVal = methodProxy.invoke(target, args);\n } else {\n retVal = methodInvocation.proceed();\n }\n return retVal;\n}",
313
- "new_production_code": "@Override\npublic Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {\n CglibMethodInvocation methodInvocation = new CglibMethodInvocation(advised.getTargetSource().getTarget(), method, objects, methodProxy);\n if (advised.getMethodMatcher().matches(method, advised.getTargetSource().getTarget().getClass())) {\n return advised.getMethodInterceptor().invoke(methodInvocation);\n }\n return methodInvocation.proceed();\n}",
314
- "focal_file_path": "src/main/java/org/springframework/aop/framework/CglibAopProxy.java",
315
- "focal_method_sign": "org/springframework/aop/framework/CglibAopProxy$DynamicAdvisedInterceptor.intercept:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;Lnet/sf/cglib/proxy/MethodProxy;)Ljava/lang/Object",
316
- "focal_all_deps_scored": [
317
- {
318
- "dep_id": 1,
319
- "method_sign": "org/springframework/aop/framework/CglibAopProxy$DynamicAdvisedInterceptor.intercept:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;Lnet/sf/cglib/proxy/MethodProxy;)Ljava/lang/Object",
320
- "file_path_old": "src/main/java/org/springframework/aop/framework/CglibAopProxy.java",
321
- "line_nums_old": "48-63",
322
- "file_path_new": "src/main/java/org/springframework/aop/framework/CglibAopProxy.java",
323
- "line_nums_new": "45-53",
324
- "dependency_updated": "updated",
325
- "score": 0.0766,
326
- "signal_scores": {
327
- "nc": 0.0,
328
- "lcs_u": 0.3333,
329
- "ed": 0.0833,
330
- "class": 0.0,
331
- "tfidf": 0.0172
332
- }
333
- },
334
- {
335
- "dep_id": 0,
336
- "method_sign": "org/springframework/aop/framework/JdkDynamicAopProxy.invoke:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object",
337
- "file_path_old": "src/main/java/org/springframework/aop/framework/JdkDynamicAopProxy.java",
338
- "line_nums_old": "36-55",
339
- "file_path_new": "src/main/java/org/springframework/aop/framework/JdkDynamicAopProxy.java",
340
- "line_nums_new": "34-42",
341
- "dependency_updated": "updated",
342
- "score": 0.0457,
343
- "signal_scores": {
344
- "nc": 0.0,
345
- "lcs_u": 0.1667,
346
- "ed": 0.0833,
347
- "class": 0.0,
348
- "tfidf": 0.0111
349
- }
350
- }
351
- ],
352
- "coverage_gold": 0.8666666666666667,
353
- "branch_coverage_gold": 1.4815,
354
- "method_coverage_gold": 11.811,
355
- "line_coverage_gold": 7.5257,
356
- "is_traceback": false,
357
- "commit_gap": {
358
- "count": 0,
359
- "skipped_commits": []
360
- },
361
- "test_is_refactoring_only": false,
362
- "has_test_dep_change": false,
363
- "all_deps_new": [
364
- "org/springframework/aop/AdvisedSupport.setProxyTargetClass:(Z)V",
365
- "org/springframework/aop/framework/ProxyFactory.getProxy:()Ljava/lang/Object",
366
- "org/springframework/aop/framework/JdkDynamicAopProxy.invoke:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object",
367
- "org/springframework/aop/framework/CglibAopProxy$DynamicAdvisedInterceptor.intercept:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;Lnet/sf/cglib/proxy/MethodProxy;)Ljava/lang/Object"
368
- ],
369
- "all_deps_old": [
370
- "org/springframework/aop/framework/CglibAopProxy$DynamicAdvisedInterceptor.intercept:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;Lnet/sf/cglib/proxy/MethodProxy;)Ljava/lang/Object",
371
- "org/springframework/aop/AdvisedSupport.setProxyTargetClass:(Z)V",
372
- "org/springframework/aop/framework/JdkDynamicAopProxy.invoke:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object",
373
- "org/springframework/aop/framework/ProxyFactory.getProxy:()Ljava/lang/Object"
374
- ],
375
- "deps_changes": [
376
- {
377
- "method_sign": "org/springframework/aop/framework/JdkDynamicAopProxy.invoke:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object",
378
- "change_type": "UPDATE",
379
- "file_path_old": "src/main/java/org/springframework/aop/framework/JdkDynamicAopProxy.java",
380
- "file_path_new": "src/main/java/org/springframework/aop/framework/JdkDynamicAopProxy.java",
381
- "source": "production",
382
- "is_test_dependency": false,
383
- "is_refactoring_only": false
384
- },
385
- {
386
- "method_sign": "org/springframework/aop/framework/CglibAopProxy$DynamicAdvisedInterceptor.intercept:(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;Lnet/sf/cglib/proxy/MethodProxy;)Ljava/lang/Object",
387
- "change_type": "UPDATE",
388
- "file_path_old": "src/main/java/org/springframework/aop/framework/CglibAopProxy.java",
389
- "file_path_new": "src/main/java/org/springframework/aop/framework/CglibAopProxy.java",
390
- "source": "production",
391
- "is_test_dependency": false,
392
- "is_refactoring_only": false
393
- }
394
- ],
395
- "variant_result": {
396
- "old_on_old": "pass",
397
- "old_on_new": "error",
398
- "new_on_old": "error",
399
- "new_on_new": "pass"
400
- }
401
- }
402
- ],
403
- "version": "main",
404
- "java_version": 8
405
- }
406
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Hakky54_ayza-v10.0.3.json DELETED
@@ -1,176 +0,0 @@
1
- [
2
- {
3
- "task_id": "Hakky54_ayza-v10.0.3__751f736_cbee6eb__SSLFactoryShould_de63ab55",
4
- "project_name": "Hakky54_ayza-v10.0.3",
5
- "git_clone_url": "https://github.com/Hakky54/ayza.git",
6
- "rev1": "751f736fca4cdef271db20f0537b2af67efb9b29",
7
- "rev2": "cbee6ebd17d58a494f3eb36cf12e9b28cf374643",
8
- "rev1_date": "2024-05-29T09:20:53Z",
9
- "rev2_date": "2024-05-29T09:23:49Z",
10
- "git_diff_url": "https://github.com/Hakky54/ayza/compare/751f736fca4cdef271db20f0537b2af67efb9b29...cbee6ebd17d58a494f3eb36cf12e9b28cf374643",
11
- "test_file": "sslcontext-kickstart/src/test/java/nl/altindag/ssl/SSLFactoryShould.java",
12
- "test_changes": [
13
- {
14
- "change_id": "34_Hakky54_ayza-v10.0.3_751f736_cbee6eb_SSLFactoryShould",
15
- "test_sign": "nl/altindag/ssl/SSLFactoryShould.throwExceptionWhenTrustStorePathIsAbsentFromSystemProperty:()V",
16
- "class": "SSLFactoryShould",
17
- "method": "throwExceptionWhenTrustStorePathIsAbsentFromSystemProperty",
18
- "module": "sslcontext-kickstart",
19
- "junit_selector": "nl.altindag.ssl.SSLFactoryShould#throwExceptionWhenTrustStorePathIsAbsentFromSystemProperty",
20
- "old_test_code": "@Test\nvoid throwExceptionWhenTrustStorePathIsAbsentFromSystemProperty() {\n Map<String, String> properties = new HashMap<>();\n properties.put(\"javax.net.ssl.trustStorePassword\", new String(TRUSTSTORE_PASSWORD));\n properties.put(\"javax.net.ssl.trustStoreType\", \"PKCS12\");\n properties.forEach(System::setProperty);\n SSLFactory.Builder sslFactoryBuilder = SSLFactory.builder();\n assertThatThrownBy(sslFactoryBuilder::withSystemPropertyDerivedTrustMaterial).isInstanceOf(GenericKeyStoreException.class).hasMessageContaining(\"TrustStore details are empty, which are required to be present when SSL/TLS is enabled\");\n properties.forEach((propertyName, propertyValue) -> System.clearProperty(propertyName));\n}",
21
- "new_test_code": "@Test\nvoid throwExceptionWhenTrustStorePathIsAbsentFromSystemProperty() {\n Map<String, String> properties = new HashMap<>();\n properties.put(\"javax.net.ssl.trustStorePassword\", new String(TRUSTSTORE_PASSWORD));\n properties.put(\"javax.net.ssl.trustStoreType\", \"PKCS12\");\n properties.forEach(System::setProperty);\n SSLFactory.Builder sslFactoryBuilder = SSLFactory.builder();\n assertThatThrownBy(sslFactoryBuilder::withSystemPropertyDerivedTrustMaterial).isInstanceOf(GenericKeyStoreException.class).hasMessageContaining(\"The value for the system property [javax.net.ssl.trustStore] is absent\");\n properties.forEach((propertyName, propertyValue) -> System.clearProperty(propertyName));\n}",
22
- "old_test_file_path": [
23
- "sslcontext-kickstart/src/test/java/nl/altindag/ssl/SSLFactoryShould.java"
24
- ],
25
- "old_test_lnum": [
26
- "1499-1512"
27
- ],
28
- "new_test_lnum": [
29
- "1499-1512"
30
- ],
31
- "old_production_code": "public Builder withSystemPropertyDerivedTrustMaterial() {\n return withSystemPropertyDerivedMaterial(\"javax.net.ssl.trustStore\", \"javax.net.ssl.trustStorePassword\", \"javax.net.ssl.trustStoreType\", \"javax.net.ssl.trustStoreProvider\", this::withTrustMaterial);\n}",
32
- "new_production_code": "public Builder withSystemPropertyDerivedTrustMaterial() {\n KeyStore trustStore = KeyStoreUtils.loadSystemPropertyDerivedTrustStore();\n return withTrustMaterial(trustStore);\n}",
33
- "focal_file_path": "sslcontext-kickstart/src/main/java/nl/altindag/ssl/SSLFactory.java",
34
- "focal_method_sign": "nl/altindag/ssl/SSLFactory$Builder.withSystemPropertyDerivedTrustMaterial:()Lnl/altindag/ssl/SSLFactory$Builder",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "nl/altindag/ssl/SSLFactory$Builder.withSystemPropertyDerivedTrustMaterial:()Lnl/altindag/ssl/SSLFactory$Builder",
39
- "file_path_old": "sslcontext-kickstart/src/main/java/nl/altindag/ssl/SSLFactory.java",
40
- "line_nums_old": "222-230",
41
- "file_path_new": "sslcontext-kickstart/src/main/java/nl/altindag/ssl/SSLFactory.java",
42
- "line_nums_new": "221-224",
43
- "dependency_updated": "updated",
44
- "score": null,
45
- "signal_scores": {}
46
- }
47
- ],
48
- "coverage_gold": 0.10097719869706841,
49
- "branch_coverage_gold": 0.0,
50
- "method_coverage_gold": 1.0889,
51
- "line_coverage_gold": 1.7978,
52
- "is_traceback": false,
53
- "commit_gap": {
54
- "count": 0,
55
- "skipped_commits": []
56
- },
57
- "test_is_refactoring_only": false,
58
- "has_test_dep_change": false,
59
- "all_deps_new": [
60
- "nl/altindag/ssl/SSLFactory.builder:()Lnl/altindag/ssl/SSLFactory$Builder",
61
- "nl/altindag/ssl/SSLFactory$Builder.withSystemPropertyDerivedTrustMaterial:()Lnl/altindag/ssl/SSLFactory$Builder"
62
- ],
63
- "all_deps_old": [
64
- "nl/altindag/ssl/SSLFactory.builder:()Lnl/altindag/ssl/SSLFactory$Builder",
65
- "nl/altindag/ssl/SSLFactory$Builder.withSystemPropertyDerivedTrustMaterial:()Lnl/altindag/ssl/SSLFactory$Builder"
66
- ],
67
- "deps_changes": [
68
- {
69
- "method_sign": "nl/altindag/ssl/SSLFactory$Builder.withSystemPropertyDerivedTrustMaterial:()Lnl/altindag/ssl/SSLFactory$Builder",
70
- "change_type": "UPDATE",
71
- "file_path_old": "sslcontext-kickstart/src/main/java/nl/altindag/ssl/SSLFactory.java",
72
- "file_path_new": "sslcontext-kickstart/src/main/java/nl/altindag/ssl/SSLFactory.java",
73
- "source": "production",
74
- "is_test_dependency": false,
75
- "is_refactoring_only": false
76
- }
77
- ],
78
- "variant_result": {
79
- "old_on_old": "pass",
80
- "old_on_new": "fail",
81
- "new_on_old": "fail",
82
- "new_on_new": "pass"
83
- }
84
- }
85
- ],
86
- "version": "v10.0.3",
87
- "java_version": 11
88
- },
89
- {
90
- "task_id": "Hakky54_ayza-v10.0.3__cf1f163_28c6589__SSLFactoryShould_de63ab55",
91
- "project_name": "Hakky54_ayza-v10.0.3",
92
- "git_clone_url": "https://github.com/Hakky54/ayza.git",
93
- "rev1": "cf1f1635858ad2e14cf49cc04b5d778fb8d2bbaf",
94
- "rev2": "28c6589b7ad1c507647e69660283781386ff69b2",
95
- "rev1_date": "2024-05-30T07:19:35Z",
96
- "rev2_date": "2024-05-30T11:43:38Z",
97
- "git_diff_url": "https://github.com/Hakky54/ayza/compare/cf1f1635858ad2e14cf49cc04b5d778fb8d2bbaf...28c6589b7ad1c507647e69660283781386ff69b2",
98
- "test_file": "sslcontext-kickstart/src/test/java/nl/altindag/ssl/SSLFactoryShould.java",
99
- "test_changes": [
100
- {
101
- "change_id": "37_Hakky54_ayza-v10.0.3_cf1f163_28c6589_SSLFactoryShould",
102
- "test_sign": "nl/altindag/ssl/SSLFactoryShould.throwExceptionWhenTrustStorePathIsAbsentFromSystemProperty:()V",
103
- "class": "SSLFactoryShould",
104
- "method": "throwExceptionWhenTrustStorePathIsAbsentFromSystemProperty",
105
- "module": "sslcontext-kickstart",
106
- "junit_selector": "nl.altindag.ssl.SSLFactoryShould#throwExceptionWhenTrustStorePathIsAbsentFromSystemProperty",
107
- "old_test_code": "@Test\nvoid throwExceptionWhenTrustStorePathIsAbsentFromSystemProperty() {\n Map<String, String> properties = new HashMap<>();\n properties.put(\"javax.net.ssl.trustStorePassword\", new String(TRUSTSTORE_PASSWORD));\n properties.put(\"javax.net.ssl.trustStoreType\", \"PKCS12\");\n properties.forEach(System::setProperty);\n SSLFactory.Builder sslFactoryBuilder = SSLFactory.builder();\n assertThatThrownBy(sslFactoryBuilder::withSystemPropertyDerivedTrustMaterial).isInstanceOf(GenericKeyStoreException.class).hasMessageContaining(\"TrustStore details are empty, which are required to be present when SSL/TLS is enabled\");\n properties.forEach((propertyName, propertyValue) -> System.clearProperty(propertyName));\n}",
108
- "new_test_code": "@Test\nvoid throwExceptionWhenTrustStorePathIsAbsentFromSystemProperty() {\n Map<String, String> properties = new HashMap<>();\n properties.put(\"javax.net.ssl.trustStorePassword\", new String(TRUSTSTORE_PASSWORD));\n properties.put(\"javax.net.ssl.trustStoreType\", \"PKCS12\");\n properties.forEach(System::setProperty);\n SSLFactory.Builder sslFactoryBuilder = SSLFactory.builder();\n assertThatThrownBy(sslFactoryBuilder::withSystemPropertyDerivedTrustMaterial).isInstanceOf(GenericKeyStoreException.class).hasMessageContaining(\"The value for the system property [javax.net.ssl.trustStore] is absent\");\n properties.forEach((propertyName, propertyValue) -> System.clearProperty(propertyName));\n}",
109
- "old_test_file_path": [
110
- "sslcontext-kickstart/src/test/java/nl/altindag/ssl/SSLFactoryShould.java"
111
- ],
112
- "old_test_lnum": [
113
- "1499-1512"
114
- ],
115
- "new_test_lnum": [
116
- "1499-1512"
117
- ],
118
- "old_production_code": "public Builder withSystemPropertyDerivedTrustMaterial() {\n return withSystemPropertyDerivedMaterial(\"javax.net.ssl.trustStore\", \"javax.net.ssl.trustStorePassword\", \"javax.net.ssl.trustStoreType\", \"javax.net.ssl.trustStoreProvider\", this::withTrustMaterial);\n}",
119
- "new_production_code": "public Builder withSystemPropertyDerivedTrustMaterial() {\n KeyStore trustStore = KeyStoreUtils.loadSystemPropertyDerivedTrustStore();\n return withTrustMaterial(trustStore);\n}",
120
- "focal_file_path": "sslcontext-kickstart/src/main/java/nl/altindag/ssl/SSLFactory.java",
121
- "focal_method_sign": "nl/altindag/ssl/SSLFactory$Builder.withSystemPropertyDerivedTrustMaterial:()Lnl/altindag/ssl/SSLFactory$Builder",
122
- "focal_all_deps_scored": [
123
- {
124
- "dep_id": 0,
125
- "method_sign": "nl/altindag/ssl/SSLFactory$Builder.withSystemPropertyDerivedTrustMaterial:()Lnl/altindag/ssl/SSLFactory$Builder",
126
- "file_path_old": "sslcontext-kickstart/src/main/java/nl/altindag/ssl/SSLFactory.java",
127
- "line_nums_old": "222-230",
128
- "file_path_new": "sslcontext-kickstart/src/main/java/nl/altindag/ssl/SSLFactory.java",
129
- "line_nums_new": "221-224",
130
- "dependency_updated": "updated",
131
- "score": null,
132
- "signal_scores": {}
133
- }
134
- ],
135
- "coverage_gold": 0.10097719869706841,
136
- "branch_coverage_gold": 0.0,
137
- "method_coverage_gold": 1.0879,
138
- "line_coverage_gold": 1.7964,
139
- "is_traceback": false,
140
- "commit_gap": {
141
- "count": 0,
142
- "skipped_commits": []
143
- },
144
- "test_is_refactoring_only": false,
145
- "has_test_dep_change": false,
146
- "all_deps_new": [
147
- "nl/altindag/ssl/SSLFactory$Builder.withSystemPropertyDerivedTrustMaterial:()Lnl/altindag/ssl/SSLFactory$Builder",
148
- "nl/altindag/ssl/SSLFactory.builder:()Lnl/altindag/ssl/SSLFactory$Builder"
149
- ],
150
- "all_deps_old": [
151
- "nl/altindag/ssl/SSLFactory.builder:()Lnl/altindag/ssl/SSLFactory$Builder",
152
- "nl/altindag/ssl/SSLFactory$Builder.withSystemPropertyDerivedTrustMaterial:()Lnl/altindag/ssl/SSLFactory$Builder"
153
- ],
154
- "deps_changes": [
155
- {
156
- "method_sign": "nl/altindag/ssl/SSLFactory$Builder.withSystemPropertyDerivedTrustMaterial:()Lnl/altindag/ssl/SSLFactory$Builder",
157
- "change_type": "UPDATE",
158
- "file_path_old": "sslcontext-kickstart/src/main/java/nl/altindag/ssl/SSLFactory.java",
159
- "file_path_new": "sslcontext-kickstart/src/main/java/nl/altindag/ssl/SSLFactory.java",
160
- "source": "production",
161
- "is_test_dependency": false,
162
- "is_refactoring_only": false
163
- }
164
- ],
165
- "variant_result": {
166
- "old_on_old": "pass",
167
- "old_on_new": "fail",
168
- "new_on_old": "fail",
169
- "new_on_new": "pass"
170
- }
171
- }
172
- ],
173
- "version": "v10.0.3",
174
- "java_version": 11
175
- }
176
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Project-Books_book-project-v0.1.0.json DELETED
The diff for this file is too large to render. See raw diff
 
README.md CHANGED
@@ -1,6 +1,121 @@
1
  ---
2
  license: cc-by-4.0
3
  task_categories:
4
- - text-generation
5
- pretty_name: TestEvo-Bench / Test Update Track
6
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-4.0
3
  task_categories:
4
+ - text-generation
5
+ language:
6
+ - en
7
+ tags:
8
+ - code
9
+ - java
10
+ - test-update
11
+ - test-evolution
12
+ - software-engineering
13
+ - benchmark
14
+ size_categories:
15
+ - n<1K
16
+ configs:
17
+ - config_name: default
18
+ data_files: data/train.jsonl
19
+ ---
20
+
21
+ # TestEvo-Bench / teb-update
22
+
23
+ A benchmark for **test-update** in evolving Java codebases. Each row captures a single (project, revision-pair) where one or more existing tests were *modified* to track a change in production code, and surfaces both the old and new test versions plus the relevant production-side context.
24
+
25
+ ## Links
26
+
27
+ - 🌐 Project website: https://www.testevo-bench.com/
28
+ - 📦 Code repository: https://anonymous.4open.science/r/testevo-bench-1150
29
+ - 🤝 Sibling dataset: [`TestEvo-Bench/teb-generation`](https://huggingface.co/datasets/TestEvo-Bench/teb-generation) — for **test-generation** (writing new tests instead of updating existing ones)
30
+
31
+ ## Dataset summary
32
+
33
+ `teb-update` targets the **positive** subset of TestEvo-Bench: pairs where an existing test method was edited (not added, not deleted) between `rev1` and `rev2`, and the edit is plausibly a real adaptation to a production-code change rather than incidental refactoring. The unit of evaluation is "given the old test, the production-side diff, and dependency context, produce the updated test."
34
+
35
+ Each row corresponds to a single (project, `rev1` → `rev2`) pair. Inside the row, `test_changes` is a list of one or more individual test methods that were modified in that revision, each with its own focal-method analysis.
36
+
37
+ | | |
38
+ |---|---|
39
+ | Rows | 509 |
40
+ | Source projects | 59 distinct Java repositories on GitHub |
41
+ | Java versions | 8, 11, 17, 21 |
42
+ | Build system | Maven |
43
+ | Total size | ~6 MB |
44
+
45
+ ## Schema
46
+
47
+ Each row has the following top-level fields:
48
+
49
+ | Field | Type | Description |
50
+ |---|---|---|
51
+ | `task_id` | string | Stable identifier: `<project>__<rev1_short>_<rev2_short>__<test_class>_<hash>` |
52
+ | `project_name` | string | e.g. `DerekYRC_mini-spring-main` |
53
+ | `git_clone_url` | string | Upstream GitHub clone URL |
54
+ | `rev1` | string | Git SHA before the change (full 40-char) |
55
+ | `rev2` | string | Git SHA after the change |
56
+ | `rev1_date` | string | ISO 8601 (e.g. `2020-12-06T08:42:43Z`) |
57
+ | `rev2_date` | string | ISO 8601 |
58
+ | `git_diff_url` | string | GitHub `compare` URL between rev1 and rev2 |
59
+ | `test_file` | string | Path of the test file within the repo |
60
+ | `test_changes` | list&lt;struct&gt; | One element per individual test method that was modified; see below |
61
+ | `version` | string | Upstream tag or branch (e.g. `v0.1.0`, `master`) |
62
+ | `java_version` | int | Java major version (8, 11, 17, or 21) |
63
+
64
+ Each `test_changes[]` element contains:
65
+
66
+ | Field | Type | Description |
67
+ |---|---|---|
68
+ | `change_id` | string | Unique id within the dataset |
69
+ | `test_sign` | string | JVM-style test method signature |
70
+ | `class`, `method`, `module` | string | Test class, method name, Maven module |
71
+ | `junit_selector` | string | JUnit selector usable by `mvn test -Dtest=…` |
72
+ | `old_test_code` | string | The test method's source at `rev1` (always present for `teb-update` since rows are *modifications*) |
73
+ | `new_test_code` | string | The test method's source at `rev2` |
74
+ | `old_test_lnum`, `new_test_lnum` | list&lt;string&gt; | Line ranges of the test method at each rev |
75
+ | `old_test_file_path` | list&lt;string&gt; | Where the test file lived at `rev1` |
76
+ | `old_production_code`, `new_production_code` | string | Source of the focal production method at each rev |
77
+ | `focal_file_path` | string | Path of the focal production file |
78
+ | `focal_method_sign` | string | JVM-style signature of the focal production method |
79
+ | `focal_all_deps_scored` | list&lt;struct&gt; | All candidate dependency methods, each with a relevance score (`nc`, `lcs_u`, `ed`, `class`, `tfidf` signal sub-scores combined into `score`) |
80
+ | `deps_changes` | list&lt;struct&gt; | Production-code dependencies that changed between `rev1` and `rev2` |
81
+
82
+ ## How to load
83
+
84
+ ```python
85
+ from datasets import load_dataset
86
+
87
+ ds = load_dataset("TestEvo-Bench/teb-update", split="train")
88
+ print(len(ds), ds.column_names)
89
+
90
+ # Iterate over individual test edits (the unit of evaluation)
91
+ for row in ds:
92
+ for tc in row["test_changes"]:
93
+ before = tc["old_test_code"]
94
+ after = tc["new_test_code"]
95
+ focal = tc["focal_method_sign"]
96
+ ...
97
+ ```
98
+
99
+ ## Source projects + attribution
100
+
101
+ The code snippets in `old_test_code`, `new_test_code`, `old_production_code`, and `new_production_code` are derived from public Java repositories on GitHub. Each row's `git_clone_url` and `git_diff_url` link back to the upstream project; the upstream repository's own license governs reuse of those code snippets. The dataset structure and metadata are released under CC-BY-4.0 — please cite the project (see below) when using this benchmark.
102
+
103
+ ## Intended uses
104
+
105
+ Evaluating LLMs and program-synthesis systems on the task of editing an existing test method to track a production-code change, given (a) the original test, (b) the production-code diff, and (c) candidate focal-method dependencies. The included `focal_all_deps_scored` signals support both retrieval-augmented and end-to-end setups.
106
+
107
+ ## Citation
108
+
109
+ ```
110
+ @misc{testevobench2026,
111
+ title = {TestEvo-Bench: a benchmark for test evolution in Java codebases},
112
+ author = {Anonymous},
113
+ year = {2026},
114
+ url = {https://www.testevo-bench.com/},
115
+ }
116
+ ```
117
+
118
+ ## License
119
+
120
+ - **Dataset structure and metadata:** CC-BY-4.0
121
+ - **Embedded code snippets:** governed by each upstream repository's own license. See `git_clone_url` per row.
Stratio_cassandra-lucene-index-3.11.3.0.json DELETED
The diff for this file is too large to render. See raw diff
 
aleksandr-m_gitflow-maven-plugin-v1.21.0.json DELETED
@@ -1,312 +0,0 @@
1
- [
2
- {
3
- "task_id": "aleksandr-m_gitflow-maven-plugin-v1.21.0__c0b13b5_d2dfaeb__GitFlowVersionInfoTest_b4115413",
4
- "project_name": "aleksandr-m_gitflow-maven-plugin-v1.21.0",
5
- "git_clone_url": "https://github.com/aleksandr-m/gitflow-maven-plugin.git",
6
- "rev1": "c0b13b5d71779c30994d585ac6b01f7c5fe2d6ec",
7
- "rev2": "d2dfaebb57d6ace09903ff8c7e9cd9c6af27100f",
8
- "rev1_date": "2022-01-07T21:00:40Z",
9
- "rev2_date": "2022-01-08T07:40:19Z",
10
- "git_diff_url": "https://github.com/aleksandr-m/gitflow-maven-plugin/compare/c0b13b5d71779c30994d585ac6b01f7c5fe2d6ec...d2dfaebb57d6ace09903ff8c7e9cd9c6af27100f",
11
- "test_file": "src/test/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfoTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "3_aleksandr-m_gitflow-maven-plugin-v1.21.0_c0b13b5_d2dfaeb_GitFlowVersionInfoTest",
15
- "test_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfoTest.testDigitsVersionInfo2:()V",
16
- "class": "GitFlowVersionInfoTest",
17
- "method": "testDigitsVersionInfo2",
18
- "module": "",
19
- "junit_selector": "com.amashchenko.maven.plugin.gitflow.GitFlowVersionInfoTest#testDigitsVersionInfo2",
20
- "old_test_code": "@Test\npublic void testDigitsVersionInfo2() throws Exception {\n GitFlowVersionInfo info = new GitFlowVersionInfo(\"0.9-RC3-feature-SNAPSHOT\", null);\n Assert.assertNotNull(info);\n info = info.digitsVersionInfo();\n Assert.assertNotNull(info);\n Assert.assertEquals(new GitFlowVersionInfo(\"0.9\", null), info);\n}",
21
- "new_test_code": "@Test\npublic void testDigitsVersionInfo2() throws Exception {\n GitFlowVersionInfo info = new GitFlowVersionInfo(\"0.9-RC3-feature-SNAPSHOT\");\n Assert.assertNotNull(info);\n info = info.digitsVersionInfo();\n Assert.assertNotNull(info);\n Assert.assertEquals(new GitFlowVersionInfo(\"0.9\"), info);\n}",
22
- "old_test_file_path": [
23
- "src/test/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfoTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "88-96"
27
- ],
28
- "new_test_lnum": [
29
- "87-95"
30
- ],
31
- "old_production_code": "public GitFlowVersionInfo digitsVersionInfo() throws VersionParseException {\n return new GitFlowVersionInfo(joinDigitString(getDigits()), versionPolicy);\n}",
32
- "new_production_code": "public GitFlowVersionInfo digitsVersionInfo() throws VersionParseException {\n return new GitFlowVersionInfo(joinDigitString(getDigits()));\n}",
33
- "focal_file_path": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
34
- "focal_method_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo",
39
- "file_path_old": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
40
- "line_nums_old": "49-51",
41
- "file_path_new": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
42
- "line_nums_new": "44-46",
43
- "dependency_updated": "updated",
44
- "score": null,
45
- "signal_scores": {}
46
- }
47
- ],
48
- "coverage_gold": 1.0,
49
- "branch_coverage_gold": 0.0,
50
- "method_coverage_gold": 1.1429,
51
- "line_coverage_gold": 0.2066,
52
- "is_traceback": false,
53
- "commit_gap": {
54
- "count": 0,
55
- "skipped_commits": []
56
- },
57
- "test_is_refactoring_only": false,
58
- "has_test_dep_change": false,
59
- "all_deps_new": [
60
- "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo"
61
- ],
62
- "all_deps_old": [
63
- "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo"
64
- ],
65
- "deps_changes": [
66
- {
67
- "method_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo",
68
- "change_type": "UPDATE",
69
- "file_path_old": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
70
- "file_path_new": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
71
- "source": "production",
72
- "is_test_dependency": false,
73
- "is_refactoring_only": false
74
- }
75
- ],
76
- "variant_result": {
77
- "old_on_old": "pass",
78
- "old_on_new": "error",
79
- "new_on_old": "error",
80
- "new_on_new": "pass"
81
- }
82
- },
83
- {
84
- "change_id": "4_aleksandr-m_gitflow-maven-plugin-v1.21.0_c0b13b5_d2dfaeb_GitFlowVersionInfoTest",
85
- "test_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfoTest.testDigitsVersionInfo:()V",
86
- "class": "GitFlowVersionInfoTest",
87
- "method": "testDigitsVersionInfo",
88
- "module": "",
89
- "junit_selector": "com.amashchenko.maven.plugin.gitflow.GitFlowVersionInfoTest#testDigitsVersionInfo",
90
- "old_test_code": "@Test\npublic void testDigitsVersionInfo() throws Exception {\n GitFlowVersionInfo info = new GitFlowVersionInfo(\"0.9\", null);\n Assert.assertNotNull(info);\n info = info.digitsVersionInfo();\n Assert.assertNotNull(info);\n Assert.assertEquals(new GitFlowVersionInfo(\"0.9\", null), info);\n}",
91
- "new_test_code": "@Test\npublic void testDigitsVersionInfo() throws Exception {\n GitFlowVersionInfo info = new GitFlowVersionInfo(\"0.9\");\n Assert.assertNotNull(info);\n info = info.digitsVersionInfo();\n Assert.assertNotNull(info);\n Assert.assertEquals(new GitFlowVersionInfo(\"0.9\"), info);\n}",
92
- "old_test_file_path": [
93
- "src/test/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfoTest.java"
94
- ],
95
- "old_test_lnum": [
96
- "79-86"
97
- ],
98
- "new_test_lnum": [
99
- "78-85"
100
- ],
101
- "old_production_code": "public GitFlowVersionInfo digitsVersionInfo() throws VersionParseException {\n return new GitFlowVersionInfo(joinDigitString(getDigits()), versionPolicy);\n}",
102
- "new_production_code": "public GitFlowVersionInfo digitsVersionInfo() throws VersionParseException {\n return new GitFlowVersionInfo(joinDigitString(getDigits()));\n}",
103
- "focal_file_path": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
104
- "focal_method_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo",
105
- "focal_all_deps_scored": [
106
- {
107
- "dep_id": 0,
108
- "method_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo",
109
- "file_path_old": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
110
- "line_nums_old": "49-51",
111
- "file_path_new": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
112
- "line_nums_new": "44-46",
113
- "dependency_updated": "updated",
114
- "score": null,
115
- "signal_scores": {}
116
- }
117
- ],
118
- "coverage_gold": 1.0,
119
- "branch_coverage_gold": 0.0,
120
- "method_coverage_gold": 1.1429,
121
- "line_coverage_gold": 0.2066,
122
- "is_traceback": false,
123
- "commit_gap": {
124
- "count": 0,
125
- "skipped_commits": []
126
- },
127
- "test_is_refactoring_only": false,
128
- "has_test_dep_change": false,
129
- "all_deps_new": [
130
- "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo"
131
- ],
132
- "all_deps_old": [
133
- "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo"
134
- ],
135
- "deps_changes": [
136
- {
137
- "method_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo",
138
- "change_type": "UPDATE",
139
- "file_path_old": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
140
- "file_path_new": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
141
- "source": "production",
142
- "is_test_dependency": false,
143
- "is_refactoring_only": false
144
- }
145
- ],
146
- "variant_result": {
147
- "old_on_old": "pass",
148
- "old_on_new": "error",
149
- "new_on_old": "error",
150
- "new_on_new": "pass"
151
- }
152
- }
153
- ],
154
- "version": "v1.21.0",
155
- "java_version": 8
156
- },
157
- {
158
- "task_id": "aleksandr-m_gitflow-maven-plugin-v1.21.0__d2dfaeb_7482fdb__GitFlowVersionInfoTest_b4115413",
159
- "project_name": "aleksandr-m_gitflow-maven-plugin-v1.21.0",
160
- "git_clone_url": "https://github.com/aleksandr-m/gitflow-maven-plugin.git",
161
- "rev1": "d2dfaebb57d6ace09903ff8c7e9cd9c6af27100f",
162
- "rev2": "7482fdb5b64c2210fb5eadb5f90fb30c9163e517",
163
- "rev1_date": "2022-01-08T07:40:19Z",
164
- "rev2_date": "2022-01-08T12:31:29Z",
165
- "git_diff_url": "https://github.com/aleksandr-m/gitflow-maven-plugin/compare/d2dfaebb57d6ace09903ff8c7e9cd9c6af27100f...7482fdb5b64c2210fb5eadb5f90fb30c9163e517",
166
- "test_file": "src/test/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfoTest.java",
167
- "test_changes": [
168
- {
169
- "change_id": "1_aleksandr-m_gitflow-maven-plugin-v1.21.0_d2dfaeb_7482fdb_GitFlowVersionInfoTest",
170
- "test_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfoTest.testDigitsVersionInfo2:()V",
171
- "class": "GitFlowVersionInfoTest",
172
- "method": "testDigitsVersionInfo2",
173
- "module": "",
174
- "junit_selector": "com.amashchenko.maven.plugin.gitflow.GitFlowVersionInfoTest#testDigitsVersionInfo2",
175
- "old_test_code": "@Test\npublic void testDigitsVersionInfo2() throws Exception {\n GitFlowVersionInfo info = new GitFlowVersionInfo(\"0.9-RC3-feature-SNAPSHOT\");\n Assert.assertNotNull(info);\n info = info.digitsVersionInfo();\n Assert.assertNotNull(info);\n Assert.assertEquals(new GitFlowVersionInfo(\"0.9\"), info);\n}",
176
- "new_test_code": "@Test\npublic void testDigitsVersionInfo2() throws Exception {\n GitFlowVersionInfo info = new GitFlowVersionInfo(\"0.9-RC3-feature-SNAPSHOT\", null);\n Assert.assertNotNull(info);\n info = info.digitsVersionInfo();\n Assert.assertNotNull(info);\n Assert.assertEquals(new GitFlowVersionInfo(\"0.9\", null), info);\n}",
177
- "old_test_file_path": [
178
- "src/test/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfoTest.java"
179
- ],
180
- "old_test_lnum": [
181
- "87-95"
182
- ],
183
- "new_test_lnum": [
184
- "88-96"
185
- ],
186
- "old_production_code": "public GitFlowVersionInfo digitsVersionInfo() throws VersionParseException {\n return new GitFlowVersionInfo(joinDigitString(getDigits()));\n}",
187
- "new_production_code": "public GitFlowVersionInfo digitsVersionInfo() throws VersionParseException {\n return new GitFlowVersionInfo(joinDigitString(getDigits()), versionPolicy);\n}",
188
- "focal_file_path": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
189
- "focal_method_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo",
190
- "focal_all_deps_scored": [
191
- {
192
- "dep_id": 0,
193
- "method_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo",
194
- "file_path_old": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
195
- "line_nums_old": "44-46",
196
- "file_path_new": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
197
- "line_nums_new": "49-51",
198
- "dependency_updated": "updated",
199
- "score": null,
200
- "signal_scores": {}
201
- }
202
- ],
203
- "coverage_gold": 1.0,
204
- "branch_coverage_gold": 0.0,
205
- "method_coverage_gold": 1.1299,
206
- "line_coverage_gold": 0.271,
207
- "is_traceback": false,
208
- "commit_gap": {
209
- "count": 0,
210
- "skipped_commits": []
211
- },
212
- "test_is_refactoring_only": false,
213
- "has_test_dep_change": false,
214
- "all_deps_new": [
215
- "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo"
216
- ],
217
- "all_deps_old": [
218
- "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo"
219
- ],
220
- "deps_changes": [
221
- {
222
- "method_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo",
223
- "change_type": "UPDATE",
224
- "file_path_old": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
225
- "file_path_new": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
226
- "source": "production",
227
- "is_test_dependency": false,
228
- "is_refactoring_only": false
229
- }
230
- ],
231
- "variant_result": {
232
- "old_on_old": "pass",
233
- "old_on_new": "error",
234
- "new_on_old": "error",
235
- "new_on_new": "pass"
236
- }
237
- },
238
- {
239
- "change_id": "2_aleksandr-m_gitflow-maven-plugin-v1.21.0_d2dfaeb_7482fdb_GitFlowVersionInfoTest",
240
- "test_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfoTest.testDigitsVersionInfo:()V",
241
- "class": "GitFlowVersionInfoTest",
242
- "method": "testDigitsVersionInfo",
243
- "module": "",
244
- "junit_selector": "com.amashchenko.maven.plugin.gitflow.GitFlowVersionInfoTest#testDigitsVersionInfo",
245
- "old_test_code": "@Test\npublic void testDigitsVersionInfo() throws Exception {\n GitFlowVersionInfo info = new GitFlowVersionInfo(\"0.9\");\n Assert.assertNotNull(info);\n info = info.digitsVersionInfo();\n Assert.assertNotNull(info);\n Assert.assertEquals(new GitFlowVersionInfo(\"0.9\"), info);\n}",
246
- "new_test_code": "@Test\npublic void testDigitsVersionInfo() throws Exception {\n GitFlowVersionInfo info = new GitFlowVersionInfo(\"0.9\", null);\n Assert.assertNotNull(info);\n info = info.digitsVersionInfo();\n Assert.assertNotNull(info);\n Assert.assertEquals(new GitFlowVersionInfo(\"0.9\", null), info);\n}",
247
- "old_test_file_path": [
248
- "src/test/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfoTest.java"
249
- ],
250
- "old_test_lnum": [
251
- "78-85"
252
- ],
253
- "new_test_lnum": [
254
- "79-86"
255
- ],
256
- "old_production_code": "public GitFlowVersionInfo digitsVersionInfo() throws VersionParseException {\n return new GitFlowVersionInfo(joinDigitString(getDigits()));\n}",
257
- "new_production_code": "public GitFlowVersionInfo digitsVersionInfo() throws VersionParseException {\n return new GitFlowVersionInfo(joinDigitString(getDigits()), versionPolicy);\n}",
258
- "focal_file_path": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
259
- "focal_method_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo",
260
- "focal_all_deps_scored": [
261
- {
262
- "dep_id": 0,
263
- "method_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo",
264
- "file_path_old": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
265
- "line_nums_old": "44-46",
266
- "file_path_new": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
267
- "line_nums_new": "49-51",
268
- "dependency_updated": "updated",
269
- "score": null,
270
- "signal_scores": {}
271
- }
272
- ],
273
- "coverage_gold": 1.0,
274
- "branch_coverage_gold": 0.0,
275
- "method_coverage_gold": 1.1299,
276
- "line_coverage_gold": 0.271,
277
- "is_traceback": false,
278
- "commit_gap": {
279
- "count": 0,
280
- "skipped_commits": []
281
- },
282
- "test_is_refactoring_only": false,
283
- "has_test_dep_change": false,
284
- "all_deps_new": [
285
- "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo"
286
- ],
287
- "all_deps_old": [
288
- "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo"
289
- ],
290
- "deps_changes": [
291
- {
292
- "method_sign": "com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.digitsVersionInfo:()Lcom/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo",
293
- "change_type": "UPDATE",
294
- "file_path_old": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
295
- "file_path_new": "src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java",
296
- "source": "production",
297
- "is_test_dependency": false,
298
- "is_refactoring_only": false
299
- }
300
- ],
301
- "variant_result": {
302
- "old_on_old": "pass",
303
- "old_on_new": "error",
304
- "new_on_old": "error",
305
- "new_on_new": "pass"
306
- }
307
- }
308
- ],
309
- "version": "v1.21.0",
310
- "java_version": 8
311
- }
312
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
anthonyraymond_joal-2.1.37.json DELETED
The diff for this file is too large to render. See raw diff
 
apache_incubator-baremaps-v0.8.2.json DELETED
@@ -1,119 +0,0 @@
1
- [
2
- {
3
- "task_id": "apache_incubator-baremaps-v0.8.2__b06833d_533480f__TileBatcherTest_0dc546dc",
4
- "project_name": "apache_incubator-baremaps-v0.8.2",
5
- "git_clone_url": "https://github.com/apache/incubator-baremaps.git",
6
- "rev1": "b06833d27c992ed8d78bb2f13387fcebf2e7332b",
7
- "rev2": "533480f89ce03fd77e36c3b2c6be5682b535d28b",
8
- "rev1_date": "2023-05-07T11:24:27Z",
9
- "rev2_date": "2023-05-07T12:48:39Z",
10
- "git_diff_url": "https://github.com/apache/incubator-baremaps/compare/b06833d27c992ed8d78bb2f13387fcebf2e7332b...533480f89ce03fd77e36c3b2c6be5682b535d28b",
11
- "test_file": "baremaps-core/src/test/java/org/apache/baremaps/database/tile/TileBatcherTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "4_apache_incubator-baremaps-v0.8.2_b06833d_533480f_TileBatcherTest",
15
- "test_sign": "org/apache/baremaps/database/tile/TileBatcherTest.testFiltering:()V",
16
- "class": "TileBatcherTest",
17
- "method": "testFiltering",
18
- "module": "baremaps-core",
19
- "junit_selector": "org.apache.baremaps.database.tile.TileBatcherTest#testFiltering",
20
- "old_test_code": "@Test\nvoid testFiltering() {\n final int streamSize = 85;\n final List<Tile> tiles = new ArrayList<>();\n for (int z = 0; z <= 3; z++) {\n for (int x = 0; x < IntMath.pow(2, z); x++) {\n for (int y = 0; y < IntMath.pow(2, z); y++) {\n tiles.add(new Tile(x, y, z));\n }\n }\n }\n assertEquals(streamSize, tiles.size());\n final int batchArraySize = 5;\n for (int batchArrayIndex = 0; batchArrayIndex < batchArraySize; batchArrayIndex++) {\n List<Tile> batch = tiles.stream().filter(new TileBatchPredicate(batchArraySize, batchArrayIndex)).sorted(Comparator.comparingLong(Tile::index)).toList();\n assertEquals(streamSize / batchArraySize, batch.size());\n int tileIndex = batchArrayIndex;\n for (Tile tile : batch) {\n assertEquals(tileIndex, tile.index());\n tileIndex += batchArraySize;\n }\n }\n}",
21
- "new_test_code": "@Test\nvoid testFiltering() {\n final int streamSize = 85;\n final List<TileCoord> tileCoords = new ArrayList<>();\n for (int z = 0; z <= 3; z++) {\n for (int x = 0; x < IntMath.pow(2, z); x++) {\n for (int y = 0; y < IntMath.pow(2, z); y++) {\n tileCoords.add(new TileCoord(x, y, z));\n }\n }\n }\n assertEquals(streamSize, tileCoords.size());\n final int batchArraySize = 5;\n for (int batchArrayIndex = 0; batchArrayIndex < batchArraySize; batchArrayIndex++) {\n List<TileCoord> batch = tileCoords.stream().filter(new TileBatchPredicate(batchArraySize, batchArrayIndex)).sorted(Comparator.comparingLong(TileCoord::index)).toList();\n assertEquals(streamSize / batchArraySize, batch.size());\n int tileIndex = batchArrayIndex;\n for (TileCoord tileCoord : batch) {\n assertEquals(tileIndex, tileCoord.index());\n tileIndex += batchArraySize;\n }\n }\n}",
22
- "old_test_file_path": [
23
- "baremaps-core/src/test/java/org/apache/baremaps/database/tile/TileBatcherTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "25-52"
27
- ],
28
- "new_test_lnum": [
29
- "25-52"
30
- ],
31
- "old_production_code": "",
32
- "new_production_code": "public long index() {\n long x = this.x;\n long y = this.y;\n long offset = offsets[z];\n long position = x + y * sides[z];\n return offset + position;\n}",
33
- "focal_file_path": "baremaps-core/src/main/java/org/apache/baremaps/database/tile/TileCoord.java",
34
- "focal_method_sign": "org/apache/baremaps/database/tile/TileCoord.index:()J",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "org/apache/baremaps/database/tile/TileCoord.index:()J",
39
- "file_path_old": null,
40
- "line_nums_old": null,
41
- "file_path_new": "baremaps-core/src/main/java/org/apache/baremaps/database/tile/TileCoord.java",
42
- "line_nums_new": "144-150",
43
- "dependency_updated": "inserted",
44
- "score": 0.1166,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 0.4,
48
- "ed": 0.2222,
49
- "class": 0.0,
50
- "tfidf": 0.0402
51
- }
52
- },
53
- {
54
- "dep_id": 1,
55
- "method_sign": "org/apache/baremaps/database/tile/Tile.index:()J",
56
- "file_path_old": "baremaps-core/src/main/java/org/apache/baremaps/database/tile/Tile.java",
57
- "line_nums_old": "144-150",
58
- "file_path_new": null,
59
- "line_nums_new": null,
60
- "dependency_updated": "deleted",
61
- "score": 0.1166,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 0.4,
65
- "ed": 0.2222,
66
- "class": 0.0,
67
- "tfidf": 0.0402
68
- }
69
- }
70
- ],
71
- "coverage_gold": 1.0,
72
- "branch_coverage_gold": 0.0544,
73
- "method_coverage_gold": 0.2419,
74
- "line_coverage_gold": 0.1324,
75
- "is_traceback": false,
76
- "commit_gap": {
77
- "count": 0,
78
- "skipped_commits": []
79
- },
80
- "test_is_refactoring_only": false,
81
- "has_test_dep_change": false,
82
- "all_deps_new": [
83
- "org/apache/baremaps/database/tile/TileCoord.index:()J"
84
- ],
85
- "all_deps_old": [
86
- "org/apache/baremaps/database/tile/Tile.index:()J"
87
- ],
88
- "deps_changes": [
89
- {
90
- "method_sign": "org/apache/baremaps/database/tile/TileCoord.index:()J",
91
- "change_type": "ADD",
92
- "file_path_old": null,
93
- "file_path_new": "baremaps-core/src/main/java/org/apache/baremaps/database/tile/TileCoord.java",
94
- "source": "production",
95
- "is_test_dependency": false,
96
- "is_refactoring_only": false
97
- },
98
- {
99
- "method_sign": "org/apache/baremaps/database/tile/Tile.index:()J",
100
- "change_type": "DELETE",
101
- "file_path_old": "baremaps-core/src/main/java/org/apache/baremaps/database/tile/Tile.java",
102
- "file_path_new": null,
103
- "source": "production",
104
- "is_test_dependency": false,
105
- "is_refactoring_only": false
106
- }
107
- ],
108
- "variant_result": {
109
- "old_on_old": "pass",
110
- "old_on_new": "error",
111
- "new_on_old": "error",
112
- "new_on_new": "pass"
113
- }
114
- }
115
- ],
116
- "version": "v0.8.2",
117
- "java_version": 17
118
- }
119
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
apilayer_restcountries-2.0.5.json DELETED
@@ -1,879 +0,0 @@
1
- [
2
- {
3
- "task_id": "apilayer_restcountries-2.0.5__67233cb_c3a8e50__CountryServiceTest_27e2560c",
4
- "project_name": "apilayer_restcountries-2.0.5",
5
- "git_clone_url": "https://github.com/apilayer/restcountries.git",
6
- "rev1": "67233cbcb083923b95ea8534f553491b67e0c986",
7
- "rev2": "c3a8e501f7f66b86ee86c7518e3f69110634f4fd",
8
- "rev1_date": "2016-08-24T08:28:14Z",
9
- "rev2_date": "2016-08-24T08:55:19Z",
10
- "git_diff_url": "https://github.com/apilayer/restcountries/compare/67233cbcb083923b95ea8534f553491b67e0c986...c3a8e501f7f66b86ee86c7518e3f69110634f4fd",
11
- "test_file": "src/test/java/fayder/restcountries/v1/CountryServiceTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "1_apilayer_restcountries-2.0.5_67233cb_c3a8e50_CountryServiceTest",
15
- "test_sign": "fayder/restcountries/v1/CountryServiceTest.getByCurrency:()V",
16
- "class": "CountryServiceTest",
17
- "method": "getByCurrency",
18
- "module": "",
19
- "junit_selector": "fayder.restcountries.v1.CountryServiceTest#getByCurrency",
20
- "old_test_code": "@Test\npublic void getByCurrency() throws Exception {\n List<Country> countries = CountryService.getInstance().getByCurrency(\"EUR\");\n Assert.assertNotNull(countries);\n Assert.assertFalse(countries.isEmpty());\n for (Country country : countries) {\n Assert.assertTrue(country.getCurrency().contains(\"EUR\"));\n }\n}",
21
- "new_test_code": "@Test\npublic void getByCurrency() throws Exception {\n List<Country> countries = CountryService.getInstance().getByCurrency(\"EUR\");\n Assert.assertNotNull(countries);\n Assert.assertFalse(countries.isEmpty());\n for (Country country : countries) {\n Assert.assertTrue(country.getCurrencies().contains(\"EUR\"));\n }\n}",
22
- "old_test_file_path": [
23
- "src/test/java/fayder/restcountries/v1/CountryServiceTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "62-70"
27
- ],
28
- "new_test_lnum": [
29
- "62-70"
30
- ],
31
- "old_production_code": "public List<Country> getByCurrency(String currency) {\n List<Country> result = new ArrayList<Country>();\n for (Country country : countries) {\n for (String curr : country.getCurrency()) {\n if (curr.toLowerCase().equals(currency.toLowerCase())) {\n result.add(country);\n }\n }\n }\n return result;\n}",
32
- "new_production_code": "public List<Country> getByCurrency(String currency) {\n List<Country> result = new ArrayList<Country>();\n for (Country country : countries) {\n for (String curr : country.getCurrencies()) {\n if (curr.toLowerCase().equals(currency.toLowerCase())) {\n result.add(country);\n }\n }\n }\n return result;\n}",
33
- "focal_file_path": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
34
- "focal_method_sign": "fayder/restcountries/v1/rest/CountryService.getByCurrency:(Ljava/lang/String;)Ljava/util/List",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 1,
38
- "method_sign": "fayder/restcountries/v1/rest/CountryService.getByCurrency:(Ljava/lang/String;)Ljava/util/List",
39
- "file_path_old": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
40
- "line_nums_old": "73-83",
41
- "file_path_new": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
42
- "line_nums_new": "73-83",
43
- "dependency_updated": "updated",
44
- "score": 0.814,
45
- "signal_scores": {
46
- "nc": 1.0,
47
- "lcs_u": 1.0,
48
- "ed": 1.0,
49
- "class": 1.0,
50
- "tfidf": 0.2095
51
- }
52
- },
53
- {
54
- "dep_id": 0,
55
- "method_sign": "fayder/restcountries/v1/domain/Country.getCurrency:()Ljava/util/List",
56
- "file_path_old": "src/main/java/fayder/restcountries/v1/domain/Country.java",
57
- "line_nums_old": "212-214",
58
- "file_path_new": null,
59
- "line_nums_new": null,
60
- "dependency_updated": "deleted",
61
- "score": 0.3296,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 1.0,
65
- "ed": 0.8462,
66
- "class": 0.0,
67
- "tfidf": 0.0583
68
- }
69
- },
70
- {
71
- "dep_id": 2,
72
- "method_sign": "fayder/restcountries/v1/domain/Country.getCurrencies:()Ljava/util/List",
73
- "file_path_old": null,
74
- "line_nums_old": null,
75
- "file_path_new": "src/main/java/fayder/restcountries/v1/domain/Country.java",
76
- "line_nums_new": "206-208",
77
- "dependency_updated": "inserted",
78
- "score": 0.2508,
79
- "signal_scores": {
80
- "nc": 0.0,
81
- "lcs_u": 0.7692,
82
- "ed": 0.6154,
83
- "class": 0.0,
84
- "tfidf": 0.0583
85
- }
86
- }
87
- ],
88
- "coverage_gold": 1.0,
89
- "branch_coverage_gold": 4.1237,
90
- "method_coverage_gold": 4.7619,
91
- "line_coverage_gold": 5.3356,
92
- "is_traceback": false,
93
- "commit_gap": {
94
- "count": 1,
95
- "skipped_commits": [
96
- "daeab38ee2ab23999dd952b0f3db23dcd1ceb267"
97
- ]
98
- },
99
- "test_is_refactoring_only": false,
100
- "has_test_dep_change": false,
101
- "all_deps_new": [
102
- "fayder/restcountries/v1/rest/CountryService.getInstance:()Lfayder/restcountries/v1/rest/CountryService",
103
- "fayder/restcountries/v1/domain/Country.getCurrencies:()Ljava/util/List",
104
- "fayder/restcountries/v1/rest/CountryService.getByCurrency:(Ljava/lang/String;)Ljava/util/List"
105
- ],
106
- "all_deps_old": [
107
- "fayder/restcountries/v1/rest/CountryService.getByCurrency:(Ljava/lang/String;)Ljava/util/List",
108
- "fayder/restcountries/v1/rest/CountryService.getInstance:()Lfayder/restcountries/v1/rest/CountryService",
109
- "fayder/restcountries/v1/domain/Country.getCurrency:()Ljava/util/List"
110
- ],
111
- "deps_changes": [
112
- {
113
- "method_sign": "fayder/restcountries/v1/domain/Country.getCurrency:()Ljava/util/List",
114
- "change_type": "DELETE",
115
- "file_path_old": "src/main/java/fayder/restcountries/v1/domain/Country.java",
116
- "file_path_new": null,
117
- "source": "production",
118
- "is_test_dependency": false,
119
- "is_refactoring_only": false
120
- },
121
- {
122
- "method_sign": "fayder/restcountries/v1/rest/CountryService.getByCurrency:(Ljava/lang/String;)Ljava/util/List",
123
- "change_type": "UPDATE",
124
- "file_path_old": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
125
- "file_path_new": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
126
- "source": "production",
127
- "is_test_dependency": false,
128
- "is_refactoring_only": false
129
- },
130
- {
131
- "method_sign": "fayder/restcountries/v1/domain/Country.getCurrencies:()Ljava/util/List",
132
- "change_type": "ADD",
133
- "file_path_old": null,
134
- "file_path_new": "src/main/java/fayder/restcountries/v1/domain/Country.java",
135
- "source": "production",
136
- "is_test_dependency": false,
137
- "is_refactoring_only": false
138
- }
139
- ],
140
- "variant_result": {
141
- "old_on_old": "pass",
142
- "old_on_new": "error",
143
- "new_on_old": "error",
144
- "new_on_new": "pass"
145
- }
146
- },
147
- {
148
- "change_id": "2_apilayer_restcountries-2.0.5_67233cb_c3a8e50_CountryServiceTest",
149
- "test_sign": "fayder/restcountries/v1/CountryServiceTest.getByLanguageCode:()V",
150
- "class": "CountryServiceTest",
151
- "method": "getByLanguageCode",
152
- "module": "",
153
- "junit_selector": "fayder.restcountries.v1.CountryServiceTest#getByLanguageCode",
154
- "old_test_code": "@Test\npublic void getByLanguageCode() throws Exception {\n List<Country> countries = CountryService.getInstance().getByLanguage(\"en\");\n Assert.assertNotNull(countries);\n Assert.assertFalse(countries.isEmpty());\n for (Country country : countries) {\n Assert.assertTrue(country.getLanguageCodes().contains(\"en\"));\n }\n}",
155
- "new_test_code": "@Test\npublic void getByLanguageCode() throws Exception {\n List<Country> countries = CountryService.getInstance().getByLanguage(\"en\");\n Assert.assertNotNull(countries);\n Assert.assertFalse(countries.isEmpty());\n for (Country country : countries) {\n Assert.assertTrue(country.getLanguages().contains(\"en\"));\n }\n}",
156
- "old_test_file_path": [
157
- "src/test/java/fayder/restcountries/v1/CountryServiceTest.java"
158
- ],
159
- "old_test_lnum": [
160
- "155-163"
161
- ],
162
- "new_test_lnum": [
163
- "155-163"
164
- ],
165
- "old_production_code": "public List<Country> getByLanguage(String language) {\n List<Country> result = new ArrayList<Country>();\n for (Country country : countries) {\n for (String lang : country.getLanguageCodes()) {\n if (lang.toLowerCase().equals(language.toLowerCase())) {\n result.add(country);\n }\n }\n }\n return result;\n}",
166
- "new_production_code": "public List<Country> getByLanguage(String language) {\n List<Country> result = new ArrayList<Country>();\n for (Country country : countries) {\n for (String lang : country.getLanguages()) {\n if (lang.toLowerCase().equals(language.toLowerCase())) {\n result.add(country);\n }\n }\n }\n return result;\n}",
167
- "focal_file_path": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
168
- "focal_method_sign": "fayder/restcountries/v1/rest/CountryService.getByLanguage:(Ljava/lang/String;)Ljava/util/List",
169
- "focal_all_deps_scored": [
170
- {
171
- "dep_id": 1,
172
- "method_sign": "fayder/restcountries/v1/rest/CountryService.getByLanguage:(Ljava/lang/String;)Ljava/util/List",
173
- "file_path_old": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
174
- "line_nums_old": "173-183",
175
- "file_path_new": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
176
- "line_nums_new": "173-183",
177
- "dependency_updated": "updated",
178
- "score": 0.54,
179
- "signal_scores": {
180
- "nc": 0.0,
181
- "lcs_u": 1.0,
182
- "ed": 0.7647,
183
- "class": 1.0,
184
- "tfidf": 0.2095
185
- }
186
- },
187
- {
188
- "dep_id": 2,
189
- "method_sign": "fayder/restcountries/v1/domain/Country.getLanguageCodes:()Ljava/util/List",
190
- "file_path_old": "src/main/java/fayder/restcountries/v1/domain/Country.java",
191
- "line_nums_old": "140-142",
192
- "file_path_new": null,
193
- "line_nums_new": null,
194
- "dependency_updated": "deleted",
195
- "score": 0.3148,
196
- "signal_scores": {
197
- "nc": 0.0,
198
- "lcs_u": 0.9375,
199
- "ed": 0.8235,
200
- "class": 0.0,
201
- "tfidf": 0.0583
202
- }
203
- },
204
- {
205
- "dep_id": 0,
206
- "method_sign": "fayder/restcountries/v1/domain/Country.getLanguages:()Ljava/util/List",
207
- "file_path_old": null,
208
- "line_nums_old": null,
209
- "file_path_new": "src/main/java/fayder/restcountries/v1/domain/Country.java",
210
- "line_nums_new": "134-136",
211
- "dependency_updated": "inserted",
212
- "score": 0.2821,
213
- "signal_scores": {
214
- "nc": 0.0,
215
- "lcs_u": 0.9167,
216
- "ed": 0.6471,
217
- "class": 0.0,
218
- "tfidf": 0.0583
219
- }
220
- }
221
- ],
222
- "coverage_gold": 1.0,
223
- "branch_coverage_gold": 4.1237,
224
- "method_coverage_gold": 4.7619,
225
- "line_coverage_gold": 5.3356,
226
- "is_traceback": false,
227
- "commit_gap": {
228
- "count": 1,
229
- "skipped_commits": [
230
- "daeab38ee2ab23999dd952b0f3db23dcd1ceb267"
231
- ]
232
- },
233
- "test_is_refactoring_only": false,
234
- "has_test_dep_change": false,
235
- "all_deps_new": [
236
- "fayder/restcountries/v1/rest/CountryService.getInstance:()Lfayder/restcountries/v1/rest/CountryService",
237
- "fayder/restcountries/v1/rest/CountryService.getByLanguage:(Ljava/lang/String;)Ljava/util/List",
238
- "fayder/restcountries/v1/domain/Country.getLanguages:()Ljava/util/List"
239
- ],
240
- "all_deps_old": [
241
- "fayder/restcountries/v1/rest/CountryService.getInstance:()Lfayder/restcountries/v1/rest/CountryService",
242
- "fayder/restcountries/v1/domain/Country.getLanguageCodes:()Ljava/util/List",
243
- "fayder/restcountries/v1/rest/CountryService.getByLanguage:(Ljava/lang/String;)Ljava/util/List"
244
- ],
245
- "deps_changes": [
246
- {
247
- "method_sign": "fayder/restcountries/v1/domain/Country.getLanguages:()Ljava/util/List",
248
- "change_type": "ADD",
249
- "file_path_old": null,
250
- "file_path_new": "src/main/java/fayder/restcountries/v1/domain/Country.java",
251
- "source": "production",
252
- "is_test_dependency": false,
253
- "is_refactoring_only": false
254
- },
255
- {
256
- "method_sign": "fayder/restcountries/v1/rest/CountryService.getByLanguage:(Ljava/lang/String;)Ljava/util/List",
257
- "change_type": "UPDATE",
258
- "file_path_old": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
259
- "file_path_new": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
260
- "source": "production",
261
- "is_test_dependency": false,
262
- "is_refactoring_only": false
263
- },
264
- {
265
- "method_sign": "fayder/restcountries/v1/domain/Country.getLanguageCodes:()Ljava/util/List",
266
- "change_type": "DELETE",
267
- "file_path_old": "src/main/java/fayder/restcountries/v1/domain/Country.java",
268
- "file_path_new": null,
269
- "source": "production",
270
- "is_test_dependency": false,
271
- "is_refactoring_only": false
272
- }
273
- ],
274
- "variant_result": {
275
- "old_on_old": "pass",
276
- "old_on_new": "error",
277
- "new_on_old": "error",
278
- "new_on_new": "pass"
279
- }
280
- },
281
- {
282
- "change_id": "3_apilayer_restcountries-2.0.5_67233cb_c3a8e50_CountryServiceTest",
283
- "test_sign": "fayder/restcountries/v1/CountryServiceTest.getByCapital:()V",
284
- "class": "CountryServiceTest",
285
- "method": "getByCapital",
286
- "module": "",
287
- "junit_selector": "fayder.restcountries.v1.CountryServiceTest#getByCapital",
288
- "old_test_code": "@Test\npublic void getByCapital() throws Exception {\n List<Country> countries = CountryService.getInstance().getByCapital(\"Tallinn\");\n Assert.assertNotNull(countries);\n Assert.assertFalse(countries.isEmpty());\n Assert.assertEquals(1, countries.size());\n Assert.assertEquals(\"EE\", countries.get(0).getCca2());\n Assert.assertEquals(\"Eesti\", countries.get(0).getNativeName());\n}",
289
- "new_test_code": "@Test\npublic void getByCapital() throws Exception {\n List<Country> countries = CountryService.getInstance().getByCapital(\"Tallinn\");\n Assert.assertNotNull(countries);\n Assert.assertFalse(countries.isEmpty());\n Assert.assertEquals(1, countries.size());\n Assert.assertEquals(\"EE\", countries.get(0).getAlpha2Code());\n Assert.assertEquals(\"Eesti\", countries.get(0).getNativeName());\n}",
290
- "old_test_file_path": [
291
- "src/test/java/fayder/restcountries/v1/CountryServiceTest.java"
292
- ],
293
- "old_test_lnum": [
294
- "125-133"
295
- ],
296
- "new_test_lnum": [
297
- "125-133"
298
- ],
299
- "old_production_code": "public String getCca2() {\n return cca2;\n}",
300
- "new_production_code": "",
301
- "focal_file_path": "src/main/java/fayder/restcountries/v1/domain/Country.java",
302
- "focal_method_sign": "fayder/restcountries/v1/domain/Country.getCca2:()Ljava/lang/String",
303
- "focal_all_deps_scored": [
304
- {
305
- "dep_id": 0,
306
- "method_sign": "fayder/restcountries/v1/domain/Country.getCca2:()Ljava/lang/String",
307
- "file_path_old": "src/main/java/fayder/restcountries/v1/domain/Country.java",
308
- "line_nums_old": "76-78",
309
- "file_path_new": null,
310
- "line_nums_new": null,
311
- "dependency_updated": "deleted",
312
- "score": 0.2109,
313
- "signal_scores": {
314
- "nc": 0.0,
315
- "lcs_u": 0.7143,
316
- "ed": 0.4167,
317
- "class": 0.0,
318
- "tfidf": 0.069
319
- }
320
- },
321
- {
322
- "dep_id": 1,
323
- "method_sign": "fayder/restcountries/v1/domain/Country.getAlpha2Code:()Ljava/lang/String",
324
- "file_path_old": null,
325
- "line_nums_old": null,
326
- "file_path_new": "src/main/java/fayder/restcountries/v1/domain/Country.java",
327
- "line_nums_new": "70-72",
328
- "dependency_updated": "inserted",
329
- "score": 0.1484,
330
- "signal_scores": {
331
- "nc": 0.0,
332
- "lcs_u": 0.4615,
333
- "ed": 0.3077,
334
- "class": 0.0,
335
- "tfidf": 0.069
336
- }
337
- }
338
- ],
339
- "coverage_gold": 1.0,
340
- "branch_coverage_gold": 3.0928,
341
- "method_coverage_gold": 6.3492,
342
- "line_coverage_gold": 5.6799,
343
- "is_traceback": false,
344
- "commit_gap": {
345
- "count": 1,
346
- "skipped_commits": [
347
- "daeab38ee2ab23999dd952b0f3db23dcd1ceb267"
348
- ]
349
- },
350
- "test_is_refactoring_only": false,
351
- "has_test_dep_change": false,
352
- "all_deps_new": [
353
- "fayder/restcountries/v1/rest/CountryService.getInstance:()Lfayder/restcountries/v1/rest/CountryService",
354
- "fayder/restcountries/v1/rest/CountryService.getByCapital:(Ljava/lang/String;)Ljava/util/List",
355
- "fayder/restcountries/v1/domain/Country.getAlpha2Code:()Ljava/lang/String",
356
- "fayder/restcountries/v1/domain/Country.getNativeName:()Ljava/lang/String"
357
- ],
358
- "all_deps_old": [
359
- "fayder/restcountries/v1/domain/Country.getNativeName:()Ljava/lang/String",
360
- "fayder/restcountries/v1/rest/CountryService.getInstance:()Lfayder/restcountries/v1/rest/CountryService",
361
- "fayder/restcountries/v1/domain/Country.getCca2:()Ljava/lang/String",
362
- "fayder/restcountries/v1/rest/CountryService.getByCapital:(Ljava/lang/String;)Ljava/util/List"
363
- ],
364
- "deps_changes": [
365
- {
366
- "method_sign": "fayder/restcountries/v1/domain/Country.getCca2:()Ljava/lang/String",
367
- "change_type": "DELETE",
368
- "file_path_old": "src/main/java/fayder/restcountries/v1/domain/Country.java",
369
- "file_path_new": null,
370
- "source": "production",
371
- "is_test_dependency": false,
372
- "is_refactoring_only": false
373
- },
374
- {
375
- "method_sign": "fayder/restcountries/v1/domain/Country.getAlpha2Code:()Ljava/lang/String",
376
- "change_type": "ADD",
377
- "file_path_old": null,
378
- "file_path_new": "src/main/java/fayder/restcountries/v1/domain/Country.java",
379
- "source": "production",
380
- "is_test_dependency": false,
381
- "is_refactoring_only": false
382
- }
383
- ],
384
- "variant_result": {
385
- "old_on_old": "pass",
386
- "old_on_new": "error",
387
- "new_on_old": "error",
388
- "new_on_new": "pass"
389
- }
390
- },
391
- {
392
- "change_id": "4_apilayer_restcountries-2.0.5_67233cb_c3a8e50_CountryServiceTest",
393
- "test_sign": "fayder/restcountries/v1/CountryServiceTest.getByCallingCode:()V",
394
- "class": "CountryServiceTest",
395
- "method": "getByCallingCode",
396
- "module": "",
397
- "junit_selector": "fayder.restcountries.v1.CountryServiceTest#getByCallingCode",
398
- "old_test_code": "@Test\npublic void getByCallingCode() throws Exception {\n List<Country> countries = CountryService.getInstance().getByCallingcode(\"57\");\n Assert.assertNotNull(countries);\n Assert.assertFalse(countries.isEmpty());\n Assert.assertEquals(1, countries.size());\n Assert.assertEquals(\"CO\", countries.get(0).getCca2());\n}",
399
- "new_test_code": "@Test\npublic void getByCallingCode() throws Exception {\n List<Country> countries = CountryService.getInstance().getByCallingcode(\"57\");\n Assert.assertNotNull(countries);\n Assert.assertFalse(countries.isEmpty());\n Assert.assertEquals(1, countries.size());\n Assert.assertEquals(\"CO\", countries.get(0).getAlpha2Code());\n}",
400
- "old_test_file_path": [
401
- "src/test/java/fayder/restcountries/v1/CountryServiceTest.java"
402
- ],
403
- "old_test_lnum": [
404
- "116-123"
405
- ],
406
- "new_test_lnum": [
407
- "116-123"
408
- ],
409
- "old_production_code": "",
410
- "new_production_code": "public String getAlpha2Code() {\n return alpha2Code;\n}",
411
- "focal_file_path": "src/main/java/fayder/restcountries/v1/domain/Country.java",
412
- "focal_method_sign": "fayder/restcountries/v1/domain/Country.getAlpha2Code:()Ljava/lang/String",
413
- "focal_all_deps_scored": [
414
- {
415
- "dep_id": 0,
416
- "method_sign": "fayder/restcountries/v1/domain/Country.getAlpha2Code:()Ljava/lang/String",
417
- "file_path_old": null,
418
- "line_nums_old": null,
419
- "file_path_new": "src/main/java/fayder/restcountries/v1/domain/Country.java",
420
- "line_nums_new": "70-72",
421
- "dependency_updated": "inserted",
422
- "score": 0.2311,
423
- "signal_scores": {
424
- "nc": 0.0,
425
- "lcs_u": 0.6923,
426
- "ed": 0.5625,
427
- "class": 0.0,
428
- "tfidf": 0.069
429
- }
430
- },
431
- {
432
- "dep_id": 1,
433
- "method_sign": "fayder/restcountries/v1/domain/Country.getCca2:()Ljava/lang/String",
434
- "file_path_old": "src/main/java/fayder/restcountries/v1/domain/Country.java",
435
- "line_nums_old": "76-78",
436
- "file_path_new": null,
437
- "line_nums_new": null,
438
- "dependency_updated": "deleted",
439
- "score": 0.1938,
440
- "signal_scores": {
441
- "nc": 0.0,
442
- "lcs_u": 0.7143,
443
- "ed": 0.3125,
444
- "class": 0.0,
445
- "tfidf": 0.069
446
- }
447
- }
448
- ],
449
- "coverage_gold": 1.0,
450
- "branch_coverage_gold": 4.1237,
451
- "method_coverage_gold": 5.291,
452
- "line_coverage_gold": 5.5077,
453
- "is_traceback": false,
454
- "commit_gap": {
455
- "count": 1,
456
- "skipped_commits": [
457
- "daeab38ee2ab23999dd952b0f3db23dcd1ceb267"
458
- ]
459
- },
460
- "test_is_refactoring_only": false,
461
- "has_test_dep_change": false,
462
- "all_deps_new": [
463
- "fayder/restcountries/v1/rest/CountryService.getInstance:()Lfayder/restcountries/v1/rest/CountryService",
464
- "fayder/restcountries/v1/rest/CountryService.getByCallingcode:(Ljava/lang/String;)Ljava/util/List",
465
- "fayder/restcountries/v1/domain/Country.getAlpha2Code:()Ljava/lang/String"
466
- ],
467
- "all_deps_old": [
468
- "fayder/restcountries/v1/rest/CountryService.getInstance:()Lfayder/restcountries/v1/rest/CountryService",
469
- "fayder/restcountries/v1/domain/Country.getCca2:()Ljava/lang/String",
470
- "fayder/restcountries/v1/rest/CountryService.getByCallingcode:(Ljava/lang/String;)Ljava/util/List"
471
- ],
472
- "deps_changes": [
473
- {
474
- "method_sign": "fayder/restcountries/v1/domain/Country.getAlpha2Code:()Ljava/lang/String",
475
- "change_type": "ADD",
476
- "file_path_old": null,
477
- "file_path_new": "src/main/java/fayder/restcountries/v1/domain/Country.java",
478
- "source": "production",
479
- "is_test_dependency": false,
480
- "is_refactoring_only": false
481
- },
482
- {
483
- "method_sign": "fayder/restcountries/v1/domain/Country.getCca2:()Ljava/lang/String",
484
- "change_type": "DELETE",
485
- "file_path_old": "src/main/java/fayder/restcountries/v1/domain/Country.java",
486
- "file_path_new": null,
487
- "source": "production",
488
- "is_test_dependency": false,
489
- "is_refactoring_only": false
490
- }
491
- ],
492
- "variant_result": {
493
- "old_on_old": "pass",
494
- "old_on_new": "error",
495
- "new_on_old": "error",
496
- "new_on_new": "pass"
497
- }
498
- },
499
- {
500
- "change_id": "5_apilayer_restcountries-2.0.5_67233cb_c3a8e50_CountryServiceTest",
501
- "test_sign": "fayder/restcountries/v1/CountryServiceTest.getByCodeList:()V",
502
- "class": "CountryServiceTest",
503
- "method": "getByCodeList",
504
- "module": "",
505
- "junit_selector": "fayder.restcountries.v1.CountryServiceTest#getByCodeList",
506
- "old_test_code": "@Test\npublic void getByCodeList() throws Exception {\n List<Country> countries = CountryService.getInstance().getByCodeList(\"CO;NOR;EE\");\n Assert.assertNotNull(countries);\n Assert.assertFalse(countries.isEmpty());\n Assert.assertEquals(3, countries.size());\n for (Country country : countries) {\n Assert.assertTrue(country.getCca2().equals(\"CO\") || country.getCca2().equals(\"NO\") || country.getCca2().equals(\"EE\"));\n }\n}",
507
- "new_test_code": "@Test\npublic void getByCodeList() throws Exception {\n List<Country> countries = CountryService.getInstance().getByCodeList(\"CO;NOR;EE\");\n Assert.assertNotNull(countries);\n Assert.assertFalse(countries.isEmpty());\n Assert.assertEquals(3, countries.size());\n for (Country country : countries) {\n Assert.assertTrue(country.getAlpha2Code().equals(\"CO\") || country.getAlpha2Code().equals(\"NO\") || country.getAlpha2Code().equals(\"EE\"));\n }\n}",
508
- "old_test_file_path": [
509
- "src/test/java/fayder/restcountries/v1/CountryServiceTest.java"
510
- ],
511
- "old_test_lnum": [
512
- "50-60"
513
- ],
514
- "new_test_lnum": [
515
- "50-60"
516
- ],
517
- "old_production_code": "public String getCca2() {\n return cca2;\n}",
518
- "new_production_code": "",
519
- "focal_file_path": "src/main/java/fayder/restcountries/v1/domain/Country.java",
520
- "focal_method_sign": "fayder/restcountries/v1/domain/Country.getCca2:()Ljava/lang/String",
521
- "focal_all_deps_scored": [
522
- {
523
- "dep_id": 1,
524
- "method_sign": "fayder/restcountries/v1/domain/Country.getCca2:()Ljava/lang/String",
525
- "file_path_old": "src/main/java/fayder/restcountries/v1/domain/Country.java",
526
- "line_nums_old": "76-78",
527
- "file_path_new": null,
528
- "line_nums_new": null,
529
- "dependency_updated": "deleted",
530
- "score": 0.1735,
531
- "signal_scores": {
532
- "nc": 0.0,
533
- "lcs_u": 0.5714,
534
- "ed": 0.3077,
535
- "class": 0.0,
536
- "tfidf": 0.0934
537
- }
538
- },
539
- {
540
- "dep_id": 0,
541
- "method_sign": "fayder/restcountries/v1/domain/Country.getAlpha2Code:()Ljava/lang/String",
542
- "file_path_old": null,
543
- "line_nums_old": null,
544
- "file_path_new": "src/main/java/fayder/restcountries/v1/domain/Country.java",
545
- "line_nums_new": "70-72",
546
- "dependency_updated": "inserted",
547
- "score": 0.155,
548
- "signal_scores": {
549
- "nc": 0.0,
550
- "lcs_u": 0.5385,
551
- "ed": 0.2308,
552
- "class": 0.0,
553
- "tfidf": 0.0934
554
- }
555
- }
556
- ],
557
- "coverage_gold": 1.0,
558
- "branch_coverage_gold": 7.2165,
559
- "method_coverage_gold": 5.8201,
560
- "line_coverage_gold": 7.2289,
561
- "is_traceback": false,
562
- "commit_gap": {
563
- "count": 1,
564
- "skipped_commits": [
565
- "daeab38ee2ab23999dd952b0f3db23dcd1ceb267"
566
- ]
567
- },
568
- "test_is_refactoring_only": false,
569
- "has_test_dep_change": false,
570
- "all_deps_new": [
571
- "fayder/restcountries/v1/rest/CountryService.getInstance:()Lfayder/restcountries/v1/rest/CountryService",
572
- "fayder/restcountries/v1/rest/CountryService.getByCodeList:(Ljava/lang/String;)Ljava/util/List",
573
- "fayder/restcountries/v1/domain/Country.getAlpha2Code:()Ljava/lang/String"
574
- ],
575
- "all_deps_old": [
576
- "fayder/restcountries/v1/rest/CountryService.getInstance:()Lfayder/restcountries/v1/rest/CountryService",
577
- "fayder/restcountries/v1/domain/Country.getCca2:()Ljava/lang/String",
578
- "fayder/restcountries/v1/rest/CountryService.getByCodeList:(Ljava/lang/String;)Ljava/util/List"
579
- ],
580
- "deps_changes": [
581
- {
582
- "method_sign": "fayder/restcountries/v1/domain/Country.getAlpha2Code:()Ljava/lang/String",
583
- "change_type": "ADD",
584
- "file_path_old": null,
585
- "file_path_new": "src/main/java/fayder/restcountries/v1/domain/Country.java",
586
- "source": "production",
587
- "is_test_dependency": false,
588
- "is_refactoring_only": false
589
- },
590
- {
591
- "method_sign": "fayder/restcountries/v1/domain/Country.getCca2:()Ljava/lang/String",
592
- "change_type": "DELETE",
593
- "file_path_old": "src/main/java/fayder/restcountries/v1/domain/Country.java",
594
- "file_path_new": null,
595
- "source": "production",
596
- "is_test_dependency": false,
597
- "is_refactoring_only": false
598
- }
599
- ],
600
- "variant_result": {
601
- "old_on_old": "pass",
602
- "old_on_new": "error",
603
- "new_on_old": "error",
604
- "new_on_new": "pass"
605
- }
606
- },
607
- {
608
- "change_id": "6_apilayer_restcountries-2.0.5_67233cb_c3a8e50_CountryServiceTest",
609
- "test_sign": "fayder/restcountries/v1/CountryServiceTest.getByAlpha2:()V",
610
- "class": "CountryServiceTest",
611
- "method": "getByAlpha2",
612
- "module": "",
613
- "junit_selector": "fayder.restcountries.v1.CountryServiceTest#getByAlpha2",
614
- "old_test_code": "@Test\npublic void getByAlpha2() throws Exception {\n Country country = CountryService.getInstance().getByAlpha(\"CO\");\n Assert.assertNotNull(country);\n Assert.assertEquals(\"CO\", country.getCca2());\n}",
615
- "new_test_code": "@Test\npublic void getByAlpha2() throws Exception {\n Country country = CountryService.getInstance().getByAlpha(\"CO\");\n Assert.assertNotNull(country);\n Assert.assertEquals(\"CO\", country.getAlpha2Code());\n}",
616
- "old_test_file_path": [
617
- "src/test/java/fayder/restcountries/v1/CountryServiceTest.java"
618
- ],
619
- "old_test_lnum": [
620
- "36-41"
621
- ],
622
- "new_test_lnum": [
623
- "36-41"
624
- ],
625
- "old_production_code": "public Country getByAlpha(String alpha) {\n int alphaLength = alpha.length();\n for (Country country : countries) {\n if (alphaLength == 2) {\n if (country.getCca2().toLowerCase().equals(alpha.toLowerCase())) {\n return country;\n }\n } else if (alphaLength == 3) {\n if (country.getCca3().toLowerCase().equals(alpha.toLowerCase())) {\n return country;\n }\n }\n }\n return null;\n}",
626
- "new_production_code": "public Country getByAlpha(String alpha) {\n int alphaLength = alpha.length();\n for (Country country : countries) {\n if (alphaLength == 2) {\n if (country.getAlpha2Code().toLowerCase().equals(alpha.toLowerCase())) {\n return country;\n }\n } else if (alphaLength == 3) {\n if (country.getAlpha3Code().toLowerCase().equals(alpha.toLowerCase())) {\n return country;\n }\n }\n }\n return null;\n}",
627
- "focal_file_path": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
628
- "focal_method_sign": "fayder/restcountries/v1/rest/CountryService.getByAlpha:(Ljava/lang/String;)Lfayder/restcountries/v1/domain/Country",
629
- "focal_all_deps_scored": [
630
- {
631
- "dep_id": 1,
632
- "method_sign": "fayder/restcountries/v1/rest/CountryService.getByAlpha:(Ljava/lang/String;)Lfayder/restcountries/v1/domain/Country",
633
- "file_path_old": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
634
- "line_nums_old": "44-58",
635
- "file_path_new": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
636
- "line_nums_new": "44-58",
637
- "dependency_updated": "updated",
638
- "score": 0.5441,
639
- "signal_scores": {
640
- "nc": 0.0,
641
- "lcs_u": 1.0,
642
- "ed": 0.9091,
643
- "class": 1.0,
644
- "tfidf": 0.1261
645
- }
646
- },
647
- {
648
- "dep_id": 0,
649
- "method_sign": "fayder/restcountries/v1/domain/Country.getAlpha2Code:()Ljava/lang/String",
650
- "file_path_old": null,
651
- "line_nums_old": null,
652
- "file_path_new": "src/main/java/fayder/restcountries/v1/domain/Country.java",
653
- "line_nums_new": "70-72",
654
- "dependency_updated": "inserted",
655
- "score": 0.2288,
656
- "signal_scores": {
657
- "nc": 0.0,
658
- "lcs_u": 0.6923,
659
- "ed": 0.5385,
660
- "class": 0.0,
661
- "tfidf": 0.0764
662
- }
663
- },
664
- {
665
- "dep_id": 2,
666
- "method_sign": "fayder/restcountries/v1/domain/Country.getCca2:()Ljava/lang/String",
667
- "file_path_old": "src/main/java/fayder/restcountries/v1/domain/Country.java",
668
- "line_nums_old": "76-78",
669
- "file_path_new": null,
670
- "line_nums_new": null,
671
- "dependency_updated": "deleted",
672
- "score": 0.2189,
673
- "signal_scores": {
674
- "nc": 0.0,
675
- "lcs_u": 0.7143,
676
- "ed": 0.4545,
677
- "class": 0.0,
678
- "tfidf": 0.0764
679
- }
680
- }
681
- ],
682
- "coverage_gold": 0.6666666666666666,
683
- "branch_coverage_gold": 3.0928,
684
- "method_coverage_gold": 4.7619,
685
- "line_coverage_gold": 4.9914,
686
- "is_traceback": false,
687
- "commit_gap": {
688
- "count": 1,
689
- "skipped_commits": [
690
- "daeab38ee2ab23999dd952b0f3db23dcd1ceb267"
691
- ]
692
- },
693
- "test_is_refactoring_only": false,
694
- "has_test_dep_change": false,
695
- "all_deps_new": [
696
- "fayder/restcountries/v1/rest/CountryService.getByAlpha:(Ljava/lang/String;)Lfayder/restcountries/v1/domain/Country",
697
- "fayder/restcountries/v1/rest/CountryService.getInstance:()Lfayder/restcountries/v1/rest/CountryService",
698
- "fayder/restcountries/v1/domain/Country.getAlpha2Code:()Ljava/lang/String"
699
- ],
700
- "all_deps_old": [
701
- "fayder/restcountries/v1/rest/CountryService.getByAlpha:(Ljava/lang/String;)Lfayder/restcountries/v1/domain/Country",
702
- "fayder/restcountries/v1/rest/CountryService.getInstance:()Lfayder/restcountries/v1/rest/CountryService",
703
- "fayder/restcountries/v1/domain/Country.getCca2:()Ljava/lang/String"
704
- ],
705
- "deps_changes": [
706
- {
707
- "method_sign": "fayder/restcountries/v1/domain/Country.getAlpha2Code:()Ljava/lang/String",
708
- "change_type": "ADD",
709
- "file_path_old": null,
710
- "file_path_new": "src/main/java/fayder/restcountries/v1/domain/Country.java",
711
- "source": "production",
712
- "is_test_dependency": false,
713
- "is_refactoring_only": false
714
- },
715
- {
716
- "method_sign": "fayder/restcountries/v1/rest/CountryService.getByAlpha:(Ljava/lang/String;)Lfayder/restcountries/v1/domain/Country",
717
- "change_type": "UPDATE",
718
- "file_path_old": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
719
- "file_path_new": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
720
- "source": "production",
721
- "is_test_dependency": false,
722
- "is_refactoring_only": false
723
- },
724
- {
725
- "method_sign": "fayder/restcountries/v1/domain/Country.getCca2:()Ljava/lang/String",
726
- "change_type": "DELETE",
727
- "file_path_old": "src/main/java/fayder/restcountries/v1/domain/Country.java",
728
- "file_path_new": null,
729
- "source": "production",
730
- "is_test_dependency": false,
731
- "is_refactoring_only": false
732
- }
733
- ],
734
- "variant_result": {
735
- "old_on_old": "pass",
736
- "old_on_new": "error",
737
- "new_on_old": "error",
738
- "new_on_new": "pass"
739
- }
740
- },
741
- {
742
- "change_id": "7_apilayer_restcountries-2.0.5_67233cb_c3a8e50_CountryServiceTest",
743
- "test_sign": "fayder/restcountries/v1/CountryServiceTest.getByAlpha3:()V",
744
- "class": "CountryServiceTest",
745
- "method": "getByAlpha3",
746
- "module": "",
747
- "junit_selector": "fayder.restcountries.v1.CountryServiceTest#getByAlpha3",
748
- "old_test_code": "@Test\npublic void getByAlpha3() throws Exception {\n Country country = CountryService.getInstance().getByAlpha(\"COL\");\n Assert.assertNotNull(country);\n Assert.assertEquals(\"COL\", country.getCca3());\n}",
749
- "new_test_code": "@Test\npublic void getByAlpha3() throws Exception {\n Country country = CountryService.getInstance().getByAlpha(\"COL\");\n Assert.assertNotNull(country);\n Assert.assertEquals(\"COL\", country.getAlpha3Code());\n}",
750
- "old_test_file_path": [
751
- "src/test/java/fayder/restcountries/v1/CountryServiceTest.java"
752
- ],
753
- "old_test_lnum": [
754
- "43-48"
755
- ],
756
- "new_test_lnum": [
757
- "43-48"
758
- ],
759
- "old_production_code": "public Country getByAlpha(String alpha) {\n int alphaLength = alpha.length();\n for (Country country : countries) {\n if (alphaLength == 2) {\n if (country.getCca2().toLowerCase().equals(alpha.toLowerCase())) {\n return country;\n }\n } else if (alphaLength == 3) {\n if (country.getCca3().toLowerCase().equals(alpha.toLowerCase())) {\n return country;\n }\n }\n }\n return null;\n}",
760
- "new_production_code": "public Country getByAlpha(String alpha) {\n int alphaLength = alpha.length();\n for (Country country : countries) {\n if (alphaLength == 2) {\n if (country.getAlpha2Code().toLowerCase().equals(alpha.toLowerCase())) {\n return country;\n }\n } else if (alphaLength == 3) {\n if (country.getAlpha3Code().toLowerCase().equals(alpha.toLowerCase())) {\n return country;\n }\n }\n }\n return null;\n}",
761
- "focal_file_path": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
762
- "focal_method_sign": "fayder/restcountries/v1/rest/CountryService.getByAlpha:(Ljava/lang/String;)Lfayder/restcountries/v1/domain/Country",
763
- "focal_all_deps_scored": [
764
- {
765
- "dep_id": 1,
766
- "method_sign": "fayder/restcountries/v1/rest/CountryService.getByAlpha:(Ljava/lang/String;)Lfayder/restcountries/v1/domain/Country",
767
- "file_path_old": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
768
- "line_nums_old": "44-58",
769
- "file_path_new": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
770
- "line_nums_new": "44-58",
771
- "dependency_updated": "updated",
772
- "score": 0.5441,
773
- "signal_scores": {
774
- "nc": 0.0,
775
- "lcs_u": 1.0,
776
- "ed": 0.9091,
777
- "class": 1.0,
778
- "tfidf": 0.1261
779
- }
780
- },
781
- {
782
- "dep_id": 0,
783
- "method_sign": "fayder/restcountries/v1/domain/Country.getAlpha3Code:()Ljava/lang/String",
784
- "file_path_old": null,
785
- "line_nums_old": null,
786
- "file_path_new": "src/main/java/fayder/restcountries/v1/domain/Country.java",
787
- "line_nums_new": "78-80",
788
- "dependency_updated": "inserted",
789
- "score": 0.2288,
790
- "signal_scores": {
791
- "nc": 0.0,
792
- "lcs_u": 0.6923,
793
- "ed": 0.5385,
794
- "class": 0.0,
795
- "tfidf": 0.0764
796
- }
797
- },
798
- {
799
- "dep_id": 2,
800
- "method_sign": "fayder/restcountries/v1/domain/Country.getCca3:()Ljava/lang/String",
801
- "file_path_old": "src/main/java/fayder/restcountries/v1/domain/Country.java",
802
- "line_nums_old": "84-86",
803
- "file_path_new": null,
804
- "line_nums_new": null,
805
- "dependency_updated": "deleted",
806
- "score": 0.2189,
807
- "signal_scores": {
808
- "nc": 0.0,
809
- "lcs_u": 0.7143,
810
- "ed": 0.4545,
811
- "class": 0.0,
812
- "tfidf": 0.0764
813
- }
814
- }
815
- ],
816
- "coverage_gold": 0.75,
817
- "branch_coverage_gold": 3.6082,
818
- "method_coverage_gold": 4.7619,
819
- "line_coverage_gold": 5.1635,
820
- "is_traceback": false,
821
- "commit_gap": {
822
- "count": 1,
823
- "skipped_commits": [
824
- "daeab38ee2ab23999dd952b0f3db23dcd1ceb267"
825
- ]
826
- },
827
- "test_is_refactoring_only": false,
828
- "has_test_dep_change": false,
829
- "all_deps_new": [
830
- "fayder/restcountries/v1/rest/CountryService.getByAlpha:(Ljava/lang/String;)Lfayder/restcountries/v1/domain/Country",
831
- "fayder/restcountries/v1/rest/CountryService.getInstance:()Lfayder/restcountries/v1/rest/CountryService",
832
- "fayder/restcountries/v1/domain/Country.getAlpha3Code:()Ljava/lang/String"
833
- ],
834
- "all_deps_old": [
835
- "fayder/restcountries/v1/rest/CountryService.getByAlpha:(Ljava/lang/String;)Lfayder/restcountries/v1/domain/Country",
836
- "fayder/restcountries/v1/rest/CountryService.getInstance:()Lfayder/restcountries/v1/rest/CountryService",
837
- "fayder/restcountries/v1/domain/Country.getCca3:()Ljava/lang/String"
838
- ],
839
- "deps_changes": [
840
- {
841
- "method_sign": "fayder/restcountries/v1/domain/Country.getAlpha3Code:()Ljava/lang/String",
842
- "change_type": "ADD",
843
- "file_path_old": null,
844
- "file_path_new": "src/main/java/fayder/restcountries/v1/domain/Country.java",
845
- "source": "production",
846
- "is_test_dependency": false,
847
- "is_refactoring_only": false
848
- },
849
- {
850
- "method_sign": "fayder/restcountries/v1/rest/CountryService.getByAlpha:(Ljava/lang/String;)Lfayder/restcountries/v1/domain/Country",
851
- "change_type": "UPDATE",
852
- "file_path_old": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
853
- "file_path_new": "src/main/java/fayder/restcountries/v1/rest/CountryService.java",
854
- "source": "production",
855
- "is_test_dependency": false,
856
- "is_refactoring_only": false
857
- },
858
- {
859
- "method_sign": "fayder/restcountries/v1/domain/Country.getCca3:()Ljava/lang/String",
860
- "change_type": "DELETE",
861
- "file_path_old": "src/main/java/fayder/restcountries/v1/domain/Country.java",
862
- "file_path_new": null,
863
- "source": "production",
864
- "is_test_dependency": false,
865
- "is_refactoring_only": false
866
- }
867
- ],
868
- "variant_result": {
869
- "old_on_old": "pass",
870
- "old_on_new": "error",
871
- "new_on_old": "error",
872
- "new_on_new": "pass"
873
- }
874
- }
875
- ],
876
- "version": "2.0.5",
877
- "java_version": 8
878
- }
879
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
blockchain_thunder-v0.1.2-alpha.json DELETED
@@ -1,787 +0,0 @@
1
- [
2
- {
3
- "task_id": "blockchain_thunder-v0.1.2-alpha__8c880ff_1aa7495__ConnectionManagerImplTest_098f6bcd",
4
- "project_name": "blockchain_thunder-v0.1.2-alpha",
5
- "git_clone_url": "https://github.com/blockchain/thunder.git",
6
- "rev1": "8c880ff53ea261d0b82e1e47a92ce8db76a80e80",
7
- "rev2": "1aa7495ee1abdd853e2e969c598019018bd60768",
8
- "rev1_date": "2016-03-15T08:00:37Z",
9
- "rev2_date": "2016-03-15T11:50:39Z",
10
- "git_diff_url": "https://github.com/blockchain/thunder/compare/8c880ff53ea261d0b82e1e47a92ce8db76a80e80...1aa7495ee1abdd853e2e969c598019018bd60768",
11
- "test_file": "thunder-core/src/test/java/network/thunder/core/communication/nio/ConnectionManagerImplTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "24_blockchain_thunder-v0.1.2-alpha_8c880ff_1aa7495_ConnectionManagerImplTest",
15
- "test_sign": "network/thunder/core/communication/nio/ConnectionManagerImplTest.test:()V",
16
- "class": "ConnectionManagerImplTest",
17
- "method": "test",
18
- "module": "thunder-core",
19
- "junit_selector": "network.thunder.core.communication.nio.ConnectionManagerImplTest#test",
20
- "old_test_code": "@Test\npublic void test() throws Exception {\n Logger.getLogger(\"io.netty\").setLevel(Level.OFF);\n connectionSeed.connectionManager.startListening();\n for (int i = 6; i < 10; ++i) {\n System.out.println(\"------------------------------------------------------------------------------\");\n System.out.println(i + \" started up...\");\n clients.get(i).connectionManager.startUp();\n Thread.sleep(500);\n }\n Thread.sleep(1000);\n}",
21
- "new_test_code": "@Test\npublic void test() throws Exception {\n Logger.getLogger(\"io.netty\").setLevel(Level.OFF);\n connectionSeed.connectionManager.startListening(new NullResultCommand());\n for (int i = 6; i < 10; ++i) {\n System.out.println(\"------------------------------------------------------------------------------\");\n System.out.println(i + \" started up...\");\n clients.get(i).connectionManager.startUp(new NullResultCommand());\n Thread.sleep(500);\n }\n Thread.sleep(1000);\n}",
22
- "old_test_file_path": [
23
- "thunder-core/src/test/java/network/thunder/core/communication/nio/ConnectionManagerImplTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "35-73"
27
- ],
28
- "new_test_lnum": [
29
- "36-74"
30
- ],
31
- "old_production_code": "@Override\npublic void startUp() {\n new Thread(new Runnable() {\n\n @Override\n public void run() {\n try {\n startUpBlocking();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }).start();\n}",
32
- "new_production_code": "@Override\npublic void startUp(ResultCommand callback) {\n new Thread(new Runnable() {\n\n @Override\n public void run() {\n try {\n startUpBlocking(callback);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }).start();\n}",
33
- "focal_file_path": "thunder-core/src/main/java/network/thunder/core/communication/nio/ConnectionManagerImpl.java",
34
- "focal_method_sign": "network/thunder/core/communication/nio/ConnectionManagerImpl.startUp:()V",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 1,
38
- "method_sign": "network/thunder/core/communication/nio/ConnectionManagerImpl.startUp:()V",
39
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/nio/ConnectionManagerImpl.java",
40
- "line_nums_old": "53-65",
41
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/nio/ConnectionManagerImpl.java",
42
- "line_nums_new": "54-66",
43
- "dependency_updated": "updated",
44
- "score": 0.309,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 0.2857,
48
- "ed": 0.2857,
49
- "class": 1.0,
50
- "tfidf": 0.0989
51
- }
52
- },
53
- {
54
- "dep_id": 0,
55
- "method_sign": "network/thunder/core/communication/nio/ConnectionManagerImpl.startListening:()V",
56
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/nio/ConnectionManagerImpl.java",
57
- "line_nums_old": "74-78",
58
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/nio/ConnectionManagerImpl.java",
59
- "line_nums_new": "75-79",
60
- "dependency_updated": "updated",
61
- "score": 0.2999,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 0.2143,
65
- "ed": 0.2143,
66
- "class": 1.0,
67
- "tfidf": 0.1637
68
- }
69
- },
70
- {
71
- "dep_id": 2,
72
- "method_sign": "network/thunder/core/communication/nio/ConnectionManagerImpl$1.run:()V",
73
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/nio/ConnectionManagerImpl.java",
74
- "line_nums_old": "56-63",
75
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/nio/ConnectionManagerImpl.java",
76
- "line_nums_new": "57-64",
77
- "dependency_updated": "updated",
78
- "score": 0.1882,
79
- "signal_scores": {
80
- "nc": 0.0,
81
- "lcs_u": 0.0,
82
- "ed": 0.0,
83
- "class": 1.0,
84
- "tfidf": 0.0
85
- }
86
- }
87
- ],
88
- "coverage_gold": 0.5084745762711864,
89
- "branch_coverage_gold": 7.5837,
90
- "method_coverage_gold": 19.1199,
91
- "line_coverage_gold": 16.8978,
92
- "is_traceback": false,
93
- "commit_gap": {
94
- "count": 1,
95
- "skipped_commits": [
96
- "81111122aea204ce5a94f166a9a1ffcb0d2fe595"
97
- ]
98
- },
99
- "test_is_refactoring_only": false,
100
- "has_test_dep_change": false,
101
- "all_deps_new": [
102
- "network/thunder/core/communication/nio/ConnectionManagerImpl.startUp:(Lnetwork/thunder/core/communication/objects/messages/interfaces/helper/etc/ResultCommand;)V",
103
- "network/thunder/core/communication/processor/implementations/gossip/GossipSubjectImpl.receivedNewObjects:(Lnetwork/thunder/core/communication/processor/implementations/gossip/NodeObserver;Ljava/util/List;)V",
104
- "network/thunder/core/communication/nio/ConnectionManagerImpl$1.run:()V",
105
- "network/thunder/core/communication/nio/ConnectionManagerImpl.startListening:(Lnetwork/thunder/core/communication/objects/messages/interfaces/helper/etc/ResultCommand;)V"
106
- ],
107
- "all_deps_old": [
108
- "network/thunder/core/communication/objects/messages/impl/blockchainlistener/BlockchainHelperImpl$EventListener.onPeerDisconnected:(Lorg/bitcoinj/core/Peer;I)V",
109
- "network/thunder/core/communication/nio/ConnectionManagerImpl.startUp:()V",
110
- "network/thunder/core/communication/nio/ConnectionManagerImpl$1.run:()V",
111
- "network/thunder/core/communication/nio/ConnectionManagerImpl.startListening:()V"
112
- ],
113
- "deps_changes": [
114
- {
115
- "method_sign": "network/thunder/core/communication/nio/ConnectionManagerImpl.startListening:()V",
116
- "change_type": "UPDATE",
117
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/nio/ConnectionManagerImpl.java",
118
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/nio/ConnectionManagerImpl.java",
119
- "source": "production",
120
- "is_test_dependency": false,
121
- "is_refactoring_only": false
122
- },
123
- {
124
- "method_sign": "network/thunder/core/communication/nio/ConnectionManagerImpl.startUp:()V",
125
- "change_type": "UPDATE",
126
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/nio/ConnectionManagerImpl.java",
127
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/nio/ConnectionManagerImpl.java",
128
- "source": "production",
129
- "is_test_dependency": false,
130
- "is_refactoring_only": false
131
- },
132
- {
133
- "method_sign": "network/thunder/core/communication/nio/ConnectionManagerImpl$1.run:()V",
134
- "change_type": "UPDATE",
135
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/nio/ConnectionManagerImpl.java",
136
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/nio/ConnectionManagerImpl.java",
137
- "source": "production",
138
- "is_test_dependency": false,
139
- "is_refactoring_only": false
140
- }
141
- ],
142
- "variant_result": {
143
- "old_on_old": "pass",
144
- "old_on_new": "error",
145
- "new_on_old": "error",
146
- "new_on_new": "pass"
147
- }
148
- }
149
- ],
150
- "version": "v0.1.2-alpha",
151
- "java_version": 8
152
- },
153
- {
154
- "task_id": "blockchain_thunder-v0.1.2-alpha__8fa7cdc_8585ed8__EncryptionHandlerTest_0d301049",
155
- "project_name": "blockchain_thunder-v0.1.2-alpha",
156
- "git_clone_url": "https://github.com/blockchain/thunder.git",
157
- "rev1": "8fa7cdce1d050d2488b87dcbcb348158f0538cea",
158
- "rev2": "8585ed8698412b87a41b1b5e2c241e3b280f293d",
159
- "rev1_date": "2015-12-07T14:40:54Z",
160
- "rev2_date": "2015-12-07T16:12:55Z",
161
- "git_diff_url": "https://github.com/blockchain/thunder/compare/8fa7cdce1d050d2488b87dcbcb348158f0538cea...8585ed8698412b87a41b1b5e2c241e3b280f293d",
162
- "test_file": "thunder-core/src/test/java/network/thunder/core/communication/nio/handler/low/EncryptionHandlerTest.java",
163
- "test_changes": [
164
- {
165
- "change_id": "55_blockchain_thunder-v0.1.2-alpha_8fa7cdc_8585ed8_EncryptionHandlerTest",
166
- "test_sign": "network/thunder/core/communication/nio/handler/low/EncryptionHandlerTest.shouldEncrypt:()V",
167
- "class": "EncryptionHandlerTest",
168
- "method": "shouldEncrypt",
169
- "module": "thunder-core",
170
- "junit_selector": "network.thunder.core.communication.nio.handler.low.EncryptionHandlerTest#shouldEncrypt",
171
- "old_test_code": "@Test\npublic void shouldEncrypt() throws InvalidKeyException, NoSuchAlgorithmException {\n doHandShake();\n ECDHKeySet keySetBeforeEncryption1 = node1.ecdhKeySet.clone();\n RandomDataMessage testMessage = new RandomDataMessage();\n channel1.writeOutbound(testMessage);\n EncryptedMessage encryptedMessage = (EncryptedMessage) channel1.readOutbound();\n MessageEncrypter encrypter = new MessageEncrypterImpl(new MessageSerializerImpl());\n EncryptedMessage messageSelfEncrypted = encrypter.encrypt(testMessage, keySetBeforeEncryption1);\n assertTrue(Arrays.equals(messageSelfEncrypted.getEncryptedBytes(), encryptedMessage.getEncryptedBytes()));\n assertTrue(Arrays.equals(encryptedMessage.getHMAC(), encryptedMessage.getHMAC()));\n}",
172
- "new_test_code": "@Test\npublic void shouldEncrypt() throws InvalidKeyException, NoSuchAlgorithmException {\n doHandShake();\n ECDHKeySet keySetBeforeEncryption1 = node1.ecdhKeySet.clone();\n RandomDataMessage testMessage = new RandomDataMessage();\n channel1.writeOutbound(testMessage);\n EncryptedMessage encryptedMessage = (EncryptedMessage) channel1.readOutbound();\n MessageEncrypter encrypter = new MessageEncrypterImpl(new MessageSerializerImpl());\n EncryptedMessage messageSelfEncrypted = encrypter.encrypt(testMessage, keySetBeforeEncryption1);\n assertTrue(Arrays.equals(messageSelfEncrypted.payload, encryptedMessage.payload));\n assertTrue(Arrays.equals(encryptedMessage.hmac, encryptedMessage.hmac));\n}",
173
- "old_test_file_path": [
174
- "thunder-core/src/test/java/network/thunder/core/communication/nio/handler/low/EncryptionHandlerTest.java"
175
- ],
176
- "old_test_lnum": [
177
- "93-108"
178
- ],
179
- "new_test_lnum": [
180
- "91-106"
181
- ],
182
- "old_production_code": "@Override\npublic EncryptedMessage encrypt(Message data, ECDHKeySet keySet) {\n byte[] bytes = serializater.serializeMessage(data);\n byte[] enc = CryptoTools.encryptAES_CTR(bytes, keySet.encryptionKey, keySet.ivServer, keySet.counterOut);\n byte[] hmac = CryptoTools.getHMAC(enc, keySet.hmacKey);\n return new EncryptedMessageImpl(hmac, enc);\n}",
183
- "new_production_code": "@Override\npublic EncryptedMessage encrypt(Message data, ECDHKeySet keySet) {\n byte[] bytes = serializater.serializeMessage(data);\n byte[] enc = CryptoTools.encryptAES_CTR(bytes, keySet.encryptionKey, keySet.ivServer, keySet.counterOut);\n byte[] hmac = CryptoTools.getHMAC(enc, keySet.hmacKey);\n return new EncryptedMessage(hmac, enc);\n}",
184
- "focal_file_path": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/MessageEncrypterImpl.java",
185
- "focal_method_sign": "network/thunder/core/communication/objects/messages/impl/MessageEncrypterImpl.encrypt:(Lnetwork/thunder/core/communication/Message;Lnetwork/thunder/core/etc/crypto/ECDHKeySet;)Lnetwork/thunder/core/communication/objects/messages/impl/message/encryption/EncryptedMessage",
186
- "focal_all_deps_scored": [
187
- {
188
- "dep_id": 1,
189
- "method_sign": "network/thunder/core/communication/objects/messages/impl/MessageEncrypterImpl.encrypt:(Lnetwork/thunder/core/communication/Message;Lnetwork/thunder/core/etc/crypto/ECDHKeySet;)Lnetwork/thunder/core/communication/objects/messages/impl/message/encryption/EncryptedMessage",
190
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/MessageEncrypterImpl.java",
191
- "line_nums_old": "22-30",
192
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/MessageEncrypterImpl.java",
193
- "line_nums_new": "21-29",
194
- "dependency_updated": "updated",
195
- "score": 0.3125,
196
- "signal_scores": {
197
- "nc": 0.0,
198
- "lcs_u": 1.0,
199
- "ed": 0.5385,
200
- "class": 0.0,
201
- "tfidf": 0.201
202
- }
203
- },
204
- {
205
- "dep_id": 0,
206
- "method_sign": "network/thunder/core/communication/objects/messages/impl/message/encryption/EncryptedMessageImpl.getEncryptedBytes:()[B",
207
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/message/encryption/EncryptedMessageImpl.java",
208
- "line_nums_old": "23-26",
209
- "file_path_new": null,
210
- "line_nums_new": null,
211
- "dependency_updated": "deleted",
212
- "score": 0.145,
213
- "signal_scores": {
214
- "nc": 0.0,
215
- "lcs_u": 0.4118,
216
- "ed": 0.2353,
217
- "class": 0.0,
218
- "tfidf": 0.1427
219
- }
220
- },
221
- {
222
- "dep_id": 2,
223
- "method_sign": "network/thunder/core/communication/objects/messages/impl/message/encryption/EncryptedMessageImpl.getHMAC:()[B",
224
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/message/encryption/EncryptedMessageImpl.java",
225
- "line_nums_old": "18-21",
226
- "file_path_new": null,
227
- "line_nums_new": null,
228
- "dependency_updated": "deleted",
229
- "score": 0.0967,
230
- "signal_scores": {
231
- "nc": 0.0,
232
- "lcs_u": 0.2857,
233
- "ed": 0.0769,
234
- "class": 0.0,
235
- "tfidf": 0.1427
236
- }
237
- }
238
- ],
239
- "coverage_gold": 0.6875,
240
- "branch_coverage_gold": 1.8182,
241
- "method_coverage_gold": 6.3209,
242
- "line_coverage_gold": 6.3471,
243
- "is_traceback": false,
244
- "commit_gap": {
245
- "count": 0,
246
- "skipped_commits": []
247
- },
248
- "test_is_refactoring_only": false,
249
- "has_test_dep_change": false,
250
- "all_deps_new": [
251
- "network/thunder/core/communication/nio/handler/low/EncryptionHandler.write:(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;Lio/netty/channel/ChannelPromise;)V",
252
- "network/thunder/core/etc/crypto/ECDHKeySet.clone:()Lnetwork/thunder/core/etc/crypto/ECDHKeySet",
253
- "network/thunder/core/communication/nio/handler/low/EncryptionHandlerTest.doHandShake:()V",
254
- "network/thunder/core/communication/objects/messages/impl/MessageEncrypterImpl.encrypt:(Lnetwork/thunder/core/communication/Message;Lnetwork/thunder/core/etc/crypto/ECDHKeySet;)Lnetwork/thunder/core/communication/objects/messages/impl/message/encryption/EncryptedMessage"
255
- ],
256
- "all_deps_old": [
257
- "network/thunder/core/communication/nio/handler/low/EncryptionHandler.write:(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;Lio/netty/channel/ChannelPromise;)V",
258
- "network/thunder/core/etc/crypto/ECDHKeySet.clone:()Lnetwork/thunder/core/etc/crypto/ECDHKeySet",
259
- "network/thunder/core/communication/nio/handler/low/EncryptionHandlerTest.doHandShake:()V",
260
- "network/thunder/core/communication/objects/messages/impl/MessageEncrypterImpl.encrypt:(Lnetwork/thunder/core/communication/Message;Lnetwork/thunder/core/etc/crypto/ECDHKeySet;)Lnetwork/thunder/core/communication/objects/messages/interfaces/message/encryption/types/EncryptedMessage",
261
- "network/thunder/core/communication/objects/messages/impl/message/encryption/EncryptedMessageImpl.getHMAC:()[B",
262
- "network/thunder/core/communication/objects/messages/impl/message/encryption/EncryptedMessageImpl.getEncryptedBytes:()[B"
263
- ],
264
- "deps_changes": [
265
- {
266
- "method_sign": "network/thunder/core/communication/objects/messages/impl/message/encryption/EncryptedMessageImpl.getEncryptedBytes:()[B",
267
- "change_type": "DELETE",
268
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/message/encryption/EncryptedMessageImpl.java",
269
- "file_path_new": null,
270
- "source": "production",
271
- "is_test_dependency": false,
272
- "is_refactoring_only": false
273
- },
274
- {
275
- "method_sign": "network/thunder/core/communication/objects/messages/impl/MessageEncrypterImpl.encrypt:(Lnetwork/thunder/core/communication/Message;Lnetwork/thunder/core/etc/crypto/ECDHKeySet;)Lnetwork/thunder/core/communication/objects/messages/impl/message/encryption/EncryptedMessage",
276
- "change_type": "UPDATE",
277
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/MessageEncrypterImpl.java",
278
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/MessageEncrypterImpl.java",
279
- "source": "production",
280
- "is_test_dependency": false,
281
- "is_refactoring_only": false
282
- },
283
- {
284
- "method_sign": "network/thunder/core/communication/objects/messages/impl/message/encryption/EncryptedMessageImpl.getHMAC:()[B",
285
- "change_type": "DELETE",
286
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/message/encryption/EncryptedMessageImpl.java",
287
- "file_path_new": null,
288
- "source": "production",
289
- "is_test_dependency": false,
290
- "is_refactoring_only": false
291
- }
292
- ],
293
- "variant_result": {
294
- "old_on_old": "pass",
295
- "old_on_new": "error",
296
- "new_on_old": "error",
297
- "new_on_new": "pass"
298
- }
299
- }
300
- ],
301
- "version": "v0.1.2-alpha",
302
- "java_version": 8
303
- },
304
- {
305
- "task_id": "blockchain_thunder-v0.1.2-alpha__8fa7cdc_8585ed8__AuthenticationHandlerTest_44bc75e8",
306
- "project_name": "blockchain_thunder-v0.1.2-alpha",
307
- "git_clone_url": "https://github.com/blockchain/thunder.git",
308
- "rev1": "8fa7cdce1d050d2488b87dcbcb348158f0538cea",
309
- "rev2": "8585ed8698412b87a41b1b5e2c241e3b280f293d",
310
- "rev1_date": "2015-12-07T14:40:54Z",
311
- "rev2_date": "2015-12-07T16:12:55Z",
312
- "git_diff_url": "https://github.com/blockchain/thunder/compare/8fa7cdce1d050d2488b87dcbcb348158f0538cea...8585ed8698412b87a41b1b5e2c241e3b280f293d",
313
- "test_file": "thunder-core/src/test/java/network/thunder/core/communication/nio/handler/mid/AuthenticationHandlerTest.java",
314
- "test_changes": [
315
- {
316
- "change_id": "52_blockchain_thunder-v0.1.2-alpha_8fa7cdc_8585ed8_AuthenticationHandlerTest",
317
- "test_sign": "network/thunder/core/communication/nio/handler/mid/AuthenticationHandlerTest.authenticationFail:()V",
318
- "class": "AuthenticationHandlerTest",
319
- "method": "authenticationFail",
320
- "module": "thunder-core",
321
- "junit_selector": "network.thunder.core.communication.nio.handler.mid.AuthenticationHandlerTest#authenticationFail",
322
- "old_test_code": "@Test\npublic void authenticationFail() throws NoSuchProviderException, NoSuchAlgorithmException {\n AuthenticationMessage authenticationMessage = (AuthenticationMessage) channel1.readOutbound();\n byte[] sig = authenticationMessage.getSignature();\n byte[] b = new byte[4];\n Random r = new Random();\n r.nextBytes(b);\n System.arraycopy(b, 0, sig, 10, 4);\n AuthenticationMessage falseMessage = new AuthenticationMessageMock(authenticationMessage.getPubkeyServer(), sig);\n channel2.writeInbound(falseMessage);\n Message failureMessage = (Message) channel2.readOutbound();\n assertTrue(failureMessage instanceof FailureMessage);\n assertEquals(((FailureMessage) failureMessage).getFailure(), \"Signature does not match..\");\n}",
323
- "new_test_code": "@Test\npublic void authenticationFail() throws NoSuchProviderException, NoSuchAlgorithmException {\n AuthenticationMessage authenticationMessage = (AuthenticationMessage) channel1.readOutbound();\n byte[] sig = authenticationMessage.signature;\n byte[] b = new byte[4];\n Random r = new Random();\n r.nextBytes(b);\n System.arraycopy(b, 0, sig, 10, 4);\n AuthenticationMessage falseMessage = new AuthenticationMessage(authenticationMessage.pubKeyServer, sig);\n channel2.writeInbound(falseMessage);\n Message failureMessage = (Message) channel2.readOutbound();\n assertTrue(failureMessage instanceof FailureMessage);\n assertEquals(((FailureMessage) failureMessage).getFailure(), \"Signature does not match..\");\n}",
324
- "old_test_file_path": [
325
- "thunder-core/src/test/java/network/thunder/core/communication/nio/handler/mid/AuthenticationHandlerTest.java"
326
- ],
327
- "old_test_lnum": [
328
- "75-92"
329
- ],
330
- "new_test_lnum": [
331
- "72-89"
332
- ],
333
- "old_production_code": "@Override\npublic byte[] getSignature() {\n return signature;\n}",
334
- "new_production_code": "",
335
- "focal_file_path": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/message/authentication/AuthenticationMessageImpl.java",
336
- "focal_method_sign": "network/thunder/core/communication/objects/messages/impl/message/authentication/AuthenticationMessageImpl.getSignature:()[B",
337
- "focal_all_deps_scored": [
338
- {
339
- "dep_id": 1,
340
- "method_sign": "network/thunder/core/communication/objects/messages/impl/message/authentication/AuthenticationMessageImpl.getSignature:()[B",
341
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/message/authentication/AuthenticationMessageImpl.java",
342
- "line_nums_old": "24-27",
343
- "file_path_new": null,
344
- "line_nums_new": null,
345
- "dependency_updated": "deleted",
346
- "score": 0.1206,
347
- "signal_scores": {
348
- "nc": 0.0,
349
- "lcs_u": 0.4167,
350
- "ed": 0.1667,
351
- "class": 0.0,
352
- "tfidf": 0.0835
353
- }
354
- },
355
- {
356
- "dep_id": 0,
357
- "method_sign": "network/thunder/core/communication/objects/messages/impl/message/authentication/AuthenticationMessageImpl.getPubkeyServer:()[B",
358
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/message/authentication/AuthenticationMessageImpl.java",
359
- "line_nums_old": "19-22",
360
- "file_path_new": null,
361
- "line_nums_new": null,
362
- "dependency_updated": "deleted",
363
- "score": 0.0523,
364
- "signal_scores": {
365
- "nc": 0.0,
366
- "lcs_u": 0.1333,
367
- "ed": 0.0556,
368
- "class": 0.0,
369
- "tfidf": 0.0835
370
- }
371
- }
372
- ],
373
- "coverage_gold": 1.0,
374
- "branch_coverage_gold": 1.3636,
375
- "method_coverage_gold": 4.5381,
376
- "line_coverage_gold": 4.2876,
377
- "is_traceback": false,
378
- "commit_gap": {
379
- "count": 0,
380
- "skipped_commits": []
381
- },
382
- "test_is_refactoring_only": false,
383
- "has_test_dep_change": false,
384
- "all_deps_new": [
385
- "network/thunder/core/communication/nio/handler/mid/AuthenticationHandler.channelRead:(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)V",
386
- "network/thunder/core/communication/objects/messages/impl/message/FailureMessageImpl.getFailure:()Ljava/lang/String"
387
- ],
388
- "all_deps_old": [
389
- "network/thunder/core/communication/nio/handler/mid/AuthenticationHandler.channelRead:(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)V",
390
- "network/thunder/core/communication/objects/messages/impl/message/FailureMessageImpl.getFailure:()Ljava/lang/String",
391
- "network/thunder/core/communication/objects/messages/impl/message/authentication/AuthenticationMessageImpl.getSignature:()[B",
392
- "network/thunder/core/communication/objects/messages/impl/message/authentication/AuthenticationMessageImpl.getPubkeyServer:()[B"
393
- ],
394
- "deps_changes": [
395
- {
396
- "method_sign": "network/thunder/core/communication/objects/messages/impl/message/authentication/AuthenticationMessageImpl.getPubkeyServer:()[B",
397
- "change_type": "DELETE",
398
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/message/authentication/AuthenticationMessageImpl.java",
399
- "file_path_new": null,
400
- "source": "production",
401
- "is_test_dependency": false,
402
- "is_refactoring_only": false
403
- },
404
- {
405
- "method_sign": "network/thunder/core/communication/objects/messages/impl/message/authentication/AuthenticationMessageImpl.getSignature:()[B",
406
- "change_type": "DELETE",
407
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/message/authentication/AuthenticationMessageImpl.java",
408
- "file_path_new": null,
409
- "source": "production",
410
- "is_test_dependency": false,
411
- "is_refactoring_only": false
412
- }
413
- ],
414
- "variant_result": {
415
- "old_on_old": "pass",
416
- "old_on_new": "error",
417
- "new_on_old": "error",
418
- "new_on_new": "pass"
419
- }
420
- }
421
- ],
422
- "version": "v0.1.2-alpha",
423
- "java_version": 8
424
- },
425
- {
426
- "task_id": "blockchain_thunder-v0.1.2-alpha__c6b2b28_68e8b3d__GossipHandlerTest_9263a350",
427
- "project_name": "blockchain_thunder-v0.1.2-alpha",
428
- "git_clone_url": "https://github.com/blockchain/thunder.git",
429
- "rev1": "c6b2b28e14c3768a804a701b2d8be1f4fac26843",
430
- "rev2": "68e8b3dc256aeac781050ba335866226979c7322",
431
- "rev1_date": "2016-01-29T09:22:25Z",
432
- "rev2_date": "2016-01-29T14:03:35Z",
433
- "git_diff_url": "https://github.com/blockchain/thunder/compare/c6b2b28e14c3768a804a701b2d8be1f4fac26843...68e8b3dc256aeac781050ba335866226979c7322",
434
- "test_file": "thunder-core/src/test/java/network/thunder/core/communication/nio/handler/mid/GossipHandlerTest.java",
435
- "test_changes": [
436
- {
437
- "change_id": "100_blockchain_thunder-v0.1.2-alpha_c6b2b28_68e8b3d_GossipHandlerTest",
438
- "test_sign": "network/thunder/core/communication/nio/handler/mid/GossipHandlerTest.shouldSendDataToNextPeer:()V",
439
- "class": "GossipHandlerTest",
440
- "method": "shouldSendDataToNextPeer",
441
- "module": "thunder-core",
442
- "junit_selector": "network.thunder.core.communication.nio.handler.mid.GossipHandlerTest#shouldSendDataToNextPeer",
443
- "old_test_code": "@Test\npublic void shouldSendDataToNextPeer() throws Exception {\n List<P2PDataObject> dataList = new ArrayList<>();\n for (int i = 0; i < GossipProcessor.OBJECT_AMOUNT_TO_SEND + 1; i++) {\n dataList.add(PubkeyChannelObject.getRandomObject());\n }\n GossipSendMessage sendDataObject = messageFactory.getGossipSendMessage(dataList);\n channel21.writeInbound(sendDataObject);\n channel32.writeInbound(channel23.readOutbound());\n channel23.writeInbound(channel32.readOutbound());\n channel32.writeInbound(channel23.readOutbound());\n channel43.writeInbound(channel34.readOutbound());\n channel34.writeInbound(channel43.readOutbound());\n channel43.writeInbound(channel34.readOutbound());\n assertTrue(checkListsEqual(dbHandler2.totalList, dataList));\n assertTrue(checkListsEqual(dbHandler3.totalList, dataList));\n assertTrue(checkListsEqual(dbHandler4.totalList, dataList));\n}",
444
- "new_test_code": "@Test\npublic void shouldSendDataToNextPeer() throws Exception {\n List<P2PDataObject> dataList = new ArrayList<>();\n for (int i = 0; i < GossipProcessor.OBJECT_AMOUNT_TO_SEND + 1; i++) {\n dataList.add(PubkeyChannelObject.getRandomObject());\n }\n GossipSendMessage sendDataObject = messageFactory.getGossipSendMessage(dataList);\n channel21.writeInbound(sendDataObject);\n channel32.writeInbound(channel23.readOutbound());\n channel23.writeInbound(channel32.readOutbound());\n channel32.writeInbound(channel23.readOutbound());\n channel43.writeInbound(channel34.readOutbound());\n channel34.writeInbound(channel43.readOutbound());\n channel43.writeInbound(channel34.readOutbound());\n assertTrue(dbHandler2.totalList.containsAll(dataList));\n assertTrue(dbHandler3.totalList.containsAll(dataList));\n assertTrue(dbHandler4.totalList.containsAll(dataList));\n}",
445
- "old_test_file_path": [
446
- "thunder-core/src/test/java/network/thunder/core/communication/nio/handler/mid/GossipHandlerTest.java"
447
- ],
448
- "old_test_lnum": [
449
- "179-200"
450
- ],
451
- "new_test_lnum": [
452
- "168-189"
453
- ],
454
- "old_production_code": "@Override\npublic void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n try {\n checkIfMessage(msg);\n if (msg instanceof FailureMessage) {\n System.out.println(\"In Failure: \" + ((FailureMessage) msg).getFailure());\n } else {\n System.out.println(layerName + \" I: \" + msg);\n Message message = (Message) msg;\n processor.onInboundMessage(message);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n}",
455
- "new_production_code": "@Override\npublic void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n try {\n checkIfMessage(msg);\n if (msg instanceof FailureMessage) {\n System.out.println(\"In Failure: \" + ((FailureMessage) msg).getFailure());\n } else {\n System.out.println(layerName + \" I: \" + msg);\n Message message = (Message) msg;\n message.verify();\n processor.onInboundMessage(message);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n}",
456
- "focal_file_path": "thunder-core/src/main/java/network/thunder/core/communication/nio/handler/ProcessorHandler.java",
457
- "focal_method_sign": "network/thunder/core/communication/nio/handler/ProcessorHandler.channelRead:(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)V",
458
- "focal_all_deps_scored": [
459
- {
460
- "dep_id": 0,
461
- "method_sign": "network/thunder/core/communication/nio/handler/ProcessorHandler.channelRead:(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)V",
462
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/nio/handler/ProcessorHandler.java",
463
- "line_nums_old": "34-49",
464
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/nio/handler/ProcessorHandler.java",
465
- "line_nums_new": "34-49",
466
- "dependency_updated": "updated",
467
- "score": null,
468
- "signal_scores": {}
469
- }
470
- ],
471
- "coverage_gold": 0.5686274509803921,
472
- "branch_coverage_gold": 5.5944,
473
- "method_coverage_gold": 10.0968,
474
- "line_coverage_gold": 8.2899,
475
- "is_traceback": false,
476
- "commit_gap": {
477
- "count": 21,
478
- "skipped_commits": [
479
- "6c8aa9ce69ef73d2095a067a11d67f65a1d51159",
480
- "6261baf84438d9fefa8f9168dfb4c1ec4527d003",
481
- "b169a75164ef6c07b4e3424c34e012da58134636",
482
- "a83a2e9806fa2db4bbd5dc448b6ddb5094be273a",
483
- "87afcf6f39163414495b78b2da9b360361b39073",
484
- "41c0622c6feb92710cfc5b30a219ca2f5c8a981b",
485
- "b257250c1b68530f2bfc45433955618f08ee1422",
486
- "e4dae0595c076879b5216e6cb919878fc0525181",
487
- "7c92dcd20467ef999a96eee7a37a99c78ffb967c",
488
- "444fe5a2fb715b270ab04389cb7b07d3ce566ca2",
489
- "3a54960818a145c3377bb2dde18ba9c87e71a293",
490
- "6b3e5de4c9c04d0fc2fa9d36cffe0e1df78e3b84",
491
- "278c375eb36b0b3bb80c4777ecf847a013bc580b",
492
- "f1a16c04c36fdb9e445212b4b8cd96c285fa1415",
493
- "b591cfc81fbbb0c9a7fd59d0fb67f9881bc49f09",
494
- "c63cbd05787f9e4f2dee1c33fcfbd7426d9b997d",
495
- "ed8003d6f13e0ff50330031b37d15e6814df7dc7",
496
- "1e588116e6eb818c7c5756d4fe10898c325a994b",
497
- "e91d37ca03a613d2d0175f0038c7f3d139d37441",
498
- "4880c6063ed875dac9b495d9bb03a0dd66dc01f8",
499
- "84ba13b8512b7783a7820640b3f495039a8b71e6"
500
- ]
501
- },
502
- "test_is_refactoring_only": false,
503
- "has_test_dep_change": false,
504
- "all_deps_new": [
505
- "network/thunder/core/communication/objects/messages/impl/message/gossip/objects/PubkeyChannelObject.getRandomObject:()Lnetwork/thunder/core/communication/objects/messages/impl/message/gossip/objects/PubkeyChannelObject",
506
- "network/thunder/core/communication/objects/messages/impl/factories/GossipMessageFactoryImpl.getGossipSendMessage:(Ljava/util/List;)Lnetwork/thunder/core/communication/objects/messages/impl/message/gossip/GossipSendMessage",
507
- "network/thunder/core/communication/nio/handler/ProcessorHandler.channelRead:(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)V",
508
- "network/thunder/core/communication/objects/messages/impl/message/gossip/objects/PubkeyChannelObject.equals:(Ljava/lang/Object;)Z"
509
- ],
510
- "all_deps_old": [
511
- "network/thunder/core/communication/objects/messages/impl/factories/GossipMessageFactoryImpl.getGossipSendMessage:(Ljava/util/List;)Lnetwork/thunder/core/communication/objects/messages/impl/message/gossip/GossipSendMessage",
512
- "network/thunder/core/communication/objects/messages/impl/message/gossip/objects/PubkeyChannelObject.getRandomObject:()Lnetwork/thunder/core/communication/objects/messages/impl/message/gossip/objects/PubkeyChannelObject",
513
- "network/thunder/core/communication/nio/handler/mid/GossipHandlerTest.checkListsEqual:(Ljava/util/List;Ljava/util/List;)Z",
514
- "network/thunder/core/communication/nio/handler/ProcessorHandler.channelRead:(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)V"
515
- ],
516
- "deps_changes": [
517
- {
518
- "method_sign": "network/thunder/core/communication/nio/handler/ProcessorHandler.channelRead:(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)V",
519
- "change_type": "UPDATE",
520
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/nio/handler/ProcessorHandler.java",
521
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/nio/handler/ProcessorHandler.java",
522
- "source": "production",
523
- "is_test_dependency": false,
524
- "is_refactoring_only": false
525
- }
526
- ],
527
- "variant_result": {
528
- "old_on_old": "pass",
529
- "old_on_new": "fail",
530
- "new_on_old": "pass",
531
- "new_on_new": "pass"
532
- }
533
- }
534
- ],
535
- "version": "v0.1.2-alpha",
536
- "java_version": 8
537
- },
538
- {
539
- "task_id": "blockchain_thunder-v0.1.2-alpha__f055ec1_6378efd__LNOnionHelperImplTest_b1c529aa",
540
- "project_name": "blockchain_thunder-v0.1.2-alpha",
541
- "git_clone_url": "https://github.com/blockchain/thunder.git",
542
- "rev1": "f055ec10f5c848a758c6422fff5cd6ed53187981",
543
- "rev2": "6378efdd3bb8ebfeafcfae417bf7939ca298acde",
544
- "rev1_date": "2016-02-03T07:33:57Z",
545
- "rev2_date": "2016-02-03T07:35:22Z",
546
- "git_diff_url": "https://github.com/blockchain/thunder/compare/f055ec10f5c848a758c6422fff5cd6ed53187981...6378efdd3bb8ebfeafcfae417bf7939ca298acde",
547
- "test_file": "thunder-core/src/test/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImplTest.java",
548
- "test_changes": [
549
- {
550
- "change_id": "38_blockchain_thunder-v0.1.2-alpha_f055ec1_6378efd_LNOnionHelperImplTest",
551
- "test_sign": "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImplTest.shouldBuildAndDeconstructCorrectFullOnion:()V",
552
- "class": "LNOnionHelperImplTest",
553
- "method": "shouldBuildAndDeconstructCorrectFullOnion",
554
- "module": "thunder-core",
555
- "junit_selector": "network.thunder.core.communication.objects.messages.impl.LNOnionHelperImplTest#shouldBuildAndDeconstructCorrectFullOnion",
556
- "old_test_code": "@Test\npublic void shouldBuildAndDeconstructCorrectFullOnion() {\n buildKeylist(OnionObject.MAX_HOPS);\n OnionObject object = onionHelper.createOnionObject(getByteList(keyList));\n List<byte[]> listFromOnion = new ArrayList<>();\n listFromOnion.add(keyList.get(0).getPubKey());\n for (ECKey key : keyList) {\n LNOnionHelper helperTemp = new LNOnionHelperImpl();\n helperTemp.init(key);\n helperTemp.loadMessage(null, object);\n listFromOnion.add(helperTemp.getNextHop().getPubKey());\n object = helperTemp.getMessageForNextHop();\n }\n for (int i = 0; i < keyList.size(); ++i) {\n ECKey key = keyList.get(i);\n byte[] keyOnion = listFromOnion.get(i);\n System.out.println(Tools.bytesToHex(key.getPubKey()) + \" \" + Tools.bytesToHex(keyOnion));\n assertTrue(Arrays.equals(key.getPubKey(), keyOnion));\n }\n}",
557
- "new_test_code": "@Test\npublic void shouldBuildAndDeconstructCorrectFullOnion() {\n buildKeylist(OnionObject.MAX_HOPS);\n OnionObject object = onionHelper.createOnionObject(getByteList(keyList));\n List<byte[]> listFromOnion = new ArrayList<>();\n listFromOnion.add(keyList.get(0).getPubKey());\n for (ECKey key : keyList) {\n LNOnionHelper helperTemp = new LNOnionHelperImpl();\n helperTemp.init(key);\n helperTemp.loadMessage(object);\n if (helperTemp.isLastHop()) {\n listFromOnion.add(key.getPubKey());\n } else {\n listFromOnion.add(helperTemp.getNextHop().getPubKey());\n object = helperTemp.getMessageForNextHop();\n }\n }\n for (int i = 0; i < keyList.size(); ++i) {\n ECKey key = keyList.get(i);\n byte[] keyOnion = listFromOnion.get(i);\n System.out.println(Tools.bytesToHex(key.getPubKey()) + \" \" + Tools.bytesToHex(keyOnion));\n assertTrue(Arrays.equals(key.getPubKey(), keyOnion));\n }\n}",
558
- "old_test_file_path": [
559
- "thunder-core/src/test/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImplTest.java"
560
- ],
561
- "old_test_lnum": [
562
- "30-55"
563
- ],
564
- "new_test_lnum": [
565
- "30-60"
566
- ],
567
- "old_production_code": "",
568
- "new_production_code": "@Override\npublic boolean isLastHop() {\n return lastHopReached;\n}",
569
- "focal_file_path": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.java",
570
- "focal_method_sign": "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.isLastHop:()Z",
571
- "focal_all_deps_scored": [
572
- {
573
- "dep_id": 1,
574
- "method_sign": "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.isLastHop:()Z",
575
- "file_path_old": null,
576
- "line_nums_old": null,
577
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.java",
578
- "line_nums_new": "142-145",
579
- "dependency_updated": "inserted",
580
- "score": 0.3333,
581
- "signal_scores": {
582
- "nc": 0.0,
583
- "lcs_u": 0.6667,
584
- "ed": 0.122,
585
- "class": 1.0,
586
- "tfidf": 0.031
587
- }
588
- },
589
- {
590
- "dep_id": 0,
591
- "method_sign": "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.loadMessage:(Lorg/bitcoinj/core/ECKey;Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject;)V",
592
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.java",
593
- "line_nums_old": "40-48",
594
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.java",
595
- "line_nums_new": "39-46",
596
- "dependency_updated": "updated",
597
- "score": 0.319,
598
- "signal_scores": {
599
- "nc": 0.0,
600
- "lcs_u": 0.5455,
601
- "ed": 0.1463,
602
- "class": 1.0,
603
- "tfidf": 0.0442
604
- }
605
- }
606
- ],
607
- "coverage_gold": 0.9767441860465116,
608
- "branch_coverage_gold": 1.2881,
609
- "method_coverage_gold": 2.8649,
610
- "line_coverage_gold": 4.1816,
611
- "is_traceback": false,
612
- "commit_gap": {
613
- "count": 0,
614
- "skipped_commits": []
615
- },
616
- "test_is_refactoring_only": false,
617
- "has_test_dep_change": false,
618
- "all_deps_new": [
619
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.init:(Lorg/bitcoinj/core/ECKey;)V",
620
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.isLastHop:()Z",
621
- "network/thunder/core/etc/Tools.bytesToHex:([B)Ljava/lang/String",
622
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.getNextHop:()Lorg/bitcoinj/core/ECKey",
623
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImplTest.buildKeylist:(I)V",
624
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.createOnionObject:(Ljava/util/List;)Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject",
625
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.getMessageForNextHop:()Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject",
626
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImplTest.getByteList:(Ljava/util/List;)Ljava/util/List",
627
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.loadMessage:(Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject;)V"
628
- ],
629
- "all_deps_old": [
630
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.init:(Lorg/bitcoinj/core/ECKey;)V",
631
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.getNextHop:()Lorg/bitcoinj/core/ECKey",
632
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.getMessageForNextHop:()Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject",
633
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImplTest.buildKeylist:(I)V",
634
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.createOnionObject:(Ljava/util/List;)Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject",
635
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImplTest.getByteList:(Ljava/util/List;)Ljava/util/List",
636
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.loadMessage:(Lorg/bitcoinj/core/ECKey;Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject;)V",
637
- "network/thunder/core/etc/Tools.bytesToHex:([B)Ljava/lang/String"
638
- ],
639
- "deps_changes": [
640
- {
641
- "method_sign": "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.loadMessage:(Lorg/bitcoinj/core/ECKey;Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject;)V",
642
- "change_type": "UPDATE",
643
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.java",
644
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.java",
645
- "source": "production",
646
- "is_test_dependency": false,
647
- "is_refactoring_only": true
648
- },
649
- {
650
- "method_sign": "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.isLastHop:()Z",
651
- "change_type": "ADD",
652
- "file_path_old": null,
653
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.java",
654
- "source": "production",
655
- "is_test_dependency": false,
656
- "is_refactoring_only": false
657
- }
658
- ],
659
- "variant_result": {
660
- "old_on_old": "pass",
661
- "old_on_new": "error",
662
- "new_on_old": "error",
663
- "new_on_new": "pass"
664
- }
665
- },
666
- {
667
- "change_id": "39_blockchain_thunder-v0.1.2-alpha_f055ec1_6378efd_LNOnionHelperImplTest",
668
- "test_sign": "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImplTest.shouldBuildAndDeconstructCorrectHalfOnion:()V",
669
- "class": "LNOnionHelperImplTest",
670
- "method": "shouldBuildAndDeconstructCorrectHalfOnion",
671
- "module": "thunder-core",
672
- "junit_selector": "network.thunder.core.communication.objects.messages.impl.LNOnionHelperImplTest#shouldBuildAndDeconstructCorrectHalfOnion",
673
- "old_test_code": "@Test\npublic void shouldBuildAndDeconstructCorrectHalfOnion() {\n buildKeylist(OnionObject.MAX_HOPS - 4);\n OnionObject object = onionHelper.createOnionObject(getByteList(keyList));\n List<byte[]> listFromOnion = new ArrayList<>();\n listFromOnion.add(keyList.get(0).getPubKey());\n for (ECKey key : keyList) {\n LNOnionHelper helperTemp = new LNOnionHelperImpl();\n helperTemp.init(key);\n helperTemp.loadMessage(null, object);\n listFromOnion.add(helperTemp.getNextHop().getPubKey());\n object = helperTemp.getMessageForNextHop();\n }\n for (int i = 0; i < keyList.size(); ++i) {\n ECKey key = keyList.get(i);\n byte[] keyOnion = listFromOnion.get(i);\n System.out.println(Tools.bytesToHex(key.getPubKey()) + \" \" + Tools.bytesToHex(keyOnion));\n assertTrue(Arrays.equals(key.getPubKey(), keyOnion));\n }\n}",
674
- "new_test_code": "@Test\npublic void shouldBuildAndDeconstructCorrectHalfOnion() {\n buildKeylist(OnionObject.MAX_HOPS - 4);\n OnionObject object = onionHelper.createOnionObject(getByteList(keyList));\n List<byte[]> listFromOnion = new ArrayList<>();\n listFromOnion.add(keyList.get(0).getPubKey());\n for (ECKey key : keyList) {\n LNOnionHelper helperTemp = new LNOnionHelperImpl();\n helperTemp.init(key);\n helperTemp.loadMessage(object);\n if (helperTemp.isLastHop()) {\n listFromOnion.add(key.getPubKey());\n } else {\n listFromOnion.add(helperTemp.getNextHop().getPubKey());\n object = helperTemp.getMessageForNextHop();\n }\n }\n for (int i = 0; i < keyList.size(); ++i) {\n ECKey key = keyList.get(i);\n byte[] keyOnion = listFromOnion.get(i);\n System.out.println(Tools.bytesToHex(key.getPubKey()) + \" \" + Tools.bytesToHex(keyOnion));\n assertTrue(Arrays.equals(key.getPubKey(), keyOnion));\n }\n}",
675
- "old_test_file_path": [
676
- "thunder-core/src/test/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImplTest.java"
677
- ],
678
- "old_test_lnum": [
679
- "57-82"
680
- ],
681
- "new_test_lnum": [
682
- "62-91"
683
- ],
684
- "old_production_code": "",
685
- "new_production_code": "@Override\npublic boolean isLastHop() {\n return lastHopReached;\n}",
686
- "focal_file_path": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.java",
687
- "focal_method_sign": "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.isLastHop:()Z",
688
- "focal_all_deps_scored": [
689
- {
690
- "dep_id": 1,
691
- "method_sign": "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.isLastHop:()Z",
692
- "file_path_old": null,
693
- "line_nums_old": null,
694
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.java",
695
- "line_nums_new": "142-145",
696
- "dependency_updated": "inserted",
697
- "score": 0.3569,
698
- "signal_scores": {
699
- "nc": 0.0,
700
- "lcs_u": 0.7778,
701
- "ed": 0.1463,
702
- "class": 1.0,
703
- "tfidf": 0.031
704
- }
705
- },
706
- {
707
- "dep_id": 0,
708
- "method_sign": "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.loadMessage:(Lorg/bitcoinj/core/ECKey;Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject;)V",
709
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.java",
710
- "line_nums_old": "40-48",
711
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.java",
712
- "line_nums_new": "39-46",
713
- "dependency_updated": "updated",
714
- "score": 0.319,
715
- "signal_scores": {
716
- "nc": 0.0,
717
- "lcs_u": 0.5455,
718
- "ed": 0.1463,
719
- "class": 1.0,
720
- "tfidf": 0.0442
721
- }
722
- }
723
- ],
724
- "coverage_gold": 0.9767441860465116,
725
- "branch_coverage_gold": 1.2881,
726
- "method_coverage_gold": 2.8649,
727
- "line_coverage_gold": 4.1816,
728
- "is_traceback": false,
729
- "commit_gap": {
730
- "count": 0,
731
- "skipped_commits": []
732
- },
733
- "test_is_refactoring_only": false,
734
- "has_test_dep_change": false,
735
- "all_deps_new": [
736
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.init:(Lorg/bitcoinj/core/ECKey;)V",
737
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.isLastHop:()Z",
738
- "network/thunder/core/etc/Tools.bytesToHex:([B)Ljava/lang/String",
739
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.getNextHop:()Lorg/bitcoinj/core/ECKey",
740
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImplTest.buildKeylist:(I)V",
741
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.createOnionObject:(Ljava/util/List;)Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject",
742
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.getMessageForNextHop:()Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject",
743
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImplTest.getByteList:(Ljava/util/List;)Ljava/util/List",
744
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.loadMessage:(Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject;)V"
745
- ],
746
- "all_deps_old": [
747
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.init:(Lorg/bitcoinj/core/ECKey;)V",
748
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.getNextHop:()Lorg/bitcoinj/core/ECKey",
749
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.getMessageForNextHop:()Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject",
750
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImplTest.buildKeylist:(I)V",
751
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.createOnionObject:(Ljava/util/List;)Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject",
752
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImplTest.getByteList:(Ljava/util/List;)Ljava/util/List",
753
- "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.loadMessage:(Lorg/bitcoinj/core/ECKey;Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject;)V",
754
- "network/thunder/core/etc/Tools.bytesToHex:([B)Ljava/lang/String"
755
- ],
756
- "deps_changes": [
757
- {
758
- "method_sign": "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.loadMessage:(Lorg/bitcoinj/core/ECKey;Lnetwork/thunder/core/communication/objects/messages/impl/message/lnpayment/OnionObject;)V",
759
- "change_type": "UPDATE",
760
- "file_path_old": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.java",
761
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.java",
762
- "source": "production",
763
- "is_test_dependency": false,
764
- "is_refactoring_only": true
765
- },
766
- {
767
- "method_sign": "network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.isLastHop:()Z",
768
- "change_type": "ADD",
769
- "file_path_old": null,
770
- "file_path_new": "thunder-core/src/main/java/network/thunder/core/communication/objects/messages/impl/LNOnionHelperImpl.java",
771
- "source": "production",
772
- "is_test_dependency": false,
773
- "is_refactoring_only": false
774
- }
775
- ],
776
- "variant_result": {
777
- "old_on_old": "pass",
778
- "old_on_new": "error",
779
- "new_on_old": "error",
780
- "new_on_new": "pass"
781
- }
782
- }
783
- ],
784
- "version": "v0.1.2-alpha",
785
- "java_version": 8
786
- }
787
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
casbin_jcasbin-v1.99.0.json DELETED
@@ -1,133 +0,0 @@
1
- [
2
- {
3
- "task_id": "casbin_jcasbin-v1.99.0__324b192_abdbe3e__ManagementAPIUnitTest_faaf4924",
4
- "project_name": "casbin_jcasbin-v1.99.0",
5
- "git_clone_url": "https://github.com/casbin/jcasbin.git",
6
- "rev1": "324b192b47e7dd836c78be7b54793f841e68764e",
7
- "rev2": "abdbe3e5ed58a7a8e22000f9110237ad5fad9d36",
8
- "rev1_date": "2021-10-15T10:16:19Z",
9
- "rev2_date": "2021-10-15T10:46:09Z",
10
- "git_diff_url": "https://github.com/casbin/jcasbin/compare/324b192b47e7dd836c78be7b54793f841e68764e...abdbe3e5ed58a7a8e22000f9110237ad5fad9d36",
11
- "test_file": "src/test/java/org/casbin/jcasbin/main/ManagementAPIUnitTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "22_casbin_jcasbin-v1.99.0_324b192_abdbe3e_ManagementAPIUnitTest",
15
- "test_sign": "org/casbin/jcasbin/main/ManagementAPIUnitTest.testModifyGroupingPolicyAPI:()V",
16
- "class": "ManagementAPIUnitTest",
17
- "method": "testModifyGroupingPolicyAPI",
18
- "module": "",
19
- "junit_selector": "org.casbin.jcasbin.main.ManagementAPIUnitTest#testModifyGroupingPolicyAPI",
20
- "old_test_code": "@Test\npublic void testModifyGroupingPolicyAPI() {\n Enforcer e = new Enforcer(\"examples/rbac_model.conf\", \"examples/rbac_policy.csv\");\n testGetRoles(e, \"alice\", asList(\"data2_admin\"));\n testGetRoles(e, \"bob\", asList());\n testGetRoles(e, \"eve\", asList());\n testGetRoles(e, \"non_exist\", asList());\n e.removeGroupingPolicy(\"alice\", \"data2_admin\");\n e.addGroupingPolicy(\"bob\", \"data1_admin\");\n e.addGroupingPolicy(\"eve\", \"data3_admin\");\n List<String> namedGroupingPolicy = asList(\"alice\", \"data2_admin\");\n testGetRoles(e, \"alice\", asList());\n e.addNamedGroupingPolicy(\"g\", namedGroupingPolicy);\n testGetRoles(e, \"alice\", asList(\"data2_admin\"));\n e.removeNamedGroupingPolicy(\"g\", namedGroupingPolicy);\n testGetRoles(e, \"alice\", asList());\n testGetRoles(e, \"bob\", asList(\"data1_admin\"));\n testGetRoles(e, \"eve\", asList(\"data3_admin\"));\n testGetRoles(e, \"non_exist\", asList());\n testGetUsers(e, \"data1_admin\", asList(\"bob\"));\n testGetUsers(e, \"data2_admin\", asList());\n testGetUsers(e, \"data3_admin\", asList(\"eve\"));\n e.removeFilteredGroupingPolicy(0, \"bob\");\n testGetRoles(e, \"alice\", asList());\n testGetRoles(e, \"bob\", asList());\n testGetRoles(e, \"eve\", asList(\"data3_admin\"));\n testGetRoles(e, \"non_exist\", asList());\n testGetUsers(e, \"data1_admin\", asList());\n testGetUsers(e, \"data2_admin\", asList());\n testGetUsers(e, \"data3_admin\", asList(\"eve\"));\n e.updateGroupingPolicy(asList(\"eve\", \"data3_admin\"), asList(\"eve\", \"data3_admin_update\"));\n testGetRoles(e, \"alice\", asList());\n testGetRoles(e, \"bob\", asList());\n testGetRoles(e, \"eve\", asList(\"data3_admin_update\"));\n testGetRoles(e, \"non_exist\", asList());\n testGetUsers(e, \"data1_admin\", asList());\n testGetUsers(e, \"data2_admin\", asList());\n testGetUsers(e, \"data3_admin_update\", asList(\"eve\"));\n e.updateNamedGroupingPolicy(\"g\", asList(\"eve\", \"data3_admin_update\"), asList(\"eve\", \"data3_admin\"));\n testGetRoles(e, \"alice\", asList());\n testGetRoles(e, \"bob\", asList());\n testGetRoles(e, \"eve\", asList(\"data3_admin\"));\n testGetRoles(e, \"non_exist\", asList());\n testGetUsers(e, \"data1_admin\", asList());\n testGetUsers(e, \"data2_admin\", asList());\n testGetUsers(e, \"data3_admin\", asList(\"eve\"));\n}",
21
- "new_test_code": "@Test\npublic void testModifyGroupingPolicyAPI() {\n Enforcer e = new Enforcer(\"examples/rbac_model.conf\", \"examples/rbac_policy.csv\");\n testGetRoles(e, \"alice\", asList(\"data2_admin\"));\n testGetRoles(e, \"bob\", asList());\n testGetRoles(e, \"eve\", asList());\n testGetRoles(e, \"non_exist\", asList());\n e.removeGroupingPolicy(\"alice\", \"data2_admin\");\n e.addGroupingPolicy(\"bob\", \"data1_admin\");\n e.addGroupingPolicy(\"eve\", \"data3_admin\");\n List<String> namedGroupingPolicy = asList(\"alice\", \"data2_admin\");\n testGetRoles(e, \"alice\", asList());\n e.addNamedGroupingPolicy(\"g\", namedGroupingPolicy);\n testGetRoles(e, \"alice\", asList(\"data2_admin\"));\n e.removeNamedGroupingPolicy(\"g\", namedGroupingPolicy);\n testGetRoles(e, \"alice\", asList());\n testGetRoles(e, \"bob\", asList(\"data1_admin\"));\n testGetRoles(e, \"eve\", asList(\"data3_admin\"));\n testGetRoles(e, \"non_exist\", asList());\n testGetUsers(e, \"data1_admin\", asList(\"bob\"));\n testGetUsers(e, \"data2_admin\", asList());\n testGetUsers(e, \"data3_admin\", asList(\"eve\"));\n e.removeFilteredGroupingPolicy(0, \"bob\");\n testGetRoles(e, \"alice\", asList());\n testGetRoles(e, \"bob\", asList());\n testGetRoles(e, \"eve\", asList(\"data3_admin\"));\n testGetRoles(e, \"non_exist\", asList());\n testGetUsers(e, \"data1_admin\", asList());\n testGetUsers(e, \"data2_admin\", asList());\n testGetUsers(e, \"data3_admin\", asList(\"eve\"));\n}",
22
- "old_test_file_path": [
23
- "src/test/java/org/casbin/jcasbin/main/ManagementAPIUnitTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "102-162"
27
- ],
28
- "new_test_lnum": [
29
- "96-134"
30
- ],
31
- "old_production_code": "public boolean updateGroupingPolicy(List<String> params1, List<String> params2) {\n return updateNamedGroupingPolicy(\"g\", params1, params2);\n}",
32
- "new_production_code": "",
33
- "focal_file_path": "src/main/java/org/casbin/jcasbin/main/ManagementEnforcer.java",
34
- "focal_method_sign": "org/casbin/jcasbin/main/ManagementEnforcer.updateGroupingPolicy:(Ljava/util/List;Ljava/util/List;)Z",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "org/casbin/jcasbin/main/ManagementEnforcer.updateGroupingPolicy:(Ljava/util/List;Ljava/util/List;)Z",
39
- "file_path_old": "src/main/java/org/casbin/jcasbin/main/ManagementEnforcer.java",
40
- "line_nums_old": "324-326",
41
- "file_path_new": null,
42
- "line_nums_new": null,
43
- "dependency_updated": "deleted",
44
- "score": 0.2457,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 0.75,
48
- "ed": 0.6522,
49
- "class": 0.0,
50
- "tfidf": 0.0252
51
- }
52
- },
53
- {
54
- "dep_id": 1,
55
- "method_sign": "org/casbin/jcasbin/main/ManagementEnforcer.updateNamedGroupingPolicy:(Ljava/lang/String;Ljava/util/List;Ljava/util/List;)Z",
56
- "file_path_old": "src/main/java/org/casbin/jcasbin/main/ManagementEnforcer.java",
57
- "line_nums_old": "336-338",
58
- "file_path_new": null,
59
- "line_nums_new": null,
60
- "dependency_updated": "deleted",
61
- "score": 0.1944,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 0.64,
65
- "ed": 0.48,
66
- "class": 0.0,
67
- "tfidf": 0.0101
68
- }
69
- }
70
- ],
71
- "coverage_gold": 1.0,
72
- "branch_coverage_gold": 21.6155,
73
- "method_coverage_gold": 26.2115,
74
- "line_coverage_gold": 25.0714,
75
- "is_traceback": false,
76
- "commit_gap": {
77
- "count": 0,
78
- "skipped_commits": []
79
- },
80
- "test_is_refactoring_only": false,
81
- "has_test_dep_change": false,
82
- "all_deps_new": [
83
- "org/casbin/jcasbin/main/ManagementEnforcer.removeGroupingPolicy:([Ljava/lang/String;)Z",
84
- "org/casbin/jcasbin/main/TestUtil.testGetUsers:(Lorg/casbin/jcasbin/main/Enforcer;Ljava/lang/String;Ljava/util/List;)V",
85
- "org/casbin/jcasbin/main/ManagementEnforcer.removeNamedGroupingPolicy:(Ljava/lang/String;Ljava/util/List;)Z",
86
- "org/casbin/jcasbin/main/ManagementEnforcer.addNamedGroupingPolicy:(Ljava/lang/String;Ljava/util/List;)Z",
87
- "org/casbin/jcasbin/main/ManagementEnforcer.removeFilteredGroupingPolicy:(I[Ljava/lang/String;)Z",
88
- "org/casbin/jcasbin/main/TestUtil.testGetRoles:(Lorg/casbin/jcasbin/main/Enforcer;Ljava/lang/String;Ljava/util/List;)V",
89
- "org/casbin/jcasbin/main/ManagementEnforcer.addGroupingPolicy:([Ljava/lang/String;)Z"
90
- ],
91
- "all_deps_old": [
92
- "org/casbin/jcasbin/main/ManagementEnforcer.removeFilteredGroupingPolicy:(I[Ljava/lang/String;)Z",
93
- "org/casbin/jcasbin/main/ManagementEnforcer.addNamedGroupingPolicy:(Ljava/lang/String;Ljava/util/List;)Z",
94
- "org/casbin/jcasbin/main/ManagementEnforcer.addGroupingPolicy:([Ljava/lang/String;)Z",
95
- "org/casbin/jcasbin/main/ManagementEnforcer.removeGroupingPolicy:([Ljava/lang/String;)Z",
96
- "org/casbin/jcasbin/main/ManagementEnforcer.removeNamedGroupingPolicy:(Ljava/lang/String;Ljava/util/List;)Z",
97
- "org/casbin/jcasbin/main/ManagementEnforcer.updateNamedGroupingPolicy:(Ljava/lang/String;Ljava/util/List;Ljava/util/List;)Z",
98
- "org/casbin/jcasbin/main/ManagementEnforcer.updateGroupingPolicy:(Ljava/util/List;Ljava/util/List;)Z",
99
- "org/casbin/jcasbin/main/TestUtil.testGetRoles:(Lorg/casbin/jcasbin/main/Enforcer;Ljava/lang/String;Ljava/util/List;)V",
100
- "org/casbin/jcasbin/main/TestUtil.testGetUsers:(Lorg/casbin/jcasbin/main/Enforcer;Ljava/lang/String;Ljava/util/List;)V"
101
- ],
102
- "deps_changes": [
103
- {
104
- "method_sign": "org/casbin/jcasbin/main/ManagementEnforcer.updateGroupingPolicy:(Ljava/util/List;Ljava/util/List;)Z",
105
- "change_type": "DELETE",
106
- "file_path_old": "src/main/java/org/casbin/jcasbin/main/ManagementEnforcer.java",
107
- "file_path_new": null,
108
- "source": "production",
109
- "is_test_dependency": false,
110
- "is_refactoring_only": false
111
- },
112
- {
113
- "method_sign": "org/casbin/jcasbin/main/ManagementEnforcer.updateNamedGroupingPolicy:(Ljava/lang/String;Ljava/util/List;Ljava/util/List;)Z",
114
- "change_type": "DELETE",
115
- "file_path_old": "src/main/java/org/casbin/jcasbin/main/ManagementEnforcer.java",
116
- "file_path_new": null,
117
- "source": "production",
118
- "is_test_dependency": false,
119
- "is_refactoring_only": false
120
- }
121
- ],
122
- "variant_result": {
123
- "old_on_old": "pass",
124
- "old_on_new": "error",
125
- "new_on_old": "pass",
126
- "new_on_new": "pass"
127
- }
128
- }
129
- ],
130
- "version": "v1.99.0",
131
- "java_version": 8
132
- }
133
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/train.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
datafaker-net_datafaker-v2.4.2.json DELETED
@@ -1,394 +0,0 @@
1
- [
2
- {
3
- "task_id": "datafaker-net_datafaker-v2.4.2__1f346c7_b2ebdc1__FakeValuesTest_02e157a3",
4
- "project_name": "datafaker-net_datafaker-v2.4.2",
5
- "git_clone_url": "https://github.com/datafaker-net/datafaker.git",
6
- "rev1": "1f346c7ead5ead27105ed943de689861e1dd869b",
7
- "rev2": "b2ebdc145dc02623f0692915a538ea1dee8bbf4b",
8
- "rev1_date": "2024-08-23T08:00:34Z",
9
- "rev2_date": "2024-08-23T17:02:51Z",
10
- "git_diff_url": "https://github.com/datafaker-net/datafaker/compare/1f346c7ead5ead27105ed943de689861e1dd869b...b2ebdc145dc02623f0692915a538ea1dee8bbf4b",
11
- "test_file": "src/test/java/net/datafaker/service/FakeValuesTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "73_datafaker-net_datafaker-v2.4.2_1f346c7_b2ebdc1_FakeValuesTest",
15
- "test_sign": "net/datafaker/service/FakeValuesTest.incorrectPathForHebrewLanguage:()V",
16
- "class": "FakeValuesTest",
17
- "method": "incorrectPathForHebrewLanguage",
18
- "module": "",
19
- "junit_selector": "net.datafaker.service.FakeValuesTest#incorrectPathForHebrewLanguage",
20
- "old_test_code": "@Test\nvoid incorrectPathForHebrewLanguage() {\n FakeValues hebrew = FakeValues.of(FakeValuesContext.of(new Locale(\"iw\")));\n assertThat(hebrew.getPathes()).doesNotContain(\"iw\");\n}",
21
- "new_test_code": "@Test\nvoid incorrectPathForHebrewLanguage() {\n FakeValues hebrew = FakeValues.of(FakeValuesContext.of(new Locale(\"iw\")));\n assertThat(hebrew.getPaths()).doesNotContain(\"iw\");\n}",
22
- "old_test_file_path": [
23
- "src/test/java/net/datafaker/service/FakeValuesTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "103-107"
27
- ],
28
- "new_test_lnum": [
29
- "93-97"
30
- ],
31
- "old_production_code": "Set<String> getPathes() {\n return fakeValuesContext.getPaths();\n}",
32
- "new_production_code": "",
33
- "focal_file_path": "src/main/java/net/datafaker/service/FakeValues.java",
34
- "focal_method_sign": "net/datafaker/service/FakeValues.getPathes:()Ljava/util/Set",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 2,
38
- "method_sign": "net/datafaker/service/FakeValues.getPathes:()Ljava/util/Set",
39
- "file_path_old": "src/main/java/net/datafaker/service/FakeValues.java",
40
- "line_nums_old": "188-190",
41
- "file_path_new": null,
42
- "line_nums_new": null,
43
- "dependency_updated": "deleted",
44
- "score": 0.3927,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 0.7778,
48
- "ed": 0.2333,
49
- "class": 1.0,
50
- "tfidf": 0.1225
51
- }
52
- },
53
- {
54
- "dep_id": 0,
55
- "method_sign": "net/datafaker/service/FakeValues.of:(Lnet/datafaker/service/FakeValuesContext;)Lnet/datafaker/service/FakeValues",
56
- "file_path_old": "src/main/java/net/datafaker/service/FakeValues.java",
57
- "line_nums_old": "38-48",
58
- "file_path_new": "src/main/java/net/datafaker/service/FakeValues.java",
59
- "line_nums_new": "27-29",
60
- "dependency_updated": "updated",
61
- "score": 0.3757,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 1.0,
65
- "ed": 0.0667,
66
- "class": 1.0,
67
- "tfidf": 0.0
68
- }
69
- },
70
- {
71
- "dep_id": 1,
72
- "method_sign": "net/datafaker/service/FakeValues.getPaths:()Ljava/util/Set",
73
- "file_path_old": null,
74
- "line_nums_old": null,
75
- "file_path_new": "src/main/java/net/datafaker/service/FakeValues.java",
76
- "line_nums_new": "158-162",
77
- "dependency_updated": "inserted",
78
- "score": 0.3601,
79
- "signal_scores": {
80
- "nc": 0.0,
81
- "lcs_u": 0.75,
82
- "ed": 0.2,
83
- "class": 1.0,
84
- "tfidf": 0.0281
85
- }
86
- }
87
- ],
88
- "coverage_gold": 0.8,
89
- "branch_coverage_gold": 0.5534,
90
- "method_coverage_gold": 0.6615,
91
- "line_coverage_gold": 0.8375,
92
- "is_traceback": false,
93
- "commit_gap": {
94
- "count": 2,
95
- "skipped_commits": [
96
- "523e7226a08ca37254e4a9e8cdc7a7e809d4dc7b",
97
- "4e56fd719e9c4993f4e050e1565e155a5aeded21"
98
- ]
99
- },
100
- "test_is_refactoring_only": false,
101
- "has_test_dep_change": false,
102
- "all_deps_new": [
103
- "net/datafaker/service/FakeValuesContext.of:(Ljava/util/Locale;)Lnet/datafaker/service/FakeValuesContext",
104
- "net/datafaker/service/FakeValues.of:(Lnet/datafaker/service/FakeValuesContext;)Lnet/datafaker/service/FakeValues",
105
- "net/datafaker/TestSetupExtension.afterEach:(Lorg/junit/jupiter/api/extension/ExtensionContext;)V",
106
- "net/datafaker/service/FakeValues.getPaths:()Ljava/util/Set"
107
- ],
108
- "all_deps_old": [
109
- "net/datafaker/TestSetupExtension.afterEach:(Lorg/junit/jupiter/api/extension/ExtensionContext;)V",
110
- "net/datafaker/service/FakeValuesContext.of:(Ljava/util/Locale;)Lnet/datafaker/service/FakeValuesContext",
111
- "net/datafaker/service/FakeValues.of:(Lnet/datafaker/service/FakeValuesContext;)Lnet/datafaker/service/FakeValues",
112
- "net/datafaker/service/FakeValues.getPathes:()Ljava/util/Set"
113
- ],
114
- "deps_changes": [
115
- {
116
- "method_sign": "net/datafaker/service/FakeValues.of:(Lnet/datafaker/service/FakeValuesContext;)Lnet/datafaker/service/FakeValues",
117
- "change_type": "UPDATE",
118
- "file_path_old": "src/main/java/net/datafaker/service/FakeValues.java",
119
- "file_path_new": "src/main/java/net/datafaker/service/FakeValues.java",
120
- "source": "production",
121
- "is_test_dependency": false,
122
- "is_refactoring_only": false
123
- },
124
- {
125
- "method_sign": "net/datafaker/service/FakeValues.getPaths:()Ljava/util/Set",
126
- "change_type": "ADD",
127
- "file_path_old": null,
128
- "file_path_new": "src/main/java/net/datafaker/service/FakeValues.java",
129
- "source": "production",
130
- "is_test_dependency": false,
131
- "is_refactoring_only": false
132
- },
133
- {
134
- "method_sign": "net/datafaker/service/FakeValues.getPathes:()Ljava/util/Set",
135
- "change_type": "DELETE",
136
- "file_path_old": "src/main/java/net/datafaker/service/FakeValues.java",
137
- "file_path_new": null,
138
- "source": "production",
139
- "is_test_dependency": false,
140
- "is_refactoring_only": false
141
- }
142
- ],
143
- "variant_result": {
144
- "old_on_old": "pass",
145
- "old_on_new": "error",
146
- "new_on_old": "error",
147
- "new_on_new": "pass"
148
- }
149
- },
150
- {
151
- "change_id": "74_datafaker-net_datafaker-v2.4.2_1f346c7_b2ebdc1_FakeValuesTest",
152
- "test_sign": "net/datafaker/service/FakeValuesTest.correctPathForHebrewLanguage:()V",
153
- "class": "FakeValuesTest",
154
- "method": "correctPathForHebrewLanguage",
155
- "module": "",
156
- "junit_selector": "net.datafaker.service.FakeValuesTest#correctPathForHebrewLanguage",
157
- "old_test_code": "@Test\nvoid correctPathForHebrewLanguage() {\n FakeValues hebrew = FakeValues.of(FakeValuesContext.of(new Locale(\"iw\")));\n assertThat(hebrew.getPathes()).containsExactly(\"he\");\n}",
158
- "new_test_code": "@Test\nvoid correctPathForHebrewLanguage() {\n FakeValues hebrew = FakeValues.of(FakeValuesContext.of(new Locale(\"iw\")));\n assertThat(hebrew.getPaths()).containsExactly(\"he\");\n}",
159
- "old_test_file_path": [
160
- "src/test/java/net/datafaker/service/FakeValuesTest.java"
161
- ],
162
- "old_test_lnum": [
163
- "97-101"
164
- ],
165
- "new_test_lnum": [
166
- "87-91"
167
- ],
168
- "old_production_code": "Set<String> getPathes() {\n return fakeValuesContext.getPaths();\n}",
169
- "new_production_code": "",
170
- "focal_file_path": "src/main/java/net/datafaker/service/FakeValues.java",
171
- "focal_method_sign": "net/datafaker/service/FakeValues.getPathes:()Ljava/util/Set",
172
- "focal_all_deps_scored": [
173
- {
174
- "dep_id": 2,
175
- "method_sign": "net/datafaker/service/FakeValues.getPathes:()Ljava/util/Set",
176
- "file_path_old": "src/main/java/net/datafaker/service/FakeValues.java",
177
- "line_nums_old": "188-190",
178
- "file_path_new": null,
179
- "line_nums_new": null,
180
- "dependency_updated": "deleted",
181
- "score": 0.3955,
182
- "signal_scores": {
183
- "nc": 0.0,
184
- "lcs_u": 0.7778,
185
- "ed": 0.25,
186
- "class": 1.0,
187
- "tfidf": 0.1225
188
- }
189
- },
190
- {
191
- "dep_id": 0,
192
- "method_sign": "net/datafaker/service/FakeValues.of:(Lnet/datafaker/service/FakeValuesContext;)Lnet/datafaker/service/FakeValues",
193
- "file_path_old": "src/main/java/net/datafaker/service/FakeValues.java",
194
- "line_nums_old": "38-48",
195
- "file_path_new": "src/main/java/net/datafaker/service/FakeValues.java",
196
- "line_nums_new": "27-29",
197
- "dependency_updated": "updated",
198
- "score": 0.3765,
199
- "signal_scores": {
200
- "nc": 0.0,
201
- "lcs_u": 1.0,
202
- "ed": 0.0714,
203
- "class": 1.0,
204
- "tfidf": 0.0
205
- }
206
- },
207
- {
208
- "dep_id": 1,
209
- "method_sign": "net/datafaker/service/FakeValues.getPaths:()Ljava/util/Set",
210
- "file_path_old": null,
211
- "line_nums_old": null,
212
- "file_path_new": "src/main/java/net/datafaker/service/FakeValues.java",
213
- "line_nums_new": "158-162",
214
- "dependency_updated": "inserted",
215
- "score": 0.3625,
216
- "signal_scores": {
217
- "nc": 0.0,
218
- "lcs_u": 0.75,
219
- "ed": 0.2143,
220
- "class": 1.0,
221
- "tfidf": 0.0281
222
- }
223
- }
224
- ],
225
- "coverage_gold": 0.8,
226
- "branch_coverage_gold": 0.5534,
227
- "method_coverage_gold": 0.6615,
228
- "line_coverage_gold": 0.8375,
229
- "is_traceback": false,
230
- "commit_gap": {
231
- "count": 2,
232
- "skipped_commits": [
233
- "523e7226a08ca37254e4a9e8cdc7a7e809d4dc7b",
234
- "4e56fd719e9c4993f4e050e1565e155a5aeded21"
235
- ]
236
- },
237
- "test_is_refactoring_only": false,
238
- "has_test_dep_change": false,
239
- "all_deps_new": [
240
- "net/datafaker/service/FakeValuesContext.of:(Ljava/util/Locale;)Lnet/datafaker/service/FakeValuesContext",
241
- "net/datafaker/service/FakeValues.of:(Lnet/datafaker/service/FakeValuesContext;)Lnet/datafaker/service/FakeValues",
242
- "net/datafaker/TestSetupExtension.afterEach:(Lorg/junit/jupiter/api/extension/ExtensionContext;)V",
243
- "net/datafaker/service/FakeValues.getPaths:()Ljava/util/Set"
244
- ],
245
- "all_deps_old": [
246
- "net/datafaker/TestSetupExtension.afterEach:(Lorg/junit/jupiter/api/extension/ExtensionContext;)V",
247
- "net/datafaker/service/FakeValuesContext.of:(Ljava/util/Locale;)Lnet/datafaker/service/FakeValuesContext",
248
- "net/datafaker/service/FakeValues.of:(Lnet/datafaker/service/FakeValuesContext;)Lnet/datafaker/service/FakeValues",
249
- "net/datafaker/service/FakeValues.getPathes:()Ljava/util/Set"
250
- ],
251
- "deps_changes": [
252
- {
253
- "method_sign": "net/datafaker/service/FakeValues.of:(Lnet/datafaker/service/FakeValuesContext;)Lnet/datafaker/service/FakeValues",
254
- "change_type": "UPDATE",
255
- "file_path_old": "src/main/java/net/datafaker/service/FakeValues.java",
256
- "file_path_new": "src/main/java/net/datafaker/service/FakeValues.java",
257
- "source": "production",
258
- "is_test_dependency": false,
259
- "is_refactoring_only": false
260
- },
261
- {
262
- "method_sign": "net/datafaker/service/FakeValues.getPaths:()Ljava/util/Set",
263
- "change_type": "ADD",
264
- "file_path_old": null,
265
- "file_path_new": "src/main/java/net/datafaker/service/FakeValues.java",
266
- "source": "production",
267
- "is_test_dependency": false,
268
- "is_refactoring_only": false
269
- },
270
- {
271
- "method_sign": "net/datafaker/service/FakeValues.getPathes:()Ljava/util/Set",
272
- "change_type": "DELETE",
273
- "file_path_old": "src/main/java/net/datafaker/service/FakeValues.java",
274
- "file_path_new": null,
275
- "source": "production",
276
- "is_test_dependency": false,
277
- "is_refactoring_only": false
278
- }
279
- ],
280
- "variant_result": {
281
- "old_on_old": "pass",
282
- "old_on_new": "error",
283
- "new_on_old": "error",
284
- "new_on_new": "pass"
285
- }
286
- }
287
- ],
288
- "version": "v2.4.2",
289
- "java_version": 17
290
- },
291
- {
292
- "task_id": "datafaker-net_datafaker-v2.4.2__63b6ba4_6f00a78__RandomServiceTest_67fd7a06",
293
- "project_name": "datafaker-net_datafaker-v2.4.2",
294
- "git_clone_url": "https://github.com/datafaker-net/datafaker.git",
295
- "rev1": "63b6ba4d0237c10dd028234c757a1cc770a5ce7d",
296
- "rev2": "6f00a785b70c62596d2edc51bf05f33db0f3b8e0",
297
- "rev1_date": "2024-10-31T12:24:28Z",
298
- "rev2_date": "2024-10-31T14:56:28Z",
299
- "git_diff_url": "https://github.com/datafaker-net/datafaker/compare/63b6ba4d0237c10dd028234c757a1cc770a5ce7d...6f00a785b70c62596d2edc51bf05f33db0f3b8e0",
300
- "test_file": "src/test/java/net/datafaker/service/RandomServiceTest.java",
301
- "test_changes": [
302
- {
303
- "change_id": "69_datafaker-net_datafaker-v2.4.2_63b6ba4_6f00a78_RandomServiceTest",
304
- "test_sign": "net/datafaker/service/RandomServiceTest.predictableRandomRange:()V",
305
- "class": "RandomServiceTest",
306
- "method": "predictableRandomRange",
307
- "module": "",
308
- "junit_selector": "net.datafaker.service.RandomServiceTest#predictableRandomRange",
309
- "old_test_code": "@Test\nvoid predictableRandomRange() {\n RandomService randomService = new RandomService(new Random(10));\n int i1 = randomService.nextInt();\n int i2 = randomService.nextInt(100);\n int i3 = randomService.nextInt(0, 100);\n float f1 = randomService.nextFloat();\n long l1 = randomService.nextLong();\n long l2 = randomService.nextLong(100);\n long l3 = randomService.nextLong(100, 1000);\n boolean b = randomService.nextBoolean();\n assertThat(i1).isEqualTo(-1157793070);\n assertThat(i2).isEqualTo(80);\n assertThat(i3).isEqualTo(35);\n assertThat(f1).isEqualTo(0.41291267F);\n assertThat(l1).isEqualTo(1092083446069765248L);\n assertThat(l2).isEqualTo(1L);\n assertThat(l3).isEqualTo(538L);\n assertThat(b).isFalse();\n}",
310
- "new_test_code": "@Test\nvoid predictableRandomRange() {\n RandomService randomService = new RandomService(new Random(10));\n int i1 = randomService.nextInt();\n int i2 = randomService.nextInt(100);\n int i3 = randomService.nextInt(0, 100);\n float f1 = randomService.nextFloat();\n long l1 = randomService.nextLong();\n long l2 = randomService.nextLong(100);\n long l3 = randomService.nextLong(100, 1000);\n boolean b = randomService.nextBoolean();\n assertThat(i1).isEqualTo(-1157793070);\n assertThat(i2).isEqualTo(80);\n assertThat(i3).isEqualTo(35);\n assertThat(f1).isEqualTo(0.41291267F);\n assertThat(l1).isEqualTo(1092083446069765248L);\n assertThat(l2).isEqualTo(0L);\n assertThat(l3).isEqualTo(538L);\n assertThat(b).isFalse();\n}",
311
- "old_test_file_path": [
312
- "src/test/java/net/datafaker/service/RandomServiceTest.java"
313
- ],
314
- "old_test_lnum": [
315
- "67-94"
316
- ],
317
- "new_test_lnum": [
318
- "67-94"
319
- ],
320
- "old_production_code": "public long nextLong(long maxInclusive) {\n if (maxInclusive <= 0) {\n throw new IllegalArgumentException(\"bound must be positive: \" + maxInclusive);\n }\n long bits, val;\n do {\n long randomLong = random.nextLong();\n bits = (randomLong << 1) >>> 1;\n val = bits % maxInclusive;\n } while (bits - val + (maxInclusive - 1) < 0L);\n return val;\n}",
321
- "new_production_code": "public long nextLong(long maxExclusive) {\n if (maxExclusive <= 0) {\n throw new IllegalArgumentException(\"bound must be positive: \" + maxExclusive);\n }\n return nextLong(0, maxExclusive);\n}",
322
- "focal_file_path": "src/main/java/net/datafaker/service/RandomService.java",
323
- "focal_method_sign": "net/datafaker/service/RandomService.nextLong:(J)J",
324
- "focal_all_deps_scored": [
325
- {
326
- "dep_id": 0,
327
- "method_sign": "net/datafaker/service/RandomService.nextLong:(J)J",
328
- "file_path_old": "src/main/java/net/datafaker/service/RandomService.java",
329
- "line_nums_old": "53-65",
330
- "file_path_new": "src/main/java/net/datafaker/service/RandomService.java",
331
- "line_nums_new": "57-62",
332
- "dependency_updated": "updated",
333
- "score": null,
334
- "signal_scores": {}
335
- }
336
- ],
337
- "coverage_gold": 0.75,
338
- "branch_coverage_gold": 1.5698,
339
- "method_coverage_gold": 2.3939,
340
- "line_coverage_gold": 3.7907,
341
- "is_traceback": false,
342
- "commit_gap": {
343
- "count": 1,
344
- "skipped_commits": [
345
- "d5f4ffb65a1d7ced0955ae5575725382b447128a"
346
- ]
347
- },
348
- "test_is_refactoring_only": false,
349
- "has_test_dep_change": false,
350
- "all_deps_new": [
351
- "net/datafaker/service/RandomService.nextLong:()J",
352
- "net/datafaker/service/RandomService.nextBoolean:()Z",
353
- "net/datafaker/service/RandomService.nextFloat:()F",
354
- "net/datafaker/service/RandomService.nextInt:(I)I",
355
- "net/datafaker/service/RandomService.nextInt:()I",
356
- "net/datafaker/TestSetupExtension.afterEach:(Lorg/junit/jupiter/api/extension/ExtensionContext;)V",
357
- "net/datafaker/service/RandomService.nextLong:(J)J",
358
- "net/datafaker/service/RandomService.nextLong:(JJ)J",
359
- "net/datafaker/service/RandomService.nextInt:(II)Ljava/lang/Integer"
360
- ],
361
- "all_deps_old": [
362
- "net/datafaker/service/RandomService.nextInt:(I)I",
363
- "net/datafaker/service/RandomService.nextLong:(J)J",
364
- "net/datafaker/service/RandomService.nextLong:(JJ)J",
365
- "net/datafaker/service/RandomService.nextBoolean:()Z",
366
- "net/datafaker/service/RandomService.nextInt:()I",
367
- "net/datafaker/service/RandomService.nextFloat:()F",
368
- "net/datafaker/service/RandomService.nextInt:(II)Ljava/lang/Integer",
369
- "net/datafaker/service/RandomService.nextLong:()J",
370
- "net/datafaker/TestSetupExtension.afterEach:(Lorg/junit/jupiter/api/extension/ExtensionContext;)V"
371
- ],
372
- "deps_changes": [
373
- {
374
- "method_sign": "net/datafaker/service/RandomService.nextLong:(J)J",
375
- "change_type": "UPDATE",
376
- "file_path_old": "src/main/java/net/datafaker/service/RandomService.java",
377
- "file_path_new": "src/main/java/net/datafaker/service/RandomService.java",
378
- "source": "production",
379
- "is_test_dependency": false,
380
- "is_refactoring_only": false
381
- }
382
- ],
383
- "variant_result": {
384
- "old_on_old": "pass",
385
- "old_on_new": "fail",
386
- "new_on_old": "fail",
387
- "new_on_new": "pass"
388
- }
389
- }
390
- ],
391
- "version": "v2.4.2",
392
- "java_version": 17
393
- }
394
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
datumbox_datumbox-framework-0.8.2.json DELETED
The diff for this file is too large to render. See raw diff
 
davidmoten_rtree-0.12.json DELETED
@@ -1,448 +0,0 @@
1
- [
2
- {
3
- "task_id": "davidmoten_rtree-0.12__4b4c748_d50636f__LeafTest_02b4468e",
4
- "project_name": "davidmoten_rtree-0.12",
5
- "git_clone_url": "https://github.com/davidmoten/rtree.git",
6
- "rev1": "4b4c7487ac40f68e6ef2d2edeb894a9d5682667c",
7
- "rev2": "d50636f0f29ab1aa9871641f96168cbe8a126810",
8
- "rev1_date": "2017-12-18T02:55:53Z",
9
- "rev2_date": "2017-12-18T05:11:02Z",
10
- "git_diff_url": "https://github.com/davidmoten/rtree/compare/4b4c7487ac40f68e6ef2d2edeb894a9d5682667c...d50636f0f29ab1aa9871641f96168cbe8a126810",
11
- "test_file": "src/test/java/com/github/davidmoten/rtree/LeafTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "3_davidmoten_rtree-0.12_4b4c748_d50636f_LeafTest",
15
- "test_sign": "com/github/davidmoten/rtree/LeafTest.testMbr:()V",
16
- "class": "LeafTest",
17
- "method": "testMbr",
18
- "module": "",
19
- "junit_selector": "com.github.davidmoten.rtree.LeafTest#testMbr",
20
- "old_test_code": "@Test\npublic void testMbr() {\n Rectangle r1 = Geometries.rectangle(0, 1, 3, 5);\n Rectangle r2 = Geometries.rectangle(1, 2, 4, 6);\n @SuppressWarnings(\"unchecked\")\n Rectangle r = new LeafDefault<Object, Rectangle>(Arrays.asList(Entries.entry(new Object(), r1), Entries.entry(new Object(), r2)), context).geometry().mbr();\n assertEquals(r1.add(r2), r);\n}",
21
- "new_test_code": "@Test\npublic void testMbr() {\n Rectangle r1 = Geometries.rectangle(0d, 1, 3, 5);\n Rectangle r2 = Geometries.rectangle(1d, 2, 4, 6);\n @SuppressWarnings(\"unchecked\")\n Rectangle r = new LeafDefault<Object, Rectangle>(Arrays.asList(Entries.entry(new Object(), r1), Entries.entry(new Object(), r2)), context).geometry().mbr();\n assertEquals(r1.add(r2), r);\n}",
22
- "old_test_file_path": [
23
- "src/test/java/com/github/davidmoten/rtree/LeafTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "25-34"
27
- ],
28
- "new_test_lnum": [
29
- "25-34"
30
- ],
31
- "old_production_code": "@Override\npublic Rectangle add(Rectangle r) {\n if (r.isDoublePrecision()) {\n return RectangleDoubleImpl.create(min(x1, r.x1()), min(y1, r.y1()), max(x2, r.x2()), max(y2, r.y2()));\n } else {\n return RectangleDoubleImpl.create(min(x1, r.x1()), min(y1, r.y1()), max(x2, r.x2()), max(y2, r.y2()));\n }\n}",
32
- "new_production_code": "@Override\npublic Rectangle add(Rectangle r) {\n if (r.isDoublePrecision()) {\n return RectangleDoubleImpl.create(min(x1, r.x1()), min(y1, r.y1()), max(x2, r.x2()), max(y2, r.y2()));\n } else if (r instanceof Point) {\n Point p = (Point) r;\n return RectangleImpl.create(min(x1, p.x()), min(y1, p.y()), max(x2, p.x()), max(y2, p.y()));\n } else {\n RectangleImpl rf = (RectangleImpl) r;\n return RectangleImpl.create(min(x1, rf.x1), min(y1, rf.y1), max(x2, rf.x2), max(y2, rf.y2));\n }\n}",
33
- "focal_file_path": "src/main/java/com/github/davidmoten/rtree/geometry/internal/RectangleImpl.java",
34
- "focal_method_sign": "com/github/davidmoten/rtree/geometry/internal/RectangleImpl.add:(Lcom/github/davidmoten/rtree/geometry/Rectangle;)Lcom/github/davidmoten/rtree/geometry/Rectangle",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "com/github/davidmoten/rtree/geometry/internal/RectangleImpl.add:(Lcom/github/davidmoten/rtree/geometry/Rectangle;)Lcom/github/davidmoten/rtree/geometry/Rectangle",
39
- "file_path_old": "src/main/java/com/github/davidmoten/rtree/geometry/internal/RectangleImpl.java",
40
- "line_nums_old": "55-64",
41
- "file_path_new": "src/main/java/com/github/davidmoten/rtree/geometry/internal/RectangleImpl.java",
42
- "line_nums_new": "52-66",
43
- "dependency_updated": "updated",
44
- "score": null,
45
- "signal_scores": {}
46
- }
47
- ],
48
- "coverage_gold": 0.9090909090909091,
49
- "branch_coverage_gold": 2.7348,
50
- "method_coverage_gold": 4.0346,
51
- "line_coverage_gold": 3.9012,
52
- "is_traceback": false,
53
- "commit_gap": {
54
- "count": 2,
55
- "skipped_commits": [
56
- "2e096d548064960db1dad91d636f9fa53e2794f6",
57
- "2e10088be9c649b3cb5a09e1ae382908d5d85499"
58
- ]
59
- },
60
- "test_is_refactoring_only": false,
61
- "has_test_dep_change": false,
62
- "all_deps_new": [
63
- "com/github/davidmoten/rtree/geometry/internal/RectangleDoubleImpl.add:(Lcom/github/davidmoten/rtree/geometry/Rectangle;)Lcom/github/davidmoten/rtree/geometry/Rectangle",
64
- "com/github/davidmoten/rtree/Entries.entry:(Ljava/lang/Object;Lcom/github/davidmoten/rtree/geometry/Geometry;)Lcom/github/davidmoten/rtree/Entry",
65
- "com/github/davidmoten/rtree/geometry/Geometries.rectangle:(DDDD)Lcom/github/davidmoten/rtree/geometry/Rectangle",
66
- "com/github/davidmoten/rtree/internal/LeafDefault.geometry:()Lcom/github/davidmoten/rtree/geometry/Geometry",
67
- "com/github/davidmoten/rtree/geometry/internal/RectangleDoubleImpl.mbr:()Lcom/github/davidmoten/rtree/geometry/Rectangle",
68
- "com/github/davidmoten/rtree/geometry/internal/RectangleDoubleImpl.equals:(Ljava/lang/Object;)Z"
69
- ],
70
- "all_deps_old": [
71
- "com/github/davidmoten/rtree/geometry/internal/RectangleImpl.add:(Lcom/github/davidmoten/rtree/geometry/Rectangle;)Lcom/github/davidmoten/rtree/geometry/Rectangle",
72
- "com/github/davidmoten/rtree/Entries.entry:(Ljava/lang/Object;Lcom/github/davidmoten/rtree/geometry/Geometry;)Lcom/github/davidmoten/rtree/Entry",
73
- "com/github/davidmoten/rtree/geometry/Geometries.rectangle:(FFFF)Lcom/github/davidmoten/rtree/geometry/Rectangle",
74
- "com/github/davidmoten/rtree/internal/LeafDefault.geometry:()Lcom/github/davidmoten/rtree/geometry/Geometry",
75
- "com/github/davidmoten/rtree/geometry/internal/RectangleDoubleImpl.mbr:()Lcom/github/davidmoten/rtree/geometry/Rectangle",
76
- "com/github/davidmoten/rtree/geometry/internal/RectangleDoubleImpl.equals:(Ljava/lang/Object;)Z"
77
- ],
78
- "deps_changes": [
79
- {
80
- "method_sign": "com/github/davidmoten/rtree/geometry/internal/RectangleImpl.add:(Lcom/github/davidmoten/rtree/geometry/Rectangle;)Lcom/github/davidmoten/rtree/geometry/Rectangle",
81
- "change_type": "UPDATE",
82
- "file_path_old": "src/main/java/com/github/davidmoten/rtree/geometry/internal/RectangleImpl.java",
83
- "file_path_new": "src/main/java/com/github/davidmoten/rtree/geometry/internal/RectangleImpl.java",
84
- "source": "production",
85
- "is_test_dependency": false,
86
- "is_refactoring_only": false
87
- }
88
- ],
89
- "variant_result": {
90
- "old_on_old": "pass",
91
- "old_on_new": "fail",
92
- "new_on_old": "pass",
93
- "new_on_new": "pass"
94
- }
95
- }
96
- ],
97
- "version": "0.12",
98
- "java_version": 8
99
- },
100
- {
101
- "task_id": "davidmoten_rtree-0.12__9d11206_3d5865a__PointTest_6e07139e",
102
- "project_name": "davidmoten_rtree-0.12",
103
- "git_clone_url": "https://github.com/davidmoten/rtree.git",
104
- "rev1": "9d11206b306f588ee9ce5a38c29e7121706cb2ad",
105
- "rev2": "3d5865ad5076ad45cde319c165acf62d5c716dc0",
106
- "rev1_date": "2016-07-06T00:21:53Z",
107
- "rev2_date": "2016-07-06T01:38:33Z",
108
- "git_diff_url": "https://github.com/davidmoten/rtree/compare/9d11206b306f588ee9ce5a38c29e7121706cb2ad...3d5865ad5076ad45cde319c165acf62d5c716dc0",
109
- "test_file": "src/test/java/com/github/davidmoten/rtree/geometry/PointTest.java",
110
- "test_changes": [
111
- {
112
- "change_id": "6_davidmoten_rtree-0.12_9d11206_3d5865a_PointTest",
113
- "test_sign": "com/github/davidmoten/rtree/geometry/PointTest.testMbr:()V",
114
- "class": "PointTest",
115
- "method": "testMbr",
116
- "module": "",
117
- "junit_selector": "com.github.davidmoten.rtree.geometry.PointTest#testMbr",
118
- "old_test_code": "@Test\npublic void testMbr() {\n Point p = Geometries.point(1, 2);\n Rectangle r = Geometries.rectangle(1, 2, 1, 2);\n assertEquals(r, p.mbr());\n}",
119
- "new_test_code": "@Test\npublic void testMbr() {\n Point p = Geometries.point(1, 2);\n Point p2 = Geometries.point(1, 2);\n assertEquals(p, p2);\n}",
120
- "old_test_file_path": [
121
- "src/test/java/com/github/davidmoten/rtree/geometry/PointTest.java"
122
- ],
123
- "old_test_lnum": [
124
- "34-39"
125
- ],
126
- "new_test_lnum": [
127
- "34-39"
128
- ],
129
- "old_production_code": "@Override\npublic Rectangle mbr() {\n return mbr;\n}",
130
- "new_production_code": "@Override\npublic Rectangle mbr() {\n return this;\n}",
131
- "focal_file_path": "src/main/java/com/github/davidmoten/rtree/geometry/Point.java",
132
- "focal_method_sign": "com/github/davidmoten/rtree/geometry/Point.mbr:()Lcom/github/davidmoten/rtree/geometry/Rectangle",
133
- "focal_all_deps_scored": [
134
- {
135
- "dep_id": 1,
136
- "method_sign": "com/github/davidmoten/rtree/geometry/Point.mbr:()Lcom/github/davidmoten/rtree/geometry/Rectangle",
137
- "file_path_old": "src/main/java/com/github/davidmoten/rtree/geometry/Point.java",
138
- "line_nums_old": "23-26",
139
- "file_path_new": "src/main/java/com/github/davidmoten/rtree/geometry/Point.java",
140
- "line_nums_new": "21-24",
141
- "dependency_updated": "updated",
142
- "score": 0.8017,
143
- "signal_scores": {
144
- "nc": 1.0,
145
- "lcs_u": 1.0,
146
- "ed": 1.0,
147
- "class": 1.0,
148
- "tfidf": 0.1571
149
- }
150
- },
151
- {
152
- "dep_id": 0,
153
- "method_sign": "com/github/davidmoten/rtree/geometry/Point.equals:(Ljava/lang/Object;)Z",
154
- "file_path_old": "src/main/java/com/github/davidmoten/rtree/geometry/Point.java",
155
- "line_nums_old": "61-68",
156
- "file_path_new": "src/main/java/com/github/davidmoten/rtree/geometry/Point.java",
157
- "line_nums_new": "63-77",
158
- "dependency_updated": "updated",
159
- "score": 0.214,
160
- "signal_scores": {
161
- "nc": 0.0,
162
- "lcs_u": 0.0,
163
- "ed": 0.0,
164
- "class": 1.0,
165
- "tfidf": 0.1096
166
- }
167
- }
168
- ],
169
- "coverage_gold": 0.6153846153846154,
170
- "branch_coverage_gold": 0.7342,
171
- "method_coverage_gold": 0.6349,
172
- "line_coverage_gold": 0.732,
173
- "is_traceback": false,
174
- "commit_gap": {
175
- "count": 0,
176
- "skipped_commits": []
177
- },
178
- "test_is_refactoring_only": false,
179
- "has_test_dep_change": false,
180
- "all_deps_new": [
181
- "com/github/davidmoten/rtree/geometry/Geometries.point:(FF)Lcom/github/davidmoten/rtree/geometry/Point",
182
- "com/github/davidmoten/rtree/geometry/Point.equals:(Ljava/lang/Object;)Z"
183
- ],
184
- "all_deps_old": [
185
- "com/github/davidmoten/rtree/geometry/Geometries.point:(FF)Lcom/github/davidmoten/rtree/geometry/Point",
186
- "com/github/davidmoten/rtree/geometry/Point.mbr:()Lcom/github/davidmoten/rtree/geometry/Rectangle",
187
- "com/github/davidmoten/rtree/geometry/Geometries.rectangle:(FFFF)Lcom/github/davidmoten/rtree/geometry/Rectangle",
188
- "com/github/davidmoten/rtree/geometry/RectangleImpl.equals:(Ljava/lang/Object;)Z"
189
- ],
190
- "deps_changes": [
191
- {
192
- "method_sign": "com/github/davidmoten/rtree/geometry/Point.equals:(Ljava/lang/Object;)Z",
193
- "change_type": "UPDATE",
194
- "file_path_old": "src/main/java/com/github/davidmoten/rtree/geometry/Point.java",
195
- "file_path_new": "src/main/java/com/github/davidmoten/rtree/geometry/Point.java",
196
- "source": "production",
197
- "is_test_dependency": false,
198
- "is_refactoring_only": false
199
- },
200
- {
201
- "method_sign": "com/github/davidmoten/rtree/geometry/Point.mbr:()Lcom/github/davidmoten/rtree/geometry/Rectangle",
202
- "change_type": "UPDATE",
203
- "file_path_old": "src/main/java/com/github/davidmoten/rtree/geometry/Point.java",
204
- "file_path_new": "src/main/java/com/github/davidmoten/rtree/geometry/Point.java",
205
- "source": "production",
206
- "is_test_dependency": false,
207
- "is_refactoring_only": false
208
- }
209
- ],
210
- "variant_result": {
211
- "old_on_old": "pass",
212
- "old_on_new": "fail",
213
- "new_on_old": "pass",
214
- "new_on_new": "pass"
215
- }
216
- },
217
- {
218
- "change_id": "7_davidmoten_rtree-0.12_9d11206_3d5865a_PointTest",
219
- "test_sign": "com/github/davidmoten/rtree/geometry/PointTest.testHashCode:()V",
220
- "class": "PointTest",
221
- "method": "testHashCode",
222
- "module": "",
223
- "junit_selector": "com.github.davidmoten.rtree.geometry.PointTest#testHashCode",
224
- "old_test_code": "@Test\npublic void testHashCode() {\n Point p = Geometries.point(1, 2);\n assertEquals(-1056041056, p.hashCode());\n}",
225
- "new_test_code": "@Test\npublic void testHashCode() {\n Point p = Geometries.point(1, 2);\n assertEquals(-260045887, p.hashCode());\n}",
226
- "old_test_file_path": [
227
- "src/test/java/com/github/davidmoten/rtree/geometry/PointTest.java"
228
- ],
229
- "old_test_lnum": [
230
- "74-78"
231
- ],
232
- "new_test_lnum": [
233
- "74-78"
234
- ],
235
- "old_production_code": "@Override\npublic int hashCode() {\n return Objects.hashCode(mbr);\n}",
236
- "new_production_code": "@Override\npublic int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + Float.floatToIntBits(x);\n result = prime * result + Float.floatToIntBits(y);\n return result;\n}",
237
- "focal_file_path": "src/main/java/com/github/davidmoten/rtree/geometry/Point.java",
238
- "focal_method_sign": "com/github/davidmoten/rtree/geometry/Point.hashCode:()I",
239
- "focal_all_deps_scored": [
240
- {
241
- "dep_id": 0,
242
- "method_sign": "com/github/davidmoten/rtree/geometry/Point.hashCode:()I",
243
- "file_path_old": "src/main/java/com/github/davidmoten/rtree/geometry/Point.java",
244
- "line_nums_old": "56-59",
245
- "file_path_new": "src/main/java/com/github/davidmoten/rtree/geometry/Point.java",
246
- "line_nums_new": "54-61",
247
- "dependency_updated": "updated",
248
- "score": null,
249
- "signal_scores": {}
250
- }
251
- ],
252
- "coverage_gold": 1.0,
253
- "branch_coverage_gold": 0.0,
254
- "method_coverage_gold": 0.6349,
255
- "line_coverage_gold": 0.6194,
256
- "is_traceback": false,
257
- "commit_gap": {
258
- "count": 0,
259
- "skipped_commits": []
260
- },
261
- "test_is_refactoring_only": false,
262
- "has_test_dep_change": false,
263
- "all_deps_new": [
264
- "com/github/davidmoten/rtree/geometry/Geometries.point:(FF)Lcom/github/davidmoten/rtree/geometry/Point",
265
- "com/github/davidmoten/rtree/geometry/Point.hashCode:()I"
266
- ],
267
- "all_deps_old": [
268
- "com/github/davidmoten/rtree/geometry/Geometries.point:(FF)Lcom/github/davidmoten/rtree/geometry/Point",
269
- "com/github/davidmoten/rtree/geometry/Point.hashCode:()I"
270
- ],
271
- "deps_changes": [
272
- {
273
- "method_sign": "com/github/davidmoten/rtree/geometry/Point.hashCode:()I",
274
- "change_type": "UPDATE",
275
- "file_path_old": "src/main/java/com/github/davidmoten/rtree/geometry/Point.java",
276
- "file_path_new": "src/main/java/com/github/davidmoten/rtree/geometry/Point.java",
277
- "source": "production",
278
- "is_test_dependency": false,
279
- "is_refactoring_only": false
280
- }
281
- ],
282
- "variant_result": {
283
- "old_on_old": "pass",
284
- "old_on_new": "fail",
285
- "new_on_old": "fail",
286
- "new_on_new": "pass"
287
- }
288
- }
289
- ],
290
- "version": "0.12",
291
- "java_version": 8
292
- },
293
- {
294
- "task_id": "davidmoten_rtree-0.12__d370ef2_4b4c748__RTreeTest_282a43ce",
295
- "project_name": "davidmoten_rtree-0.12",
296
- "git_clone_url": "https://github.com/davidmoten/rtree.git",
297
- "rev1": "d370ef22506e952c1187b1e1042fafabfccad0e8",
298
- "rev2": "4b4c7487ac40f68e6ef2d2edeb894a9d5682667c",
299
- "rev1_date": "2017-12-17T23:28:21Z",
300
- "rev2_date": "2017-12-18T02:55:53Z",
301
- "git_diff_url": "https://github.com/davidmoten/rtree/compare/d370ef22506e952c1187b1e1042fafabfccad0e8...4b4c7487ac40f68e6ef2d2edeb894a9d5682667c",
302
- "test_file": "src/test/java/com/github/davidmoten/rtree/RTreeTest.java",
303
- "test_changes": [
304
- {
305
- "change_id": "77_davidmoten_rtree-0.12_d370ef2_4b4c748_RTreeTest",
306
- "test_sign": "com/github/davidmoten/rtree/RTreeTest.testRTreeRootMbrWhenRTreeNonEmpty:()V",
307
- "class": "RTreeTest",
308
- "method": "testRTreeRootMbrWhenRTreeNonEmpty",
309
- "module": "",
310
- "junit_selector": "com.github.davidmoten.rtree.RTreeTest#testRTreeRootMbrWhenRTreeNonEmpty",
311
- "old_test_code": "@Test\npublic void testRTreeRootMbrWhenRTreeNonEmpty() {\n Optional<Rectangle> r = RTree.<Integer, Point>create().add(1, point(1, 1)).add(2, point(2, 2)).mbr();\n assertEquals(Geometries.rectangle(1, 1, 2, 2), r.get());\n}",
312
- "new_test_code": "@Test\npublic void testRTreeRootMbrWhenRTreeNonEmpty() {\n Optional<Rectangle> r = RTree.<Integer, Point>create().add(1, point(1, 1)).add(2, point(2, 2)).mbr();\n assertEquals(Geometries.rectangle(1d, 1, 2, 2), r.get());\n}",
313
- "old_test_file_path": [
314
- "src/test/java/com/github/davidmoten/rtree/RTreeTest.java"
315
- ],
316
- "old_test_lnum": [
317
- "965-970"
318
- ],
319
- "new_test_lnum": [
320
- "965-970"
321
- ],
322
- "old_production_code": "public static Rectangle rectangle(double x1, double y1, double x2, double y2) {\n return RectangleImpl.create(x1, y1, x2, y2);\n}",
323
- "new_production_code": "public static Rectangle rectangle(double x1, double y1, double x2, double y2) {\n return rectangleDouble(x1, y1, x2, y2);\n}",
324
- "focal_file_path": "src/main/java/com/github/davidmoten/rtree/geometry/Geometries.java",
325
- "focal_method_sign": "com/github/davidmoten/rtree/geometry/Geometries.rectangle:(DDDD)Lcom/github/davidmoten/rtree/geometry/Rectangle",
326
- "focal_all_deps_scored": [
327
- {
328
- "dep_id": 2,
329
- "method_sign": "com/github/davidmoten/rtree/geometry/Geometries.rectangle:(DDDD)Lcom/github/davidmoten/rtree/geometry/Rectangle",
330
- "file_path_old": "src/main/java/com/github/davidmoten/rtree/geometry/Geometries.java",
331
- "line_nums_old": "19-21",
332
- "file_path_new": "src/main/java/com/github/davidmoten/rtree/geometry/Geometries.java",
333
- "line_nums_new": "21-23",
334
- "dependency_updated": "updated",
335
- "score": 0.1264,
336
- "signal_scores": {
337
- "nc": 0.0,
338
- "lcs_u": 0.5556,
339
- "ed": 0.1724,
340
- "class": 0.0,
341
- "tfidf": 0.0
342
- }
343
- },
344
- {
345
- "dep_id": 0,
346
- "method_sign": "com/github/davidmoten/rtree/geometry/RectangleImpl.equals:(Ljava/lang/Object;)Z",
347
- "file_path_old": "src/main/java/com/github/davidmoten/rtree/geometry/RectangleImpl.java",
348
- "line_nums_old": "172-180",
349
- "file_path_new": null,
350
- "line_nums_new": null,
351
- "dependency_updated": "deleted",
352
- "score": 0.0589,
353
- "signal_scores": {
354
- "nc": 0.0,
355
- "lcs_u": 0.1667,
356
- "ed": 0.0345,
357
- "class": 0.0,
358
- "tfidf": 0.101
359
- }
360
- },
361
- {
362
- "dep_id": 1,
363
- "method_sign": "com/github/davidmoten/rtree/geometry/internal/RectangleDoubleImpl.equals:(Ljava/lang/Object;)Z",
364
- "file_path_old": null,
365
- "line_nums_old": null,
366
- "file_path_new": "src/main/java/com/github/davidmoten/rtree/geometry/internal/RectangleDoubleImpl.java",
367
- "line_nums_new": "152-160",
368
- "dependency_updated": "inserted",
369
- "score": 0.0589,
370
- "signal_scores": {
371
- "nc": 0.0,
372
- "lcs_u": 0.1667,
373
- "ed": 0.0345,
374
- "class": 0.0,
375
- "tfidf": 0.101
376
- }
377
- }
378
- ],
379
- "coverage_gold": 0.8333333333333334,
380
- "branch_coverage_gold": 3.3526,
381
- "method_coverage_gold": 7.0402,
382
- "line_coverage_gold": 6.6108,
383
- "is_traceback": true,
384
- "commit_gap": {
385
- "count": 1,
386
- "skipped_commits": [
387
- "828f8449d51d25d82466bb859546e9ef9e09e33b"
388
- ]
389
- },
390
- "test_is_refactoring_only": false,
391
- "has_test_dep_change": false,
392
- "all_deps_new": [
393
- "com/github/davidmoten/rtree/geometry/Geometries.rectangle:(DDDD)Lcom/github/davidmoten/rtree/geometry/Rectangle",
394
- "com/github/davidmoten/rtree/RTree.add:(Ljava/lang/Object;Lcom/github/davidmoten/rtree/geometry/Geometry;)Lcom/github/davidmoten/rtree/RTree",
395
- "com/github/davidmoten/rtree/geometry/internal/RectangleDoubleImpl.equals:(Ljava/lang/Object;)Z",
396
- "com/github/davidmoten/rtree/RTree.create:()Lcom/github/davidmoten/rtree/RTree",
397
- "com/github/davidmoten/rtree/RTree.mbr:()Lcom/github/davidmoten/guavamini/Optional",
398
- "com/github/davidmoten/rtree/geometry/Geometries.point:(FF)Lcom/github/davidmoten/rtree/geometry/Point"
399
- ],
400
- "all_deps_old": [
401
- "com/github/davidmoten/rtree/RTree.add:(Ljava/lang/Object;Lcom/github/davidmoten/rtree/geometry/Geometry;)Lcom/github/davidmoten/rtree/RTree",
402
- "com/github/davidmoten/rtree/geometry/RectangleImpl.equals:(Ljava/lang/Object;)Z",
403
- "com/github/davidmoten/rtree/RTree.create:()Lcom/github/davidmoten/rtree/RTree",
404
- "com/github/davidmoten/rtree/geometry/Geometries.rectangle:(FFFF)Lcom/github/davidmoten/rtree/geometry/Rectangle",
405
- "com/github/davidmoten/rtree/RTree.mbr:()Lcom/github/davidmoten/guavamini/Optional",
406
- "com/github/davidmoten/rtree/geometry/Geometries.point:(FF)Lcom/github/davidmoten/rtree/geometry/Point"
407
- ],
408
- "deps_changes": [
409
- {
410
- "method_sign": "com/github/davidmoten/rtree/geometry/RectangleImpl.equals:(Ljava/lang/Object;)Z",
411
- "change_type": "DELETE",
412
- "file_path_old": "src/main/java/com/github/davidmoten/rtree/geometry/RectangleImpl.java",
413
- "file_path_new": null,
414
- "source": "production",
415
- "is_test_dependency": false,
416
- "is_refactoring_only": false
417
- },
418
- {
419
- "method_sign": "com/github/davidmoten/rtree/geometry/internal/RectangleDoubleImpl.equals:(Ljava/lang/Object;)Z",
420
- "change_type": "ADD",
421
- "file_path_old": null,
422
- "file_path_new": "src/main/java/com/github/davidmoten/rtree/geometry/internal/RectangleDoubleImpl.java",
423
- "source": "production",
424
- "is_test_dependency": false,
425
- "is_refactoring_only": false
426
- },
427
- {
428
- "method_sign": "com/github/davidmoten/rtree/geometry/Geometries.rectangle:(DDDD)Lcom/github/davidmoten/rtree/geometry/Rectangle",
429
- "change_type": "UPDATE",
430
- "file_path_old": "src/main/java/com/github/davidmoten/rtree/geometry/Geometries.java",
431
- "file_path_new": "src/main/java/com/github/davidmoten/rtree/geometry/Geometries.java",
432
- "source": "production",
433
- "is_test_dependency": false,
434
- "is_refactoring_only": true
435
- }
436
- ],
437
- "variant_result": {
438
- "old_on_old": "pass",
439
- "old_on_new": "fail",
440
- "new_on_old": "pass",
441
- "new_on_new": "pass"
442
- }
443
- }
444
- ],
445
- "version": "0.12",
446
- "java_version": 8
447
- }
448
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dialex_JColor-v5.5.1.json DELETED
@@ -1,1713 +0,0 @@
1
- [
2
- {
3
- "task_id": "dialex_JColor-v5.5.1__f45d224_58bfb85__TestAnsi_38388b9c",
4
- "project_name": "dialex_JColor-v5.5.1",
5
- "git_clone_url": "https://github.com/dialex/JColor.git",
6
- "rev1": "f45d224da5407344997ffdd8c08d2e16efd619c7",
7
- "rev2": "58bfb858cccd42a31e7c67a473bf96eacd440882",
8
- "rev1_date": "2020-07-04T17:09:44Z",
9
- "rev2_date": "2020-07-04T18:18:58Z",
10
- "git_diff_url": "https://github.com/dialex/JColor/compare/f45d224da5407344997ffdd8c08d2e16efd619c7...58bfb858cccd42a31e7c67a473bf96eacd440882",
11
- "test_file": "src/test/java/com/diogonunes/jcolor/tests/unit/TestAnsi.java",
12
- "test_changes": [
13
- {
14
- "change_id": "8_dialex_JColor-v5.5.1_f45d224_58bfb85_TestAnsi",
15
- "test_sign": "com/diogonunes/jcolor/tests/unit/TestAnsi.GenerateCode_SomeAttributesWithValueNone:()V",
16
- "class": "TestAnsi",
17
- "method": "GenerateCode_SomeAttributesWithValueNone",
18
- "module": "",
19
- "junit_selector": "com.diogonunes.jcolor.tests.unit.TestAnsi#GenerateCode_SomeAttributesWithValueNone",
20
- "old_test_code": "@Test\npublic void GenerateCode_SomeAttributesWithValueNone() {\n Attribute[] attributes = new Attribute[] { NONE, BLUE_TEXT, NONE };\n String code = Ansi.generateCode(attributes);\n String expectedCode = PREFIX + attributes[1] + POSTFIX;\n assertThat(code, equalTo(expectedCode));\n int suffixIndex = code.lastIndexOf(POSTFIX);\n assertThat(\"Code ending in semicolon does not show color\", code.charAt(suffixIndex - 1), is(not(';')));\n}",
21
- "new_test_code": "@Test\npublic void GenerateCode_SomeAttributesWithValueNone() {\n Attribute[] attributes = new Attribute[] { NONE(), BLUE_TEXT(), NONE() };\n String code = Ansi.generateCode(attributes);\n String expectedCode = PREFIX + attributes[1] + POSTFIX;\n assertThat(code, equalTo(expectedCode));\n int suffixIndex = code.lastIndexOf(POSTFIX);\n assertThat(\"Code ending in semicolon does not show color\", code.charAt(suffixIndex - 1), is(not(';')));\n}",
22
- "old_test_file_path": [
23
- "src/test/java/com/diogonunes/jcolor/tests/unit/TestAnsi.java"
24
- ],
25
- "old_test_lnum": [
26
- "112-125"
27
- ],
28
- "new_test_lnum": [
29
- "113-126"
30
- ],
31
- "old_production_code": "@Override\npublic String toString() {\n return getCode();\n}",
32
- "new_production_code": "",
33
- "focal_file_path": "src/main/java/com/diogonunes/jcolor/Ansi.java",
34
- "focal_method_sign": "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String",
39
- "file_path_old": "src/main/java/com/diogonunes/jcolor/Ansi.java",
40
- "line_nums_old": "102-105",
41
- "file_path_new": null,
42
- "line_nums_new": null,
43
- "dependency_updated": "deleted",
44
- "score": 0.3715,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 0.875,
48
- "ed": 0.175,
49
- "class": 1.0,
50
- "tfidf": 0.0
51
- }
52
- },
53
- {
54
- "dep_id": 3,
55
- "method_sign": "com/diogonunes/jcolor/Attribute.NONE:()Lcom/diogonunes/jcolor/Attribute",
56
- "file_path_old": null,
57
- "line_nums_old": null,
58
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
59
- "line_nums_new": "19-21",
60
- "dependency_updated": "inserted",
61
- "score": 0.3295,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 1.0,
65
- "ed": 0.1,
66
- "class": 0.0,
67
- "tfidf": 0.5803
68
- }
69
- },
70
- {
71
- "dep_id": 1,
72
- "method_sign": "com/diogonunes/jcolor/Attribute.BLUE_TEXT:()Lcom/diogonunes/jcolor/Attribute",
73
- "file_path_old": null,
74
- "line_nums_old": null,
75
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
76
- "line_nums_new": "95-97",
77
- "dependency_updated": "inserted",
78
- "score": 0.1936,
79
- "signal_scores": {
80
- "nc": 0.0,
81
- "lcs_u": 0.5556,
82
- "ed": 0.125,
83
- "class": 0.0,
84
- "tfidf": 0.3188
85
- }
86
- },
87
- {
88
- "dep_id": 2,
89
- "method_sign": "com/diogonunes/jcolor/SimpleAttribute.toString:()Ljava/lang/String",
90
- "file_path_old": null,
91
- "line_nums_old": null,
92
- "file_path_new": "src/main/java/com/diogonunes/jcolor/SimpleAttribute.java",
93
- "line_nums_new": "16-19",
94
- "dependency_updated": "inserted",
95
- "score": 0.1832,
96
- "signal_scores": {
97
- "nc": 0.0,
98
- "lcs_u": 0.875,
99
- "ed": 0.175,
100
- "class": 0.0,
101
- "tfidf": 0.0
102
- }
103
- }
104
- ],
105
- "coverage_gold": 1.0,
106
- "branch_coverage_gold": 50.0,
107
- "method_coverage_gold": 13.5593,
108
- "line_coverage_gold": 23.8095,
109
- "is_traceback": false,
110
- "commit_gap": {
111
- "count": 0,
112
- "skipped_commits": []
113
- },
114
- "test_is_refactoring_only": false,
115
- "has_test_dep_change": false,
116
- "all_deps_new": [
117
- "com/diogonunes/jcolor/Attribute.BLUE_TEXT:()Lcom/diogonunes/jcolor/Attribute",
118
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String",
119
- "com/diogonunes/jcolor/Attribute.NONE:()Lcom/diogonunes/jcolor/Attribute",
120
- "com/diogonunes/jcolor/SimpleAttribute.toString:()Ljava/lang/String"
121
- ],
122
- "all_deps_old": [
123
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String",
124
- "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String"
125
- ],
126
- "deps_changes": [
127
- {
128
- "method_sign": "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String",
129
- "change_type": "DELETE",
130
- "file_path_old": "src/main/java/com/diogonunes/jcolor/Ansi.java",
131
- "file_path_new": null,
132
- "source": "production",
133
- "is_test_dependency": false,
134
- "is_refactoring_only": false
135
- },
136
- {
137
- "method_sign": "com/diogonunes/jcolor/Attribute.BLUE_TEXT:()Lcom/diogonunes/jcolor/Attribute",
138
- "change_type": "ADD",
139
- "file_path_old": null,
140
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
141
- "source": "production",
142
- "is_test_dependency": false,
143
- "is_refactoring_only": false
144
- },
145
- {
146
- "method_sign": "com/diogonunes/jcolor/SimpleAttribute.toString:()Ljava/lang/String",
147
- "change_type": "ADD",
148
- "file_path_old": null,
149
- "file_path_new": "src/main/java/com/diogonunes/jcolor/SimpleAttribute.java",
150
- "source": "production",
151
- "is_test_dependency": false,
152
- "is_refactoring_only": false
153
- },
154
- {
155
- "method_sign": "com/diogonunes/jcolor/Attribute.NONE:()Lcom/diogonunes/jcolor/Attribute",
156
- "change_type": "ADD",
157
- "file_path_old": null,
158
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
159
- "source": "production",
160
- "is_test_dependency": false,
161
- "is_refactoring_only": false
162
- }
163
- ],
164
- "variant_result": {
165
- "old_on_old": "pass",
166
- "old_on_new": "error",
167
- "new_on_old": "error",
168
- "new_on_new": "pass"
169
- }
170
- },
171
- {
172
- "change_id": "11_dialex_JColor-v5.5.1_f45d224_58bfb85_TestAnsi",
173
- "test_sign": "com/diogonunes/jcolor/tests/unit/TestAnsi.GenerateCode_OneAttribute:()V",
174
- "class": "TestAnsi",
175
- "method": "GenerateCode_OneAttribute",
176
- "module": "",
177
- "junit_selector": "com.diogonunes.jcolor.tests.unit.TestAnsi#GenerateCode_OneAttribute",
178
- "old_test_code": "@Test\npublic void GenerateCode_OneAttribute() {\n Attribute[] attributes = new Attribute[] { STRIKETHROUGH };\n String code = Ansi.generateCode(attributes);\n String expectedCode = PREFIX + attributes[0] + POSTFIX;\n assertThat(code, equalTo(expectedCode));\n}",
179
- "new_test_code": "@Test\npublic void GenerateCode_OneAttribute() {\n Attribute[] attributes = new Attribute[] { STRIKETHROUGH() };\n String code = Ansi.generateCode(attributes);\n String expectedCode = PREFIX + attributes[0] + POSTFIX;\n assertThat(code, equalTo(expectedCode));\n}",
180
- "old_test_file_path": [
181
- "src/test/java/com/diogonunes/jcolor/tests/unit/TestAnsi.java"
182
- ],
183
- "old_test_lnum": [
184
- "46-57"
185
- ],
186
- "new_test_lnum": [
187
- "47-58"
188
- ],
189
- "old_production_code": "@Override\npublic String toString() {\n return getCode();\n}",
190
- "new_production_code": "",
191
- "focal_file_path": "src/main/java/com/diogonunes/jcolor/Ansi.java",
192
- "focal_method_sign": "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String",
193
- "focal_all_deps_scored": [
194
- {
195
- "dep_id": 1,
196
- "method_sign": "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String",
197
- "file_path_old": "src/main/java/com/diogonunes/jcolor/Ansi.java",
198
- "line_nums_old": "102-105",
199
- "file_path_new": null,
200
- "line_nums_new": null,
201
- "dependency_updated": "deleted",
202
- "score": 0.3315,
203
- "signal_scores": {
204
- "nc": 0.0,
205
- "lcs_u": 0.625,
206
- "ed": 0.2,
207
- "class": 1.0,
208
- "tfidf": 0.0
209
- }
210
- },
211
- {
212
- "dep_id": 0,
213
- "method_sign": "com/diogonunes/jcolor/Attribute.STRIKETHROUGH:()Lcom/diogonunes/jcolor/Attribute",
214
- "file_path_old": null,
215
- "line_nums_old": null,
216
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
217
- "line_nums_new": "73-75",
218
- "dependency_updated": "inserted",
219
- "score": 0.2349,
220
- "signal_scores": {
221
- "nc": 0.0,
222
- "lcs_u": 0.3846,
223
- "ed": 0.2,
224
- "class": 0.0,
225
- "tfidf": 0.5697
226
- }
227
- },
228
- {
229
- "dep_id": 2,
230
- "method_sign": "com/diogonunes/jcolor/SimpleAttribute.toString:()Ljava/lang/String",
231
- "file_path_old": null,
232
- "line_nums_old": null,
233
- "file_path_new": "src/main/java/com/diogonunes/jcolor/SimpleAttribute.java",
234
- "line_nums_new": "16-19",
235
- "dependency_updated": "inserted",
236
- "score": 0.1432,
237
- "signal_scores": {
238
- "nc": 0.0,
239
- "lcs_u": 0.625,
240
- "ed": 0.2,
241
- "class": 0.0,
242
- "tfidf": 0.0
243
- }
244
- }
245
- ],
246
- "coverage_gold": 0.9166666666666666,
247
- "branch_coverage_gold": 37.5,
248
- "method_coverage_gold": 11.8644,
249
- "line_coverage_gold": 21.4286,
250
- "is_traceback": false,
251
- "commit_gap": {
252
- "count": 0,
253
- "skipped_commits": []
254
- },
255
- "test_is_refactoring_only": false,
256
- "has_test_dep_change": false,
257
- "all_deps_new": [
258
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String",
259
- "com/diogonunes/jcolor/Attribute.STRIKETHROUGH:()Lcom/diogonunes/jcolor/Attribute",
260
- "com/diogonunes/jcolor/SimpleAttribute.toString:()Ljava/lang/String"
261
- ],
262
- "all_deps_old": [
263
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String",
264
- "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String"
265
- ],
266
- "deps_changes": [
267
- {
268
- "method_sign": "com/diogonunes/jcolor/Attribute.STRIKETHROUGH:()Lcom/diogonunes/jcolor/Attribute",
269
- "change_type": "ADD",
270
- "file_path_old": null,
271
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
272
- "source": "production",
273
- "is_test_dependency": false,
274
- "is_refactoring_only": false
275
- },
276
- {
277
- "method_sign": "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String",
278
- "change_type": "DELETE",
279
- "file_path_old": "src/main/java/com/diogonunes/jcolor/Ansi.java",
280
- "file_path_new": null,
281
- "source": "production",
282
- "is_test_dependency": false,
283
- "is_refactoring_only": false
284
- },
285
- {
286
- "method_sign": "com/diogonunes/jcolor/SimpleAttribute.toString:()Ljava/lang/String",
287
- "change_type": "ADD",
288
- "file_path_old": null,
289
- "file_path_new": "src/main/java/com/diogonunes/jcolor/SimpleAttribute.java",
290
- "source": "production",
291
- "is_test_dependency": false,
292
- "is_refactoring_only": false
293
- }
294
- ],
295
- "variant_result": {
296
- "old_on_old": "pass",
297
- "old_on_new": "error",
298
- "new_on_old": "error",
299
- "new_on_new": "pass"
300
- }
301
- },
302
- {
303
- "change_id": "13_dialex_JColor-v5.5.1_f45d224_58bfb85_TestAnsi",
304
- "test_sign": "com/diogonunes/jcolor/tests/unit/TestAnsi.GenerateCode_MultipleAttributes_HandlesMultipleParams:()V",
305
- "class": "TestAnsi",
306
- "method": "GenerateCode_MultipleAttributes_HandlesMultipleParams",
307
- "module": "",
308
- "junit_selector": "com.diogonunes.jcolor.tests.unit.TestAnsi#GenerateCode_MultipleAttributes_HandlesMultipleParams",
309
- "old_test_code": "@Test\npublic void GenerateCode_MultipleAttributes_HandlesMultipleParams() {\n Attribute firstAttribute = UNDERLINE;\n Attribute secondAttribute = GREEN_TEXT;\n String code = Ansi.generateCode(firstAttribute, secondAttribute);\n String expectedCode = PREFIX + firstAttribute + SEPARATOR + secondAttribute + POSTFIX;\n assertThat(code, equalTo(expectedCode));\n}",
310
- "new_test_code": "@Test\npublic void GenerateCode_MultipleAttributes_HandlesMultipleParams() {\n Attribute firstAttribute = UNDERLINE();\n Attribute secondAttribute = GREEN_TEXT();\n String code = Ansi.generateCode(firstAttribute, secondAttribute);\n String expectedCode = PREFIX + firstAttribute + SEPARATOR + secondAttribute + POSTFIX;\n assertThat(code, equalTo(expectedCode));\n}",
311
- "old_test_file_path": [
312
- "src/test/java/com/diogonunes/jcolor/tests/unit/TestAnsi.java"
313
- ],
314
- "old_test_lnum": [
315
- "85-97"
316
- ],
317
- "new_test_lnum": [
318
- "86-98"
319
- ],
320
- "old_production_code": "@Override\npublic String toString() {\n return getCode();\n}",
321
- "new_production_code": "",
322
- "focal_file_path": "src/main/java/com/diogonunes/jcolor/Ansi.java",
323
- "focal_method_sign": "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String",
324
- "focal_all_deps_scored": [
325
- {
326
- "dep_id": 0,
327
- "method_sign": "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String",
328
- "file_path_old": "src/main/java/com/diogonunes/jcolor/Ansi.java",
329
- "line_nums_old": "102-105",
330
- "file_path_new": null,
331
- "line_nums_new": null,
332
- "dependency_updated": "deleted",
333
- "score": 0.3392,
334
- "signal_scores": {
335
- "nc": 0.0,
336
- "lcs_u": 0.75,
337
- "ed": 0.1132,
338
- "class": 1.0,
339
- "tfidf": 0.0
340
- }
341
- },
342
- {
343
- "dep_id": 3,
344
- "method_sign": "com/diogonunes/jcolor/Attribute.UNDERLINE:()Lcom/diogonunes/jcolor/Attribute",
345
- "file_path_old": null,
346
- "line_nums_old": null,
347
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
348
- "line_nums_new": "53-55",
349
- "dependency_updated": "inserted",
350
- "score": 0.2661,
351
- "signal_scores": {
352
- "nc": 0.0,
353
- "lcs_u": 0.7778,
354
- "ed": 0.1321,
355
- "class": 0.0,
356
- "tfidf": 0.4552
357
- }
358
- },
359
- {
360
- "dep_id": 1,
361
- "method_sign": "com/diogonunes/jcolor/Attribute.GREEN_TEXT:()Lcom/diogonunes/jcolor/Attribute",
362
- "file_path_old": null,
363
- "line_nums_old": null,
364
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
365
- "line_nums_new": "87-89",
366
- "dependency_updated": "inserted",
367
- "score": 0.2505,
368
- "signal_scores": {
369
- "nc": 0.0,
370
- "lcs_u": 0.8,
371
- "ed": 0.1321,
372
- "class": 0.0,
373
- "tfidf": 0.3721
374
- }
375
- },
376
- {
377
- "dep_id": 2,
378
- "method_sign": "com/diogonunes/jcolor/SimpleAttribute.toString:()Ljava/lang/String",
379
- "file_path_old": null,
380
- "line_nums_old": null,
381
- "file_path_new": "src/main/java/com/diogonunes/jcolor/SimpleAttribute.java",
382
- "line_nums_new": "16-19",
383
- "dependency_updated": "inserted",
384
- "score": 0.151,
385
- "signal_scores": {
386
- "nc": 0.0,
387
- "lcs_u": 0.75,
388
- "ed": 0.1132,
389
- "class": 0.0,
390
- "tfidf": 0.0
391
- }
392
- }
393
- ],
394
- "coverage_gold": 0.9230769230769231,
395
- "branch_coverage_gold": 37.5,
396
- "method_coverage_gold": 13.5593,
397
- "line_coverage_gold": 22.619,
398
- "is_traceback": false,
399
- "commit_gap": {
400
- "count": 0,
401
- "skipped_commits": []
402
- },
403
- "test_is_refactoring_only": false,
404
- "has_test_dep_change": false,
405
- "all_deps_new": [
406
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String",
407
- "com/diogonunes/jcolor/Attribute.GREEN_TEXT:()Lcom/diogonunes/jcolor/Attribute",
408
- "com/diogonunes/jcolor/Attribute.UNDERLINE:()Lcom/diogonunes/jcolor/Attribute",
409
- "com/diogonunes/jcolor/SimpleAttribute.toString:()Ljava/lang/String"
410
- ],
411
- "all_deps_old": [
412
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String",
413
- "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String"
414
- ],
415
- "deps_changes": [
416
- {
417
- "method_sign": "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String",
418
- "change_type": "DELETE",
419
- "file_path_old": "src/main/java/com/diogonunes/jcolor/Ansi.java",
420
- "file_path_new": null,
421
- "source": "production",
422
- "is_test_dependency": false,
423
- "is_refactoring_only": false
424
- },
425
- {
426
- "method_sign": "com/diogonunes/jcolor/Attribute.GREEN_TEXT:()Lcom/diogonunes/jcolor/Attribute",
427
- "change_type": "ADD",
428
- "file_path_old": null,
429
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
430
- "source": "production",
431
- "is_test_dependency": false,
432
- "is_refactoring_only": false
433
- },
434
- {
435
- "method_sign": "com/diogonunes/jcolor/SimpleAttribute.toString:()Ljava/lang/String",
436
- "change_type": "ADD",
437
- "file_path_old": null,
438
- "file_path_new": "src/main/java/com/diogonunes/jcolor/SimpleAttribute.java",
439
- "source": "production",
440
- "is_test_dependency": false,
441
- "is_refactoring_only": false
442
- },
443
- {
444
- "method_sign": "com/diogonunes/jcolor/Attribute.UNDERLINE:()Lcom/diogonunes/jcolor/Attribute",
445
- "change_type": "ADD",
446
- "file_path_old": null,
447
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
448
- "source": "production",
449
- "is_test_dependency": false,
450
- "is_refactoring_only": false
451
- }
452
- ],
453
- "variant_result": {
454
- "old_on_old": "pass",
455
- "old_on_new": "error",
456
- "new_on_old": "error",
457
- "new_on_new": "pass"
458
- }
459
- },
460
- {
461
- "change_id": "14_dialex_JColor-v5.5.1_f45d224_58bfb85_TestAnsi",
462
- "test_sign": "com/diogonunes/jcolor/tests/unit/TestAnsi.Colorize_TextWithSingleLine:()V",
463
- "class": "TestAnsi",
464
- "method": "Colorize_TextWithSingleLine",
465
- "module": "",
466
- "junit_selector": "com.diogonunes.jcolor.tests.unit.TestAnsi#Colorize_TextWithSingleLine",
467
- "old_test_code": "@Test\npublic void Colorize_TextWithSingleLine() {\n Attribute[] attributes = new Attribute[] { GREEN_BACK };\n String text = createTextLine();\n String formattedText = Ansi.colorize(text, attributes);\n String expectedCode = Ansi.generateCode(attributes);\n assertThat(\"Format must be cleared before changing line, to avoid format spillage\", formattedText, endsWith(Ansi.RESET + NEWLINE));\n}",
468
- "new_test_code": "@Test\npublic void Colorize_TextWithSingleLine() {\n Attribute[] attributes = new Attribute[] { GREEN_BACK() };\n String text = createTextLine();\n String formattedText = Ansi.colorize(text, attributes);\n String expectedCode = Ansi.generateCode(attributes);\n assertThat(\"Format must be cleared before changing line, to avoid format spillage\", formattedText, endsWith(Ansi.RESET + NEWLINE));\n}",
469
- "old_test_file_path": [
470
- "src/test/java/com/diogonunes/jcolor/tests/unit/TestAnsi.java"
471
- ],
472
- "old_test_lnum": [
473
- "143-157"
474
- ],
475
- "new_test_lnum": [
476
- "144-158"
477
- ],
478
- "old_production_code": "",
479
- "new_production_code": "public static Attribute GREEN_BACK() {\n return new SimpleAttribute(\"42\");\n}",
480
- "focal_file_path": "src/main/java/com/diogonunes/jcolor/Attribute.java",
481
- "focal_method_sign": "com/diogonunes/jcolor/Attribute.GREEN_BACK:()Lcom/diogonunes/jcolor/Attribute",
482
- "focal_all_deps_scored": [
483
- {
484
- "dep_id": 0,
485
- "method_sign": "com/diogonunes/jcolor/Attribute.GREEN_BACK:()Lcom/diogonunes/jcolor/Attribute",
486
- "file_path_old": null,
487
- "line_nums_old": null,
488
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
489
- "line_nums_new": "121-123",
490
- "dependency_updated": "inserted",
491
- "score": null,
492
- "signal_scores": {}
493
- }
494
- ],
495
- "coverage_gold": 0.9230769230769231,
496
- "branch_coverage_gold": 75.0,
497
- "method_coverage_gold": 15.2542,
498
- "line_coverage_gold": 35.7143,
499
- "is_traceback": false,
500
- "commit_gap": {
501
- "count": 0,
502
- "skipped_commits": []
503
- },
504
- "test_is_refactoring_only": false,
505
- "has_test_dep_change": false,
506
- "all_deps_new": [
507
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String",
508
- "com/diogonunes/jcolor/Ansi.colorize:(Ljava/lang/String;[Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String",
509
- "com/diogonunes/jcolor/Attribute.GREEN_BACK:()Lcom/diogonunes/jcolor/Attribute",
510
- "com/diogonunes/jcolor/tests/unit/DataGenerator.createTextLine:()Ljava/lang/String"
511
- ],
512
- "all_deps_old": [
513
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String",
514
- "com/diogonunes/jcolor/tests/unit/DataGenerator.createTextLine:()Ljava/lang/String",
515
- "com/diogonunes/jcolor/Ansi.colorize:(Ljava/lang/String;[Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String"
516
- ],
517
- "deps_changes": [
518
- {
519
- "method_sign": "com/diogonunes/jcolor/Attribute.GREEN_BACK:()Lcom/diogonunes/jcolor/Attribute",
520
- "change_type": "ADD",
521
- "file_path_old": null,
522
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
523
- "source": "production",
524
- "is_test_dependency": false,
525
- "is_refactoring_only": false
526
- }
527
- ],
528
- "variant_result": {
529
- "old_on_old": "pass",
530
- "old_on_new": "error",
531
- "new_on_old": "error",
532
- "new_on_new": "pass"
533
- }
534
- },
535
- {
536
- "change_id": "16_dialex_JColor-v5.5.1_f45d224_58bfb85_TestAnsi",
537
- "test_sign": "com/diogonunes/jcolor/tests/unit/TestAnsi.GenerateCode_MultipleAttributesWithValueNone:()V",
538
- "class": "TestAnsi",
539
- "method": "GenerateCode_MultipleAttributesWithValueNone",
540
- "module": "",
541
- "junit_selector": "com.diogonunes.jcolor.tests.unit.TestAnsi#GenerateCode_MultipleAttributesWithValueNone",
542
- "old_test_code": "@Test\npublic void GenerateCode_MultipleAttributesWithValueNone() {\n Attribute[] attributes = new Attribute[] { NONE, NONE, NONE };\n String code = Ansi.generateCode(attributes);\n String expectedCode = PREFIX + POSTFIX;\n assertThat(code, equalTo(expectedCode));\n}",
543
- "new_test_code": "@Test\npublic void GenerateCode_MultipleAttributesWithValueNone() {\n Attribute[] attributes = new Attribute[] { NONE(), NONE(), NONE() };\n String code = Ansi.generateCode(attributes);\n String expectedCode = PREFIX + POSTFIX;\n assertThat(code, equalTo(expectedCode));\n}",
544
- "old_test_file_path": [
545
- "src/test/java/com/diogonunes/jcolor/tests/unit/TestAnsi.java"
546
- ],
547
- "old_test_lnum": [
548
- "99-110"
549
- ],
550
- "new_test_lnum": [
551
- "100-111"
552
- ],
553
- "old_production_code": "",
554
- "new_production_code": "public static Attribute NONE() {\n return new SimpleAttribute(\"\");\n}",
555
- "focal_file_path": "src/main/java/com/diogonunes/jcolor/Attribute.java",
556
- "focal_method_sign": "com/diogonunes/jcolor/Attribute.NONE:()Lcom/diogonunes/jcolor/Attribute",
557
- "focal_all_deps_scored": [
558
- {
559
- "dep_id": 0,
560
- "method_sign": "com/diogonunes/jcolor/Attribute.NONE:()Lcom/diogonunes/jcolor/Attribute",
561
- "file_path_old": null,
562
- "line_nums_old": null,
563
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
564
- "line_nums_new": "19-21",
565
- "dependency_updated": "inserted",
566
- "score": null,
567
- "signal_scores": {}
568
- }
569
- ],
570
- "coverage_gold": 0.8181818181818182,
571
- "branch_coverage_gold": 37.5,
572
- "method_coverage_gold": 11.8644,
573
- "line_coverage_gold": 20.2381,
574
- "is_traceback": false,
575
- "commit_gap": {
576
- "count": 0,
577
- "skipped_commits": []
578
- },
579
- "test_is_refactoring_only": false,
580
- "has_test_dep_change": false,
581
- "all_deps_new": [
582
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String",
583
- "com/diogonunes/jcolor/Attribute.NONE:()Lcom/diogonunes/jcolor/Attribute"
584
- ],
585
- "all_deps_old": [
586
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String"
587
- ],
588
- "deps_changes": [
589
- {
590
- "method_sign": "com/diogonunes/jcolor/Attribute.NONE:()Lcom/diogonunes/jcolor/Attribute",
591
- "change_type": "ADD",
592
- "file_path_old": null,
593
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
594
- "source": "production",
595
- "is_test_dependency": false,
596
- "is_refactoring_only": false
597
- }
598
- ],
599
- "variant_result": {
600
- "old_on_old": "pass",
601
- "old_on_new": "error",
602
- "new_on_old": "error",
603
- "new_on_new": "pass"
604
- }
605
- },
606
- {
607
- "change_id": "18_dialex_JColor-v5.5.1_f45d224_58bfb85_TestAnsi",
608
- "test_sign": "com/diogonunes/jcolor/tests/unit/TestAnsi.Colorize_TextWithoutLines:()V",
609
- "class": "TestAnsi",
610
- "method": "Colorize_TextWithoutLines",
611
- "module": "",
612
- "junit_selector": "com.diogonunes.jcolor.tests.unit.TestAnsi#Colorize_TextWithoutLines",
613
- "old_test_code": "@Test\npublic void Colorize_TextWithoutLines() {\n Attribute[] attributes = new Attribute[] { YELLOW_BACK };\n String text = createText();\n String formattedText = Ansi.colorize(text, attributes);\n String expectedCode = Ansi.generateCode(attributes);\n assertThat(formattedText, startsWith(expectedCode));\n assertThat(\"Message should clear its format\", formattedText, endsWith(Ansi.RESET));\n}",
614
- "new_test_code": "@Test\npublic void Colorize_TextWithoutLines() {\n Attribute[] attributes = new Attribute[] { YELLOW_BACK() };\n String text = createText();\n String formattedText = Ansi.colorize(text, attributes);\n String expectedCode = Ansi.generateCode(attributes);\n assertThat(formattedText, startsWith(expectedCode));\n assertThat(\"Message should clear its format\", formattedText, endsWith(Ansi.RESET));\n}",
615
- "old_test_file_path": [
616
- "src/test/java/com/diogonunes/jcolor/tests/unit/TestAnsi.java"
617
- ],
618
- "old_test_lnum": [
619
- "127-141"
620
- ],
621
- "new_test_lnum": [
622
- "128-142"
623
- ],
624
- "old_production_code": "",
625
- "new_production_code": "public static Attribute YELLOW_BACK() {\n return new SimpleAttribute(\"43\");\n}",
626
- "focal_file_path": "src/main/java/com/diogonunes/jcolor/Attribute.java",
627
- "focal_method_sign": "com/diogonunes/jcolor/Attribute.YELLOW_BACK:()Lcom/diogonunes/jcolor/Attribute",
628
- "focal_all_deps_scored": [
629
- {
630
- "dep_id": 0,
631
- "method_sign": "com/diogonunes/jcolor/Attribute.YELLOW_BACK:()Lcom/diogonunes/jcolor/Attribute",
632
- "file_path_old": null,
633
- "line_nums_old": null,
634
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
635
- "line_nums_new": "125-127",
636
- "dependency_updated": "inserted",
637
- "score": null,
638
- "signal_scores": {}
639
- }
640
- ],
641
- "coverage_gold": 0.9230769230769231,
642
- "branch_coverage_gold": 75.0,
643
- "method_coverage_gold": 15.2542,
644
- "line_coverage_gold": 34.5238,
645
- "is_traceback": false,
646
- "commit_gap": {
647
- "count": 0,
648
- "skipped_commits": []
649
- },
650
- "test_is_refactoring_only": false,
651
- "has_test_dep_change": false,
652
- "all_deps_new": [
653
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String",
654
- "com/diogonunes/jcolor/Ansi.colorize:(Ljava/lang/String;[Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String",
655
- "com/diogonunes/jcolor/tests/unit/DataGenerator.createText:()Ljava/lang/String",
656
- "com/diogonunes/jcolor/Attribute.YELLOW_BACK:()Lcom/diogonunes/jcolor/Attribute"
657
- ],
658
- "all_deps_old": [
659
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String",
660
- "com/diogonunes/jcolor/Ansi.colorize:(Ljava/lang/String;[Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String",
661
- "com/diogonunes/jcolor/tests/unit/DataGenerator.createText:()Ljava/lang/String"
662
- ],
663
- "deps_changes": [
664
- {
665
- "method_sign": "com/diogonunes/jcolor/Attribute.YELLOW_BACK:()Lcom/diogonunes/jcolor/Attribute",
666
- "change_type": "ADD",
667
- "file_path_old": null,
668
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
669
- "source": "production",
670
- "is_test_dependency": false,
671
- "is_refactoring_only": false
672
- }
673
- ],
674
- "variant_result": {
675
- "old_on_old": "pass",
676
- "old_on_new": "error",
677
- "new_on_old": "error",
678
- "new_on_new": "pass"
679
- }
680
- },
681
- {
682
- "change_id": "19_dialex_JColor-v5.5.1_f45d224_58bfb85_TestAnsi",
683
- "test_sign": "com/diogonunes/jcolor/tests/unit/TestAnsi.GenerateCode_MultipleAttributes_HandlesAnsiFormat:()V",
684
- "class": "TestAnsi",
685
- "method": "GenerateCode_MultipleAttributes_HandlesAnsiFormat",
686
- "module": "",
687
- "junit_selector": "com.diogonunes.jcolor.tests.unit.TestAnsi#GenerateCode_MultipleAttributes_HandlesAnsiFormat",
688
- "old_test_code": "@Test\npublic void GenerateCode_MultipleAttributes_HandlesAnsiFormat() {\n AnsiFormat attributes = new AnsiFormat(DIM, CYAN_TEXT);\n String code = Ansi.generateCode(attributes);\n String expectedCode = PREFIX + DIM + SEPARATOR + CYAN_TEXT + POSTFIX;\n assertThat(code, equalTo(expectedCode));\n}",
689
- "new_test_code": "@Test\npublic void GenerateCode_MultipleAttributes_HandlesAnsiFormat() {\n AnsiFormat attributes = new AnsiFormat(DIM(), CYAN_TEXT());\n String code = Ansi.generateCode(attributes);\n String expectedCode = PREFIX + DIM() + SEPARATOR + CYAN_TEXT() + POSTFIX;\n assertThat(code, equalTo(expectedCode));\n}",
690
- "old_test_file_path": [
691
- "src/test/java/com/diogonunes/jcolor/tests/unit/TestAnsi.java"
692
- ],
693
- "old_test_lnum": [
694
- "72-83"
695
- ],
696
- "new_test_lnum": [
697
- "73-84"
698
- ],
699
- "old_production_code": "@Override\npublic String toString() {\n return getCode();\n}",
700
- "new_production_code": "",
701
- "focal_file_path": "src/main/java/com/diogonunes/jcolor/Ansi.java",
702
- "focal_method_sign": "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String",
703
- "focal_all_deps_scored": [
704
- {
705
- "dep_id": 0,
706
- "method_sign": "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String",
707
- "file_path_old": "src/main/java/com/diogonunes/jcolor/Ansi.java",
708
- "line_nums_old": "102-105",
709
- "file_path_new": null,
710
- "line_nums_new": null,
711
- "dependency_updated": "deleted",
712
- "score": 0.3559,
713
- "signal_scores": {
714
- "nc": 0.0,
715
- "lcs_u": 0.75,
716
- "ed": 0.1224,
717
- "class": 1.0,
718
- "tfidf": 0.0646
719
- }
720
- },
721
- {
722
- "dep_id": 1,
723
- "method_sign": "com/diogonunes/jcolor/Attribute.DIM:()Lcom/diogonunes/jcolor/Attribute",
724
- "file_path_old": null,
725
- "line_nums_old": null,
726
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
727
- "line_nums_new": "38-40",
728
- "dependency_updated": "inserted",
729
- "score": 0.2242,
730
- "signal_scores": {
731
- "nc": 0.0,
732
- "lcs_u": 1.0,
733
- "ed": 0.0612,
734
- "class": 0.0,
735
- "tfidf": 0.1598
736
- }
737
- },
738
- {
739
- "dep_id": 2,
740
- "method_sign": "com/diogonunes/jcolor/SimpleAttribute.toString:()Ljava/lang/String",
741
- "file_path_old": null,
742
- "line_nums_old": null,
743
- "file_path_new": "src/main/java/com/diogonunes/jcolor/SimpleAttribute.java",
744
- "line_nums_new": "16-19",
745
- "dependency_updated": "inserted",
746
- "score": 0.1677,
747
- "signal_scores": {
748
- "nc": 0.0,
749
- "lcs_u": 0.75,
750
- "ed": 0.1224,
751
- "class": 0.0,
752
- "tfidf": 0.0646
753
- }
754
- },
755
- {
756
- "dep_id": 3,
757
- "method_sign": "com/diogonunes/jcolor/Attribute.CYAN_TEXT:()Lcom/diogonunes/jcolor/Attribute",
758
- "file_path_old": null,
759
- "line_nums_old": null,
760
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
761
- "line_nums_new": "103-105",
762
- "dependency_updated": "inserted",
763
- "score": 0.1466,
764
- "signal_scores": {
765
- "nc": 0.0,
766
- "lcs_u": 0.5556,
767
- "ed": 0.102,
768
- "class": 0.0,
769
- "tfidf": 0.1351
770
- }
771
- }
772
- ],
773
- "coverage_gold": 1.0,
774
- "branch_coverage_gold": 37.5,
775
- "method_coverage_gold": 18.6441,
776
- "line_coverage_gold": 29.7619,
777
- "is_traceback": false,
778
- "commit_gap": {
779
- "count": 0,
780
- "skipped_commits": []
781
- },
782
- "test_is_refactoring_only": false,
783
- "has_test_dep_change": false,
784
- "all_deps_new": [
785
- "com/diogonunes/jcolor/Attribute.DIM:()Lcom/diogonunes/jcolor/Attribute",
786
- "com/diogonunes/jcolor/Attribute.CYAN_TEXT:()Lcom/diogonunes/jcolor/Attribute",
787
- "com/diogonunes/jcolor/Ansi.generateCode:(Lcom/diogonunes/jcolor/AnsiFormat;)Ljava/lang/String",
788
- "com/diogonunes/jcolor/SimpleAttribute.toString:()Ljava/lang/String"
789
- ],
790
- "all_deps_old": [
791
- "com/diogonunes/jcolor/Ansi.generateCode:(Lcom/diogonunes/jcolor/AnsiFormat;)Ljava/lang/String",
792
- "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String"
793
- ],
794
- "deps_changes": [
795
- {
796
- "method_sign": "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String",
797
- "change_type": "DELETE",
798
- "file_path_old": "src/main/java/com/diogonunes/jcolor/Ansi.java",
799
- "file_path_new": null,
800
- "source": "production",
801
- "is_test_dependency": false,
802
- "is_refactoring_only": false
803
- },
804
- {
805
- "method_sign": "com/diogonunes/jcolor/Attribute.DIM:()Lcom/diogonunes/jcolor/Attribute",
806
- "change_type": "ADD",
807
- "file_path_old": null,
808
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
809
- "source": "production",
810
- "is_test_dependency": false,
811
- "is_refactoring_only": false
812
- },
813
- {
814
- "method_sign": "com/diogonunes/jcolor/SimpleAttribute.toString:()Ljava/lang/String",
815
- "change_type": "ADD",
816
- "file_path_old": null,
817
- "file_path_new": "src/main/java/com/diogonunes/jcolor/SimpleAttribute.java",
818
- "source": "production",
819
- "is_test_dependency": false,
820
- "is_refactoring_only": false
821
- },
822
- {
823
- "method_sign": "com/diogonunes/jcolor/Attribute.CYAN_TEXT:()Lcom/diogonunes/jcolor/Attribute",
824
- "change_type": "ADD",
825
- "file_path_old": null,
826
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
827
- "source": "production",
828
- "is_test_dependency": false,
829
- "is_refactoring_only": false
830
- }
831
- ],
832
- "variant_result": {
833
- "old_on_old": "pass",
834
- "old_on_new": "error",
835
- "new_on_old": "error",
836
- "new_on_new": "pass"
837
- }
838
- },
839
- {
840
- "change_id": "20_dialex_JColor-v5.5.1_f45d224_58bfb85_TestAnsi",
841
- "test_sign": "com/diogonunes/jcolor/tests/unit/TestAnsi.Colorize_ConflictingAttributes_UsesTheLast:()V",
842
- "class": "TestAnsi",
843
- "method": "Colorize_ConflictingAttributes_UsesTheLast",
844
- "module": "",
845
- "junit_selector": "com.diogonunes.jcolor.tests.unit.TestAnsi#Colorize_ConflictingAttributes_UsesTheLast",
846
- "old_test_code": "@Test\npublic void Colorize_ConflictingAttributes_UsesTheLast() {\n Attribute[] attributes = new Attribute[] { BLACK_BACK, WHITE_BACK, BLUE_BACK };\n String text = \"This text will have a blue back\";\n String formattedText = Ansi.colorize(text, attributes);\n String expectedCode = Ansi.generateCode(attributes);\n assertThat(formattedText, startsWith(expectedCode));\n assertThat(\"Message should clear its format\", formattedText, endsWith(Ansi.RESET));\n}",
847
- "new_test_code": "@Test\npublic void Colorize_ConflictingAttributes_UsesTheLast() {\n Attribute[] attributes = new Attribute[] { BLACK_BACK(), WHITE_BACK(), BLUE_BACK() };\n String text = \"This text will have a blue back\";\n String formattedText = Ansi.colorize(text, attributes);\n String expectedCode = Ansi.generateCode(attributes);\n assertThat(formattedText, startsWith(expectedCode));\n assertThat(\"Message should clear its format\", formattedText, endsWith(Ansi.RESET));\n}",
848
- "old_test_file_path": [
849
- "src/test/java/com/diogonunes/jcolor/tests/unit/TestAnsi.java"
850
- ],
851
- "old_test_lnum": [
852
- "176-190"
853
- ],
854
- "new_test_lnum": [
855
- "177-191"
856
- ],
857
- "old_production_code": "",
858
- "new_production_code": "public static Attribute BLUE_BACK() {\n return new SimpleAttribute(\"44\");\n}",
859
- "focal_file_path": "src/main/java/com/diogonunes/jcolor/Attribute.java",
860
- "focal_method_sign": "com/diogonunes/jcolor/Attribute.BLUE_BACK:()Lcom/diogonunes/jcolor/Attribute",
861
- "focal_all_deps_scored": [
862
- {
863
- "dep_id": 1,
864
- "method_sign": "com/diogonunes/jcolor/Attribute.BLUE_BACK:()Lcom/diogonunes/jcolor/Attribute",
865
- "file_path_old": null,
866
- "line_nums_old": null,
867
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
868
- "line_nums_new": "129-131",
869
- "dependency_updated": "inserted",
870
- "score": 0.2052,
871
- "signal_scores": {
872
- "nc": 0.0,
873
- "lcs_u": 0.5556,
874
- "ed": 0.119,
875
- "class": 0.0,
876
- "tfidf": 0.3721
877
- }
878
- },
879
- {
880
- "dep_id": 0,
881
- "method_sign": "com/diogonunes/jcolor/Attribute.WHITE_BACK:()Lcom/diogonunes/jcolor/Attribute",
882
- "file_path_old": null,
883
- "line_nums_old": null,
884
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
885
- "line_nums_new": "141-143",
886
- "dependency_updated": "inserted",
887
- "score": 0.1954,
888
- "signal_scores": {
889
- "nc": 0.0,
890
- "lcs_u": 0.5,
891
- "ed": 0.119,
892
- "class": 0.0,
893
- "tfidf": 0.3721
894
- }
895
- },
896
- {
897
- "dep_id": 2,
898
- "method_sign": "com/diogonunes/jcolor/Attribute.BLACK_BACK:()Lcom/diogonunes/jcolor/Attribute",
899
- "file_path_old": null,
900
- "line_nums_old": null,
901
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
902
- "line_nums_new": "113-115",
903
- "dependency_updated": "inserted",
904
- "score": 0.1738,
905
- "signal_scores": {
906
- "nc": 0.0,
907
- "lcs_u": 0.4,
908
- "ed": 0.0952,
909
- "class": 0.0,
910
- "tfidf": 0.3721
911
- }
912
- }
913
- ],
914
- "coverage_gold": 0.9333333333333333,
915
- "branch_coverage_gold": 75.0,
916
- "method_coverage_gold": 18.6441,
917
- "line_coverage_gold": 36.9048,
918
- "is_traceback": false,
919
- "commit_gap": {
920
- "count": 0,
921
- "skipped_commits": []
922
- },
923
- "test_is_refactoring_only": false,
924
- "has_test_dep_change": false,
925
- "all_deps_new": [
926
- "com/diogonunes/jcolor/Attribute.BLACK_BACK:()Lcom/diogonunes/jcolor/Attribute",
927
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String",
928
- "com/diogonunes/jcolor/Ansi.colorize:(Ljava/lang/String;[Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String",
929
- "com/diogonunes/jcolor/Attribute.WHITE_BACK:()Lcom/diogonunes/jcolor/Attribute",
930
- "com/diogonunes/jcolor/Attribute.BLUE_BACK:()Lcom/diogonunes/jcolor/Attribute"
931
- ],
932
- "all_deps_old": [
933
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String",
934
- "com/diogonunes/jcolor/Ansi.colorize:(Ljava/lang/String;[Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String"
935
- ],
936
- "deps_changes": [
937
- {
938
- "method_sign": "com/diogonunes/jcolor/Attribute.WHITE_BACK:()Lcom/diogonunes/jcolor/Attribute",
939
- "change_type": "ADD",
940
- "file_path_old": null,
941
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
942
- "source": "production",
943
- "is_test_dependency": false,
944
- "is_refactoring_only": false
945
- },
946
- {
947
- "method_sign": "com/diogonunes/jcolor/Attribute.BLUE_BACK:()Lcom/diogonunes/jcolor/Attribute",
948
- "change_type": "ADD",
949
- "file_path_old": null,
950
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
951
- "source": "production",
952
- "is_test_dependency": false,
953
- "is_refactoring_only": false
954
- },
955
- {
956
- "method_sign": "com/diogonunes/jcolor/Attribute.BLACK_BACK:()Lcom/diogonunes/jcolor/Attribute",
957
- "change_type": "ADD",
958
- "file_path_old": null,
959
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
960
- "source": "production",
961
- "is_test_dependency": false,
962
- "is_refactoring_only": false
963
- }
964
- ],
965
- "variant_result": {
966
- "old_on_old": "pass",
967
- "old_on_new": "error",
968
- "new_on_old": "error",
969
- "new_on_new": "pass"
970
- }
971
- },
972
- {
973
- "change_id": "21_dialex_JColor-v5.5.1_f45d224_58bfb85_TestAnsi",
974
- "test_sign": "com/diogonunes/jcolor/tests/unit/TestAnsi.GenerateCode_MultipleAttributes_HandlesArray:()V",
975
- "class": "TestAnsi",
976
- "method": "GenerateCode_MultipleAttributes_HandlesArray",
977
- "module": "",
978
- "junit_selector": "com.diogonunes.jcolor.tests.unit.TestAnsi#GenerateCode_MultipleAttributes_HandlesArray",
979
- "old_test_code": "@Test\npublic void GenerateCode_MultipleAttributes_HandlesArray() {\n Attribute[] attributes = new Attribute[] { DIM, CYAN_TEXT };\n String code = Ansi.generateCode(attributes);\n String expectedCode = PREFIX + attributes[0] + SEPARATOR + attributes[1] + POSTFIX;\n assertThat(code, equalTo(expectedCode));\n}",
980
- "new_test_code": "@Test\npublic void GenerateCode_MultipleAttributes_HandlesArray() {\n Attribute[] attributes = new Attribute[] { DIM(), CYAN_TEXT() };\n String code = Ansi.generateCode(attributes);\n String expectedCode = PREFIX + attributes[0] + SEPARATOR + attributes[1] + POSTFIX;\n assertThat(code, equalTo(expectedCode));\n}",
981
- "old_test_file_path": [
982
- "src/test/java/com/diogonunes/jcolor/tests/unit/TestAnsi.java"
983
- ],
984
- "old_test_lnum": [
985
- "59-70"
986
- ],
987
- "new_test_lnum": [
988
- "60-71"
989
- ],
990
- "old_production_code": "@Override\npublic String toString() {\n return getCode();\n}",
991
- "new_production_code": "",
992
- "focal_file_path": "src/main/java/com/diogonunes/jcolor/Ansi.java",
993
- "focal_method_sign": "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String",
994
- "focal_all_deps_scored": [
995
- {
996
- "dep_id": 0,
997
- "method_sign": "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String",
998
- "file_path_old": "src/main/java/com/diogonunes/jcolor/Ansi.java",
999
- "line_nums_old": "102-105",
1000
- "file_path_new": null,
1001
- "line_nums_new": null,
1002
- "dependency_updated": "deleted",
1003
- "score": 0.3431,
1004
- "signal_scores": {
1005
- "nc": 0.0,
1006
- "lcs_u": 0.75,
1007
- "ed": 0.1364,
1008
- "class": 1.0,
1009
- "tfidf": 0.0
1010
- }
1011
- },
1012
- {
1013
- "dep_id": 1,
1014
- "method_sign": "com/diogonunes/jcolor/Attribute.DIM:()Lcom/diogonunes/jcolor/Attribute",
1015
- "file_path_old": null,
1016
- "line_nums_old": null,
1017
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1018
- "line_nums_new": "38-40",
1019
- "dependency_updated": "inserted",
1020
- "score": 0.2435,
1021
- "signal_scores": {
1022
- "nc": 0.0,
1023
- "lcs_u": 0.6667,
1024
- "ed": 0.0455,
1025
- "class": 0.0,
1026
- "tfidf": 0.5029
1027
- }
1028
- },
1029
- {
1030
- "dep_id": 3,
1031
- "method_sign": "com/diogonunes/jcolor/Attribute.CYAN_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1032
- "file_path_old": null,
1033
- "line_nums_old": null,
1034
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1035
- "line_nums_new": "103-105",
1036
- "dependency_updated": "inserted",
1037
- "score": 0.2135,
1038
- "signal_scores": {
1039
- "nc": 0.0,
1040
- "lcs_u": 0.5556,
1041
- "ed": 0.1136,
1042
- "class": 0.0,
1043
- "tfidf": 0.4111
1044
- }
1045
- },
1046
- {
1047
- "dep_id": 2,
1048
- "method_sign": "com/diogonunes/jcolor/SimpleAttribute.toString:()Ljava/lang/String",
1049
- "file_path_old": null,
1050
- "line_nums_old": null,
1051
- "file_path_new": "src/main/java/com/diogonunes/jcolor/SimpleAttribute.java",
1052
- "line_nums_new": "16-19",
1053
- "dependency_updated": "inserted",
1054
- "score": 0.1548,
1055
- "signal_scores": {
1056
- "nc": 0.0,
1057
- "lcs_u": 0.75,
1058
- "ed": 0.1364,
1059
- "class": 0.0,
1060
- "tfidf": 0.0
1061
- }
1062
- }
1063
- ],
1064
- "coverage_gold": 0.9230769230769231,
1065
- "branch_coverage_gold": 37.5,
1066
- "method_coverage_gold": 13.5593,
1067
- "line_coverage_gold": 22.619,
1068
- "is_traceback": false,
1069
- "commit_gap": {
1070
- "count": 0,
1071
- "skipped_commits": []
1072
- },
1073
- "test_is_refactoring_only": false,
1074
- "has_test_dep_change": false,
1075
- "all_deps_new": [
1076
- "com/diogonunes/jcolor/Attribute.DIM:()Lcom/diogonunes/jcolor/Attribute",
1077
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String",
1078
- "com/diogonunes/jcolor/Attribute.CYAN_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1079
- "com/diogonunes/jcolor/SimpleAttribute.toString:()Ljava/lang/String"
1080
- ],
1081
- "all_deps_old": [
1082
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String",
1083
- "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String"
1084
- ],
1085
- "deps_changes": [
1086
- {
1087
- "method_sign": "com/diogonunes/jcolor/Ansi$Attribute.toString:()Ljava/lang/String",
1088
- "change_type": "DELETE",
1089
- "file_path_old": "src/main/java/com/diogonunes/jcolor/Ansi.java",
1090
- "file_path_new": null,
1091
- "source": "production",
1092
- "is_test_dependency": false,
1093
- "is_refactoring_only": false
1094
- },
1095
- {
1096
- "method_sign": "com/diogonunes/jcolor/Attribute.DIM:()Lcom/diogonunes/jcolor/Attribute",
1097
- "change_type": "ADD",
1098
- "file_path_old": null,
1099
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1100
- "source": "production",
1101
- "is_test_dependency": false,
1102
- "is_refactoring_only": false
1103
- },
1104
- {
1105
- "method_sign": "com/diogonunes/jcolor/SimpleAttribute.toString:()Ljava/lang/String",
1106
- "change_type": "ADD",
1107
- "file_path_old": null,
1108
- "file_path_new": "src/main/java/com/diogonunes/jcolor/SimpleAttribute.java",
1109
- "source": "production",
1110
- "is_test_dependency": false,
1111
- "is_refactoring_only": false
1112
- },
1113
- {
1114
- "method_sign": "com/diogonunes/jcolor/Attribute.CYAN_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1115
- "change_type": "ADD",
1116
- "file_path_old": null,
1117
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1118
- "source": "production",
1119
- "is_test_dependency": false,
1120
- "is_refactoring_only": false
1121
- }
1122
- ],
1123
- "variant_result": {
1124
- "old_on_old": "pass",
1125
- "old_on_new": "error",
1126
- "new_on_old": "error",
1127
- "new_on_new": "pass"
1128
- }
1129
- },
1130
- {
1131
- "change_id": "22_dialex_JColor-v5.5.1_f45d224_58bfb85_TestAnsi",
1132
- "test_sign": "com/diogonunes/jcolor/tests/unit/TestAnsi.Colorize_TextWithMultiplesLines:()V",
1133
- "class": "TestAnsi",
1134
- "method": "Colorize_TextWithMultiplesLines",
1135
- "module": "",
1136
- "junit_selector": "com.diogonunes.jcolor.tests.unit.TestAnsi#Colorize_TextWithMultiplesLines",
1137
- "old_test_code": "@Test\npublic void Colorize_TextWithMultiplesLines() {\n Attribute[] attributes = new Attribute[] { RED_BACK };\n String text1 = createTextWithId(1), text2 = createTextWithId(2);\n String fullText = text1 + NEWLINE + text2 + NEWLINE;\n String formattedText = Ansi.colorize(fullText, attributes);\n String expectedCode = Ansi.generateCode(attributes);\n assertThat(\"Middle lines preserve format\", formattedText, containsString(expectedCode + text2 + Ansi.RESET));\n assertThat(formattedText, endsWith(Ansi.RESET + NEWLINE));\n}",
1138
- "new_test_code": "@Test\npublic void Colorize_TextWithMultiplesLines() {\n Attribute[] attributes = new Attribute[] { RED_BACK() };\n String text1 = createTextWithId(1), text2 = createTextWithId(2);\n String fullText = text1 + NEWLINE + text2 + NEWLINE;\n String formattedText = Ansi.colorize(fullText, attributes);\n String expectedCode = Ansi.generateCode(attributes);\n assertThat(\"Middle lines preserve format\", formattedText, containsString(expectedCode + text2 + Ansi.RESET));\n assertThat(formattedText, endsWith(Ansi.RESET + NEWLINE));\n}",
1139
- "old_test_file_path": [
1140
- "src/test/java/com/diogonunes/jcolor/tests/unit/TestAnsi.java"
1141
- ],
1142
- "old_test_lnum": [
1143
- "159-174"
1144
- ],
1145
- "new_test_lnum": [
1146
- "160-175"
1147
- ],
1148
- "old_production_code": "",
1149
- "new_production_code": "public static Attribute RED_BACK() {\n return new SimpleAttribute(\"41\");\n}",
1150
- "focal_file_path": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1151
- "focal_method_sign": "com/diogonunes/jcolor/Attribute.RED_BACK:()Lcom/diogonunes/jcolor/Attribute",
1152
- "focal_all_deps_scored": [
1153
- {
1154
- "dep_id": 0,
1155
- "method_sign": "com/diogonunes/jcolor/Attribute.RED_BACK:()Lcom/diogonunes/jcolor/Attribute",
1156
- "file_path_old": null,
1157
- "line_nums_old": null,
1158
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1159
- "line_nums_new": "117-119",
1160
- "dependency_updated": "inserted",
1161
- "score": null,
1162
- "signal_scores": {}
1163
- }
1164
- ],
1165
- "coverage_gold": 0.9090909090909091,
1166
- "branch_coverage_gold": 75.0,
1167
- "method_coverage_gold": 15.2542,
1168
- "line_coverage_gold": 35.7143,
1169
- "is_traceback": false,
1170
- "commit_gap": {
1171
- "count": 0,
1172
- "skipped_commits": []
1173
- },
1174
- "test_is_refactoring_only": false,
1175
- "has_test_dep_change": false,
1176
- "all_deps_new": [
1177
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String",
1178
- "com/diogonunes/jcolor/tests/unit/DataGenerator.createTextWithId:(I)Ljava/lang/String",
1179
- "com/diogonunes/jcolor/Attribute.RED_BACK:()Lcom/diogonunes/jcolor/Attribute"
1180
- ],
1181
- "all_deps_old": [
1182
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String",
1183
- "com/diogonunes/jcolor/tests/unit/DataGenerator.createTextWithId:(I)Ljava/lang/String"
1184
- ],
1185
- "deps_changes": [
1186
- {
1187
- "method_sign": "com/diogonunes/jcolor/Attribute.RED_BACK:()Lcom/diogonunes/jcolor/Attribute",
1188
- "change_type": "ADD",
1189
- "file_path_old": null,
1190
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1191
- "source": "production",
1192
- "is_test_dependency": false,
1193
- "is_refactoring_only": false
1194
- }
1195
- ],
1196
- "variant_result": {
1197
- "old_on_old": "pass",
1198
- "old_on_new": "error",
1199
- "new_on_old": "error",
1200
- "new_on_new": "pass"
1201
- }
1202
- }
1203
- ],
1204
- "version": "v5.5.1",
1205
- "java_version": 8
1206
- },
1207
- {
1208
- "task_id": "dialex_JColor-v5.5.1__f45d224_58bfb85__TestUsage_3d3f1a66",
1209
- "project_name": "dialex_JColor-v5.5.1",
1210
- "git_clone_url": "https://github.com/dialex/JColor.git",
1211
- "rev1": "f45d224da5407344997ffdd8c08d2e16efd619c7",
1212
- "rev2": "58bfb858cccd42a31e7c67a473bf96eacd440882",
1213
- "rev1_date": "2020-07-04T17:09:44Z",
1214
- "rev2_date": "2020-07-04T18:18:58Z",
1215
- "git_diff_url": "https://github.com/dialex/JColor/compare/f45d224da5407344997ffdd8c08d2e16efd619c7...58bfb858cccd42a31e7c67a473bf96eacd440882",
1216
- "test_file": "src/test/java/com/diogonunes/jcolor/tests/unit/TestUsage.java",
1217
- "test_changes": [
1218
- {
1219
- "change_id": "9_dialex_JColor-v5.5.1_f45d224_58bfb85_TestUsage",
1220
- "test_sign": "com/diogonunes/jcolor/tests/unit/TestUsage.CanFormatWithOneAttribute:()V",
1221
- "class": "TestUsage",
1222
- "method": "CanFormatWithOneAttribute",
1223
- "module": "",
1224
- "junit_selector": "com.diogonunes.jcolor.tests.unit.TestUsage#CanFormatWithOneAttribute",
1225
- "old_test_code": "@Test\npublic void CanFormatWithOneAttribute() {\n AnsiFormat fInfo = new AnsiFormat(CYAN_BACK);\n String formattedText = fInfo.format(\"This text will have a cyan back\");\n String expectedCode = Ansi.generateCode(fInfo);\n assertThat(formattedText, startsWith(expectedCode));\n assertThat(\"Message should clear its format\", formattedText, endsWith(Ansi.RESET));\n}",
1226
- "new_test_code": "@Test\npublic void CanFormatWithOneAttribute() {\n AnsiFormat fInfo = new AnsiFormat(CYAN_BACK());\n String formattedText = fInfo.format(\"This text will have a cyan back\");\n String expectedCode = Ansi.generateCode(fInfo);\n assertThat(formattedText, startsWith(expectedCode));\n assertThat(\"Message should clear its format\", formattedText, endsWith(Ansi.RESET));\n}",
1227
- "old_test_file_path": [
1228
- "src/test/java/com/diogonunes/jcolor/tests/unit/TestUsage.java"
1229
- ],
1230
- "old_test_lnum": [
1231
- "14-27"
1232
- ],
1233
- "new_test_lnum": [
1234
- "15-28"
1235
- ],
1236
- "old_production_code": "",
1237
- "new_production_code": "public static Attribute CYAN_BACK() {\n return new SimpleAttribute(\"46\");\n}",
1238
- "focal_file_path": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1239
- "focal_method_sign": "com/diogonunes/jcolor/Attribute.CYAN_BACK:()Lcom/diogonunes/jcolor/Attribute",
1240
- "focal_all_deps_scored": [
1241
- {
1242
- "dep_id": 0,
1243
- "method_sign": "com/diogonunes/jcolor/Attribute.CYAN_BACK:()Lcom/diogonunes/jcolor/Attribute",
1244
- "file_path_old": null,
1245
- "line_nums_old": null,
1246
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1247
- "line_nums_new": "137-139",
1248
- "dependency_updated": "inserted",
1249
- "score": null,
1250
- "signal_scores": {}
1251
- }
1252
- ],
1253
- "coverage_gold": 1.0,
1254
- "branch_coverage_gold": 75.0,
1255
- "method_coverage_gold": 22.0339,
1256
- "line_coverage_gold": 42.8571,
1257
- "is_traceback": false,
1258
- "commit_gap": {
1259
- "count": 0,
1260
- "skipped_commits": []
1261
- },
1262
- "test_is_refactoring_only": false,
1263
- "has_test_dep_change": false,
1264
- "all_deps_new": [
1265
- "com/diogonunes/jcolor/AnsiFormat.format:(Ljava/lang/String;)Ljava/lang/String",
1266
- "com/diogonunes/jcolor/Ansi.generateCode:(Lcom/diogonunes/jcolor/AnsiFormat;)Ljava/lang/String",
1267
- "com/diogonunes/jcolor/Attribute.CYAN_BACK:()Lcom/diogonunes/jcolor/Attribute"
1268
- ],
1269
- "all_deps_old": [
1270
- "com/diogonunes/jcolor/Ansi.generateCode:(Lcom/diogonunes/jcolor/AnsiFormat;)Ljava/lang/String",
1271
- "com/diogonunes/jcolor/AnsiFormat.format:(Ljava/lang/String;)Ljava/lang/String"
1272
- ],
1273
- "deps_changes": [
1274
- {
1275
- "method_sign": "com/diogonunes/jcolor/Attribute.CYAN_BACK:()Lcom/diogonunes/jcolor/Attribute",
1276
- "change_type": "ADD",
1277
- "file_path_old": null,
1278
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1279
- "source": "production",
1280
- "is_test_dependency": false,
1281
- "is_refactoring_only": false
1282
- }
1283
- ],
1284
- "variant_result": {
1285
- "old_on_old": "pass",
1286
- "old_on_new": "error",
1287
- "new_on_old": "error",
1288
- "new_on_new": "pass"
1289
- }
1290
- },
1291
- {
1292
- "change_id": "10_dialex_JColor-v5.5.1_f45d224_58bfb85_TestUsage",
1293
- "test_sign": "com/diogonunes/jcolor/tests/unit/TestUsage.CanMakeItFabulous:()V",
1294
- "class": "TestUsage",
1295
- "method": "CanMakeItFabulous",
1296
- "module": "",
1297
- "junit_selector": "com.diogonunes.jcolor.tests.unit.TestUsage#CanMakeItFabulous",
1298
- "old_test_code": "@Test\npublic void CanMakeItFabulous() {\n String text = \"This text will be magenta\";\n String formattedText = makeItFabulous(text, MAGENTA_TEXT);\n assertThat(formattedText, equalTo(colorize(text, MAGENTA_TEXT)));\n}",
1299
- "new_test_code": "@Test\npublic void CanMakeItFabulous() {\n String text = \"This text will be magenta\";\n String formattedText = makeItFabulous(text, MAGENTA_TEXT());\n assertThat(formattedText, equalTo(colorize(text, MAGENTA_TEXT())));\n}",
1300
- "old_test_file_path": [
1301
- "src/test/java/com/diogonunes/jcolor/tests/unit/TestUsage.java"
1302
- ],
1303
- "old_test_lnum": [
1304
- "58-68"
1305
- ],
1306
- "new_test_lnum": [
1307
- "59-69"
1308
- ],
1309
- "old_production_code": "",
1310
- "new_production_code": "public static Attribute MAGENTA_TEXT() {\n return new SimpleAttribute(\"35\");\n}",
1311
- "focal_file_path": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1312
- "focal_method_sign": "com/diogonunes/jcolor/Attribute.MAGENTA_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1313
- "focal_all_deps_scored": [
1314
- {
1315
- "dep_id": 0,
1316
- "method_sign": "com/diogonunes/jcolor/Attribute.MAGENTA_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1317
- "file_path_old": null,
1318
- "line_nums_old": null,
1319
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1320
- "line_nums_new": "99-101",
1321
- "dependency_updated": "inserted",
1322
- "score": null,
1323
- "signal_scores": {}
1324
- }
1325
- ],
1326
- "coverage_gold": 1.0,
1327
- "branch_coverage_gold": 75.0,
1328
- "method_coverage_gold": 16.9492,
1329
- "line_coverage_gold": 35.7143,
1330
- "is_traceback": false,
1331
- "commit_gap": {
1332
- "count": 0,
1333
- "skipped_commits": []
1334
- },
1335
- "test_is_refactoring_only": false,
1336
- "has_test_dep_change": false,
1337
- "all_deps_new": [
1338
- "com/diogonunes/jcolor/Attribute.MAGENTA_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1339
- "com/diogonunes/jcolor/Ansi.colorize:(Ljava/lang/String;[Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String",
1340
- "com/diogonunes/jcolor/Ansi.makeItFabulous:(Ljava/lang/String;[Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String"
1341
- ],
1342
- "all_deps_old": [
1343
- "com/diogonunes/jcolor/Ansi.makeItFabulous:(Ljava/lang/String;[Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String",
1344
- "com/diogonunes/jcolor/Ansi.colorize:(Ljava/lang/String;[Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String"
1345
- ],
1346
- "deps_changes": [
1347
- {
1348
- "method_sign": "com/diogonunes/jcolor/Attribute.MAGENTA_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1349
- "change_type": "ADD",
1350
- "file_path_old": null,
1351
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1352
- "source": "production",
1353
- "is_test_dependency": false,
1354
- "is_refactoring_only": false
1355
- }
1356
- ],
1357
- "variant_result": {
1358
- "old_on_old": "pass",
1359
- "old_on_new": "error",
1360
- "new_on_old": "error",
1361
- "new_on_new": "pass"
1362
- }
1363
- },
1364
- {
1365
- "change_id": "12_dialex_JColor-v5.5.1_f45d224_58bfb85_TestUsage",
1366
- "test_sign": "com/diogonunes/jcolor/tests/unit/TestUsage.CanFormatWithMultipleAttributes:()V",
1367
- "class": "TestUsage",
1368
- "method": "CanFormatWithMultipleAttributes",
1369
- "module": "",
1370
- "junit_selector": "com.diogonunes.jcolor.tests.unit.TestUsage#CanFormatWithMultipleAttributes",
1371
- "old_test_code": "@Test\npublic void CanFormatWithMultipleAttributes() {\n AnsiFormat fWarning = new AnsiFormat(RED_TEXT, YELLOW_BACK, BOLD);\n String formattedText = fWarning.format(\"This bold text will be red on yellow\");\n String expectedCode = Ansi.generateCode(fWarning);\n assertThat(formattedText, startsWith(expectedCode));\n assertThat(\"Message should clear its format\", formattedText, endsWith(Ansi.RESET));\n}",
1372
- "new_test_code": "@Test\npublic void CanFormatWithMultipleAttributes() {\n AnsiFormat fWarning = new AnsiFormat(RED_TEXT(), YELLOW_BACK(), BOLD());\n String formattedText = fWarning.format(\"This bold text will be red on yellow\");\n String expectedCode = Ansi.generateCode(fWarning);\n assertThat(formattedText, startsWith(expectedCode));\n assertThat(\"Message should clear its format\", formattedText, endsWith(Ansi.RESET));\n}",
1373
- "old_test_file_path": [
1374
- "src/test/java/com/diogonunes/jcolor/tests/unit/TestUsage.java"
1375
- ],
1376
- "old_test_lnum": [
1377
- "29-42"
1378
- ],
1379
- "new_test_lnum": [
1380
- "30-43"
1381
- ],
1382
- "old_production_code": "",
1383
- "new_production_code": "public static Attribute RED_TEXT() {\n return new SimpleAttribute(\"31\");\n}",
1384
- "focal_file_path": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1385
- "focal_method_sign": "com/diogonunes/jcolor/Attribute.RED_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1386
- "focal_all_deps_scored": [
1387
- {
1388
- "dep_id": 0,
1389
- "method_sign": "com/diogonunes/jcolor/Attribute.RED_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1390
- "file_path_old": null,
1391
- "line_nums_old": null,
1392
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1393
- "line_nums_new": "83-85",
1394
- "dependency_updated": "inserted",
1395
- "score": 0.1327,
1396
- "signal_scores": {
1397
- "nc": 0.0,
1398
- "lcs_u": 0.5,
1399
- "ed": 0.129,
1400
- "class": 0.0,
1401
- "tfidf": 0.0987
1402
- }
1403
- },
1404
- {
1405
- "dep_id": 2,
1406
- "method_sign": "com/diogonunes/jcolor/Attribute.BOLD:()Lcom/diogonunes/jcolor/Attribute",
1407
- "file_path_old": null,
1408
- "line_nums_old": null,
1409
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1410
- "line_nums_new": "27-29",
1411
- "dependency_updated": "inserted",
1412
- "score": 0.1263,
1413
- "signal_scores": {
1414
- "nc": 0.0,
1415
- "lcs_u": 0.5,
1416
- "ed": 0.0645,
1417
- "class": 0.0,
1418
- "tfidf": 0.1167
1419
- }
1420
- },
1421
- {
1422
- "dep_id": 1,
1423
- "method_sign": "com/diogonunes/jcolor/Attribute.YELLOW_BACK:()Lcom/diogonunes/jcolor/Attribute",
1424
- "file_path_old": null,
1425
- "line_nums_old": null,
1426
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1427
- "line_nums_new": "125-127",
1428
- "dependency_updated": "inserted",
1429
- "score": 0.0873,
1430
- "signal_scores": {
1431
- "nc": 0.0,
1432
- "lcs_u": 0.2727,
1433
- "ed": 0.0968,
1434
- "class": 0.0,
1435
- "tfidf": 0.0987
1436
- }
1437
- }
1438
- ],
1439
- "coverage_gold": 1.0,
1440
- "branch_coverage_gold": 75.0,
1441
- "method_coverage_gold": 25.4237,
1442
- "line_coverage_gold": 45.2381,
1443
- "is_traceback": false,
1444
- "commit_gap": {
1445
- "count": 0,
1446
- "skipped_commits": []
1447
- },
1448
- "test_is_refactoring_only": false,
1449
- "has_test_dep_change": false,
1450
- "all_deps_new": [
1451
- "com/diogonunes/jcolor/Attribute.BOLD:()Lcom/diogonunes/jcolor/Attribute",
1452
- "com/diogonunes/jcolor/AnsiFormat.format:(Ljava/lang/String;)Ljava/lang/String",
1453
- "com/diogonunes/jcolor/Attribute.YELLOW_BACK:()Lcom/diogonunes/jcolor/Attribute",
1454
- "com/diogonunes/jcolor/Attribute.RED_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1455
- "com/diogonunes/jcolor/Ansi.generateCode:(Lcom/diogonunes/jcolor/AnsiFormat;)Ljava/lang/String"
1456
- ],
1457
- "all_deps_old": [
1458
- "com/diogonunes/jcolor/Ansi.generateCode:(Lcom/diogonunes/jcolor/AnsiFormat;)Ljava/lang/String",
1459
- "com/diogonunes/jcolor/AnsiFormat.format:(Ljava/lang/String;)Ljava/lang/String"
1460
- ],
1461
- "deps_changes": [
1462
- {
1463
- "method_sign": "com/diogonunes/jcolor/Attribute.RED_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1464
- "change_type": "ADD",
1465
- "file_path_old": null,
1466
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1467
- "source": "production",
1468
- "is_test_dependency": false,
1469
- "is_refactoring_only": false
1470
- },
1471
- {
1472
- "method_sign": "com/diogonunes/jcolor/Attribute.YELLOW_BACK:()Lcom/diogonunes/jcolor/Attribute",
1473
- "change_type": "ADD",
1474
- "file_path_old": null,
1475
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1476
- "source": "production",
1477
- "is_test_dependency": false,
1478
- "is_refactoring_only": false
1479
- },
1480
- {
1481
- "method_sign": "com/diogonunes/jcolor/Attribute.BOLD:()Lcom/diogonunes/jcolor/Attribute",
1482
- "change_type": "ADD",
1483
- "file_path_old": null,
1484
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1485
- "source": "production",
1486
- "is_test_dependency": false,
1487
- "is_refactoring_only": false
1488
- }
1489
- ],
1490
- "variant_result": {
1491
- "old_on_old": "pass",
1492
- "old_on_new": "error",
1493
- "new_on_old": "error",
1494
- "new_on_new": "pass"
1495
- }
1496
- },
1497
- {
1498
- "change_id": "15_dialex_JColor-v5.5.1_f45d224_58bfb85_TestUsage",
1499
- "test_sign": "com/diogonunes/jcolor/tests/unit/TestUsage.CanUseAnsiFormatOrArray:()V",
1500
- "class": "TestUsage",
1501
- "method": "CanUseAnsiFormatOrArray",
1502
- "module": "",
1503
- "junit_selector": "com.diogonunes.jcolor.tests.unit.TestUsage#CanUseAnsiFormatOrArray",
1504
- "old_test_code": "@Test\npublic void CanUseAnsiFormatOrArray() {\n AnsiFormat formatNotation = new AnsiFormat(BLACK_TEXT, BLACK_BACK);\n Attribute[] arrayNotation = new Attribute[] { BLACK_TEXT, BLACK_BACK };\n String text = \"This text will be black on black\";\n String formatNotationOutput = formatNotation.format(text);\n String arrayNotationOutput = Ansi.colorize(text, arrayNotation);\n assertThat(formatNotationOutput, equalTo(arrayNotationOutput));\n assertThat(formatNotationOutput.compareTo(arrayNotationOutput), equalTo(0));\n}",
1505
- "new_test_code": "@Test\npublic void CanUseAnsiFormatOrArray() {\n AnsiFormat formatNotation = new AnsiFormat(BLACK_TEXT(), BLACK_BACK());\n Attribute[] arrayNotation = new Attribute[] { BLACK_TEXT(), BLACK_BACK() };\n String text = \"This text will be black on black\";\n String formatNotationOutput = formatNotation.format(text);\n String arrayNotationOutput = Ansi.colorize(text, arrayNotation);\n assertThat(formatNotationOutput, equalTo(arrayNotationOutput));\n assertThat(formatNotationOutput.compareTo(arrayNotationOutput), equalTo(0));\n}",
1506
- "old_test_file_path": [
1507
- "src/test/java/com/diogonunes/jcolor/tests/unit/TestUsage.java"
1508
- ],
1509
- "old_test_lnum": [
1510
- "70-84"
1511
- ],
1512
- "new_test_lnum": [
1513
- "71-85"
1514
- ],
1515
- "old_production_code": "",
1516
- "new_production_code": "public static Attribute BLACK_TEXT() {\n return new SimpleAttribute(\"30\");\n}",
1517
- "focal_file_path": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1518
- "focal_method_sign": "com/diogonunes/jcolor/Attribute.BLACK_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1519
- "focal_all_deps_scored": [
1520
- {
1521
- "dep_id": 1,
1522
- "method_sign": "com/diogonunes/jcolor/Attribute.BLACK_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1523
- "file_path_old": null,
1524
- "line_nums_old": null,
1525
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1526
- "line_nums_new": "79-81",
1527
- "dependency_updated": "inserted",
1528
- "score": 0.1405,
1529
- "signal_scores": {
1530
- "nc": 0.0,
1531
- "lcs_u": 0.3,
1532
- "ed": 0.087,
1533
- "class": 0.0,
1534
- "tfidf": 0.3113
1535
- }
1536
- },
1537
- {
1538
- "dep_id": 0,
1539
- "method_sign": "com/diogonunes/jcolor/Attribute.BLACK_BACK:()Lcom/diogonunes/jcolor/Attribute",
1540
- "file_path_old": null,
1541
- "line_nums_old": null,
1542
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1543
- "line_nums_new": "113-115",
1544
- "dependency_updated": "inserted",
1545
- "score": 0.1229,
1546
- "signal_scores": {
1547
- "nc": 0.0,
1548
- "lcs_u": 0.2,
1549
- "ed": 0.087,
1550
- "class": 0.0,
1551
- "tfidf": 0.3113
1552
- }
1553
- }
1554
- ],
1555
- "coverage_gold": 1.0,
1556
- "branch_coverage_gold": 75.0,
1557
- "method_coverage_gold": 22.0339,
1558
- "line_coverage_gold": 42.8571,
1559
- "is_traceback": false,
1560
- "commit_gap": {
1561
- "count": 0,
1562
- "skipped_commits": []
1563
- },
1564
- "test_is_refactoring_only": false,
1565
- "has_test_dep_change": false,
1566
- "all_deps_new": [
1567
- "com/diogonunes/jcolor/AnsiFormat.format:(Ljava/lang/String;)Ljava/lang/String",
1568
- "com/diogonunes/jcolor/Ansi.colorize:(Ljava/lang/String;[Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String",
1569
- "com/diogonunes/jcolor/Attribute.BLACK_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1570
- "com/diogonunes/jcolor/Attribute.BLACK_BACK:()Lcom/diogonunes/jcolor/Attribute"
1571
- ],
1572
- "all_deps_old": [
1573
- "com/diogonunes/jcolor/Ansi.colorize:(Ljava/lang/String;[Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String",
1574
- "com/diogonunes/jcolor/AnsiFormat.format:(Ljava/lang/String;)Ljava/lang/String"
1575
- ],
1576
- "deps_changes": [
1577
- {
1578
- "method_sign": "com/diogonunes/jcolor/Attribute.BLACK_BACK:()Lcom/diogonunes/jcolor/Attribute",
1579
- "change_type": "ADD",
1580
- "file_path_old": null,
1581
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1582
- "source": "production",
1583
- "is_test_dependency": false,
1584
- "is_refactoring_only": false
1585
- },
1586
- {
1587
- "method_sign": "com/diogonunes/jcolor/Attribute.BLACK_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1588
- "change_type": "ADD",
1589
- "file_path_old": null,
1590
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1591
- "source": "production",
1592
- "is_test_dependency": false,
1593
- "is_refactoring_only": false
1594
- }
1595
- ],
1596
- "variant_result": {
1597
- "old_on_old": "pass",
1598
- "old_on_new": "error",
1599
- "new_on_old": "error",
1600
- "new_on_new": "pass"
1601
- }
1602
- },
1603
- {
1604
- "change_id": "17_dialex_JColor-v5.5.1_f45d224_58bfb85_TestUsage",
1605
- "test_sign": "com/diogonunes/jcolor/tests/unit/TestUsage.CanFormatInline:()V",
1606
- "class": "TestUsage",
1607
- "method": "CanFormatInline",
1608
- "module": "",
1609
- "junit_selector": "com.diogonunes.jcolor.tests.unit.TestUsage#CanFormatInline",
1610
- "old_test_code": "@Test\npublic void CanFormatInline() {\n String formattedText = colorize(\"This text will be yellow on magenta\", YELLOW_TEXT, MAGENTA_BACK);\n String expectedCode = Ansi.generateCode(YELLOW_TEXT, MAGENTA_BACK);\n assertThat(formattedText, startsWith(expectedCode));\n assertThat(\"Message should clear its format\", formattedText, endsWith(Ansi.RESET));\n}",
1611
- "new_test_code": "@Test\npublic void CanFormatInline() {\n String formattedText = colorize(\"This text will be yellow on magenta\", YELLOW_TEXT(), MAGENTA_BACK());\n String expectedCode = Ansi.generateCode(YELLOW_TEXT(), MAGENTA_BACK());\n assertThat(formattedText, startsWith(expectedCode));\n assertThat(\"Message should clear its format\", formattedText, endsWith(Ansi.RESET));\n}",
1612
- "old_test_file_path": [
1613
- "src/test/java/com/diogonunes/jcolor/tests/unit/TestUsage.java"
1614
- ],
1615
- "old_test_lnum": [
1616
- "44-56"
1617
- ],
1618
- "new_test_lnum": [
1619
- "45-57"
1620
- ],
1621
- "old_production_code": "",
1622
- "new_production_code": "public static Attribute YELLOW_TEXT() {\n return new SimpleAttribute(\"33\");\n}",
1623
- "focal_file_path": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1624
- "focal_method_sign": "com/diogonunes/jcolor/Attribute.YELLOW_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1625
- "focal_all_deps_scored": [
1626
- {
1627
- "dep_id": 1,
1628
- "method_sign": "com/diogonunes/jcolor/Attribute.YELLOW_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1629
- "file_path_old": null,
1630
- "line_nums_old": null,
1631
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1632
- "line_nums_new": "91-93",
1633
- "dependency_updated": "inserted",
1634
- "score": 0.0972,
1635
- "signal_scores": {
1636
- "nc": 0.0,
1637
- "lcs_u": 0.2727,
1638
- "ed": 0.1333,
1639
- "class": 0.0,
1640
- "tfidf": 0.1152
1641
- }
1642
- },
1643
- {
1644
- "dep_id": 0,
1645
- "method_sign": "com/diogonunes/jcolor/Attribute.MAGENTA_BACK:()Lcom/diogonunes/jcolor/Attribute",
1646
- "file_path_old": null,
1647
- "line_nums_old": null,
1648
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1649
- "line_nums_new": "133-135",
1650
- "dependency_updated": "inserted",
1651
- "score": 0.0932,
1652
- "signal_scores": {
1653
- "nc": 0.0,
1654
- "lcs_u": 0.25,
1655
- "ed": 0.1333,
1656
- "class": 0.0,
1657
- "tfidf": 0.1152
1658
- }
1659
- }
1660
- ],
1661
- "coverage_gold": 0.9285714285714286,
1662
- "branch_coverage_gold": 75.0,
1663
- "method_coverage_gold": 16.9492,
1664
- "line_coverage_gold": 35.7143,
1665
- "is_traceback": false,
1666
- "commit_gap": {
1667
- "count": 0,
1668
- "skipped_commits": []
1669
- },
1670
- "test_is_refactoring_only": false,
1671
- "has_test_dep_change": false,
1672
- "all_deps_new": [
1673
- "com/diogonunes/jcolor/Attribute.YELLOW_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1674
- "com/diogonunes/jcolor/Attribute.MAGENTA_BACK:()Lcom/diogonunes/jcolor/Attribute",
1675
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String",
1676
- "com/diogonunes/jcolor/Ansi.colorize:(Ljava/lang/String;[Lcom/diogonunes/jcolor/Attribute;)Ljava/lang/String"
1677
- ],
1678
- "all_deps_old": [
1679
- "com/diogonunes/jcolor/Ansi.generateCode:([Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String",
1680
- "com/diogonunes/jcolor/Ansi.colorize:(Ljava/lang/String;[Lcom/diogonunes/jcolor/Ansi$Attribute;)Ljava/lang/String"
1681
- ],
1682
- "deps_changes": [
1683
- {
1684
- "method_sign": "com/diogonunes/jcolor/Attribute.MAGENTA_BACK:()Lcom/diogonunes/jcolor/Attribute",
1685
- "change_type": "ADD",
1686
- "file_path_old": null,
1687
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1688
- "source": "production",
1689
- "is_test_dependency": false,
1690
- "is_refactoring_only": false
1691
- },
1692
- {
1693
- "method_sign": "com/diogonunes/jcolor/Attribute.YELLOW_TEXT:()Lcom/diogonunes/jcolor/Attribute",
1694
- "change_type": "ADD",
1695
- "file_path_old": null,
1696
- "file_path_new": "src/main/java/com/diogonunes/jcolor/Attribute.java",
1697
- "source": "production",
1698
- "is_test_dependency": false,
1699
- "is_refactoring_only": false
1700
- }
1701
- ],
1702
- "variant_result": {
1703
- "old_on_old": "pass",
1704
- "old_on_new": "error",
1705
- "new_on_old": "error",
1706
- "new_on_new": "pass"
1707
- }
1708
- }
1709
- ],
1710
- "version": "v5.5.1",
1711
- "java_version": 8
1712
- }
1713
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f4b6a3_uuid-creator-uuid-creator-6.1.1.json DELETED
The diff for this file is too large to render. See raw diff
 
ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3.json DELETED
@@ -1,948 +0,0 @@
1
- [
2
- {
3
- "task_id": "ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3__6a1e5d2_1456105__AggregatingGraphFactoryTest_1f4b59fd",
4
- "project_name": "ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3",
5
- "git_clone_url": "https://github.com/ferstl/depgraph-maven-plugin.git",
6
- "rev1": "6a1e5d27a56e00a0e96bc94200ea8eab0645d821",
7
- "rev2": "1456105ab93e23da7ffe05b3f90bd681753488fb",
8
- "rev1_date": "2019-01-14T21:12:57Z",
9
- "rev2_date": "2019-01-14T21:43:33Z",
10
- "git_diff_url": "https://github.com/ferstl/depgraph-maven-plugin/compare/6a1e5d27a56e00a0e96bc94200ea8eab0645d821...1456105ab93e23da7ffe05b3f90bd681753488fb",
11
- "test_file": "src/test/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "72_ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3_6a1e5d2_1456105_AggregatingGraphFactoryTest",
15
- "test_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.stopAtParent:()V",
16
- "class": "AggregatingGraphFactoryTest",
17
- "method": "stopAtParent",
18
- "module": "",
19
- "junit_selector": "com.github.ferstl.depgraph.dependency.AggregatingGraphFactoryTest#stopAtParent",
20
- "old_test_code": "@Test\nvoid stopAtParent() {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, true, false);\n MavenProject parentParent = createMavenProject(\"parentParent\");\n MavenProject parent = createMavenProject(\"parent\", parentParent);\n createMavenProject(\"child\", parent);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1:jar:version:compile\\\"[style=dotted]\" }));\n}",
21
- "new_test_code": "@Test\nvoid stopAtParent() {\n MavenProject parentParent = createMavenProject(\"parentParent\");\n MavenProject parent = createMavenProject(\"parent\", parentParent);\n createMavenProject(\"child\", parent);\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, parent::getCollectedProjects, this.globalFilter, this.graphBuilder, true, false);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1:jar:version:compile\\\"[style=dotted]\" }));\n}",
22
- "old_test_file_path": [
23
- "src/test/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "201-217"
27
- ],
28
- "new_test_lnum": [
29
- "191-207"
30
- ],
31
- "old_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
32
- "new_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.get();\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
33
- "focal_file_path": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
34
- "focal_method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
39
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
40
- "line_nums_old": "53-80",
41
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
42
- "line_nums_new": "54-81",
43
- "dependency_updated": "updated",
44
- "score": null,
45
- "signal_scores": {}
46
- }
47
- ],
48
- "coverage_gold": 0.8571428571428571,
49
- "branch_coverage_gold": 5.644,
50
- "method_coverage_gold": 16.2162,
51
- "line_coverage_gold": 13.289,
52
- "is_traceback": false,
53
- "commit_gap": {
54
- "count": 0,
55
- "skipped_commits": []
56
- },
57
- "test_is_refactoring_only": false,
58
- "has_test_dep_change": false,
59
- "all_deps_new": [
60
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
61
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
62
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
63
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher"
64
- ],
65
- "all_deps_old": [
66
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
67
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
68
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
69
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject"
70
- ],
71
- "deps_changes": [
72
- {
73
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
74
- "change_type": "UPDATE",
75
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
76
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
77
- "source": "production",
78
- "is_test_dependency": false,
79
- "is_refactoring_only": false
80
- }
81
- ],
82
- "variant_result": {
83
- "old_on_old": "pass",
84
- "old_on_new": "error",
85
- "new_on_old": "error",
86
- "new_on_new": "pass"
87
- }
88
- },
89
- {
90
- "change_id": "73_ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3_6a1e5d2_1456105_AggregatingGraphFactoryTest",
91
- "test_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.excludedArtifact:()V",
92
- "class": "AggregatingGraphFactoryTest",
93
- "method": "excludedArtifact",
94
- "module": "",
95
- "junit_selector": "com.github.ferstl.depgraph.dependency.AggregatingGraphFactoryTest#excludedArtifact",
96
- "old_test_code": "@Test\nvoid excludedArtifact() throws Exception {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, true, false);\n MavenProject parent = createMavenProject(\"parent\");\n MavenProject child1 = createMavenProject(\"child1\", parent);\n createMavenProject(\"child2\", parent);\n when(this.globalFilter.include(child1.getArtifact())).thenReturn(false);\n graphFactory.createGraph(parent);\n verify(this.dependenciesResolver, never()).resolve(argThat(projectName(\"child1\")));\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child2:jar:version:compile\\\"[style=dotted]\" }));\n}",
97
- "new_test_code": "@Test\nvoid excludedArtifact() throws Exception {\n MavenProject parent = createMavenProject(\"parent\");\n MavenProject child1 = createMavenProject(\"child1\", parent);\n createMavenProject(\"child2\", parent);\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, parent::getCollectedProjects, this.globalFilter, this.graphBuilder, true, false);\n when(this.globalFilter.include(child1.getArtifact())).thenReturn(false);\n graphFactory.createGraph(parent);\n verify(this.dependenciesResolver, never()).resolve(argThat(projectName(\"child1\")));\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child2:jar:version:compile\\\"[style=dotted]\" }));\n}",
98
- "old_test_file_path": [
99
- "src/test/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.java"
100
- ],
101
- "old_test_lnum": [
102
- "265-288"
103
- ],
104
- "new_test_lnum": [
105
- "255-278"
106
- ],
107
- "old_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
108
- "new_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.get();\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
109
- "focal_file_path": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
110
- "focal_method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
111
- "focal_all_deps_scored": [
112
- {
113
- "dep_id": 0,
114
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
115
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
116
- "line_nums_old": "53-80",
117
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
118
- "line_nums_new": "54-81",
119
- "dependency_updated": "updated",
120
- "score": null,
121
- "signal_scores": {}
122
- }
123
- ],
124
- "coverage_gold": 0.8571428571428571,
125
- "branch_coverage_gold": 6.2229,
126
- "method_coverage_gold": 16.2162,
127
- "line_coverage_gold": 13.3444,
128
- "is_traceback": false,
129
- "commit_gap": {
130
- "count": 0,
131
- "skipped_commits": []
132
- },
133
- "test_is_refactoring_only": false,
134
- "has_test_dep_change": false,
135
- "all_deps_new": [
136
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
137
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
138
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
139
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
140
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.projectName:(Ljava/lang/String;)Lorg/mockito/ArgumentMatcher"
141
- ],
142
- "all_deps_old": [
143
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.projectName:(Ljava/lang/String;)Lorg/mockito/ArgumentMatcher",
144
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
145
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
146
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
147
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject"
148
- ],
149
- "deps_changes": [
150
- {
151
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
152
- "change_type": "UPDATE",
153
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
154
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
155
- "source": "production",
156
- "is_test_dependency": false,
157
- "is_refactoring_only": false
158
- }
159
- ],
160
- "variant_result": {
161
- "old_on_old": "pass",
162
- "old_on_new": "error",
163
- "new_on_old": "error",
164
- "new_on_new": "pass"
165
- }
166
- },
167
- {
168
- "change_id": "74_ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3_6a1e5d2_1456105_AggregatingGraphFactoryTest",
169
- "test_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.nestedProjects:()V",
170
- "class": "AggregatingGraphFactoryTest",
171
- "method": "nestedProjects",
172
- "module": "",
173
- "junit_selector": "com.github.ferstl.depgraph.dependency.AggregatingGraphFactoryTest#nestedProjects",
174
- "old_test_code": "@Test\nvoid nestedProjects() {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, true, true);\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1-1\", parent);\n createMavenProject(\"child1-2\", parent);\n MavenProject subParent = createMavenProject(\"subParent\", parent);\n createMavenProject(\"child2-1\", subParent);\n createMavenProject(\"child2-2\", subParent);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child1-1:jar:version:compile\\\"\", \"\\\"groupId:child1-2:jar:version:compile\\\"\", \"\\\"groupId:subParent:jar:version:compile\\\"\", \"\\\"groupId:child2-1:jar:version:compile\\\"\", \"\\\"groupId:child2-2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-2:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:subParent:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:subParent:jar:version:compile\\\" -> \\\"groupId:child2-1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:subParent:jar:version:compile\\\" -> \\\"groupId:child2-2:jar:version:compile\\\"[style=dotted]\" }));\n}",
175
- "new_test_code": "@Test\nvoid nestedProjects() {\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1-1\", parent);\n createMavenProject(\"child1-2\", parent);\n MavenProject subParent = createMavenProject(\"subParent\", parent);\n createMavenProject(\"child2-1\", subParent);\n createMavenProject(\"child2-2\", subParent);\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, parent::getCollectedProjects, this.globalFilter, this.graphBuilder, true, true);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child1-1:jar:version:compile\\\"\", \"\\\"groupId:child1-2:jar:version:compile\\\"\", \"\\\"groupId:subParent:jar:version:compile\\\"\", \"\\\"groupId:child2-1:jar:version:compile\\\"\", \"\\\"groupId:child2-2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-2:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:subParent:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:subParent:jar:version:compile\\\" -> \\\"groupId:child2-1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:subParent:jar:version:compile\\\" -> \\\"groupId:child2-2:jar:version:compile\\\"[style=dotted]\" }));\n}",
176
- "old_test_file_path": [
177
- "src/test/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.java"
178
- ],
179
- "old_test_lnum": [
180
- "164-191"
181
- ],
182
- "new_test_lnum": [
183
- "154-181"
184
- ],
185
- "old_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
186
- "new_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.get();\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
187
- "focal_file_path": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
188
- "focal_method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
189
- "focal_all_deps_scored": [
190
- {
191
- "dep_id": 0,
192
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
193
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
194
- "line_nums_old": "53-80",
195
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
196
- "line_nums_new": "54-81",
197
- "dependency_updated": "updated",
198
- "score": null,
199
- "signal_scores": {}
200
- }
201
- ],
202
- "coverage_gold": 0.9285714285714286,
203
- "branch_coverage_gold": 8.6831,
204
- "method_coverage_gold": 17.8378,
205
- "line_coverage_gold": 15.2824,
206
- "is_traceback": false,
207
- "commit_gap": {
208
- "count": 0,
209
- "skipped_commits": []
210
- },
211
- "test_is_refactoring_only": false,
212
- "has_test_dep_change": false,
213
- "all_deps_new": [
214
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
215
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
216
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
217
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher"
218
- ],
219
- "all_deps_old": [
220
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
221
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
222
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
223
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject"
224
- ],
225
- "deps_changes": [
226
- {
227
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
228
- "change_type": "UPDATE",
229
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
230
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
231
- "source": "production",
232
- "is_test_dependency": false,
233
- "is_refactoring_only": false
234
- }
235
- ],
236
- "variant_result": {
237
- "old_on_old": "pass",
238
- "old_on_new": "error",
239
- "new_on_old": "error",
240
- "new_on_new": "pass"
241
- }
242
- },
243
- {
244
- "change_id": "75_ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3_6a1e5d2_1456105_AggregatingGraphFactoryTest",
245
- "test_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.filteredParent:()V",
246
- "class": "AggregatingGraphFactoryTest",
247
- "method": "filteredParent",
248
- "module": "",
249
- "junit_selector": "com.github.ferstl.depgraph.dependency.AggregatingGraphFactoryTest#filteredParent",
250
- "old_test_code": "@Test\nvoid filteredParent() {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, true, false);\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1-1\", parent);\n createMavenProject(\"child1-2\", parent);\n MavenProject subParent = createMavenProject(\"subParent\", parent);\n createMavenProject(\"child2-1\", subParent);\n createMavenProject(\"child2-2\", subParent);\n when(this.globalFilter.include(subParent.getArtifact())).thenReturn(false);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child1-1:jar:version:compile\\\"\", \"\\\"groupId:child1-2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-2:jar:version:compile\\\"[style=dotted]\" }));\n}",
251
- "new_test_code": "@Test\nvoid filteredParent() {\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1-1\", parent);\n createMavenProject(\"child1-2\", parent);\n MavenProject subParent = createMavenProject(\"subParent\", parent);\n createMavenProject(\"child2-1\", subParent);\n createMavenProject(\"child2-2\", subParent);\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, parent::getCollectedProjects, this.globalFilter, this.graphBuilder, true, false);\n when(this.globalFilter.include(subParent.getArtifact())).thenReturn(false);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child1-1:jar:version:compile\\\"\", \"\\\"groupId:child1-2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-2:jar:version:compile\\\"[style=dotted]\" }));\n}",
252
- "old_test_file_path": [
253
- "src/test/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.java"
254
- ],
255
- "old_test_lnum": [
256
- "231-254"
257
- ],
258
- "new_test_lnum": [
259
- "221-244"
260
- ],
261
- "old_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
262
- "new_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.get();\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
263
- "focal_file_path": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
264
- "focal_method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
265
- "focal_all_deps_scored": [
266
- {
267
- "dep_id": 0,
268
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
269
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
270
- "line_nums_old": "53-80",
271
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
272
- "line_nums_new": "54-81",
273
- "dependency_updated": "updated",
274
- "score": null,
275
- "signal_scores": {}
276
- }
277
- ],
278
- "coverage_gold": 0.8571428571428571,
279
- "branch_coverage_gold": 7.0912,
280
- "method_coverage_gold": 16.4865,
281
- "line_coverage_gold": 13.8427,
282
- "is_traceback": false,
283
- "commit_gap": {
284
- "count": 0,
285
- "skipped_commits": []
286
- },
287
- "test_is_refactoring_only": false,
288
- "has_test_dep_change": false,
289
- "all_deps_new": [
290
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
291
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
292
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
293
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher"
294
- ],
295
- "all_deps_old": [
296
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
297
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
298
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
299
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject"
300
- ],
301
- "deps_changes": [
302
- {
303
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
304
- "change_type": "UPDATE",
305
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
306
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
307
- "source": "production",
308
- "is_test_dependency": false,
309
- "is_refactoring_only": false
310
- }
311
- ],
312
- "variant_result": {
313
- "old_on_old": "pass",
314
- "old_on_new": "error",
315
- "new_on_old": "error",
316
- "new_on_new": "pass"
317
- }
318
- },
319
- {
320
- "change_id": "76_ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3_6a1e5d2_1456105_AggregatingGraphFactoryTest",
321
- "test_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.excludeParentProjects:()V",
322
- "class": "AggregatingGraphFactoryTest",
323
- "method": "excludeParentProjects",
324
- "module": "",
325
- "junit_selector": "com.github.ferstl.depgraph.dependency.AggregatingGraphFactoryTest#excludeParentProjects",
326
- "old_test_code": "@Test\nvoid excludeParentProjects() throws Exception {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, false, false);\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1\", parent);\n createMavenProject(\"child2\", parent);\n graphFactory.createGraph(parent);\n verify(this.dependenciesResolver, never()).resolve(argThat(projectName(\"parent\")));\n verify(this.dependenciesResolver).resolve(argThat(projectName(\"child1\")));\n verify(this.dependenciesResolver).resolve(argThat(projectName(\"child2\")));\n assertThat(this.graphBuilder, emptyGraph());\n}",
327
- "new_test_code": "@Test\nvoid excludeParentProjects() throws Exception {\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1\", parent);\n createMavenProject(\"child2\", parent);\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, parent::getCollectedProjects, this.globalFilter, this.graphBuilder, false, false);\n graphFactory.createGraph(parent);\n verify(this.dependenciesResolver, never()).resolve(argThat(projectName(\"parent\")));\n verify(this.dependenciesResolver).resolve(argThat(projectName(\"child1\")));\n verify(this.dependenciesResolver).resolve(argThat(projectName(\"child2\")));\n assertThat(this.graphBuilder, emptyGraph());\n}",
328
- "old_test_file_path": [
329
- "src/test/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.java"
330
- ],
331
- "old_test_lnum": [
332
- "133-149"
333
- ],
334
- "new_test_lnum": [
335
- "123-139"
336
- ],
337
- "old_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
338
- "new_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.get();\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
339
- "focal_file_path": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
340
- "focal_method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
341
- "focal_all_deps_scored": [
342
- {
343
- "dep_id": 0,
344
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
345
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
346
- "line_nums_old": "53-80",
347
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
348
- "line_nums_new": "54-81",
349
- "dependency_updated": "updated",
350
- "score": null,
351
- "signal_scores": {}
352
- }
353
- ],
354
- "coverage_gold": 0.8571428571428571,
355
- "branch_coverage_gold": 4.3415,
356
- "method_coverage_gold": 12.7027,
357
- "line_coverage_gold": 10.5205,
358
- "is_traceback": false,
359
- "commit_gap": {
360
- "count": 0,
361
- "skipped_commits": []
362
- },
363
- "test_is_refactoring_only": false,
364
- "has_test_dep_change": false,
365
- "all_deps_new": [
366
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
367
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
368
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
369
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.projectName:(Ljava/lang/String;)Lorg/mockito/ArgumentMatcher"
370
- ],
371
- "all_deps_old": [
372
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.projectName:(Ljava/lang/String;)Lorg/mockito/ArgumentMatcher",
373
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
374
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
375
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject"
376
- ],
377
- "deps_changes": [
378
- {
379
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
380
- "change_type": "UPDATE",
381
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
382
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
383
- "source": "production",
384
- "is_test_dependency": false,
385
- "is_refactoring_only": false
386
- }
387
- ],
388
- "variant_result": {
389
- "old_on_old": "pass",
390
- "old_on_new": "error",
391
- "new_on_old": "error",
392
- "new_on_new": "pass"
393
- }
394
- },
395
- {
396
- "change_id": "77_ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3_6a1e5d2_1456105_AggregatingGraphFactoryTest",
397
- "test_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.moduleTree:()V",
398
- "class": "AggregatingGraphFactoryTest",
399
- "method": "moduleTree",
400
- "module": "",
401
- "junit_selector": "com.github.ferstl.depgraph.dependency.AggregatingGraphFactoryTest#moduleTree",
402
- "old_test_code": "@Test\nvoid moduleTree() {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, true, false);\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1\", parent);\n createMavenProject(\"child2\", parent);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child1:jar:version:compile\\\"\", \"\\\"groupId:child2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child2:jar:version:compile\\\"[style=dotted]\" }));\n}",
403
- "new_test_code": "@Test\nvoid moduleTree() {\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1\", parent);\n createMavenProject(\"child2\", parent);\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, parent::getCollectedProjects, this.globalFilter, this.graphBuilder, true, false);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child1:jar:version:compile\\\"\", \"\\\"groupId:child2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child2:jar:version:compile\\\"[style=dotted]\" }));\n}",
404
- "old_test_file_path": [
405
- "src/test/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.java"
406
- ],
407
- "old_test_lnum": [
408
- "104-122"
409
- ],
410
- "new_test_lnum": [
411
- "94-112"
412
- ],
413
- "old_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
414
- "new_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.get();\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
415
- "focal_file_path": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
416
- "focal_method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
417
- "focal_all_deps_scored": [
418
- {
419
- "dep_id": 0,
420
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
421
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
422
- "line_nums_old": "53-80",
423
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
424
- "line_nums_new": "54-81",
425
- "dependency_updated": "updated",
426
- "score": null,
427
- "signal_scores": {}
428
- }
429
- ],
430
- "coverage_gold": 0.8571428571428571,
431
- "branch_coverage_gold": 6.2229,
432
- "method_coverage_gold": 16.4865,
433
- "line_coverage_gold": 13.6213,
434
- "is_traceback": false,
435
- "commit_gap": {
436
- "count": 0,
437
- "skipped_commits": []
438
- },
439
- "test_is_refactoring_only": false,
440
- "has_test_dep_change": false,
441
- "all_deps_new": [
442
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
443
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
444
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
445
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher"
446
- ],
447
- "all_deps_old": [
448
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
449
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
450
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
451
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject"
452
- ],
453
- "deps_changes": [
454
- {
455
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
456
- "change_type": "UPDATE",
457
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
458
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
459
- "source": "production",
460
- "is_test_dependency": false,
461
- "is_refactoring_only": false
462
- }
463
- ],
464
- "variant_result": {
465
- "old_on_old": "pass",
466
- "old_on_new": "error",
467
- "new_on_old": "error",
468
- "new_on_new": "pass"
469
- }
470
- }
471
- ],
472
- "version": "depgraph-maven-plugin-4.0.3",
473
- "java_version": 8
474
- },
475
- {
476
- "task_id": "ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3__9fa8088_c00c183__AggregatingGraphFactoryTest_1f4b59fd",
477
- "project_name": "ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3",
478
- "git_clone_url": "https://github.com/ferstl/depgraph-maven-plugin.git",
479
- "rev1": "9fa80883be3aa7f839fe75d6fdb58d0e48e23202",
480
- "rev2": "c00c18376b10a4649c889b1b7afc0c476bfde838",
481
- "rev1_date": "2018-08-07T20:34:14Z",
482
- "rev2_date": "2018-08-07T20:34:19Z",
483
- "git_diff_url": "https://github.com/ferstl/depgraph-maven-plugin/compare/9fa80883be3aa7f839fe75d6fdb58d0e48e23202...c00c18376b10a4649c889b1b7afc0c476bfde838",
484
- "test_file": "src/test/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.java",
485
- "test_changes": [
486
- {
487
- "change_id": "30_ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3_9fa8088_c00c183_AggregatingGraphFactoryTest",
488
- "test_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.stopAtParent:()V",
489
- "class": "AggregatingGraphFactoryTest",
490
- "method": "stopAtParent",
491
- "module": "",
492
- "junit_selector": "com.github.ferstl.depgraph.dependency.AggregatingGraphFactoryTest#stopAtParent",
493
- "old_test_code": "@Test\npublic void stopAtParent() {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, true);\n MavenProject parentParent = createMavenProject(\"parentParent\");\n MavenProject parent = createMavenProject(\"parent\", parentParent);\n createMavenProject(\"child\", parent);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1:jar:version:compile\\\"[style=dotted]\" }));\n}",
494
- "new_test_code": "@Test\npublic void stopAtParent() {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, true, false);\n MavenProject parentParent = createMavenProject(\"parentParent\");\n MavenProject parent = createMavenProject(\"parent\", parentParent);\n createMavenProject(\"child\", parent);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1:jar:version:compile\\\"[style=dotted]\" }));\n}",
495
- "old_test_file_path": [
496
- "src/test/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.java"
497
- ],
498
- "old_test_lnum": [
499
- "202-218"
500
- ],
501
- "new_test_lnum": [
502
- "201-217"
503
- ],
504
- "old_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n return this.graphBuilder.toString();\n}",
505
- "new_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
506
- "focal_file_path": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
507
- "focal_method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
508
- "focal_all_deps_scored": [
509
- {
510
- "dep_id": 0,
511
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
512
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
513
- "line_nums_old": "50-73",
514
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
515
- "line_nums_new": "53-80",
516
- "dependency_updated": "updated",
517
- "score": null,
518
- "signal_scores": {}
519
- }
520
- ],
521
- "coverage_gold": 0.8571428571428571,
522
- "branch_coverage_gold": 5.6604,
523
- "method_coverage_gold": 16.2162,
524
- "line_coverage_gold": 13.3111,
525
- "is_traceback": false,
526
- "commit_gap": {
527
- "count": 0,
528
- "skipped_commits": []
529
- },
530
- "test_is_refactoring_only": false,
531
- "has_test_dep_change": false,
532
- "all_deps_new": [
533
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
534
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
535
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
536
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String"
537
- ],
538
- "all_deps_old": [
539
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
540
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
541
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
542
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String"
543
- ],
544
- "deps_changes": [
545
- {
546
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
547
- "change_type": "UPDATE",
548
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
549
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
550
- "source": "production",
551
- "is_test_dependency": false,
552
- "is_refactoring_only": false
553
- }
554
- ],
555
- "variant_result": {
556
- "old_on_old": "pass",
557
- "old_on_new": "error",
558
- "new_on_old": "error",
559
- "new_on_new": "pass"
560
- }
561
- },
562
- {
563
- "change_id": "32_ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3_9fa8088_c00c183_AggregatingGraphFactoryTest",
564
- "test_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.excludedArtifact:()V",
565
- "class": "AggregatingGraphFactoryTest",
566
- "method": "excludedArtifact",
567
- "module": "",
568
- "junit_selector": "com.github.ferstl.depgraph.dependency.AggregatingGraphFactoryTest#excludedArtifact",
569
- "old_test_code": "@Test\npublic void excludedArtifact() throws Exception {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, true);\n MavenProject parent = createMavenProject(\"parent\");\n MavenProject child1 = createMavenProject(\"child1\", parent);\n createMavenProject(\"child2\", parent);\n when(this.globalFilter.include(child1.getArtifact())).thenReturn(false);\n graphFactory.createGraph(parent);\n verify(this.dependenciesResolver, never()).resolve(argThat(projectName(\"child1\")));\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child2:jar:version:compile\\\"[style=dotted]\" }));\n}",
570
- "new_test_code": "@Test\npublic void excludedArtifact() throws Exception {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, true, false);\n MavenProject parent = createMavenProject(\"parent\");\n MavenProject child1 = createMavenProject(\"child1\", parent);\n createMavenProject(\"child2\", parent);\n when(this.globalFilter.include(child1.getArtifact())).thenReturn(false);\n graphFactory.createGraph(parent);\n verify(this.dependenciesResolver, never()).resolve(argThat(projectName(\"child1\")));\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child2:jar:version:compile\\\"[style=dotted]\" }));\n}",
571
- "old_test_file_path": [
572
- "src/test/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.java"
573
- ],
574
- "old_test_lnum": [
575
- "266-289"
576
- ],
577
- "new_test_lnum": [
578
- "265-288"
579
- ],
580
- "old_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n return this.graphBuilder.toString();\n}",
581
- "new_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
582
- "focal_file_path": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
583
- "focal_method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
584
- "focal_all_deps_scored": [
585
- {
586
- "dep_id": 0,
587
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
588
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
589
- "line_nums_old": "50-73",
590
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
591
- "line_nums_new": "53-80",
592
- "dependency_updated": "updated",
593
- "score": null,
594
- "signal_scores": {}
595
- }
596
- ],
597
- "coverage_gold": 0.8571428571428571,
598
- "branch_coverage_gold": 6.2409,
599
- "method_coverage_gold": 16.2162,
600
- "line_coverage_gold": 13.3666,
601
- "is_traceback": false,
602
- "commit_gap": {
603
- "count": 0,
604
- "skipped_commits": []
605
- },
606
- "test_is_refactoring_only": false,
607
- "has_test_dep_change": false,
608
- "all_deps_new": [
609
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
610
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.projectName:(Ljava/lang/String;)Lorg/mockito/ArgumentMatcher",
611
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
612
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
613
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String"
614
- ],
615
- "all_deps_old": [
616
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
617
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.projectName:(Ljava/lang/String;)Lorg/mockito/ArgumentMatcher",
618
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
619
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
620
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String"
621
- ],
622
- "deps_changes": [
623
- {
624
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
625
- "change_type": "UPDATE",
626
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
627
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
628
- "source": "production",
629
- "is_test_dependency": false,
630
- "is_refactoring_only": false
631
- }
632
- ],
633
- "variant_result": {
634
- "old_on_old": "pass",
635
- "old_on_new": "error",
636
- "new_on_old": "error",
637
- "new_on_new": "pass"
638
- }
639
- },
640
- {
641
- "change_id": "33_ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3_9fa8088_c00c183_AggregatingGraphFactoryTest",
642
- "test_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.nestedProjects:()V",
643
- "class": "AggregatingGraphFactoryTest",
644
- "method": "nestedProjects",
645
- "module": "",
646
- "junit_selector": "com.github.ferstl.depgraph.dependency.AggregatingGraphFactoryTest#nestedProjects",
647
- "old_test_code": "@Test\npublic void nestedProjects() {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, true);\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1-1\", parent);\n createMavenProject(\"child1-2\", parent);\n MavenProject subParent = createMavenProject(\"subParent\", parent);\n createMavenProject(\"child2-1\", subParent);\n createMavenProject(\"child2-2\", subParent);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child1-1:jar:version:compile\\\"\", \"\\\"groupId:child1-2:jar:version:compile\\\"\", \"\\\"groupId:subParent:jar:version:compile\\\"\", \"\\\"groupId:child2-1:jar:version:compile\\\"\", \"\\\"groupId:child2-2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-2:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:subParent:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:subParent:jar:version:compile\\\" -> \\\"groupId:child2-1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:subParent:jar:version:compile\\\" -> \\\"groupId:child2-2:jar:version:compile\\\"[style=dotted]\" }));\n}",
648
- "new_test_code": "@Test\npublic void nestedProjects() {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, true, true);\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1-1\", parent);\n createMavenProject(\"child1-2\", parent);\n MavenProject subParent = createMavenProject(\"subParent\", parent);\n createMavenProject(\"child2-1\", subParent);\n createMavenProject(\"child2-2\", subParent);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child1-1:jar:version:compile\\\"\", \"\\\"groupId:child1-2:jar:version:compile\\\"\", \"\\\"groupId:subParent:jar:version:compile\\\"\", \"\\\"groupId:child2-1:jar:version:compile\\\"\", \"\\\"groupId:child2-2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-2:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:subParent:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:subParent:jar:version:compile\\\" -> \\\"groupId:child2-1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:subParent:jar:version:compile\\\" -> \\\"groupId:child2-2:jar:version:compile\\\"[style=dotted]\" }));\n}",
649
- "old_test_file_path": [
650
- "src/test/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.java"
651
- ],
652
- "old_test_lnum": [
653
- "165-192"
654
- ],
655
- "new_test_lnum": [
656
- "164-191"
657
- ],
658
- "old_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n return this.graphBuilder.toString();\n}",
659
- "new_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
660
- "focal_file_path": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
661
- "focal_method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
662
- "focal_all_deps_scored": [
663
- {
664
- "dep_id": 0,
665
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
666
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
667
- "line_nums_old": "50-73",
668
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
669
- "line_nums_new": "53-80",
670
- "dependency_updated": "updated",
671
- "score": null,
672
- "signal_scores": {}
673
- }
674
- ],
675
- "coverage_gold": 0.9285714285714286,
676
- "branch_coverage_gold": 8.5631,
677
- "method_coverage_gold": 17.8378,
678
- "line_coverage_gold": 15.3078,
679
- "is_traceback": false,
680
- "commit_gap": {
681
- "count": 0,
682
- "skipped_commits": []
683
- },
684
- "test_is_refactoring_only": false,
685
- "has_test_dep_change": false,
686
- "all_deps_new": [
687
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
688
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
689
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
690
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String"
691
- ],
692
- "all_deps_old": [
693
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
694
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
695
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
696
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String"
697
- ],
698
- "deps_changes": [
699
- {
700
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
701
- "change_type": "UPDATE",
702
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
703
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
704
- "source": "production",
705
- "is_test_dependency": false,
706
- "is_refactoring_only": false
707
- }
708
- ],
709
- "variant_result": {
710
- "old_on_old": "pass",
711
- "old_on_new": "error",
712
- "new_on_old": "error",
713
- "new_on_new": "pass"
714
- }
715
- },
716
- {
717
- "change_id": "34_ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3_9fa8088_c00c183_AggregatingGraphFactoryTest",
718
- "test_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.filteredParent:()V",
719
- "class": "AggregatingGraphFactoryTest",
720
- "method": "filteredParent",
721
- "module": "",
722
- "junit_selector": "com.github.ferstl.depgraph.dependency.AggregatingGraphFactoryTest#filteredParent",
723
- "old_test_code": "@Test\npublic void filteredParent() {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, true);\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1-1\", parent);\n createMavenProject(\"child1-2\", parent);\n MavenProject subParent = createMavenProject(\"subParent\", parent);\n createMavenProject(\"child2-1\", subParent);\n createMavenProject(\"child2-2\", subParent);\n when(this.globalFilter.include(subParent.getArtifact())).thenReturn(false);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child1-1:jar:version:compile\\\"\", \"\\\"groupId:child1-2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-2:jar:version:compile\\\"[style=dotted]\" }));\n}",
724
- "new_test_code": "@Test\npublic void filteredParent() {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, true, false);\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1-1\", parent);\n createMavenProject(\"child1-2\", parent);\n MavenProject subParent = createMavenProject(\"subParent\", parent);\n createMavenProject(\"child2-1\", subParent);\n createMavenProject(\"child2-2\", subParent);\n when(this.globalFilter.include(subParent.getArtifact())).thenReturn(false);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child1-1:jar:version:compile\\\"\", \"\\\"groupId:child1-2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1-2:jar:version:compile\\\"[style=dotted]\" }));\n}",
725
- "old_test_file_path": [
726
- "src/test/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.java"
727
- ],
728
- "old_test_lnum": [
729
- "232-255"
730
- ],
731
- "new_test_lnum": [
732
- "231-254"
733
- ],
734
- "old_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n return this.graphBuilder.toString();\n}",
735
- "new_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
736
- "focal_file_path": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
737
- "focal_method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
738
- "focal_all_deps_scored": [
739
- {
740
- "dep_id": 0,
741
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
742
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
743
- "line_nums_old": "50-73",
744
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
745
- "line_nums_new": "53-80",
746
- "dependency_updated": "updated",
747
- "score": null,
748
- "signal_scores": {}
749
- }
750
- ],
751
- "coverage_gold": 0.8571428571428571,
752
- "branch_coverage_gold": 7.1118,
753
- "method_coverage_gold": 16.4865,
754
- "line_coverage_gold": 13.8658,
755
- "is_traceback": false,
756
- "commit_gap": {
757
- "count": 0,
758
- "skipped_commits": []
759
- },
760
- "test_is_refactoring_only": false,
761
- "has_test_dep_change": false,
762
- "all_deps_new": [
763
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
764
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
765
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
766
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String"
767
- ],
768
- "all_deps_old": [
769
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
770
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
771
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
772
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String"
773
- ],
774
- "deps_changes": [
775
- {
776
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
777
- "change_type": "UPDATE",
778
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
779
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
780
- "source": "production",
781
- "is_test_dependency": false,
782
- "is_refactoring_only": false
783
- }
784
- ],
785
- "variant_result": {
786
- "old_on_old": "pass",
787
- "old_on_new": "error",
788
- "new_on_old": "error",
789
- "new_on_new": "pass"
790
- }
791
- },
792
- {
793
- "change_id": "36_ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3_9fa8088_c00c183_AggregatingGraphFactoryTest",
794
- "test_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.excludeParentProjects:()V",
795
- "class": "AggregatingGraphFactoryTest",
796
- "method": "excludeParentProjects",
797
- "module": "",
798
- "junit_selector": "com.github.ferstl.depgraph.dependency.AggregatingGraphFactoryTest#excludeParentProjects",
799
- "old_test_code": "@Test\npublic void excludeParentProjects() throws Exception {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, false);\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1\", parent);\n createMavenProject(\"child2\", parent);\n graphFactory.createGraph(parent);\n verify(this.dependenciesResolver, never()).resolve(argThat(projectName(\"parent\")));\n verify(this.dependenciesResolver).resolve(argThat(projectName(\"child1\")));\n verify(this.dependenciesResolver).resolve(argThat(projectName(\"child2\")));\n assertThat(this.graphBuilder, emptyGraph());\n}",
800
- "new_test_code": "@Test\npublic void excludeParentProjects() throws Exception {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, false, false);\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1\", parent);\n createMavenProject(\"child2\", parent);\n graphFactory.createGraph(parent);\n verify(this.dependenciesResolver, never()).resolve(argThat(projectName(\"parent\")));\n verify(this.dependenciesResolver).resolve(argThat(projectName(\"child1\")));\n verify(this.dependenciesResolver).resolve(argThat(projectName(\"child2\")));\n assertThat(this.graphBuilder, emptyGraph());\n}",
801
- "old_test_file_path": [
802
- "src/test/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.java"
803
- ],
804
- "old_test_lnum": [
805
- "134-150"
806
- ],
807
- "new_test_lnum": [
808
- "133-149"
809
- ],
810
- "old_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n return this.graphBuilder.toString();\n}",
811
- "new_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
812
- "focal_file_path": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
813
- "focal_method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
814
- "focal_all_deps_scored": [
815
- {
816
- "dep_id": 0,
817
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
818
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
819
- "line_nums_old": "50-73",
820
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
821
- "line_nums_new": "53-80",
822
- "dependency_updated": "updated",
823
- "score": null,
824
- "signal_scores": {}
825
- }
826
- ],
827
- "coverage_gold": 0.8571428571428571,
828
- "branch_coverage_gold": 4.3541,
829
- "method_coverage_gold": 12.7027,
830
- "line_coverage_gold": 10.538,
831
- "is_traceback": false,
832
- "commit_gap": {
833
- "count": 0,
834
- "skipped_commits": []
835
- },
836
- "test_is_refactoring_only": false,
837
- "has_test_dep_change": false,
838
- "all_deps_new": [
839
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.projectName:(Ljava/lang/String;)Lorg/mockito/ArgumentMatcher",
840
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
841
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
842
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String"
843
- ],
844
- "all_deps_old": [
845
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.projectName:(Ljava/lang/String;)Lorg/mockito/ArgumentMatcher",
846
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
847
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
848
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String"
849
- ],
850
- "deps_changes": [
851
- {
852
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
853
- "change_type": "UPDATE",
854
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
855
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
856
- "source": "production",
857
- "is_test_dependency": false,
858
- "is_refactoring_only": false
859
- }
860
- ],
861
- "variant_result": {
862
- "old_on_old": "pass",
863
- "old_on_new": "error",
864
- "new_on_old": "error",
865
- "new_on_new": "pass"
866
- }
867
- },
868
- {
869
- "change_id": "37_ferstl_depgraph-maven-plugin-depgraph-maven-plugin-4.0.3_9fa8088_c00c183_AggregatingGraphFactoryTest",
870
- "test_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.moduleTree:()V",
871
- "class": "AggregatingGraphFactoryTest",
872
- "method": "moduleTree",
873
- "module": "",
874
- "junit_selector": "com.github.ferstl.depgraph.dependency.AggregatingGraphFactoryTest#moduleTree",
875
- "old_test_code": "@Test\npublic void moduleTree() {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, true);\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1\", parent);\n createMavenProject(\"child2\", parent);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child1:jar:version:compile\\\"\", \"\\\"groupId:child2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child2:jar:version:compile\\\"[style=dotted]\" }));\n}",
876
- "new_test_code": "@Test\npublic void moduleTree() {\n AggregatingGraphFactory graphFactory = new AggregatingGraphFactory(this.adapter, this.collectedProjectSupplier, this.globalFilter, this.graphBuilder, true, false);\n MavenProject parent = createMavenProject(\"parent\");\n createMavenProject(\"child1\", parent);\n createMavenProject(\"child2\", parent);\n graphFactory.createGraph(parent);\n assertThat(this.graphBuilder, hasNodesAndEdges(new String[] { \"\\\"groupId:parent:jar:version:compile\\\"\", \"\\\"groupId:child1:jar:version:compile\\\"\", \"\\\"groupId:child2:jar:version:compile\\\"\" }, new String[] { \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child1:jar:version:compile\\\"[style=dotted]\", \"\\\"groupId:parent:jar:version:compile\\\" -> \\\"groupId:child2:jar:version:compile\\\"[style=dotted]\" }));\n}",
877
- "old_test_file_path": [
878
- "src/test/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.java"
879
- ],
880
- "old_test_lnum": [
881
- "105-123"
882
- ],
883
- "new_test_lnum": [
884
- "104-122"
885
- ],
886
- "old_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n return this.graphBuilder.toString();\n}",
887
- "new_production_code": "@Override\npublic String createGraph(MavenProject parent) {\n this.graphBuilder.graphName(parent.getArtifactId());\n if (this.includeParentProjects) {\n buildModuleTree(parent, this.graphBuilder);\n }\n Collection<MavenProject> collectedProjects = this.subProjectSupplier.getSubProjects(parent);\n for (MavenProject collectedProject : collectedProjects) {\n if (isPartOfGraph(collectedProject)) {\n this.mavenGraphAdapter.buildDependencyGraph(collectedProject, this.globalFilter, this.graphBuilder);\n }\n }\n Artifact artifact = parent.getArtifact();\n if (this.graphBuilder.isEmpty() && this.globalFilter.include(artifact)) {\n this.graphBuilder.addNode(new DependencyNode(artifact));\n }\n if (this.reduceEdges) {\n this.graphBuilder.reduceEdges();\n }\n return this.graphBuilder.toString();\n}",
888
- "focal_file_path": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
889
- "focal_method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
890
- "focal_all_deps_scored": [
891
- {
892
- "dep_id": 0,
893
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
894
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
895
- "line_nums_old": "50-73",
896
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
897
- "line_nums_new": "53-80",
898
- "dependency_updated": "updated",
899
- "score": null,
900
- "signal_scores": {}
901
- }
902
- ],
903
- "coverage_gold": 0.8571428571428571,
904
- "branch_coverage_gold": 6.2409,
905
- "method_coverage_gold": 16.4865,
906
- "line_coverage_gold": 13.6439,
907
- "is_traceback": false,
908
- "commit_gap": {
909
- "count": 0,
910
- "skipped_commits": []
911
- },
912
- "test_is_refactoring_only": false,
913
- "has_test_dep_change": false,
914
- "all_deps_new": [
915
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
916
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
917
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
918
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String"
919
- ],
920
- "all_deps_old": [
921
- "com/github/ferstl/depgraph/graph/GraphBuilderMatcher.hasNodesAndEdges:([Ljava/lang/String;[Ljava/lang/String;)Lcom/github/ferstl/depgraph/graph/GraphBuilderMatcher",
922
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;Lorg/apache/maven/project/MavenProject;)Lorg/apache/maven/project/MavenProject",
923
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactoryTest.createMavenProject:(Ljava/lang/String;)Lorg/apache/maven/project/MavenProject",
924
- "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String"
925
- ],
926
- "deps_changes": [
927
- {
928
- "method_sign": "com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.createGraph:(Lorg/apache/maven/project/MavenProject;)Ljava/lang/String",
929
- "change_type": "UPDATE",
930
- "file_path_old": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
931
- "file_path_new": "src/main/java/com/github/ferstl/depgraph/dependency/AggregatingGraphFactory.java",
932
- "source": "production",
933
- "is_test_dependency": false,
934
- "is_refactoring_only": false
935
- }
936
- ],
937
- "variant_result": {
938
- "old_on_old": "pass",
939
- "old_on_new": "error",
940
- "new_on_old": "error",
941
- "new_on_new": "pass"
942
- }
943
- }
944
- ],
945
- "version": "depgraph-maven-plugin-4.0.3",
946
- "java_version": 8
947
- }
948
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fizzgate_fizz-gateway-node-v3.1.0.json DELETED
@@ -1,503 +0,0 @@
1
- [
2
- {
3
- "task_id": "fizzgate_fizz-gateway-node-v3.1.0__5a62aa3_0bbc128__CallbackServiceTests_507e4a34",
4
- "project_name": "fizzgate_fizz-gateway-node-v3.1.0",
5
- "git_clone_url": "https://github.com/fizzgate/fizz-gateway-node.git",
6
- "rev1": "5a62aa3bf2de6155cdc20634815dcf5b5d3cbe33",
7
- "rev2": "0bbc128ebd53b3fe0b885872e64ce5311c6b4846",
8
- "rev1_date": "2023-06-06T04:04:05Z",
9
- "rev2_date": "2023-06-06T06:54:43Z",
10
- "git_diff_url": "https://github.com/fizzgate/fizz-gateway-node/compare/5a62aa3bf2de6155cdc20634815dcf5b5d3cbe33...0bbc128ebd53b3fe0b885872e64ce5311c6b4846",
11
- "test_file": "fizz-core/src/test/java/com/fizzgate/proxy/CallbackServiceTests.java",
12
- "test_changes": [
13
- {
14
- "change_id": "11_fizzgate_fizz-gateway-node-v3.1.0_5a62aa3_0bbc128_CallbackServiceTests",
15
- "test_sign": "com/fizzgate/proxy/CallbackServiceTests.requestBackendsTest:()V",
16
- "class": "CallbackServiceTests",
17
- "method": "requestBackendsTest",
18
- "module": "fizz-core",
19
- "junit_selector": "com.fizzgate.proxy.CallbackServiceTests#requestBackendsTest",
20
- "old_test_code": "@Test\nvoid requestBackendsTest() throws InterruptedException {\n MockServerHttpRequest request = MockServerHttpRequest.get(\"http://127.0.0.1:8600/proxy/xservice/ybiz\").build();\n MockServerWebExchange exchange = MockServerWebExchange.from(request);\n HttpHeaders headers = new HttpHeaders();\n headers.add(\"h1\", \"v1\");\n DataBuffer body = null;\n CallbackConfig callbackConfig = new CallbackConfig();\n callbackConfig.receivers = new ArrayList<>();\n Receiver r1 = new Receiver();\n r1.service = \"s1\";\n r1.type = ApiConfig.Type.SERVICE_DISCOVERY;\n r1.path = \"p1\";\n callbackConfig.receivers.add(r1);\n Receiver r2 = new Receiver();\n r2.service = \"s2\";\n r2.type = ApiConfig.Type.SERVICE_DISCOVERY;\n r2.path = \"p2\";\n callbackConfig.receivers.add(r2);\n ServerHttpRequest req = exchange.getRequest();\n String reqId = req.getId();\n when(mockFizzWebClient.send2service(reqId, HttpMethod.GET, \"s1\", \"p1\", headers, body)).thenReturn(Mono.just(ClientResponse.create(HttpStatus.GONE, ExchangeStrategies.withDefaults()).header(\"FIZZ-RSV\", \"s1-rsv-value\").body(\"s1 resp\").build()));\n when(mockFizzWebClient.send2service(reqId, HttpMethod.GET, \"s2\", \"p2\", headers, body)).thenReturn(Mono.just(ClientResponse.create(HttpStatus.FOUND, ExchangeStrategies.withDefaults()).header(\"FIZZ-RSV\", \"s2-rsv-value\").body(\"s2 resp\").build()));\n Mono<Void> vm = callbackService.requestBackends(exchange, headers, body, callbackConfig, Collections.EMPTY_MAP);\n vm.subscribe();\n Thread.sleep(2000);\n}",
21
- "new_test_code": "@Test\nvoid requestBackendsTest() throws InterruptedException {\n MockServerHttpRequest request = MockServerHttpRequest.get(\"http://127.0.0.1:8600/proxy/xservice/ybiz\").build();\n MockServerWebExchange exchange = MockServerWebExchange.from(request);\n HttpHeaders headers = new HttpHeaders();\n headers.add(\"h1\", \"v1\");\n DataBuffer body = null;\n CallbackConfig callbackConfig = new CallbackConfig();\n callbackConfig.receivers = new ArrayList<>();\n Receiver r1 = new Receiver();\n r1.service = \"s1\";\n r1.type = ApiConfig.Type.SERVICE_DISCOVERY;\n r1.path = \"p1\";\n callbackConfig.receivers.add(r1);\n Receiver r2 = new Receiver();\n r2.service = \"s2\";\n r2.type = ApiConfig.Type.SERVICE_DISCOVERY;\n r2.path = \"p2\";\n callbackConfig.receivers.add(r2);\n ServerHttpRequest req = exchange.getRequest();\n String reqId = req.getId();\n when(mockFizzWebClient.send2service(reqId, HttpMethod.GET, \"s1\", \"p1\", headers, body)).thenReturn(Mono.just(ClientResponse.create(HttpStatus.GONE, ExchangeStrategies.withDefaults()).header(\"FIZZ-RSV\", \"s1-rsv-value\").body(\"s1 resp\").build()));\n when(mockFizzWebClient.send2service(reqId, HttpMethod.GET, \"s2\", \"p2\", headers, body)).thenReturn(Mono.just(ClientResponse.create(HttpStatus.FOUND, ExchangeStrategies.withDefaults()).header(\"FIZZ-RSV\", \"s2-rsv-value\").body(\"s2 resp\").build()));\n Mono<Void> vm = callbackService.requestBackends(exchange, headers, null, callbackConfig, Collections.EMPTY_MAP);\n vm.subscribe();\n Thread.sleep(2000);\n}",
22
- "old_test_file_path": [
23
- "fizz-core/src/test/java/com/fizzgate/proxy/CallbackServiceTests.java"
24
- ],
25
- "old_test_lnum": [
26
- "58-108"
27
- ],
28
- "new_test_lnum": [
29
- "58-109"
30
- ],
31
- "old_production_code": "public Mono<Void> requestBackends(ServerWebExchange exchange, HttpHeaders headers, DataBuffer body, CallbackConfig cc, Map<String, ServiceInstance> service2instMap) {\n ServerHttpRequest req = exchange.getRequest();\n String traceId = WebUtils.getTraceId(exchange);\n HttpMethod method = req.getMethod();\n if (log.isDebugEnabled()) {\n org.apache.logging.log4j.ThreadContext.put(Consts.TRACE_ID, traceId);\n log.debug(traceId + \" service2instMap: \" + JacksonUtils.writeValueAsString(service2instMap));\n }\n int rs = cc.receivers.size();\n Mono<Object>[] sends = new Mono[rs];\n for (int i = 0; i < rs; i++) {\n Receiver r = cc.receivers.get(i);\n Mono send;\n if (r.type == ApiConfig.Type.SERVICE_DISCOVERY) {\n ServiceInstance si = service2instMap.get(r.service);\n if (si == null) {\n send = fizzWebClient.send2service(traceId, method, r.service, r.path, headers, body).onErrorResume(crError(exchange, r, method, headers, body));\n } else {\n String uri = buildUri(req, si, r.path);\n send = fizzWebClient.send(traceId, method, uri, headers, body).onErrorResume(crError(exchange, r, method, headers, body));\n }\n } else {\n send = aggregateService.request(WebUtils.getTraceId(exchange), WebUtils.getClientReqPathPrefix(exchange), method.name(), r.service, r.path, req.getQueryParams(), headers, body).onErrorResume(arError(exchange, r, method, headers, body));\n }\n sends[i] = send;\n }\n return Flux.mergeSequential(sends).collectList().flatMap(sendResults -> {\n Object r = null;\n for (int i = 1; i < sendResults.size(); i++) {\n r = sendResults.get(i);\n if (r instanceof ClientResponse && !(r instanceof FizzFailClientResponse)) {\n clean((ClientResponse) r);\n }\n }\n r = sendResults.get(0);\n Throwable t = null;\n if (r instanceof FizzFailClientResponse) {\n t = ((FizzFailClientResponse) r).throwable;\n return Mono.error(Utils.runtimeExceptionWithoutStack(t.getMessage()));\n }\n if (r instanceof FailAggregateResult) {\n t = ((FailAggregateResult) r).throwable;\n return Mono.error(Utils.runtimeExceptionWithoutStack(t.getMessage()));\n } else if (r instanceof ClientResponse) {\n return genServerResponse(exchange, (ClientResponse) r);\n } else {\n return aggregateService.genAggregateResponse(exchange, (AggregateResult) r);\n }\n });\n}",
32
- "new_production_code": "public Mono<Void> requestBackends(ServerWebExchange exchange, HttpHeaders headers, String body, CallbackConfig cc, Map<String, ServiceInstance> service2instMap) {\n ServerHttpRequest req = exchange.getRequest();\n String traceId = WebUtils.getTraceId(exchange);\n HttpMethod method = req.getMethod();\n if (log.isDebugEnabled()) {\n org.apache.logging.log4j.ThreadContext.put(Consts.TRACE_ID, traceId);\n log.debug(traceId + \" service2instMap: \" + JacksonUtils.writeValueAsString(service2instMap));\n }\n int rs = cc.receivers.size();\n Mono<Object>[] sends = new Mono[rs];\n for (int i = 0; i < rs; i++) {\n Receiver r = cc.receivers.get(i);\n Mono send;\n if (r.type == ApiConfig.Type.SERVICE_DISCOVERY) {\n ServiceInstance si = service2instMap.get(r.service);\n if (si == null) {\n send = fizzWebClient.send2service(traceId, method, r.service, r.path, headers, body).onErrorResume(crError(exchange, r, method, headers, body));\n } else {\n String uri = buildUri(req, si, r.path);\n send = fizzWebClient.send(traceId, method, uri, headers, body).onErrorResume(crError(exchange, r, method, headers, body));\n }\n } else {\n send = aggregateService.request(WebUtils.getTraceId(exchange), WebUtils.getClientReqPathPrefix(exchange), method.name(), r.service, r.path, req.getQueryParams(), headers, body).onErrorResume(arError(exchange, r, method, headers, body));\n }\n sends[i] = send;\n }\n return Flux.mergeSequential(sends).collectList().flatMap(sendResults -> {\n Object r = null;\n for (int i = 1; i < sendResults.size(); i++) {\n r = sendResults.get(i);\n if (r instanceof ClientResponse && !(r instanceof FizzFailClientResponse)) {\n clean((ClientResponse) r);\n }\n }\n r = sendResults.get(0);\n Throwable t = null;\n if (r instanceof FizzFailClientResponse) {\n t = ((FizzFailClientResponse) r).throwable;\n return Mono.error(Utils.runtimeExceptionWithoutStack(t.getMessage()));\n }\n if (r instanceof FailAggregateResult) {\n t = ((FailAggregateResult) r).throwable;\n return Mono.error(Utils.runtimeExceptionWithoutStack(t.getMessage()));\n } else if (r instanceof ClientResponse) {\n return genServerResponse(exchange, (ClientResponse) r);\n } else {\n return aggregateService.genAggregateResponse(exchange, (AggregateResult) r);\n }\n });\n}",
33
- "focal_file_path": "fizz-core/src/main/java/com/fizzgate/proxy/CallbackService.java",
34
- "focal_method_sign": "com/fizzgate/proxy/CallbackService.requestBackends:(Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/http/HttpHeaders;Lorg/springframework/core/io/buffer/DataBuffer;Lcom/fizzgate/plugin/auth/CallbackConfig;Ljava/util/Map;)Lreactor/core/publisher/Mono",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "com/fizzgate/proxy/CallbackService.requestBackends:(Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/http/HttpHeaders;Lorg/springframework/core/io/buffer/DataBuffer;Lcom/fizzgate/plugin/auth/CallbackConfig;Ljava/util/Map;)Lreactor/core/publisher/Mono",
39
- "file_path_old": "fizz-core/src/main/java/com/fizzgate/proxy/CallbackService.java",
40
- "line_nums_old": "84-141",
41
- "file_path_new": "fizz-core/src/main/java/com/fizzgate/proxy/CallbackService.java",
42
- "line_nums_new": "83-140",
43
- "dependency_updated": "updated",
44
- "score": null,
45
- "signal_scores": {}
46
- }
47
- ],
48
- "coverage_gold": 0.8,
49
- "branch_coverage_gold": 0.2476,
50
- "method_coverage_gold": 0.6509,
51
- "line_coverage_gold": 0.6724,
52
- "is_traceback": false,
53
- "commit_gap": {
54
- "count": 0,
55
- "skipped_commits": []
56
- },
57
- "test_is_refactoring_only": false,
58
- "has_test_dep_change": false,
59
- "all_deps_new": [
60
- "com/fizzgate/proxy/CallbackService.requestBackends:(Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/http/HttpHeaders;Ljava/lang/String;Lcom/fizzgate/plugin/auth/CallbackConfig;Ljava/util/Map;)Lreactor/core/publisher/Mono"
61
- ],
62
- "all_deps_old": [
63
- "com/fizzgate/proxy/CallbackService.requestBackends:(Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/http/HttpHeaders;Lorg/springframework/core/io/buffer/DataBuffer;Lcom/fizzgate/plugin/auth/CallbackConfig;Ljava/util/Map;)Lreactor/core/publisher/Mono"
64
- ],
65
- "deps_changes": [
66
- {
67
- "method_sign": "com/fizzgate/proxy/CallbackService.requestBackends:(Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/http/HttpHeaders;Lorg/springframework/core/io/buffer/DataBuffer;Lcom/fizzgate/plugin/auth/CallbackConfig;Ljava/util/Map;)Lreactor/core/publisher/Mono",
68
- "change_type": "UPDATE",
69
- "file_path_old": "fizz-core/src/main/java/com/fizzgate/proxy/CallbackService.java",
70
- "file_path_new": "fizz-core/src/main/java/com/fizzgate/proxy/CallbackService.java",
71
- "source": "production",
72
- "is_test_dependency": false,
73
- "is_refactoring_only": false
74
- }
75
- ],
76
- "variant_result": {
77
- "old_on_old": "pass",
78
- "old_on_new": "error",
79
- "new_on_old": "pass",
80
- "new_on_new": "pass"
81
- }
82
- }
83
- ],
84
- "version": "v3.1.0",
85
- "java_version": 11
86
- },
87
- {
88
- "task_id": "fizzgate_fizz-gateway-node-v3.1.0__6dcd040_37149cd__CallbackServiceTests_507e4a34",
89
- "project_name": "fizzgate_fizz-gateway-node-v3.1.0",
90
- "git_clone_url": "https://github.com/fizzgate/fizz-gateway-node.git",
91
- "rev1": "6dcd040bba39c395d113e295bba93864a81cdf3e",
92
- "rev2": "37149cd82c45ec87a3059e70613446d4f05d1bd6",
93
- "rev1_date": "2023-06-29T04:24:50Z",
94
- "rev2_date": "2023-06-29T09:46:58Z",
95
- "git_diff_url": "https://github.com/fizzgate/fizz-gateway-node/compare/6dcd040bba39c395d113e295bba93864a81cdf3e...37149cd82c45ec87a3059e70613446d4f05d1bd6",
96
- "test_file": "fizz-core/src/test/java/com/fizzgate/proxy/CallbackServiceTests.java",
97
- "test_changes": [
98
- {
99
- "change_id": "1_fizzgate_fizz-gateway-node-v3.1.0_6dcd040_37149cd_CallbackServiceTests",
100
- "test_sign": "com/fizzgate/proxy/CallbackServiceTests.requestBackendsTest:()V",
101
- "class": "CallbackServiceTests",
102
- "method": "requestBackendsTest",
103
- "module": "fizz-core",
104
- "junit_selector": "com.fizzgate.proxy.CallbackServiceTests#requestBackendsTest",
105
- "old_test_code": "@Test\nvoid requestBackendsTest() throws InterruptedException {\n MockServerHttpRequest request = MockServerHttpRequest.get(\"http://127.0.0.1:8600/proxy/xservice/ybiz\").build();\n MockServerWebExchange exchange = MockServerWebExchange.from(request);\n HttpHeaders headers = new HttpHeaders();\n headers.add(\"h1\", \"v1\");\n DataBuffer body = null;\n CallbackConfig callbackConfig = new CallbackConfig();\n callbackConfig.receivers = new ArrayList<>();\n Receiver r1 = new Receiver();\n r1.service = \"s1\";\n r1.type = ApiConfig.Type.SERVICE_DISCOVERY;\n r1.path = \"p1\";\n callbackConfig.receivers.add(r1);\n Receiver r2 = new Receiver();\n r2.service = \"s2\";\n r2.type = ApiConfig.Type.SERVICE_DISCOVERY;\n r2.path = \"p2\";\n callbackConfig.receivers.add(r2);\n ServerHttpRequest req = exchange.getRequest();\n String reqId = req.getId();\n when(mockFizzWebClient.send2service(reqId, HttpMethod.GET, \"s1\", \"p1\", headers, body)).thenReturn(Mono.just(ClientResponse.create(HttpStatus.GONE, ExchangeStrategies.withDefaults()).header(\"FIZZ-RSV\", \"s1-rsv-value\").body(\"s1 resp\").build()));\n when(mockFizzWebClient.send2service(reqId, HttpMethod.GET, \"s2\", \"p2\", headers, body)).thenReturn(Mono.just(ClientResponse.create(HttpStatus.FOUND, ExchangeStrategies.withDefaults()).header(\"FIZZ-RSV\", \"s2-rsv-value\").body(\"s2 resp\").build()));\n Mono<Void> vm = callbackService.requestBackends(exchange, headers, body, callbackConfig, Collections.EMPTY_MAP);\n vm.subscribe();\n Thread.sleep(2000);\n}",
106
- "new_test_code": "@Test\nvoid requestBackendsTest() throws InterruptedException {\n MockServerHttpRequest request = MockServerHttpRequest.get(\"http://127.0.0.1:8600/proxy/xservice/ybiz\").build();\n MockServerWebExchange exchange = MockServerWebExchange.from(request);\n HttpHeaders headers = new HttpHeaders();\n headers.add(\"h1\", \"v1\");\n String body = null;\n CallbackConfig callbackConfig = new CallbackConfig();\n callbackConfig.receivers = new ArrayList<>();\n Receiver r1 = new Receiver();\n r1.service = \"s1\";\n r1.type = ApiConfig.Type.SERVICE_DISCOVERY;\n r1.path = \"p1\";\n callbackConfig.receivers.add(r1);\n Receiver r2 = new Receiver();\n r2.service = \"s2\";\n r2.type = ApiConfig.Type.SERVICE_DISCOVERY;\n r2.path = \"p2\";\n callbackConfig.receivers.add(r2);\n ServerHttpRequest req = exchange.getRequest();\n String reqId = req.getId();\n when(mockFizzWebClient.send2service(reqId, HttpMethod.GET, \"s1\", \"p1\", headers, body)).thenReturn(Mono.just(ClientResponse.create(HttpStatus.GONE, ExchangeStrategies.withDefaults()).header(\"FIZZ-RSV\", \"s1-rsv-value\").body(\"s1 resp\").build()));\n when(mockFizzWebClient.send2service(reqId, HttpMethod.GET, \"s2\", \"p2\", headers, body)).thenReturn(Mono.just(ClientResponse.create(HttpStatus.FOUND, ExchangeStrategies.withDefaults()).header(\"FIZZ-RSV\", \"s2-rsv-value\").body(\"s2 resp\").build()));\n Mono<Void> vm = callbackService.requestBackends(exchange, headers, body, callbackConfig, Collections.EMPTY_MAP);\n vm.subscribe();\n Thread.sleep(2000);\n}",
107
- "old_test_file_path": [
108
- "fizz-core/src/test/java/com/fizzgate/proxy/CallbackServiceTests.java"
109
- ],
110
- "old_test_lnum": [
111
- "58-108"
112
- ],
113
- "new_test_lnum": [
114
- "59-109"
115
- ],
116
- "old_production_code": "public Mono<Void> requestBackends(ServerWebExchange exchange, HttpHeaders headers, DataBuffer body, CallbackConfig cc, Map<String, ServiceInstance> service2instMap) {\n ServerHttpRequest req = exchange.getRequest();\n String traceId = WebUtils.getTraceId(exchange);\n HttpMethod method = req.getMethod();\n if (log.isDebugEnabled()) {\n org.apache.logging.log4j.ThreadContext.put(Consts.TRACE_ID, traceId);\n log.debug(traceId + \" service2instMap: \" + JacksonUtils.writeValueAsString(service2instMap));\n }\n int rs = cc.receivers.size();\n Mono<Object>[] sends = new Mono[rs];\n for (int i = 0; i < rs; i++) {\n Receiver r = cc.receivers.get(i);\n Mono send;\n if (r.type == ApiConfig.Type.SERVICE_DISCOVERY) {\n ServiceInstance si = service2instMap.get(r.service);\n if (si == null) {\n send = fizzWebClient.send2service(traceId, method, r.service, r.path, headers, body).onErrorResume(crError(exchange, r, method, headers, body));\n } else {\n String uri = buildUri(req, si, r.path);\n send = fizzWebClient.send(traceId, method, uri, headers, body).onErrorResume(crError(exchange, r, method, headers, body));\n }\n } else {\n send = aggregateService.request(WebUtils.getTraceId(exchange), WebUtils.getClientReqPathPrefix(exchange), method.name(), r.service, r.path, req.getQueryParams(), headers, body).onErrorResume(arError(exchange, r, method, headers, body));\n }\n sends[i] = send;\n }\n return Flux.mergeSequential(sends).collectList().flatMap(sendResults -> {\n Object r = null;\n for (int i = 1; i < sendResults.size(); i++) {\n r = sendResults.get(i);\n if (r instanceof ClientResponse && !(r instanceof FizzFailClientResponse)) {\n clean((ClientResponse) r);\n }\n }\n r = sendResults.get(0);\n Throwable t = null;\n if (r instanceof FizzFailClientResponse) {\n t = ((FizzFailClientResponse) r).throwable;\n return Mono.error(Utils.runtimeExceptionWithoutStack(t.getMessage()));\n }\n if (r instanceof FailAggregateResult) {\n t = ((FailAggregateResult) r).throwable;\n return Mono.error(Utils.runtimeExceptionWithoutStack(t.getMessage()));\n } else if (r instanceof ClientResponse) {\n return genServerResponse(exchange, (ClientResponse) r);\n } else {\n return aggregateService.genAggregateResponse(exchange, (AggregateResult) r);\n }\n });\n}",
117
- "new_production_code": "public Mono<Void> requestBackends(ServerWebExchange exchange, HttpHeaders headers, String body, CallbackConfig cc, Map<String, ServiceInstance> service2instMap) {\n ServerHttpRequest req = exchange.getRequest();\n String traceId = WebUtils.getTraceId(exchange);\n HttpMethod method = req.getMethod();\n if (log.isDebugEnabled()) {\n org.apache.logging.log4j.ThreadContext.put(Consts.TRACE_ID, traceId);\n log.debug(traceId + \" service2instMap: \" + JacksonUtils.writeValueAsString(service2instMap));\n }\n int rs = cc.receivers.size();\n Mono<Object>[] sends = new Mono[rs];\n for (int i = 0; i < rs; i++) {\n Receiver r = cc.receivers.get(i);\n Mono send;\n if (r.type == ApiConfig.Type.SERVICE_DISCOVERY) {\n ServiceInstance si = service2instMap.get(r.service);\n if (si == null) {\n send = fizzWebClient.send2service(traceId, method, r.service, r.path, headers, body).onErrorResume(crError(exchange, r, method, headers, body));\n } else {\n String uri = buildUri(req, si, r.path);\n send = fizzWebClient.send(traceId, method, uri, headers, body).onErrorResume(crError(exchange, r, method, headers, body));\n }\n } else {\n send = aggregateService.request(WebUtils.getTraceId(exchange), WebUtils.getClientReqPathPrefix(exchange), method.name(), r.service, r.path, req.getQueryParams(), headers, body).onErrorResume(arError(exchange, r, method, headers, body));\n }\n sends[i] = send;\n }\n return Flux.mergeSequential(sends).collectList().flatMap(sendResults -> {\n Object r = null;\n for (int i = 1; i < sendResults.size(); i++) {\n r = sendResults.get(i);\n if (r instanceof ClientResponse && !(r instanceof FizzFailClientResponse)) {\n clean((ClientResponse) r);\n }\n }\n r = sendResults.get(0);\n Throwable t = null;\n if (r instanceof FizzFailClientResponse) {\n t = ((FizzFailClientResponse) r).throwable;\n return Mono.error(Utils.runtimeExceptionWithoutStack(t.getMessage()));\n }\n if (r instanceof FailAggregateResult) {\n t = ((FailAggregateResult) r).throwable;\n return Mono.error(Utils.runtimeExceptionWithoutStack(t.getMessage()));\n } else if (r instanceof ClientResponse) {\n return genServerResponse(exchange, (ClientResponse) r);\n } else {\n return aggregateService.genAggregateResponse(exchange, (AggregateResult) r);\n }\n });\n}",
118
- "focal_file_path": "fizz-core/src/main/java/com/fizzgate/proxy/CallbackService.java",
119
- "focal_method_sign": "com/fizzgate/proxy/CallbackService.requestBackends:(Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/http/HttpHeaders;Lorg/springframework/core/io/buffer/DataBuffer;Lcom/fizzgate/plugin/auth/CallbackConfig;Ljava/util/Map;)Lreactor/core/publisher/Mono",
120
- "focal_all_deps_scored": [
121
- {
122
- "dep_id": 0,
123
- "method_sign": "com/fizzgate/proxy/CallbackService.requestBackends:(Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/http/HttpHeaders;Lorg/springframework/core/io/buffer/DataBuffer;Lcom/fizzgate/plugin/auth/CallbackConfig;Ljava/util/Map;)Lreactor/core/publisher/Mono",
124
- "file_path_old": "fizz-core/src/main/java/com/fizzgate/proxy/CallbackService.java",
125
- "line_nums_old": "84-141",
126
- "file_path_new": "fizz-core/src/main/java/com/fizzgate/proxy/CallbackService.java",
127
- "line_nums_new": "83-140",
128
- "dependency_updated": "updated",
129
- "score": null,
130
- "signal_scores": {}
131
- }
132
- ],
133
- "coverage_gold": 0.8,
134
- "branch_coverage_gold": 0.2482,
135
- "method_coverage_gold": 0.6515,
136
- "line_coverage_gold": 0.6742,
137
- "is_traceback": false,
138
- "commit_gap": {
139
- "count": 2,
140
- "skipped_commits": [
141
- "6eee0c2e80add4cf0f09da0309634a95dae74ead",
142
- "926cacb60bf6c9b6bd9e0cbbaa73754208a3a9c2"
143
- ]
144
- },
145
- "test_is_refactoring_only": false,
146
- "has_test_dep_change": false,
147
- "all_deps_new": [
148
- "com/fizzgate/proxy/CallbackService.requestBackends:(Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/http/HttpHeaders;Ljava/lang/String;Lcom/fizzgate/plugin/auth/CallbackConfig;Ljava/util/Map;)Lreactor/core/publisher/Mono"
149
- ],
150
- "all_deps_old": [
151
- "com/fizzgate/proxy/CallbackService.requestBackends:(Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/http/HttpHeaders;Lorg/springframework/core/io/buffer/DataBuffer;Lcom/fizzgate/plugin/auth/CallbackConfig;Ljava/util/Map;)Lreactor/core/publisher/Mono"
152
- ],
153
- "deps_changes": [
154
- {
155
- "method_sign": "com/fizzgate/proxy/CallbackService.requestBackends:(Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/http/HttpHeaders;Lorg/springframework/core/io/buffer/DataBuffer;Lcom/fizzgate/plugin/auth/CallbackConfig;Ljava/util/Map;)Lreactor/core/publisher/Mono",
156
- "change_type": "UPDATE",
157
- "file_path_old": "fizz-core/src/main/java/com/fizzgate/proxy/CallbackService.java",
158
- "file_path_new": "fizz-core/src/main/java/com/fizzgate/proxy/CallbackService.java",
159
- "source": "production",
160
- "is_test_dependency": false,
161
- "is_refactoring_only": false
162
- }
163
- ],
164
- "variant_result": {
165
- "old_on_old": "pass",
166
- "old_on_new": "error",
167
- "new_on_old": "error",
168
- "new_on_new": "pass"
169
- }
170
- }
171
- ],
172
- "version": "v3.1.0",
173
- "java_version": 11
174
- },
175
- {
176
- "task_id": "fizzgate_fizz-gateway-node-v3.1.0__9ddd584_6dcd040__CallbackServiceTests_507e4a34",
177
- "project_name": "fizzgate_fizz-gateway-node-v3.1.0",
178
- "git_clone_url": "https://github.com/fizzgate/fizz-gateway-node.git",
179
- "rev1": "9ddd5848312cbec95a87611c96b41ea452dbb319",
180
- "rev2": "6dcd040bba39c395d113e295bba93864a81cdf3e",
181
- "rev1_date": "2023-06-29T03:28:47Z",
182
- "rev2_date": "2023-06-29T04:24:50Z",
183
- "git_diff_url": "https://github.com/fizzgate/fizz-gateway-node/compare/9ddd5848312cbec95a87611c96b41ea452dbb319...6dcd040bba39c395d113e295bba93864a81cdf3e",
184
- "test_file": "fizz-core/src/test/java/com/fizzgate/proxy/CallbackServiceTests.java",
185
- "test_changes": [
186
- {
187
- "change_id": "15_fizzgate_fizz-gateway-node-v3.1.0_9ddd584_6dcd040_CallbackServiceTests",
188
- "test_sign": "com/fizzgate/proxy/CallbackServiceTests.requestBackendsTest:()V",
189
- "class": "CallbackServiceTests",
190
- "method": "requestBackendsTest",
191
- "module": "fizz-core",
192
- "junit_selector": "com.fizzgate.proxy.CallbackServiceTests#requestBackendsTest",
193
- "old_test_code": "@Test\nvoid requestBackendsTest() throws InterruptedException {\n MockServerHttpRequest request = MockServerHttpRequest.get(\"http://127.0.0.1:8600/proxy/xservice/ybiz\").build();\n MockServerWebExchange exchange = MockServerWebExchange.from(request);\n HttpHeaders headers = new HttpHeaders();\n headers.add(\"h1\", \"v1\");\n String body = null;\n CallbackConfig callbackConfig = new CallbackConfig();\n callbackConfig.receivers = new ArrayList<>();\n Receiver r1 = new Receiver();\n r1.service = \"s1\";\n r1.type = ApiConfig.Type.SERVICE_DISCOVERY;\n r1.path = \"p1\";\n callbackConfig.receivers.add(r1);\n Receiver r2 = new Receiver();\n r2.service = \"s2\";\n r2.type = ApiConfig.Type.SERVICE_DISCOVERY;\n r2.path = \"p2\";\n callbackConfig.receivers.add(r2);\n ServerHttpRequest req = exchange.getRequest();\n String reqId = req.getId();\n when(mockFizzWebClient.send2service(reqId, HttpMethod.GET, \"s1\", \"p1\", headers, body)).thenReturn(Mono.just(ClientResponse.create(HttpStatus.GONE, ExchangeStrategies.withDefaults()).header(\"FIZZ-RSV\", \"s1-rsv-value\").body(\"s1 resp\").build()));\n when(mockFizzWebClient.send2service(reqId, HttpMethod.GET, \"s2\", \"p2\", headers, body)).thenReturn(Mono.just(ClientResponse.create(HttpStatus.FOUND, ExchangeStrategies.withDefaults()).header(\"FIZZ-RSV\", \"s2-rsv-value\").body(\"s2 resp\").build()));\n Mono<Void> vm = callbackService.requestBackends(exchange, headers, body, callbackConfig, Collections.EMPTY_MAP);\n vm.subscribe();\n Thread.sleep(2000);\n}",
194
- "new_test_code": "@Test\nvoid requestBackendsTest() throws InterruptedException {\n MockServerHttpRequest request = MockServerHttpRequest.get(\"http://127.0.0.1:8600/proxy/xservice/ybiz\").build();\n MockServerWebExchange exchange = MockServerWebExchange.from(request);\n HttpHeaders headers = new HttpHeaders();\n headers.add(\"h1\", \"v1\");\n DataBuffer body = null;\n CallbackConfig callbackConfig = new CallbackConfig();\n callbackConfig.receivers = new ArrayList<>();\n Receiver r1 = new Receiver();\n r1.service = \"s1\";\n r1.type = ApiConfig.Type.SERVICE_DISCOVERY;\n r1.path = \"p1\";\n callbackConfig.receivers.add(r1);\n Receiver r2 = new Receiver();\n r2.service = \"s2\";\n r2.type = ApiConfig.Type.SERVICE_DISCOVERY;\n r2.path = \"p2\";\n callbackConfig.receivers.add(r2);\n ServerHttpRequest req = exchange.getRequest();\n String reqId = req.getId();\n when(mockFizzWebClient.send2service(reqId, HttpMethod.GET, \"s1\", \"p1\", headers, body)).thenReturn(Mono.just(ClientResponse.create(HttpStatus.GONE, ExchangeStrategies.withDefaults()).header(\"FIZZ-RSV\", \"s1-rsv-value\").body(\"s1 resp\").build()));\n when(mockFizzWebClient.send2service(reqId, HttpMethod.GET, \"s2\", \"p2\", headers, body)).thenReturn(Mono.just(ClientResponse.create(HttpStatus.FOUND, ExchangeStrategies.withDefaults()).header(\"FIZZ-RSV\", \"s2-rsv-value\").body(\"s2 resp\").build()));\n Mono<Void> vm = callbackService.requestBackends(exchange, headers, body, callbackConfig, Collections.EMPTY_MAP);\n vm.subscribe();\n Thread.sleep(2000);\n}",
195
- "old_test_file_path": [
196
- "fizz-core/src/test/java/com/fizzgate/proxy/CallbackServiceTests.java"
197
- ],
198
- "old_test_lnum": [
199
- "59-109"
200
- ],
201
- "new_test_lnum": [
202
- "58-108"
203
- ],
204
- "old_production_code": "public Mono<Void> requestBackends(ServerWebExchange exchange, HttpHeaders headers, String body, CallbackConfig cc, Map<String, ServiceInstance> service2instMap) {\n ServerHttpRequest req = exchange.getRequest();\n String traceId = WebUtils.getTraceId(exchange);\n HttpMethod method = req.getMethod();\n if (log.isDebugEnabled()) {\n org.apache.logging.log4j.ThreadContext.put(Consts.TRACE_ID, traceId);\n log.debug(traceId + \" service2instMap: \" + JacksonUtils.writeValueAsString(service2instMap));\n }\n int rs = cc.receivers.size();\n Mono<Object>[] sends = new Mono[rs];\n for (int i = 0; i < rs; i++) {\n Receiver r = cc.receivers.get(i);\n Mono send;\n if (r.type == ApiConfig.Type.SERVICE_DISCOVERY) {\n ServiceInstance si = service2instMap.get(r.service);\n if (si == null) {\n send = fizzWebClient.send2service(traceId, method, r.service, r.path, headers, body).onErrorResume(crError(exchange, r, method, headers, body));\n } else {\n String uri = buildUri(req, si, r.path);\n send = fizzWebClient.send(traceId, method, uri, headers, body).onErrorResume(crError(exchange, r, method, headers, body));\n }\n } else {\n send = aggregateService.request(WebUtils.getTraceId(exchange), WebUtils.getClientReqPathPrefix(exchange), method.name(), r.service, r.path, req.getQueryParams(), headers, body).onErrorResume(arError(exchange, r, method, headers, body));\n }\n sends[i] = send;\n }\n return Flux.mergeSequential(sends).collectList().flatMap(sendResults -> {\n Object r = null;\n for (int i = 1; i < sendResults.size(); i++) {\n r = sendResults.get(i);\n if (r instanceof ClientResponse && !(r instanceof FizzFailClientResponse)) {\n clean((ClientResponse) r);\n }\n }\n r = sendResults.get(0);\n Throwable t = null;\n if (r instanceof FizzFailClientResponse) {\n t = ((FizzFailClientResponse) r).throwable;\n return Mono.error(Utils.runtimeExceptionWithoutStack(t.getMessage()));\n }\n if (r instanceof FailAggregateResult) {\n t = ((FailAggregateResult) r).throwable;\n return Mono.error(Utils.runtimeExceptionWithoutStack(t.getMessage()));\n } else if (r instanceof ClientResponse) {\n return genServerResponse(exchange, (ClientResponse) r);\n } else {\n return aggregateService.genAggregateResponse(exchange, (AggregateResult) r);\n }\n });\n}",
205
- "new_production_code": "public Mono<Void> requestBackends(ServerWebExchange exchange, HttpHeaders headers, DataBuffer body, CallbackConfig cc, Map<String, ServiceInstance> service2instMap) {\n ServerHttpRequest req = exchange.getRequest();\n String traceId = WebUtils.getTraceId(exchange);\n HttpMethod method = req.getMethod();\n if (log.isDebugEnabled()) {\n org.apache.logging.log4j.ThreadContext.put(Consts.TRACE_ID, traceId);\n log.debug(traceId + \" service2instMap: \" + JacksonUtils.writeValueAsString(service2instMap));\n }\n int rs = cc.receivers.size();\n Mono<Object>[] sends = new Mono[rs];\n for (int i = 0; i < rs; i++) {\n Receiver r = cc.receivers.get(i);\n Mono send;\n if (r.type == ApiConfig.Type.SERVICE_DISCOVERY) {\n ServiceInstance si = service2instMap.get(r.service);\n if (si == null) {\n send = fizzWebClient.send2service(traceId, method, r.service, r.path, headers, body).onErrorResume(crError(exchange, r, method, headers, body));\n } else {\n String uri = buildUri(req, si, r.path);\n send = fizzWebClient.send(traceId, method, uri, headers, body).onErrorResume(crError(exchange, r, method, headers, body));\n }\n } else {\n send = aggregateService.request(WebUtils.getTraceId(exchange), WebUtils.getClientReqPathPrefix(exchange), method.name(), r.service, r.path, req.getQueryParams(), headers, body).onErrorResume(arError(exchange, r, method, headers, body));\n }\n sends[i] = send;\n }\n return Flux.mergeSequential(sends).collectList().flatMap(sendResults -> {\n Object r = null;\n for (int i = 1; i < sendResults.size(); i++) {\n r = sendResults.get(i);\n if (r instanceof ClientResponse && !(r instanceof FizzFailClientResponse)) {\n clean((ClientResponse) r);\n }\n }\n r = sendResults.get(0);\n Throwable t = null;\n if (r instanceof FizzFailClientResponse) {\n t = ((FizzFailClientResponse) r).throwable;\n return Mono.error(Utils.runtimeExceptionWithoutStack(t.getMessage()));\n }\n if (r instanceof FailAggregateResult) {\n t = ((FailAggregateResult) r).throwable;\n return Mono.error(Utils.runtimeExceptionWithoutStack(t.getMessage()));\n } else if (r instanceof ClientResponse) {\n return genServerResponse(exchange, (ClientResponse) r);\n } else {\n return aggregateService.genAggregateResponse(exchange, (AggregateResult) r);\n }\n });\n}",
206
- "focal_file_path": "fizz-core/src/main/java/com/fizzgate/proxy/CallbackService.java",
207
- "focal_method_sign": "com/fizzgate/proxy/CallbackService.requestBackends:(Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/http/HttpHeaders;Lorg/springframework/core/io/buffer/DataBuffer;Lcom/fizzgate/plugin/auth/CallbackConfig;Ljava/util/Map;)Lreactor/core/publisher/Mono",
208
- "focal_all_deps_scored": [
209
- {
210
- "dep_id": 0,
211
- "method_sign": "com/fizzgate/proxy/CallbackService.requestBackends:(Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/http/HttpHeaders;Lorg/springframework/core/io/buffer/DataBuffer;Lcom/fizzgate/plugin/auth/CallbackConfig;Ljava/util/Map;)Lreactor/core/publisher/Mono",
212
- "file_path_old": "fizz-core/src/main/java/com/fizzgate/proxy/CallbackService.java",
213
- "line_nums_old": "83-140",
214
- "file_path_new": "fizz-core/src/main/java/com/fizzgate/proxy/CallbackService.java",
215
- "line_nums_new": "84-141",
216
- "dependency_updated": "updated",
217
- "score": null,
218
- "signal_scores": {}
219
- }
220
- ],
221
- "coverage_gold": 0.8,
222
- "branch_coverage_gold": 0.2489,
223
- "method_coverage_gold": 0.6528,
224
- "line_coverage_gold": 0.6762,
225
- "is_traceback": false,
226
- "commit_gap": {
227
- "count": 1,
228
- "skipped_commits": [
229
- "b92dd42c8e5f350bd9ef94fbfb529c936f090962"
230
- ]
231
- },
232
- "test_is_refactoring_only": false,
233
- "has_test_dep_change": false,
234
- "all_deps_new": [
235
- "com/fizzgate/proxy/CallbackService.requestBackends:(Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/http/HttpHeaders;Lorg/springframework/core/io/buffer/DataBuffer;Lcom/fizzgate/plugin/auth/CallbackConfig;Ljava/util/Map;)Lreactor/core/publisher/Mono"
236
- ],
237
- "all_deps_old": [
238
- "com/fizzgate/proxy/CallbackService.requestBackends:(Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/http/HttpHeaders;Ljava/lang/String;Lcom/fizzgate/plugin/auth/CallbackConfig;Ljava/util/Map;)Lreactor/core/publisher/Mono"
239
- ],
240
- "deps_changes": [
241
- {
242
- "method_sign": "com/fizzgate/proxy/CallbackService.requestBackends:(Lorg/springframework/web/server/ServerWebExchange;Lorg/springframework/http/HttpHeaders;Lorg/springframework/core/io/buffer/DataBuffer;Lcom/fizzgate/plugin/auth/CallbackConfig;Ljava/util/Map;)Lreactor/core/publisher/Mono",
243
- "change_type": "UPDATE",
244
- "file_path_old": "fizz-core/src/main/java/com/fizzgate/proxy/CallbackService.java",
245
- "file_path_new": "fizz-core/src/main/java/com/fizzgate/proxy/CallbackService.java",
246
- "source": "production",
247
- "is_test_dependency": false,
248
- "is_refactoring_only": false
249
- }
250
- ],
251
- "variant_result": {
252
- "old_on_old": "pass",
253
- "old_on_new": "error",
254
- "new_on_old": "error",
255
- "new_on_new": "pass"
256
- }
257
- }
258
- ],
259
- "version": "v3.1.0",
260
- "java_version": 11
261
- },
262
- {
263
- "task_id": "fizzgate_fizz-gateway-node-v3.1.0__c1003b2_211e027__CircuitBreakManagerTests_64a1fabb",
264
- "project_name": "fizzgate_fizz-gateway-node-v3.1.0",
265
- "git_clone_url": "https://github.com/fizzgate/fizz-gateway-node.git",
266
- "rev1": "c1003b2326967c0e68b845ab3cc20b433c69fdbc",
267
- "rev2": "211e02728cc417fac9ed196779e175214f7770a9",
268
- "rev1_date": "2022-04-27T03:51:07Z",
269
- "rev2_date": "2022-04-27T09:16:03Z",
270
- "git_diff_url": "https://github.com/fizzgate/fizz-gateway-node/compare/c1003b2326967c0e68b845ab3cc20b433c69fdbc...211e02728cc417fac9ed196779e175214f7770a9",
271
- "test_file": "fizz-core/src/test/java/we/stats/circuitbreaker/CircuitBreakManagerTests.java",
272
- "test_changes": [
273
- {
274
- "change_id": "13_fizzgate_fizz-gateway-node-v3.1.0_c1003b2_211e027_CircuitBreakManagerTests",
275
- "test_sign": "we/stats/circuitbreaker/CircuitBreakManagerTests.permitTest:()V",
276
- "class": "CircuitBreakManagerTests",
277
- "method": "permitTest",
278
- "module": "fizz-core",
279
- "junit_selector": "we.stats.circuitbreaker.CircuitBreakManagerTests#permitTest",
280
- "old_test_code": "@Test\nvoid permitTest() {\n FlowStat flowStat = new FlowStat(circuitBreakManager);\n long currentTimeWindow = flowStat.currentTimeSlotId();\n MockServerHttpRequest mockServerHttpRequest = MockServerHttpRequest.get(\"/xxx\").build();\n MockServerWebExchange mockServerWebExchange = MockServerWebExchange.from(mockServerHttpRequest);\n String service = \"xservice\";\n String path = \"ypath\";\n CircuitBreaker cb = new CircuitBreaker();\n cb.service = service;\n cb.path = path;\n cb.resource = ResourceIdUtils.buildResourceId(null, null, null, service, path);\n cb.breakStrategy = CircuitBreaker.BreakStrategy.TOTAL_ERRORS;\n cb.monitorDuration = 5 * 1000;\n cb.minRequests = 100;\n cb.totalErrorThreshold = 10;\n cb.breakDuration = 5 * 1000;\n cb.resumeStrategy = CircuitBreaker.ResumeStrategy.IMMEDIATE;\n cb.stateStartTime = currentTimeWindow;\n Map<String, CircuitBreaker> circuitBreakerMap = circuitBreakManager.getResource2circuitBreakerMap();\n circuitBreakerMap.put(cb.resource, cb);\n ResourceStat resourceStat = flowStat.getResourceStat(cb.resource);\n TimeSlot timeSlot = resourceStat.getTimeSlot(currentTimeWindow);\n timeSlot.getCompReqs().set(200);\n timeSlot.getErrors().set(11);\n boolean permit = circuitBreakManager.permit(mockServerWebExchange, currentTimeWindow, flowStat, service, path);\n Assertions.assertFalse(permit);\n Assertions.assertEquals(CircuitBreaker.State.OPEN, cb.stateRef.get());\n permit = circuitBreakManager.permit(mockServerWebExchange, currentTimeWindow, flowStat, service, path);\n Assertions.assertFalse(permit);\n Assertions.assertEquals(CircuitBreaker.State.OPEN, timeSlot.getCircuitBreakState().get());\n Assertions.assertEquals(2, timeSlot.getCircuitBreakNum().get());\n}",
281
- "new_test_code": "@Test\nvoid permitTest() {\n FlowStat flowStat = new FlowStat(circuitBreakManager);\n long currentTimeWindow = flowStat.currentTimeSlotId();\n MockServerHttpRequest mockServerHttpRequest = MockServerHttpRequest.get(\"/xxx\").build();\n MockServerWebExchange mockServerWebExchange = MockServerWebExchange.from(mockServerHttpRequest);\n String service = \"xservice\";\n String path = \"ypath\";\n CircuitBreaker cb = new CircuitBreaker();\n cb.service = service;\n cb.path = path;\n cb.resource = ResourceIdUtils.buildResourceId(null, null, null, service, path);\n cb.breakStrategy = CircuitBreaker.BreakStrategy.TOTAL_ERRORS;\n cb.monitorDuration = 5 * 1000;\n cb.minRequests = 100;\n cb.totalErrorThreshold = 10;\n cb.breakDuration = 5 * 1000;\n cb.resumeStrategy = CircuitBreaker.ResumeStrategy.IMMEDIATE;\n cb.stateStartTime = currentTimeWindow;\n Map<String, CircuitBreaker> circuitBreakerMap = circuitBreakManager.getResource2circuitBreakerMap();\n circuitBreakerMap.put(cb.resource, cb);\n ResourceStat resourceStat = flowStat.getResourceStat(cb.resource);\n TimeSlot timeSlot = resourceStat.getTimeSlot(currentTimeWindow);\n timeSlot.setCompReqs(200);\n timeSlot.setErrors(11);\n boolean permit = circuitBreakManager.permit(mockServerWebExchange, currentTimeWindow, flowStat, service, path);\n Assertions.assertFalse(permit);\n Assertions.assertEquals(CircuitBreaker.State.OPEN, cb.stateRef.get());\n permit = circuitBreakManager.permit(mockServerWebExchange, currentTimeWindow, flowStat, service, path);\n Assertions.assertFalse(permit);\n Assertions.assertEquals(CircuitBreaker.State.OPEN, timeSlot.getCircuitBreakState().get());\n Assertions.assertEquals(2, timeSlot.getCircuitBreakNum());\n}",
282
- "old_test_file_path": [
283
- "fizz-core/src/test/java/we/stats/circuitbreaker/CircuitBreakManagerTests.java"
284
- ],
285
- "old_test_lnum": [
286
- "68-105"
287
- ],
288
- "new_test_lnum": [
289
- "68-105"
290
- ],
291
- "old_production_code": "public AtomicLong getCircuitBreakNum() {\n return circuitBreakNum;\n}",
292
- "new_production_code": "public int getCircuitBreakNum() {\n return circuitBreakNum;\n}",
293
- "focal_file_path": "fizz-core/src/main/java/we/stats/TimeSlot.java",
294
- "focal_method_sign": "we/stats/TimeSlot.getCircuitBreakNum:()I",
295
- "focal_all_deps_scored": [
296
- {
297
- "dep_id": 1,
298
- "method_sign": "we/stats/TimeSlot.getCircuitBreakNum:()I",
299
- "file_path_old": "fizz-core/src/main/java/we/stats/TimeSlot.java",
300
- "line_nums_old": "122-124",
301
- "file_path_new": "fizz-core/src/main/java/we/stats/TimeSlot.java",
302
- "line_nums_new": "130-132",
303
- "dependency_updated": "updated",
304
- "score": 0.1293,
305
- "signal_scores": {
306
- "nc": 0.0,
307
- "lcs_u": 0.2778,
308
- "ed": 0.2778,
309
- "class": 0.0,
310
- "tfidf": 0.1467
311
- }
312
- },
313
- {
314
- "dep_id": 3,
315
- "method_sign": "we/stats/TimeSlot.getErrors:()Ljava/util/concurrent/atomic/AtomicLong",
316
- "file_path_old": "fizz-core/src/main/java/we/stats/TimeSlot.java",
317
- "line_nums_old": "225-227",
318
- "file_path_new": "fizz-core/src/main/java/we/stats/TimeSlot.java",
319
- "line_nums_new": "262-264",
320
- "dependency_updated": "updated",
321
- "score": 0.1284,
322
- "signal_scores": {
323
- "nc": 0.0,
324
- "lcs_u": 0.4444,
325
- "ed": 0.2,
326
- "class": 0.0,
327
- "tfidf": 0.0725
328
- }
329
- },
330
- {
331
- "dep_id": 2,
332
- "method_sign": "we/stats/TimeSlot.setErrors:(I)V",
333
- "file_path_old": "fizz-core/src/main/java/we/stats/TimeSlot.java",
334
- "line_nums_old": "229-231",
335
- "file_path_new": "fizz-core/src/main/java/we/stats/TimeSlot.java",
336
- "line_nums_new": "266-268",
337
- "dependency_updated": "updated",
338
- "score": 0.1226,
339
- "signal_scores": {
340
- "nc": 0.0,
341
- "lcs_u": 0.4444,
342
- "ed": 0.2,
343
- "class": 0.0,
344
- "tfidf": 0.0476
345
- }
346
- },
347
- {
348
- "dep_id": 0,
349
- "method_sign": "we/stats/TimeSlot.getCompReqs:()Ljava/util/concurrent/atomic/AtomicLong",
350
- "file_path_old": "fizz-core/src/main/java/we/stats/TimeSlot.java",
351
- "line_nums_old": "241-243",
352
- "file_path_new": "fizz-core/src/main/java/we/stats/TimeSlot.java",
353
- "line_nums_new": "282-284",
354
- "dependency_updated": "updated",
355
- "score": 0.1112,
356
- "signal_scores": {
357
- "nc": 0.0,
358
- "lcs_u": 0.3636,
359
- "ed": 0.1818,
360
- "class": 0.0,
361
- "tfidf": 0.0725
362
- }
363
- },
364
- {
365
- "dep_id": 5,
366
- "method_sign": "we/stats/TimeSlot.setCompReqs:(I)V",
367
- "file_path_old": "fizz-core/src/main/java/we/stats/TimeSlot.java",
368
- "line_nums_old": "245-247",
369
- "file_path_new": "fizz-core/src/main/java/we/stats/TimeSlot.java",
370
- "line_nums_new": "286-288",
371
- "dependency_updated": "updated",
372
- "score": 0.1053,
373
- "signal_scores": {
374
- "nc": 0.0,
375
- "lcs_u": 0.3636,
376
- "ed": 0.1818,
377
- "class": 0.0,
378
- "tfidf": 0.0476
379
- }
380
- },
381
- {
382
- "dep_id": 4,
383
- "method_sign": "we/stats/FlowStat$PeakConcurrentJob.run:()V",
384
- "file_path_old": "fizz-core/src/main/java/we/stats/FlowStat.java",
385
- "line_nums_old": "599-629",
386
- "file_path_new": "fizz-core/src/main/java/we/stats/FlowStat.java",
387
- "line_nums_new": "633-666",
388
- "dependency_updated": "updated",
389
- "score": 0.0773,
390
- "signal_scores": {
391
- "nc": 0.0,
392
- "lcs_u": 0.3333,
393
- "ed": 0.1,
394
- "class": 0.0,
395
- "tfidf": 0.0085
396
- }
397
- }
398
- ],
399
- "coverage_gold": 0.6507936507936508,
400
- "branch_coverage_gold": 0.9143,
401
- "method_coverage_gold": 3.2514,
402
- "line_coverage_gold": 2.7606,
403
- "is_traceback": false,
404
- "commit_gap": {
405
- "count": 0,
406
- "skipped_commits": []
407
- },
408
- "test_is_refactoring_only": false,
409
- "has_test_dep_change": false,
410
- "all_deps_new": [
411
- "we/stats/ResourceStat.getTimeSlot:(J)Lwe/stats/TimeSlot",
412
- "we/stats/FlowStat$PeakConcurrentJob.run:()V",
413
- "we/stats/TimeSlot.getCircuitBreakNum:()I",
414
- "we/stats/TimeSlot.getCircuitBreakState:()Ljava/util/concurrent/atomic/AtomicReference",
415
- "we/stats/FlowStat.getResourceStat:(Ljava/lang/String;)Lwe/stats/ResourceStat",
416
- "we/stats/circuitbreaker/CircuitBreakManager.permit:(Lorg/springframework/web/server/ServerWebExchange;JLwe/stats/FlowStat;Ljava/lang/String;Ljava/lang/String;)Z",
417
- "we/util/ResourceIdUtils.buildResourceId:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String",
418
- "we/stats/circuitbreaker/CircuitBreakManager.getResource2circuitBreakerMap:()Ljava/util/Map",
419
- "we/stats/TimeSlot.setErrors:(I)V",
420
- "we/stats/FlowStat.currentTimeSlotId:()J",
421
- "we/stats/TimeSlot.setCompReqs:(I)V"
422
- ],
423
- "all_deps_old": [
424
- "we/stats/TimeSlot.getCircuitBreakState:()Ljava/util/concurrent/atomic/AtomicReference",
425
- "we/stats/FlowStat$PeakConcurrentJob.run:()V",
426
- "we/util/ResourceIdUtils.buildResourceId:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String",
427
- "we/stats/circuitbreaker/CircuitBreakManager.getResource2circuitBreakerMap:()Ljava/util/Map",
428
- "we/stats/ResourceStat.getTimeSlot:(J)Lwe/stats/TimeSlot",
429
- "we/stats/FlowStat.getResourceStat:(Ljava/lang/String;)Lwe/stats/ResourceStat",
430
- "we/stats/TimeSlot.getErrors:()Ljava/util/concurrent/atomic/AtomicLong",
431
- "we/stats/FlowStat.currentTimeSlotId:()J",
432
- "we/stats/TimeSlot.getCompReqs:()Ljava/util/concurrent/atomic/AtomicLong",
433
- "we/stats/TimeSlot.getCircuitBreakNum:()Ljava/util/concurrent/atomic/AtomicLong",
434
- "we/stats/circuitbreaker/CircuitBreakManager.permit:(Lorg/springframework/web/server/ServerWebExchange;JLwe/stats/FlowStat;Ljava/lang/String;Ljava/lang/String;)Z"
435
- ],
436
- "deps_changes": [
437
- {
438
- "method_sign": "we/stats/TimeSlot.getCompReqs:()Ljava/util/concurrent/atomic/AtomicLong",
439
- "change_type": "UPDATE",
440
- "file_path_old": "fizz-core/src/main/java/we/stats/TimeSlot.java",
441
- "file_path_new": "fizz-core/src/main/java/we/stats/TimeSlot.java",
442
- "source": "production",
443
- "is_test_dependency": false,
444
- "is_refactoring_only": false
445
- },
446
- {
447
- "method_sign": "we/stats/TimeSlot.getCircuitBreakNum:()I",
448
- "change_type": "UPDATE",
449
- "file_path_old": "fizz-core/src/main/java/we/stats/TimeSlot.java",
450
- "file_path_new": "fizz-core/src/main/java/we/stats/TimeSlot.java",
451
- "source": "production",
452
- "is_test_dependency": false,
453
- "is_refactoring_only": false
454
- },
455
- {
456
- "method_sign": "we/stats/TimeSlot.setErrors:(I)V",
457
- "change_type": "UPDATE",
458
- "file_path_old": "fizz-core/src/main/java/we/stats/TimeSlot.java",
459
- "file_path_new": "fizz-core/src/main/java/we/stats/TimeSlot.java",
460
- "source": "production",
461
- "is_test_dependency": false,
462
- "is_refactoring_only": false
463
- },
464
- {
465
- "method_sign": "we/stats/TimeSlot.getErrors:()Ljava/util/concurrent/atomic/AtomicLong",
466
- "change_type": "UPDATE",
467
- "file_path_old": "fizz-core/src/main/java/we/stats/TimeSlot.java",
468
- "file_path_new": "fizz-core/src/main/java/we/stats/TimeSlot.java",
469
- "source": "production",
470
- "is_test_dependency": false,
471
- "is_refactoring_only": false
472
- },
473
- {
474
- "method_sign": "we/stats/FlowStat$PeakConcurrentJob.run:()V",
475
- "change_type": "UPDATE",
476
- "file_path_old": "fizz-core/src/main/java/we/stats/FlowStat.java",
477
- "file_path_new": "fizz-core/src/main/java/we/stats/FlowStat.java",
478
- "source": "production",
479
- "is_test_dependency": false,
480
- "is_refactoring_only": false
481
- },
482
- {
483
- "method_sign": "we/stats/TimeSlot.setCompReqs:(I)V",
484
- "change_type": "UPDATE",
485
- "file_path_old": "fizz-core/src/main/java/we/stats/TimeSlot.java",
486
- "file_path_new": "fizz-core/src/main/java/we/stats/TimeSlot.java",
487
- "source": "production",
488
- "is_test_dependency": false,
489
- "is_refactoring_only": false
490
- }
491
- ],
492
- "variant_result": {
493
- "old_on_old": "pass",
494
- "old_on_new": "error",
495
- "new_on_old": "error",
496
- "new_on_new": "pass"
497
- }
498
- }
499
- ],
500
- "version": "v3.1.0",
501
- "java_version": 11
502
- }
503
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fusesource_jansi-jansi-2.4.2.json DELETED
@@ -1,221 +0,0 @@
1
- [
2
- {
3
- "task_id": "fusesource_jansi-jansi-2.4.2__aa0c419_4d24cd8__EncodingTest_991a00f0",
4
- "project_name": "fusesource_jansi-jansi-2.4.2",
5
- "git_clone_url": "https://github.com/fusesource/jansi.git",
6
- "rev1": "aa0c4194b41f6ee0aeb83922d4cc39f585df78ac",
7
- "rev2": "4d24cd8e62556c8a3254c9a31831e72143f17910",
8
- "rev1_date": "2020-10-25T07:50:03Z",
9
- "rev2_date": "2020-10-25T07:50:12Z",
10
- "git_diff_url": "https://github.com/fusesource/jansi/compare/aa0c4194b41f6ee0aeb83922d4cc39f585df78ac...4d24cd8e62556c8a3254c9a31831e72143f17910",
11
- "test_file": "jansi/src/test/java/org/fusesource/jansi/EncodingTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "2_fusesource_jansi-jansi-2.4.2_aa0c419_4d24cd8_EncodingTest",
15
- "test_sign": "org/fusesource/jansi/EncodingTest.testEncodingUtf8:()V",
16
- "class": "EncodingTest",
17
- "method": "testEncodingUtf8",
18
- "module": "jansi",
19
- "junit_selector": "org.fusesource.jansi.EncodingTest#testEncodingUtf8",
20
- "old_test_code": "@Test\npublic void testEncodingUtf8() throws UnsupportedEncodingException {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n final AtomicReference<String> newLabel = new AtomicReference<String>();\n PrintStream ansi = new PrintStream(new AnsiNoSyncOutputStream(baos, new AnsiProcessor(baos) {\n\n @Override\n protected void processChangeWindowTitle(String label) {\n newLabel.set(label);\n }\n }, \"UTF-8\"), true, \"UTF-8\");\n ansi.print(\"\\033]0;\u3072\u3089\u304c\u306a\\007\");\n ansi.flush();\n assertEquals(\"\u3072\u3089\u304c\u306a\", newLabel.get());\n}",
21
- "new_test_code": "@Test\npublic void testEncodingUtf8() throws UnsupportedEncodingException {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n final AtomicReference<String> newLabel = new AtomicReference<String>();\n PrintStream ansi = new PrintStream(new AnsiOutputStream(baos, new AnsiProcessor(baos) {\n\n @Override\n protected void processChangeWindowTitle(String label) {\n newLabel.set(label);\n }\n }, \"UTF-8\"), true, \"UTF-8\");\n ansi.print(\"\\033]0;\u3072\u3089\u304c\u306a\\007\");\n ansi.flush();\n assertEquals(\"\u3072\u3089\u304c\u306a\", newLabel.get());\n}",
22
- "old_test_file_path": [
23
- "jansi/src/test/java/org/fusesource/jansi/EncodingTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "44-58"
27
- ],
28
- "new_test_lnum": [
29
- "44-58"
30
- ],
31
- "old_production_code": "@Override\npublic synchronized void write(int data) throws IOException {\n switch(state) {\n case LOOKING_FOR_FIRST_ESC_CHAR:\n if (data == FIRST_ESC_CHAR) {\n buffer[pos++] = (byte) data;\n state = LOOKING_FOR_SECOND_ESC_CHAR;\n } else {\n out.write(data);\n }\n break;\n case LOOKING_FOR_SECOND_ESC_CHAR:\n buffer[pos++] = (byte) data;\n if (data == SECOND_ESC_CHAR) {\n state = LOOKING_FOR_NEXT_ARG;\n } else if (data == SECOND_OSC_CHAR) {\n state = LOOKING_FOR_OSC_COMMAND;\n } else if (data == SECOND_CHARSET0_CHAR) {\n options.add(0);\n state = LOOKING_FOR_CHARSET;\n } else if (data == SECOND_CHARSET1_CHAR) {\n options.add(1);\n state = LOOKING_FOR_CHARSET;\n } else {\n reset(false);\n }\n break;\n case LOOKING_FOR_NEXT_ARG:\n buffer[pos++] = (byte) data;\n if ('\"' == data) {\n startOfValue = pos - 1;\n state = LOOKING_FOR_STR_ARG_END;\n } else if ('0' <= data && data <= '9') {\n startOfValue = pos - 1;\n state = LOOKING_FOR_INT_ARG_END;\n } else if (';' == data) {\n options.add(null);\n } else if ('?' == data) {\n options.add('?');\n } else if ('=' == data) {\n options.add('=');\n } else {\n reset(ap.processEscapeCommand(options, data));\n }\n break;\n default:\n break;\n case LOOKING_FOR_INT_ARG_END:\n buffer[pos++] = (byte) data;\n if (!('0' <= data && data <= '9')) {\n String strValue = new String(buffer, startOfValue, (pos - 1) - startOfValue, Charset.defaultCharset());\n Integer value = Integer.valueOf(strValue);\n options.add(value);\n if (data == ';') {\n state = LOOKING_FOR_NEXT_ARG;\n } else {\n reset(ap.processEscapeCommand(options, data));\n }\n }\n break;\n case LOOKING_FOR_STR_ARG_END:\n buffer[pos++] = (byte) data;\n if ('\"' != data) {\n String value = new String(buffer, startOfValue, (pos - 1) - startOfValue, Charset.defaultCharset());\n options.add(value);\n if (data == ';') {\n state = LOOKING_FOR_NEXT_ARG;\n } else {\n reset(ap.processEscapeCommand(options, data));\n }\n }\n break;\n case LOOKING_FOR_OSC_COMMAND:\n buffer[pos++] = (byte) data;\n if ('0' <= data && data <= '9') {\n startOfValue = pos - 1;\n state = LOOKING_FOR_OSC_COMMAND_END;\n } else {\n reset(false);\n }\n break;\n case LOOKING_FOR_OSC_COMMAND_END:\n buffer[pos++] = (byte) data;\n if (';' == data) {\n String strValue = new String(buffer, startOfValue, (pos - 1) - startOfValue, Charset.defaultCharset());\n Integer value = Integer.valueOf(strValue);\n options.add(value);\n startOfValue = pos;\n state = LOOKING_FOR_OSC_PARAM;\n } else if ('0' <= data && data <= '9') {\n } else {\n reset(false);\n }\n break;\n case LOOKING_FOR_OSC_PARAM:\n buffer[pos++] = (byte) data;\n if (BEL == data) {\n String value = new String(buffer, startOfValue, (pos - 1) - startOfValue, Charset.defaultCharset());\n options.add(value);\n reset(ap.processOperatingSystemCommand(options));\n } else if (FIRST_ESC_CHAR == data) {\n state = LOOKING_FOR_ST;\n } else {\n }\n break;\n case LOOKING_FOR_ST:\n buffer[pos++] = (byte) data;\n if (SECOND_ST_CHAR == data) {\n String value = new String(buffer, startOfValue, (pos - 2) - startOfValue, Charset.defaultCharset());\n options.add(value);\n reset(ap.processOperatingSystemCommand(options));\n } else {\n state = LOOKING_FOR_OSC_PARAM;\n }\n break;\n case LOOKING_FOR_CHARSET:\n options.add((char) data);\n reset(ap.processCharsetSelect(options));\n break;\n }\n if (pos >= buffer.length) {\n reset(false);\n }\n}",
32
- "new_production_code": "@Override\npublic void write(int data) throws IOException {\n switch(state) {\n case LOOKING_FOR_FIRST_ESC_CHAR:\n if (data == FIRST_ESC_CHAR) {\n buffer[pos++] = (byte) data;\n state = LOOKING_FOR_SECOND_ESC_CHAR;\n } else {\n out.write(data);\n }\n break;\n case LOOKING_FOR_SECOND_ESC_CHAR:\n buffer[pos++] = (byte) data;\n if (data == SECOND_ESC_CHAR) {\n state = LOOKING_FOR_NEXT_ARG;\n } else if (data == SECOND_OSC_CHAR) {\n state = LOOKING_FOR_OSC_COMMAND;\n } else if (data == SECOND_CHARSET0_CHAR) {\n options.add(0);\n state = LOOKING_FOR_CHARSET;\n } else if (data == SECOND_CHARSET1_CHAR) {\n options.add(1);\n state = LOOKING_FOR_CHARSET;\n } else {\n reset(false);\n }\n break;\n case LOOKING_FOR_NEXT_ARG:\n buffer[pos++] = (byte) data;\n if ('\"' == data) {\n startOfValue = pos - 1;\n state = LOOKING_FOR_STR_ARG_END;\n } else if ('0' <= data && data <= '9') {\n startOfValue = pos - 1;\n state = LOOKING_FOR_INT_ARG_END;\n } else if (';' == data) {\n options.add(null);\n } else if ('?' == data) {\n options.add('?');\n } else if ('=' == data) {\n options.add('=');\n } else {\n reset(ap.processEscapeCommand(options, data));\n }\n break;\n default:\n break;\n case LOOKING_FOR_INT_ARG_END:\n buffer[pos++] = (byte) data;\n if (!('0' <= data && data <= '9')) {\n String strValue = new String(buffer, startOfValue, (pos - 1) - startOfValue);\n Integer value = Integer.valueOf(strValue);\n options.add(value);\n if (data == ';') {\n state = LOOKING_FOR_NEXT_ARG;\n } else {\n reset(ap.processEscapeCommand(options, data));\n }\n }\n break;\n case LOOKING_FOR_STR_ARG_END:\n buffer[pos++] = (byte) data;\n if ('\"' != data) {\n String value = new String(buffer, startOfValue, (pos - 1) - startOfValue, cs);\n options.add(value);\n if (data == ';') {\n state = LOOKING_FOR_NEXT_ARG;\n } else {\n reset(ap.processEscapeCommand(options, data));\n }\n }\n break;\n case LOOKING_FOR_OSC_COMMAND:\n buffer[pos++] = (byte) data;\n if ('0' <= data && data <= '9') {\n startOfValue = pos - 1;\n state = LOOKING_FOR_OSC_COMMAND_END;\n } else {\n reset(false);\n }\n break;\n case LOOKING_FOR_OSC_COMMAND_END:\n buffer[pos++] = (byte) data;\n if (';' == data) {\n String strValue = new String(buffer, startOfValue, (pos - 1) - startOfValue);\n Integer value = Integer.valueOf(strValue);\n options.add(value);\n startOfValue = pos;\n state = LOOKING_FOR_OSC_PARAM;\n } else if ('0' <= data && data <= '9') {\n } else {\n reset(false);\n }\n break;\n case LOOKING_FOR_OSC_PARAM:\n buffer[pos++] = (byte) data;\n if (BEL == data) {\n String value = new String(buffer, startOfValue, (pos - 1) - startOfValue, cs);\n options.add(value);\n reset(ap.processOperatingSystemCommand(options));\n } else if (FIRST_ESC_CHAR == data) {\n state = LOOKING_FOR_ST;\n } else {\n }\n break;\n case LOOKING_FOR_ST:\n buffer[pos++] = (byte) data;\n if (SECOND_ST_CHAR == data) {\n String value = new String(buffer, startOfValue, (pos - 2) - startOfValue, cs);\n options.add(value);\n reset(ap.processOperatingSystemCommand(options));\n } else {\n state = LOOKING_FOR_OSC_PARAM;\n }\n break;\n case LOOKING_FOR_CHARSET:\n options.add((char) data);\n reset(ap.processCharsetSelect(options));\n break;\n }\n if (pos >= buffer.length) {\n reset(false);\n }\n}",
33
- "focal_file_path": "jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java",
34
- "focal_method_sign": "org/fusesource/jansi/AnsiOutputStream.write:(I)V",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "org/fusesource/jansi/AnsiOutputStream.write:(I)V",
39
- "file_path_old": "jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java",
40
- "line_nums_old": "85-222",
41
- "file_path_new": "jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java",
42
- "line_nums_new": "87-224",
43
- "dependency_updated": "updated",
44
- "score": 0.098,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 0.4,
48
- "ed": 0.1667,
49
- "class": 0.0,
50
- "tfidf": 0.0
51
- }
52
- },
53
- {
54
- "dep_id": 1,
55
- "method_sign": "org/fusesource/jansi/AnsiNoSyncOutputStream.write:(I)V",
56
- "file_path_old": "jansi/src/main/java/org/fusesource/jansi/AnsiNoSyncOutputStream.java",
57
- "line_nums_old": "87-224",
58
- "file_path_new": null,
59
- "line_nums_new": null,
60
- "dependency_updated": "deleted",
61
- "score": 0.098,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 0.4,
65
- "ed": 0.1667,
66
- "class": 0.0,
67
- "tfidf": 0.0
68
- }
69
- }
70
- ],
71
- "coverage_gold": 0.3181818181818182,
72
- "branch_coverage_gold": 4.4492,
73
- "method_coverage_gold": 2.8754,
74
- "line_coverage_gold": 4.5113,
75
- "is_traceback": false,
76
- "commit_gap": {
77
- "count": 0,
78
- "skipped_commits": []
79
- },
80
- "test_is_refactoring_only": false,
81
- "has_test_dep_change": false,
82
- "all_deps_new": [
83
- "org/fusesource/jansi/AnsiOutputStream.write:(I)V"
84
- ],
85
- "all_deps_old": [
86
- "org/fusesource/jansi/AnsiNoSyncOutputStream.write:(I)V"
87
- ],
88
- "deps_changes": [
89
- {
90
- "method_sign": "org/fusesource/jansi/AnsiOutputStream.write:(I)V",
91
- "change_type": "UPDATE",
92
- "file_path_old": "jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java",
93
- "file_path_new": "jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java",
94
- "source": "production",
95
- "is_test_dependency": false,
96
- "is_refactoring_only": true
97
- },
98
- {
99
- "method_sign": "org/fusesource/jansi/AnsiNoSyncOutputStream.write:(I)V",
100
- "change_type": "DELETE",
101
- "file_path_old": "jansi/src/main/java/org/fusesource/jansi/AnsiNoSyncOutputStream.java",
102
- "file_path_new": null,
103
- "source": "production",
104
- "is_test_dependency": false,
105
- "is_refactoring_only": false
106
- }
107
- ],
108
- "variant_result": {
109
- "old_on_old": "pass",
110
- "old_on_new": "error",
111
- "new_on_old": "error",
112
- "new_on_new": "pass"
113
- }
114
- },
115
- {
116
- "change_id": "3_fusesource_jansi-jansi-2.4.2_aa0c419_4d24cd8_EncodingTest",
117
- "test_sign": "org/fusesource/jansi/EncodingTest.testEncoding8859:()V",
118
- "class": "EncodingTest",
119
- "method": "testEncoding8859",
120
- "module": "jansi",
121
- "junit_selector": "org.fusesource.jansi.EncodingTest#testEncoding8859",
122
- "old_test_code": "@Test\npublic void testEncoding8859() throws UnsupportedEncodingException {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n final AtomicReference<String> newLabel = new AtomicReference<String>();\n PrintStream ansi = new PrintStream(new AnsiNoSyncOutputStream(baos, new AnsiProcessor(baos) {\n\n @Override\n protected void processChangeWindowTitle(String label) {\n newLabel.set(label);\n }\n }, \"ISO-8859-1\"), true, \"ISO-8859-1\");\n ansi.print(\"\\033]0;un bon caf\u00e9\\007\");\n ansi.flush();\n assertEquals(\"un bon caf\u00e9\", newLabel.get());\n}",
123
- "new_test_code": "@Test\npublic void testEncoding8859() throws UnsupportedEncodingException {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n final AtomicReference<String> newLabel = new AtomicReference<String>();\n PrintStream ansi = new PrintStream(new AnsiOutputStream(baos, new AnsiProcessor(baos) {\n\n @Override\n protected void processChangeWindowTitle(String label) {\n newLabel.set(label);\n }\n }, \"ISO-8859-1\"), true, \"ISO-8859-1\");\n ansi.print(\"\\033]0;un bon caf\u00e9\\007\");\n ansi.flush();\n assertEquals(\"un bon caf\u00e9\", newLabel.get());\n}",
124
- "old_test_file_path": [
125
- "jansi/src/test/java/org/fusesource/jansi/EncodingTest.java"
126
- ],
127
- "old_test_lnum": [
128
- "28-42"
129
- ],
130
- "new_test_lnum": [
131
- "28-42"
132
- ],
133
- "old_production_code": "@Override\npublic synchronized void write(int data) throws IOException {\n switch(state) {\n case LOOKING_FOR_FIRST_ESC_CHAR:\n if (data == FIRST_ESC_CHAR) {\n buffer[pos++] = (byte) data;\n state = LOOKING_FOR_SECOND_ESC_CHAR;\n } else {\n out.write(data);\n }\n break;\n case LOOKING_FOR_SECOND_ESC_CHAR:\n buffer[pos++] = (byte) data;\n if (data == SECOND_ESC_CHAR) {\n state = LOOKING_FOR_NEXT_ARG;\n } else if (data == SECOND_OSC_CHAR) {\n state = LOOKING_FOR_OSC_COMMAND;\n } else if (data == SECOND_CHARSET0_CHAR) {\n options.add(0);\n state = LOOKING_FOR_CHARSET;\n } else if (data == SECOND_CHARSET1_CHAR) {\n options.add(1);\n state = LOOKING_FOR_CHARSET;\n } else {\n reset(false);\n }\n break;\n case LOOKING_FOR_NEXT_ARG:\n buffer[pos++] = (byte) data;\n if ('\"' == data) {\n startOfValue = pos - 1;\n state = LOOKING_FOR_STR_ARG_END;\n } else if ('0' <= data && data <= '9') {\n startOfValue = pos - 1;\n state = LOOKING_FOR_INT_ARG_END;\n } else if (';' == data) {\n options.add(null);\n } else if ('?' == data) {\n options.add('?');\n } else if ('=' == data) {\n options.add('=');\n } else {\n reset(ap.processEscapeCommand(options, data));\n }\n break;\n default:\n break;\n case LOOKING_FOR_INT_ARG_END:\n buffer[pos++] = (byte) data;\n if (!('0' <= data && data <= '9')) {\n String strValue = new String(buffer, startOfValue, (pos - 1) - startOfValue, Charset.defaultCharset());\n Integer value = Integer.valueOf(strValue);\n options.add(value);\n if (data == ';') {\n state = LOOKING_FOR_NEXT_ARG;\n } else {\n reset(ap.processEscapeCommand(options, data));\n }\n }\n break;\n case LOOKING_FOR_STR_ARG_END:\n buffer[pos++] = (byte) data;\n if ('\"' != data) {\n String value = new String(buffer, startOfValue, (pos - 1) - startOfValue, Charset.defaultCharset());\n options.add(value);\n if (data == ';') {\n state = LOOKING_FOR_NEXT_ARG;\n } else {\n reset(ap.processEscapeCommand(options, data));\n }\n }\n break;\n case LOOKING_FOR_OSC_COMMAND:\n buffer[pos++] = (byte) data;\n if ('0' <= data && data <= '9') {\n startOfValue = pos - 1;\n state = LOOKING_FOR_OSC_COMMAND_END;\n } else {\n reset(false);\n }\n break;\n case LOOKING_FOR_OSC_COMMAND_END:\n buffer[pos++] = (byte) data;\n if (';' == data) {\n String strValue = new String(buffer, startOfValue, (pos - 1) - startOfValue, Charset.defaultCharset());\n Integer value = Integer.valueOf(strValue);\n options.add(value);\n startOfValue = pos;\n state = LOOKING_FOR_OSC_PARAM;\n } else if ('0' <= data && data <= '9') {\n } else {\n reset(false);\n }\n break;\n case LOOKING_FOR_OSC_PARAM:\n buffer[pos++] = (byte) data;\n if (BEL == data) {\n String value = new String(buffer, startOfValue, (pos - 1) - startOfValue, Charset.defaultCharset());\n options.add(value);\n reset(ap.processOperatingSystemCommand(options));\n } else if (FIRST_ESC_CHAR == data) {\n state = LOOKING_FOR_ST;\n } else {\n }\n break;\n case LOOKING_FOR_ST:\n buffer[pos++] = (byte) data;\n if (SECOND_ST_CHAR == data) {\n String value = new String(buffer, startOfValue, (pos - 2) - startOfValue, Charset.defaultCharset());\n options.add(value);\n reset(ap.processOperatingSystemCommand(options));\n } else {\n state = LOOKING_FOR_OSC_PARAM;\n }\n break;\n case LOOKING_FOR_CHARSET:\n options.add((char) data);\n reset(ap.processCharsetSelect(options));\n break;\n }\n if (pos >= buffer.length) {\n reset(false);\n }\n}",
134
- "new_production_code": "@Override\npublic void write(int data) throws IOException {\n switch(state) {\n case LOOKING_FOR_FIRST_ESC_CHAR:\n if (data == FIRST_ESC_CHAR) {\n buffer[pos++] = (byte) data;\n state = LOOKING_FOR_SECOND_ESC_CHAR;\n } else {\n out.write(data);\n }\n break;\n case LOOKING_FOR_SECOND_ESC_CHAR:\n buffer[pos++] = (byte) data;\n if (data == SECOND_ESC_CHAR) {\n state = LOOKING_FOR_NEXT_ARG;\n } else if (data == SECOND_OSC_CHAR) {\n state = LOOKING_FOR_OSC_COMMAND;\n } else if (data == SECOND_CHARSET0_CHAR) {\n options.add(0);\n state = LOOKING_FOR_CHARSET;\n } else if (data == SECOND_CHARSET1_CHAR) {\n options.add(1);\n state = LOOKING_FOR_CHARSET;\n } else {\n reset(false);\n }\n break;\n case LOOKING_FOR_NEXT_ARG:\n buffer[pos++] = (byte) data;\n if ('\"' == data) {\n startOfValue = pos - 1;\n state = LOOKING_FOR_STR_ARG_END;\n } else if ('0' <= data && data <= '9') {\n startOfValue = pos - 1;\n state = LOOKING_FOR_INT_ARG_END;\n } else if (';' == data) {\n options.add(null);\n } else if ('?' == data) {\n options.add('?');\n } else if ('=' == data) {\n options.add('=');\n } else {\n reset(ap.processEscapeCommand(options, data));\n }\n break;\n default:\n break;\n case LOOKING_FOR_INT_ARG_END:\n buffer[pos++] = (byte) data;\n if (!('0' <= data && data <= '9')) {\n String strValue = new String(buffer, startOfValue, (pos - 1) - startOfValue);\n Integer value = Integer.valueOf(strValue);\n options.add(value);\n if (data == ';') {\n state = LOOKING_FOR_NEXT_ARG;\n } else {\n reset(ap.processEscapeCommand(options, data));\n }\n }\n break;\n case LOOKING_FOR_STR_ARG_END:\n buffer[pos++] = (byte) data;\n if ('\"' != data) {\n String value = new String(buffer, startOfValue, (pos - 1) - startOfValue, cs);\n options.add(value);\n if (data == ';') {\n state = LOOKING_FOR_NEXT_ARG;\n } else {\n reset(ap.processEscapeCommand(options, data));\n }\n }\n break;\n case LOOKING_FOR_OSC_COMMAND:\n buffer[pos++] = (byte) data;\n if ('0' <= data && data <= '9') {\n startOfValue = pos - 1;\n state = LOOKING_FOR_OSC_COMMAND_END;\n } else {\n reset(false);\n }\n break;\n case LOOKING_FOR_OSC_COMMAND_END:\n buffer[pos++] = (byte) data;\n if (';' == data) {\n String strValue = new String(buffer, startOfValue, (pos - 1) - startOfValue);\n Integer value = Integer.valueOf(strValue);\n options.add(value);\n startOfValue = pos;\n state = LOOKING_FOR_OSC_PARAM;\n } else if ('0' <= data && data <= '9') {\n } else {\n reset(false);\n }\n break;\n case LOOKING_FOR_OSC_PARAM:\n buffer[pos++] = (byte) data;\n if (BEL == data) {\n String value = new String(buffer, startOfValue, (pos - 1) - startOfValue, cs);\n options.add(value);\n reset(ap.processOperatingSystemCommand(options));\n } else if (FIRST_ESC_CHAR == data) {\n state = LOOKING_FOR_ST;\n } else {\n }\n break;\n case LOOKING_FOR_ST:\n buffer[pos++] = (byte) data;\n if (SECOND_ST_CHAR == data) {\n String value = new String(buffer, startOfValue, (pos - 2) - startOfValue, cs);\n options.add(value);\n reset(ap.processOperatingSystemCommand(options));\n } else {\n state = LOOKING_FOR_OSC_PARAM;\n }\n break;\n case LOOKING_FOR_CHARSET:\n options.add((char) data);\n reset(ap.processCharsetSelect(options));\n break;\n }\n if (pos >= buffer.length) {\n reset(false);\n }\n}",
135
- "focal_file_path": "jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java",
136
- "focal_method_sign": "org/fusesource/jansi/AnsiOutputStream.write:(I)V",
137
- "focal_all_deps_scored": [
138
- {
139
- "dep_id": 0,
140
- "method_sign": "org/fusesource/jansi/AnsiOutputStream.write:(I)V",
141
- "file_path_old": "jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java",
142
- "line_nums_old": "85-222",
143
- "file_path_new": "jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java",
144
- "line_nums_new": "87-224",
145
- "dependency_updated": "updated",
146
- "score": 0.049,
147
- "signal_scores": {
148
- "nc": 0.0,
149
- "lcs_u": 0.2,
150
- "ed": 0.0833,
151
- "class": 0.0,
152
- "tfidf": 0.0
153
- }
154
- },
155
- {
156
- "dep_id": 1,
157
- "method_sign": "org/fusesource/jansi/AnsiNoSyncOutputStream.write:(I)V",
158
- "file_path_old": "jansi/src/main/java/org/fusesource/jansi/AnsiNoSyncOutputStream.java",
159
- "line_nums_old": "87-224",
160
- "file_path_new": null,
161
- "line_nums_new": null,
162
- "dependency_updated": "deleted",
163
- "score": 0.049,
164
- "signal_scores": {
165
- "nc": 0.0,
166
- "lcs_u": 0.2,
167
- "ed": 0.0833,
168
- "class": 0.0,
169
- "tfidf": 0.0
170
- }
171
- }
172
- ],
173
- "coverage_gold": 0.3181818181818182,
174
- "branch_coverage_gold": 4.4492,
175
- "method_coverage_gold": 2.8754,
176
- "line_coverage_gold": 4.5113,
177
- "is_traceback": false,
178
- "commit_gap": {
179
- "count": 0,
180
- "skipped_commits": []
181
- },
182
- "test_is_refactoring_only": false,
183
- "has_test_dep_change": false,
184
- "all_deps_new": [
185
- "org/fusesource/jansi/AnsiOutputStream.write:(I)V"
186
- ],
187
- "all_deps_old": [
188
- "org/fusesource/jansi/AnsiNoSyncOutputStream.write:(I)V"
189
- ],
190
- "deps_changes": [
191
- {
192
- "method_sign": "org/fusesource/jansi/AnsiOutputStream.write:(I)V",
193
- "change_type": "UPDATE",
194
- "file_path_old": "jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java",
195
- "file_path_new": "jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java",
196
- "source": "production",
197
- "is_test_dependency": false,
198
- "is_refactoring_only": true
199
- },
200
- {
201
- "method_sign": "org/fusesource/jansi/AnsiNoSyncOutputStream.write:(I)V",
202
- "change_type": "DELETE",
203
- "file_path_old": "jansi/src/main/java/org/fusesource/jansi/AnsiNoSyncOutputStream.java",
204
- "file_path_new": null,
205
- "source": "production",
206
- "is_test_dependency": false,
207
- "is_refactoring_only": false
208
- }
209
- ],
210
- "variant_result": {
211
- "old_on_old": "pass",
212
- "old_on_new": "error",
213
- "new_on_old": "error",
214
- "new_on_new": "pass"
215
- }
216
- }
217
- ],
218
- "version": "jansi-2.4.2",
219
- "java_version": 11
220
- }
221
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
gabrie-allaigre_sonar-gitlab-plugin-4.1.0-SNAPSHOT.json DELETED
The diff for this file is too large to render. See raw diff
 
gazbert_bxbot-v1.4.0.json DELETED
@@ -1,276 +0,0 @@
1
- [
2
- {
3
- "task_id": "gazbert_bxbot-v1.4.0__113acc2_0ea9915__TestBotStatus_518495cd",
4
- "project_name": "gazbert_bxbot-v1.4.0",
5
- "git_clone_url": "https://github.com/gazbert/bxbot.git",
6
- "rev1": "113acc26facfecdbf4a33fc37f45b55d51694644",
7
- "rev2": "0ea9915798e1beb20df4136802d8f64e61280fa6",
8
- "rev1_date": "2020-04-04T13:15:23Z",
9
- "rev2_date": "2020-04-04T18:20:04Z",
10
- "git_diff_url": "https://github.com/gazbert/bxbot/compare/113acc26facfecdbf4a33fc37f45b55d51694644...0ea9915798e1beb20df4136802d8f64e61280fa6",
11
- "test_file": "bxbot-domain-objects/src/test/java/com/gazbert/bxbot/domain/bot/TestBotStatus.java",
12
- "test_changes": [
13
- {
14
- "change_id": "3_gazbert_bxbot-v1.4.0_113acc2_0ea9915_TestBotStatus",
15
- "test_sign": "com/gazbert/bxbot/domain/bot/TestBotStatus.testSettersWorkAsExpected:()V",
16
- "class": "TestBotStatus",
17
- "method": "testSettersWorkAsExpected",
18
- "module": "bxbot-domain-objects",
19
- "junit_selector": "com.gazbert.bxbot.domain.bot.TestBotStatus#testSettersWorkAsExpected",
20
- "old_test_code": "@Test\npublic void testSettersWorkAsExpected() {\n final BotStatus botStatus = new BotStatus();\n assertNull(botStatus.getBotId());\n assertNull(botStatus.getDisplayName());\n assertNull(botStatus.getStatus());\n botStatus.setBotId(BOT_ID);\n assertEquals(BOT_ID, botStatus.getBotId());\n botStatus.setDisplayName(DISPLAY_NAME);\n assertEquals(DISPLAY_NAME, botStatus.getDisplayName());\n botStatus.setStatus(STATUS);\n assertEquals(STATUS, botStatus.getStatus());\n}",
21
- "new_test_code": "@Test\npublic void testSettersWorkAsExpected() {\n final BotStatus botStatus = new BotStatus();\n assertNull(botStatus.getBotId());\n assertNull(botStatus.getDisplayName());\n assertNull(botStatus.getStatus());\n assertNull(botStatus.getDatetime());\n botStatus.setBotId(BOT_ID);\n assertEquals(BOT_ID, botStatus.getBotId());\n botStatus.setDisplayName(DISPLAY_NAME);\n assertEquals(DISPLAY_NAME, botStatus.getDisplayName());\n botStatus.setStatus(STATUS);\n assertEquals(STATUS, botStatus.getStatus());\n botStatus.setDatetime(null);\n assertNull(botStatus.getDatetime());\n botStatus.setDatetime(DATE);\n assertEquals(DATE.getTime(), botStatus.getDatetime().getTime());\n}",
22
- "old_test_file_path": [
23
- "bxbot-domain-objects/src/test/java/com/gazbert/bxbot/domain/bot/TestBotStatus.java"
24
- ],
25
- "old_test_lnum": [
26
- "50-65"
27
- ],
28
- "new_test_lnum": [
29
- "60-82"
30
- ],
31
- "old_production_code": "",
32
- "new_production_code": "public Date getDatetime() {\n return datetime != null ? new Date(datetime.getTime()) : null;\n}",
33
- "focal_file_path": "bxbot-domain-objects/src/main/java/com/gazbert/bxbot/domain/bot/BotStatus.java",
34
- "focal_method_sign": "com/gazbert/bxbot/domain/bot/BotStatus.getDatetime:()Ljava/util/Date",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 1,
38
- "method_sign": "com/gazbert/bxbot/domain/bot/BotStatus.getDatetime:()Ljava/util/Date",
39
- "file_path_old": null,
40
- "line_nums_old": null,
41
- "file_path_new": "bxbot-domain-objects/src/main/java/com/gazbert/bxbot/domain/bot/BotStatus.java",
42
- "line_nums_new": "82-84",
43
- "dependency_updated": "inserted",
44
- "score": 0.3977,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 0.5455,
48
- "ed": 0.2381,
49
- "class": 1.0,
50
- "tfidf": 0.3146
51
- }
52
- },
53
- {
54
- "dep_id": 0,
55
- "method_sign": "com/gazbert/bxbot/domain/bot/BotStatus.setDatetime:(Ljava/util/Date;)V",
56
- "file_path_old": null,
57
- "line_nums_old": null,
58
- "file_path_new": "bxbot-domain-objects/src/main/java/com/gazbert/bxbot/domain/bot/BotStatus.java",
59
- "line_nums_new": "86-88",
60
- "dependency_updated": "inserted",
61
- "score": 0.3961,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 0.6364,
65
- "ed": 0.2857,
66
- "class": 1.0,
67
- "tfidf": 0.2063
68
- }
69
- }
70
- ],
71
- "coverage_gold": 1.0,
72
- "branch_coverage_gold": 18.1818,
73
- "method_coverage_gold": 8.6538,
74
- "line_coverage_gold": 5.4264,
75
- "is_traceback": false,
76
- "commit_gap": {
77
- "count": 0,
78
- "skipped_commits": []
79
- },
80
- "test_is_refactoring_only": false,
81
- "has_test_dep_change": false,
82
- "all_deps_new": [
83
- "com/gazbert/bxbot/domain/bot/BotStatus.getStatus:()Ljava/lang/String",
84
- "com/gazbert/bxbot/domain/bot/BotStatus.setDatetime:(Ljava/util/Date;)V",
85
- "com/gazbert/bxbot/domain/bot/BotStatus.setStatus:(Ljava/lang/String;)V",
86
- "com/gazbert/bxbot/domain/bot/BotStatus.setDisplayName:(Ljava/lang/String;)V",
87
- "com/gazbert/bxbot/domain/bot/BotStatus.getDisplayName:()Ljava/lang/String",
88
- "com/gazbert/bxbot/domain/bot/BotStatus.setBotId:(Ljava/lang/String;)V",
89
- "com/gazbert/bxbot/domain/bot/BotStatus.getBotId:()Ljava/lang/String",
90
- "com/gazbert/bxbot/domain/bot/BotStatus.getDatetime:()Ljava/util/Date"
91
- ],
92
- "all_deps_old": [
93
- "com/gazbert/bxbot/domain/bot/BotStatus.setBotId:(Ljava/lang/String;)V",
94
- "com/gazbert/bxbot/domain/bot/BotStatus.getBotId:()Ljava/lang/String",
95
- "com/gazbert/bxbot/domain/bot/BotStatus.getDisplayName:()Ljava/lang/String",
96
- "com/gazbert/bxbot/domain/bot/BotStatus.setDisplayName:(Ljava/lang/String;)V",
97
- "com/gazbert/bxbot/domain/bot/BotStatus.setStatus:(Ljava/lang/String;)V",
98
- "com/gazbert/bxbot/domain/bot/BotStatus.getStatus:()Ljava/lang/String"
99
- ],
100
- "deps_changes": [
101
- {
102
- "method_sign": "com/gazbert/bxbot/domain/bot/BotStatus.setDatetime:(Ljava/util/Date;)V",
103
- "change_type": "ADD",
104
- "file_path_old": null,
105
- "file_path_new": "bxbot-domain-objects/src/main/java/com/gazbert/bxbot/domain/bot/BotStatus.java",
106
- "source": "production",
107
- "is_test_dependency": false,
108
- "is_refactoring_only": false
109
- },
110
- {
111
- "method_sign": "com/gazbert/bxbot/domain/bot/BotStatus.getDatetime:()Ljava/util/Date",
112
- "change_type": "ADD",
113
- "file_path_old": null,
114
- "file_path_new": "bxbot-domain-objects/src/main/java/com/gazbert/bxbot/domain/bot/BotStatus.java",
115
- "source": "production",
116
- "is_test_dependency": false,
117
- "is_refactoring_only": false
118
- }
119
- ],
120
- "variant_result": {
121
- "old_on_old": "pass",
122
- "old_on_new": "error",
123
- "new_on_old": "error",
124
- "new_on_new": "pass"
125
- }
126
- },
127
- {
128
- "change_id": "4_gazbert_bxbot-v1.4.0_113acc2_0ea9915_TestBotStatus",
129
- "test_sign": "com/gazbert/bxbot/domain/bot/TestBotStatus.testToStringWorksAsExpected:()V",
130
- "class": "TestBotStatus",
131
- "method": "testToStringWorksAsExpected",
132
- "module": "bxbot-domain-objects",
133
- "junit_selector": "com.gazbert.bxbot.domain.bot.TestBotStatus#testToStringWorksAsExpected",
134
- "old_test_code": "@Test\npublic void testToStringWorksAsExpected() {\n final BotStatus botStatus = new BotStatus(BOT_ID, DISPLAY_NAME, STATUS);\n assertEquals(\"BotStatus{botId=avro-707_1, displayName=Avro 707, status=running}\", botStatus.toString());\n}",
135
- "new_test_code": "@Test\npublic void testToStringWorksAsExpected() {\n final BotStatus botStatus = new BotStatus(BOT_ID, DISPLAY_NAME, STATUS, DATE);\n assertTrue(botStatus.toString().startsWith(\"BotStatus{botId=avro-707_1, displayName=Avro 707, status=running, datetime=\"));\n}",
136
- "old_test_file_path": [
137
- "bxbot-domain-objects/src/test/java/com/gazbert/bxbot/domain/bot/TestBotStatus.java"
138
- ],
139
- "old_test_lnum": [
140
- "67-72"
141
- ],
142
- "new_test_lnum": [
143
- "84-89"
144
- ],
145
- "old_production_code": "@Override\npublic String toString() {\n return MoreObjects.toStringHelper(this).add(\"botId\", botId).add(\"displayName\", displayName).add(\"status\", status).toString();\n}",
146
- "new_production_code": "@Override\npublic String toString() {\n return MoreObjects.toStringHelper(this).add(\"botId\", botId).add(\"displayName\", displayName).add(\"status\", status).add(\"datetime\", getDatetime()).toString();\n}",
147
- "focal_file_path": "bxbot-domain-objects/src/main/java/com/gazbert/bxbot/domain/bot/BotStatus.java",
148
- "focal_method_sign": "com/gazbert/bxbot/domain/bot/BotStatus.toString:()Ljava/lang/String",
149
- "focal_all_deps_scored": [
150
- {
151
- "dep_id": 0,
152
- "method_sign": "com/gazbert/bxbot/domain/bot/BotStatus.toString:()Ljava/lang/String",
153
- "file_path_old": "bxbot-domain-objects/src/main/java/com/gazbert/bxbot/domain/bot/BotStatus.java",
154
- "line_nums_old": "79-86",
155
- "file_path_new": "bxbot-domain-objects/src/main/java/com/gazbert/bxbot/domain/bot/BotStatus.java",
156
- "line_nums_new": "90-98",
157
- "dependency_updated": "updated",
158
- "score": null,
159
- "signal_scores": {}
160
- }
161
- ],
162
- "coverage_gold": 1.0,
163
- "branch_coverage_gold": 9.0909,
164
- "method_coverage_gold": 3.8462,
165
- "line_coverage_gold": 5.814,
166
- "is_traceback": false,
167
- "commit_gap": {
168
- "count": 0,
169
- "skipped_commits": []
170
- },
171
- "test_is_refactoring_only": false,
172
- "has_test_dep_change": false,
173
- "all_deps_new": [
174
- "com/gazbert/bxbot/domain/bot/BotStatus.toString:()Ljava/lang/String"
175
- ],
176
- "all_deps_old": [
177
- "com/gazbert/bxbot/domain/bot/BotStatus.toString:()Ljava/lang/String"
178
- ],
179
- "deps_changes": [
180
- {
181
- "method_sign": "com/gazbert/bxbot/domain/bot/BotStatus.toString:()Ljava/lang/String",
182
- "change_type": "UPDATE",
183
- "file_path_old": "bxbot-domain-objects/src/main/java/com/gazbert/bxbot/domain/bot/BotStatus.java",
184
- "file_path_new": "bxbot-domain-objects/src/main/java/com/gazbert/bxbot/domain/bot/BotStatus.java",
185
- "source": "production",
186
- "is_test_dependency": false,
187
- "is_refactoring_only": false
188
- }
189
- ],
190
- "variant_result": {
191
- "old_on_old": "pass",
192
- "old_on_new": "error",
193
- "new_on_old": "error",
194
- "new_on_new": "pass"
195
- }
196
- },
197
- {
198
- "change_id": "5_gazbert_bxbot-v1.4.0_113acc2_0ea9915_TestBotStatus",
199
- "test_sign": "com/gazbert/bxbot/domain/bot/TestBotStatus.testInitialisationWorksAsExpected:()V",
200
- "class": "TestBotStatus",
201
- "method": "testInitialisationWorksAsExpected",
202
- "module": "bxbot-domain-objects",
203
- "junit_selector": "com.gazbert.bxbot.domain.bot.TestBotStatus#testInitialisationWorksAsExpected",
204
- "old_test_code": "@Test\npublic void testInitialisationWorksAsExpected() {\n final BotStatus botStatus = new BotStatus(BOT_ID, DISPLAY_NAME, STATUS);\n assertEquals(BOT_ID, botStatus.getBotId());\n assertEquals(DISPLAY_NAME, botStatus.getDisplayName());\n assertEquals(STATUS, botStatus.getStatus());\n}",
205
- "new_test_code": "@Test\npublic void testInitialisationWorksAsExpected() {\n final BotStatus botStatus = new BotStatus(BOT_ID, DISPLAY_NAME, STATUS, DATE);\n assertEquals(BOT_ID, botStatus.getBotId());\n assertEquals(DISPLAY_NAME, botStatus.getDisplayName());\n assertEquals(STATUS, botStatus.getStatus());\n assertEquals(DATE.getTime(), botStatus.getDatetime().getTime());\n final BotStatus botStatusNullDate = new BotStatus(BOT_ID, DISPLAY_NAME, STATUS, null);\n assertEquals(BOT_ID, botStatusNullDate.getBotId());\n assertEquals(DISPLAY_NAME, botStatusNullDate.getDisplayName());\n assertEquals(STATUS, botStatusNullDate.getStatus());\n assertNull(botStatusNullDate.getDatetime());\n}",
206
- "old_test_file_path": [
207
- "bxbot-domain-objects/src/test/java/com/gazbert/bxbot/domain/bot/TestBotStatus.java"
208
- ],
209
- "old_test_lnum": [
210
- "42-48"
211
- ],
212
- "new_test_lnum": [
213
- "45-58"
214
- ],
215
- "old_production_code": "",
216
- "new_production_code": "public Date getDatetime() {\n return datetime != null ? new Date(datetime.getTime()) : null;\n}",
217
- "focal_file_path": "bxbot-domain-objects/src/main/java/com/gazbert/bxbot/domain/bot/BotStatus.java",
218
- "focal_method_sign": "com/gazbert/bxbot/domain/bot/BotStatus.getDatetime:()Ljava/util/Date",
219
- "focal_all_deps_scored": [
220
- {
221
- "dep_id": 0,
222
- "method_sign": "com/gazbert/bxbot/domain/bot/BotStatus.getDatetime:()Ljava/util/Date",
223
- "file_path_old": null,
224
- "line_nums_old": null,
225
- "file_path_new": "bxbot-domain-objects/src/main/java/com/gazbert/bxbot/domain/bot/BotStatus.java",
226
- "line_nums_new": "82-84",
227
- "dependency_updated": "inserted",
228
- "score": null,
229
- "signal_scores": {}
230
- }
231
- ],
232
- "coverage_gold": 1.0,
233
- "branch_coverage_gold": 18.1818,
234
- "method_coverage_gold": 5.7692,
235
- "line_coverage_gold": 4.6512,
236
- "is_traceback": false,
237
- "commit_gap": {
238
- "count": 0,
239
- "skipped_commits": []
240
- },
241
- "test_is_refactoring_only": false,
242
- "has_test_dep_change": false,
243
- "all_deps_new": [
244
- "com/gazbert/bxbot/domain/bot/BotStatus.getStatus:()Ljava/lang/String",
245
- "com/gazbert/bxbot/domain/bot/BotStatus.getDisplayName:()Ljava/lang/String",
246
- "com/gazbert/bxbot/domain/bot/BotStatus.getBotId:()Ljava/lang/String",
247
- "com/gazbert/bxbot/domain/bot/BotStatus.getDatetime:()Ljava/util/Date"
248
- ],
249
- "all_deps_old": [
250
- "com/gazbert/bxbot/domain/bot/BotStatus.getBotId:()Ljava/lang/String",
251
- "com/gazbert/bxbot/domain/bot/BotStatus.getDisplayName:()Ljava/lang/String",
252
- "com/gazbert/bxbot/domain/bot/BotStatus.getStatus:()Ljava/lang/String"
253
- ],
254
- "deps_changes": [
255
- {
256
- "method_sign": "com/gazbert/bxbot/domain/bot/BotStatus.getDatetime:()Ljava/util/Date",
257
- "change_type": "ADD",
258
- "file_path_old": null,
259
- "file_path_new": "bxbot-domain-objects/src/main/java/com/gazbert/bxbot/domain/bot/BotStatus.java",
260
- "source": "production",
261
- "is_test_dependency": false,
262
- "is_refactoring_only": false
263
- }
264
- ],
265
- "variant_result": {
266
- "old_on_old": "pass",
267
- "old_on_new": "error",
268
- "new_on_old": "error",
269
- "new_on_new": "pass"
270
- }
271
- }
272
- ],
273
- "version": "v1.4.0",
274
- "java_version": 11
275
- }
276
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
gitlab4j_gitlab4j-api-gitlab4j-api-6.0.0-rc.5.json DELETED
The diff for this file is too large to render. See raw diff
 
google_compile-testing-v0.23.0.json DELETED
@@ -1,215 +0,0 @@
1
- [
2
- {
3
- "task_id": "google_compile-testing-v0.23.0__20f6d44_6b32901__JavaFileObjectSubjectTest_28a37b04",
4
- "project_name": "google_compile-testing-v0.23.0",
5
- "git_clone_url": "https://github.com/google/compile-testing.git",
6
- "rev1": "20f6d44299529a824a522933a4ffdfc7d8d88d9c",
7
- "rev2": "6b329011414723b425ec96b2aa226b072a1efc4d",
8
- "rev1_date": "2019-05-05T16:33:25Z",
9
- "rev2_date": "2019-05-05T16:33:25Z",
10
- "git_diff_url": "https://github.com/google/compile-testing/compare/20f6d44299529a824a522933a4ffdfc7d8d88d9c...6b329011414723b425ec96b2aa226b072a1efc4d",
11
- "test_file": "src/test/java/com/google/testing/compile/JavaFileObjectSubjectTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "10_google_compile-testing-v0.23.0_20f6d44_6b32901_JavaFileObjectSubjectTest",
15
- "test_sign": "com/google/testing/compile/JavaFileObjectSubjectTest.contentsAsString_fail:()V",
16
- "class": "JavaFileObjectSubjectTest",
17
- "method": "contentsAsString_fail",
18
- "module": "",
19
- "junit_selector": "com.google.testing.compile.JavaFileObjectSubjectTest#contentsAsString_fail",
20
- "old_test_code": "@Test\npublic void contentsAsString_fail() {\n expectFailure.whenTesting().about(javaFileObjects()).that(CLASS).contentsAsString(UTF_8).containsMatch(\"bad+\");\n AssertionError expected = expectFailure.getFailure();\n assertThat(expected.getMessage()).containsMatch(\"the contents of .*\" + Pattern.quote(CLASS.getName()));\n assertThat(expected.getMessage()).contains(\"bad+\");\n}",
21
- "new_test_code": "@Test\npublic void contentsAsString_fail() {\n expectFailure.whenTesting().about(javaFileObjects()).that(CLASS).contentsAsString(UTF_8).containsMatch(\"bad+\");\n AssertionError expected = expectFailure.getFailure();\n assertThat(expected).factValue(\"value of\").isEqualTo(\"javaFileObject.contents()\");\n assertThat(expected).factValue(\"javaFileObject was\").startsWith(CLASS.getName());\n assertThat(expected).factValue(\"expected to contain a match for\").isEqualTo(\"bad+\");\n}",
22
- "old_test_file_path": [
23
- "src/test/java/com/google/testing/compile/JavaFileObjectSubjectTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "90-102"
27
- ],
28
- "new_test_lnum": [
29
- "90-102"
30
- ],
31
- "old_production_code": "public StringSubject contentsAsString(Charset charset) {\n try {\n return check().withMessage(\"the contents of \" + actualAsString()).that(JavaFileObjects.asByteSource(actual()).asCharSource(charset).read());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n}",
32
- "new_production_code": "public StringSubject contentsAsString(Charset charset) {\n try {\n return check(\"contents()\").that(JavaFileObjects.asByteSource(actual()).asCharSource(charset).read());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n}",
33
- "focal_file_path": "src/main/java/com/google/testing/compile/JavaFileObjectSubject.java",
34
- "focal_method_sign": "com/google/testing/compile/JavaFileObjectSubject.contentsAsString:(Ljava/nio/charset/Charset;)Lcom/google/common/truth/StringSubject",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "com/google/testing/compile/JavaFileObjectSubject.contentsAsString:(Ljava/nio/charset/Charset;)Lcom/google/common/truth/StringSubject",
39
- "file_path_old": "src/main/java/com/google/testing/compile/JavaFileObjectSubject.java",
40
- "line_nums_old": "99-107",
41
- "file_path_new": "src/main/java/com/google/testing/compile/JavaFileObjectSubject.java",
42
- "line_nums_new": "99-106",
43
- "dependency_updated": "updated",
44
- "score": null,
45
- "signal_scores": {}
46
- }
47
- ],
48
- "coverage_gold": 0.6666666666666666,
49
- "branch_coverage_gold": 0.1832,
50
- "method_coverage_gold": 3.4553,
51
- "line_coverage_gold": 1.3797,
52
- "is_traceback": false,
53
- "commit_gap": {
54
- "count": 0,
55
- "skipped_commits": []
56
- },
57
- "test_is_refactoring_only": false,
58
- "has_test_dep_change": false,
59
- "all_deps_new": [
60
- "com/google/testing/compile/JavaFileObjectSubject.javaFileObjects:()Lcom/google/common/truth/Subject$Factory",
61
- "com/google/testing/compile/JavaFileObjectSubject.actualCustomStringRepresentation:()Ljava/lang/String",
62
- "com/google/testing/compile/JavaFileObjectSubject.contentsAsString:(Ljava/nio/charset/Charset;)Lcom/google/common/truth/StringSubject"
63
- ],
64
- "all_deps_old": [
65
- "com/google/testing/compile/JavaFileObjectSubject.javaFileObjects:()Lcom/google/common/truth/Subject$Factory",
66
- "com/google/testing/compile/JavaFileObjectSubject.contentsAsString:(Ljava/nio/charset/Charset;)Lcom/google/common/truth/StringSubject"
67
- ],
68
- "deps_changes": [
69
- {
70
- "method_sign": "com/google/testing/compile/JavaFileObjectSubject.contentsAsString:(Ljava/nio/charset/Charset;)Lcom/google/common/truth/StringSubject",
71
- "change_type": "UPDATE",
72
- "file_path_old": "src/main/java/com/google/testing/compile/JavaFileObjectSubject.java",
73
- "file_path_new": "src/main/java/com/google/testing/compile/JavaFileObjectSubject.java",
74
- "source": "production",
75
- "is_test_dependency": false,
76
- "is_refactoring_only": false
77
- }
78
- ],
79
- "variant_result": {
80
- "old_on_old": "pass",
81
- "old_on_new": "error",
82
- "new_on_old": "error",
83
- "new_on_new": "pass"
84
- }
85
- }
86
- ],
87
- "version": "v0.23.0",
88
- "java_version": 8
89
- },
90
- {
91
- "task_id": "google_compile-testing-v0.23.0__20f6d44_6b32901__JavaSourcesSubjectFactoryTest_8815c2df",
92
- "project_name": "google_compile-testing-v0.23.0",
93
- "git_clone_url": "https://github.com/google/compile-testing.git",
94
- "rev1": "20f6d44299529a824a522933a4ffdfc7d8d88d9c",
95
- "rev2": "6b329011414723b425ec96b2aa226b072a1efc4d",
96
- "rev1_date": "2019-05-05T16:33:25Z",
97
- "rev2_date": "2019-05-05T16:33:25Z",
98
- "git_diff_url": "https://github.com/google/compile-testing/compare/20f6d44299529a824a522933a4ffdfc7d8d88d9c...6b329011414723b425ec96b2aa226b072a1efc4d",
99
- "test_file": "src/test/java/com/google/testing/compile/JavaSourcesSubjectFactoryTest.java",
100
- "test_changes": [
101
- {
102
- "change_id": "11_google_compile-testing-v0.23.0_20f6d44_6b32901_JavaSourcesSubjectFactoryTest",
103
- "test_sign": "com/google/testing/compile/JavaSourcesSubjectFactoryTest.failsToCompile_throwsNoMessage:()V",
104
- "class": "JavaSourcesSubjectFactoryTest",
105
- "method": "failsToCompile_throwsNoMessage",
106
- "module": "",
107
- "junit_selector": "com.google.testing.compile.JavaSourcesSubjectFactoryTest#failsToCompile_throwsNoMessage",
108
- "old_test_code": "@Test\npublic void failsToCompile_throwsNoMessage() {\n expectFailure.whenTesting().about(javaSource()).that(JavaFileObjects.forResource(\"HelloWorld.java\")).processedWith(new ErrorProcessor()).failsToCompile().withErrorContaining(\"some error\");\n AssertionError expected = expectFailure.getFailure();\n assertThat(expected.getMessage()).startsWith(\"Expected an error containing \\\"some error\\\", but only found:\\n\");\n assertThat(expected.getMessage()).endsWith(\"expected error!\\n\");\n}",
109
- "new_test_code": "@Test\npublic void failsToCompile_throwsNoMessage() {\n expectFailure.whenTesting().about(javaSource()).that(JavaFileObjects.forResource(\"HelloWorld.java\")).processedWith(new ErrorProcessor()).failsToCompile().withErrorContaining(\"some error\");\n AssertionError expected = expectFailure.getFailure();\n assertThat(expected.getMessage()).contains(\"Expected an error containing \\\"some error\\\", but only found:\\n\");\n assertThat(expected).hasMessageThat().contains(\"expected error!\\n\");\n}",
110
- "old_test_file_path": [
111
- "src/test/java/com/google/testing/compile/JavaSourcesSubjectFactoryTest.java"
112
- ],
113
- "old_test_lnum": [
114
- "428-442"
115
- ],
116
- "new_test_lnum": [
117
- "429-443"
118
- ],
119
- "old_production_code": "@CanIgnoreReturnValue\n@Override\npublic UnsuccessfulCompilationClause failsToCompile() {\n Compilation compilation = compilation();\n check().about(compilations()).that(compilation).failed();\n return new UnsuccessfulCompilationBuilder(compilation);\n}",
120
- "new_production_code": "@CanIgnoreReturnValue\n@Override\npublic UnsuccessfulCompilationClause failsToCompile() {\n Compilation compilation = compilation();\n check(\"compilation()\").about(compilations()).that(compilation).failed();\n return new UnsuccessfulCompilationBuilder(compilation);\n}",
121
- "focal_file_path": "src/main/java/com/google/testing/compile/JavaSourcesSubject.java",
122
- "focal_method_sign": "com/google/testing/compile/JavaSourcesSubject$CompilationClause.failsToCompile:()Lcom/google/testing/compile/CompileTester$UnsuccessfulCompilationClause",
123
- "focal_all_deps_scored": [
124
- {
125
- "dep_id": 0,
126
- "method_sign": "com/google/testing/compile/JavaSourcesSubject$CompilationClause.failsToCompile:()Lcom/google/testing/compile/CompileTester$UnsuccessfulCompilationClause",
127
- "file_path_old": "src/main/java/com/google/testing/compile/JavaSourcesSubject.java",
128
- "line_nums_old": "321-327",
129
- "file_path_new": "src/main/java/com/google/testing/compile/JavaSourcesSubject.java",
130
- "line_nums_new": "321-327",
131
- "dependency_updated": "updated",
132
- "score": 0.2533,
133
- "signal_scores": {
134
- "nc": 0.0,
135
- "lcs_u": 1.0,
136
- "ed": 0.4667,
137
- "class": 0.0,
138
- "tfidf": 0.0
139
- }
140
- },
141
- {
142
- "dep_id": 1,
143
- "method_sign": "com/google/testing/compile/JavaSourcesSubject$CompilationWithWarningsBuilder.withErrorContaining:(Ljava/lang/String;)Lcom/google/testing/compile/CompileTester$FileClause",
144
- "file_path_old": "src/main/java/com/google/testing/compile/JavaSourcesSubject.java",
145
- "line_nums_old": "396-400",
146
- "file_path_new": "src/main/java/com/google/testing/compile/JavaSourcesSubject.java",
147
- "line_nums_new": "402-409",
148
- "dependency_updated": "updated",
149
- "score": 0.1073,
150
- "signal_scores": {
151
- "nc": 0.0,
152
- "lcs_u": 0.4211,
153
- "ed": 0.2,
154
- "class": 0.0,
155
- "tfidf": 0.0
156
- }
157
- }
158
- ],
159
- "coverage_gold": 1.0,
160
- "branch_coverage_gold": 3.2967,
161
- "method_coverage_gold": 14.0244,
162
- "line_coverage_gold": 10.4979,
163
- "is_traceback": false,
164
- "commit_gap": {
165
- "count": 0,
166
- "skipped_commits": []
167
- },
168
- "test_is_refactoring_only": false,
169
- "has_test_dep_change": false,
170
- "all_deps_new": [
171
- "com/google/testing/compile/JavaSourcesSubject$CompilationWithWarningsBuilder.withErrorContaining:(Ljava/lang/String;)Lcom/google/testing/compile/CompileTester$FileClause",
172
- "com/google/testing/compile/JavaSourcesSubject$SingleSourceAdapter.processedWith:(Ljavax/annotation/processing/Processor;[Ljavax/annotation/processing/Processor;)Lcom/google/testing/compile/CompileTester",
173
- "com/google/testing/compile/JavaFileObjects.forResource:(Ljava/lang/String;)Ljavax/tools/JavaFileObject",
174
- "com/google/testing/compile/JavaSourcesSubject$CompilationClause.failsToCompile:()Lcom/google/testing/compile/CompileTester$UnsuccessfulCompilationClause",
175
- "com/google/testing/compile/JavaSourceSubjectFactory.javaSource:()Lcom/google/testing/compile/JavaSourceSubjectFactory"
176
- ],
177
- "all_deps_old": [
178
- "com/google/testing/compile/JavaSourcesSubject$CompilationClause.failsToCompile:()Lcom/google/testing/compile/CompileTester$UnsuccessfulCompilationClause",
179
- "com/google/testing/compile/JavaFileObjects.forResource:(Ljava/lang/String;)Ljavax/tools/JavaFileObject",
180
- "com/google/testing/compile/JavaSourcesSubject$CompilationWithWarningsBuilder.withErrorContaining:(Ljava/lang/String;)Lcom/google/testing/compile/CompileTester$FileClause",
181
- "com/google/testing/compile/JavaSourcesSubject$SingleSourceAdapter.processedWith:(Ljavax/annotation/processing/Processor;[Ljavax/annotation/processing/Processor;)Lcom/google/testing/compile/CompileTester",
182
- "com/google/testing/compile/JavaSourceSubjectFactory.javaSource:()Lcom/google/testing/compile/JavaSourceSubjectFactory"
183
- ],
184
- "deps_changes": [
185
- {
186
- "method_sign": "com/google/testing/compile/JavaSourcesSubject$CompilationClause.failsToCompile:()Lcom/google/testing/compile/CompileTester$UnsuccessfulCompilationClause",
187
- "change_type": "UPDATE",
188
- "file_path_old": "src/main/java/com/google/testing/compile/JavaSourcesSubject.java",
189
- "file_path_new": "src/main/java/com/google/testing/compile/JavaSourcesSubject.java",
190
- "source": "production",
191
- "is_test_dependency": false,
192
- "is_refactoring_only": false
193
- },
194
- {
195
- "method_sign": "com/google/testing/compile/JavaSourcesSubject$CompilationWithWarningsBuilder.withErrorContaining:(Ljava/lang/String;)Lcom/google/testing/compile/CompileTester$FileClause",
196
- "change_type": "UPDATE",
197
- "file_path_old": "src/main/java/com/google/testing/compile/JavaSourcesSubject.java",
198
- "file_path_new": "src/main/java/com/google/testing/compile/JavaSourcesSubject.java",
199
- "source": "production",
200
- "is_test_dependency": false,
201
- "is_refactoring_only": false
202
- }
203
- ],
204
- "variant_result": {
205
- "old_on_old": "pass",
206
- "old_on_new": "fail",
207
- "new_on_old": "pass",
208
- "new_on_new": "pass"
209
- }
210
- }
211
- ],
212
- "version": "v0.23.0",
213
- "java_version": 8
214
- }
215
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
guxingke_mini-jvm-0.0.1-SNAPSHOT.json DELETED
@@ -1,271 +0,0 @@
1
- [
2
- {
3
- "task_id": "guxingke_mini-jvm-0.0.1-SNAPSHOT__237f120_afccc06__InterpreterTest_0f79865e",
4
- "project_name": "guxingke_mini-jvm-0.0.1-SNAPSHOT",
5
- "git_clone_url": "https://github.com/guxingke/mini-jvm.git",
6
- "rev1": "237f120db7e2392bcf31156febf581eabbdb1693",
7
- "rev2": "afccc062e0fdf0e7a37fe9870e40c36e7145f739",
8
- "rev1_date": "2019-10-12T04:02:35Z",
9
- "rev2_date": "2019-10-12T15:26:12Z",
10
- "git_diff_url": "https://github.com/guxingke/mini-jvm/compare/237f120db7e2392bcf31156febf581eabbdb1693...afccc062e0fdf0e7a37fe9870e40c36e7145f739",
11
- "test_file": "src/test/java/com/gxk/jvm/interpret/InterpreterTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "2_guxingke_mini-jvm-0.0.1-SNAPSHOT_237f120_afccc06_InterpreterTest",
15
- "test_sign": "com/gxk/jvm/interpret/InterpreterTest.test_method_with_add_two_int:()V",
16
- "class": "InterpreterTest",
17
- "method": "test_method_with_add_two_int",
18
- "module": "",
19
- "junit_selector": "com.gxk.jvm.interpret.InterpreterTest#test_method_with_add_two_int",
20
- "old_test_code": "@Test\npublic void test_method_with_add_two_int() throws Exception {\n ClassFile cf = ClassReader.read(Paths.get(\"example/AddTwoInt.class\"));\n Method main = cf.methods.methods[2];\n com.gxk.jvm.classfile.attribute.Code attribute = (com.gxk.jvm.classfile.attribute.Code) main.attributes.attributes[0];\n MethodInfo method = map(attribute);\n Env env = new Env(cf.cpInfo);\n Thread thread = new Thread(1024);\n Frame frame = new Frame(method.code.maxLocals, method.code.maxStacks, thread, env);\n thread.pushFrame(frame);\n frame.localVars.setInt(0, 10);\n frame.localVars.setInt(1, 20);\n new Interpreter().loop(thread, method.code.code);\n}",
21
- "new_test_code": "@Test\npublic void test_method_with_add_two_int() throws Exception {\n ClassFile cf = ClassReader.read(Paths.get(\"example/AddTwoInt.class\"));\n Method main = cf.methods.methods[2];\n com.gxk.jvm.classfile.attribute.Code attribute = (com.gxk.jvm.classfile.attribute.Code) main.attributes.attributes[0];\n MethodInfo method = map(attribute);\n Thread thread = new Thread(1024);\n Frame frame = new Frame(method.code.maxLocals, method.code.maxStacks, method.code.code, thread);\n thread.pushFrame(frame);\n frame.localVars.setInt(0, 10);\n frame.localVars.setInt(1, 20);\n new Interpreter().loop(thread);\n}",
22
- "old_test_file_path": [
23
- "src/test/java/com/gxk/jvm/interpret/InterpreterTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "129-146"
27
- ],
28
- "new_test_lnum": [
29
- "140-156"
30
- ],
31
- "old_production_code": "public void loop(Thread thread, CodeFromByte code) {\n Frame frame = thread.currentFrame();\n while (true) {\n int pc = frame.nextPc;\n thread.setPc(pc);\n Instruction inst = code.getInst(pc);\n frame.nextPc += inst.offset();\n inst.fetchOperands();\n inst.execute(frame);\n if (inst instanceof IreturnInst || inst instanceof ReturnInst) {\n break;\n }\n }\n}",
32
- "new_production_code": "public void loop(Thread thread) {\n while (true) {\n Frame frame = thread.currentFrame();\n int pc = frame.nextPc;\n thread.setPc(pc);\n Instruction inst = frame.code.getInst(pc);\n frame.nextPc += inst.offset();\n inst.fetchOperands();\n inst.execute(frame);\n if (thread.empty()) {\n break;\n }\n }\n}",
33
- "focal_file_path": "src/main/java/com/gxk/jvm/interpret/Interpreter.java",
34
- "focal_method_sign": "com/gxk/jvm/interpret/Interpreter.loop:(Lcom/gxk/jvm/rtda/Thread;)V",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "com/gxk/jvm/interpret/Interpreter.loop:(Lcom/gxk/jvm/rtda/Thread;)V",
39
- "file_path_old": "src/main/java/com/gxk/jvm/interpret/Interpreter.java",
40
- "line_nums_old": "29-48",
41
- "file_path_new": "src/main/java/com/gxk/jvm/interpret/Interpreter.java",
42
- "line_nums_new": "26-44",
43
- "dependency_updated": "updated",
44
- "score": null,
45
- "signal_scores": {}
46
- }
47
- ],
48
- "coverage_gold": 1.0,
49
- "branch_coverage_gold": 9.5833,
50
- "method_coverage_gold": 24.5399,
51
- "line_coverage_gold": 43.9834,
52
- "is_traceback": true,
53
- "commit_gap": {
54
- "count": 1,
55
- "skipped_commits": [
56
- "dcd92cc4f5ef092b399365efd47c3fedab69ceb2"
57
- ]
58
- },
59
- "test_is_refactoring_only": false,
60
- "has_test_dep_change": false,
61
- "all_deps_new": [
62
- "com/gxk/jvm/interpret/Interpreter.loop:(Lcom/gxk/jvm/rtda/Thread;)V",
63
- "com/gxk/jvm/rtda/Thread.pushFrame:(Lcom/gxk/jvm/rtda/Frame;)V",
64
- "com/gxk/jvm/rtda/LocalVars.setInt:(Ljava/lang/Integer;Ljava/lang/Integer;)V",
65
- "com/gxk/jvm/classfile/ClassReader.read:(Ljava/nio/file/Path;)Lcom/gxk/jvm/classfile/ClassFile",
66
- "com/gxk/jvm/interpret/InterpreterTest.map:(Lcom/gxk/jvm/classfile/attribute/Code;)Lcom/gxk/jvm/classfile/MethodInfo"
67
- ],
68
- "all_deps_old": [
69
- "com/gxk/jvm/interpret/Interpreter.loop:(Lcom/gxk/jvm/rtda/Thread;Lcom/gxk/jvm/classfile/CodeFromByte;)V",
70
- "com/gxk/jvm/rtda/LocalVars.setInt:(Ljava/lang/Integer;Ljava/lang/Integer;)V",
71
- "com/gxk/jvm/rtda/Thread.pushFrame:(Lcom/gxk/jvm/rtda/Frame;)V",
72
- "com/gxk/jvm/classfile/ClassReader.read:(Ljava/nio/file/Path;)Lcom/gxk/jvm/classfile/ClassFile",
73
- "com/gxk/jvm/interpret/InterpreterTest.map:(Lcom/gxk/jvm/classfile/attribute/Code;)Lcom/gxk/jvm/classfile/MethodInfo"
74
- ],
75
- "deps_changes": [
76
- {
77
- "method_sign": "com/gxk/jvm/interpret/Interpreter.loop:(Lcom/gxk/jvm/rtda/Thread;)V",
78
- "change_type": "UPDATE",
79
- "file_path_old": "src/main/java/com/gxk/jvm/interpret/Interpreter.java",
80
- "file_path_new": "src/main/java/com/gxk/jvm/interpret/Interpreter.java",
81
- "source": "production",
82
- "is_test_dependency": false,
83
- "is_refactoring_only": false
84
- }
85
- ],
86
- "variant_result": {
87
- "old_on_old": "pass",
88
- "old_on_new": "error",
89
- "new_on_old": "error",
90
- "new_on_new": "pass"
91
- }
92
- },
93
- {
94
- "change_id": "3_guxingke_mini-jvm-0.0.1-SNAPSHOT_237f120_afccc06_InterpreterTest",
95
- "test_sign": "com/gxk/jvm/interpret/InterpreterTest.test_method_with_args:()V",
96
- "class": "InterpreterTest",
97
- "method": "test_method_with_args",
98
- "module": "",
99
- "junit_selector": "com.gxk.jvm.interpret.InterpreterTest#test_method_with_args",
100
- "old_test_code": "@Test\npublic void test_method_with_args() throws Exception {\n ClassFile cf = ClassReader.read(Paths.get(\"example/Loop3.class\"));\n Method main = cf.methods.methods[2];\n com.gxk.jvm.classfile.attribute.Code attribute = (com.gxk.jvm.classfile.attribute.Code) main.attributes.attributes[0];\n MethodInfo method = map(attribute);\n Env env = new Env(cf.cpInfo);\n Thread thread = new Thread(1024);\n Frame frame = new Frame(method.code.maxLocals, method.code.maxStacks, thread, env);\n thread.pushFrame(frame);\n frame.localVars.setInt(0, 1000);\n new Interpreter().loop(thread, method.code.code);\n}",
101
- "new_test_code": "@Test\npublic void test_method_with_args() throws Exception {\n ClassFile cf = ClassReader.read(Paths.get(\"example/Loop3.class\"));\n Method main = cf.methods.methods[2];\n com.gxk.jvm.classfile.attribute.Code attribute = (com.gxk.jvm.classfile.attribute.Code) main.attributes.attributes[0];\n MethodInfo method = map(attribute);\n Thread thread = new Thread(1024);\n Frame frame = new Frame(method.code.maxLocals, method.code.maxStacks, method.code.code, thread);\n thread.pushFrame(frame);\n frame.localVars.setInt(0, 1000);\n new Interpreter().loop(thread);\n}",
102
- "old_test_file_path": [
103
- "src/test/java/com/gxk/jvm/interpret/InterpreterTest.java"
104
- ],
105
- "old_test_lnum": [
106
- "111-127"
107
- ],
108
- "new_test_lnum": [
109
- "107-122"
110
- ],
111
- "old_production_code": "public void loop(Thread thread, CodeFromByte code) {\n Frame frame = thread.currentFrame();\n while (true) {\n int pc = frame.nextPc;\n thread.setPc(pc);\n Instruction inst = code.getInst(pc);\n frame.nextPc += inst.offset();\n inst.fetchOperands();\n inst.execute(frame);\n if (inst instanceof IreturnInst || inst instanceof ReturnInst) {\n break;\n }\n }\n}",
112
- "new_production_code": "public void loop(Thread thread) {\n while (true) {\n Frame frame = thread.currentFrame();\n int pc = frame.nextPc;\n thread.setPc(pc);\n Instruction inst = frame.code.getInst(pc);\n frame.nextPc += inst.offset();\n inst.fetchOperands();\n inst.execute(frame);\n if (thread.empty()) {\n break;\n }\n }\n}",
113
- "focal_file_path": "src/main/java/com/gxk/jvm/interpret/Interpreter.java",
114
- "focal_method_sign": "com/gxk/jvm/interpret/Interpreter.loop:(Lcom/gxk/jvm/rtda/Thread;)V",
115
- "focal_all_deps_scored": [
116
- {
117
- "dep_id": 0,
118
- "method_sign": "com/gxk/jvm/interpret/Interpreter.loop:(Lcom/gxk/jvm/rtda/Thread;)V",
119
- "file_path_old": "src/main/java/com/gxk/jvm/interpret/Interpreter.java",
120
- "line_nums_old": "29-48",
121
- "file_path_new": "src/main/java/com/gxk/jvm/interpret/Interpreter.java",
122
- "line_nums_new": "26-44",
123
- "dependency_updated": "updated",
124
- "score": null,
125
- "signal_scores": {}
126
- }
127
- ],
128
- "coverage_gold": 1.0,
129
- "branch_coverage_gold": 11.25,
130
- "method_coverage_gold": 29.1411,
131
- "line_coverage_gold": 49.5159,
132
- "is_traceback": true,
133
- "commit_gap": {
134
- "count": 1,
135
- "skipped_commits": [
136
- "dcd92cc4f5ef092b399365efd47c3fedab69ceb2"
137
- ]
138
- },
139
- "test_is_refactoring_only": false,
140
- "has_test_dep_change": false,
141
- "all_deps_new": [
142
- "com/gxk/jvm/interpret/Interpreter.loop:(Lcom/gxk/jvm/rtda/Thread;)V",
143
- "com/gxk/jvm/rtda/Thread.pushFrame:(Lcom/gxk/jvm/rtda/Frame;)V",
144
- "com/gxk/jvm/rtda/LocalVars.setInt:(Ljava/lang/Integer;Ljava/lang/Integer;)V",
145
- "com/gxk/jvm/classfile/ClassReader.read:(Ljava/nio/file/Path;)Lcom/gxk/jvm/classfile/ClassFile",
146
- "com/gxk/jvm/interpret/InterpreterTest.map:(Lcom/gxk/jvm/classfile/attribute/Code;)Lcom/gxk/jvm/classfile/MethodInfo"
147
- ],
148
- "all_deps_old": [
149
- "com/gxk/jvm/interpret/Interpreter.loop:(Lcom/gxk/jvm/rtda/Thread;Lcom/gxk/jvm/classfile/CodeFromByte;)V",
150
- "com/gxk/jvm/rtda/LocalVars.setInt:(Ljava/lang/Integer;Ljava/lang/Integer;)V",
151
- "com/gxk/jvm/rtda/Thread.pushFrame:(Lcom/gxk/jvm/rtda/Frame;)V",
152
- "com/gxk/jvm/classfile/ClassReader.read:(Ljava/nio/file/Path;)Lcom/gxk/jvm/classfile/ClassFile",
153
- "com/gxk/jvm/interpret/InterpreterTest.map:(Lcom/gxk/jvm/classfile/attribute/Code;)Lcom/gxk/jvm/classfile/MethodInfo"
154
- ],
155
- "deps_changes": [
156
- {
157
- "method_sign": "com/gxk/jvm/interpret/Interpreter.loop:(Lcom/gxk/jvm/rtda/Thread;)V",
158
- "change_type": "UPDATE",
159
- "file_path_old": "src/main/java/com/gxk/jvm/interpret/Interpreter.java",
160
- "file_path_new": "src/main/java/com/gxk/jvm/interpret/Interpreter.java",
161
- "source": "production",
162
- "is_test_dependency": false,
163
- "is_refactoring_only": false
164
- }
165
- ],
166
- "variant_result": {
167
- "old_on_old": "pass",
168
- "old_on_new": "error",
169
- "new_on_old": "error",
170
- "new_on_new": "pass"
171
- }
172
- }
173
- ],
174
- "version": "0.0.1-SNAPSHOT",
175
- "java_version": 8
176
- },
177
- {
178
- "task_id": "guxingke_mini-jvm-0.0.1-SNAPSHOT__9ccd886_31c814b__InterpreterTest_41f0010d",
179
- "project_name": "guxingke_mini-jvm-0.0.1-SNAPSHOT",
180
- "git_clone_url": "https://github.com/guxingke/mini-jvm.git",
181
- "rev1": "9ccd88649401fe72fc9de35eee89e642c3261ce6",
182
- "rev2": "31c814bda0df56e6663fe0c8753a0e2199654a3d",
183
- "rev1_date": "2019-10-13T13:38:44Z",
184
- "rev2_date": "2019-10-13T14:39:40Z",
185
- "git_diff_url": "https://github.com/guxingke/mini-jvm/compare/9ccd88649401fe72fc9de35eee89e642c3261ce6...31c814bda0df56e6663fe0c8753a0e2199654a3d",
186
- "test_file": "src/test/java/com/gxk/jvm/interpret/InterpreterTest.java",
187
- "test_changes": [
188
- {
189
- "change_id": "28_guxingke_mini-jvm-0.0.1-SNAPSHOT_9ccd886_31c814b_InterpreterTest",
190
- "test_sign": "com/gxk/jvm/interpret/InterpreterTest.test_method_invoke:()V",
191
- "class": "InterpreterTest",
192
- "method": "test_method_invoke",
193
- "module": "",
194
- "junit_selector": "com.gxk.jvm.interpret.InterpreterTest#test_method_invoke",
195
- "old_test_code": "@Test\npublic void test_method_invoke() throws Exception {\n ClassFile cf = ClassReader.read(Paths.get(\"example/Loop4.class\"));\n KClass main = Classloader.doLoadClass(\"Loop4\", cf);\n KMethod method = main.getMainMethod();\n Thread thread = new Thread(1024);\n Frame frame = new Frame(method, thread);\n thread.pushFrame(frame);\n new Interpreter().loop(thread);\n}",
196
- "new_test_code": "@Test\npublic void test_method_invoke() throws Exception {\n ClassFile cf = ClassReader.read(Paths.get(\"example/Loop4.class\"));\n KClass main = Classloader.doLoadClass(\"Loop4\", cf);\n Classloader.doRegister(main);\n KMethod method = main.getMainMethod();\n Thread thread = new Thread(1024);\n Frame frame = new Frame(method, thread);\n thread.pushFrame(frame);\n new Interpreter().loop(thread);\n}",
197
- "old_test_file_path": [
198
- "src/test/java/com/gxk/jvm/interpret/InterpreterTest.java"
199
- ],
200
- "old_test_lnum": [
201
- "107-120"
202
- ],
203
- "new_test_lnum": [
204
- "107-121"
205
- ],
206
- "old_production_code": "",
207
- "new_production_code": "public static void doRegister(KClass clazz) {\n Heap.registerClass(clazz.name, clazz);\n for (KMethod method : clazz.getMethods()) {\n Heap.registerMethod(method.descriptor, method);\n }\n}",
208
- "focal_file_path": "src/main/java/com/gxk/jvm/classloader/Classloader.java",
209
- "focal_method_sign": "com/gxk/jvm/classloader/Classloader.doRegister:(Lcom/gxk/jvm/rtda/heap/KClass;)V",
210
- "focal_all_deps_scored": [
211
- {
212
- "dep_id": 0,
213
- "method_sign": "com/gxk/jvm/classloader/Classloader.doRegister:(Lcom/gxk/jvm/rtda/heap/KClass;)V",
214
- "file_path_old": null,
215
- "line_nums_old": null,
216
- "file_path_new": "src/main/java/com/gxk/jvm/classloader/Classloader.java",
217
- "line_nums_new": "22-27",
218
- "dependency_updated": "inserted",
219
- "score": null,
220
- "signal_scores": {}
221
- }
222
- ],
223
- "coverage_gold": 0.9655172413793104,
224
- "branch_coverage_gold": 12.9032,
225
- "method_coverage_gold": 34.3195,
226
- "line_coverage_gold": 55.74,
227
- "is_traceback": false,
228
- "commit_gap": {
229
- "count": 0,
230
- "skipped_commits": []
231
- },
232
- "test_is_refactoring_only": false,
233
- "has_test_dep_change": false,
234
- "all_deps_new": [
235
- "com/gxk/jvm/classloader/Classloader.doRegister:(Lcom/gxk/jvm/rtda/heap/KClass;)V",
236
- "com/gxk/jvm/rtda/heap/KClass.getMainMethod:()Lcom/gxk/jvm/rtda/heap/KMethod",
237
- "com/gxk/jvm/rtda/Thread.pushFrame:(Lcom/gxk/jvm/rtda/Frame;)V",
238
- "com/gxk/jvm/classfile/ClassReader.read:(Ljava/nio/file/Path;)Lcom/gxk/jvm/classfile/ClassFile",
239
- "com/gxk/jvm/classloader/Classloader.doLoadClass:(Ljava/lang/String;Lcom/gxk/jvm/classfile/ClassFile;)Lcom/gxk/jvm/rtda/heap/KClass",
240
- "com/gxk/jvm/interpret/Interpreter.loop:(Lcom/gxk/jvm/rtda/Thread;)V"
241
- ],
242
- "all_deps_old": [
243
- "com/gxk/jvm/rtda/heap/KClass.getMainMethod:()Lcom/gxk/jvm/rtda/heap/KMethod",
244
- "com/gxk/jvm/rtda/Thread.pushFrame:(Lcom/gxk/jvm/rtda/Frame;)V",
245
- "com/gxk/jvm/classfile/ClassReader.read:(Ljava/nio/file/Path;)Lcom/gxk/jvm/classfile/ClassFile",
246
- "com/gxk/jvm/classloader/Classloader.doLoadClass:(Ljava/lang/String;Lcom/gxk/jvm/classfile/ClassFile;)Lcom/gxk/jvm/rtda/heap/KClass",
247
- "com/gxk/jvm/interpret/Interpreter.loop:(Lcom/gxk/jvm/rtda/Thread;)V"
248
- ],
249
- "deps_changes": [
250
- {
251
- "method_sign": "com/gxk/jvm/classloader/Classloader.doRegister:(Lcom/gxk/jvm/rtda/heap/KClass;)V",
252
- "change_type": "ADD",
253
- "file_path_old": null,
254
- "file_path_new": "src/main/java/com/gxk/jvm/classloader/Classloader.java",
255
- "source": "production",
256
- "is_test_dependency": false,
257
- "is_refactoring_only": false
258
- }
259
- ],
260
- "variant_result": {
261
- "old_on_old": "pass",
262
- "old_on_new": "fail",
263
- "new_on_old": "error",
264
- "new_on_new": "pass"
265
- }
266
- }
267
- ],
268
- "version": "0.0.1-SNAPSHOT",
269
- "java_version": 8
270
- }
271
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
hcoles_pitest-pitest-parent-1.6.8.json DELETED
@@ -1,513 +0,0 @@
1
- [
2
- {
3
- "task_id": "hcoles_pitest-pitest-parent-1.6.8__5e6eedc_be8342e__SendDataTest_fe05fb3b",
4
- "project_name": "hcoles_pitest-pitest-parent-1.6.8",
5
- "git_clone_url": "https://github.com/hcoles/pitest.git",
6
- "rev1": "5e6eedcf3c39c98470be47030cc6b9ce13a53014",
7
- "rev2": "be8342e697edf7f74c70d2a5bc2a6f80277eeab3",
8
- "rev1_date": "2020-02-12T15:48:01Z",
9
- "rev2_date": "2020-02-12T18:15:20Z",
10
- "git_diff_url": "https://github.com/hcoles/pitest/compare/5e6eedcf3c39c98470be47030cc6b9ce13a53014...be8342e697edf7f74c70d2a5bc2a6f80277eeab3",
11
- "test_file": "pitest-entry/src/test/java/org/pitest/coverage/execute/SendDataTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "11_hcoles_pitest-pitest-parent-1.6.8_5e6eedc_be8342e_SendDataTest",
15
- "test_sign": "org/pitest/coverage/execute/SendDataTest.shouldSendArgumentsToMinion:()V",
16
- "class": "SendDataTest",
17
- "method": "shouldSendArgumentsToMinion",
18
- "module": "pitest-entry",
19
- "junit_selector": "org.pitest.coverage.execute.SendDataTest#shouldSendArgumentsToMinion",
20
- "old_test_code": "@Test\npublic void shouldSendArgumentsToMinion() {\n this.testee.apply(this.os);\n verify(this.os).write(this.arguments);\n}",
21
- "new_test_code": "@Test\npublic void shouldSendArgumentsToMinion() {\n this.testee.accept(this.os);\n verify(this.os).write(this.arguments);\n}",
22
- "old_test_file_path": [
23
- "pitest-entry/src/test/java/org/pitest/coverage/execute/SendDataTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "33-37"
27
- ],
28
- "new_test_lnum": [
29
- "33-37"
30
- ],
31
- "old_production_code": "",
32
- "new_production_code": "@Override\npublic void accept(final SafeDataOutputStream dos) {\n sendArguments(dos);\n sendTests(dos);\n}",
33
- "focal_file_path": "pitest-entry/src/main/java/org/pitest/coverage/execute/SendData.java",
34
- "focal_method_sign": "org/pitest/coverage/execute/SendData.accept:(Lorg/pitest/util/SafeDataOutputStream;)V",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 1,
38
- "method_sign": "org/pitest/coverage/execute/SendData.accept:(Lorg/pitest/util/SafeDataOutputStream;)V",
39
- "file_path_old": null,
40
- "line_nums_old": null,
41
- "file_path_new": "pitest-entry/src/main/java/org/pitest/coverage/execute/SendData.java",
42
- "line_nums_new": "20-24",
43
- "dependency_updated": "inserted",
44
- "score": 0.3053,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 0.5,
48
- "ed": 0.1111,
49
- "class": 1.0,
50
- "tfidf": 0.0447
51
- }
52
- },
53
- {
54
- "dep_id": 0,
55
- "method_sign": "org/pitest/coverage/execute/SendData.apply:(Lorg/pitest/util/SafeDataOutputStream;)V",
56
- "file_path_old": "pitest-entry/src/main/java/org/pitest/coverage/execute/SendData.java",
57
- "line_nums_old": "20-24",
58
- "file_path_new": null,
59
- "line_nums_new": null,
60
- "dependency_updated": "deleted",
61
- "score": 0.2401,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 0.2,
65
- "ed": 0.037,
66
- "class": 1.0,
67
- "tfidf": 0.0447
68
- }
69
- }
70
- ],
71
- "coverage_gold": 1.0,
72
- "branch_coverage_gold": 0.1406,
73
- "method_coverage_gold": 0.4374,
74
- "line_coverage_gold": 0.4932,
75
- "is_traceback": false,
76
- "commit_gap": {
77
- "count": 0,
78
- "skipped_commits": []
79
- },
80
- "test_is_refactoring_only": false,
81
- "has_test_dep_change": false,
82
- "all_deps_new": [
83
- "org/pitest/coverage/execute/SendData.accept:(Lorg/pitest/util/SafeDataOutputStream;)V"
84
- ],
85
- "all_deps_old": [
86
- "org/pitest/coverage/execute/SendData.apply:(Lorg/pitest/util/SafeDataOutputStream;)V"
87
- ],
88
- "deps_changes": [
89
- {
90
- "method_sign": "org/pitest/coverage/execute/SendData.apply:(Lorg/pitest/util/SafeDataOutputStream;)V",
91
- "change_type": "DELETE",
92
- "file_path_old": "pitest-entry/src/main/java/org/pitest/coverage/execute/SendData.java",
93
- "file_path_new": null,
94
- "source": "production",
95
- "is_test_dependency": false,
96
- "is_refactoring_only": false
97
- },
98
- {
99
- "method_sign": "org/pitest/coverage/execute/SendData.accept:(Lorg/pitest/util/SafeDataOutputStream;)V",
100
- "change_type": "ADD",
101
- "file_path_old": null,
102
- "file_path_new": "pitest-entry/src/main/java/org/pitest/coverage/execute/SendData.java",
103
- "source": "production",
104
- "is_test_dependency": false,
105
- "is_refactoring_only": false
106
- }
107
- ],
108
- "variant_result": {
109
- "old_on_old": "pass",
110
- "old_on_new": "error",
111
- "new_on_old": "error",
112
- "new_on_new": "pass"
113
- }
114
- },
115
- {
116
- "change_id": "13_hcoles_pitest-pitest-parent-1.6.8_5e6eedc_be8342e_SendDataTest",
117
- "test_sign": "org/pitest/coverage/execute/SendDataTest.shouldSendTestClassesToMinion:()V",
118
- "class": "SendDataTest",
119
- "method": "shouldSendTestClassesToMinion",
120
- "module": "pitest-entry",
121
- "junit_selector": "org.pitest.coverage.execute.SendDataTest#shouldSendTestClassesToMinion",
122
- "old_test_code": "@Test\npublic void shouldSendTestClassesToMinion() {\n this.testClasses.add(\"foo\");\n this.testClasses.add(\"bar\");\n this.testee.apply(this.os);\n verify(this.os).writeInt(this.testClasses.size());\n verify(this.os).writeString(\"foo\");\n verify(this.os).writeString(\"bar\");\n}",
123
- "new_test_code": "@Test\npublic void shouldSendTestClassesToMinion() {\n this.testClasses.add(\"foo\");\n this.testClasses.add(\"bar\");\n this.testee.accept(this.os);\n verify(this.os).writeInt(this.testClasses.size());\n verify(this.os).writeString(\"foo\");\n verify(this.os).writeString(\"bar\");\n}",
124
- "old_test_file_path": [
125
- "pitest-entry/src/test/java/org/pitest/coverage/execute/SendDataTest.java"
126
- ],
127
- "old_test_lnum": [
128
- "39-47"
129
- ],
130
- "new_test_lnum": [
131
- "39-47"
132
- ],
133
- "old_production_code": "",
134
- "new_production_code": "@Override\npublic void accept(final SafeDataOutputStream dos) {\n sendArguments(dos);\n sendTests(dos);\n}",
135
- "focal_file_path": "pitest-entry/src/main/java/org/pitest/coverage/execute/SendData.java",
136
- "focal_method_sign": "org/pitest/coverage/execute/SendData.accept:(Lorg/pitest/util/SafeDataOutputStream;)V",
137
- "focal_all_deps_scored": [
138
- {
139
- "dep_id": 1,
140
- "method_sign": "org/pitest/coverage/execute/SendData.accept:(Lorg/pitest/util/SafeDataOutputStream;)V",
141
- "file_path_old": null,
142
- "line_nums_old": null,
143
- "file_path_new": "pitest-entry/src/main/java/org/pitest/coverage/execute/SendData.java",
144
- "line_nums_new": "20-24",
145
- "dependency_updated": "inserted",
146
- "score": 0.304,
147
- "signal_scores": {
148
- "nc": 0.0,
149
- "lcs_u": 0.5,
150
- "ed": 0.1034,
151
- "class": 1.0,
152
- "tfidf": 0.0447
153
- }
154
- },
155
- {
156
- "dep_id": 0,
157
- "method_sign": "org/pitest/coverage/execute/SendData.apply:(Lorg/pitest/util/SafeDataOutputStream;)V",
158
- "file_path_old": "pitest-entry/src/main/java/org/pitest/coverage/execute/SendData.java",
159
- "line_nums_old": "20-24",
160
- "file_path_new": null,
161
- "line_nums_new": null,
162
- "dependency_updated": "deleted",
163
- "score": 0.2397,
164
- "signal_scores": {
165
- "nc": 0.0,
166
- "lcs_u": 0.2,
167
- "ed": 0.0345,
168
- "class": 1.0,
169
- "tfidf": 0.0447
170
- }
171
- }
172
- ],
173
- "coverage_gold": 1.0,
174
- "branch_coverage_gold": 0.2813,
175
- "method_coverage_gold": 0.4374,
176
- "line_coverage_gold": 0.5512,
177
- "is_traceback": false,
178
- "commit_gap": {
179
- "count": 0,
180
- "skipped_commits": []
181
- },
182
- "test_is_refactoring_only": false,
183
- "has_test_dep_change": false,
184
- "all_deps_new": [
185
- "org/pitest/coverage/execute/SendData.accept:(Lorg/pitest/util/SafeDataOutputStream;)V"
186
- ],
187
- "all_deps_old": [
188
- "org/pitest/coverage/execute/SendData.apply:(Lorg/pitest/util/SafeDataOutputStream;)V"
189
- ],
190
- "deps_changes": [
191
- {
192
- "method_sign": "org/pitest/coverage/execute/SendData.apply:(Lorg/pitest/util/SafeDataOutputStream;)V",
193
- "change_type": "DELETE",
194
- "file_path_old": "pitest-entry/src/main/java/org/pitest/coverage/execute/SendData.java",
195
- "file_path_new": null,
196
- "source": "production",
197
- "is_test_dependency": false,
198
- "is_refactoring_only": false
199
- },
200
- {
201
- "method_sign": "org/pitest/coverage/execute/SendData.accept:(Lorg/pitest/util/SafeDataOutputStream;)V",
202
- "change_type": "ADD",
203
- "file_path_old": null,
204
- "file_path_new": "pitest-entry/src/main/java/org/pitest/coverage/execute/SendData.java",
205
- "source": "production",
206
- "is_test_dependency": false,
207
- "is_refactoring_only": false
208
- }
209
- ],
210
- "variant_result": {
211
- "old_on_old": "pass",
212
- "old_on_new": "error",
213
- "new_on_old": "error",
214
- "new_on_new": "pass"
215
- }
216
- }
217
- ],
218
- "version": "pitest-parent-1.6.8",
219
- "java_version": 8
220
- },
221
- {
222
- "task_id": "hcoles_pitest-pitest-parent-1.6.8__5e6eedc_be8342e__SettingsFactoryTest_a4526658",
223
- "project_name": "hcoles_pitest-pitest-parent-1.6.8",
224
- "git_clone_url": "https://github.com/hcoles/pitest.git",
225
- "rev1": "5e6eedcf3c39c98470be47030cc6b9ce13a53014",
226
- "rev2": "be8342e697edf7f74c70d2a5bc2a6f80277eeab3",
227
- "rev1_date": "2020-02-12T15:48:01Z",
228
- "rev2_date": "2020-02-12T18:15:20Z",
229
- "git_diff_url": "https://github.com/hcoles/pitest/compare/5e6eedcf3c39c98470be47030cc6b9ce13a53014...be8342e697edf7f74c70d2a5bc2a6f80277eeab3",
230
- "test_file": "pitest-entry/src/test/java/org/pitest/mutationtest/config/SettingsFactoryTest.java",
231
- "test_changes": [
232
- {
233
- "change_id": "12_hcoles_pitest-pitest-parent-1.6.8_5e6eedc_be8342e_SettingsFactoryTest",
234
- "test_sign": "org/pitest/mutationtest/config/SettingsFactoryTest.shouldDescribeActiveFeatures:()V",
235
- "class": "SettingsFactoryTest",
236
- "method": "shouldDescribeActiveFeatures",
237
- "module": "pitest-entry",
238
- "junit_selector": "org.pitest.mutationtest.config.SettingsFactoryTest#shouldDescribeActiveFeatures",
239
- "old_test_code": "@Test\npublic void shouldDescribeActiveFeatures() {\n final SideEffect1<Feature> disabled = Mockito.mock(SideEffect1.class);\n final SideEffect1<Feature> enabled = Mockito.mock(SideEffect1.class);\n this.options.setFeatures(Arrays.asList(\"+FSTATINIT\"));\n this.testee.describeFeatures(enabled, disabled);\n verify(enabled).apply(Feature.named(\"FSTATINIT\"));\n verify(disabled, never()).apply(Feature.named(\"FSTATINIT\"));\n}",
240
- "new_test_code": "@Test\npublic void shouldDescribeActiveFeatures() {\n final Consumer<Feature> disabled = Mockito.mock(Consumer.class);\n final Consumer<Feature> enabled = Mockito.mock(Consumer.class);\n this.options.setFeatures(Arrays.asList(\"+FSTATINIT\"));\n this.testee.describeFeatures(enabled, disabled);\n verify(enabled).accept(Feature.named(\"FSTATINIT\"));\n verify(disabled, never()).accept(Feature.named(\"FSTATINIT\"));\n}",
241
- "old_test_file_path": [
242
- "pitest-entry/src/test/java/org/pitest/mutationtest/config/SettingsFactoryTest.java"
243
- ],
244
- "old_test_lnum": [
245
- "106-116"
246
- ],
247
- "new_test_lnum": [
248
- "106-116"
249
- ],
250
- "old_production_code": "public void describeFeatures(SideEffect1<Feature> enabled, SideEffect1<Feature> disabled) {\n final FeatureParser parser = new FeatureParser();\n final Collection<ProvidesFeature> available = new ArrayList<>(this.plugins.findInterceptors());\n final List<FeatureSetting> settings = parser.parseFeatures(this.options.getFeatures());\n final FeatureSelector<ProvidesFeature> selector = new FeatureSelector<>(settings, available);\n List<Feature> enabledFeatures = selector.getActiveFeatures().stream().map(toFeature()).distinct().sorted(byName()).collect(Collectors.toList());\n enabledFeatures.stream().forEach(each -> enabled.apply(each));\n available.stream().map(toFeature()).distinct().sorted(byName()).filter(f -> !enabledFeatures.contains(f)).forEach(each -> disabled.apply(each));\n}",
251
- "new_production_code": "public void describeFeatures(Consumer<Feature> enabled, Consumer<Feature> disabled) {\n final FeatureParser parser = new FeatureParser();\n final Collection<ProvidesFeature> available = new ArrayList<>(this.plugins.findInterceptors());\n final List<FeatureSetting> settings = parser.parseFeatures(this.options.getFeatures());\n final FeatureSelector<ProvidesFeature> selector = new FeatureSelector<>(settings, available);\n List<Feature> enabledFeatures = selector.getActiveFeatures().stream().map(toFeature()).distinct().sorted(byName()).collect(Collectors.toList());\n enabledFeatures.forEach(enabled);\n available.stream().map(toFeature()).distinct().sorted(byName()).filter(f -> !enabledFeatures.contains(f)).forEach(disabled);\n}",
252
- "focal_file_path": "pitest-entry/src/main/java/org/pitest/mutationtest/config/SettingsFactory.java",
253
- "focal_method_sign": "org/pitest/mutationtest/config/SettingsFactory.describeFeatures:(Lorg/pitest/functional/SideEffect1;Lorg/pitest/functional/SideEffect1;)V",
254
- "focal_all_deps_scored": [
255
- {
256
- "dep_id": 0,
257
- "method_sign": "org/pitest/mutationtest/config/SettingsFactory.describeFeatures:(Lorg/pitest/functional/SideEffect1;Lorg/pitest/functional/SideEffect1;)V",
258
- "file_path_old": "pitest-entry/src/main/java/org/pitest/mutationtest/config/SettingsFactory.java",
259
- "line_nums_old": "88-109",
260
- "file_path_new": "pitest-entry/src/main/java/org/pitest/mutationtest/config/SettingsFactory.java",
261
- "line_nums_new": "88-109",
262
- "dependency_updated": "updated",
263
- "score": null,
264
- "signal_scores": {}
265
- }
266
- ],
267
- "coverage_gold": 1.0,
268
- "branch_coverage_gold": 0.2813,
269
- "method_coverage_gold": 4.5494,
270
- "line_coverage_gold": 4.0035,
271
- "is_traceback": false,
272
- "commit_gap": {
273
- "count": 0,
274
- "skipped_commits": []
275
- },
276
- "test_is_refactoring_only": false,
277
- "has_test_dep_change": false,
278
- "all_deps_new": [
279
- "org/pitest/mutationtest/config/ReportOptions.setFeatures:(Ljava/util/Collection;)V",
280
- "org/pitest/plugin/Feature.equals:(Ljava/lang/Object;)Z",
281
- "org/pitest/plugin/Feature.named:(Ljava/lang/String;)Lorg/pitest/plugin/Feature",
282
- "org/pitest/mutationtest/config/SettingsFactory.describeFeatures:(Ljava/util/function/Consumer;Ljava/util/function/Consumer;)V"
283
- ],
284
- "all_deps_old": [
285
- "org/pitest/plugin/Feature.equals:(Ljava/lang/Object;)Z",
286
- "org/pitest/plugin/Feature.named:(Ljava/lang/String;)Lorg/pitest/plugin/Feature",
287
- "org/pitest/mutationtest/config/SettingsFactory.describeFeatures:(Lorg/pitest/functional/SideEffect1;Lorg/pitest/functional/SideEffect1;)V",
288
- "org/pitest/mutationtest/config/ReportOptions.setFeatures:(Ljava/util/Collection;)V"
289
- ],
290
- "deps_changes": [
291
- {
292
- "method_sign": "org/pitest/mutationtest/config/SettingsFactory.describeFeatures:(Lorg/pitest/functional/SideEffect1;Lorg/pitest/functional/SideEffect1;)V",
293
- "change_type": "UPDATE",
294
- "file_path_old": "pitest-entry/src/main/java/org/pitest/mutationtest/config/SettingsFactory.java",
295
- "file_path_new": "pitest-entry/src/main/java/org/pitest/mutationtest/config/SettingsFactory.java",
296
- "source": "production",
297
- "is_test_dependency": false,
298
- "is_refactoring_only": false
299
- }
300
- ],
301
- "variant_result": {
302
- "old_on_old": "pass",
303
- "old_on_new": "error",
304
- "new_on_old": "error",
305
- "new_on_new": "pass"
306
- }
307
- },
308
- {
309
- "change_id": "14_hcoles_pitest-pitest-parent-1.6.8_5e6eedc_be8342e_SettingsFactoryTest",
310
- "test_sign": "org/pitest/mutationtest/config/SettingsFactoryTest.shouldDescribeDisabledFeatures:()V",
311
- "class": "SettingsFactoryTest",
312
- "method": "shouldDescribeDisabledFeatures",
313
- "module": "pitest-entry",
314
- "junit_selector": "org.pitest.mutationtest.config.SettingsFactoryTest#shouldDescribeDisabledFeatures",
315
- "old_test_code": "@Test\npublic void shouldDescribeDisabledFeatures() {\n final SideEffect1<Feature> disabled = Mockito.mock(SideEffect1.class);\n final SideEffect1<Feature> enabled = Mockito.mock(SideEffect1.class);\n this.options.setFeatures(Arrays.asList(\"-FSTATINIT\"));\n this.testee.describeFeatures(enabled, disabled);\n verify(enabled, never()).apply(Feature.named(\"FSTATINIT\"));\n verify(disabled).apply(Feature.named(\"FSTATINIT\"));\n}",
316
- "new_test_code": "@Test\npublic void shouldDescribeDisabledFeatures() {\n final Consumer<Feature> disabled = Mockito.mock(Consumer.class);\n final Consumer<Feature> enabled = Mockito.mock(Consumer.class);\n this.options.setFeatures(Arrays.asList(\"-FSTATINIT\"));\n this.testee.describeFeatures(enabled, disabled);\n verify(enabled, never()).accept(Feature.named(\"FSTATINIT\"));\n verify(disabled).accept(Feature.named(\"FSTATINIT\"));\n}",
317
- "old_test_file_path": [
318
- "pitest-entry/src/test/java/org/pitest/mutationtest/config/SettingsFactoryTest.java"
319
- ],
320
- "old_test_lnum": [
321
- "118-128"
322
- ],
323
- "new_test_lnum": [
324
- "118-128"
325
- ],
326
- "old_production_code": "public void describeFeatures(SideEffect1<Feature> enabled, SideEffect1<Feature> disabled) {\n final FeatureParser parser = new FeatureParser();\n final Collection<ProvidesFeature> available = new ArrayList<>(this.plugins.findInterceptors());\n final List<FeatureSetting> settings = parser.parseFeatures(this.options.getFeatures());\n final FeatureSelector<ProvidesFeature> selector = new FeatureSelector<>(settings, available);\n List<Feature> enabledFeatures = selector.getActiveFeatures().stream().map(toFeature()).distinct().sorted(byName()).collect(Collectors.toList());\n enabledFeatures.stream().forEach(each -> enabled.apply(each));\n available.stream().map(toFeature()).distinct().sorted(byName()).filter(f -> !enabledFeatures.contains(f)).forEach(each -> disabled.apply(each));\n}",
327
- "new_production_code": "public void describeFeatures(Consumer<Feature> enabled, Consumer<Feature> disabled) {\n final FeatureParser parser = new FeatureParser();\n final Collection<ProvidesFeature> available = new ArrayList<>(this.plugins.findInterceptors());\n final List<FeatureSetting> settings = parser.parseFeatures(this.options.getFeatures());\n final FeatureSelector<ProvidesFeature> selector = new FeatureSelector<>(settings, available);\n List<Feature> enabledFeatures = selector.getActiveFeatures().stream().map(toFeature()).distinct().sorted(byName()).collect(Collectors.toList());\n enabledFeatures.forEach(enabled);\n available.stream().map(toFeature()).distinct().sorted(byName()).filter(f -> !enabledFeatures.contains(f)).forEach(disabled);\n}",
328
- "focal_file_path": "pitest-entry/src/main/java/org/pitest/mutationtest/config/SettingsFactory.java",
329
- "focal_method_sign": "org/pitest/mutationtest/config/SettingsFactory.describeFeatures:(Lorg/pitest/functional/SideEffect1;Lorg/pitest/functional/SideEffect1;)V",
330
- "focal_all_deps_scored": [
331
- {
332
- "dep_id": 0,
333
- "method_sign": "org/pitest/mutationtest/config/SettingsFactory.describeFeatures:(Lorg/pitest/functional/SideEffect1;Lorg/pitest/functional/SideEffect1;)V",
334
- "file_path_old": "pitest-entry/src/main/java/org/pitest/mutationtest/config/SettingsFactory.java",
335
- "line_nums_old": "88-109",
336
- "file_path_new": "pitest-entry/src/main/java/org/pitest/mutationtest/config/SettingsFactory.java",
337
- "line_nums_new": "88-109",
338
- "dependency_updated": "updated",
339
- "score": null,
340
- "signal_scores": {}
341
- }
342
- ],
343
- "coverage_gold": 1.0,
344
- "branch_coverage_gold": 0.2813,
345
- "method_coverage_gold": 4.5494,
346
- "line_coverage_gold": 4.0035,
347
- "is_traceback": false,
348
- "commit_gap": {
349
- "count": 0,
350
- "skipped_commits": []
351
- },
352
- "test_is_refactoring_only": false,
353
- "has_test_dep_change": false,
354
- "all_deps_new": [
355
- "org/pitest/mutationtest/config/ReportOptions.setFeatures:(Ljava/util/Collection;)V",
356
- "org/pitest/plugin/Feature.equals:(Ljava/lang/Object;)Z",
357
- "org/pitest/plugin/Feature.named:(Ljava/lang/String;)Lorg/pitest/plugin/Feature",
358
- "org/pitest/mutationtest/config/SettingsFactory.describeFeatures:(Ljava/util/function/Consumer;Ljava/util/function/Consumer;)V"
359
- ],
360
- "all_deps_old": [
361
- "org/pitest/plugin/Feature.equals:(Ljava/lang/Object;)Z",
362
- "org/pitest/plugin/Feature.named:(Ljava/lang/String;)Lorg/pitest/plugin/Feature",
363
- "org/pitest/mutationtest/config/SettingsFactory.describeFeatures:(Lorg/pitest/functional/SideEffect1;Lorg/pitest/functional/SideEffect1;)V",
364
- "org/pitest/mutationtest/config/ReportOptions.setFeatures:(Ljava/util/Collection;)V"
365
- ],
366
- "deps_changes": [
367
- {
368
- "method_sign": "org/pitest/mutationtest/config/SettingsFactory.describeFeatures:(Lorg/pitest/functional/SideEffect1;Lorg/pitest/functional/SideEffect1;)V",
369
- "change_type": "UPDATE",
370
- "file_path_old": "pitest-entry/src/main/java/org/pitest/mutationtest/config/SettingsFactory.java",
371
- "file_path_new": "pitest-entry/src/main/java/org/pitest/mutationtest/config/SettingsFactory.java",
372
- "source": "production",
373
- "is_test_dependency": false,
374
- "is_refactoring_only": false
375
- }
376
- ],
377
- "variant_result": {
378
- "old_on_old": "pass",
379
- "old_on_new": "error",
380
- "new_on_old": "error",
381
- "new_on_new": "pass"
382
- }
383
- }
384
- ],
385
- "version": "pitest-parent-1.6.8",
386
- "java_version": 8
387
- },
388
- {
389
- "task_id": "hcoles_pitest-pitest-parent-1.6.8__c3d75bc_dbd10ef__CoverageDataTest_ae2c0a58",
390
- "project_name": "hcoles_pitest-pitest-parent-1.6.8",
391
- "git_clone_url": "https://github.com/hcoles/pitest.git",
392
- "rev1": "c3d75bc6fdc8f50d75fa9ee972fcb61e47bd7d18",
393
- "rev2": "dbd10effadad04bad700369c9bfca3b80a56f208",
394
- "rev1_date": "2021-04-28T11:32:52Z",
395
- "rev2_date": "2021-04-28T14:32:23Z",
396
- "git_diff_url": "https://github.com/hcoles/pitest/compare/c3d75bc6fdc8f50d75fa9ee972fcb61e47bd7d18...dbd10effadad04bad700369c9bfca3b80a56f208",
397
- "test_file": "pitest-entry/src/test/java/org/pitest/coverage/CoverageDataTest.java",
398
- "test_changes": [
399
- {
400
- "change_id": "15_hcoles_pitest-pitest-parent-1.6.8_c3d75bc_dbd10ef_CoverageDataTest",
401
- "test_sign": "org/pitest/coverage/CoverageDataTest.shouldReturnUniqueTestsForClassWhenSomeTestsCoverClass:()V",
402
- "class": "CoverageDataTest",
403
- "method": "shouldReturnUniqueTestsForClassWhenSomeTestsCoverClass",
404
- "module": "pitest-entry",
405
- "junit_selector": "org.pitest.coverage.CoverageDataTest#shouldReturnUniqueTestsForClassWhenSomeTestsCoverClass",
406
- "old_test_code": "@Test\npublic void shouldReturnUniqueTestsForClassWhenSomeTestsCoverClass() {\n this.testee.calculateClassCoverage(makeCoverageResult(\"foo\", \"fooTest\", 0, 1));\n this.testee.calculateClassCoverage(makeCoverageResult(\"foo\", \"fooTest\", 0, 2));\n this.testee.calculateClassCoverage(makeCoverageResult(\"foo\", \"fooTest2\", 0, 2));\n assertEquals(Arrays.asList(\"fooTest\", \"fooTest2\"), FCollection.map(this.testee.getTestsForClass(this.foo), testInfoToString()));\n}",
407
- "new_test_code": "@Test\npublic void shouldReturnUniqueTestsForClassWhenSomeTestsCoverClass() {\n this.testee.calculateClassCoverage(makeCoverageResult(\"foo\", \"fooTest\", 0, 1));\n this.testee.calculateClassCoverage(makeCoverageResult(\"foo\", \"fooTest\", 0, 2));\n this.testee.calculateClassCoverage(makeCoverageResult(\"foo\", \"fooTest2\", 0, 2));\n List<String> actual = FCollection.map(this.testee.getTestsForClass(this.foo), testInfoToString());\n assertThat(actual).containsExactlyInAnyOrder(\"fooTest\", \"fooTest2\");\n}",
408
- "old_test_file_path": [
409
- "pitest-entry/src/test/java/org/pitest/coverage/CoverageDataTest.java"
410
- ],
411
- "old_test_lnum": [
412
- "133-143"
413
- ],
414
- "new_test_lnum": [
415
- "134-146"
416
- ],
417
- "old_production_code": "@Override\npublic Collection<TestInfo> getTestsForClass(final ClassName clazz) {\n return this.instructionCoverage.entrySet().stream().filter(isFor(clazz)).flatMap(toTests()).collect(toCollection(() -> new TreeSet<>(new TestInfoNameComparator())));\n}",
418
- "new_production_code": "@Override\npublic Collection<TestInfo> getTestsForClass(final ClassName clazz) {\n return classCoverage.getOrDefault(clazz, Collections.emptySet());\n}",
419
- "focal_file_path": "pitest-entry/src/main/java/org/pitest/coverage/CoverageData.java",
420
- "focal_method_sign": "org/pitest/coverage/CoverageData.getTestsForClass:(Lorg/pitest/classinfo/ClassName;)Ljava/util/Collection",
421
- "focal_all_deps_scored": [
422
- {
423
- "dep_id": 1,
424
- "method_sign": "org/pitest/coverage/CoverageData.getTestsForClass:(Lorg/pitest/classinfo/ClassName;)Ljava/util/Collection",
425
- "file_path_old": "pitest-entry/src/main/java/org/pitest/coverage/CoverageData.java",
426
- "line_nums_old": "118-124",
427
- "file_path_new": "pitest-entry/src/main/java/org/pitest/coverage/CoverageData.java",
428
- "line_nums_new": "146-149",
429
- "dependency_updated": "updated",
430
- "score": 0.3994,
431
- "signal_scores": {
432
- "nc": 0.0,
433
- "lcs_u": 0.9375,
434
- "ed": 0.2778,
435
- "class": 1.0,
436
- "tfidf": 0.0
437
- }
438
- },
439
- {
440
- "dep_id": 0,
441
- "method_sign": "org/pitest/coverage/CoverageData.calculateClassCoverage:(Lorg/pitest/coverage/CoverageResult;)V",
442
- "file_path_old": "pitest-entry/src/main/java/org/pitest/coverage/CoverageData.java",
443
- "line_nums_old": "126-137",
444
- "file_path_new": "pitest-entry/src/main/java/org/pitest/coverage/CoverageData.java",
445
- "line_nums_new": "78-92",
446
- "dependency_updated": "updated",
447
- "score": 0.3543,
448
- "signal_scores": {
449
- "nc": 0.0,
450
- "lcs_u": 0.6818,
451
- "ed": 0.2778,
452
- "class": 1.0,
453
- "tfidf": 0.0
454
- }
455
- }
456
- ],
457
- "coverage_gold": 1.0,
458
- "branch_coverage_gold": 1.391,
459
- "method_coverage_gold": 1.0213,
460
- "line_coverage_gold": 1.3545,
461
- "is_traceback": false,
462
- "commit_gap": {
463
- "count": 0,
464
- "skipped_commits": []
465
- },
466
- "test_is_refactoring_only": false,
467
- "has_test_dep_change": false,
468
- "all_deps_new": [
469
- "org/pitest/coverage/CoverageData.calculateClassCoverage:(Lorg/pitest/coverage/CoverageResult;)V",
470
- "org/pitest/functional/FCollection.map:(Ljava/lang/Iterable;Ljava/util/function/Function;)Ljava/util/List",
471
- "org/pitest/coverage/CoverageDataTest.makeCoverageResult:(Ljava/lang/String;Ljava/lang/String;II)Lorg/pitest/coverage/CoverageResult",
472
- "org/pitest/coverage/CoverageData.getTestsForClass:(Lorg/pitest/classinfo/ClassName;)Ljava/util/Collection",
473
- "org/pitest/coverage/CoverageDataTest.testInfoToString:()Ljava/util/function/Function"
474
- ],
475
- "all_deps_old": [
476
- "org/pitest/coverage/CoverageData.calculateClassCoverage:(Lorg/pitest/coverage/CoverageResult;)V",
477
- "org/pitest/functional/FCollection.map:(Ljava/lang/Iterable;Ljava/util/function/Function;)Ljava/util/List",
478
- "org/pitest/coverage/CoverageData.getTestsForClass:(Lorg/pitest/classinfo/ClassName;)Ljava/util/Collection",
479
- "org/pitest/coverage/CoverageDataTest.testInfoToString:()Ljava/util/function/Function",
480
- "org/pitest/coverage/CoverageDataTest.makeCoverageResult:(Ljava/lang/String;Ljava/lang/String;II)Lorg/pitest/coverage/CoverageResult"
481
- ],
482
- "deps_changes": [
483
- {
484
- "method_sign": "org/pitest/coverage/CoverageData.calculateClassCoverage:(Lorg/pitest/coverage/CoverageResult;)V",
485
- "change_type": "UPDATE",
486
- "file_path_old": "pitest-entry/src/main/java/org/pitest/coverage/CoverageData.java",
487
- "file_path_new": "pitest-entry/src/main/java/org/pitest/coverage/CoverageData.java",
488
- "source": "production",
489
- "is_test_dependency": false,
490
- "is_refactoring_only": false
491
- },
492
- {
493
- "method_sign": "org/pitest/coverage/CoverageData.getTestsForClass:(Lorg/pitest/classinfo/ClassName;)Ljava/util/Collection",
494
- "change_type": "UPDATE",
495
- "file_path_old": "pitest-entry/src/main/java/org/pitest/coverage/CoverageData.java",
496
- "file_path_new": "pitest-entry/src/main/java/org/pitest/coverage/CoverageData.java",
497
- "source": "production",
498
- "is_test_dependency": false,
499
- "is_refactoring_only": false
500
- }
501
- ],
502
- "variant_result": {
503
- "old_on_old": "pass",
504
- "old_on_new": "fail",
505
- "new_on_old": "error",
506
- "new_on_new": "pass"
507
- }
508
- }
509
- ],
510
- "version": "pitest-parent-1.6.8",
511
- "java_version": 8
512
- }
513
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
houbb_opencc4j-master.json DELETED
@@ -1,1176 +0,0 @@
1
- [
2
- {
3
- "task_id": "houbb_opencc4j-master__7f18101_9b352ab__ZhConvertBsMyDataMapTest_41f20667",
4
- "project_name": "houbb_opencc4j-master",
5
- "git_clone_url": "https://github.com/houbb/opencc4j.git",
6
- "rev1": "7f181010d8503b187128633abc3111e1f51be282",
7
- "rev2": "9b352abf8e354747299ce5fc405952c63eb5f9f4",
8
- "rev1_date": "2025-04-11T05:59:36Z",
9
- "rev2_date": "2025-04-11T07:02:05Z",
10
- "git_diff_url": "https://github.com/houbb/opencc4j/compare/7f181010d8503b187128633abc3111e1f51be282...9b352abf8e354747299ce5fc405952c63eb5f9f4",
11
- "test_file": "src/test/java/com/github/houbb/opencc4j/bs/ZhConvertBsMyDataMapTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "21_houbb_opencc4j-master_7f18101_9b352ab_ZhConvertBsMyDataMapTest",
15
- "test_sign": "com/github/houbb/opencc4j/bs/ZhConvertBsMyDataMapTest.defaultConfigTest:()V",
16
- "class": "ZhConvertBsMyDataMapTest",
17
- "method": "defaultConfigTest",
18
- "module": "",
19
- "junit_selector": "com.github.houbb.opencc4j.bs.ZhConvertBsMyDataMapTest#defaultConfigTest",
20
- "old_test_code": "@Test\npublic void defaultConfigTest() {\n final IDataMap dataMap = new MyFooDataMapExtra();\n final Segment segment = new DataMapFastForwardSegment(dataMap);\n ZhConvertBootstrap bs = ZhConvertBootstrap.newInstance().dataMap(dataMap).segment(segment);\n Assert.assertEquals(bs.toTraditional(\"\u4eba\u751f\u81ea\u662f\u6709\u60c5\u75f4,\u6b64\u6068\u4e0d\u5173\u98ce\u6708\"), \"\u4eba\u751f\u81ea\u662f\u6709\u60c5\u7661,\u6b64\u6068\u4e0d\u95dc\u98a8\u73a5\");\n Assert.assertEquals(bs.toSimple(\"\u4eba\u751f\u81ea\u662f\u6709\u60c5\u7661,\u6b64\u6068\u4e0d\u95dc\u98a8\u73a5\"), \"\u4eba\u751f\u81ea\u662f\u6709\u60c5\u75f4,\u6b64\u6068\u4e0d\u5173\u98ce\u6708\");\n}",
21
- "new_test_code": "@Test\npublic void defaultConfigTest() {\n final IDataMap dataMap = new MyFooDataMapExtra();\n final Segment segment = new DataMapFastForwardSegment(dataMap);\n ZhConvertBootstrap bs = ZhConvertBootstrap.newInstance().dataMap(dataMap).segment(segment).init();\n Assert.assertEquals(bs.toTraditional(\"\u4eba\u751f\u81ea\u662f\u6709\u60c5\u75f4,\u6b64\u6068\u4e0d\u5173\u98ce\u6708\"), \"\u4eba\u751f\u81ea\u662f\u6709\u60c5\u7661,\u6b64\u6068\u4e0d\u95dc\u98a8\u73a5\");\n Assert.assertEquals(bs.toSimple(\"\u4eba\u751f\u81ea\u662f\u6709\u60c5\u7661,\u6b64\u6068\u4e0d\u95dc\u98a8\u73a5\"), \"\u4eba\u751f\u81ea\u662f\u6709\u60c5\u75f4,\u6b64\u6068\u4e0d\u5173\u98ce\u6708\");\n}",
22
- "old_test_file_path": [
23
- "src/test/java/com/github/houbb/opencc4j/bs/ZhConvertBsMyDataMapTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "24-40"
27
- ],
28
- "new_test_lnum": [
29
- "24-41"
30
- ],
31
- "old_production_code": "",
32
- "new_production_code": "public ZhConvertBootstrap init() {\n this.context = ZhConvertCoreContext.newInstance().zhChars(zhChar).segment(segment).unitConvert(unitConvert).dataMap(dataMap);\n return this;\n}",
33
- "focal_file_path": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
34
- "focal_method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
39
- "file_path_old": null,
40
- "line_nums_old": null,
41
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
42
- "line_nums_new": "137-145",
43
- "dependency_updated": "inserted",
44
- "score": 0.2954,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 0.75,
48
- "ed": 0.1765,
49
- "class": 0.0,
50
- "tfidf": 0.5693
51
- }
52
- },
53
- {
54
- "dep_id": 3,
55
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toSimple:(Ljava/lang/String;)Ljava/lang/String",
56
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
57
- "line_nums_old": "106-109",
58
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
59
- "line_nums_new": "147-150",
60
- "dependency_updated": "updated",
61
- "score": 0.1802,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 0.5,
65
- "ed": 0.1765,
66
- "class": 0.0,
67
- "tfidf": 0.2674
68
- }
69
- },
70
- {
71
- "dep_id": 2,
72
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.dataMap:(Lcom/github/houbb/opencc4j/support/datamap/IDataMap;)Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
73
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
74
- "line_nums_old": "91-94",
75
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
76
- "line_nums_new": "112-117",
77
- "dependency_updated": "updated",
78
- "score": 0.1725,
79
- "signal_scores": {
80
- "nc": 0.0,
81
- "lcs_u": 0.4286,
82
- "ed": 0.1765,
83
- "class": 0.0,
84
- "tfidf": 0.2881
85
- }
86
- },
87
- {
88
- "dep_id": 1,
89
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
90
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
91
- "line_nums_old": "111-114",
92
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
93
- "line_nums_new": "152-155",
94
- "dependency_updated": "updated",
95
- "score": 0.1463,
96
- "signal_scores": {
97
- "nc": 0.0,
98
- "lcs_u": 0.3077,
99
- "ed": 0.1765,
100
- "class": 0.0,
101
- "tfidf": 0.2674
102
- }
103
- }
104
- ],
105
- "coverage_gold": 1.0,
106
- "branch_coverage_gold": 15.3846,
107
- "method_coverage_gold": 40.6699,
108
- "line_coverage_gold": 36.3469,
109
- "is_traceback": false,
110
- "commit_gap": {
111
- "count": 0,
112
- "skipped_commits": []
113
- },
114
- "test_is_refactoring_only": false,
115
- "has_test_dep_change": false,
116
- "all_deps_new": [
117
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
118
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.segment:(Lcom/github/houbb/opencc4j/support/segment/Segment;)Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
119
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
120
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
121
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.dataMap:(Lcom/github/houbb/opencc4j/support/datamap/IDataMap;)Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
122
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toSimple:(Ljava/lang/String;)Ljava/lang/String"
123
- ],
124
- "all_deps_old": [
125
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.segment:(Lcom/github/houbb/opencc4j/support/segment/Segment;)Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
126
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
127
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.dataMap:(Lcom/github/houbb/opencc4j/support/datamap/IDataMap;)Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
128
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
129
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toSimple:(Ljava/lang/String;)Ljava/lang/String"
130
- ],
131
- "deps_changes": [
132
- {
133
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
134
- "change_type": "ADD",
135
- "file_path_old": null,
136
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
137
- "source": "production",
138
- "is_test_dependency": false,
139
- "is_refactoring_only": false
140
- },
141
- {
142
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
143
- "change_type": "UPDATE",
144
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
145
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
146
- "source": "production",
147
- "is_test_dependency": false,
148
- "is_refactoring_only": true
149
- },
150
- {
151
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.dataMap:(Lcom/github/houbb/opencc4j/support/datamap/IDataMap;)Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
152
- "change_type": "UPDATE",
153
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
154
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
155
- "source": "production",
156
- "is_test_dependency": false,
157
- "is_refactoring_only": true
158
- },
159
- {
160
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toSimple:(Ljava/lang/String;)Ljava/lang/String",
161
- "change_type": "UPDATE",
162
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
163
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
164
- "source": "production",
165
- "is_test_dependency": false,
166
- "is_refactoring_only": true
167
- }
168
- ],
169
- "variant_result": {
170
- "old_on_old": "pass",
171
- "old_on_new": "fail",
172
- "new_on_old": "error",
173
- "new_on_new": "pass"
174
- }
175
- }
176
- ],
177
- "version": "master",
178
- "java_version": 11
179
- },
180
- {
181
- "task_id": "houbb_opencc4j-master__7f18101_9b352ab__ZhConvertBsTest_a8c21b6d",
182
- "project_name": "houbb_opencc4j-master",
183
- "git_clone_url": "https://github.com/houbb/opencc4j.git",
184
- "rev1": "7f181010d8503b187128633abc3111e1f51be282",
185
- "rev2": "9b352abf8e354747299ce5fc405952c63eb5f9f4",
186
- "rev1_date": "2025-04-11T05:59:36Z",
187
- "rev2_date": "2025-04-11T07:02:05Z",
188
- "git_diff_url": "https://github.com/houbb/opencc4j/compare/7f181010d8503b187128633abc3111e1f51be282...9b352abf8e354747299ce5fc405952c63eb5f9f4",
189
- "test_file": "src/test/java/com/github/houbb/opencc4j/bs/ZhConvertBsTest.java",
190
- "test_changes": [
191
- {
192
- "change_id": "24_houbb_opencc4j-master_7f18101_9b352ab_ZhConvertBsTest",
193
- "test_sign": "com/github/houbb/opencc4j/bs/ZhConvertBsTest.defineSegmentTest:()V",
194
- "class": "ZhConvertBsTest",
195
- "method": "defineSegmentTest",
196
- "module": "",
197
- "junit_selector": "com.github.houbb.opencc4j.bs.ZhConvertBsTest#defineSegmentTest",
198
- "old_test_code": "@Test\npublic void defineSegmentTest() {\n final String original = \"\u5be5\u843d\u53e4\u884c\u5bab\uff0c\u5bab\u82b1\u5bc2\u5bde\u7ea2\u3002\u767d\u5934\u5bab\u5973\u5728\uff0c\u95f2\u5750\u8bf4\u7384\u5b97\u3002\";\n final Segment segment = new FooSegment();\n final String result = ZhConvertBootstrap.newInstance().segment(segment).toTraditional(original);\n Assert.assertEquals(\"\u5be5\u843d\u53e4\u884c\u5bae\uff0c\u5bae\u82b1\u5bc2\u5bde\u7d05\u3002\u767d\u982d\u5bae\u5973\u5728\uff0c\u9592\u5750\u8aaa\u7384\u5b97\u3002\u6e2c\u8a66\", result);\n}",
199
- "new_test_code": "@Test\npublic void defineSegmentTest() {\n final String original = \"\u5be5\u843d\u53e4\u884c\u5bab\uff0c\u5bab\u82b1\u5bc2\u5bde\u7ea2\u3002\u767d\u5934\u5bab\u5973\u5728\uff0c\u95f2\u5750\u8bf4\u7384\u5b97\u3002\";\n final Segment segment = new FooSegment();\n final String result = ZhConvertBootstrap.newInstance().segment(segment).init().toTraditional(original);\n Assert.assertEquals(\"\u5be5\u843d\u53e4\u884c\u5bae\uff0c\u5bae\u82b1\u5bc2\u5bde\u7d05\u3002\u767d\u982d\u5bae\u5973\u5728\uff0c\u9592\u5750\u8aaa\u7384\u5b97\u3002\u6e2c\u8a66\", result);\n}",
200
- "old_test_file_path": [
201
- "src/test/java/com/github/houbb/opencc4j/bs/ZhConvertBsTest.java"
202
- ],
203
- "old_test_lnum": [
204
- "41-51"
205
- ],
206
- "new_test_lnum": [
207
- "43-54"
208
- ],
209
- "old_production_code": "",
210
- "new_production_code": "public ZhConvertBootstrap init() {\n this.context = ZhConvertCoreContext.newInstance().zhChars(zhChar).segment(segment).unitConvert(unitConvert).dataMap(dataMap);\n return this;\n}",
211
- "focal_file_path": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
212
- "focal_method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
213
- "focal_all_deps_scored": [
214
- {
215
- "dep_id": 0,
216
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
217
- "file_path_old": null,
218
- "line_nums_old": null,
219
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
220
- "line_nums_new": "137-145",
221
- "dependency_updated": "inserted",
222
- "score": 0.2348,
223
- "signal_scores": {
224
- "nc": 0.0,
225
- "lcs_u": 0.75,
226
- "ed": 0.1765,
227
- "class": 0.0,
228
- "tfidf": 0.3118
229
- }
230
- },
231
- {
232
- "dep_id": 1,
233
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
234
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
235
- "line_nums_old": "111-114",
236
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
237
- "line_nums_new": "152-155",
238
- "dependency_updated": "updated",
239
- "score": 0.114,
240
- "signal_scores": {
241
- "nc": 0.0,
242
- "lcs_u": 0.2308,
243
- "ed": 0.0588,
244
- "class": 0.0,
245
- "tfidf": 0.2703
246
- }
247
- }
248
- ],
249
- "coverage_gold": 1.0,
250
- "branch_coverage_gold": 10.8974,
251
- "method_coverage_gold": 28.2297,
252
- "line_coverage_gold": 25.4613,
253
- "is_traceback": false,
254
- "commit_gap": {
255
- "count": 0,
256
- "skipped_commits": []
257
- },
258
- "test_is_refactoring_only": false,
259
- "has_test_dep_change": false,
260
- "all_deps_new": [
261
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.segment:(Lcom/github/houbb/opencc4j/support/segment/Segment;)Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
262
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
263
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
264
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap"
265
- ],
266
- "all_deps_old": [
267
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.segment:(Lcom/github/houbb/opencc4j/support/segment/Segment;)Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
268
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
269
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String"
270
- ],
271
- "deps_changes": [
272
- {
273
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
274
- "change_type": "ADD",
275
- "file_path_old": null,
276
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
277
- "source": "production",
278
- "is_test_dependency": false,
279
- "is_refactoring_only": false
280
- },
281
- {
282
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
283
- "change_type": "UPDATE",
284
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
285
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
286
- "source": "production",
287
- "is_test_dependency": false,
288
- "is_refactoring_only": true
289
- }
290
- ],
291
- "variant_result": {
292
- "old_on_old": "pass",
293
- "old_on_new": "fail",
294
- "new_on_old": "error",
295
- "new_on_new": "pass"
296
- }
297
- }
298
- ],
299
- "version": "master",
300
- "java_version": 11
301
- },
302
- {
303
- "task_id": "houbb_opencc4j-master__7f18101_9b352ab__ZhConvertBootstrapTest_72fcbde7",
304
- "project_name": "houbb_opencc4j-master",
305
- "git_clone_url": "https://github.com/houbb/opencc4j.git",
306
- "rev1": "7f181010d8503b187128633abc3111e1f51be282",
307
- "rev2": "9b352abf8e354747299ce5fc405952c63eb5f9f4",
308
- "rev1_date": "2025-04-11T05:59:36Z",
309
- "rev2_date": "2025-04-11T07:02:05Z",
310
- "git_diff_url": "https://github.com/houbb/opencc4j/compare/7f181010d8503b187128633abc3111e1f51be282...9b352abf8e354747299ce5fc405952c63eb5f9f4",
311
- "test_file": "src/test/java/com/github/houbb/opencc4j/core/ZhConvertBootstrapTest.java",
312
- "test_changes": [
313
- {
314
- "change_id": "14_houbb_opencc4j-master_7f18101_9b352ab_ZhConvertBootstrapTest",
315
- "test_sign": "com/github/houbb/opencc4j/core/ZhConvertBootstrapTest.isTraditional:()V",
316
- "class": "ZhConvertBootstrapTest",
317
- "method": "isTraditional",
318
- "module": "",
319
- "junit_selector": "com.github.houbb.opencc4j.core.ZhConvertBootstrapTest#isTraditional",
320
- "old_test_code": "@Test\npublic void isTraditional() {\n final String simpleChar = \"\u594b\";\n final String simplePhrase = \"\u594b\u6597\";\n final String traditionalChar = \"\u596e\";\n final String traditionalPhrase = \"\u596e\u9b25\";\n ZhConvertBootstrap convertBootstrap = ZhConvertBootstrap.newInstance();\n Assert.assertTrue(convertBootstrap.isTraditional(traditionalChar));\n Assert.assertTrue(convertBootstrap.isTraditional(traditionalPhrase));\n Assert.assertFalse(convertBootstrap.isTraditional(simpleChar));\n Assert.assertFalse(convertBootstrap.isTraditional(simplePhrase));\n}",
321
- "new_test_code": "@Test\npublic void isTraditional() {\n final String simpleChar = \"\u594b\";\n final String simplePhrase = \"\u594b\u6597\";\n final String traditionalChar = \"\u596e\";\n final String traditionalPhrase = \"\u596e\u9b25\";\n ZhConvertBootstrap convertBootstrap = ZhConvertBootstrap.newInstance().init();\n Assert.assertTrue(convertBootstrap.isTraditional(traditionalChar));\n Assert.assertTrue(convertBootstrap.isTraditional(traditionalPhrase));\n Assert.assertFalse(convertBootstrap.isTraditional(simpleChar));\n Assert.assertFalse(convertBootstrap.isTraditional(simplePhrase));\n}",
322
- "old_test_file_path": [
323
- "src/test/java/com/github/houbb/opencc4j/core/ZhConvertBootstrapTest.java"
324
- ],
325
- "old_test_lnum": [
326
- "89-102"
327
- ],
328
- "new_test_lnum": [
329
- "89-102"
330
- ],
331
- "old_production_code": "@Override\npublic boolean isTraditional(String charOrPhrase) {\n if (StringUtil.isEmpty(charOrPhrase)) {\n return false;\n }\n List<String> chars = toCharList(charOrPhrase);\n for (String c : chars) {\n if (!isTraditionalForSingle(c)) {\n return false;\n }\n }\n return true;\n}",
332
- "new_production_code": "@Override\npublic boolean isTraditional(String charOrPhrase) {\n return zhConvertCore.isTraditional(charOrPhrase, context);\n}",
333
- "focal_file_path": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
334
- "focal_method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.isTraditional:(Ljava/lang/String;)Z",
335
- "focal_all_deps_scored": [
336
- {
337
- "dep_id": 1,
338
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.isTraditional:(Ljava/lang/String;)Z",
339
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
340
- "line_nums_old": "227-242",
341
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
342
- "line_nums_new": "203-206",
343
- "dependency_updated": "updated",
344
- "score": 0.7647,
345
- "signal_scores": {
346
- "nc": 1.0,
347
- "lcs_u": 1.0,
348
- "ed": 1.0,
349
- "class": 1.0,
350
- "tfidf": 0.0
351
- }
352
- },
353
- {
354
- "dep_id": 0,
355
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
356
- "file_path_old": null,
357
- "line_nums_old": null,
358
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
359
- "line_nums_new": "137-145",
360
- "dependency_updated": "inserted",
361
- "score": 0.4107,
362
- "signal_scores": {
363
- "nc": 0.0,
364
- "lcs_u": 0.75,
365
- "ed": 0.2308,
366
- "class": 1.0,
367
- "tfidf": 0.2213
368
- }
369
- }
370
- ],
371
- "coverage_gold": 1.0,
372
- "branch_coverage_gold": 28.8462,
373
- "method_coverage_gold": 30.622,
374
- "line_coverage_gold": 32.1033,
375
- "is_traceback": false,
376
- "commit_gap": {
377
- "count": 0,
378
- "skipped_commits": []
379
- },
380
- "test_is_refactoring_only": false,
381
- "has_test_dep_change": false,
382
- "all_deps_new": [
383
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.isTraditional:(Ljava/lang/String;)Z",
384
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
385
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap"
386
- ],
387
- "all_deps_old": [
388
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.isTraditional:(Ljava/lang/String;)Z",
389
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap"
390
- ],
391
- "deps_changes": [
392
- {
393
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
394
- "change_type": "ADD",
395
- "file_path_old": null,
396
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
397
- "source": "production",
398
- "is_test_dependency": false,
399
- "is_refactoring_only": false
400
- },
401
- {
402
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.isTraditional:(Ljava/lang/String;)Z",
403
- "change_type": "UPDATE",
404
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
405
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
406
- "source": "production",
407
- "is_test_dependency": false,
408
- "is_refactoring_only": true
409
- }
410
- ],
411
- "variant_result": {
412
- "old_on_old": "pass",
413
- "old_on_new": "fail",
414
- "new_on_old": "error",
415
- "new_on_new": "pass"
416
- }
417
- },
418
- {
419
- "change_id": "15_houbb_opencc4j-master_7f18101_9b352ab_ZhConvertBootstrapTest",
420
- "test_sign": "com/github/houbb/opencc4j/core/ZhConvertBootstrapTest.traditionalListTest:()V",
421
- "class": "ZhConvertBootstrapTest",
422
- "method": "traditionalListTest",
423
- "module": "",
424
- "junit_selector": "com.github.houbb.opencc4j.core.ZhConvertBootstrapTest#traditionalListTest",
425
- "old_test_code": "@Test\npublic void traditionalListTest() {\n final String original = \"\u751f\u547d\u4e0d\u606f\u596e\u9b25\u4e0d\u6b62\";\n ZhConvertBootstrap zhConvertBootstrap = ZhConvertBootstrap.newInstance();\n final List<String> resultList = zhConvertBootstrap.traditionalList(original);\n String expectToString = \"[\u751f, \u547d, \u4e0d, \u606f, \u596e, \u9b25, \u4e0d, \u6b62]\";\n Assert.assertEquals(expectToString, resultList.toString());\n}",
426
- "new_test_code": "@Test\npublic void traditionalListTest() {\n final String original = \"\u751f\u547d\u4e0d\u606f\u596e\u9b25\u4e0d\u6b62\";\n ZhConvertBootstrap zhConvertBootstrap = ZhConvertBootstrap.newInstance().init();\n final List<String> resultList = zhConvertBootstrap.traditionalList(original);\n String expectToString = \"[\u751f, \u547d, \u4e0d, \u606f, \u596e, \u9b25, \u4e0d, \u6b62]\";\n Assert.assertEquals(expectToString, resultList.toString());\n}",
427
- "old_test_file_path": [
428
- "src/test/java/com/github/houbb/opencc4j/core/ZhConvertBootstrapTest.java"
429
- ],
430
- "old_test_lnum": [
431
- "123-131"
432
- ],
433
- "new_test_lnum": [
434
- "123-131"
435
- ],
436
- "old_production_code": "@Override\npublic List<String> traditionalList(String original) {\n List<String> traditionalList = Guavas.newArrayList();\n List<String> segList = this.doSeg(original);\n for (String seg : segList) {\n if (isTraditional(seg)) {\n traditionalList.add(seg);\n }\n }\n return traditionalList;\n}",
437
- "new_production_code": "@Override\npublic List<String> traditionalList(String original) {\n return zhConvertCore.traditionalList(original, context);\n}",
438
- "focal_file_path": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
439
- "focal_method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.traditionalList:(Ljava/lang/String;)Ljava/util/List",
440
- "focal_all_deps_scored": [
441
- {
442
- "dep_id": 0,
443
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.traditionalList:(Ljava/lang/String;)Ljava/util/List",
444
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
445
- "line_nums_old": "145-156",
446
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
447
- "line_nums_new": "178-181",
448
- "dependency_updated": "updated",
449
- "score": 0.4947,
450
- "signal_scores": {
451
- "nc": 0.0,
452
- "lcs_u": 1.0,
453
- "ed": 0.7895,
454
- "class": 1.0,
455
- "tfidf": 0.0
456
- }
457
- },
458
- {
459
- "dep_id": 1,
460
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
461
- "file_path_old": null,
462
- "line_nums_old": null,
463
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
464
- "line_nums_new": "137-145",
465
- "dependency_updated": "inserted",
466
- "score": 0.4556,
467
- "signal_scores": {
468
- "nc": 0.0,
469
- "lcs_u": 1.0,
470
- "ed": 0.2105,
471
- "class": 1.0,
472
- "tfidf": 0.2389
473
- }
474
- }
475
- ],
476
- "coverage_gold": 1.0,
477
- "branch_coverage_gold": 30.7692,
478
- "method_coverage_gold": 33.4928,
479
- "line_coverage_gold": 34.8708,
480
- "is_traceback": false,
481
- "commit_gap": {
482
- "count": 0,
483
- "skipped_commits": []
484
- },
485
- "test_is_refactoring_only": false,
486
- "has_test_dep_change": false,
487
- "all_deps_new": [
488
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
489
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
490
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.traditionalList:(Ljava/lang/String;)Ljava/util/List"
491
- ],
492
- "all_deps_old": [
493
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
494
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.traditionalList:(Ljava/lang/String;)Ljava/util/List"
495
- ],
496
- "deps_changes": [
497
- {
498
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.traditionalList:(Ljava/lang/String;)Ljava/util/List",
499
- "change_type": "UPDATE",
500
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
501
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
502
- "source": "production",
503
- "is_test_dependency": false,
504
- "is_refactoring_only": true
505
- },
506
- {
507
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
508
- "change_type": "ADD",
509
- "file_path_old": null,
510
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
511
- "source": "production",
512
- "is_test_dependency": false,
513
- "is_refactoring_only": false
514
- }
515
- ],
516
- "variant_result": {
517
- "old_on_old": "pass",
518
- "old_on_new": "fail",
519
- "new_on_old": "error",
520
- "new_on_new": "pass"
521
- }
522
- },
523
- {
524
- "change_id": "16_houbb_opencc4j-master_7f18101_9b352ab_ZhConvertBootstrapTest",
525
- "test_sign": "com/github/houbb/opencc4j/core/ZhConvertBootstrapTest.segmentTest:()V",
526
- "class": "ZhConvertBootstrapTest",
527
- "method": "segmentTest",
528
- "module": "",
529
- "junit_selector": "com.github.houbb.opencc4j.core.ZhConvertBootstrapTest#segmentTest",
530
- "old_test_code": "@Test\npublic void segmentTest() {\n final String original = \"\u5be5\u843d\u53e4\u884c\u5bab\uff0c\u5bab\u82b1\u5bc2\u5bde\u7ea2\u3002\u767d\u5934\u5bab\u5973\u5728\uff0c\u95f2\u5750\u8bf4\u7384\u5b97\u3002\";\n final String result = ZhConvertBootstrap.newInstance().toTraditional(original);\n Assert.assertEquals(\"\u5be5\u843d\u53e4\u884c\u5bae\uff0c\u5bae\u82b1\u5bc2\u5bde\u7d05\u3002\u767d\u982d\u5bae\u5973\u5728\uff0c\u9592\u5750\u8aaa\u7384\u5b97\u3002\", result);\n final String result2 = ZhConvertBootstrap.newInstance().segment(new FooSegment()).toTraditional(original);\n Assert.assertEquals(\"\u5be5\u843d\u53e4\u884c\u5bae\uff0c\u5bae\u82b1\u5bc2\u5bde\u7d05\u3002\u767d\u982d\u5bae\u5973\u5728\uff0c\u9592\u5750\u8aaa\u7384\u5b97\u3002\u6e2c\u8a66\", result2);\n}",
531
- "new_test_code": "@Test\npublic void segmentTest() {\n final String original = \"\u5be5\u843d\u53e4\u884c\u5bab\uff0c\u5bab\u82b1\u5bc2\u5bde\u7ea2\u3002\u767d\u5934\u5bab\u5973\u5728\uff0c\u95f2\u5750\u8bf4\u7384\u5b97\u3002\";\n final String result = ZhConvertBootstrap.newInstance().init().toTraditional(original);\n Assert.assertEquals(\"\u5be5\u843d\u53e4\u884c\u5bae\uff0c\u5bae\u82b1\u5bc2\u5bde\u7d05\u3002\u767d\u982d\u5bae\u5973\u5728\uff0c\u9592\u5750\u8aaa\u7384\u5b97\u3002\", result);\n final String result2 = ZhConvertBootstrap.newInstance().segment(new FooSegment()).init().toTraditional(original);\n Assert.assertEquals(\"\u5be5\u843d\u53e4\u884c\u5bae\uff0c\u5bae\u82b1\u5bc2\u5bde\u7d05\u3002\u767d\u982d\u5bae\u5973\u5728\uff0c\u9592\u5750\u8aaa\u7384\u5b97\u3002\u6e2c\u8a66\", result2);\n}",
532
- "old_test_file_path": [
533
- "src/test/java/com/github/houbb/opencc4j/core/ZhConvertBootstrapTest.java"
534
- ],
535
- "old_test_lnum": [
536
- "43-51"
537
- ],
538
- "new_test_lnum": [
539
- "43-51"
540
- ],
541
- "old_production_code": "",
542
- "new_production_code": "public ZhConvertBootstrap init() {\n this.context = ZhConvertCoreContext.newInstance().zhChars(zhChar).segment(segment).unitConvert(unitConvert).dataMap(dataMap);\n return this;\n}",
543
- "focal_file_path": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
544
- "focal_method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
545
- "focal_all_deps_scored": [
546
- {
547
- "dep_id": 0,
548
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
549
- "file_path_old": null,
550
- "line_nums_old": null,
551
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
552
- "line_nums_new": "137-145",
553
- "dependency_updated": "inserted",
554
- "score": 0.3536,
555
- "signal_scores": {
556
- "nc": 0.0,
557
- "lcs_u": 0.5,
558
- "ed": 0.1818,
559
- "class": 1.0,
560
- "tfidf": 0.2007
561
- }
562
- },
563
- {
564
- "dep_id": 1,
565
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
566
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
567
- "line_nums_old": "111-114",
568
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
569
- "line_nums_new": "152-155",
570
- "dependency_updated": "updated",
571
- "score": 0.2946,
572
- "signal_scores": {
573
- "nc": 0.0,
574
- "lcs_u": 0.2308,
575
- "ed": 0.0769,
576
- "class": 1.0,
577
- "tfidf": 0.2253
578
- }
579
- }
580
- ],
581
- "coverage_gold": 1.0,
582
- "branch_coverage_gold": 11.5385,
583
- "method_coverage_gold": 32.0574,
584
- "line_coverage_gold": 28.7823,
585
- "is_traceback": false,
586
- "commit_gap": {
587
- "count": 0,
588
- "skipped_commits": []
589
- },
590
- "test_is_refactoring_only": false,
591
- "has_test_dep_change": false,
592
- "all_deps_new": [
593
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
594
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.segment:(Lcom/github/houbb/opencc4j/support/segment/Segment;)Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
595
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
596
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap"
597
- ],
598
- "all_deps_old": [
599
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.segment:(Lcom/github/houbb/opencc4j/support/segment/Segment;)Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
600
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
601
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap"
602
- ],
603
- "deps_changes": [
604
- {
605
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
606
- "change_type": "ADD",
607
- "file_path_old": null,
608
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
609
- "source": "production",
610
- "is_test_dependency": false,
611
- "is_refactoring_only": false
612
- },
613
- {
614
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
615
- "change_type": "UPDATE",
616
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
617
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
618
- "source": "production",
619
- "is_test_dependency": false,
620
- "is_refactoring_only": true
621
- }
622
- ],
623
- "variant_result": {
624
- "old_on_old": "pass",
625
- "old_on_new": "fail",
626
- "new_on_old": "error",
627
- "new_on_new": "pass"
628
- }
629
- },
630
- {
631
- "change_id": "18_houbb_opencc4j-master_7f18101_9b352ab_ZhConvertBootstrapTest",
632
- "test_sign": "com/github/houbb/opencc4j/core/ZhConvertBootstrapTest.toSimpleTest:()V",
633
- "class": "ZhConvertBootstrapTest",
634
- "method": "toSimpleTest",
635
- "module": "",
636
- "junit_selector": "com.github.houbb.opencc4j.core.ZhConvertBootstrapTest#toSimpleTest",
637
- "old_test_code": "@Test\npublic void toSimpleTest() {\n final String original = \"\u751f\u547d\u4e0d\u606f\uff0c\u596e\u9b25\u4e0d\u6b62\";\n final String result = ZhConvertBootstrap.newInstance().toSimple(original);\n Assert.assertEquals(\"\u751f\u547d\u4e0d\u606f\uff0c\u594b\u6597\u4e0d\u6b62\", result);\n}",
638
- "new_test_code": "@Test\npublic void toSimpleTest() {\n final String original = \"\u751f\u547d\u4e0d\u606f\uff0c\u596e\u9b25\u4e0d\u6b62\";\n final String result = ZhConvertBootstrap.newInstance().init().toSimple(original);\n Assert.assertEquals(\"\u751f\u547d\u4e0d\u606f\uff0c\u594b\u6597\u4e0d\u6b62\", result);\n}",
639
- "old_test_file_path": [
640
- "src/test/java/com/github/houbb/opencc4j/core/ZhConvertBootstrapTest.java"
641
- ],
642
- "old_test_lnum": [
643
- "21-26"
644
- ],
645
- "new_test_lnum": [
646
- "21-26"
647
- ],
648
- "old_production_code": "@Override\npublic String toSimple(String original) {\n return this.convert(original, segment, dataMap.tsPhrase(), dataMap.tsChar());\n}",
649
- "new_production_code": "@Override\npublic String toSimple(String original) {\n return zhConvertCore.toSimple(original, context);\n}",
650
- "focal_file_path": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
651
- "focal_method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toSimple:(Ljava/lang/String;)Ljava/lang/String",
652
- "focal_all_deps_scored": [
653
- {
654
- "dep_id": 1,
655
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toSimple:(Ljava/lang/String;)Ljava/lang/String",
656
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
657
- "line_nums_old": "106-109",
658
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
659
- "line_nums_new": "147-150",
660
- "dependency_updated": "updated",
661
- "score": 0.5185,
662
- "signal_scores": {
663
- "nc": 0.0,
664
- "lcs_u": 1.0,
665
- "ed": 0.6667,
666
- "class": 1.0,
667
- "tfidf": 0.187
668
- }
669
- },
670
- {
671
- "dep_id": 0,
672
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
673
- "file_path_old": null,
674
- "line_nums_old": null,
675
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
676
- "line_nums_new": "137-145",
677
- "dependency_updated": "inserted",
678
- "score": 0.3353,
679
- "signal_scores": {
680
- "nc": 0.0,
681
- "lcs_u": 0.5,
682
- "ed": 0.1667,
683
- "class": 1.0,
684
- "tfidf": 0.1334
685
- }
686
- }
687
- ],
688
- "coverage_gold": 1.0,
689
- "branch_coverage_gold": 12.8205,
690
- "method_coverage_gold": 31.5789,
691
- "line_coverage_gold": 28.5978,
692
- "is_traceback": false,
693
- "commit_gap": {
694
- "count": 0,
695
- "skipped_commits": []
696
- },
697
- "test_is_refactoring_only": false,
698
- "has_test_dep_change": false,
699
- "all_deps_new": [
700
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toSimple:(Ljava/lang/String;)Ljava/lang/String",
701
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
702
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap"
703
- ],
704
- "all_deps_old": [
705
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toSimple:(Ljava/lang/String;)Ljava/lang/String",
706
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap"
707
- ],
708
- "deps_changes": [
709
- {
710
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
711
- "change_type": "ADD",
712
- "file_path_old": null,
713
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
714
- "source": "production",
715
- "is_test_dependency": false,
716
- "is_refactoring_only": false
717
- },
718
- {
719
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toSimple:(Ljava/lang/String;)Ljava/lang/String",
720
- "change_type": "UPDATE",
721
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
722
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
723
- "source": "production",
724
- "is_test_dependency": false,
725
- "is_refactoring_only": true
726
- }
727
- ],
728
- "variant_result": {
729
- "old_on_old": "pass",
730
- "old_on_new": "fail",
731
- "new_on_old": "error",
732
- "new_on_new": "pass"
733
- }
734
- },
735
- {
736
- "change_id": "20_houbb_opencc4j-master_7f18101_9b352ab_ZhConvertBootstrapTest",
737
- "test_sign": "com/github/houbb/opencc4j/core/ZhConvertBootstrapTest.toTraditionalTest:()V",
738
- "class": "ZhConvertBootstrapTest",
739
- "method": "toTraditionalTest",
740
- "module": "",
741
- "junit_selector": "com.github.houbb.opencc4j.core.ZhConvertBootstrapTest#toTraditionalTest",
742
- "old_test_code": "@Test\npublic void toTraditionalTest() {\n final String original = \"\u751f\u547d\u4e0d\u606f\uff0c\u594b\u6597\u4e0d\u6b62\";\n final String result = ZhConvertBootstrap.newInstance().toTraditional(original);\n Assert.assertEquals(\"\u751f\u547d\u4e0d\u606f\uff0c\u596e\u9b25\u4e0d\u6b62\", result);\n}",
743
- "new_test_code": "@Test\npublic void toTraditionalTest() {\n final String original = \"\u751f\u547d\u4e0d\u606f\uff0c\u594b\u6597\u4e0d\u6b62\";\n final String result = ZhConvertBootstrap.newInstance().init().toTraditional(original);\n Assert.assertEquals(\"\u751f\u547d\u4e0d\u606f\uff0c\u596e\u9b25\u4e0d\u6b62\", result);\n}",
744
- "old_test_file_path": [
745
- "src/test/java/com/github/houbb/opencc4j/core/ZhConvertBootstrapTest.java"
746
- ],
747
- "old_test_lnum": [
748
- "32-37"
749
- ],
750
- "new_test_lnum": [
751
- "32-37"
752
- ],
753
- "old_production_code": "@Override\npublic String toTraditional(String original) {\n return this.convert(original, segment, dataMap.stPhrase(), dataMap.stChar());\n}",
754
- "new_production_code": "@Override\npublic String toTraditional(String original) {\n return zhConvertCore.toTraditional(original, context);\n}",
755
- "focal_file_path": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
756
- "focal_method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
757
- "focal_all_deps_scored": [
758
- {
759
- "dep_id": 1,
760
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
761
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
762
- "line_nums_old": "111-114",
763
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
764
- "line_nums_new": "152-155",
765
- "dependency_updated": "updated",
766
- "score": 0.5347,
767
- "signal_scores": {
768
- "nc": 0.0,
769
- "lcs_u": 1.0,
770
- "ed": 0.7647,
771
- "class": 1.0,
772
- "tfidf": 0.187
773
- }
774
- },
775
- {
776
- "dep_id": 0,
777
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
778
- "file_path_old": null,
779
- "line_nums_old": null,
780
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
781
- "line_nums_new": "137-145",
782
- "dependency_updated": "inserted",
783
- "score": 0.381,
784
- "signal_scores": {
785
- "nc": 0.0,
786
- "lcs_u": 0.75,
787
- "ed": 0.1765,
788
- "class": 1.0,
789
- "tfidf": 0.1334
790
- }
791
- }
792
- ],
793
- "coverage_gold": 1.0,
794
- "branch_coverage_gold": 11.5385,
795
- "method_coverage_gold": 31.5789,
796
- "line_coverage_gold": 28.2288,
797
- "is_traceback": false,
798
- "commit_gap": {
799
- "count": 0,
800
- "skipped_commits": []
801
- },
802
- "test_is_refactoring_only": false,
803
- "has_test_dep_change": false,
804
- "all_deps_new": [
805
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
806
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
807
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap"
808
- ],
809
- "all_deps_old": [
810
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
811
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap"
812
- ],
813
- "deps_changes": [
814
- {
815
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
816
- "change_type": "ADD",
817
- "file_path_old": null,
818
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
819
- "source": "production",
820
- "is_test_dependency": false,
821
- "is_refactoring_only": false
822
- },
823
- {
824
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
825
- "change_type": "UPDATE",
826
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
827
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
828
- "source": "production",
829
- "is_test_dependency": false,
830
- "is_refactoring_only": true
831
- }
832
- ],
833
- "variant_result": {
834
- "old_on_old": "pass",
835
- "old_on_new": "fail",
836
- "new_on_old": "error",
837
- "new_on_new": "pass"
838
- }
839
- },
840
- {
841
- "change_id": "23_houbb_opencc4j-master_7f18101_9b352ab_ZhConvertBootstrapTest",
842
- "test_sign": "com/github/houbb/opencc4j/core/ZhConvertBootstrapTest.isSimpleTest:()V",
843
- "class": "ZhConvertBootstrapTest",
844
- "method": "isSimpleTest",
845
- "module": "",
846
- "junit_selector": "com.github.houbb.opencc4j.core.ZhConvertBootstrapTest#isSimpleTest",
847
- "old_test_code": "@Test\npublic void isSimpleTest() {\n final String simpleChar = \"\u594b\";\n final String simplePhrase = \"\u594b\u6597\";\n final String traditionalChar = \"\u596e\";\n final String traditionalPhrase = \"\u596e\u9b25\";\n ZhConvertBootstrap convertBootstrap = ZhConvertBootstrap.newInstance();\n Assert.assertTrue(convertBootstrap.isSimple(simpleChar));\n Assert.assertTrue(convertBootstrap.isSimple(simplePhrase));\n Assert.assertFalse(convertBootstrap.isSimple(traditionalChar));\n Assert.assertFalse(convertBootstrap.isSimple(traditionalPhrase));\n}",
848
- "new_test_code": "@Test\npublic void isSimpleTest() {\n final String simpleChar = \"\u594b\";\n final String simplePhrase = \"\u594b\u6597\";\n final String traditionalChar = \"\u596e\";\n final String traditionalPhrase = \"\u596e\u9b25\";\n ZhConvertBootstrap convertBootstrap = ZhConvertBootstrap.newInstance().init();\n Assert.assertTrue(convertBootstrap.isSimple(simpleChar));\n Assert.assertTrue(convertBootstrap.isSimple(simplePhrase));\n Assert.assertFalse(convertBootstrap.isSimple(traditionalChar));\n Assert.assertFalse(convertBootstrap.isSimple(traditionalPhrase));\n}",
849
- "old_test_file_path": [
850
- "src/test/java/com/github/houbb/opencc4j/core/ZhConvertBootstrapTest.java"
851
- ],
852
- "old_test_lnum": [
853
- "70-83"
854
- ],
855
- "new_test_lnum": [
856
- "70-83"
857
- ],
858
- "old_production_code": "@Override\npublic boolean isSimple(String charOrPhrase) {\n if (StringUtil.isEmpty(charOrPhrase)) {\n return false;\n }\n List<String> chars = toCharList(charOrPhrase);\n for (String c : chars) {\n if (!isSimpleForSingle(c)) {\n return false;\n }\n }\n return true;\n}",
859
- "new_production_code": "@Override\npublic boolean isSimple(String charOrPhrase) {\n return zhConvertCore.isSimple(charOrPhrase, context);\n}",
860
- "focal_file_path": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
861
- "focal_method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.isSimple:(Ljava/lang/String;)Z",
862
- "focal_all_deps_scored": [
863
- {
864
- "dep_id": 1,
865
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.isSimple:(Ljava/lang/String;)Z",
866
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
867
- "line_nums_old": "178-194",
868
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
869
- "line_nums_new": "188-191",
870
- "dependency_updated": "updated",
871
- "score": 0.4745,
872
- "signal_scores": {
873
- "nc": 0.0,
874
- "lcs_u": 1.0,
875
- "ed": 0.6667,
876
- "class": 1.0,
877
- "tfidf": 0.0
878
- }
879
- },
880
- {
881
- "dep_id": 0,
882
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
883
- "file_path_old": null,
884
- "line_nums_old": null,
885
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
886
- "line_nums_new": "137-145",
887
- "dependency_updated": "inserted",
888
- "score": 0.4138,
889
- "signal_scores": {
890
- "nc": 0.0,
891
- "lcs_u": 0.75,
892
- "ed": 0.25,
893
- "class": 1.0,
894
- "tfidf": 0.2213
895
- }
896
- }
897
- ],
898
- "coverage_gold": 1.0,
899
- "branch_coverage_gold": 40.3846,
900
- "method_coverage_gold": 32.0574,
901
- "line_coverage_gold": 38.3764,
902
- "is_traceback": false,
903
- "commit_gap": {
904
- "count": 0,
905
- "skipped_commits": []
906
- },
907
- "test_is_refactoring_only": false,
908
- "has_test_dep_change": false,
909
- "all_deps_new": [
910
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.isSimple:(Ljava/lang/String;)Z",
911
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
912
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap"
913
- ],
914
- "all_deps_old": [
915
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.isSimple:(Ljava/lang/String;)Z",
916
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap"
917
- ],
918
- "deps_changes": [
919
- {
920
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
921
- "change_type": "ADD",
922
- "file_path_old": null,
923
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
924
- "source": "production",
925
- "is_test_dependency": false,
926
- "is_refactoring_only": false
927
- },
928
- {
929
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.isSimple:(Ljava/lang/String;)Z",
930
- "change_type": "UPDATE",
931
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
932
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
933
- "source": "production",
934
- "is_test_dependency": false,
935
- "is_refactoring_only": true
936
- }
937
- ],
938
- "variant_result": {
939
- "old_on_old": "pass",
940
- "old_on_new": "fail",
941
- "new_on_old": "error",
942
- "new_on_new": "pass"
943
- }
944
- },
945
- {
946
- "change_id": "25_houbb_opencc4j-master_7f18101_9b352ab_ZhConvertBootstrapTest",
947
- "test_sign": "com/github/houbb/opencc4j/core/ZhConvertBootstrapTest.segment2Test:()V",
948
- "class": "ZhConvertBootstrapTest",
949
- "method": "segment2Test",
950
- "module": "",
951
- "junit_selector": "com.github.houbb.opencc4j.core.ZhConvertBootstrapTest#segment2Test",
952
- "old_test_code": "@Test\npublic void segment2Test() {\n final String original = \"\u5be5\u843d\u53e4\u884c\u5bab\uff0c\u5bab\u82b1\u5bc2\u5bde\u7ea2\u3002\u767d\u5934\u5bab\u5973\u5728\uff0c\u95f2\u5750\u8bf4\u7384\u5b97\u3002\";\n final String result = ZhConvertBootstrap.newInstance(new FooSegment()).toTraditional(original);\n Assert.assertEquals(\"\u5be5\u843d\u53e4\u884c\u5bae\uff0c\u5bae\u82b1\u5bc2\u5bde\u7d05\u3002\u767d\u982d\u5bae\u5973\u5728\uff0c\u9592\u5750\u8aaa\u7384\u5b97\u3002\u6e2c\u8a66\", result);\n}",
953
- "new_test_code": "@Test\npublic void segment2Test() {\n final String original = \"\u5be5\u843d\u53e4\u884c\u5bab\uff0c\u5bab\u82b1\u5bc2\u5bde\u7ea2\u3002\u767d\u5934\u5bab\u5973\u5728\uff0c\u95f2\u5750\u8bf4\u7384\u5b97\u3002\";\n final String result = ZhConvertBootstrap.newInstance(new FooSegment()).init().toTraditional(original);\n Assert.assertEquals(\"\u5be5\u843d\u53e4\u884c\u5bae\uff0c\u5bae\u82b1\u5bc2\u5bde\u7d05\u3002\u767d\u982d\u5bae\u5973\u5728\uff0c\u9592\u5750\u8aaa\u7384\u5b97\u3002\u6e2c\u8a66\", result);\n}",
954
- "old_test_file_path": [
955
- "src/test/java/com/github/houbb/opencc4j/core/ZhConvertBootstrapTest.java"
956
- ],
957
- "old_test_lnum": [
958
- "59-64"
959
- ],
960
- "new_test_lnum": [
961
- "59-64"
962
- ],
963
- "old_production_code": "",
964
- "new_production_code": "public ZhConvertBootstrap init() {\n this.context = ZhConvertCoreContext.newInstance().zhChars(zhChar).segment(segment).unitConvert(unitConvert).dataMap(dataMap);\n return this;\n}",
965
- "focal_file_path": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
966
- "focal_method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
967
- "focal_all_deps_scored": [
968
- {
969
- "dep_id": 0,
970
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
971
- "file_path_old": null,
972
- "line_nums_old": null,
973
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
974
- "line_nums_new": "137-145",
975
- "dependency_updated": "inserted",
976
- "score": 0.3326,
977
- "signal_scores": {
978
- "nc": 0.0,
979
- "lcs_u": 0.5,
980
- "ed": 0.1667,
981
- "class": 1.0,
982
- "tfidf": 0.122
983
- }
984
- },
985
- {
986
- "dep_id": 1,
987
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
988
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
989
- "line_nums_old": "111-114",
990
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
991
- "line_nums_new": "152-155",
992
- "dependency_updated": "updated",
993
- "score": 0.282,
994
- "signal_scores": {
995
- "nc": 0.0,
996
- "lcs_u": 0.2308,
997
- "ed": 0.0769,
998
- "class": 1.0,
999
- "tfidf": 0.1714
1000
- }
1001
- }
1002
- ],
1003
- "coverage_gold": 1.0,
1004
- "branch_coverage_gold": 10.8974,
1005
- "method_coverage_gold": 28.7081,
1006
- "line_coverage_gold": 26.0148,
1007
- "is_traceback": false,
1008
- "commit_gap": {
1009
- "count": 0,
1010
- "skipped_commits": []
1011
- },
1012
- "test_is_refactoring_only": false,
1013
- "has_test_dep_change": false,
1014
- "all_deps_new": [
1015
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:(Lcom/github/houbb/opencc4j/support/segment/Segment;)Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
1016
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
1017
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap"
1018
- ],
1019
- "all_deps_old": [
1020
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
1021
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:(Lcom/github/houbb/opencc4j/support/segment/Segment;)Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap"
1022
- ],
1023
- "deps_changes": [
1024
- {
1025
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
1026
- "change_type": "ADD",
1027
- "file_path_old": null,
1028
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
1029
- "source": "production",
1030
- "is_test_dependency": false,
1031
- "is_refactoring_only": false
1032
- },
1033
- {
1034
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
1035
- "change_type": "UPDATE",
1036
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
1037
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
1038
- "source": "production",
1039
- "is_test_dependency": false,
1040
- "is_refactoring_only": true
1041
- }
1042
- ],
1043
- "variant_result": {
1044
- "old_on_old": "pass",
1045
- "old_on_new": "fail",
1046
- "new_on_old": "error",
1047
- "new_on_new": "pass"
1048
- }
1049
- }
1050
- ],
1051
- "version": "master",
1052
- "java_version": 11
1053
- },
1054
- {
1055
- "task_id": "houbb_opencc4j-master__7f18101_9b352ab__ZhConverterUtilTest_a8c21b6d",
1056
- "project_name": "houbb_opencc4j-master",
1057
- "git_clone_url": "https://github.com/houbb/opencc4j.git",
1058
- "rev1": "7f181010d8503b187128633abc3111e1f51be282",
1059
- "rev2": "9b352abf8e354747299ce5fc405952c63eb5f9f4",
1060
- "rev1_date": "2025-04-11T05:59:36Z",
1061
- "rev2_date": "2025-04-11T07:02:05Z",
1062
- "git_diff_url": "https://github.com/houbb/opencc4j/compare/7f181010d8503b187128633abc3111e1f51be282...9b352abf8e354747299ce5fc405952c63eb5f9f4",
1063
- "test_file": "src/test/java/com/github/houbb/opencc4j/util/ZhConverterUtilTest.java",
1064
- "test_changes": [
1065
- {
1066
- "change_id": "17_houbb_opencc4j-master_7f18101_9b352ab_ZhConverterUtilTest",
1067
- "test_sign": "com/github/houbb/opencc4j/util/ZhConverterUtilTest.defineSegmentTest:()V",
1068
- "class": "ZhConverterUtilTest",
1069
- "method": "defineSegmentTest",
1070
- "module": "",
1071
- "junit_selector": "com.github.houbb.opencc4j.util.ZhConverterUtilTest#defineSegmentTest",
1072
- "old_test_code": "@Test\npublic void defineSegmentTest() {\n final String original = \"\u5be5\u843d\u53e4\u884c\u5bab\uff0c\u5bab\u82b1\u5bc2\u5bde\u7ea2\u3002\u767d\u5934\u5bab\u5973\u5728\uff0c\u95f2\u5750\u8bf4\u7384\u5b97\u3002\";\n final Segment segment = new FooSegment();\n final String result = ZhConvertBootstrap.newInstance().segment(segment).toTraditional(original);\n Assert.assertEquals(\"\u5be5\u843d\u53e4\u884c\u5bae\uff0c\u5bae\u82b1\u5bc2\u5bde\u7d05\u3002\u767d\u982d\u5bae\u5973\u5728\uff0c\u9592\u5750\u8aaa\u7384\u5b97\u3002\u6e2c\u8a66\", result);\n}",
1073
- "new_test_code": "@Test\npublic void defineSegmentTest() {\n final String original = \"\u5be5\u843d\u53e4\u884c\u5bab\uff0c\u5bab\u82b1\u5bc2\u5bde\u7ea2\u3002\u767d\u5934\u5bab\u5973\u5728\uff0c\u95f2\u5750\u8bf4\u7384\u5b97\u3002\";\n final Segment segment = new FooSegment();\n final String result = ZhConvertBootstrap.newInstance().segment(segment).init().toTraditional(original);\n Assert.assertEquals(\"\u5be5\u843d\u53e4\u884c\u5bae\uff0c\u5bae\u82b1\u5bc2\u5bde\u7d05\u3002\u767d\u982d\u5bae\u5973\u5728\uff0c\u9592\u5750\u8aaa\u7384\u5b97\u3002\u6e2c\u8a66\", result);\n}",
1074
- "old_test_file_path": [
1075
- "src/test/java/com/github/houbb/opencc4j/util/ZhConverterUtilTest.java"
1076
- ],
1077
- "old_test_lnum": [
1078
- "242-252"
1079
- ],
1080
- "new_test_lnum": [
1081
- "242-254"
1082
- ],
1083
- "old_production_code": "",
1084
- "new_production_code": "public ZhConvertBootstrap init() {\n this.context = ZhConvertCoreContext.newInstance().zhChars(zhChar).segment(segment).unitConvert(unitConvert).dataMap(dataMap);\n return this;\n}",
1085
- "focal_file_path": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
1086
- "focal_method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
1087
- "focal_all_deps_scored": [
1088
- {
1089
- "dep_id": 0,
1090
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
1091
- "file_path_old": null,
1092
- "line_nums_old": null,
1093
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
1094
- "line_nums_new": "137-145",
1095
- "dependency_updated": "inserted",
1096
- "score": 0.2348,
1097
- "signal_scores": {
1098
- "nc": 0.0,
1099
- "lcs_u": 0.75,
1100
- "ed": 0.1765,
1101
- "class": 0.0,
1102
- "tfidf": 0.3118
1103
- }
1104
- },
1105
- {
1106
- "dep_id": 1,
1107
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
1108
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
1109
- "line_nums_old": "111-114",
1110
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
1111
- "line_nums_new": "152-155",
1112
- "dependency_updated": "updated",
1113
- "score": 0.114,
1114
- "signal_scores": {
1115
- "nc": 0.0,
1116
- "lcs_u": 0.2308,
1117
- "ed": 0.0588,
1118
- "class": 0.0,
1119
- "tfidf": 0.2703
1120
- }
1121
- }
1122
- ],
1123
- "coverage_gold": 1.0,
1124
- "branch_coverage_gold": 10.8974,
1125
- "method_coverage_gold": 28.2297,
1126
- "line_coverage_gold": 25.4613,
1127
- "is_traceback": false,
1128
- "commit_gap": {
1129
- "count": 0,
1130
- "skipped_commits": []
1131
- },
1132
- "test_is_refactoring_only": false,
1133
- "has_test_dep_change": false,
1134
- "all_deps_new": [
1135
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.segment:(Lcom/github/houbb/opencc4j/support/segment/Segment;)Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
1136
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
1137
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
1138
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String"
1139
- ],
1140
- "all_deps_old": [
1141
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
1142
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.newInstance:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
1143
- "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.segment:(Lcom/github/houbb/opencc4j/support/segment/Segment;)Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap"
1144
- ],
1145
- "deps_changes": [
1146
- {
1147
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.init:()Lcom/github/houbb/opencc4j/core/impl/ZhConvertBootstrap",
1148
- "change_type": "ADD",
1149
- "file_path_old": null,
1150
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
1151
- "source": "production",
1152
- "is_test_dependency": false,
1153
- "is_refactoring_only": false
1154
- },
1155
- {
1156
- "method_sign": "com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.toTraditional:(Ljava/lang/String;)Ljava/lang/String",
1157
- "change_type": "UPDATE",
1158
- "file_path_old": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
1159
- "file_path_new": "src/main/java/com/github/houbb/opencc4j/core/impl/ZhConvertBootstrap.java",
1160
- "source": "production",
1161
- "is_test_dependency": false,
1162
- "is_refactoring_only": true
1163
- }
1164
- ],
1165
- "variant_result": {
1166
- "old_on_old": "pass",
1167
- "old_on_new": "fail",
1168
- "new_on_old": "error",
1169
- "new_on_new": "pass"
1170
- }
1171
- }
1172
- ],
1173
- "version": "master",
1174
- "java_version": 11
1175
- }
1176
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
j-easy_easy-random-easy-random-5.0.0.json DELETED
The diff for this file is too large to render. See raw diff
 
j-easy_easy-rules-easy-rules-4.1.0.json DELETED
The diff for this file is too large to render. See raw diff
 
java-diff-utils_java-diff-utils-java-diff-utils-parent-4.16.json DELETED
@@ -1,182 +0,0 @@
1
- [
2
- {
3
- "task_id": "java-diff-utils_java-diff-utils-java-diff-utils-parent-4.16__85c3199_96f7fbd__GenerateUnifiedDiffTest_543acd06",
4
- "project_name": "java-diff-utils_java-diff-utils-java-diff-utils-parent-4.16",
5
- "git_clone_url": "https://github.com/java-diff-utils/java-diff-utils.git",
6
- "rev1": "85c31995703e1f855532ce7d8394784639e65352",
7
- "rev2": "96f7fbdebda3c1227ab1f0135d24ce3a372efca8",
8
- "rev1_date": "2020-08-04T05:27:41Z",
9
- "rev2_date": "2020-08-04T05:35:09Z",
10
- "git_diff_url": "https://github.com/java-diff-utils/java-diff-utils/compare/85c31995703e1f855532ce7d8394784639e65352...96f7fbdebda3c1227ab1f0135d24ce3a372efca8",
11
- "test_file": "java-diff-utils/src/test/java/com/github/difflib/GenerateUnifiedDiffTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "1_java-diff-utils_java-diff-utils-java-diff-utils-parent-4.16_85c3199_96f7fbd_GenerateUnifiedDiffTest",
15
- "test_sign": "com/github/difflib/GenerateUnifiedDiffTest.testNewFileCreation:()V",
16
- "class": "GenerateUnifiedDiffTest",
17
- "method": "testNewFileCreation",
18
- "module": "java-diff-utils",
19
- "junit_selector": "com.github.difflib.GenerateUnifiedDiffTest#testNewFileCreation",
20
- "old_test_code": "@Test\npublic void testNewFileCreation() {\n List<String> original = new ArrayList<>();\n List<String> revised = new ArrayList<>();\n revised.add(\"line1\");\n revised.add(\"line2\");\n Patch<String> patch = DiffUtils.diff(original, revised);\n List<String> udiff = UnifiedDiffUtils.generateUnifiedDiff(null, \"revised\", original, patch, 10);\n assertEquals(\"--- \", udiff.get(0));\n assertEquals(\"+++ revised\", udiff.get(1));\n assertEquals(\"@@ -0,0 +1,2 @@\", udiff.get(2));\n UnifiedDiffUtils.parseUnifiedDiff(udiff);\n}",
21
- "new_test_code": "@Test\npublic void testNewFileCreation() {\n List<String> original = new ArrayList<>();\n List<String> revised = new ArrayList<>();\n revised.add(\"line1\");\n revised.add(\"line2\");\n Patch<String> patch = DiffUtils.diff(original, revised);\n List<String> udiff = UnifiedDiffUtils.generateUnifiedDiff(null, \"revised\", original, patch, 10);\n assertEquals(\"--- /dev/null\", udiff.get(0));\n assertEquals(\"+++ revised\", udiff.get(1));\n assertEquals(\"@@ -0,0 +1,2 @@\", udiff.get(2));\n UnifiedDiffUtils.parseUnifiedDiff(udiff);\n}",
22
- "old_test_file_path": [
23
- "java-diff-utils/src/test/java/com/github/difflib/GenerateUnifiedDiffTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "113-130"
27
- ],
28
- "new_test_lnum": [
29
- "113-130"
30
- ],
31
- "old_production_code": "public static List<String> generateUnifiedDiff(String originalFileName, String revisedFileName, List<String> originalLines, Patch<String> patch, int contextSize) {\n if (!patch.getDeltas().isEmpty()) {\n List<String> ret = new ArrayList<>();\n ret.add(\"--- \" + Optional.ofNullable(originalFileName).orElse(\"\"));\n ret.add(\"+++ \" + Optional.ofNullable(revisedFileName).orElse(\"\"));\n List<AbstractDelta<String>> patchDeltas = new ArrayList<>(patch.getDeltas());\n List<AbstractDelta<String>> deltas = new ArrayList<>();\n AbstractDelta<String> delta = patchDeltas.get(0);\n deltas.add(delta);\n if (patchDeltas.size() > 1) {\n for (int i = 1; i < patchDeltas.size(); i++) {\n int position = delta.getSource().getPosition();\n AbstractDelta<String> nextDelta = patchDeltas.get(i);\n if ((position + delta.getSource().size() + contextSize) >= (nextDelta.getSource().getPosition() - contextSize)) {\n deltas.add(nextDelta);\n } else {\n List<String> curBlock = processDeltas(originalLines, deltas, contextSize, false);\n ret.addAll(curBlock);\n deltas.clear();\n deltas.add(nextDelta);\n }\n delta = nextDelta;\n }\n }\n List<String> curBlock = processDeltas(originalLines, deltas, contextSize, patchDeltas.size() == 1 && originalFileName == null);\n ret.addAll(curBlock);\n return ret;\n }\n return new ArrayList<>();\n}",
32
- "new_production_code": "public static List<String> generateUnifiedDiff(String originalFileName, String revisedFileName, List<String> originalLines, Patch<String> patch, int contextSize) {\n if (!patch.getDeltas().isEmpty()) {\n List<String> ret = new ArrayList<>();\n ret.add(\"--- \" + Optional.ofNullable(originalFileName).orElse(NULL_FILE_INDICATOR));\n ret.add(\"+++ \" + Optional.ofNullable(revisedFileName).orElse(NULL_FILE_INDICATOR));\n List<AbstractDelta<String>> patchDeltas = new ArrayList<>(patch.getDeltas());\n List<AbstractDelta<String>> deltas = new ArrayList<>();\n AbstractDelta<String> delta = patchDeltas.get(0);\n deltas.add(delta);\n if (patchDeltas.size() > 1) {\n for (int i = 1; i < patchDeltas.size(); i++) {\n int position = delta.getSource().getPosition();\n AbstractDelta<String> nextDelta = patchDeltas.get(i);\n if ((position + delta.getSource().size() + contextSize) >= (nextDelta.getSource().getPosition() - contextSize)) {\n deltas.add(nextDelta);\n } else {\n List<String> curBlock = processDeltas(originalLines, deltas, contextSize, false);\n ret.addAll(curBlock);\n deltas.clear();\n deltas.add(nextDelta);\n }\n delta = nextDelta;\n }\n }\n List<String> curBlock = processDeltas(originalLines, deltas, contextSize, patchDeltas.size() == 1 && originalFileName == null);\n ret.addAll(curBlock);\n return ret;\n }\n return new ArrayList<>();\n}",
33
- "focal_file_path": "java-diff-utils/src/main/java/com/github/difflib/UnifiedDiffUtils.java",
34
- "focal_method_sign": "com/github/difflib/UnifiedDiffUtils.generateUnifiedDiff:(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/github/difflib/patch/Patch;I)Ljava/util/List",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "com/github/difflib/UnifiedDiffUtils.generateUnifiedDiff:(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/github/difflib/patch/Patch;I)Ljava/util/List",
39
- "file_path_old": "java-diff-utils/src/main/java/com/github/difflib/UnifiedDiffUtils.java",
40
- "line_nums_old": "141-198",
41
- "file_path_new": "java-diff-utils/src/main/java/com/github/difflib/UnifiedDiffUtils.java",
42
- "line_nums_new": "142-199",
43
- "dependency_updated": "updated",
44
- "score": null,
45
- "signal_scores": {}
46
- }
47
- ],
48
- "coverage_gold": 0.7407407407407407,
49
- "branch_coverage_gold": 15.3689,
50
- "method_coverage_gold": 16.0377,
51
- "line_coverage_gold": 22.2323,
52
- "is_traceback": false,
53
- "commit_gap": {
54
- "count": 1,
55
- "skipped_commits": [
56
- "d3524314eb9ca25e70b8ca1027f53367ab3892bb"
57
- ]
58
- },
59
- "test_is_refactoring_only": false,
60
- "has_test_dep_change": false,
61
- "all_deps_new": [
62
- "com/github/difflib/UnifiedDiffUtils.parseUnifiedDiff:(Ljava/util/List;)Lcom/github/difflib/patch/Patch",
63
- "com/github/difflib/DiffUtils.diff:(Ljava/util/List;Ljava/util/List;)Lcom/github/difflib/patch/Patch",
64
- "com/github/difflib/UnifiedDiffUtils.generateUnifiedDiff:(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/github/difflib/patch/Patch;I)Ljava/util/List"
65
- ],
66
- "all_deps_old": [
67
- "com/github/difflib/UnifiedDiffUtils.parseUnifiedDiff:(Ljava/util/List;)Lcom/github/difflib/patch/Patch",
68
- "com/github/difflib/DiffUtils.diff:(Ljava/util/List;Ljava/util/List;)Lcom/github/difflib/patch/Patch",
69
- "com/github/difflib/UnifiedDiffUtils.generateUnifiedDiff:(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/github/difflib/patch/Patch;I)Ljava/util/List"
70
- ],
71
- "deps_changes": [
72
- {
73
- "method_sign": "com/github/difflib/UnifiedDiffUtils.generateUnifiedDiff:(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/github/difflib/patch/Patch;I)Ljava/util/List",
74
- "change_type": "UPDATE",
75
- "file_path_old": "java-diff-utils/src/main/java/com/github/difflib/UnifiedDiffUtils.java",
76
- "file_path_new": "java-diff-utils/src/main/java/com/github/difflib/UnifiedDiffUtils.java",
77
- "source": "production",
78
- "is_test_dependency": false,
79
- "is_refactoring_only": false
80
- }
81
- ],
82
- "variant_result": {
83
- "old_on_old": "pass",
84
- "old_on_new": "fail",
85
- "new_on_old": "fail",
86
- "new_on_new": "pass"
87
- }
88
- }
89
- ],
90
- "version": "java-diff-utils-parent-4.16",
91
- "java_version": 8
92
- },
93
- {
94
- "task_id": "java-diff-utils_java-diff-utils-java-diff-utils-parent-4.16__923918a_ae23408__GenerateUnifiedDiffTest_543acd06",
95
- "project_name": "java-diff-utils_java-diff-utils-java-diff-utils-parent-4.16",
96
- "git_clone_url": "https://github.com/java-diff-utils/java-diff-utils.git",
97
- "rev1": "923918a53e3d1324503665586730895e4d9a1434",
98
- "rev2": "ae2340874806dfec3f8c7ac3637448362d675500",
99
- "rev1_date": "2020-02-23T22:16:39Z",
100
- "rev2_date": "2020-02-23T22:51:28Z",
101
- "git_diff_url": "https://github.com/java-diff-utils/java-diff-utils/compare/923918a53e3d1324503665586730895e4d9a1434...ae2340874806dfec3f8c7ac3637448362d675500",
102
- "test_file": "java-diff-utils/src/test/java/com/github/difflib/GenerateUnifiedDiffTest.java",
103
- "test_changes": [
104
- {
105
- "change_id": "4_java-diff-utils_java-diff-utils-java-diff-utils-parent-4.16_923918a_ae23408_GenerateUnifiedDiffTest",
106
- "test_sign": "com/github/difflib/GenerateUnifiedDiffTest.testNewFileCreation:()V",
107
- "class": "GenerateUnifiedDiffTest",
108
- "method": "testNewFileCreation",
109
- "module": "java-diff-utils",
110
- "junit_selector": "com.github.difflib.GenerateUnifiedDiffTest#testNewFileCreation",
111
- "old_test_code": "@Test\npublic void testNewFileCreation() throws DiffException {\n List<String> original = new ArrayList<>();\n List<String> revised = new ArrayList<>();\n revised.add(\"line1\");\n revised.add(\"line2\");\n Patch<String> patch = DiffUtils.diff(original, revised);\n List<String> udiff = UnifiedDiffUtils.generateUnifiedDiff(null, \"revised\", original, patch, 10);\n assertEquals(\"--- null\", udiff.get(0));\n assertEquals(\"+++ revised\", udiff.get(1));\n assertEquals(\"@@ -0,0 +1,2 @@\", udiff.get(2));\n UnifiedDiffUtils.parseUnifiedDiff(udiff);\n}",
112
- "new_test_code": "@Test\npublic void testNewFileCreation() throws DiffException {\n List<String> original = new ArrayList<>();\n List<String> revised = new ArrayList<>();\n revised.add(\"line1\");\n revised.add(\"line2\");\n Patch<String> patch = DiffUtils.diff(original, revised);\n List<String> udiff = UnifiedDiffUtils.generateUnifiedDiff(null, \"revised\", original, patch, 10);\n assertEquals(\"--- \", udiff.get(0));\n assertEquals(\"+++ revised\", udiff.get(1));\n assertEquals(\"@@ -0,0 +1,2 @@\", udiff.get(2));\n UnifiedDiffUtils.parseUnifiedDiff(udiff);\n}",
113
- "old_test_file_path": [
114
- "java-diff-utils/src/test/java/com/github/difflib/GenerateUnifiedDiffTest.java"
115
- ],
116
- "old_test_lnum": [
117
- "111-128"
118
- ],
119
- "new_test_lnum": [
120
- "111-128"
121
- ],
122
- "old_production_code": "public static List<String> generateUnifiedDiff(String originalFileName, String revisedFileName, List<String> originalLines, Patch<String> patch, int contextSize) {\n if (!patch.getDeltas().isEmpty()) {\n List<String> ret = new ArrayList<>();\n ret.add(\"--- \" + originalFileName);\n ret.add(\"+++ \" + revisedFileName);\n List<AbstractDelta<String>> patchDeltas = new ArrayList<>(patch.getDeltas());\n List<AbstractDelta<String>> deltas = new ArrayList<>();\n AbstractDelta<String> delta = patchDeltas.get(0);\n deltas.add(delta);\n if (patchDeltas.size() > 1) {\n for (int i = 1; i < patchDeltas.size(); i++) {\n int position = delta.getSource().getPosition();\n AbstractDelta<String> nextDelta = patchDeltas.get(i);\n if ((position + delta.getSource().size() + contextSize) >= (nextDelta.getSource().getPosition() - contextSize)) {\n deltas.add(nextDelta);\n } else {\n List<String> curBlock = processDeltas(originalLines, deltas, contextSize, false);\n ret.addAll(curBlock);\n deltas.clear();\n deltas.add(nextDelta);\n }\n delta = nextDelta;\n }\n }\n List<String> curBlock = processDeltas(originalLines, deltas, contextSize, patchDeltas.size() == 1 && originalFileName == null);\n ret.addAll(curBlock);\n return ret;\n }\n return new ArrayList<>();\n}",
123
- "new_production_code": "public static List<String> generateUnifiedDiff(String originalFileName, String revisedFileName, List<String> originalLines, Patch<String> patch, int contextSize) {\n if (!patch.getDeltas().isEmpty()) {\n List<String> ret = new ArrayList<>();\n ret.add(\"--- \" + Optional.ofNullable(originalFileName).orElse(\"\"));\n ret.add(\"+++ \" + Optional.ofNullable(revisedFileName).orElse(\"\"));\n List<AbstractDelta<String>> patchDeltas = new ArrayList<>(patch.getDeltas());\n List<AbstractDelta<String>> deltas = new ArrayList<>();\n AbstractDelta<String> delta = patchDeltas.get(0);\n deltas.add(delta);\n if (patchDeltas.size() > 1) {\n for (int i = 1; i < patchDeltas.size(); i++) {\n int position = delta.getSource().getPosition();\n AbstractDelta<String> nextDelta = patchDeltas.get(i);\n if ((position + delta.getSource().size() + contextSize) >= (nextDelta.getSource().getPosition() - contextSize)) {\n deltas.add(nextDelta);\n } else {\n List<String> curBlock = processDeltas(originalLines, deltas, contextSize, false);\n ret.addAll(curBlock);\n deltas.clear();\n deltas.add(nextDelta);\n }\n delta = nextDelta;\n }\n }\n List<String> curBlock = processDeltas(originalLines, deltas, contextSize, patchDeltas.size() == 1 && originalFileName == null);\n ret.addAll(curBlock);\n return ret;\n }\n return new ArrayList<>();\n}",
124
- "focal_file_path": "java-diff-utils/src/main/java/com/github/difflib/UnifiedDiffUtils.java",
125
- "focal_method_sign": "com/github/difflib/UnifiedDiffUtils.generateUnifiedDiff:(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/github/difflib/patch/Patch;I)Ljava/util/List",
126
- "focal_all_deps_scored": [
127
- {
128
- "dep_id": 0,
129
- "method_sign": "com/github/difflib/UnifiedDiffUtils.generateUnifiedDiff:(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/github/difflib/patch/Patch;I)Ljava/util/List",
130
- "file_path_old": "java-diff-utils/src/main/java/com/github/difflib/UnifiedDiffUtils.java",
131
- "line_nums_old": "128-185",
132
- "file_path_new": "java-diff-utils/src/main/java/com/github/difflib/UnifiedDiffUtils.java",
133
- "line_nums_new": "129-186",
134
- "dependency_updated": "updated",
135
- "score": null,
136
- "signal_scores": {}
137
- }
138
- ],
139
- "coverage_gold": 0.7407407407407407,
140
- "branch_coverage_gold": 15.7778,
141
- "method_coverage_gold": 16.2304,
142
- "line_coverage_gold": 21.8447,
143
- "is_traceback": false,
144
- "commit_gap": {
145
- "count": 0,
146
- "skipped_commits": []
147
- },
148
- "test_is_refactoring_only": false,
149
- "has_test_dep_change": false,
150
- "all_deps_new": [
151
- "com/github/difflib/DiffUtils.diff:(Ljava/util/List;Ljava/util/List;)Lcom/github/difflib/patch/Patch",
152
- "com/github/difflib/UnifiedDiffUtils.parseUnifiedDiff:(Ljava/util/List;)Lcom/github/difflib/patch/Patch",
153
- "com/github/difflib/UnifiedDiffUtils.generateUnifiedDiff:(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/github/difflib/patch/Patch;I)Ljava/util/List"
154
- ],
155
- "all_deps_old": [
156
- "com/github/difflib/DiffUtils.diff:(Ljava/util/List;Ljava/util/List;)Lcom/github/difflib/patch/Patch",
157
- "com/github/difflib/UnifiedDiffUtils.parseUnifiedDiff:(Ljava/util/List;)Lcom/github/difflib/patch/Patch",
158
- "com/github/difflib/UnifiedDiffUtils.generateUnifiedDiff:(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/github/difflib/patch/Patch;I)Ljava/util/List"
159
- ],
160
- "deps_changes": [
161
- {
162
- "method_sign": "com/github/difflib/UnifiedDiffUtils.generateUnifiedDiff:(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/github/difflib/patch/Patch;I)Ljava/util/List",
163
- "change_type": "UPDATE",
164
- "file_path_old": "java-diff-utils/src/main/java/com/github/difflib/UnifiedDiffUtils.java",
165
- "file_path_new": "java-diff-utils/src/main/java/com/github/difflib/UnifiedDiffUtils.java",
166
- "source": "production",
167
- "is_test_dependency": false,
168
- "is_refactoring_only": false
169
- }
170
- ],
171
- "variant_result": {
172
- "old_on_old": "pass",
173
- "old_on_new": "fail",
174
- "new_on_old": "fail",
175
- "new_on_new": "pass"
176
- }
177
- }
178
- ],
179
- "version": "java-diff-utils-parent-4.16",
180
- "java_version": 8
181
- }
182
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
jfaster_mango-mango-2.0.1.json DELETED
The diff for this file is too large to render. See raw diff
 
jhy_jsoup-jsoup-1.22.1.json DELETED
@@ -1,1554 +0,0 @@
1
- [
2
- {
3
- "task_id": "jhy_jsoup-jsoup-1.22.1__6681be4_c09c1f5__TagSetTest_ff70f838",
4
- "project_name": "jhy_jsoup-jsoup-1.22.1",
5
- "git_clone_url": "https://github.com/jhy/jsoup.git",
6
- "rev1": "6681be4553ae9e4153fdabf006655b84dd161160",
7
- "rev2": "c09c1f51f4779d259df0423119a83ebe8aa3b86d",
8
- "rev1_date": "2025-04-12T00:25:55Z",
9
- "rev2_date": "2025-04-12T00:42:28Z",
10
- "git_diff_url": "https://github.com/jhy/jsoup/compare/6681be4553ae9e4153fdabf006655b84dd161160...c09c1f51f4779d259df0423119a83ebe8aa3b86d",
11
- "test_file": "src/test/java/org/jsoup/parser/TagSetTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "85_jhy_jsoup-jsoup-1.22.1_6681be4_c09c1f5_TagSetTest",
15
- "test_sign": "org/jsoup/parser/TagSetTest.knownTags:()V",
16
- "class": "TagSetTest",
17
- "method": "knownTags",
18
- "module": "",
19
- "junit_selector": "org.jsoup.parser.TagSetTest#knownTags",
20
- "old_test_code": "@Test\nvoid knownTags() {\n TagSet tags = TagSet.Html();\n Tag custom = new Tag(\"custom\");\n assertEquals(\"custom\", custom.name());\n assertEquals(NamespaceHtml, custom.namespace());\n assertFalse(custom.isKnownTag());\n Tag br = tags.get(\"br\", NamespaceHtml);\n assertNotNull(br);\n assertTrue(br.isKnownTag());\n assertSame(br, tags.valueOf(\"br\", NamespaceHtml));\n Tag foo = tags.valueOf(\"foo\", NamespaceHtml);\n assertFalse(foo.isKnownTag());\n tags.add(custom);\n assertTrue(custom.isKnownTag());\n assertSame(custom, tags.get(\"custom\", NamespaceHtml));\n assertSame(custom, tags.valueOf(\"custom\", NamespaceHtml));\n Tag capCustom = tags.valueOf(\"Custom\", NamespaceHtml);\n assertTrue(capCustom.isKnownTag());\n Tag c1 = new Tag(\"bar\");\n assertFalse(c1.isKnownTag());\n c1.set(Tag.Block);\n assertTrue(c1.isKnownTag());\n c1.clear(Tag.Block);\n assertTrue(c1.isKnownTag());\n c1.clear(Tag.Defined);\n assertFalse(c1.isKnownTag());\n}",
21
- "new_test_code": "@Test\nvoid knownTags() {\n TagSet tags = TagSet.Html();\n Tag custom = new Tag(\"custom\");\n assertEquals(\"custom\", custom.name());\n assertEquals(NamespaceHtml, custom.namespace());\n assertFalse(custom.isKnownTag());\n Tag br = tags.get(\"br\", NamespaceHtml);\n assertNotNull(br);\n assertTrue(br.isKnownTag());\n assertSame(br, tags.valueOf(\"br\", NamespaceHtml));\n Tag foo = tags.valueOf(\"foo\", NamespaceHtml);\n assertFalse(foo.isKnownTag());\n tags.add(custom);\n assertTrue(custom.isKnownTag());\n assertSame(custom, tags.get(\"custom\", NamespaceHtml));\n assertSame(custom, tags.valueOf(\"custom\", NamespaceHtml));\n Tag capCustom = tags.valueOf(\"Custom\", NamespaceHtml);\n assertTrue(capCustom.isKnownTag());\n Tag c1 = new Tag(\"bar\");\n assertFalse(c1.isKnownTag());\n c1.set(Tag.Block);\n assertTrue(c1.isKnownTag());\n c1.clear(Tag.Block);\n assertTrue(c1.isKnownTag());\n c1.clear(Tag.Known);\n assertFalse(c1.isKnownTag());\n}",
22
- "old_test_file_path": [
23
- "src/test/java/org/jsoup/parser/TagSetTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "76-108"
27
- ],
28
- "new_test_lnum": [
29
- "75-107"
30
- ],
31
- "old_production_code": "public TagSet add(Tag tag) {\n tag.set(Tag.Defined);\n doAdd(tag);\n return this;\n}",
32
- "new_production_code": "public TagSet add(Tag tag) {\n tag.set(Tag.Known);\n doAdd(tag);\n return this;\n}",
33
- "focal_file_path": "src/main/java/org/jsoup/parser/TagSet.java",
34
- "focal_method_sign": "org/jsoup/parser/TagSet.add:(Lorg/jsoup/parser/Tag;)Lorg/jsoup/parser/TagSet",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 2,
38
- "method_sign": "org/jsoup/parser/TagSet.add:(Lorg/jsoup/parser/Tag;)Lorg/jsoup/parser/TagSet",
39
- "file_path_old": "src/main/java/org/jsoup/parser/TagSet.java",
40
- "line_nums_old": "53-57",
41
- "file_path_new": "src/main/java/org/jsoup/parser/TagSet.java",
42
- "line_nums_new": "53-57",
43
- "dependency_updated": "updated",
44
- "score": 0.3644,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 0.3333,
48
- "ed": 0.1111,
49
- "class": 1.0,
50
- "tfidf": 0.4208
51
- }
52
- },
53
- {
54
- "dep_id": 3,
55
- "method_sign": "org/jsoup/parser/Tag.isKnownTag:()Z",
56
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
57
- "line_nums_old": "230-232",
58
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
59
- "line_nums_new": "240-242",
60
- "dependency_updated": "updated",
61
- "score": 0.286,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 0.8,
65
- "ed": 0.7,
66
- "class": 0.0,
67
- "tfidf": 0.1254
68
- }
69
- },
70
- {
71
- "dep_id": 1,
72
- "method_sign": "org/jsoup/parser/Tag.set:(I)Lorg/jsoup/parser/Tag",
73
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
74
- "line_nums_old": "104-108",
75
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
76
- "line_nums_new": "114-118",
77
- "dependency_updated": "updated",
78
- "score": 0.1582,
79
- "signal_scores": {
80
- "nc": 0.0,
81
- "lcs_u": 0.3333,
82
- "ed": 0.1111,
83
- "class": 0.0,
84
- "tfidf": 0.3446
85
- }
86
- },
87
- {
88
- "dep_id": 0,
89
- "method_sign": "org/jsoup/parser/Tag.clear:(I)Lorg/jsoup/parser/Tag",
90
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
91
- "line_nums_old": "127-132",
92
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
93
- "line_nums_new": "137-142",
94
- "dependency_updated": "updated",
95
- "score": 0.1495,
96
- "signal_scores": {
97
- "nc": 0.0,
98
- "lcs_u": 0.2,
99
- "ed": 0.1111,
100
- "class": 0.0,
101
- "tfidf": 0.4074
102
- }
103
- }
104
- ],
105
- "coverage_gold": 1.0,
106
- "branch_coverage_gold": 0.4961,
107
- "method_coverage_gold": 2.1815,
108
- "line_coverage_gold": 1.2648,
109
- "is_traceback": false,
110
- "commit_gap": {
111
- "count": 0,
112
- "skipped_commits": []
113
- },
114
- "test_is_refactoring_only": false,
115
- "has_test_dep_change": false,
116
- "all_deps_new": [
117
- "org/jsoup/parser/TagSet.Html:()Lorg/jsoup/parser/TagSet",
118
- "org/jsoup/parser/TagSet.get:(Ljava/lang/String;Ljava/lang/String;)Lorg/jsoup/parser/Tag",
119
- "org/jsoup/parser/Tag.set:(I)Lorg/jsoup/parser/Tag",
120
- "org/jsoup/parser/TagSet.valueOf:(Ljava/lang/String;Ljava/lang/String;)Lorg/jsoup/parser/Tag",
121
- "org/jsoup/parser/Tag.clear:(I)Lorg/jsoup/parser/Tag",
122
- "org/jsoup/parser/Tag.name:()Ljava/lang/String",
123
- "org/jsoup/parser/Tag.isKnownTag:()Z",
124
- "org/jsoup/parser/TagSet.add:(Lorg/jsoup/parser/Tag;)Lorg/jsoup/parser/TagSet",
125
- "org/jsoup/parser/Tag.namespace:()Ljava/lang/String"
126
- ],
127
- "all_deps_old": [
128
- "org/jsoup/parser/TagSet.Html:()Lorg/jsoup/parser/TagSet",
129
- "org/jsoup/parser/TagSet.get:(Ljava/lang/String;Ljava/lang/String;)Lorg/jsoup/parser/Tag",
130
- "org/jsoup/parser/Tag.set:(I)Lorg/jsoup/parser/Tag",
131
- "org/jsoup/parser/TagSet.valueOf:(Ljava/lang/String;Ljava/lang/String;)Lorg/jsoup/parser/Tag",
132
- "org/jsoup/parser/Tag.clear:(I)Lorg/jsoup/parser/Tag",
133
- "org/jsoup/parser/Tag.name:()Ljava/lang/String",
134
- "org/jsoup/parser/Tag.isKnownTag:()Z",
135
- "org/jsoup/parser/TagSet.add:(Lorg/jsoup/parser/Tag;)Lorg/jsoup/parser/TagSet",
136
- "org/jsoup/parser/Tag.namespace:()Ljava/lang/String"
137
- ],
138
- "deps_changes": [
139
- {
140
- "method_sign": "org/jsoup/parser/Tag.clear:(I)Lorg/jsoup/parser/Tag",
141
- "change_type": "UPDATE",
142
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
143
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
144
- "source": "production",
145
- "is_test_dependency": false,
146
- "is_refactoring_only": false
147
- },
148
- {
149
- "method_sign": "org/jsoup/parser/Tag.set:(I)Lorg/jsoup/parser/Tag",
150
- "change_type": "UPDATE",
151
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
152
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
153
- "source": "production",
154
- "is_test_dependency": false,
155
- "is_refactoring_only": false
156
- },
157
- {
158
- "method_sign": "org/jsoup/parser/TagSet.add:(Lorg/jsoup/parser/Tag;)Lorg/jsoup/parser/TagSet",
159
- "change_type": "UPDATE",
160
- "file_path_old": "src/main/java/org/jsoup/parser/TagSet.java",
161
- "file_path_new": "src/main/java/org/jsoup/parser/TagSet.java",
162
- "source": "production",
163
- "is_test_dependency": false,
164
- "is_refactoring_only": false
165
- },
166
- {
167
- "method_sign": "org/jsoup/parser/Tag.isKnownTag:()Z",
168
- "change_type": "UPDATE",
169
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
170
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
171
- "source": "production",
172
- "is_test_dependency": false,
173
- "is_refactoring_only": false
174
- }
175
- ],
176
- "variant_result": {
177
- "old_on_old": "pass",
178
- "old_on_new": "error",
179
- "new_on_old": "error",
180
- "new_on_new": "pass"
181
- }
182
- }
183
- ],
184
- "version": "jsoup-1.22.1",
185
- "java_version": 11
186
- },
187
- {
188
- "task_id": "jhy_jsoup-jsoup-1.22.1__9cb943a_005da92__ElementTest_153024d6",
189
- "project_name": "jhy_jsoup-jsoup-1.22.1",
190
- "git_clone_url": "https://github.com/jhy/jsoup.git",
191
- "rev1": "9cb943a9f2ffeeca2adcd9aa3d127df249b75515",
192
- "rev2": "005da925db2ff5fe592b79c1a4d77cb91882fcf0",
193
- "rev1_date": "2025-04-11T23:56:58Z",
194
- "rev2_date": "2025-04-12T01:06:53Z",
195
- "git_diff_url": "https://github.com/jhy/jsoup/compare/9cb943a9f2ffeeca2adcd9aa3d127df249b75515...005da925db2ff5fe592b79c1a4d77cb91882fcf0",
196
- "test_file": "src/test/java/org/jsoup/nodes/ElementTest.java",
197
- "test_changes": [
198
- {
199
- "change_id": "109_jhy_jsoup-jsoup-1.22.1_9cb943a_005da92_ElementTest",
200
- "test_sign": "org/jsoup/nodes/ElementTest.orphanDivToString:()V",
201
- "class": "ElementTest",
202
- "method": "orphanDivToString",
203
- "module": "",
204
- "junit_selector": "org.jsoup.nodes.ElementTest#orphanDivToString",
205
- "old_test_code": "@Test\npublic void orphanDivToString() {\n Element orphan = new Element(\"div\").id(\"foo\").text(\"Hello\");\n assertEquals(\"<div id=\\\"foo\\\">\\n Hello\\n</div>\", orphan.toString());\n}",
206
- "new_test_code": "@Test\npublic void orphanDivToString() {\n Element orphan = new Element(\"div\").id(\"foo\").text(\"Hello\");\n assertEquals(\"<div id=\\\"foo\\\">Hello</div>\", orphan.toString());\n}",
207
- "old_test_file_path": [
208
- "src/test/java/org/jsoup/nodes/ElementTest.java"
209
- ],
210
- "old_test_lnum": [
211
- "948-952"
212
- ],
213
- "new_test_lnum": [
214
- "950-954"
215
- ],
216
- "old_production_code": "public Element text(String text) {\n Validate.notNull(text);\n empty();\n Document owner = ownerDocument();\n if (owner != null && owner.parser().isContentForTagData(normalName()))\n appendChild(new DataNode(text));\n else\n appendChild(new TextNode(text));\n return this;\n}",
217
- "new_production_code": "public Element text(String text) {\n Validate.notNull(text);\n empty();\n if (tag().is(Tag.Data))\n appendChild(new DataNode(text));\n else\n appendChild(new TextNode(text));\n return this;\n}",
218
- "focal_file_path": "src/main/java/org/jsoup/nodes/Element.java",
219
- "focal_method_sign": "org/jsoup/nodes/Element.text:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
220
- "focal_all_deps_scored": [
221
- {
222
- "dep_id": 0,
223
- "method_sign": "org/jsoup/nodes/Element.text:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
224
- "file_path_old": "src/main/java/org/jsoup/nodes/Element.java",
225
- "line_nums_old": "1564-1576",
226
- "file_path_new": "src/main/java/org/jsoup/nodes/Element.java",
227
- "line_nums_new": "1579-1589",
228
- "dependency_updated": "updated",
229
- "score": null,
230
- "signal_scores": {}
231
- }
232
- ],
233
- "coverage_gold": 0.9,
234
- "branch_coverage_gold": 4.3064,
235
- "method_coverage_gold": 10.4012,
236
- "line_coverage_gold": 7.4802,
237
- "is_traceback": false,
238
- "commit_gap": {
239
- "count": 4,
240
- "skipped_commits": [
241
- "29bc6f50c0a31614835e9378f0d30fcae9bcc2e8",
242
- "c09c1f51f4779d259df0423119a83ebe8aa3b86d",
243
- "6681be4553ae9e4153fdabf006655b84dd161160",
244
- "37043421d95508823b888c6ddabd45deab62c496"
245
- ]
246
- },
247
- "test_is_refactoring_only": false,
248
- "has_test_dep_change": false,
249
- "all_deps_new": [
250
- "org/jsoup/nodes/Element.id:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
251
- "org/jsoup/nodes/Node.toString:()Ljava/lang/String",
252
- "org/jsoup/nodes/Element.text:(Ljava/lang/String;)Lorg/jsoup/nodes/Element"
253
- ],
254
- "all_deps_old": [
255
- "org/jsoup/nodes/Element.text:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
256
- "org/jsoup/nodes/Node.toString:()Ljava/lang/String",
257
- "org/jsoup/nodes/Element.id:(Ljava/lang/String;)Lorg/jsoup/nodes/Element"
258
- ],
259
- "deps_changes": [
260
- {
261
- "method_sign": "org/jsoup/nodes/Element.text:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
262
- "change_type": "UPDATE",
263
- "file_path_old": "src/main/java/org/jsoup/nodes/Element.java",
264
- "file_path_new": "src/main/java/org/jsoup/nodes/Element.java",
265
- "source": "production",
266
- "is_test_dependency": false,
267
- "is_refactoring_only": false
268
- }
269
- ],
270
- "variant_result": {
271
- "old_on_old": "pass",
272
- "old_on_new": "fail",
273
- "new_on_old": "fail",
274
- "new_on_new": "pass"
275
- }
276
- },
277
- {
278
- "change_id": "110_jhy_jsoup-jsoup-1.22.1_9cb943a_005da92_ElementTest",
279
- "test_sign": "org/jsoup/nodes/ElementTest.insertChildrenAsCopy:()V",
280
- "class": "ElementTest",
281
- "method": "insertChildrenAsCopy",
282
- "module": "",
283
- "junit_selector": "org.jsoup.nodes.ElementTest#insertChildrenAsCopy",
284
- "old_test_code": "@Test\npublic void insertChildrenAsCopy() {\n Document doc = Jsoup.parse(\"<div id=1>Text <p>One</p> Text <p>Two</p></div><div id=2></div>\");\n Element div1 = doc.select(\"div\").get(0);\n Element div2 = doc.select(\"div\").get(1);\n Elements ps = doc.select(\"p\").clone();\n ps.first().text(\"One cloned\");\n div2.insertChildren(-1, ps);\n assertEquals(4, div1.childNodeSize());\n assertEquals(2, div2.childNodeSize());\n assertEquals(\"<div id=\\\"1\\\">Text <p>One</p> Text <p>Two</p></div><div id=\\\"2\\\"><p>One cloned</p><p>Two</p></div>\", TextUtil.stripNewlines(doc.body().html()));\n}",
285
- "new_test_code": "@Test\npublic void insertChildrenAsCopy() {\n Document doc = Jsoup.parse(\"<div id=1>Text <p>One</p> Text <p>Two</p></div><div id=2></div>\");\n Element div1 = doc.select(\"div\").get(0);\n Element div2 = doc.select(\"div\").get(1);\n Elements ps = doc.select(\"p\").clone();\n ps.first().text(\"One cloned\");\n div2.insertChildren(-1, ps);\n assertEquals(4, div1.childNodeSize());\n assertEquals(2, div2.childNodeSize());\n assertEquals(\"<div id=\\\"1\\\">\\n Text\\n <p>One</p>\\n Text\\n <p>Two</p>\\n</div>\\n<div id=\\\"2\\\">\\n <p>One cloned</p>\\n <p>Two</p>\\n</div>\", doc.body().html());\n}",
286
- "old_test_file_path": [
287
- "src/test/java/org/jsoup/nodes/ElementTest.java"
288
- ],
289
- "old_test_lnum": [
290
- "1203-1216"
291
- ],
292
- "new_test_lnum": [
293
- "1211-1226"
294
- ],
295
- "old_production_code": "public Element text(String text) {\n Validate.notNull(text);\n empty();\n Document owner = ownerDocument();\n if (owner != null && owner.parser().isContentForTagData(normalName()))\n appendChild(new DataNode(text));\n else\n appendChild(new TextNode(text));\n return this;\n}",
296
- "new_production_code": "public Element text(String text) {\n Validate.notNull(text);\n empty();\n if (tag().is(Tag.Data))\n appendChild(new DataNode(text));\n else\n appendChild(new TextNode(text));\n return this;\n}",
297
- "focal_file_path": "src/main/java/org/jsoup/nodes/Element.java",
298
- "focal_method_sign": "org/jsoup/nodes/Element.text:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
299
- "focal_all_deps_scored": [
300
- {
301
- "dep_id": 0,
302
- "method_sign": "org/jsoup/nodes/Element.text:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
303
- "file_path_old": "src/main/java/org/jsoup/nodes/Element.java",
304
- "line_nums_old": "1564-1576",
305
- "file_path_new": "src/main/java/org/jsoup/nodes/Element.java",
306
- "line_nums_new": "1579-1589",
307
- "dependency_updated": "updated",
308
- "score": null,
309
- "signal_scores": {}
310
- }
311
- ],
312
- "coverage_gold": 0.9393939393939394,
313
- "branch_coverage_gold": 11.669,
314
- "method_coverage_gold": 25.7058,
315
- "line_coverage_gold": 18.2407,
316
- "is_traceback": false,
317
- "commit_gap": {
318
- "count": 4,
319
- "skipped_commits": [
320
- "29bc6f50c0a31614835e9378f0d30fcae9bcc2e8",
321
- "c09c1f51f4779d259df0423119a83ebe8aa3b86d",
322
- "6681be4553ae9e4153fdabf006655b84dd161160",
323
- "37043421d95508823b888c6ddabd45deab62c496"
324
- ]
325
- },
326
- "test_is_refactoring_only": false,
327
- "has_test_dep_change": false,
328
- "all_deps_new": [
329
- "org/jsoup/select/Elements.clone:()Lorg/jsoup/select/Elements",
330
- "org/jsoup/nodes/Element.insertChildren:(ILjava/util/Collection;)Lorg/jsoup/nodes/Element",
331
- "org/jsoup/select/Elements.first:()Lorg/jsoup/nodes/Element",
332
- "org/jsoup/nodes/Element.html:()Ljava/lang/String",
333
- "org/jsoup/nodes/Element.childNodeSize:()I",
334
- "org/jsoup/Jsoup.parse:(Ljava/lang/String;)Lorg/jsoup/nodes/Document",
335
- "org/jsoup/nodes/Document.body:()Lorg/jsoup/nodes/Element",
336
- "org/jsoup/nodes/Element.select:(Ljava/lang/String;)Lorg/jsoup/select/Elements",
337
- "org/jsoup/nodes/Element.text:(Ljava/lang/String;)Lorg/jsoup/nodes/Element"
338
- ],
339
- "all_deps_old": [
340
- "org/jsoup/select/Elements.clone:()Lorg/jsoup/select/Elements",
341
- "org/jsoup/TextUtil.stripNewlines:(Ljava/lang/String;)Ljava/lang/String",
342
- "org/jsoup/nodes/Element.select:(Ljava/lang/String;)Lorg/jsoup/select/Elements",
343
- "org/jsoup/nodes/Element.text:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
344
- "org/jsoup/nodes/Element.childNodeSize:()I",
345
- "org/jsoup/nodes/Document.body:()Lorg/jsoup/nodes/Element",
346
- "org/jsoup/nodes/Element.html:()Ljava/lang/String",
347
- "org/jsoup/select/Elements.first:()Lorg/jsoup/nodes/Element",
348
- "org/jsoup/nodes/Element.insertChildren:(ILjava/util/Collection;)Lorg/jsoup/nodes/Element",
349
- "org/jsoup/Jsoup.parse:(Ljava/lang/String;)Lorg/jsoup/nodes/Document"
350
- ],
351
- "deps_changes": [
352
- {
353
- "method_sign": "org/jsoup/nodes/Element.text:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
354
- "change_type": "UPDATE",
355
- "file_path_old": "src/main/java/org/jsoup/nodes/Element.java",
356
- "file_path_new": "src/main/java/org/jsoup/nodes/Element.java",
357
- "source": "production",
358
- "is_test_dependency": false,
359
- "is_refactoring_only": false
360
- }
361
- ],
362
- "variant_result": {
363
- "old_on_old": "pass",
364
- "old_on_new": "fail",
365
- "new_on_old": "fail",
366
- "new_on_new": "pass"
367
- }
368
- },
369
- {
370
- "change_id": "114_jhy_jsoup-jsoup-1.22.1_9cb943a_005da92_ElementTest",
371
- "test_sign": "org/jsoup/nodes/ElementTest.outerHtmlAppendable:()V",
372
- "class": "ElementTest",
373
- "method": "outerHtmlAppendable",
374
- "module": "",
375
- "junit_selector": "org.jsoup.nodes.ElementTest#outerHtmlAppendable",
376
- "old_test_code": "@Test\nvoid outerHtmlAppendable() {\n Document doc = Jsoup.parse(\"<div>One</div>\");\n StringBuffer buffer = new StringBuffer();\n doc.body().outerHtml(buffer);\n assertEquals(\"\\n<body>\\n <div>\\n One\\n </div>\\n</body>\", buffer.toString());\n StringBuilder builder = new StringBuilder();\n doc.body().outerHtml(builder);\n assertEquals(\"<body>\\n <div>\\n One\\n </div>\\n</body>\", builder.toString());\n}",
377
- "new_test_code": "@Test\nvoid outerHtmlAppendable() {\n Document doc = Jsoup.parse(\"<div>One</div>\");\n StringBuffer buffer = new StringBuffer();\n doc.body().outerHtml(buffer);\n assertEquals(\"<body>\\n <div>One</div>\\n</body>\", buffer.toString());\n StringBuilder builder = new StringBuilder();\n doc.body().outerHtml(builder);\n assertEquals(\"<body>\\n <div>One</div>\\n</body>\", builder.toString());\n}",
378
- "old_test_file_path": [
379
- "src/test/java/org/jsoup/nodes/ElementTest.java"
380
- ],
381
- "old_test_lnum": [
382
- "2892-2901"
383
- ],
384
- "new_test_lnum": [
385
- "2907-2916"
386
- ],
387
- "old_production_code": "protected void outerHtml(Appendable accum) {\n NodeTraversor.traverse(new OuterHtmlVisitor(accum, NodeUtils.outputSettings(this)), this);\n}",
388
- "new_production_code": "protected void outerHtml(Appendable accum) {\n Printer printer = Printer.printerFor(this, accum);\n NodeTraversor.traverse(printer, this);\n}",
389
- "focal_file_path": "src/main/java/org/jsoup/nodes/Node.java",
390
- "focal_method_sign": "org/jsoup/nodes/Node.outerHtml:(Ljava/lang/Appendable;)V",
391
- "focal_all_deps_scored": [
392
- {
393
- "dep_id": 0,
394
- "method_sign": "org/jsoup/nodes/Node.outerHtml:(Ljava/lang/Appendable;)V",
395
- "file_path_old": "src/main/java/org/jsoup/nodes/Node.java",
396
- "line_nums_old": "769-771",
397
- "file_path_new": "src/main/java/org/jsoup/nodes/Node.java",
398
- "line_nums_new": "768-771",
399
- "dependency_updated": "updated",
400
- "score": null,
401
- "signal_scores": {}
402
- }
403
- ],
404
- "coverage_gold": 0.9090909090909091,
405
- "branch_coverage_gold": 7.7396,
406
- "method_coverage_gold": 20.6538,
407
- "line_coverage_gold": 13.8634,
408
- "is_traceback": false,
409
- "commit_gap": {
410
- "count": 4,
411
- "skipped_commits": [
412
- "29bc6f50c0a31614835e9378f0d30fcae9bcc2e8",
413
- "c09c1f51f4779d259df0423119a83ebe8aa3b86d",
414
- "6681be4553ae9e4153fdabf006655b84dd161160",
415
- "37043421d95508823b888c6ddabd45deab62c496"
416
- ]
417
- },
418
- "test_is_refactoring_only": false,
419
- "has_test_dep_change": false,
420
- "all_deps_new": [
421
- "org/jsoup/nodes/Node.outerHtml:(Ljava/lang/Appendable;)V",
422
- "org/jsoup/Jsoup.parse:(Ljava/lang/String;)Lorg/jsoup/nodes/Document",
423
- "org/jsoup/nodes/Document.body:()Lorg/jsoup/nodes/Element"
424
- ],
425
- "all_deps_old": [
426
- "org/jsoup/nodes/Node.outerHtml:(Ljava/lang/Appendable;)V",
427
- "org/jsoup/nodes/Document.body:()Lorg/jsoup/nodes/Element",
428
- "org/jsoup/Jsoup.parse:(Ljava/lang/String;)Lorg/jsoup/nodes/Document"
429
- ],
430
- "deps_changes": [
431
- {
432
- "method_sign": "org/jsoup/nodes/Node.outerHtml:(Ljava/lang/Appendable;)V",
433
- "change_type": "UPDATE",
434
- "file_path_old": "src/main/java/org/jsoup/nodes/Node.java",
435
- "file_path_new": "src/main/java/org/jsoup/nodes/Node.java",
436
- "source": "production",
437
- "is_test_dependency": false,
438
- "is_refactoring_only": false
439
- }
440
- ],
441
- "variant_result": {
442
- "old_on_old": "pass",
443
- "old_on_new": "fail",
444
- "new_on_old": "fail",
445
- "new_on_new": "pass"
446
- }
447
- },
448
- {
449
- "change_id": "116_jhy_jsoup-jsoup-1.22.1_9cb943a_005da92_ElementTest",
450
- "test_sign": "org/jsoup/nodes/ElementTest.testShadowElementsAreUpdated:()V",
451
- "class": "ElementTest",
452
- "method": "testShadowElementsAreUpdated",
453
- "module": "",
454
- "junit_selector": "org.jsoup.nodes.ElementTest#testShadowElementsAreUpdated",
455
- "old_test_code": "@Test\npublic void testShadowElementsAreUpdated() {\n String html = \"<div><p><a>One</a></p><p><a>Two</a></p>Three</div><span>Four</span><foo></foo><img>\";\n Document doc = Jsoup.parse(html);\n Element div = doc.select(\"div\").first();\n Elements els = div.children();\n List<Node> nodes = div.childNodes();\n assertEquals(2, els.size());\n assertEquals(3, nodes.size());\n Element p3 = new Element(\"p\").text(\"P3\");\n Element p4 = new Element(\"p\").text(\"P4\");\n div.insertChildren(1, p3);\n div.insertChildren(3, p4);\n Elements els2 = div.children();\n assertEquals(2, els.size());\n assertEquals(4, els2.size());\n assertEquals(\"<p><a>One</a></p>\\n\" + \"<p>P3</p>\\n\" + \"<p><a>Two</a></p>\\n\" + \"<p>P4</p>Three\", div.html());\n assertEquals(\"P3\", els2.get(1).text());\n assertEquals(\"P4\", els2.get(3).text());\n p3.after(\"<span>Another</span\");\n Elements els3 = div.children();\n assertEquals(5, els3.size());\n assertEquals(\"span\", els3.get(2).tagName());\n assertEquals(\"Another\", els3.get(2).text());\n assertEquals(\"<p><a>One</a></p>\\n\" + \"<p>P3</p><span>Another</span>\\n\" + \"<p><a>Two</a></p>\\n\" + \"<p>P4</p>Three\", div.html());\n}",
456
- "new_test_code": "@Test\npublic void testShadowElementsAreUpdated() {\n String html = \"<div><p><a>One</a></p><p><a>Two</a></p>Three</div><span>Four</span><foo></foo><img>\";\n Document doc = Jsoup.parse(html);\n Element div = doc.select(\"div\").first();\n Elements els = div.children();\n List<Node> nodes = div.childNodes();\n assertEquals(2, els.size());\n assertEquals(3, nodes.size());\n Element p3 = new Element(\"p\").text(\"P3\");\n Element p4 = new Element(\"p\").text(\"P4\");\n div.insertChildren(1, p3);\n div.insertChildren(3, p4);\n Elements els2 = div.children();\n assertEquals(2, els.size());\n assertEquals(4, els2.size());\n assertEquals(\"<p><a>One</a></p>\\n\" + \"<p>P3</p>\\n\" + \"<p><a>Two</a></p>\\n\" + \"<p>P4</p>\\nThree\", div.html());\n assertEquals(\"P3\", els2.get(1).text());\n assertEquals(\"P4\", els2.get(3).text());\n p3.after(\"<span>Another</span\");\n Elements els3 = div.children();\n assertEquals(5, els3.size());\n assertEquals(\"span\", els3.get(2).tagName());\n assertEquals(\"Another\", els3.get(2).text());\n assertEquals(\"<p><a>One</a></p>\\n\" + \"<p>P3</p>\\n\" + \"<span>Another</span>\\n\" + \"<p><a>Two</a></p>\\n\" + \"<p>P4</p>\\n\" + \"Three\", div.html());\n}",
457
- "old_test_file_path": [
458
- "src/test/java/org/jsoup/nodes/ElementTest.java"
459
- ],
460
- "old_test_lnum": [
461
- "1576-1615"
462
- ],
463
- "new_test_lnum": [
464
- "1586-1627"
465
- ],
466
- "old_production_code": "public Element text(String text) {\n Validate.notNull(text);\n empty();\n Document owner = ownerDocument();\n if (owner != null && owner.parser().isContentForTagData(normalName()))\n appendChild(new DataNode(text));\n else\n appendChild(new TextNode(text));\n return this;\n}",
467
- "new_production_code": "public Element text(String text) {\n Validate.notNull(text);\n empty();\n if (tag().is(Tag.Data))\n appendChild(new DataNode(text));\n else\n appendChild(new TextNode(text));\n return this;\n}",
468
- "focal_file_path": "src/main/java/org/jsoup/nodes/Element.java",
469
- "focal_method_sign": "org/jsoup/nodes/Element.text:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
470
- "focal_all_deps_scored": [
471
- {
472
- "dep_id": 0,
473
- "method_sign": "org/jsoup/nodes/Element.text:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
474
- "file_path_old": "src/main/java/org/jsoup/nodes/Element.java",
475
- "line_nums_old": "1564-1576",
476
- "file_path_new": "src/main/java/org/jsoup/nodes/Element.java",
477
- "line_nums_new": "1579-1589",
478
- "dependency_updated": "updated",
479
- "score": null,
480
- "signal_scores": {}
481
- }
482
- ],
483
- "coverage_gold": 0.9,
484
- "branch_coverage_gold": 12.1453,
485
- "method_coverage_gold": 25.8049,
486
- "line_coverage_gold": 18.5019,
487
- "is_traceback": false,
488
- "commit_gap": {
489
- "count": 4,
490
- "skipped_commits": [
491
- "29bc6f50c0a31614835e9378f0d30fcae9bcc2e8",
492
- "c09c1f51f4779d259df0423119a83ebe8aa3b86d",
493
- "6681be4553ae9e4153fdabf006655b84dd161160",
494
- "37043421d95508823b888c6ddabd45deab62c496"
495
- ]
496
- },
497
- "test_is_refactoring_only": false,
498
- "has_test_dep_change": false,
499
- "all_deps_new": [
500
- "org/jsoup/nodes/Element.text:()Ljava/lang/String",
501
- "org/jsoup/nodes/Element.after:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
502
- "org/jsoup/Jsoup.parse:(Ljava/lang/String;)Lorg/jsoup/nodes/Document",
503
- "org/jsoup/nodes/Element.text:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
504
- "org/jsoup/select/Elements.first:()Lorg/jsoup/nodes/Element",
505
- "org/jsoup/nodes/Element.insertChildren:(I[Lorg/jsoup/nodes/Node;)Lorg/jsoup/nodes/Element",
506
- "org/jsoup/nodes/Element.html:()Ljava/lang/String",
507
- "org/jsoup/nodes/Element.children:()Lorg/jsoup/select/Elements",
508
- "org/jsoup/nodes/Node.childNodes:()Ljava/util/List",
509
- "org/jsoup/nodes/Element.tagName:()Ljava/lang/String",
510
- "org/jsoup/nodes/Element.select:(Ljava/lang/String;)Lorg/jsoup/select/Elements"
511
- ],
512
- "all_deps_old": [
513
- "org/jsoup/nodes/Element.text:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
514
- "org/jsoup/nodes/Element.children:()Lorg/jsoup/select/Elements",
515
- "org/jsoup/nodes/Element.text:()Ljava/lang/String",
516
- "org/jsoup/nodes/Element.select:(Ljava/lang/String;)Lorg/jsoup/select/Elements",
517
- "org/jsoup/nodes/Element.insertChildren:(I[Lorg/jsoup/nodes/Node;)Lorg/jsoup/nodes/Element",
518
- "org/jsoup/nodes/Element.html:()Ljava/lang/String",
519
- "org/jsoup/select/Elements.first:()Lorg/jsoup/nodes/Element",
520
- "org/jsoup/nodes/Element.after:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
521
- "org/jsoup/nodes/Node.childNodes:()Ljava/util/List",
522
- "org/jsoup/nodes/Element.tagName:()Ljava/lang/String",
523
- "org/jsoup/Jsoup.parse:(Ljava/lang/String;)Lorg/jsoup/nodes/Document"
524
- ],
525
- "deps_changes": [
526
- {
527
- "method_sign": "org/jsoup/nodes/Element.text:(Ljava/lang/String;)Lorg/jsoup/nodes/Element",
528
- "change_type": "UPDATE",
529
- "file_path_old": "src/main/java/org/jsoup/nodes/Element.java",
530
- "file_path_new": "src/main/java/org/jsoup/nodes/Element.java",
531
- "source": "production",
532
- "is_test_dependency": false,
533
- "is_refactoring_only": false
534
- }
535
- ],
536
- "variant_result": {
537
- "old_on_old": "pass",
538
- "old_on_new": "fail",
539
- "new_on_old": "fail",
540
- "new_on_new": "pass"
541
- }
542
- }
543
- ],
544
- "version": "jsoup-1.22.1",
545
- "java_version": 11
546
- },
547
- {
548
- "task_id": "jhy_jsoup-jsoup-1.22.1__9cb943a_005da92__TagTest_3446abfa",
549
- "project_name": "jhy_jsoup-jsoup-1.22.1",
550
- "git_clone_url": "https://github.com/jhy/jsoup.git",
551
- "rev1": "9cb943a9f2ffeeca2adcd9aa3d127df249b75515",
552
- "rev2": "005da925db2ff5fe592b79c1a4d77cb91882fcf0",
553
- "rev1_date": "2025-04-11T23:56:58Z",
554
- "rev2_date": "2025-04-12T01:06:53Z",
555
- "git_diff_url": "https://github.com/jhy/jsoup/compare/9cb943a9f2ffeeca2adcd9aa3d127df249b75515...005da925db2ff5fe592b79c1a4d77cb91882fcf0",
556
- "test_file": "src/test/java/org/jsoup/parser/TagTest.java",
557
- "test_changes": [
558
- {
559
- "change_id": "107_jhy_jsoup-jsoup-1.22.1_9cb943a_005da92_TagTest",
560
- "test_sign": "org/jsoup/parser/TagTest.pSemantics:()V",
561
- "class": "TagTest",
562
- "method": "pSemantics",
563
- "module": "",
564
- "junit_selector": "org.jsoup.parser.TagTest#pSemantics",
565
- "old_test_code": "@Test\npublic void pSemantics() {\n Tag p = Tag.valueOf(\"p\");\n assertTrue(p.isBlock());\n assertFalse(p.formatAsBlock());\n}",
566
- "new_test_code": "@Test\npublic void pSemantics() {\n Tag p = Tag.valueOf(\"p\");\n assertTrue(p.isKnownTag());\n assertTrue(p.isBlock());\n assertFalse(p.isInline());\n}",
567
- "old_test_file_path": [
568
- "src/test/java/org/jsoup/parser/TagTest.java"
569
- ],
570
- "old_test_lnum": [
571
- "49-54"
572
- ],
573
- "new_test_lnum": [
574
- "75-80"
575
- ],
576
- "old_production_code": "public boolean isInline() {\n return !isBlock;\n}",
577
- "new_production_code": "public boolean isInline() {\n return (options & Block) == 0;\n}",
578
- "focal_file_path": "src/main/java/org/jsoup/parser/Tag.java",
579
- "focal_method_sign": "org/jsoup/parser/Tag.isInline:()Z",
580
- "focal_all_deps_scored": [
581
- {
582
- "dep_id": 3,
583
- "method_sign": "org/jsoup/parser/Tag.isInline:()Z",
584
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
585
- "line_nums_old": "153-155",
586
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
587
- "line_nums_new": "236-238",
588
- "dependency_updated": "updated",
589
- "score": 0.3038,
590
- "signal_scores": {
591
- "nc": 0.0,
592
- "lcs_u": 0.375,
593
- "ed": 0.3,
594
- "class": 1.0,
595
- "tfidf": 0.0
596
- }
597
- },
598
- {
599
- "dep_id": 1,
600
- "method_sign": "org/jsoup/parser/Tag.formatAsBlock:()Z",
601
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
602
- "line_nums_old": "144-146",
603
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
604
- "line_nums_new": "227-229",
605
- "dependency_updated": "updated",
606
- "score": 0.3038,
607
- "signal_scores": {
608
- "nc": 0.0,
609
- "lcs_u": 0.3077,
610
- "ed": 0.2308,
611
- "class": 1.0,
612
- "tfidf": 0.0987
613
- }
614
- },
615
- {
616
- "dep_id": 2,
617
- "method_sign": "org/jsoup/parser/Tag.isKnownTag:()Z",
618
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
619
- "line_nums_old": "180-182",
620
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
621
- "line_nums_new": "263-265",
622
- "dependency_updated": "updated",
623
- "score": 0.2741,
624
- "signal_scores": {
625
- "nc": 0.0,
626
- "lcs_u": 0.3,
627
- "ed": 0.2,
628
- "class": 1.0,
629
- "tfidf": 0.0
630
- }
631
- },
632
- {
633
- "dep_id": 0,
634
- "method_sign": "org/jsoup/parser/Tag.isBlock:()Z",
635
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
636
- "line_nums_old": "135-137",
637
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
638
- "line_nums_new": "217-219",
639
- "dependency_updated": "updated",
640
- "score": 0.2716,
641
- "signal_scores": {
642
- "nc": 0.0,
643
- "lcs_u": 0.2857,
644
- "ed": 0.2,
645
- "class": 1.0,
646
- "tfidf": 0.0
647
- }
648
- }
649
- ],
650
- "coverage_gold": 1.0,
651
- "branch_coverage_gold": 0.3572,
652
- "method_coverage_gold": 2.0307,
653
- "line_coverage_gold": 1.0761,
654
- "is_traceback": false,
655
- "commit_gap": {
656
- "count": 4,
657
- "skipped_commits": [
658
- "29bc6f50c0a31614835e9378f0d30fcae9bcc2e8",
659
- "c09c1f51f4779d259df0423119a83ebe8aa3b86d",
660
- "6681be4553ae9e4153fdabf006655b84dd161160",
661
- "37043421d95508823b888c6ddabd45deab62c496"
662
- ]
663
- },
664
- "test_is_refactoring_only": false,
665
- "has_test_dep_change": false,
666
- "all_deps_new": [
667
- "org/jsoup/parser/Tag.isKnownTag:()Z",
668
- "org/jsoup/parser/Tag.isInline:()Z",
669
- "org/jsoup/parser/Tag.isBlock:()Z",
670
- "org/jsoup/parser/Tag.valueOf:(Ljava/lang/String;)Lorg/jsoup/parser/Tag"
671
- ],
672
- "all_deps_old": [
673
- "org/jsoup/parser/Tag.isBlock:()Z",
674
- "org/jsoup/parser/Tag.formatAsBlock:()Z",
675
- "org/jsoup/parser/Tag.valueOf:(Ljava/lang/String;)Lorg/jsoup/parser/Tag"
676
- ],
677
- "deps_changes": [
678
- {
679
- "method_sign": "org/jsoup/parser/Tag.isBlock:()Z",
680
- "change_type": "UPDATE",
681
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
682
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
683
- "source": "production",
684
- "is_test_dependency": false,
685
- "is_refactoring_only": false
686
- },
687
- {
688
- "method_sign": "org/jsoup/parser/Tag.formatAsBlock:()Z",
689
- "change_type": "UPDATE",
690
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
691
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
692
- "source": "production",
693
- "is_test_dependency": false,
694
- "is_refactoring_only": false
695
- },
696
- {
697
- "method_sign": "org/jsoup/parser/Tag.isKnownTag:()Z",
698
- "change_type": "UPDATE",
699
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
700
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
701
- "source": "production",
702
- "is_test_dependency": false,
703
- "is_refactoring_only": false
704
- },
705
- {
706
- "method_sign": "org/jsoup/parser/Tag.isInline:()Z",
707
- "change_type": "UPDATE",
708
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
709
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
710
- "source": "production",
711
- "is_test_dependency": false,
712
- "is_refactoring_only": false
713
- }
714
- ],
715
- "variant_result": {
716
- "old_on_old": "pass",
717
- "old_on_new": "fail",
718
- "new_on_old": "pass",
719
- "new_on_new": "pass"
720
- }
721
- },
722
- {
723
- "change_id": "111_jhy_jsoup-jsoup-1.22.1_9cb943a_005da92_TagTest",
724
- "test_sign": "org/jsoup/parser/TagTest.defaultSemantics:()V",
725
- "class": "TagTest",
726
- "method": "defaultSemantics",
727
- "module": "",
728
- "junit_selector": "org.jsoup.parser.TagTest#defaultSemantics",
729
- "old_test_code": "@Test\npublic void defaultSemantics() {\n Tag foo = Tag.valueOf(\"FOO\");\n Tag foo2 = Tag.valueOf(\"FOO\");\n assertEquals(foo, foo2);\n assertTrue(foo.isInline());\n assertTrue(foo.formatAsBlock());\n}",
730
- "new_test_code": "@Test\npublic void defaultSemantics() {\n Tag foo = Tag.valueOf(\"FOO\");\n Tag foo2 = Tag.valueOf(\"FOO\");\n assertEquals(foo, foo2);\n assertFalse(foo.isKnownTag());\n assertTrue(foo.isInline());\n assertFalse(foo.isBlock());\n assertFalse(foo.is(Tag.InlineContainer));\n assertFalse(foo.preserveWhitespace());\n}",
731
- "old_test_file_path": [
732
- "src/test/java/org/jsoup/parser/TagTest.java"
733
- ],
734
- "old_test_lnum": [
735
- "63-70"
736
- ],
737
- "new_test_lnum": [
738
- "89-99"
739
- ],
740
- "old_production_code": "",
741
- "new_production_code": "public boolean is(int option) {\n return (options & option) != 0;\n}",
742
- "focal_file_path": "src/main/java/org/jsoup/parser/Tag.java",
743
- "focal_method_sign": "org/jsoup/parser/Tag.is:(I)Z",
744
- "focal_all_deps_scored": [
745
- {
746
- "dep_id": 3,
747
- "method_sign": "org/jsoup/parser/Tag.is:(I)Z",
748
- "file_path_old": null,
749
- "line_nums_old": null,
750
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
751
- "line_nums_new": "150-152",
752
- "dependency_updated": "inserted",
753
- "score": 0.3926,
754
- "signal_scores": {
755
- "nc": 0.0,
756
- "lcs_u": 1.0,
757
- "ed": 0.125,
758
- "class": 1.0,
759
- "tfidf": 0.031
760
- }
761
- },
762
- {
763
- "dep_id": 1,
764
- "method_sign": "org/jsoup/parser/Tag.equals:(Ljava/lang/Object;)Z",
765
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
766
- "line_nums_old": "224-239",
767
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
768
- "line_nums_new": "317-326",
769
- "dependency_updated": "updated",
770
- "score": 0.3728,
771
- "signal_scores": {
772
- "nc": 0.0,
773
- "lcs_u": 0.6667,
774
- "ed": 0.25,
775
- "class": 1.0,
776
- "tfidf": 0.1092
777
- }
778
- },
779
- {
780
- "dep_id": 2,
781
- "method_sign": "org/jsoup/parser/Tag.formatAsBlock:()Z",
782
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
783
- "line_nums_old": "144-146",
784
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
785
- "line_nums_new": "227-229",
786
- "dependency_updated": "updated",
787
- "score": 0.2965,
788
- "signal_scores": {
789
- "nc": 0.0,
790
- "lcs_u": 0.3846,
791
- "ed": 0.125,
792
- "class": 1.0,
793
- "tfidf": 0.0842
794
- }
795
- },
796
- {
797
- "dep_id": 5,
798
- "method_sign": "org/jsoup/parser/Tag.isInline:()Z",
799
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
800
- "line_nums_old": "153-155",
801
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
802
- "line_nums_new": "236-238",
803
- "dependency_updated": "updated",
804
- "score": 0.2961,
805
- "signal_scores": {
806
- "nc": 0.0,
807
- "lcs_u": 0.375,
808
- "ed": 0.1875,
809
- "class": 1.0,
810
- "tfidf": 0.0459
811
- }
812
- },
813
- {
814
- "dep_id": 6,
815
- "method_sign": "org/jsoup/parser/Tag.preserveWhitespace:()Z",
816
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
817
- "line_nums_old": "199-201",
818
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
819
- "line_nums_new": "282-284",
820
- "dependency_updated": "updated",
821
- "score": 0.2752,
822
- "signal_scores": {
823
- "nc": 0.0,
824
- "lcs_u": 0.2778,
825
- "ed": 0.1111,
826
- "class": 1.0,
827
- "tfidf": 0.0836
828
- }
829
- },
830
- {
831
- "dep_id": 0,
832
- "method_sign": "org/jsoup/parser/Tag.isBlock:()Z",
833
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
834
- "line_nums_old": "135-137",
835
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
836
- "line_nums_new": "217-219",
837
- "dependency_updated": "updated",
838
- "score": 0.27,
839
- "signal_scores": {
840
- "nc": 0.0,
841
- "lcs_u": 0.2857,
842
- "ed": 0.125,
843
- "class": 1.0,
844
- "tfidf": 0.0459
845
- }
846
- },
847
- {
848
- "dep_id": 4,
849
- "method_sign": "org/jsoup/parser/Tag.isKnownTag:()Z",
850
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
851
- "line_nums_old": "180-182",
852
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
853
- "line_nums_new": "263-265",
854
- "dependency_updated": "updated",
855
- "score": 0.2618,
856
- "signal_scores": {
857
- "nc": 0.0,
858
- "lcs_u": 0.3,
859
- "ed": 0.125,
860
- "class": 1.0,
861
- "tfidf": 0.0
862
- }
863
- }
864
- ],
865
- "coverage_gold": 1.0,
866
- "branch_coverage_gold": 0.5557,
867
- "method_coverage_gold": 2.1793,
868
- "line_coverage_gold": 1.2223,
869
- "is_traceback": false,
870
- "commit_gap": {
871
- "count": 4,
872
- "skipped_commits": [
873
- "29bc6f50c0a31614835e9378f0d30fcae9bcc2e8",
874
- "c09c1f51f4779d259df0423119a83ebe8aa3b86d",
875
- "6681be4553ae9e4153fdabf006655b84dd161160",
876
- "37043421d95508823b888c6ddabd45deab62c496"
877
- ]
878
- },
879
- "test_is_refactoring_only": false,
880
- "has_test_dep_change": false,
881
- "all_deps_new": [
882
- "org/jsoup/parser/Tag.isKnownTag:()Z",
883
- "org/jsoup/parser/Tag.isInline:()Z",
884
- "org/jsoup/parser/Tag.equals:(Ljava/lang/Object;)Z",
885
- "org/jsoup/parser/Tag.isBlock:()Z",
886
- "org/jsoup/parser/Tag.preserveWhitespace:()Z",
887
- "org/jsoup/parser/Tag.valueOf:(Ljava/lang/String;)Lorg/jsoup/parser/Tag",
888
- "org/jsoup/parser/Tag.is:(I)Z"
889
- ],
890
- "all_deps_old": [
891
- "org/jsoup/parser/Tag.equals:(Ljava/lang/Object;)Z",
892
- "org/jsoup/parser/Tag.formatAsBlock:()Z",
893
- "org/jsoup/parser/Tag.valueOf:(Ljava/lang/String;)Lorg/jsoup/parser/Tag",
894
- "org/jsoup/parser/Tag.isInline:()Z"
895
- ],
896
- "deps_changes": [
897
- {
898
- "method_sign": "org/jsoup/parser/Tag.isBlock:()Z",
899
- "change_type": "UPDATE",
900
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
901
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
902
- "source": "production",
903
- "is_test_dependency": false,
904
- "is_refactoring_only": false
905
- },
906
- {
907
- "method_sign": "org/jsoup/parser/Tag.equals:(Ljava/lang/Object;)Z",
908
- "change_type": "UPDATE",
909
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
910
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
911
- "source": "production",
912
- "is_test_dependency": false,
913
- "is_refactoring_only": false
914
- },
915
- {
916
- "method_sign": "org/jsoup/parser/Tag.formatAsBlock:()Z",
917
- "change_type": "UPDATE",
918
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
919
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
920
- "source": "production",
921
- "is_test_dependency": false,
922
- "is_refactoring_only": false
923
- },
924
- {
925
- "method_sign": "org/jsoup/parser/Tag.is:(I)Z",
926
- "change_type": "ADD",
927
- "file_path_old": null,
928
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
929
- "source": "production",
930
- "is_test_dependency": false,
931
- "is_refactoring_only": false
932
- },
933
- {
934
- "method_sign": "org/jsoup/parser/Tag.isKnownTag:()Z",
935
- "change_type": "UPDATE",
936
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
937
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
938
- "source": "production",
939
- "is_test_dependency": false,
940
- "is_refactoring_only": false
941
- },
942
- {
943
- "method_sign": "org/jsoup/parser/Tag.isInline:()Z",
944
- "change_type": "UPDATE",
945
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
946
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
947
- "source": "production",
948
- "is_test_dependency": false,
949
- "is_refactoring_only": false
950
- },
951
- {
952
- "method_sign": "org/jsoup/parser/Tag.preserveWhitespace:()Z",
953
- "change_type": "UPDATE",
954
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
955
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
956
- "source": "production",
957
- "is_test_dependency": false,
958
- "is_refactoring_only": false
959
- }
960
- ],
961
- "variant_result": {
962
- "old_on_old": "pass",
963
- "old_on_new": "fail",
964
- "new_on_old": "error",
965
- "new_on_new": "pass"
966
- }
967
- },
968
- {
969
- "change_id": "118_jhy_jsoup-jsoup-1.22.1_9cb943a_005da92_TagTest",
970
- "test_sign": "org/jsoup/parser/TagTest.equality:()V",
971
- "class": "TagTest",
972
- "method": "equality",
973
- "module": "",
974
- "junit_selector": "org.jsoup.parser.TagTest#equality",
975
- "old_test_code": "@Test\npublic void equality() {\n Tag p1 = Tag.valueOf(\"p\");\n Tag p2 = Tag.valueOf(\"p\");\n assertEquals(p1, p2);\n assertSame(p1, p2);\n}",
976
- "new_test_code": "@Test\npublic void equality() {\n Tag p1 = Tag.valueOf(\"p\");\n Tag p2 = Tag.valueOf(\"p\");\n assertEquals(p1, p2);\n assertNotSame(p1, p2);\n TagSet html1 = TagSet.Html();\n TagSet html2 = TagSet.Html();\n assertEquals(html1, html2);\n assertNotSame(html1, html2);\n Tag p3 = html1.valueOf(\"p\", NamespaceHtml);\n Tag p4 = html1.valueOf(\"p\", NamespaceHtml);\n Tag p5 = html2.valueOf(\"p\", NamespaceHtml);\n Tag p6 = html2.valueOf(\"p\", NamespaceHtml);\n assertEquals(p1, p3);\n assertEquals(p3, p4);\n assertEquals(p4, p5);\n assertSame(p3, p4);\n assertSame(p5, p6);\n assertNotSame(p3, p5);\n}",
977
- "old_test_file_path": [
978
- "src/test/java/org/jsoup/parser/TagTest.java"
979
- ],
980
- "old_test_lnum": [
981
- "35-40"
982
- ],
983
- "new_test_lnum": [
984
- "44-65"
985
- ],
986
- "old_production_code": "@Override\npublic boolean equals(Object o) {\n if (this == o)\n return true;\n if (!(o instanceof Tag))\n return false;\n Tag tag = (Tag) o;\n if (!tagName.equals(tag.tagName))\n return false;\n if (empty != tag.empty)\n return false;\n if (formatAsBlock != tag.formatAsBlock)\n return false;\n if (isBlock != tag.isBlock)\n return false;\n if (preserveWhitespace != tag.preserveWhitespace)\n return false;\n if (selfClosing != tag.selfClosing)\n return false;\n if (formList != tag.formList)\n return false;\n return formSubmit == tag.formSubmit;\n}",
987
- "new_production_code": "@Override\npublic boolean equals(Object o) {\n if (this == o)\n return true;\n if (!(o instanceof Tag))\n return false;\n Tag tag = (Tag) o;\n return Objects.equals(tagName, tag.tagName) && Objects.equals(namespace, tag.namespace) && Objects.equals(normalName, tag.normalName) && options == tag.options;\n}",
988
- "focal_file_path": "src/main/java/org/jsoup/parser/Tag.java",
989
- "focal_method_sign": "org/jsoup/parser/Tag.equals:(Ljava/lang/Object;)Z",
990
- "focal_all_deps_scored": [
991
- {
992
- "dep_id": 0,
993
- "method_sign": "org/jsoup/parser/Tag.equals:(Ljava/lang/Object;)Z",
994
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
995
- "line_nums_old": "224-239",
996
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
997
- "line_nums_new": "317-326",
998
- "dependency_updated": "updated",
999
- "score": 0.4694,
1000
- "signal_scores": {
1001
- "nc": 0.0,
1002
- "lcs_u": 0.8333,
1003
- "ed": 0.625,
1004
- "class": 1.0,
1005
- "tfidf": 0.1326
1006
- }
1007
- },
1008
- {
1009
- "dep_id": 3,
1010
- "method_sign": "org/jsoup/parser/TagSet.equals:(Ljava/lang/Object;)Z",
1011
- "file_path_old": null,
1012
- "line_nums_old": null,
1013
- "file_path_new": "src/main/java/org/jsoup/parser/TagSet.java",
1014
- "line_nums_new": "136-141",
1015
- "dependency_updated": "inserted",
1016
- "score": 0.2832,
1017
- "signal_scores": {
1018
- "nc": 0.0,
1019
- "lcs_u": 0.8333,
1020
- "ed": 0.625,
1021
- "class": 0.0,
1022
- "tfidf": 0.141
1023
- }
1024
- },
1025
- {
1026
- "dep_id": 2,
1027
- "method_sign": "org/jsoup/parser/TagSet.Html:()Lorg/jsoup/parser/TagSet",
1028
- "file_path_old": null,
1029
- "line_nums_old": null,
1030
- "file_path_new": "src/main/java/org/jsoup/parser/TagSet.java",
1031
- "line_nums_new": "30-32",
1032
- "dependency_updated": "inserted",
1033
- "score": 0.1078,
1034
- "signal_scores": {
1035
- "nc": 0.0,
1036
- "lcs_u": 0.25,
1037
- "ed": 0.125,
1038
- "class": 0.0,
1039
- "tfidf": 0.1833
1040
- }
1041
- },
1042
- {
1043
- "dep_id": 1,
1044
- "method_sign": "org/jsoup/parser/TagSet.valueOf:(Ljava/lang/String;Ljava/lang/String;)Lorg/jsoup/parser/Tag",
1045
- "file_path_old": null,
1046
- "line_nums_old": null,
1047
- "file_path_new": "src/main/java/org/jsoup/parser/TagSet.java",
1048
- "line_nums_new": "132-134",
1049
- "dependency_updated": "inserted",
1050
- "score": 0.0953,
1051
- "signal_scores": {
1052
- "nc": 0.0,
1053
- "lcs_u": 0.2857,
1054
- "ed": 0.125,
1055
- "class": 0.0,
1056
- "tfidf": 0.1031
1057
- }
1058
- }
1059
- ],
1060
- "coverage_gold": 1.0,
1061
- "branch_coverage_gold": 0.4564,
1062
- "method_coverage_gold": 2.0802,
1063
- "line_coverage_gold": 1.1596,
1064
- "is_traceback": false,
1065
- "commit_gap": {
1066
- "count": 4,
1067
- "skipped_commits": [
1068
- "29bc6f50c0a31614835e9378f0d30fcae9bcc2e8",
1069
- "c09c1f51f4779d259df0423119a83ebe8aa3b86d",
1070
- "6681be4553ae9e4153fdabf006655b84dd161160",
1071
- "37043421d95508823b888c6ddabd45deab62c496"
1072
- ]
1073
- },
1074
- "test_is_refactoring_only": false,
1075
- "has_test_dep_change": false,
1076
- "all_deps_new": [
1077
- "org/jsoup/parser/TagSet.valueOf:(Ljava/lang/String;Ljava/lang/String;)Lorg/jsoup/parser/Tag",
1078
- "org/jsoup/parser/TagSet.Html:()Lorg/jsoup/parser/TagSet",
1079
- "org/jsoup/parser/TagSet.equals:(Ljava/lang/Object;)Z",
1080
- "org/jsoup/parser/Tag.equals:(Ljava/lang/Object;)Z",
1081
- "org/jsoup/parser/Tag.valueOf:(Ljava/lang/String;)Lorg/jsoup/parser/Tag"
1082
- ],
1083
- "all_deps_old": [
1084
- "org/jsoup/parser/Tag.equals:(Ljava/lang/Object;)Z",
1085
- "org/jsoup/parser/Tag.valueOf:(Ljava/lang/String;)Lorg/jsoup/parser/Tag"
1086
- ],
1087
- "deps_changes": [
1088
- {
1089
- "method_sign": "org/jsoup/parser/Tag.equals:(Ljava/lang/Object;)Z",
1090
- "change_type": "UPDATE",
1091
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
1092
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
1093
- "source": "production",
1094
- "is_test_dependency": false,
1095
- "is_refactoring_only": false
1096
- },
1097
- {
1098
- "method_sign": "org/jsoup/parser/TagSet.valueOf:(Ljava/lang/String;Ljava/lang/String;)Lorg/jsoup/parser/Tag",
1099
- "change_type": "ADD",
1100
- "file_path_old": null,
1101
- "file_path_new": "src/main/java/org/jsoup/parser/TagSet.java",
1102
- "source": "production",
1103
- "is_test_dependency": false,
1104
- "is_refactoring_only": false
1105
- },
1106
- {
1107
- "method_sign": "org/jsoup/parser/TagSet.Html:()Lorg/jsoup/parser/TagSet",
1108
- "change_type": "ADD",
1109
- "file_path_old": null,
1110
- "file_path_new": "src/main/java/org/jsoup/parser/TagSet.java",
1111
- "source": "production",
1112
- "is_test_dependency": false,
1113
- "is_refactoring_only": false
1114
- },
1115
- {
1116
- "method_sign": "org/jsoup/parser/TagSet.equals:(Ljava/lang/Object;)Z",
1117
- "change_type": "ADD",
1118
- "file_path_old": null,
1119
- "file_path_new": "src/main/java/org/jsoup/parser/TagSet.java",
1120
- "source": "production",
1121
- "is_test_dependency": false,
1122
- "is_refactoring_only": false
1123
- }
1124
- ],
1125
- "variant_result": {
1126
- "old_on_old": "pass",
1127
- "old_on_new": "fail",
1128
- "new_on_old": "error",
1129
- "new_on_new": "pass"
1130
- }
1131
- },
1132
- {
1133
- "change_id": "121_jhy_jsoup-jsoup-1.22.1_9cb943a_005da92_TagTest",
1134
- "test_sign": "org/jsoup/parser/TagTest.divSemantics:()V",
1135
- "class": "TagTest",
1136
- "method": "divSemantics",
1137
- "module": "",
1138
- "junit_selector": "org.jsoup.parser.TagTest#divSemantics",
1139
- "old_test_code": "@Test\npublic void divSemantics() {\n Tag div = Tag.valueOf(\"div\");\n assertTrue(div.isBlock());\n assertTrue(div.formatAsBlock());\n}",
1140
- "new_test_code": "@Test\npublic void divSemantics() {\n Tag div = Tag.valueOf(\"div\");\n assertTrue(div.isBlock());\n assertFalse(div.isInline());\n assertTrue(div.isKnownTag());\n}",
1141
- "old_test_file_path": [
1142
- "src/test/java/org/jsoup/parser/TagTest.java"
1143
- ],
1144
- "old_test_lnum": [
1145
- "42-47"
1146
- ],
1147
- "new_test_lnum": [
1148
- "67-73"
1149
- ],
1150
- "old_production_code": "public boolean isInline() {\n return !isBlock;\n}",
1151
- "new_production_code": "public boolean isInline() {\n return (options & Block) == 0;\n}",
1152
- "focal_file_path": "src/main/java/org/jsoup/parser/Tag.java",
1153
- "focal_method_sign": "org/jsoup/parser/Tag.isInline:()Z",
1154
- "focal_all_deps_scored": [
1155
- {
1156
- "dep_id": 3,
1157
- "method_sign": "org/jsoup/parser/Tag.isInline:()Z",
1158
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
1159
- "line_nums_old": "153-155",
1160
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
1161
- "line_nums_new": "236-238",
1162
- "dependency_updated": "updated",
1163
- "score": 0.3314,
1164
- "signal_scores": {
1165
- "nc": 0.0,
1166
- "lcs_u": 0.5,
1167
- "ed": 0.3333,
1168
- "class": 1.0,
1169
- "tfidf": 0.0
1170
- }
1171
- },
1172
- {
1173
- "dep_id": 0,
1174
- "method_sign": "org/jsoup/parser/Tag.isBlock:()Z",
1175
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
1176
- "line_nums_old": "135-137",
1177
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
1178
- "line_nums_new": "217-219",
1179
- "dependency_updated": "updated",
1180
- "score": 0.305,
1181
- "signal_scores": {
1182
- "nc": 0.0,
1183
- "lcs_u": 0.4286,
1184
- "ed": 0.25,
1185
- "class": 1.0,
1186
- "tfidf": 0.0
1187
- }
1188
- },
1189
- {
1190
- "dep_id": 2,
1191
- "method_sign": "org/jsoup/parser/Tag.isKnownTag:()Z",
1192
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
1193
- "line_nums_old": "180-182",
1194
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
1195
- "line_nums_new": "263-265",
1196
- "dependency_updated": "updated",
1197
- "score": 0.3,
1198
- "signal_scores": {
1199
- "nc": 0.0,
1200
- "lcs_u": 0.4,
1201
- "ed": 0.25,
1202
- "class": 1.0,
1203
- "tfidf": 0.0
1204
- }
1205
- },
1206
- {
1207
- "dep_id": 1,
1208
- "method_sign": "org/jsoup/parser/Tag.formatAsBlock:()Z",
1209
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
1210
- "line_nums_old": "144-146",
1211
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
1212
- "line_nums_new": "227-229",
1213
- "dependency_updated": "updated",
1214
- "score": 0.2835,
1215
- "signal_scores": {
1216
- "nc": 0.0,
1217
- "lcs_u": 0.3077,
1218
- "ed": 0.1538,
1219
- "class": 1.0,
1220
- "tfidf": 0.0665
1221
- }
1222
- }
1223
- ],
1224
- "coverage_gold": 1.0,
1225
- "branch_coverage_gold": 0.3572,
1226
- "method_coverage_gold": 2.0307,
1227
- "line_coverage_gold": 1.0761,
1228
- "is_traceback": false,
1229
- "commit_gap": {
1230
- "count": 4,
1231
- "skipped_commits": [
1232
- "29bc6f50c0a31614835e9378f0d30fcae9bcc2e8",
1233
- "c09c1f51f4779d259df0423119a83ebe8aa3b86d",
1234
- "6681be4553ae9e4153fdabf006655b84dd161160",
1235
- "37043421d95508823b888c6ddabd45deab62c496"
1236
- ]
1237
- },
1238
- "test_is_refactoring_only": false,
1239
- "has_test_dep_change": false,
1240
- "all_deps_new": [
1241
- "org/jsoup/parser/Tag.isKnownTag:()Z",
1242
- "org/jsoup/parser/Tag.isInline:()Z",
1243
- "org/jsoup/parser/Tag.isBlock:()Z",
1244
- "org/jsoup/parser/Tag.valueOf:(Ljava/lang/String;)Lorg/jsoup/parser/Tag"
1245
- ],
1246
- "all_deps_old": [
1247
- "org/jsoup/parser/Tag.isBlock:()Z",
1248
- "org/jsoup/parser/Tag.formatAsBlock:()Z",
1249
- "org/jsoup/parser/Tag.valueOf:(Ljava/lang/String;)Lorg/jsoup/parser/Tag"
1250
- ],
1251
- "deps_changes": [
1252
- {
1253
- "method_sign": "org/jsoup/parser/Tag.isBlock:()Z",
1254
- "change_type": "UPDATE",
1255
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
1256
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
1257
- "source": "production",
1258
- "is_test_dependency": false,
1259
- "is_refactoring_only": false
1260
- },
1261
- {
1262
- "method_sign": "org/jsoup/parser/Tag.formatAsBlock:()Z",
1263
- "change_type": "UPDATE",
1264
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
1265
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
1266
- "source": "production",
1267
- "is_test_dependency": false,
1268
- "is_refactoring_only": false
1269
- },
1270
- {
1271
- "method_sign": "org/jsoup/parser/Tag.isKnownTag:()Z",
1272
- "change_type": "UPDATE",
1273
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
1274
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
1275
- "source": "production",
1276
- "is_test_dependency": false,
1277
- "is_refactoring_only": false
1278
- },
1279
- {
1280
- "method_sign": "org/jsoup/parser/Tag.isInline:()Z",
1281
- "change_type": "UPDATE",
1282
- "file_path_old": "src/main/java/org/jsoup/parser/Tag.java",
1283
- "file_path_new": "src/main/java/org/jsoup/parser/Tag.java",
1284
- "source": "production",
1285
- "is_test_dependency": false,
1286
- "is_refactoring_only": false
1287
- }
1288
- ],
1289
- "variant_result": {
1290
- "old_on_old": "pass",
1291
- "old_on_new": "fail",
1292
- "new_on_old": "pass",
1293
- "new_on_new": "pass"
1294
- }
1295
- }
1296
- ],
1297
- "version": "jsoup-1.22.1",
1298
- "java_version": 11
1299
- },
1300
- {
1301
- "task_id": "jhy_jsoup-jsoup-1.22.1__a78bcab_eb35cdc__CleanerTest_eca5c570",
1302
- "project_name": "jhy_jsoup-jsoup-1.22.1",
1303
- "git_clone_url": "https://github.com/jhy/jsoup.git",
1304
- "rev1": "a78bcab52cbdb79dbd5a06ea7385907450c3906c",
1305
- "rev2": "eb35cdcbcd22b281e585238842321c3b53052eaf",
1306
- "rev1_date": "2024-12-14T23:27:53Z",
1307
- "rev2_date": "2024-12-15T01:11:12Z",
1308
- "git_diff_url": "https://github.com/jhy/jsoup/compare/a78bcab52cbdb79dbd5a06ea7385907450c3906c...eb35cdcbcd22b281e585238842321c3b53052eaf",
1309
- "test_file": "src/test/java/org/jsoup/safety/CleanerTest.java",
1310
- "test_changes": [
1311
- {
1312
- "change_id": "103_jhy_jsoup-jsoup-1.22.1_a78bcab_eb35cdc_CleanerTest",
1313
- "test_sign": "org/jsoup/safety/CleanerTest.preservesRelativeLinksIfConfigured:()V",
1314
- "class": "CleanerTest",
1315
- "method": "preservesRelativeLinksIfConfigured",
1316
- "module": "",
1317
- "junit_selector": "org.jsoup.safety.CleanerTest#preservesRelativeLinksIfConfigured",
1318
- "old_test_code": "@Test\npublic void preservesRelativeLinksIfConfigured() {\n String html = \"<a href='/foo'>Link</a><img src='/bar'> <img src='javascript:alert()'>\";\n String clean = Jsoup.clean(html, \"http://example.com/\", Safelist.basicWithImages().preserveRelativeLinks(true));\n assertEquals(\"<a href=\\\"/foo\\\" rel=\\\"nofollow\\\">Link</a><img src=\\\"/bar\\\"> <img>\", clean);\n}",
1319
- "new_test_code": "@Test\npublic void preservesRelativeLinksIfConfigured() {\n String html = \"<a href='/foo'>Link</a><img src='/bar'> <img src='javascript:alert()'>\";\n String clean = Jsoup.clean(html, \"http://example.com/\", Safelist.basicWithImages().preserveRelativeLinks(true));\n assertEquals(\"<a href=\\\"/foo\\\">Link</a><img src=\\\"/bar\\\"> <img>\", clean);\n}",
1320
- "old_test_file_path": [
1321
- "src/test/java/org/jsoup/safety/CleanerTest.java"
1322
- ],
1323
- "old_test_lnum": [
1324
- "233-237"
1325
- ],
1326
- "new_test_lnum": [
1327
- "233-237"
1328
- ],
1329
- "old_production_code": "public static String clean(String bodyHtml, String baseUri, Safelist safelist) {\n Document dirty = parseBodyFragment(bodyHtml, baseUri);\n Cleaner cleaner = new Cleaner(safelist);\n Document clean = cleaner.clean(dirty);\n return clean.body().html();\n}",
1330
- "new_production_code": "public static String clean(String bodyHtml, String baseUri, Safelist safelist) {\n if (baseUri.isEmpty() && safelist.preserveRelativeLinks()) {\n baseUri = DummyUri;\n }\n Document dirty = parseBodyFragment(bodyHtml, baseUri);\n Cleaner cleaner = new Cleaner(safelist);\n Document clean = cleaner.clean(dirty);\n return clean.body().html();\n}",
1331
- "focal_file_path": "src/main/java/org/jsoup/Jsoup.java",
1332
- "focal_method_sign": "org/jsoup/Jsoup.clean:(Ljava/lang/String;Ljava/lang/String;Lorg/jsoup/safety/Safelist;)Ljava/lang/String",
1333
- "focal_all_deps_scored": [
1334
- {
1335
- "dep_id": 0,
1336
- "method_sign": "org/jsoup/Jsoup.clean:(Ljava/lang/String;Ljava/lang/String;Lorg/jsoup/safety/Safelist;)Ljava/lang/String",
1337
- "file_path_old": "src/main/java/org/jsoup/Jsoup.java",
1338
- "line_nums_old": "344-349",
1339
- "file_path_new": "src/main/java/org/jsoup/Jsoup.java",
1340
- "line_nums_new": "346-355",
1341
- "dependency_updated": "updated",
1342
- "score": null,
1343
- "signal_scores": {}
1344
- }
1345
- ],
1346
- "coverage_gold": 0.9166666666666666,
1347
- "branch_coverage_gold": 11.8887,
1348
- "method_coverage_gold": 25.9356,
1349
- "line_coverage_gold": 19.4555,
1350
- "is_traceback": false,
1351
- "commit_gap": {
1352
- "count": 0,
1353
- "skipped_commits": []
1354
- },
1355
- "test_is_refactoring_only": false,
1356
- "has_test_dep_change": false,
1357
- "all_deps_new": [
1358
- "org/jsoup/Jsoup.clean:(Ljava/lang/String;Ljava/lang/String;Lorg/jsoup/safety/Safelist;)Ljava/lang/String",
1359
- "org/jsoup/safety/Safelist.basicWithImages:()Lorg/jsoup/safety/Safelist",
1360
- "org/jsoup/safety/Safelist.preserveRelativeLinks:(Z)Lorg/jsoup/safety/Safelist"
1361
- ],
1362
- "all_deps_old": [
1363
- "org/jsoup/safety/Safelist.basicWithImages:()Lorg/jsoup/safety/Safelist",
1364
- "org/jsoup/safety/Safelist.preserveRelativeLinks:(Z)Lorg/jsoup/safety/Safelist",
1365
- "org/jsoup/Jsoup.clean:(Ljava/lang/String;Ljava/lang/String;Lorg/jsoup/safety/Safelist;)Ljava/lang/String"
1366
- ],
1367
- "deps_changes": [
1368
- {
1369
- "method_sign": "org/jsoup/Jsoup.clean:(Ljava/lang/String;Ljava/lang/String;Lorg/jsoup/safety/Safelist;)Ljava/lang/String",
1370
- "change_type": "UPDATE",
1371
- "file_path_old": "src/main/java/org/jsoup/Jsoup.java",
1372
- "file_path_new": "src/main/java/org/jsoup/Jsoup.java",
1373
- "source": "production",
1374
- "is_test_dependency": false,
1375
- "is_refactoring_only": false
1376
- }
1377
- ],
1378
- "variant_result": {
1379
- "old_on_old": "pass",
1380
- "old_on_new": "fail",
1381
- "new_on_old": "fail",
1382
- "new_on_new": "pass"
1383
- }
1384
- },
1385
- {
1386
- "change_id": "104_jhy_jsoup-jsoup-1.22.1_a78bcab_eb35cdc_CleanerTest",
1387
- "test_sign": "org/jsoup/safety/CleanerTest.resolvesRelativeLinks:()V",
1388
- "class": "CleanerTest",
1389
- "method": "resolvesRelativeLinks",
1390
- "module": "",
1391
- "junit_selector": "org.jsoup.safety.CleanerTest#resolvesRelativeLinks",
1392
- "old_test_code": "@Test\npublic void resolvesRelativeLinks() {\n String html = \"<a href='/foo'>Link</a><img src='/bar'>\";\n String clean = Jsoup.clean(html, \"http://example.com/\", Safelist.basicWithImages());\n assertEquals(\"<a href=\\\"http://example.com/foo\\\" rel=\\\"nofollow\\\">Link</a><img src=\\\"http://example.com/bar\\\">\", clean);\n}",
1393
- "new_test_code": "@Test\npublic void resolvesRelativeLinks() {\n String html = \"<a href='/foo'>Link</a><img src='/bar'>\";\n String clean = Jsoup.clean(html, \"http://example.com/\", Safelist.basicWithImages());\n assertEquals(\"<a href=\\\"http://example.com/foo\\\">Link</a><img src=\\\"http://example.com/bar\\\">\", clean);\n}",
1394
- "old_test_file_path": [
1395
- "src/test/java/org/jsoup/safety/CleanerTest.java"
1396
- ],
1397
- "old_test_lnum": [
1398
- "227-231"
1399
- ],
1400
- "new_test_lnum": [
1401
- "227-231"
1402
- ],
1403
- "old_production_code": "public static String clean(String bodyHtml, String baseUri, Safelist safelist) {\n Document dirty = parseBodyFragment(bodyHtml, baseUri);\n Cleaner cleaner = new Cleaner(safelist);\n Document clean = cleaner.clean(dirty);\n return clean.body().html();\n}",
1404
- "new_production_code": "public static String clean(String bodyHtml, String baseUri, Safelist safelist) {\n if (baseUri.isEmpty() && safelist.preserveRelativeLinks()) {\n baseUri = DummyUri;\n }\n Document dirty = parseBodyFragment(bodyHtml, baseUri);\n Cleaner cleaner = new Cleaner(safelist);\n Document clean = cleaner.clean(dirty);\n return clean.body().html();\n}",
1405
- "focal_file_path": "src/main/java/org/jsoup/Jsoup.java",
1406
- "focal_method_sign": "org/jsoup/Jsoup.clean:(Ljava/lang/String;Ljava/lang/String;Lorg/jsoup/safety/Safelist;)Ljava/lang/String",
1407
- "focal_all_deps_scored": [
1408
- {
1409
- "dep_id": 0,
1410
- "method_sign": "org/jsoup/Jsoup.clean:(Ljava/lang/String;Ljava/lang/String;Lorg/jsoup/safety/Safelist;)Ljava/lang/String",
1411
- "file_path_old": "src/main/java/org/jsoup/Jsoup.java",
1412
- "line_nums_old": "344-349",
1413
- "file_path_new": "src/main/java/org/jsoup/Jsoup.java",
1414
- "line_nums_new": "346-355",
1415
- "dependency_updated": "updated",
1416
- "score": null,
1417
- "signal_scores": {}
1418
- }
1419
- ],
1420
- "coverage_gold": 0.9,
1421
- "branch_coverage_gold": 11.3567,
1422
- "method_coverage_gold": 25.9356,
1423
- "line_coverage_gold": 19.3799,
1424
- "is_traceback": false,
1425
- "commit_gap": {
1426
- "count": 0,
1427
- "skipped_commits": []
1428
- },
1429
- "test_is_refactoring_only": false,
1430
- "has_test_dep_change": false,
1431
- "all_deps_new": [
1432
- "org/jsoup/Jsoup.clean:(Ljava/lang/String;Ljava/lang/String;Lorg/jsoup/safety/Safelist;)Ljava/lang/String",
1433
- "org/jsoup/safety/Safelist.basicWithImages:()Lorg/jsoup/safety/Safelist"
1434
- ],
1435
- "all_deps_old": [
1436
- "org/jsoup/safety/Safelist.basicWithImages:()Lorg/jsoup/safety/Safelist",
1437
- "org/jsoup/Jsoup.clean:(Ljava/lang/String;Ljava/lang/String;Lorg/jsoup/safety/Safelist;)Ljava/lang/String"
1438
- ],
1439
- "deps_changes": [
1440
- {
1441
- "method_sign": "org/jsoup/Jsoup.clean:(Ljava/lang/String;Ljava/lang/String;Lorg/jsoup/safety/Safelist;)Ljava/lang/String",
1442
- "change_type": "UPDATE",
1443
- "file_path_old": "src/main/java/org/jsoup/Jsoup.java",
1444
- "file_path_new": "src/main/java/org/jsoup/Jsoup.java",
1445
- "source": "production",
1446
- "is_test_dependency": false,
1447
- "is_refactoring_only": false
1448
- }
1449
- ],
1450
- "variant_result": {
1451
- "old_on_old": "pass",
1452
- "old_on_new": "fail",
1453
- "new_on_old": "fail",
1454
- "new_on_new": "pass"
1455
- }
1456
- }
1457
- ],
1458
- "version": "jsoup-1.22.1",
1459
- "java_version": 11
1460
- },
1461
- {
1462
- "task_id": "jhy_jsoup-jsoup-1.22.1__b60c480_2a7918c__AttributesTest_2a59266e",
1463
- "project_name": "jhy_jsoup-jsoup-1.22.1",
1464
- "git_clone_url": "https://github.com/jhy/jsoup.git",
1465
- "rev1": "b60c480804bb00b8e2ab5821d30f93fd1a07f063",
1466
- "rev2": "2a7918cc48d6625c303ee9d037613b8125bcc346",
1467
- "rev1_date": "2025-07-10T01:51:20Z",
1468
- "rev2_date": "2025-07-10T02:42:27Z",
1469
- "git_diff_url": "https://github.com/jhy/jsoup/compare/b60c480804bb00b8e2ab5821d30f93fd1a07f063...2a7918cc48d6625c303ee9d037613b8125bcc346",
1470
- "test_file": "src/test/java/org/jsoup/nodes/AttributesTest.java",
1471
- "test_changes": [
1472
- {
1473
- "change_id": "144_jhy_jsoup-jsoup-1.22.1_b60c480_2a7918c_AttributesTest",
1474
- "test_sign": "org/jsoup/nodes/AttributesTest.testSizeWhenHasInternal:()V",
1475
- "class": "AttributesTest",
1476
- "method": "testSizeWhenHasInternal",
1477
- "module": "",
1478
- "junit_selector": "org.jsoup.nodes.AttributesTest#testSizeWhenHasInternal",
1479
- "old_test_code": "@Test\npublic void testSizeWhenHasInternal() {\n Attributes a = new Attributes();\n a.put(\"One\", \"One\");\n a.put(\"Two\", \"Two\");\n assertEquals(2, a.size());\n a.put(Attributes.internalKey(\"baseUri\"), \"example.com\");\n a.put(Attributes.internalKey(\"another\"), \"example.com\");\n a.put(Attributes.internalKey(\"last\"), \"example.com\");\n a.remove(Attributes.internalKey(\"last\"));\n assertEquals(4, a.size());\n assertEquals(2, a.asList().size());\n}",
1480
- "new_test_code": "@Test\npublic void testSizeWhenHasInternal() {\n Attributes a = new Attributes();\n a.put(\"One\", \"One\");\n a.put(\"Two\", \"Two\");\n assertEquals(2, a.size());\n a.put(Attributes.internalKey(\"baseUri\"), \"example.com\");\n a.put(Attributes.internalKey(\"another\"), \"example.com\");\n a.put(Attributes.internalKey(\"last\"), \"example.com\");\n a.remove(Attributes.internalKey(\"last\"));\n assertEquals(2, a.size());\n assertEquals(2, a.asList().size());\n}",
1481
- "old_test_file_path": [
1482
- "src/test/java/org/jsoup/nodes/AttributesTest.java"
1483
- ],
1484
- "old_test_lnum": [
1485
- "289-302"
1486
- ],
1487
- "new_test_lnum": [
1488
- "289-302"
1489
- ],
1490
- "old_production_code": "public int size() {\n return size;\n}",
1491
- "new_production_code": "public int size() {\n if (size == 0)\n return 0;\n int count = 0;\n for (int i = 0; i < size; i++) {\n if (!isInternalKey(keys[i]))\n count++;\n }\n return count;\n}",
1492
- "focal_file_path": "src/main/java/org/jsoup/nodes/Attributes.java",
1493
- "focal_method_sign": "org/jsoup/nodes/Attributes.size:()I",
1494
- "focal_all_deps_scored": [
1495
- {
1496
- "dep_id": 0,
1497
- "method_sign": "org/jsoup/nodes/Attributes.size:()I",
1498
- "file_path_old": "src/main/java/org/jsoup/nodes/Attributes.java",
1499
- "line_nums_old": "335-338",
1500
- "file_path_new": "src/main/java/org/jsoup/nodes/Attributes.java",
1501
- "line_nums_new": "335-342",
1502
- "dependency_updated": "updated",
1503
- "score": null,
1504
- "signal_scores": {}
1505
- }
1506
- ],
1507
- "coverage_gold": 0.96,
1508
- "branch_coverage_gold": 0.5776,
1509
- "method_coverage_gold": 0.887,
1510
- "line_coverage_gold": 0.775,
1511
- "is_traceback": false,
1512
- "commit_gap": {
1513
- "count": 0,
1514
- "skipped_commits": []
1515
- },
1516
- "test_is_refactoring_only": false,
1517
- "has_test_dep_change": false,
1518
- "all_deps_new": [
1519
- "org/jsoup/nodes/Attributes.asList:()Ljava/util/List",
1520
- "org/jsoup/nodes/Attributes.put:(Ljava/lang/String;Ljava/lang/String;)Lorg/jsoup/nodes/Attributes",
1521
- "org/jsoup/nodes/Attributes.internalKey:(Ljava/lang/String;)Ljava/lang/String",
1522
- "org/jsoup/nodes/Attributes.remove:(Ljava/lang/String;)V",
1523
- "org/jsoup/nodes/Attributes.size:()I"
1524
- ],
1525
- "all_deps_old": [
1526
- "org/jsoup/nodes/Attributes.internalKey:(Ljava/lang/String;)Ljava/lang/String",
1527
- "org/jsoup/nodes/Attributes.size:()I",
1528
- "org/jsoup/nodes/Attributes.put:(Ljava/lang/String;Ljava/lang/String;)Lorg/jsoup/nodes/Attributes",
1529
- "org/jsoup/nodes/Attributes.remove:(Ljava/lang/String;)V",
1530
- "org/jsoup/nodes/Attributes.asList:()Ljava/util/List"
1531
- ],
1532
- "deps_changes": [
1533
- {
1534
- "method_sign": "org/jsoup/nodes/Attributes.size:()I",
1535
- "change_type": "UPDATE",
1536
- "file_path_old": "src/main/java/org/jsoup/nodes/Attributes.java",
1537
- "file_path_new": "src/main/java/org/jsoup/nodes/Attributes.java",
1538
- "source": "production",
1539
- "is_test_dependency": false,
1540
- "is_refactoring_only": false
1541
- }
1542
- ],
1543
- "variant_result": {
1544
- "old_on_old": "pass",
1545
- "old_on_new": "fail",
1546
- "new_on_old": "fail",
1547
- "new_on_new": "pass"
1548
- }
1549
- }
1550
- ],
1551
- "version": "jsoup-1.22.1",
1552
- "java_version": 11
1553
- }
1554
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
leangen_graphql-spqr-graphql-spqr-v0.12.4.json DELETED
The diff for this file is too large to render. See raw diff
 
lemire_javaewah-JavaEWAH-1.2.3.json DELETED
The diff for this file is too large to render. See raw diff
 
mirromutth_r2dbc-mysql-v0.8.2.RELEASE.json DELETED
@@ -1,1147 +0,0 @@
1
- [
2
- {
3
- "task_id": "mirromutth_r2dbc-mysql-v0.8.2.RELEASE__48c98b9_1cb2ff8__FluxDiscardOnCancelTest_1330f1fa",
4
- "project_name": "mirromutth_r2dbc-mysql-v0.8.2.RELEASE",
5
- "git_clone_url": "https://github.com/mirromutth/r2dbc-mysql.git",
6
- "rev1": "48c98b95aba83d1ce8df279034f5948ed96750ae",
7
- "rev2": "1cb2ff81cac17fd3455b6a68c410b640ff195882",
8
- "rev1_date": "2019-09-28T06:45:53Z",
9
- "rev2_date": "2019-09-28T06:45:53Z",
10
- "git_diff_url": "https://github.com/mirromutth/r2dbc-mysql/compare/48c98b95aba83d1ce8df279034f5948ed96750ae...1cb2ff81cac17fd3455b6a68c410b640ff195882",
11
- "test_file": "src/test/java/dev/miku/r2dbc/mysql/util/FluxDiscardOnCancelTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "8_mirromutth_r2dbc-mysql-v0.8.2.RELEASE_48c98b9_1cb2ff8_FluxDiscardOnCancelTest",
15
- "test_sign": "dev/miku/r2dbc/mysql/util/FluxDiscardOnCancelTest.assemblyHook:()V",
16
- "class": "FluxDiscardOnCancelTest",
17
- "method": "assemblyHook",
18
- "module": "",
19
- "junit_selector": "dev.miku.r2dbc.mysql.util.FluxDiscardOnCancelTest#assemblyHook",
20
- "old_test_code": "@Test\nvoid assemblyHook() {\n List<Object> publishers = new ArrayList<>();\n Hooks.onEachOperator(objectPublisher -> {\n publishers.add(objectPublisher);\n return objectPublisher;\n });\n Iterator<Integer> items = createItems(5);\n Flux.fromIterable(() -> items).transform(OperatorUtils::discardOnCancel).as(StepVerifier::create).expectNextCount(5).verifyComplete();\n assertThat(publishers).hasSize(2).element(1).isExactlyInstanceOf(FluxDiscardOnCancel.class);\n}",
21
- "new_test_code": "@Test\nvoid assemblyHook() {\n List<Object> publishers = new ArrayList<>();\n Hooks.onEachOperator(objectPublisher -> {\n publishers.add(objectPublisher);\n return objectPublisher;\n });\n Iterator<Integer> items = createItems(5);\n Flux<Integer> flux = Flux.fromIterable(() -> items);\n flux.transform(OperatorUtils::discardOnCancel).as(StepVerifier::create).expectNextCount(5).verifyComplete();\n ObjectAssert<?> element = assertThat(publishers).hasSize(2).element(1);\n if (flux instanceof Fuseable) {\n element.isExactlyInstanceOf(FluxDiscardOnCancelFuseable.class);\n } else {\n element.isExactlyInstanceOf(FluxDiscardOnCancel.class);\n }\n}",
22
- "old_test_file_path": [
23
- "src/test/java/dev/miku/r2dbc/mysql/util/FluxDiscardOnCancelTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "110-128"
27
- ],
28
- "new_test_lnum": [
29
- "112-136"
30
- ],
31
- "old_production_code": "",
32
- "new_production_code": "@Override\npublic void subscribe(CoreSubscriber<? super T> actual) {\n this.source.subscribe(new DiscardOnCancelFuseableSubscriber<>(actual));\n}",
33
- "focal_file_path": "src/main/java/dev/miku/r2dbc/mysql/util/FluxDiscardOnCancelFuseable.java",
34
- "focal_method_sign": "dev/miku/r2dbc/mysql/util/FluxDiscardOnCancelFuseable.subscribe:(Lreactor/core/CoreSubscriber;)V",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 1,
38
- "method_sign": "dev/miku/r2dbc/mysql/util/FluxDiscardOnCancelFuseable.subscribe:(Lreactor/core/CoreSubscriber;)V",
39
- "file_path_old": null,
40
- "line_nums_old": null,
41
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/util/FluxDiscardOnCancelFuseable.java",
42
- "line_nums_new": "46-49",
43
- "dependency_updated": "inserted",
44
- "score": 0.0863,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 0.3333,
48
- "ed": 0.1667,
49
- "class": 0.0,
50
- "tfidf": 0.0
51
- }
52
- },
53
- {
54
- "dep_id": 0,
55
- "method_sign": "dev/miku/r2dbc/mysql/util/OperatorUtils.discardOnCancel:(Lreactor/core/publisher/Flux;)Lreactor/core/publisher/Flux",
56
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/util/OperatorUtils.java",
57
- "line_nums_old": "39-41",
58
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/util/OperatorUtils.java",
59
- "line_nums_new": "40-46",
60
- "dependency_updated": "updated",
61
- "score": 0.0556,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 0.2,
65
- "ed": 0.0667,
66
- "class": 0.0,
67
- "tfidf": 0.0398
68
- }
69
- }
70
- ],
71
- "coverage_gold": 0.43478260869565216,
72
- "branch_coverage_gold": 0.1588,
73
- "method_coverage_gold": 0.6029,
74
- "line_coverage_gold": 0.407,
75
- "is_traceback": false,
76
- "commit_gap": {
77
- "count": 0,
78
- "skipped_commits": []
79
- },
80
- "test_is_refactoring_only": false,
81
- "has_test_dep_change": false,
82
- "all_deps_new": [
83
- "dev/miku/r2dbc/mysql/util/FluxDiscardOnCancelFuseable.subscribe:(Lreactor/core/CoreSubscriber;)V",
84
- "dev/miku/r2dbc/mysql/util/OperatorUtils.discardOnCancel:(Lreactor/core/publisher/Flux;)Lreactor/core/publisher/Flux",
85
- "dev/miku/r2dbc/mysql/util/FluxDiscardOnCancelTest.createItems:(I)Ljava/util/Iterator"
86
- ],
87
- "all_deps_old": [
88
- "dev/miku/r2dbc/mysql/util/FluxDiscardOnCancel.subscribe:(Lreactor/core/CoreSubscriber;)V",
89
- "dev/miku/r2dbc/mysql/util/OperatorUtils.discardOnCancel:(Lreactor/core/publisher/Flux;)Lreactor/core/publisher/Flux",
90
- "dev/miku/r2dbc/mysql/util/FluxDiscardOnCancelTest.createItems:(I)Ljava/util/Iterator"
91
- ],
92
- "deps_changes": [
93
- {
94
- "method_sign": "dev/miku/r2dbc/mysql/util/OperatorUtils.discardOnCancel:(Lreactor/core/publisher/Flux;)Lreactor/core/publisher/Flux",
95
- "change_type": "UPDATE",
96
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/util/OperatorUtils.java",
97
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/util/OperatorUtils.java",
98
- "source": "production",
99
- "is_test_dependency": false,
100
- "is_refactoring_only": false
101
- },
102
- {
103
- "method_sign": "dev/miku/r2dbc/mysql/util/FluxDiscardOnCancelFuseable.subscribe:(Lreactor/core/CoreSubscriber;)V",
104
- "change_type": "ADD",
105
- "file_path_old": null,
106
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/util/FluxDiscardOnCancelFuseable.java",
107
- "source": "production",
108
- "is_test_dependency": false,
109
- "is_refactoring_only": false
110
- }
111
- ],
112
- "variant_result": {
113
- "old_on_old": "pass",
114
- "old_on_new": "fail",
115
- "new_on_old": "error",
116
- "new_on_new": "pass"
117
- }
118
- }
119
- ],
120
- "version": "v0.8.2.RELEASE",
121
- "java_version": 8
122
- },
123
- {
124
- "task_id": "mirromutth_r2dbc-mysql-v0.8.2.RELEASE__56c0dec_603efe9__CodecTestSupport_8ffbc7b4",
125
- "project_name": "mirromutth_r2dbc-mysql-v0.8.2.RELEASE",
126
- "git_clone_url": "https://github.com/mirromutth/r2dbc-mysql.git",
127
- "rev1": "56c0decc1cf9ca0747f6ca69d7661bdc8326bcc5",
128
- "rev2": "603efe9e57f327d502dcdd358393b7e7286d3c23",
129
- "rev1_date": "2020-06-11T14:23:02Z",
130
- "rev2_date": "2020-06-11T14:23:02Z",
131
- "git_diff_url": "https://github.com/mirromutth/r2dbc-mysql/compare/56c0decc1cf9ca0747f6ca69d7661bdc8326bcc5...603efe9e57f327d502dcdd358393b7e7286d3c23",
132
- "test_file": "src/test/java/dev/miku/r2dbc/mysql/codec/CodecTestSupport.java",
133
- "test_changes": [
134
- {
135
- "change_id": "32_mirromutth_r2dbc-mysql-v0.8.2.RELEASE_56c0dec_603efe9_CodecTestSupport",
136
- "test_sign": "dev/miku/r2dbc/mysql/codec/CodecTestSupport.stringify:()V",
137
- "class": "CodecTestSupport",
138
- "method": "stringify",
139
- "module": "",
140
- "junit_selector": "dev.miku.r2dbc.mysql.codec.CodecTestSupport#stringify",
141
- "old_test_code": "@Test\ndefault void stringify() {\n Codec<T> codec = getCodec(UnpooledByteBufAllocator.DEFAULT);\n T[] origin = originParameters();\n Object[] strings = stringifyParameters();\n assertEquals(origin.length, strings.length);\n for (int i = 0; i < origin.length; ++i) {\n ParameterWriter writer = ParameterWriterHelper.get(1);\n codec.encode(origin[i], CONTEXT).text(writer).as(StepVerifier::create).verifyComplete();\n assertEquals(ParameterWriterHelper.toSql(writer), strings[i].toString());\n }\n}",
142
- "new_test_code": "@Test\ndefault void stringify() {\n Codec<T> codec = getCodec(UnpooledByteBufAllocator.DEFAULT);\n T[] origin = originParameters();\n Object[] strings = stringifyParameters();\n assertEquals(origin.length, strings.length);\n for (int i = 0; i < origin.length; ++i) {\n ParameterWriter writer = ParameterWriterHelper.get(1);\n codec.encode(origin[i], CONTEXT).publishText(writer).as(StepVerifier::create).verifyComplete();\n assertEquals(ParameterWriterHelper.toSql(writer), strings[i].toString());\n }\n}",
143
- "old_test_file_path": [
144
- "src/test/java/dev/miku/r2dbc/mysql/codec/CodecTestSupport.java"
145
- ],
146
- "old_test_lnum": [
147
- "72-88"
148
- ],
149
- "new_test_lnum": [
150
- "74-90"
151
- ],
152
- "old_production_code": "@Override\npublic Mono<Void> text(ParameterWriter writer) {\n return Mono.fromRunnable(() -> encodeTo(writer));\n}",
153
- "new_production_code": "",
154
- "focal_file_path": "src/main/java/dev/miku/r2dbc/mysql/codec/DurationCodec.java",
155
- "focal_method_sign": "dev/miku/r2dbc/mysql/codec/DurationCodec$DurationParameter.text:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Lreactor/core/publisher/Mono",
156
- "focal_all_deps_scored": [
157
- {
158
- "dep_id": 1,
159
- "method_sign": "dev/miku/r2dbc/mysql/codec/DurationCodec$DurationParameter.text:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Lreactor/core/publisher/Mono",
160
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/codec/DurationCodec.java",
161
- "line_nums_old": "205-208",
162
- "file_path_new": null,
163
- "line_nums_new": null,
164
- "dependency_updated": "deleted",
165
- "score": 0.0919,
166
- "signal_scores": {
167
- "nc": 0.0,
168
- "lcs_u": 0.25,
169
- "ed": 0.1111,
170
- "class": 0.0,
171
- "tfidf": 0.1251
172
- }
173
- },
174
- {
175
- "dep_id": 0,
176
- "method_sign": "dev/miku/r2dbc/mysql/codec/DurationCodec$DurationParameter.publishText:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Lreactor/core/publisher/Mono",
177
- "file_path_old": null,
178
- "line_nums_old": null,
179
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/codec/DurationCodec.java",
180
- "line_nums_new": "205-208",
181
- "dependency_updated": "inserted",
182
- "score": 0.0765,
183
- "signal_scores": {
184
- "nc": 0.0,
185
- "lcs_u": 0.1818,
186
- "ed": 0.0909,
187
- "class": 0.0,
188
- "tfidf": 0.1251
189
- }
190
- }
191
- ],
192
- "coverage_gold": 0.0,
193
- "branch_coverage_gold": 0.0,
194
- "method_coverage_gold": 0.0,
195
- "line_coverage_gold": 0.0,
196
- "is_traceback": false,
197
- "commit_gap": {
198
- "count": 0,
199
- "skipped_commits": []
200
- },
201
- "test_is_refactoring_only": false,
202
- "has_test_dep_change": false,
203
- "all_deps_new": [
204
- "dev/miku/r2dbc/mysql/codec/DurationCodec.encode:(Ljava/lang/Object;Ldev/miku/r2dbc/mysql/codec/CodecContext;)Ldev/miku/r2dbc/mysql/Parameter",
205
- "dev/miku/r2dbc/mysql/message/client/ParameterWriterHelper.get:(I)Ldev/miku/r2dbc/mysql/ParameterWriter",
206
- "dev/miku/r2dbc/mysql/codec/DurationCodec$DurationParameter.publishText:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Lreactor/core/publisher/Mono",
207
- "dev/miku/r2dbc/mysql/codec/DurationCodecTest.stringifyParameters:()[Ljava/lang/Object",
208
- "dev/miku/r2dbc/mysql/message/client/ParameterWriterHelper.toSql:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Ljava/lang/String"
209
- ],
210
- "all_deps_old": [
211
- "dev/miku/r2dbc/mysql/codec/DurationCodec.encode:(Ljava/lang/Object;Ldev/miku/r2dbc/mysql/codec/CodecContext;)Ldev/miku/r2dbc/mysql/Parameter",
212
- "dev/miku/r2dbc/mysql/message/client/ParameterWriterHelper.get:(I)Ldev/miku/r2dbc/mysql/ParameterWriter",
213
- "dev/miku/r2dbc/mysql/codec/DurationCodec$DurationParameter.text:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Lreactor/core/publisher/Mono",
214
- "dev/miku/r2dbc/mysql/codec/DurationCodecTest.stringifyParameters:()[Ljava/lang/Object",
215
- "dev/miku/r2dbc/mysql/message/client/ParameterWriterHelper.toSql:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Ljava/lang/String"
216
- ],
217
- "deps_changes": [
218
- {
219
- "method_sign": "dev/miku/r2dbc/mysql/codec/DurationCodec$DurationParameter.publishText:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Lreactor/core/publisher/Mono",
220
- "change_type": "ADD",
221
- "file_path_old": null,
222
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/codec/DurationCodec.java",
223
- "source": "production",
224
- "is_test_dependency": false,
225
- "is_refactoring_only": false
226
- },
227
- {
228
- "method_sign": "dev/miku/r2dbc/mysql/codec/DurationCodec$DurationParameter.text:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Lreactor/core/publisher/Mono",
229
- "change_type": "DELETE",
230
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/codec/DurationCodec.java",
231
- "file_path_new": null,
232
- "source": "production",
233
- "is_test_dependency": false,
234
- "is_refactoring_only": false
235
- }
236
- ],
237
- "variant_result": {
238
- "old_on_old": "pass",
239
- "old_on_new": "error",
240
- "new_on_old": "error",
241
- "new_on_new": "pass"
242
- }
243
- }
244
- ],
245
- "version": "v0.8.2.RELEASE",
246
- "java_version": 8
247
- },
248
- {
249
- "task_id": "mirromutth_r2dbc-mysql-v0.8.2.RELEASE__56c0dec_603efe9__SetCodecTest_cfd9eb78",
250
- "project_name": "mirromutth_r2dbc-mysql-v0.8.2.RELEASE",
251
- "git_clone_url": "https://github.com/mirromutth/r2dbc-mysql.git",
252
- "rev1": "56c0decc1cf9ca0747f6ca69d7661bdc8326bcc5",
253
- "rev2": "603efe9e57f327d502dcdd358393b7e7286d3c23",
254
- "rev1_date": "2020-06-11T14:23:02Z",
255
- "rev2_date": "2020-06-11T14:23:02Z",
256
- "git_diff_url": "https://github.com/mirromutth/r2dbc-mysql/compare/56c0decc1cf9ca0747f6ca69d7661bdc8326bcc5...603efe9e57f327d502dcdd358393b7e7286d3c23",
257
- "test_file": "src/test/java/dev/miku/r2dbc/mysql/codec/SetCodecTest.java",
258
- "test_changes": [
259
- {
260
- "change_id": "31_mirromutth_r2dbc-mysql-v0.8.2.RELEASE_56c0dec_603efe9_SetCodecTest",
261
- "test_sign": "dev/miku/r2dbc/mysql/codec/SetCodecTest.stringifySet:()V",
262
- "class": "SetCodecTest",
263
- "method": "stringifySet",
264
- "module": "",
265
- "junit_selector": "dev.miku.r2dbc.mysql.codec.SetCodecTest#stringifySet",
266
- "old_test_code": "@Test\nvoid stringifySet() {\n SetCodec codec = getCodec(UnpooledByteBufAllocator.DEFAULT);\n String[] strings = stringifySets();\n assertEquals(sets.length, strings.length);\n for (int i = 0; i < sets.length; ++i) {\n ParameterWriter writer = ParameterWriterHelper.get(1);\n codec.encode(sets[i], CONTEXT).text(writer).as(StepVerifier::create).verifyComplete();\n assertEquals(ParameterWriterHelper.toSql(writer), strings[i]);\n }\n}",
267
- "new_test_code": "@Test\nvoid stringifySet() {\n SetCodec codec = getCodec(UnpooledByteBufAllocator.DEFAULT);\n String[] strings = stringifySets();\n assertEquals(sets.length, strings.length);\n for (int i = 0; i < sets.length; ++i) {\n ParameterWriter writer = ParameterWriterHelper.get(1);\n codec.encode(sets[i], CONTEXT).publishText(writer).as(StepVerifier::create).verifyComplete();\n assertEquals(ParameterWriterHelper.toSql(writer), strings[i]);\n }\n}",
268
- "old_test_file_path": [
269
- "src/test/java/dev/miku/r2dbc/mysql/codec/SetCodecTest.java"
270
- ],
271
- "old_test_lnum": [
272
- "112-127"
273
- ],
274
- "new_test_lnum": [
275
- "112-127"
276
- ],
277
- "old_production_code": "@Override\npublic Mono<Void> text(ParameterWriter writer) {\n return Mono.fromRunnable(() -> encodeIterator(writer, new ConvertedIterator(value.iterator())));\n}",
278
- "new_production_code": "",
279
- "focal_file_path": "src/main/java/dev/miku/r2dbc/mysql/codec/SetCodec.java",
280
- "focal_method_sign": "dev/miku/r2dbc/mysql/codec/SetCodec$SetParameter.text:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Lreactor/core/publisher/Mono",
281
- "focal_all_deps_scored": [
282
- {
283
- "dep_id": 1,
284
- "method_sign": "dev/miku/r2dbc/mysql/codec/SetCodec$SetParameter.text:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Lreactor/core/publisher/Mono",
285
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/codec/SetCodec.java",
286
- "line_nums_old": "328-331",
287
- "file_path_new": null,
288
- "line_nums_new": null,
289
- "dependency_updated": "deleted",
290
- "score": 0.3743,
291
- "signal_scores": {
292
- "nc": 0.0,
293
- "lcs_u": 0.75,
294
- "ed": 0.1667,
295
- "class": 1.0,
296
- "tfidf": 0.1114
297
- }
298
- },
299
- {
300
- "dep_id": 0,
301
- "method_sign": "dev/miku/r2dbc/mysql/codec/SetCodec$SetParameter.publishText:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Lreactor/core/publisher/Mono",
302
- "file_path_old": null,
303
- "line_nums_old": null,
304
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/codec/SetCodec.java",
305
- "line_nums_new": "328-331",
306
- "dependency_updated": "inserted",
307
- "score": 0.3061,
308
- "signal_scores": {
309
- "nc": 0.0,
310
- "lcs_u": 0.3636,
311
- "ed": 0.1667,
312
- "class": 1.0,
313
- "tfidf": 0.1114
314
- }
315
- }
316
- ],
317
- "coverage_gold": 0.6666666666666666,
318
- "branch_coverage_gold": 1.0939,
319
- "method_coverage_gold": 2.5407,
320
- "line_coverage_gold": 1.8961,
321
- "is_traceback": false,
322
- "commit_gap": {
323
- "count": 0,
324
- "skipped_commits": []
325
- },
326
- "test_is_refactoring_only": false,
327
- "has_test_dep_change": false,
328
- "all_deps_new": [
329
- "dev/miku/r2dbc/mysql/codec/SetCodec$SetParameter.publishText:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Lreactor/core/publisher/Mono",
330
- "dev/miku/r2dbc/mysql/message/client/ParameterWriterHelper.get:(I)Ldev/miku/r2dbc/mysql/ParameterWriter",
331
- "dev/miku/r2dbc/mysql/codec/SetCodecTest.stringifySets:()[Ljava/lang/String",
332
- "dev/miku/r2dbc/mysql/codec/SetCodecTest.getCodec:(Lio/netty/buffer/ByteBufAllocator;)Ldev/miku/r2dbc/mysql/codec/SetCodec",
333
- "dev/miku/r2dbc/mysql/message/client/ParameterWriterHelper.toSql:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Ljava/lang/String",
334
- "dev/miku/r2dbc/mysql/codec/SetCodec.encode:(Ljava/lang/Object;Ldev/miku/r2dbc/mysql/codec/CodecContext;)Ldev/miku/r2dbc/mysql/Parameter"
335
- ],
336
- "all_deps_old": [
337
- "dev/miku/r2dbc/mysql/message/client/ParameterWriterHelper.get:(I)Ldev/miku/r2dbc/mysql/ParameterWriter",
338
- "dev/miku/r2dbc/mysql/codec/SetCodec$SetParameter.text:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Lreactor/core/publisher/Mono",
339
- "dev/miku/r2dbc/mysql/codec/SetCodecTest.getCodec:(Lio/netty/buffer/ByteBufAllocator;)Ldev/miku/r2dbc/mysql/codec/SetCodec",
340
- "dev/miku/r2dbc/mysql/message/client/ParameterWriterHelper.toSql:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Ljava/lang/String",
341
- "dev/miku/r2dbc/mysql/codec/SetCodecTest.stringifySets:()[Ljava/lang/String",
342
- "dev/miku/r2dbc/mysql/codec/SetCodec.encode:(Ljava/lang/Object;Ldev/miku/r2dbc/mysql/codec/CodecContext;)Ldev/miku/r2dbc/mysql/Parameter"
343
- ],
344
- "deps_changes": [
345
- {
346
- "method_sign": "dev/miku/r2dbc/mysql/codec/SetCodec$SetParameter.publishText:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Lreactor/core/publisher/Mono",
347
- "change_type": "ADD",
348
- "file_path_old": null,
349
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/codec/SetCodec.java",
350
- "source": "production",
351
- "is_test_dependency": false,
352
- "is_refactoring_only": false
353
- },
354
- {
355
- "method_sign": "dev/miku/r2dbc/mysql/codec/SetCodec$SetParameter.text:(Ldev/miku/r2dbc/mysql/ParameterWriter;)Lreactor/core/publisher/Mono",
356
- "change_type": "DELETE",
357
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/codec/SetCodec.java",
358
- "file_path_new": null,
359
- "source": "production",
360
- "is_test_dependency": false,
361
- "is_refactoring_only": false
362
- }
363
- ],
364
- "variant_result": {
365
- "old_on_old": "pass",
366
- "old_on_new": "error",
367
- "new_on_old": "error",
368
- "new_on_new": "pass"
369
- }
370
- }
371
- ],
372
- "version": "v0.8.2.RELEASE",
373
- "java_version": 8
374
- },
375
- {
376
- "task_id": "mirromutth_r2dbc-mysql-v0.8.2.RELEASE__aca020b_a0dcea1__MySqlConnectionConfigurationTest_c28dc714",
377
- "project_name": "mirromutth_r2dbc-mysql-v0.8.2.RELEASE",
378
- "git_clone_url": "https://github.com/mirromutth/r2dbc-mysql.git",
379
- "rev1": "aca020b6432d974e3a2efb0ef7a61b78fa2842ad",
380
- "rev2": "a0dcea1ee828796bb0790b0a9ebde818cd1d14da",
381
- "rev1_date": "2020-06-27T16:15:37Z",
382
- "rev2_date": "2020-06-27T16:15:37Z",
383
- "git_diff_url": "https://github.com/mirromutth/r2dbc-mysql/compare/aca020b6432d974e3a2efb0ef7a61b78fa2842ad...a0dcea1ee828796bb0790b0a9ebde818cd1d14da",
384
- "test_file": "src/test/java/dev/miku/r2dbc/mysql/MySqlConnectionConfigurationTest.java",
385
- "test_changes": [
386
- {
387
- "change_id": "1_mirromutth_r2dbc-mysql-v0.8.2.RELEASE_aca020b_a0dcea1_MySqlConnectionConfigurationTest",
388
- "test_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfigurationTest.sslContextBuilderCustomizer:()V",
389
- "class": "MySqlConnectionConfigurationTest",
390
- "method": "sslContextBuilderCustomizer",
391
- "module": "",
392
- "junit_selector": "dev.miku.r2dbc.mysql.MySqlConnectionConfigurationTest#sslContextBuilderCustomizer",
393
- "old_test_code": "@Test\nvoid sslContextBuilderCustomizer() {\n String message = \"Worked!\";\n Function<SslContextBuilder, SslContextBuilder> customizer = ignored -> {\n throw new IllegalStateException(message);\n };\n MySqlConnectionConfiguration configuration = MySqlConnectionConfiguration.builder().host(HOST).username(USERNAME).sslMode(SslMode.REQUIRED).sslContextBuilderCustomizer(customizer).build();\n assertThatIllegalStateException().isThrownBy(() -> configuration.getSsl().customizeSslContext(SslContextBuilder.forClient())).withMessage(message);\n}",
394
- "new_test_code": "@Test\nvoid sslContextBuilderCustomizer() {\n String message = \"Worked!\";\n Function<SslContextBuilder, SslContextBuilder> customizer = ignored -> {\n throw new IllegalStateException(message);\n };\n MySqlConnectionConfiguration configuration = MySqlConnectionConfiguration.builder().host(HOST).user(USER).sslMode(SslMode.REQUIRED).sslContextBuilderCustomizer(customizer).build();\n assertThatIllegalStateException().isThrownBy(() -> configuration.getSsl().customizeSslContext(SslContextBuilder.forClient())).withMessage(message);\n}",
395
- "old_test_file_path": [
396
- "src/test/java/dev/miku/r2dbc/mysql/MySqlConnectionConfigurationTest.java"
397
- ],
398
- "old_test_lnum": [
399
- "122-138"
400
- ],
401
- "new_test_lnum": [
402
- "122-138"
403
- ],
404
- "old_production_code": "",
405
- "new_production_code": "public Builder user(String user) {\n this.user = requireNonNull(user, \"user must not be null\");\n return this;\n}",
406
- "focal_file_path": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
407
- "focal_method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.user:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
408
- "focal_all_deps_scored": [
409
- {
410
- "dep_id": 0,
411
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.user:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
412
- "file_path_old": null,
413
- "line_nums_old": null,
414
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
415
- "line_nums_new": "339-342",
416
- "dependency_updated": "inserted",
417
- "score": 0.4265,
418
- "signal_scores": {
419
- "nc": 0.0,
420
- "lcs_u": 1.0,
421
- "ed": 0.1481,
422
- "class": 1.0,
423
- "tfidf": 0.1591
424
- }
425
- },
426
- {
427
- "dep_id": 1,
428
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.build:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration",
429
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
430
- "line_nums_old": "239-252",
431
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
432
- "line_nums_new": "241-255",
433
- "dependency_updated": "updated",
434
- "score": 0.417,
435
- "signal_scores": {
436
- "nc": 0.0,
437
- "lcs_u": 1.0,
438
- "ed": 0.1852,
439
- "class": 1.0,
440
- "tfidf": 0.0927
441
- }
442
- },
443
- {
444
- "dep_id": 2,
445
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.username:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
446
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
447
- "line_nums_old": "288-291",
448
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
449
- "line_nums_new": "351-353",
450
- "dependency_updated": "updated",
451
- "score": 0.3814,
452
- "signal_scores": {
453
- "nc": 0.0,
454
- "lcs_u": 0.625,
455
- "ed": 0.1852,
456
- "class": 1.0,
457
- "tfidf": 0.2226
458
- }
459
- }
460
- ],
461
- "coverage_gold": 0.9,
462
- "branch_coverage_gold": 0.6259,
463
- "method_coverage_gold": 1.7521,
464
- "line_coverage_gold": 1.5628,
465
- "is_traceback": false,
466
- "commit_gap": {
467
- "count": 0,
468
- "skipped_commits": []
469
- },
470
- "test_is_refactoring_only": false,
471
- "has_test_dep_change": false,
472
- "all_deps_new": [
473
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.builder:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
474
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.sslMode:(Ldev/miku/r2dbc/mysql/constant/SslMode;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
475
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.host:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
476
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.build:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration",
477
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.user:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
478
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.sslContextBuilderCustomizer:(Ljava/util/function/Function;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder"
479
- ],
480
- "all_deps_old": [
481
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.builder:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
482
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.sslMode:(Ldev/miku/r2dbc/mysql/constant/SslMode;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
483
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.host:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
484
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.build:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration",
485
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.username:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
486
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.sslContextBuilderCustomizer:(Ljava/util/function/Function;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder"
487
- ],
488
- "deps_changes": [
489
- {
490
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.user:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
491
- "change_type": "ADD",
492
- "file_path_old": null,
493
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
494
- "source": "production",
495
- "is_test_dependency": false,
496
- "is_refactoring_only": false
497
- },
498
- {
499
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.build:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration",
500
- "change_type": "UPDATE",
501
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
502
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
503
- "source": "production",
504
- "is_test_dependency": false,
505
- "is_refactoring_only": false
506
- },
507
- {
508
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.username:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
509
- "change_type": "UPDATE",
510
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
511
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
512
- "source": "production",
513
- "is_test_dependency": false,
514
- "is_refactoring_only": true
515
- }
516
- ],
517
- "variant_result": {
518
- "old_on_old": "pass",
519
- "old_on_new": "error",
520
- "new_on_old": "error",
521
- "new_on_new": "pass"
522
- }
523
- },
524
- {
525
- "change_id": "2_mirromutth_r2dbc-mysql-v0.8.2.RELEASE_aca020b_a0dcea1_MySqlConnectionConfigurationTest",
526
- "test_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfigurationTest.autodetectExtensions:()V",
527
- "class": "MySqlConnectionConfigurationTest",
528
- "method": "autodetectExtensions",
529
- "module": "",
530
- "junit_selector": "dev.miku.r2dbc.mysql.MySqlConnectionConfigurationTest#autodetectExtensions",
531
- "old_test_code": "@Test\nvoid autodetectExtensions() {\n List<Extension> list = new ArrayList<>();\n MySqlConnectionConfiguration.builder().host(HOST).username(USERNAME).build().getExtensions().forEach(Extension.class, list::add);\n assertThat(list).isNotEmpty();\n}",
532
- "new_test_code": "@Test\nvoid autodetectExtensions() {\n List<Extension> list = new ArrayList<>();\n MySqlConnectionConfiguration.builder().host(HOST).user(USER).build().getExtensions().forEach(Extension.class, list::add);\n assertThat(list).isNotEmpty();\n}",
533
- "old_test_file_path": [
534
- "src/test/java/dev/miku/r2dbc/mysql/MySqlConnectionConfigurationTest.java"
535
- ],
536
- "old_test_lnum": [
537
- "148-158"
538
- ],
539
- "new_test_lnum": [
540
- "148-158"
541
- ],
542
- "old_production_code": "public Builder username(String username) {\n this.username = requireNonNull(username, \"username must not be null\");\n return this;\n}",
543
- "new_production_code": "public Builder username(String user) {\n return user(user);\n}",
544
- "focal_file_path": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
545
- "focal_method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.username:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
546
- "focal_all_deps_scored": [
547
- {
548
- "dep_id": 2,
549
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.username:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
550
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
551
- "line_nums_old": "288-291",
552
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
553
- "line_nums_new": "351-353",
554
- "dependency_updated": "updated",
555
- "score": 0.3428,
556
- "signal_scores": {
557
- "nc": 0.0,
558
- "lcs_u": 0.375,
559
- "ed": 0.15,
560
- "class": 1.0,
561
- "tfidf": 0.2707
562
- }
563
- },
564
- {
565
- "dep_id": 0,
566
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.user:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
567
- "file_path_old": null,
568
- "line_nums_old": null,
569
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
570
- "line_nums_new": "339-342",
571
- "dependency_updated": "inserted",
572
- "score": 0.3382,
573
- "signal_scores": {
574
- "nc": 0.0,
575
- "lcs_u": 0.5,
576
- "ed": 0.1,
577
- "class": 1.0,
578
- "tfidf": 0.1924
579
- }
580
- },
581
- {
582
- "dep_id": 1,
583
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.build:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration",
584
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
585
- "line_nums_old": "239-252",
586
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
587
- "line_nums_new": "241-255",
588
- "dependency_updated": "updated",
589
- "score": 0.2923,
590
- "signal_scores": {
591
- "nc": 0.0,
592
- "lcs_u": 0.4,
593
- "ed": 0.1,
594
- "class": 1.0,
595
- "tfidf": 0.0721
596
- }
597
- }
598
- ],
599
- "coverage_gold": 0.9,
600
- "branch_coverage_gold": 0.765,
601
- "method_coverage_gold": 1.6872,
602
- "line_coverage_gold": 1.5628,
603
- "is_traceback": false,
604
- "commit_gap": {
605
- "count": 0,
606
- "skipped_commits": []
607
- },
608
- "test_is_refactoring_only": false,
609
- "has_test_dep_change": false,
610
- "all_deps_new": [
611
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.getExtensions:()Ldev/miku/r2dbc/mysql/Extensions",
612
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.builder:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
613
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.host:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
614
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.build:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration",
615
- "dev/miku/r2dbc/mysql/Extensions.forEach:(Ljava/lang/Class;Ljava/util/function/Consumer;)V",
616
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.user:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder"
617
- ],
618
- "all_deps_old": [
619
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.getExtensions:()Ldev/miku/r2dbc/mysql/Extensions",
620
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.builder:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
621
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.host:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
622
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.build:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration",
623
- "dev/miku/r2dbc/mysql/Extensions.forEach:(Ljava/lang/Class;Ljava/util/function/Consumer;)V",
624
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.username:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder"
625
- ],
626
- "deps_changes": [
627
- {
628
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.user:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
629
- "change_type": "ADD",
630
- "file_path_old": null,
631
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
632
- "source": "production",
633
- "is_test_dependency": false,
634
- "is_refactoring_only": false
635
- },
636
- {
637
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.build:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration",
638
- "change_type": "UPDATE",
639
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
640
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
641
- "source": "production",
642
- "is_test_dependency": false,
643
- "is_refactoring_only": false
644
- },
645
- {
646
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.username:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
647
- "change_type": "UPDATE",
648
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
649
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
650
- "source": "production",
651
- "is_test_dependency": false,
652
- "is_refactoring_only": true
653
- }
654
- ],
655
- "variant_result": {
656
- "old_on_old": "pass",
657
- "old_on_new": "error",
658
- "new_on_old": "error",
659
- "new_on_new": "pass"
660
- }
661
- },
662
- {
663
- "change_id": "3_mirromutth_r2dbc-mysql-v0.8.2.RELEASE_aca020b_a0dcea1_MySqlConnectionConfigurationTest",
664
- "test_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfigurationTest.nonAutodetectExtensions:()V",
665
- "class": "MySqlConnectionConfigurationTest",
666
- "method": "nonAutodetectExtensions",
667
- "module": "",
668
- "junit_selector": "dev.miku.r2dbc.mysql.MySqlConnectionConfigurationTest#nonAutodetectExtensions",
669
- "old_test_code": "@Test\nvoid nonAutodetectExtensions() {\n List<Extension> list = new ArrayList<>();\n MySqlConnectionConfiguration.builder().host(HOST).username(USERNAME).autodetectExtensions(false).build().getExtensions().forEach(Extension.class, list::add);\n assertThat(list).isEmpty();\n}",
670
- "new_test_code": "@Test\nvoid nonAutodetectExtensions() {\n List<Extension> list = new ArrayList<>();\n MySqlConnectionConfiguration.builder().host(HOST).user(USER).autodetectExtensions(false).build().getExtensions().forEach(Extension.class, list::add);\n assertThat(list).isEmpty();\n}",
671
- "old_test_file_path": [
672
- "src/test/java/dev/miku/r2dbc/mysql/MySqlConnectionConfigurationTest.java"
673
- ],
674
- "old_test_lnum": [
675
- "160-171"
676
- ],
677
- "new_test_lnum": [
678
- "160-171"
679
- ],
680
- "old_production_code": "public Builder username(String username) {\n this.username = requireNonNull(username, \"username must not be null\");\n return this;\n}",
681
- "new_production_code": "public Builder username(String user) {\n return user(user);\n}",
682
- "focal_file_path": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
683
- "focal_method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.username:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
684
- "focal_all_deps_scored": [
685
- {
686
- "dep_id": 2,
687
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.username:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
688
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
689
- "line_nums_old": "288-291",
690
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
691
- "line_nums_new": "351-353",
692
- "dependency_updated": "updated",
693
- "score": 0.3372,
694
- "signal_scores": {
695
- "nc": 0.0,
696
- "lcs_u": 0.375,
697
- "ed": 0.1304,
698
- "class": 1.0,
699
- "tfidf": 0.2605
700
- }
701
- },
702
- {
703
- "dep_id": 0,
704
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.user:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
705
- "file_path_old": null,
706
- "line_nums_old": null,
707
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
708
- "line_nums_new": "339-342",
709
- "dependency_updated": "inserted",
710
- "score": 0.3344,
711
- "signal_scores": {
712
- "nc": 0.0,
713
- "lcs_u": 0.5,
714
- "ed": 0.087,
715
- "class": 1.0,
716
- "tfidf": 0.1854
717
- }
718
- },
719
- {
720
- "dep_id": 1,
721
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.build:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration",
722
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
723
- "line_nums_old": "239-252",
724
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
725
- "line_nums_new": "241-255",
726
- "dependency_updated": "updated",
727
- "score": 0.2985,
728
- "signal_scores": {
729
- "nc": 0.0,
730
- "lcs_u": 0.4,
731
- "ed": 0.087,
732
- "class": 1.0,
733
- "tfidf": 0.1077
734
- }
735
- }
736
- ],
737
- "coverage_gold": 0.8181818181818182,
738
- "branch_coverage_gold": 0.6259,
739
- "method_coverage_gold": 1.6223,
740
- "line_coverage_gold": 1.4312,
741
- "is_traceback": false,
742
- "commit_gap": {
743
- "count": 0,
744
- "skipped_commits": []
745
- },
746
- "test_is_refactoring_only": false,
747
- "has_test_dep_change": false,
748
- "all_deps_new": [
749
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.getExtensions:()Ldev/miku/r2dbc/mysql/Extensions",
750
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.builder:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
751
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.host:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
752
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.build:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration",
753
- "dev/miku/r2dbc/mysql/Extensions.forEach:(Ljava/lang/Class;Ljava/util/function/Consumer;)V",
754
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.autodetectExtensions:(Z)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
755
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.user:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder"
756
- ],
757
- "all_deps_old": [
758
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.getExtensions:()Ldev/miku/r2dbc/mysql/Extensions",
759
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.builder:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
760
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.host:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
761
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.build:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration",
762
- "dev/miku/r2dbc/mysql/Extensions.forEach:(Ljava/lang/Class;Ljava/util/function/Consumer;)V",
763
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.autodetectExtensions:(Z)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
764
- "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.username:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder"
765
- ],
766
- "deps_changes": [
767
- {
768
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.user:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
769
- "change_type": "ADD",
770
- "file_path_old": null,
771
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
772
- "source": "production",
773
- "is_test_dependency": false,
774
- "is_refactoring_only": false
775
- },
776
- {
777
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.build:()Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration",
778
- "change_type": "UPDATE",
779
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
780
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
781
- "source": "production",
782
- "is_test_dependency": false,
783
- "is_refactoring_only": false
784
- },
785
- {
786
- "method_sign": "dev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder.username:(Ljava/lang/String;)Ldev/miku/r2dbc/mysql/MySqlConnectionConfiguration$Builder",
787
- "change_type": "UPDATE",
788
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
789
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/MySqlConnectionConfiguration.java",
790
- "source": "production",
791
- "is_test_dependency": false,
792
- "is_refactoring_only": true
793
- }
794
- ],
795
- "variant_result": {
796
- "old_on_old": "pass",
797
- "old_on_new": "error",
798
- "new_on_old": "error",
799
- "new_on_new": "pass"
800
- }
801
- }
802
- ],
803
- "version": "v0.8.2.RELEASE",
804
- "java_version": 8
805
- },
806
- {
807
- "task_id": "mirromutth_r2dbc-mysql-v0.8.2.RELEASE__b49b850_0b41c1c__RequestQueueTest_d626d871",
808
- "project_name": "mirromutth_r2dbc-mysql-v0.8.2.RELEASE",
809
- "git_clone_url": "https://github.com/mirromutth/r2dbc-mysql.git",
810
- "rev1": "b49b850b649e75fee289ba4476adcd267e2cfb5f",
811
- "rev2": "0b41c1c224e1667ca62e921dd87b82145f3db4ca",
812
- "rev1_date": "2019-11-08T06:09:50Z",
813
- "rev2_date": "2019-11-08T06:09:50Z",
814
- "git_diff_url": "https://github.com/mirromutth/r2dbc-mysql/compare/b49b850b649e75fee289ba4476adcd267e2cfb5f...0b41c1c224e1667ca62e921dd87b82145f3db4ca",
815
- "test_file": "src/test/java/dev/miku/r2dbc/mysql/client/RequestQueueTest.java",
816
- "test_changes": [
817
- {
818
- "change_id": "36_mirromutth_r2dbc-mysql-v0.8.2.RELEASE_b49b850_0b41c1c_RequestQueueTest",
819
- "test_sign": "dev/miku/r2dbc/mysql/client/RequestQueueTest.dispose:()V",
820
- "class": "RequestQueueTest",
821
- "method": "dispose",
822
- "module": "",
823
- "junit_selector": "dev.miku.r2dbc.mysql.client.RequestQueueTest#dispose",
824
- "old_test_code": "@Test\nvoid dispose() {\n RequestQueue queue = new RequestQueue();\n List<Integer> arr = new AddEventList(queue);\n queue.submit(() -> arr.add(1));\n queue.submit(() -> arr.add(2));\n queue.dispose();\n assertThrows(IllegalStateException.class, () -> queue.submit(() -> arr.add(3)));\n assertThrows(IllegalStateException.class, () -> queue.submit(() -> arr.add(4)));\n assertEquals(arr, Arrays.asList(1, 2));\n}",
825
- "new_test_code": "@Test\nvoid dispose() {\n RequestQueue queue = new RequestQueue();\n List<Integer> arr = new AddEventList(queue);\n Mono.create(sink -> queue.submit(RequestTask.wrap(sink, () -> arr.add(5)))).as(StepVerifier::create).expectNext(true).verifyComplete();\n Mono.create(sink -> queue.submit(RequestTask.wrap(sink, () -> arr.add(4)))).as(StepVerifier::create).expectNext(true).verifyComplete();\n queue.dispose();\n Mono.create(sink -> queue.submit(RequestTask.wrap(sink, () -> arr.add(3)))).as(StepVerifier::create).verifyError(IllegalStateException.class);\n Mono.create(sink -> queue.submit(RequestTask.wrap(sink, () -> arr.add(2)))).as(StepVerifier::create).verifyError(IllegalStateException.class);\n assertEquals(arr, Arrays.asList(5, 4));\n}",
826
- "old_test_file_path": [
827
- "src/test/java/dev/miku/r2dbc/mysql/client/RequestQueueTest.java"
828
- ],
829
- "old_test_lnum": [
830
- "45-57"
831
- ],
832
- "new_test_lnum": [
833
- "62-84"
834
- ],
835
- "old_production_code": "void dispose() {\n STATUS_UPDATER.set(this, DISPOSE);\n freeAll();\n}",
836
- "new_production_code": "void dispose() {\n STATUS_UPDATER.set(this, DISPOSE);\n cancelAll(requireDisposed());\n}",
837
- "focal_file_path": "src/main/java/dev/miku/r2dbc/mysql/client/RequestQueue.java",
838
- "focal_method_sign": "dev/miku/r2dbc/mysql/client/RequestQueue.dispose:()V",
839
- "focal_all_deps_scored": [
840
- {
841
- "dep_id": 1,
842
- "method_sign": "dev/miku/r2dbc/mysql/client/RequestQueue.dispose:()V",
843
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/client/RequestQueue.java",
844
- "line_nums_old": "141-144",
845
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/client/RequestQueue.java",
846
- "line_nums_new": "137-140",
847
- "dependency_updated": "updated",
848
- "score": 0.7647,
849
- "signal_scores": {
850
- "nc": 1.0,
851
- "lcs_u": 1.0,
852
- "ed": 1.0,
853
- "class": 1.0,
854
- "tfidf": 0.0
855
- }
856
- },
857
- {
858
- "dep_id": 0,
859
- "method_sign": "dev/miku/r2dbc/mysql/client/RequestQueue.submit:(Ljava/lang/Runnable;)V",
860
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/client/RequestQueue.java",
861
- "line_nums_old": "88-128",
862
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/client/RequestQueue.java",
863
- "line_nums_new": "90-124",
864
- "dependency_updated": "updated",
865
- "score": 0.2576,
866
- "signal_scores": {
867
- "nc": 0.0,
868
- "lcs_u": 0.1667,
869
- "ed": 0.0,
870
- "class": 1.0,
871
- "tfidf": 0.1698
872
- }
873
- }
874
- ],
875
- "coverage_gold": 1.0,
876
- "branch_coverage_gold": 0.3518,
877
- "method_coverage_gold": 0.9804,
878
- "line_coverage_gold": 0.7522,
879
- "is_traceback": false,
880
- "commit_gap": {
881
- "count": 0,
882
- "skipped_commits": []
883
- },
884
- "test_is_refactoring_only": false,
885
- "has_test_dep_change": false,
886
- "all_deps_new": [
887
- "dev/miku/r2dbc/mysql/client/RequestQueue.dispose:()V"
888
- ],
889
- "all_deps_old": [
890
- "dev/miku/r2dbc/mysql/client/RequestQueue.submit:(Ljava/lang/Runnable;)V",
891
- "dev/miku/r2dbc/mysql/client/RequestQueue.dispose:()V"
892
- ],
893
- "deps_changes": [
894
- {
895
- "method_sign": "dev/miku/r2dbc/mysql/client/RequestQueue.submit:(Ljava/lang/Runnable;)V",
896
- "change_type": "UPDATE",
897
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/client/RequestQueue.java",
898
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/client/RequestQueue.java",
899
- "source": "production",
900
- "is_test_dependency": false,
901
- "is_refactoring_only": false
902
- },
903
- {
904
- "method_sign": "dev/miku/r2dbc/mysql/client/RequestQueue.dispose:()V",
905
- "change_type": "UPDATE",
906
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/client/RequestQueue.java",
907
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/client/RequestQueue.java",
908
- "source": "production",
909
- "is_test_dependency": false,
910
- "is_refactoring_only": false
911
- }
912
- ],
913
- "variant_result": {
914
- "old_on_old": "pass",
915
- "old_on_new": "error",
916
- "new_on_old": "error",
917
- "new_on_new": "pass"
918
- }
919
- }
920
- ],
921
- "version": "v0.8.2.RELEASE",
922
- "java_version": 8
923
- },
924
- {
925
- "task_id": "mirromutth_r2dbc-mysql-v0.8.2.RELEASE__b5166ea_d29398e__InternalArraysTest_c32529d4",
926
- "project_name": "mirromutth_r2dbc-mysql-v0.8.2.RELEASE",
927
- "git_clone_url": "https://github.com/mirromutth/r2dbc-mysql.git",
928
- "rev1": "b5166ea9f8c16a42ce40b966f7b625b5a77729a3",
929
- "rev2": "d29398eb8fb43e63149b971620182cad81bdfaf8",
930
- "rev1_date": "2020-06-11T14:23:02Z",
931
- "rev2_date": "2020-06-11T14:23:02Z",
932
- "git_diff_url": "https://github.com/mirromutth/r2dbc-mysql/compare/b5166ea9f8c16a42ce40b966f7b625b5a77729a3...d29398eb8fb43e63149b971620182cad81bdfaf8",
933
- "test_file": "src/test/java/dev/miku/r2dbc/mysql/util/InternalArraysTest.java",
934
- "test_changes": [
935
- {
936
- "change_id": "23_mirromutth_r2dbc-mysql-v0.8.2.RELEASE_b5166ea_d29398e_InternalArraysTest",
937
- "test_sign": "dev/miku/r2dbc/mysql/util/InternalArraysTest.toReadOnlyList:()V",
938
- "class": "InternalArraysTest",
939
- "method": "toReadOnlyList",
940
- "module": "",
941
- "junit_selector": "dev.miku.r2dbc.mysql.util.InternalArraysTest#toReadOnlyList",
942
- "old_test_code": "@Test\nvoid toReadOnlyList() {\n Integer[] arr = new Integer[] { 1, 2, 3, 4 };\n ListAssert<Integer> listAssert = assertThat(InternalArrays.toReadOnlyList(arr)).isEqualTo(Arrays.asList(1, 2, 3, 4)).isNotInstanceOf(Arrays.asList(1, 2, 3, 4).getClass());\n Arrays.fill(arr, 6);\n listAssert.isEqualTo(Arrays.asList(1, 2, 3, 4));\n assertThat(InternalArrays.toReadOnlyList(1)).isEqualTo(Collections.singletonList(1)).isExactlyInstanceOf(Collections.singletonList(1).getClass());\n assertThat(InternalArrays.toReadOnlyList()).isEqualTo(Collections.emptyList()).isExactlyInstanceOf(Collections.emptyList().getClass());\n}",
943
- "new_test_code": "@Test\nvoid toReadOnlyList() {\n Integer[] arr = new Integer[] { 1, 2, 3, 4 };\n ListAssert<Integer> listAssert = assertThat(InternalArrays.toImmutableList(arr)).isEqualTo(Arrays.asList(1, 2, 3, 4)).isNotInstanceOf(Arrays.asList(1, 2, 3, 4).getClass());\n Arrays.fill(arr, 6);\n listAssert.isEqualTo(Arrays.asList(1, 2, 3, 4));\n assertThat(InternalArrays.toImmutableList(1)).isEqualTo(Collections.singletonList(1)).isExactlyInstanceOf(Collections.singletonList(1).getClass());\n assertThat(InternalArrays.toImmutableList()).isEqualTo(Collections.emptyList()).isExactlyInstanceOf(Collections.emptyList().getClass());\n}",
944
- "old_test_file_path": [
945
- "src/test/java/dev/miku/r2dbc/mysql/util/InternalArraysTest.java"
946
- ],
947
- "old_test_lnum": [
948
- "47-65"
949
- ],
950
- "new_test_lnum": [
951
- "46-64"
952
- ],
953
- "old_production_code": "@SuppressWarnings(\"varargs\")\n@SafeVarargs\npublic static <E> List<E> toReadOnlyList(E... a) {\n requireNonNull(a, \"array must not be null\");\n switch(a.length) {\n case 0:\n return Collections.emptyList();\n case 1:\n return Collections.singletonList(a[0]);\n default:\n return new ArrList<>(Arrays.copyOf(a, a.length));\n }\n}",
954
- "new_production_code": "",
955
- "focal_file_path": "src/main/java/dev/miku/r2dbc/mysql/util/InternalArrays.java",
956
- "focal_method_sign": "dev/miku/r2dbc/mysql/util/InternalArrays.toReadOnlyList:([Ljava/lang/Object;)Ljava/util/List",
957
- "focal_all_deps_scored": [
958
- {
959
- "dep_id": 1,
960
- "method_sign": "dev/miku/r2dbc/mysql/util/InternalArrays.toReadOnlyList:([Ljava/lang/Object;)Ljava/util/List",
961
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/util/InternalArrays.java",
962
- "line_nums_old": "79-92",
963
- "file_path_new": null,
964
- "line_nums_new": null,
965
- "dependency_updated": "deleted",
966
- "score": 0.8145,
967
- "signal_scores": {
968
- "nc": 1.0,
969
- "lcs_u": 1.0,
970
- "ed": 1.0,
971
- "class": 1.0,
972
- "tfidf": 0.2116
973
- }
974
- },
975
- {
976
- "dep_id": 0,
977
- "method_sign": "dev/miku/r2dbc/mysql/util/InternalArrays.toImmutableList:([Ljava/lang/Object;)Ljava/util/List",
978
- "file_path_old": null,
979
- "line_nums_old": null,
980
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/util/InternalArrays.java",
981
- "line_nums_new": "79-92",
982
- "dependency_updated": "inserted",
983
- "score": 0.409,
984
- "signal_scores": {
985
- "nc": 0.0,
986
- "lcs_u": 0.5333,
987
- "ed": 0.4667,
988
- "class": 1.0,
989
- "tfidf": 0.2116
990
- }
991
- }
992
- ],
993
- "coverage_gold": 0.875,
994
- "branch_coverage_gold": 0.3096,
995
- "method_coverage_gold": 0.5054,
996
- "line_coverage_gold": 0.3394,
997
- "is_traceback": false,
998
- "commit_gap": {
999
- "count": 0,
1000
- "skipped_commits": []
1001
- },
1002
- "test_is_refactoring_only": false,
1003
- "has_test_dep_change": false,
1004
- "all_deps_new": [
1005
- "dev/miku/r2dbc/mysql/util/InternalArrays.toImmutableList:([Ljava/lang/Object;)Ljava/util/List",
1006
- "dev/miku/r2dbc/mysql/util/ArrList.listIterator:(I)Ljava/util/ListIterator"
1007
- ],
1008
- "all_deps_old": [
1009
- "dev/miku/r2dbc/mysql/util/InternalArrays.toReadOnlyList:([Ljava/lang/Object;)Ljava/util/List",
1010
- "dev/miku/r2dbc/mysql/util/ArrList.listIterator:(I)Ljava/util/ListIterator"
1011
- ],
1012
- "deps_changes": [
1013
- {
1014
- "method_sign": "dev/miku/r2dbc/mysql/util/InternalArrays.toImmutableList:([Ljava/lang/Object;)Ljava/util/List",
1015
- "change_type": "ADD",
1016
- "file_path_old": null,
1017
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/util/InternalArrays.java",
1018
- "source": "production",
1019
- "is_test_dependency": false,
1020
- "is_refactoring_only": false
1021
- },
1022
- {
1023
- "method_sign": "dev/miku/r2dbc/mysql/util/InternalArrays.toReadOnlyList:([Ljava/lang/Object;)Ljava/util/List",
1024
- "change_type": "DELETE",
1025
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/util/InternalArrays.java",
1026
- "file_path_new": null,
1027
- "source": "production",
1028
- "is_test_dependency": false,
1029
- "is_refactoring_only": false
1030
- }
1031
- ],
1032
- "variant_result": {
1033
- "old_on_old": "pass",
1034
- "old_on_new": "error",
1035
- "new_on_old": "error",
1036
- "new_on_new": "pass"
1037
- }
1038
- },
1039
- {
1040
- "change_id": "24_mirromutth_r2dbc-mysql-v0.8.2.RELEASE_b5166ea_d29398e_InternalArraysTest",
1041
- "test_sign": "dev/miku/r2dbc/mysql/util/InternalArraysTest.asReadOnlyList:()V",
1042
- "class": "InternalArraysTest",
1043
- "method": "asReadOnlyList",
1044
- "module": "",
1045
- "junit_selector": "dev.miku.r2dbc.mysql.util.InternalArraysTest#asReadOnlyList",
1046
- "old_test_code": "@Test\nvoid asReadOnlyList() {\n assertThat(InternalArrays.asReadOnlyList(1, 2, 3, 4)).isEqualTo(Arrays.asList(1, 2, 3, 4)).isNotInstanceOf(Arrays.asList(1, 2, 3, 4).getClass());\n assertThat(InternalArrays.asReadOnlyList(1)).isEqualTo(Collections.singletonList(1)).isExactlyInstanceOf(Collections.singletonList(1).getClass());\n assertThat(InternalArrays.asReadOnlyList()).isEqualTo(Collections.emptyList()).isExactlyInstanceOf(Collections.emptyList().getClass());\n}",
1047
- "new_test_code": "@Test\nvoid asReadOnlyList() {\n assertThat(InternalArrays.asImmutableList(1, 2, 3, 4)).isEqualTo(Arrays.asList(1, 2, 3, 4)).isNotInstanceOf(Arrays.asList(1, 2, 3, 4).getClass());\n assertThat(InternalArrays.asImmutableList(1)).isEqualTo(Collections.singletonList(1)).isExactlyInstanceOf(Collections.singletonList(1).getClass());\n assertThat(InternalArrays.asImmutableList()).isEqualTo(Collections.emptyList()).isExactlyInstanceOf(Collections.emptyList().getClass());\n}",
1048
- "old_test_file_path": [
1049
- "src/test/java/dev/miku/r2dbc/mysql/util/InternalArraysTest.java"
1050
- ],
1051
- "old_test_lnum": [
1052
- "34-45"
1053
- ],
1054
- "new_test_lnum": [
1055
- "33-44"
1056
- ],
1057
- "old_production_code": "@SuppressWarnings(\"varargs\")\n@SafeVarargs\npublic static <E> List<E> asReadOnlyList(E... a) {\n requireNonNull(a, \"array must not be null\");\n switch(a.length) {\n case 0:\n return Collections.emptyList();\n case 1:\n return Collections.singletonList(a[0]);\n default:\n return new ArrList<>(a);\n }\n}",
1058
- "new_production_code": "",
1059
- "focal_file_path": "src/main/java/dev/miku/r2dbc/mysql/util/InternalArrays.java",
1060
- "focal_method_sign": "dev/miku/r2dbc/mysql/util/InternalArrays.asReadOnlyList:([Ljava/lang/Object;)Ljava/util/List",
1061
- "focal_all_deps_scored": [
1062
- {
1063
- "dep_id": 0,
1064
- "method_sign": "dev/miku/r2dbc/mysql/util/InternalArrays.asReadOnlyList:([Ljava/lang/Object;)Ljava/util/List",
1065
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/util/InternalArrays.java",
1066
- "line_nums_old": "56-69",
1067
- "file_path_new": null,
1068
- "line_nums_new": null,
1069
- "dependency_updated": "deleted",
1070
- "score": 0.8155,
1071
- "signal_scores": {
1072
- "nc": 1.0,
1073
- "lcs_u": 1.0,
1074
- "ed": 1.0,
1075
- "class": 1.0,
1076
- "tfidf": 0.2158
1077
- }
1078
- },
1079
- {
1080
- "dep_id": 1,
1081
- "method_sign": "dev/miku/r2dbc/mysql/util/InternalArrays.asImmutableList:([Ljava/lang/Object;)Ljava/util/List",
1082
- "file_path_old": null,
1083
- "line_nums_old": null,
1084
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/util/InternalArrays.java",
1085
- "line_nums_new": "56-69",
1086
- "dependency_updated": "inserted",
1087
- "score": 0.41,
1088
- "signal_scores": {
1089
- "nc": 0.0,
1090
- "lcs_u": 0.5333,
1091
- "ed": 0.4667,
1092
- "class": 1.0,
1093
- "tfidf": 0.2158
1094
- }
1095
- }
1096
- ],
1097
- "coverage_gold": 0.875,
1098
- "branch_coverage_gold": 0.3096,
1099
- "method_coverage_gold": 0.5054,
1100
- "line_coverage_gold": 0.3394,
1101
- "is_traceback": false,
1102
- "commit_gap": {
1103
- "count": 0,
1104
- "skipped_commits": []
1105
- },
1106
- "test_is_refactoring_only": false,
1107
- "has_test_dep_change": false,
1108
- "all_deps_new": [
1109
- "dev/miku/r2dbc/mysql/util/InternalArrays.asImmutableList:([Ljava/lang/Object;)Ljava/util/List",
1110
- "dev/miku/r2dbc/mysql/util/ArrList.listIterator:(I)Ljava/util/ListIterator"
1111
- ],
1112
- "all_deps_old": [
1113
- "dev/miku/r2dbc/mysql/util/InternalArrays.asReadOnlyList:([Ljava/lang/Object;)Ljava/util/List",
1114
- "dev/miku/r2dbc/mysql/util/ArrList.listIterator:(I)Ljava/util/ListIterator"
1115
- ],
1116
- "deps_changes": [
1117
- {
1118
- "method_sign": "dev/miku/r2dbc/mysql/util/InternalArrays.asReadOnlyList:([Ljava/lang/Object;)Ljava/util/List",
1119
- "change_type": "DELETE",
1120
- "file_path_old": "src/main/java/dev/miku/r2dbc/mysql/util/InternalArrays.java",
1121
- "file_path_new": null,
1122
- "source": "production",
1123
- "is_test_dependency": false,
1124
- "is_refactoring_only": false
1125
- },
1126
- {
1127
- "method_sign": "dev/miku/r2dbc/mysql/util/InternalArrays.asImmutableList:([Ljava/lang/Object;)Ljava/util/List",
1128
- "change_type": "ADD",
1129
- "file_path_old": null,
1130
- "file_path_new": "src/main/java/dev/miku/r2dbc/mysql/util/InternalArrays.java",
1131
- "source": "production",
1132
- "is_test_dependency": false,
1133
- "is_refactoring_only": false
1134
- }
1135
- ],
1136
- "variant_result": {
1137
- "old_on_old": "pass",
1138
- "old_on_new": "error",
1139
- "new_on_old": "error",
1140
- "new_on_new": "pass"
1141
- }
1142
- }
1143
- ],
1144
- "version": "v0.8.2.RELEASE",
1145
- "java_version": 8
1146
- }
1147
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
moditect_moditect-1.3.0.Final.json DELETED
@@ -1,161 +0,0 @@
1
- [
2
- {
3
- "task_id": "moditect_moditect-1.3.0.Final__a1bd562_3e2b18e__AddModuleInfoTest_8a3d7d3d",
4
- "project_name": "moditect_moditect-1.3.0.Final",
5
- "git_clone_url": "https://github.com/moditect/moditect.git",
6
- "rev1": "a1bd562c8c79c1fc7fc5c123f6af1ea4df00bfa5",
7
- "rev2": "3e2b18e3f38d37c029b7fdda3e693566b8782f7a",
8
- "rev1_date": "2023-03-20T14:34:37Z",
9
- "rev2_date": "2023-03-20T16:51:28Z",
10
- "git_diff_url": "https://github.com/moditect/moditect/compare/a1bd562c8c79c1fc7fc5c123f6af1ea4df00bfa5...3e2b18e3f38d37c029b7fdda3e693566b8782f7a",
11
- "test_file": "core/src/test/java/org/moditect/test/AddModuleInfoTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "11_moditect_moditect-1.3.0.Final_a1bd562_3e2b18e_AddModuleInfoTest",
15
- "test_sign": "org/moditect/test/AddModuleInfoTest.addModuleInfoAndRunModular:()V",
16
- "class": "AddModuleInfoTest",
17
- "method": "addModuleInfoAndRunModular",
18
- "module": "core",
19
- "junit_selector": "org.moditect.test.AddModuleInfoTest#addModuleInfoAndRunModular",
20
- "old_test_code": "@Test\npublic void addModuleInfoAndRunModular() throws Exception {\n prepareTestJar();\n String javaHome = System.getProperty(\"java.home\");\n String javaBin = javaHome + File.separator + \"bin\" + File.separator + \"java\";\n ProcessBuilder builder = new ProcessBuilder(javaBin, \"--module-path\", GENERATED_TEST_RESOURCES + File.separator + \"example.jar\", \"--module\", \"com.example\").redirectOutput(Redirect.INHERIT);\n Process process = builder.start();\n process.waitFor();\n if (process.exitValue() == 0) {\n throw new AssertionError();\n }\n new AddModuleInfo(\"module com.example {}\", \"com.example.HelloWorld\", \"1.42.3\", Paths.get(\"target\", \"generated-test-resources\", \"example.jar\"), Paths.get(\"target\", \"generated-test-modules\"), null, false).run();\n builder = new ProcessBuilder(javaBin, \"--module-path\", GENERATED_TEST_MODULES + File.separator + \"example.jar\", \"--module\", \"com.example\");\n process = builder.start();\n process.waitFor();\n if (process.exitValue() != 0) {\n throw new AssertionError();\n }\n}",
21
- "new_test_code": "@Test\npublic void addModuleInfoAndRunModular() throws Exception {\n prepareTestJar();\n String javaHome = System.getProperty(\"java.home\");\n String javaBin = javaHome + File.separator + \"bin\" + File.separator + \"java\";\n ProcessBuilder builder = new ProcessBuilder(javaBin, \"--module-path\", GENERATED_TEST_RESOURCES + File.separator + \"example.jar\", \"--module\", \"com.example\").redirectOutput(Redirect.INHERIT);\n Process process = builder.start();\n process.waitFor();\n if (process.exitValue() == 0) {\n throw new AssertionError();\n }\n new AddModuleInfo(\"module com.example {}\", \"com.example.HelloWorld\", \"1.42.3\", Paths.get(\"target\", \"generated-test-resources\", \"example.jar\"), Paths.get(\"target\", \"generated-test-modules\"), null, false, null).run();\n builder = new ProcessBuilder(javaBin, \"--module-path\", GENERATED_TEST_MODULES + File.separator + \"example.jar\", \"--module\", \"com.example\");\n process = builder.start();\n process.waitFor();\n if (process.exitValue() != 0) {\n throw new AssertionError();\n }\n}",
22
- "old_test_file_path": [
23
- "core/src/test/java/org/moditect/test/AddModuleInfoTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "120-160"
27
- ],
28
- "new_test_lnum": [
29
- "121-162"
30
- ],
31
- "old_production_code": "public void run() {\n if (Files.isDirectory(inputJar)) {\n throw new IllegalArgumentException(\"Input JAR must not be a directory\");\n }\n if (!Files.exists(outputDirectory)) {\n throw new IllegalArgumentException(\"Output directory doesn't exist: \" + outputDirectory);\n }\n Path outputJar = outputDirectory.resolve(inputJar.getFileName());\n if (Files.exists(outputJar) && !overwriteExistingFiles) {\n throw new RuntimeException(\"File \" + outputJar + \" already exists; either set 'overwriteExistingFiles' to true or specify another output directory\");\n }\n try {\n Files.copy(inputJar, outputJar, StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n throw new RuntimeException(\"Couldn't copy JAR file\", e);\n }\n ModuleDeclaration module = ModuleInfoCompiler.parseModuleInfo(moduleInfoSource);\n byte[] clazz = ModuleInfoCompiler.compileModuleInfo(module, mainClass, version);\n Map<String, String> env = new HashMap<>();\n env.put(\"create\", \"true\");\n URI uri = URI.create(\"jar:\" + outputJar.toUri().toString());\n try (FileSystem zipfs = FileSystems.newFileSystem(uri, env)) {\n if (jvmVersion == null) {\n Files.write(zipfs.getPath(\"module-info.class\"), clazz, StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);\n } else {\n Path path = zipfs.getPath(\"META-INF/versions\", jvmVersion.toString(), \"module-info.class\");\n Files.createDirectories(path.getParent());\n Files.write(path, clazz, StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);\n Path manifestPath = zipfs.getPath(\"META-INF/MANIFEST.MF\");\n Manifest manifest;\n if (Files.exists(manifestPath)) {\n manifest = new Manifest(Files.newInputStream(manifestPath));\n } else {\n manifest = new Manifest();\n manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, \"1.0\");\n }\n manifest.getMainAttributes().put(new Attributes.Name(\"Multi-Release\"), \"true\");\n try (OutputStream manifestOs = Files.newOutputStream(manifestPath, StandardOpenOption.TRUNCATE_EXISTING)) {\n manifest.write(manifestOs);\n }\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Couldn't add module-info.class to JAR\", e);\n }\n}",
32
- "new_production_code": "public void run() {\n if (Files.isDirectory(inputJar)) {\n throw new IllegalArgumentException(\"Input JAR must not be a directory\");\n }\n if (!Files.exists(outputDirectory)) {\n throw new IllegalArgumentException(\"Output directory doesn't exist: \" + outputDirectory);\n }\n Path outputJar = outputDirectory.resolve(inputJar.getFileName());\n if (Files.exists(outputJar) && !overwriteExistingFiles) {\n throw new RuntimeException(\"File \" + outputJar + \" already exists; either set 'overwriteExistingFiles' to true or specify another output directory\");\n }\n try {\n Files.copy(inputJar, outputJar, StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n throw new RuntimeException(\"Couldn't copy JAR file\", e);\n }\n ModuleDeclaration module = ModuleInfoCompiler.parseModuleInfo(moduleInfoSource);\n byte[] clazz = ModuleInfoCompiler.compileModuleInfo(module, mainClass, version);\n Map<String, String> env = new HashMap<>();\n env.put(\"create\", \"true\");\n URI uri = URI.create(\"jar:\" + outputJar.toUri());\n try (FileSystem zipfs = FileSystems.newFileSystem(uri, env)) {\n if (jvmVersion == null) {\n Path path = zipfs.getPath(\"module-info.class\");\n Files.write(path, clazz, StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);\n Files.setLastModifiedTime(path, toFileTime(timestamp));\n } else {\n Path path = zipfs.getPath(\"META-INF/versions\", jvmVersion.toString(), \"module-info.class\");\n Files.createDirectories(path.getParent());\n Files.write(path, clazz, StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);\n FileTime lastModifiedTime = toFileTime(timestamp);\n Files.setLastModifiedTime(path, lastModifiedTime);\n Files.setLastModifiedTime(path.getParent(), lastModifiedTime);\n Files.setLastModifiedTime(path.getParent().getParent(), lastModifiedTime);\n Path manifestPath = zipfs.getPath(\"META-INF/MANIFEST.MF\");\n Manifest manifest;\n if (Files.exists(manifestPath)) {\n manifest = new Manifest(Files.newInputStream(manifestPath));\n } else {\n manifest = new Manifest();\n manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, \"1.0\");\n }\n manifest.getMainAttributes().put(new Attributes.Name(\"Multi-Release\"), \"true\");\n try (OutputStream manifestOs = Files.newOutputStream(manifestPath, StandardOpenOption.TRUNCATE_EXISTING)) {\n manifest.write(manifestOs);\n }\n Files.setLastModifiedTime(manifestPath, lastModifiedTime);\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Couldn't add module-info.class to JAR\", e);\n }\n}",
33
- "focal_file_path": "core/src/main/java/org/moditect/commands/AddModuleInfo.java",
34
- "focal_method_sign": "org/moditect/commands/AddModuleInfo.run:()V",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "org/moditect/commands/AddModuleInfo.run:()V",
39
- "file_path_old": "core/src/main/java/org/moditect/commands/AddModuleInfo.java",
40
- "line_nums_old": "80-144",
41
- "file_path_new": "core/src/main/java/org/moditect/commands/AddModuleInfo.java",
42
- "line_nums_new": "84-158",
43
- "dependency_updated": "updated",
44
- "score": null,
45
- "signal_scores": {}
46
- }
47
- ],
48
- "coverage_gold": 0.4523809523809524,
49
- "branch_coverage_gold": 6.383,
50
- "method_coverage_gold": 5.0725,
51
- "line_coverage_gold": 8.0902,
52
- "is_traceback": false,
53
- "commit_gap": {
54
- "count": 0,
55
- "skipped_commits": []
56
- },
57
- "test_is_refactoring_only": false,
58
- "has_test_dep_change": false,
59
- "all_deps_new": [
60
- "org/moditect/test/AddModuleInfoTest.prepareTestJar:()V",
61
- "org/moditect/commands/AddModuleInfo.run:()V"
62
- ],
63
- "all_deps_old": [
64
- "org/moditect/test/AddModuleInfoTest.prepareTestJar:()V",
65
- "org/moditect/commands/AddModuleInfo.run:()V"
66
- ],
67
- "deps_changes": [
68
- {
69
- "method_sign": "org/moditect/commands/AddModuleInfo.run:()V",
70
- "change_type": "UPDATE",
71
- "file_path_old": "core/src/main/java/org/moditect/commands/AddModuleInfo.java",
72
- "file_path_new": "core/src/main/java/org/moditect/commands/AddModuleInfo.java",
73
- "source": "production",
74
- "is_test_dependency": false,
75
- "is_refactoring_only": false
76
- }
77
- ],
78
- "variant_result": {
79
- "old_on_old": "pass",
80
- "old_on_new": "error",
81
- "new_on_old": "error",
82
- "new_on_new": "pass"
83
- }
84
- },
85
- {
86
- "change_id": "12_moditect_moditect-1.3.0.Final_a1bd562_3e2b18e_AddModuleInfoTest",
87
- "test_sign": "org/moditect/test/AddModuleInfoTest.addJvmVersionModuleInfoAndRunModular:()V",
88
- "class": "AddModuleInfoTest",
89
- "method": "addJvmVersionModuleInfoAndRunModular",
90
- "module": "core",
91
- "junit_selector": "org.moditect.test.AddModuleInfoTest#addJvmVersionModuleInfoAndRunModular",
92
- "old_test_code": "@Test\npublic void addJvmVersionModuleInfoAndRunModular() throws Exception {\n prepareTestJar();\n String javaHome = System.getProperty(\"java.home\");\n String javaBin = javaHome + File.separator + \"bin\" + File.separator + \"java\";\n ProcessBuilder builder = new ProcessBuilder(javaBin, \"--module-path\", GENERATED_TEST_RESOURCES + File.separator + \"example.jar\", \"--module\", \"com.example\").redirectOutput(Redirect.INHERIT);\n Process process = builder.start();\n process.waitFor();\n if (process.exitValue() == 0) {\n throw new AssertionError();\n }\n new AddModuleInfo(\"module com.example {}\", \"com.example.HelloWorld\", \"1.42.3\", Paths.get(\"target\", \"generated-test-resources\", \"example.jar\"), Paths.get(\"target\", \"generated-test-modules\"), \"9\", false).run();\n builder = new ProcessBuilder(javaBin, \"--module-path\", GENERATED_TEST_MODULES + File.separator + \"example.jar\", \"--module\", \"com.example\");\n process = builder.start();\n process.waitFor();\n if (process.exitValue() != 0) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n process.getInputStream().transferTo(baos);\n process.getErrorStream().transferTo(baos);\n throw new AssertionError(baos.toString());\n }\n}",
93
- "new_test_code": "@Test\npublic void addJvmVersionModuleInfoAndRunModular() throws Exception {\n prepareTestJar();\n String javaHome = System.getProperty(\"java.home\");\n String javaBin = javaHome + File.separator + \"bin\" + File.separator + \"java\";\n ProcessBuilder builder = new ProcessBuilder(javaBin, \"--module-path\", GENERATED_TEST_RESOURCES + File.separator + \"example.jar\", \"--module\", \"com.example\").redirectOutput(Redirect.INHERIT);\n Process process = builder.start();\n process.waitFor();\n if (process.exitValue() == 0) {\n throw new AssertionError();\n }\n new AddModuleInfo(\"module com.example {}\", \"com.example.HelloWorld\", \"1.42.3\", Paths.get(\"target\", \"generated-test-resources\", \"example.jar\"), Paths.get(\"target\", \"generated-test-modules\"), \"9\", false, null).run();\n builder = new ProcessBuilder(javaBin, \"--module-path\", GENERATED_TEST_MODULES + File.separator + \"example.jar\", \"--module\", \"com.example\");\n process = builder.start();\n process.waitFor();\n if (process.exitValue() != 0) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n process.getInputStream().transferTo(baos);\n process.getErrorStream().transferTo(baos);\n throw new AssertionError(baos.toString());\n }\n}",
94
- "old_test_file_path": [
95
- "core/src/test/java/org/moditect/test/AddModuleInfoTest.java"
96
- ],
97
- "old_test_lnum": [
98
- "75-118"
99
- ],
100
- "new_test_lnum": [
101
- "75-119"
102
- ],
103
- "old_production_code": "public void run() {\n if (Files.isDirectory(inputJar)) {\n throw new IllegalArgumentException(\"Input JAR must not be a directory\");\n }\n if (!Files.exists(outputDirectory)) {\n throw new IllegalArgumentException(\"Output directory doesn't exist: \" + outputDirectory);\n }\n Path outputJar = outputDirectory.resolve(inputJar.getFileName());\n if (Files.exists(outputJar) && !overwriteExistingFiles) {\n throw new RuntimeException(\"File \" + outputJar + \" already exists; either set 'overwriteExistingFiles' to true or specify another output directory\");\n }\n try {\n Files.copy(inputJar, outputJar, StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n throw new RuntimeException(\"Couldn't copy JAR file\", e);\n }\n ModuleDeclaration module = ModuleInfoCompiler.parseModuleInfo(moduleInfoSource);\n byte[] clazz = ModuleInfoCompiler.compileModuleInfo(module, mainClass, version);\n Map<String, String> env = new HashMap<>();\n env.put(\"create\", \"true\");\n URI uri = URI.create(\"jar:\" + outputJar.toUri().toString());\n try (FileSystem zipfs = FileSystems.newFileSystem(uri, env)) {\n if (jvmVersion == null) {\n Files.write(zipfs.getPath(\"module-info.class\"), clazz, StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);\n } else {\n Path path = zipfs.getPath(\"META-INF/versions\", jvmVersion.toString(), \"module-info.class\");\n Files.createDirectories(path.getParent());\n Files.write(path, clazz, StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);\n Path manifestPath = zipfs.getPath(\"META-INF/MANIFEST.MF\");\n Manifest manifest;\n if (Files.exists(manifestPath)) {\n manifest = new Manifest(Files.newInputStream(manifestPath));\n } else {\n manifest = new Manifest();\n manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, \"1.0\");\n }\n manifest.getMainAttributes().put(new Attributes.Name(\"Multi-Release\"), \"true\");\n try (OutputStream manifestOs = Files.newOutputStream(manifestPath, StandardOpenOption.TRUNCATE_EXISTING)) {\n manifest.write(manifestOs);\n }\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Couldn't add module-info.class to JAR\", e);\n }\n}",
104
- "new_production_code": "public void run() {\n if (Files.isDirectory(inputJar)) {\n throw new IllegalArgumentException(\"Input JAR must not be a directory\");\n }\n if (!Files.exists(outputDirectory)) {\n throw new IllegalArgumentException(\"Output directory doesn't exist: \" + outputDirectory);\n }\n Path outputJar = outputDirectory.resolve(inputJar.getFileName());\n if (Files.exists(outputJar) && !overwriteExistingFiles) {\n throw new RuntimeException(\"File \" + outputJar + \" already exists; either set 'overwriteExistingFiles' to true or specify another output directory\");\n }\n try {\n Files.copy(inputJar, outputJar, StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n throw new RuntimeException(\"Couldn't copy JAR file\", e);\n }\n ModuleDeclaration module = ModuleInfoCompiler.parseModuleInfo(moduleInfoSource);\n byte[] clazz = ModuleInfoCompiler.compileModuleInfo(module, mainClass, version);\n Map<String, String> env = new HashMap<>();\n env.put(\"create\", \"true\");\n URI uri = URI.create(\"jar:\" + outputJar.toUri());\n try (FileSystem zipfs = FileSystems.newFileSystem(uri, env)) {\n if (jvmVersion == null) {\n Path path = zipfs.getPath(\"module-info.class\");\n Files.write(path, clazz, StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);\n Files.setLastModifiedTime(path, toFileTime(timestamp));\n } else {\n Path path = zipfs.getPath(\"META-INF/versions\", jvmVersion.toString(), \"module-info.class\");\n Files.createDirectories(path.getParent());\n Files.write(path, clazz, StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);\n FileTime lastModifiedTime = toFileTime(timestamp);\n Files.setLastModifiedTime(path, lastModifiedTime);\n Files.setLastModifiedTime(path.getParent(), lastModifiedTime);\n Files.setLastModifiedTime(path.getParent().getParent(), lastModifiedTime);\n Path manifestPath = zipfs.getPath(\"META-INF/MANIFEST.MF\");\n Manifest manifest;\n if (Files.exists(manifestPath)) {\n manifest = new Manifest(Files.newInputStream(manifestPath));\n } else {\n manifest = new Manifest();\n manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, \"1.0\");\n }\n manifest.getMainAttributes().put(new Attributes.Name(\"Multi-Release\"), \"true\");\n try (OutputStream manifestOs = Files.newOutputStream(manifestPath, StandardOpenOption.TRUNCATE_EXISTING)) {\n manifest.write(manifestOs);\n }\n Files.setLastModifiedTime(manifestPath, lastModifiedTime);\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Couldn't add module-info.class to JAR\", e);\n }\n}",
105
- "focal_file_path": "core/src/main/java/org/moditect/commands/AddModuleInfo.java",
106
- "focal_method_sign": "org/moditect/commands/AddModuleInfo.run:()V",
107
- "focal_all_deps_scored": [
108
- {
109
- "dep_id": 0,
110
- "method_sign": "org/moditect/commands/AddModuleInfo.run:()V",
111
- "file_path_old": "core/src/main/java/org/moditect/commands/AddModuleInfo.java",
112
- "line_nums_old": "80-144",
113
- "file_path_new": "core/src/main/java/org/moditect/commands/AddModuleInfo.java",
114
- "line_nums_new": "84-158",
115
- "dependency_updated": "updated",
116
- "score": null,
117
- "signal_scores": {}
118
- }
119
- ],
120
- "coverage_gold": 0.6904761904761905,
121
- "branch_coverage_gold": 7.4468,
122
- "method_coverage_gold": 5.0725,
123
- "line_coverage_gold": 9.6817,
124
- "is_traceback": false,
125
- "commit_gap": {
126
- "count": 0,
127
- "skipped_commits": []
128
- },
129
- "test_is_refactoring_only": false,
130
- "has_test_dep_change": false,
131
- "all_deps_new": [
132
- "org/moditect/test/AddModuleInfoTest.prepareTestJar:()V",
133
- "org/moditect/commands/AddModuleInfo.run:()V"
134
- ],
135
- "all_deps_old": [
136
- "org/moditect/test/AddModuleInfoTest.prepareTestJar:()V",
137
- "org/moditect/commands/AddModuleInfo.run:()V"
138
- ],
139
- "deps_changes": [
140
- {
141
- "method_sign": "org/moditect/commands/AddModuleInfo.run:()V",
142
- "change_type": "UPDATE",
143
- "file_path_old": "core/src/main/java/org/moditect/commands/AddModuleInfo.java",
144
- "file_path_new": "core/src/main/java/org/moditect/commands/AddModuleInfo.java",
145
- "source": "production",
146
- "is_test_dependency": false,
147
- "is_refactoring_only": false
148
- }
149
- ],
150
- "variant_result": {
151
- "old_on_old": "pass",
152
- "old_on_new": "error",
153
- "new_on_old": "error",
154
- "new_on_new": "pass"
155
- }
156
- }
157
- ],
158
- "version": "1.3.0.Final",
159
- "java_version": 11
160
- }
161
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
monitorjbl_excel-streaming-reader-2.2.0.json DELETED
@@ -1,576 +0,0 @@
1
- [
2
- {
3
- "task_id": "monitorjbl_excel-streaming-reader-2.2.0__a6bca3f_1dc902c__StreamingReaderTest_5a9acecd",
4
- "project_name": "monitorjbl_excel-streaming-reader-2.2.0",
5
- "git_clone_url": "https://github.com/monitorjbl/excel-streaming-reader.git",
6
- "rev1": "a6bca3f0d7ed8854f72f54e64fd2ae1d2f50c71c",
7
- "rev2": "1dc902c629bb8a08097d3e4607f7601ce25f3336",
8
- "rev1_date": "2015-11-23T10:52:26Z",
9
- "rev2_date": "2015-11-23T11:14:53Z",
10
- "git_diff_url": "https://github.com/monitorjbl/excel-streaming-reader/compare/a6bca3f0d7ed8854f72f54e64fd2ae1d2f50c71c...1dc902c629bb8a08097d3e4607f7601ce25f3336",
11
- "test_file": "src/test/java/com/monitorjbl/xlsx/StreamingReaderTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "9_monitorjbl_excel-streaming-reader-2.2.0_a6bca3f_1dc902c_StreamingReaderTest",
15
- "test_sign": "com/monitorjbl/xlsx/StreamingReaderTest.testBlankNumerics:()V",
16
- "class": "StreamingReaderTest",
17
- "method": "testBlankNumerics",
18
- "module": "",
19
- "junit_selector": "com.monitorjbl.xlsx.StreamingReaderTest#testBlankNumerics",
20
- "old_test_code": "@Test\npublic void testBlankNumerics() throws Exception {\n File f = new File(\"src/test/resources/blank_cells.xlsx\");\n try (StreamingReader reader = StreamingReader.builder().read(f)) {\n Row row = reader.iterator().next();\n assertThat(row.getCell(1).getStringCellValue(), is(nullValue()));\n assertThat(row.getCell(1).getDateCellValue(), is(nullValue()));\n assertThat(row.getCell(1).getNumericCellValue(), equalTo(0.0));\n }\n}",
21
- "new_test_code": "@Test\npublic void testBlankNumerics() throws Exception {\n File f = new File(\"src/test/resources/blank_cells.xlsx\");\n try (StreamingReader reader = StreamingReader.builder().read(f)) {\n Row row = reader.iterator().next();\n assertThat(row.getCell(1).getStringCellValue(), equalTo(\"\"));\n assertThat(row.getCell(1).getDateCellValue(), is(nullValue()));\n assertThat(row.getCell(1).getNumericCellValue(), equalTo(0.0));\n }\n}",
22
- "old_test_file_path": [
23
- "src/test/java/com/monitorjbl/xlsx/StreamingReaderTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "374-383"
27
- ],
28
- "new_test_lnum": [
29
- "374-383"
30
- ],
31
- "old_production_code": "@Override\npublic String getStringCellValue() {\n return (String) contents;\n}",
32
- "new_production_code": "@Override\npublic String getStringCellValue() {\n return contents == null ? \"\" : (String) contents;\n}",
33
- "focal_file_path": "src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java",
34
- "focal_method_sign": "com/monitorjbl/xlsx/impl/StreamingCell.getStringCellValue:()Ljava/lang/String",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "com/monitorjbl/xlsx/impl/StreamingCell.getStringCellValue:()Ljava/lang/String",
39
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java",
40
- "line_nums_old": "149-152",
41
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java",
42
- "line_nums_new": "149-152",
43
- "dependency_updated": "updated",
44
- "score": null,
45
- "signal_scores": {}
46
- }
47
- ],
48
- "coverage_gold": 0.4659090909090909,
49
- "branch_coverage_gold": 41.5842,
50
- "method_coverage_gold": 24.5902,
51
- "line_coverage_gold": 37.8462,
52
- "is_traceback": false,
53
- "commit_gap": {
54
- "count": 1,
55
- "skipped_commits": [
56
- "18006bbc41e00ec394ad38908d2fc7106765fb6d"
57
- ]
58
- },
59
- "test_is_refactoring_only": false,
60
- "has_test_dep_change": false,
61
- "all_deps_new": [
62
- "com/monitorjbl/xlsx/impl/StreamingRow.getCell:(I)Lorg/apache/poi/ss/usermodel/Cell",
63
- "com/monitorjbl/xlsx/StreamingReader.close:()V",
64
- "com/monitorjbl/xlsx/StreamingReader.iterator:()Ljava/util/Iterator",
65
- "com/monitorjbl/xlsx/impl/StreamingCell.getNumericCellValue:()D",
66
- "com/monitorjbl/xlsx/impl/StreamingCell.getDateCellValue:()Ljava/util/Date",
67
- "com/monitorjbl/xlsx/impl/StreamingCell.getStringCellValue:()Ljava/lang/String",
68
- "com/monitorjbl/xlsx/StreamingReader.builder:()Lcom/monitorjbl/xlsx/StreamingReader$Builder",
69
- "com/monitorjbl/xlsx/StreamingReader$Builder.read:(Ljava/io/File;)Lcom/monitorjbl/xlsx/StreamingReader"
70
- ],
71
- "all_deps_old": [
72
- "com/monitorjbl/xlsx/impl/StreamingRow.getCell:(I)Lorg/apache/poi/ss/usermodel/Cell",
73
- "com/monitorjbl/xlsx/StreamingReader.close:()V",
74
- "com/monitorjbl/xlsx/StreamingReader.iterator:()Ljava/util/Iterator",
75
- "com/monitorjbl/xlsx/impl/StreamingCell.getNumericCellValue:()D",
76
- "com/monitorjbl/xlsx/impl/StreamingCell.getDateCellValue:()Ljava/util/Date",
77
- "com/monitorjbl/xlsx/impl/StreamingCell.getStringCellValue:()Ljava/lang/String",
78
- "com/monitorjbl/xlsx/StreamingReader.builder:()Lcom/monitorjbl/xlsx/StreamingReader$Builder",
79
- "com/monitorjbl/xlsx/StreamingReader$Builder.read:(Ljava/io/File;)Lcom/monitorjbl/xlsx/StreamingReader"
80
- ],
81
- "deps_changes": [
82
- {
83
- "method_sign": "com/monitorjbl/xlsx/impl/StreamingCell.getStringCellValue:()Ljava/lang/String",
84
- "change_type": "UPDATE",
85
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java",
86
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java",
87
- "source": "production",
88
- "is_test_dependency": false,
89
- "is_refactoring_only": false
90
- }
91
- ],
92
- "variant_result": {
93
- "old_on_old": "pass",
94
- "old_on_new": "fail",
95
- "new_on_old": "fail",
96
- "new_on_new": "pass"
97
- }
98
- }
99
- ],
100
- "version": "2.2.0",
101
- "java_version": 8
102
- },
103
- {
104
- "task_id": "monitorjbl_excel-streaming-reader-2.2.0__b20e474_328e1aa__BufferedStringsTableTest_7f7b05f1",
105
- "project_name": "monitorjbl_excel-streaming-reader-2.2.0",
106
- "git_clone_url": "https://github.com/monitorjbl/excel-streaming-reader.git",
107
- "rev1": "b20e474bf6ae77af78c4d47c7e96753a288f9eff",
108
- "rev2": "328e1aad48681d4e0e43a7bb7f4f5cd3798b4710",
109
- "rev1_date": "2018-06-30T15:59:58Z",
110
- "rev2_date": "2018-06-30T16:11:49Z",
111
- "git_diff_url": "https://github.com/monitorjbl/excel-streaming-reader/compare/b20e474bf6ae77af78c4d47c7e96753a288f9eff...328e1aad48681d4e0e43a7bb7f4f5cd3798b4710",
112
- "test_file": "src/test/java/com/monitorjbl/xlsx/BufferedStringsTableTest.java",
113
- "test_changes": [
114
- {
115
- "change_id": "67_monitorjbl_excel-streaming-reader-2.2.0_b20e474_328e1aa_BufferedStringsTableTest",
116
- "test_sign": "com/monitorjbl/xlsx/BufferedStringsTableTest.testStringsWithMultipleXmlElements:()V",
117
- "class": "BufferedStringsTableTest",
118
- "method": "testStringsWithMultipleXmlElements",
119
- "module": "",
120
- "junit_selector": "com.monitorjbl.xlsx.BufferedStringsTableTest#testStringsWithMultipleXmlElements",
121
- "old_test_code": "@Test\npublic void testStringsWithMultipleXmlElements() throws Exception {\n File file = new File(\"src/test/resources/blank_cells.xlsx\");\n File sstCache = File.createTempFile(\"cache\", \".sst\");\n sstCache.deleteOnExit();\n try (OPCPackage pkg = OPCPackage.open(file, PackageAccess.READ);\n BufferedStringsTable sst = BufferedStringsTable.getSharedStringsTable(sstCache, 1000, pkg)) {\n assertNotNull(sst);\n assertEquals(\"B1 is Blank --->\", sst.getEntryAt(0).getT());\n assertEquals(\"B1 is Blank --->\", sst.getItemAt(0).getString());\n }\n}",
122
- "new_test_code": "@Test\npublic void testStringsWithMultipleXmlElements() throws Exception {\n File file = new File(\"src/test/resources/blank_cells.xlsx\");\n File sstCache = File.createTempFile(\"cache\", \".sst\");\n sstCache.deleteOnExit();\n try (OPCPackage pkg = OPCPackage.open(file, PackageAccess.READ);\n BufferedStringsTable sst = BufferedStringsTable.getSharedStringsTable(sstCache, 1000, pkg)) {\n assertNotNull(sst);\n assertEquals(\"B1 is Blank --->\", sst.getEntryAt(0).getT());\n }\n}",
123
- "old_test_file_path": [
124
- "src/test/java/com/monitorjbl/xlsx/BufferedStringsTableTest.java"
125
- ],
126
- "old_test_lnum": [
127
- "19-30"
128
- ],
129
- "new_test_lnum": [
130
- "19-29"
131
- ],
132
- "old_production_code": "@Override\npublic RichTextString getItemAt(int idx) {\n return new XSSFRichTextString(list.getAt(idx));\n}",
133
- "new_production_code": "",
134
- "focal_file_path": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
135
- "focal_method_sign": "com/monitorjbl/xlsx/sst/BufferedStringsTable.getItemAt:(I)Lorg/apache/poi/ss/usermodel/RichTextString",
136
- "focal_all_deps_scored": [
137
- {
138
- "dep_id": 3,
139
- "method_sign": "com/monitorjbl/xlsx/sst/BufferedStringsTable.getItemAt:(I)Lorg/apache/poi/ss/usermodel/RichTextString",
140
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
141
- "line_nums_old": "108-111",
142
- "file_path_new": null,
143
- "line_nums_new": null,
144
- "dependency_updated": "deleted",
145
- "score": 0.354,
146
- "signal_scores": {
147
- "nc": 0.0,
148
- "lcs_u": 0.6667,
149
- "ed": 0.2,
150
- "class": 1.0,
151
- "tfidf": 0.0644
152
- }
153
- },
154
- {
155
- "dep_id": 0,
156
- "method_sign": "com/monitorjbl/xlsx/sst/BufferedStringsTable.getEntryAt:(I)Lorg/openxmlformats/schemas/spreadsheetml/x2006/main/CTRst",
157
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
158
- "line_nums_old": "113-116",
159
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
160
- "line_nums_new": "107-110",
161
- "dependency_updated": "updated",
162
- "score": 0.3077,
163
- "signal_scores": {
164
- "nc": 0.0,
165
- "lcs_u": 0.5,
166
- "ed": 0.1333,
167
- "class": 1.0,
168
- "tfidf": 0.0393
169
- }
170
- },
171
- {
172
- "dep_id": 1,
173
- "method_sign": "com/monitorjbl/xlsx/sst/BufferedStringsTable.close:()V",
174
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
175
- "line_nums_old": "118-122",
176
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
177
- "line_nums_new": "112-115",
178
- "dependency_updated": "updated",
179
- "score": 0.2698,
180
- "signal_scores": {
181
- "nc": 0.0,
182
- "lcs_u": 0.4,
183
- "ed": 0.0667,
184
- "class": 1.0,
185
- "tfidf": 0.0
186
- }
187
- },
188
- {
189
- "dep_id": 2,
190
- "method_sign": "com/monitorjbl/xlsx/sst/CTRstImpl.getT:()Ljava/lang/String",
191
- "file_path_old": null,
192
- "line_nums_old": null,
193
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/sst/CTRstImpl.java",
194
- "line_nums_new": "48-51",
195
- "dependency_updated": "inserted",
196
- "score": 0.1488,
197
- "signal_scores": {
198
- "nc": 0.0,
199
- "lcs_u": 0.75,
200
- "ed": 0.1,
201
- "class": 0.0,
202
- "tfidf": 0.0
203
- }
204
- }
205
- ],
206
- "coverage_gold": 1.0,
207
- "branch_coverage_gold": 4.6358,
208
- "method_coverage_gold": 3.7694,
209
- "line_coverage_gold": 6.9627,
210
- "is_traceback": false,
211
- "commit_gap": {
212
- "count": 0,
213
- "skipped_commits": []
214
- },
215
- "test_is_refactoring_only": false,
216
- "has_test_dep_change": false,
217
- "all_deps_new": [
218
- "com/monitorjbl/xlsx/sst/BufferedStringsTable.close:()V",
219
- "com/monitorjbl/xlsx/sst/BufferedStringsTable.getEntryAt:(I)Lorg/openxmlformats/schemas/spreadsheetml/x2006/main/CTRst",
220
- "com/monitorjbl/xlsx/sst/BufferedStringsTable.getSharedStringsTable:(Ljava/io/File;ILorg/apache/poi/openxml4j/opc/OPCPackage;)Lcom/monitorjbl/xlsx/sst/BufferedStringsTable",
221
- "com/monitorjbl/xlsx/sst/CTRstImpl.getT:()Ljava/lang/String"
222
- ],
223
- "all_deps_old": [
224
- "com/monitorjbl/xlsx/sst/BufferedStringsTable.getEntryAt:(I)Lorg/openxmlformats/schemas/spreadsheetml/x2006/main/CTRst",
225
- "com/monitorjbl/xlsx/sst/BufferedStringsTable.getSharedStringsTable:(Ljava/io/File;ILorg/apache/poi/openxml4j/opc/OPCPackage;)Lcom/monitorjbl/xlsx/sst/BufferedStringsTable",
226
- "com/monitorjbl/xlsx/sst/BufferedStringsTable.getItemAt:(I)Lorg/apache/poi/ss/usermodel/RichTextString",
227
- "com/monitorjbl/xlsx/sst/BufferedStringsTable.close:()V"
228
- ],
229
- "deps_changes": [
230
- {
231
- "method_sign": "com/monitorjbl/xlsx/sst/BufferedStringsTable.getEntryAt:(I)Lorg/openxmlformats/schemas/spreadsheetml/x2006/main/CTRst",
232
- "change_type": "UPDATE",
233
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
234
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
235
- "source": "production",
236
- "is_test_dependency": false,
237
- "is_refactoring_only": true
238
- },
239
- {
240
- "method_sign": "com/monitorjbl/xlsx/sst/BufferedStringsTable.close:()V",
241
- "change_type": "UPDATE",
242
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
243
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
244
- "source": "production",
245
- "is_test_dependency": false,
246
- "is_refactoring_only": false
247
- },
248
- {
249
- "method_sign": "com/monitorjbl/xlsx/sst/CTRstImpl.getT:()Ljava/lang/String",
250
- "change_type": "ADD",
251
- "file_path_old": null,
252
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/sst/CTRstImpl.java",
253
- "source": "production",
254
- "is_test_dependency": false,
255
- "is_refactoring_only": false
256
- },
257
- {
258
- "method_sign": "com/monitorjbl/xlsx/sst/BufferedStringsTable.getItemAt:(I)Lorg/apache/poi/ss/usermodel/RichTextString",
259
- "change_type": "DELETE",
260
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
261
- "file_path_new": null,
262
- "source": "production",
263
- "is_test_dependency": false,
264
- "is_refactoring_only": false
265
- }
266
- ],
267
- "variant_result": {
268
- "old_on_old": "pass",
269
- "old_on_new": "error",
270
- "new_on_old": "pass",
271
- "new_on_new": "pass"
272
- }
273
- },
274
- {
275
- "change_id": "68_monitorjbl_excel-streaming-reader-2.2.0_b20e474_328e1aa_BufferedStringsTableTest",
276
- "test_sign": "com/monitorjbl/xlsx/BufferedStringsTableTest.testStringsWrappedInFormatting:()V",
277
- "class": "BufferedStringsTableTest",
278
- "method": "testStringsWrappedInFormatting",
279
- "module": "",
280
- "junit_selector": "com.monitorjbl.xlsx.BufferedStringsTableTest#testStringsWrappedInFormatting",
281
- "old_test_code": "@Test\npublic void testStringsWrappedInFormatting() throws Exception {\n File file = new File(\"src/test/resources/shared_styled_string.xlsx\");\n File sstCache = File.createTempFile(\"cache\", \".sst\");\n sstCache.deleteOnExit();\n try (OPCPackage pkg = OPCPackage.open(file, PackageAccess.READ);\n BufferedStringsTable sst = BufferedStringsTable.getSharedStringsTable(sstCache, 1000, pkg)) {\n assertNotNull(sst);\n assertEquals(\"shared styled string\", sst.getItemAt(0).getString());\n }\n}",
282
- "new_test_code": "@Test\npublic void testStringsWrappedInFormatting() throws Exception {\n File file = new File(\"src/test/resources/shared_styled_string.xlsx\");\n File sstCache = File.createTempFile(\"cache\", \".sst\");\n sstCache.deleteOnExit();\n try (OPCPackage pkg = OPCPackage.open(file, PackageAccess.READ);\n BufferedStringsTable sst = BufferedStringsTable.getSharedStringsTable(sstCache, 1000, pkg)) {\n assertNotNull(sst);\n assertEquals(\"shared styled string\", sst.getEntryAt(0).getT());\n }\n}",
283
- "old_test_file_path": [
284
- "src/test/java/com/monitorjbl/xlsx/BufferedStringsTableTest.java"
285
- ],
286
- "old_test_lnum": [
287
- "36-46"
288
- ],
289
- "new_test_lnum": [
290
- "35-45"
291
- ],
292
- "old_production_code": "@Override\npublic RichTextString getItemAt(int idx) {\n return new XSSFRichTextString(list.getAt(idx));\n}",
293
- "new_production_code": "",
294
- "focal_file_path": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
295
- "focal_method_sign": "com/monitorjbl/xlsx/sst/BufferedStringsTable.getItemAt:(I)Lorg/apache/poi/ss/usermodel/RichTextString",
296
- "focal_all_deps_scored": [
297
- {
298
- "dep_id": 3,
299
- "method_sign": "com/monitorjbl/xlsx/sst/BufferedStringsTable.getItemAt:(I)Lorg/apache/poi/ss/usermodel/RichTextString",
300
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
301
- "line_nums_old": "108-111",
302
- "file_path_new": null,
303
- "line_nums_new": null,
304
- "dependency_updated": "deleted",
305
- "score": 0.3519,
306
- "signal_scores": {
307
- "nc": 0.0,
308
- "lcs_u": 0.6667,
309
- "ed": 0.2308,
310
- "class": 1.0,
311
- "tfidf": 0.0339
312
- }
313
- },
314
- {
315
- "dep_id": 1,
316
- "method_sign": "com/monitorjbl/xlsx/sst/BufferedStringsTable.getEntryAt:(I)Lorg/openxmlformats/schemas/spreadsheetml/x2006/main/CTRst",
317
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
318
- "line_nums_old": "113-116",
319
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
320
- "line_nums_new": "107-110",
321
- "dependency_updated": "updated",
322
- "score": 0.3475,
323
- "signal_scores": {
324
- "nc": 0.0,
325
- "lcs_u": 0.6,
326
- "ed": 0.2308,
327
- "class": 1.0,
328
- "tfidf": 0.0654
329
- }
330
- },
331
- {
332
- "dep_id": 0,
333
- "method_sign": "com/monitorjbl/xlsx/sst/BufferedStringsTable.close:()V",
334
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
335
- "line_nums_old": "118-122",
336
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
337
- "line_nums_new": "112-115",
338
- "dependency_updated": "updated",
339
- "score": 0.2715,
340
- "signal_scores": {
341
- "nc": 0.0,
342
- "lcs_u": 0.4,
343
- "ed": 0.0769,
344
- "class": 1.0,
345
- "tfidf": 0.0
346
- }
347
- },
348
- {
349
- "dep_id": 2,
350
- "method_sign": "com/monitorjbl/xlsx/sst/CTRstImpl.getT:()Ljava/lang/String",
351
- "file_path_old": null,
352
- "line_nums_old": null,
353
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/sst/CTRstImpl.java",
354
- "line_nums_new": "48-51",
355
- "dependency_updated": "inserted",
356
- "score": 0.2701,
357
- "signal_scores": {
358
- "nc": 0.0,
359
- "lcs_u": 1.0,
360
- "ed": 0.1538,
361
- "class": 0.0,
362
- "tfidf": 0.2903
363
- }
364
- }
365
- ],
366
- "coverage_gold": 1.0,
367
- "branch_coverage_gold": 6.6225,
368
- "method_coverage_gold": 4.2129,
369
- "line_coverage_gold": 8.0727,
370
- "is_traceback": false,
371
- "commit_gap": {
372
- "count": 0,
373
- "skipped_commits": []
374
- },
375
- "test_is_refactoring_only": false,
376
- "has_test_dep_change": false,
377
- "all_deps_new": [
378
- "com/monitorjbl/xlsx/sst/BufferedStringsTable.close:()V",
379
- "com/monitorjbl/xlsx/sst/BufferedStringsTable.getEntryAt:(I)Lorg/openxmlformats/schemas/spreadsheetml/x2006/main/CTRst",
380
- "com/monitorjbl/xlsx/sst/BufferedStringsTable.getSharedStringsTable:(Ljava/io/File;ILorg/apache/poi/openxml4j/opc/OPCPackage;)Lcom/monitorjbl/xlsx/sst/BufferedStringsTable",
381
- "com/monitorjbl/xlsx/sst/CTRstImpl.getT:()Ljava/lang/String"
382
- ],
383
- "all_deps_old": [
384
- "com/monitorjbl/xlsx/sst/BufferedStringsTable.getSharedStringsTable:(Ljava/io/File;ILorg/apache/poi/openxml4j/opc/OPCPackage;)Lcom/monitorjbl/xlsx/sst/BufferedStringsTable",
385
- "com/monitorjbl/xlsx/sst/BufferedStringsTable.getItemAt:(I)Lorg/apache/poi/ss/usermodel/RichTextString",
386
- "com/monitorjbl/xlsx/sst/BufferedStringsTable.close:()V"
387
- ],
388
- "deps_changes": [
389
- {
390
- "method_sign": "com/monitorjbl/xlsx/sst/BufferedStringsTable.close:()V",
391
- "change_type": "UPDATE",
392
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
393
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
394
- "source": "production",
395
- "is_test_dependency": false,
396
- "is_refactoring_only": false
397
- },
398
- {
399
- "method_sign": "com/monitorjbl/xlsx/sst/BufferedStringsTable.getEntryAt:(I)Lorg/openxmlformats/schemas/spreadsheetml/x2006/main/CTRst",
400
- "change_type": "UPDATE",
401
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
402
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
403
- "source": "production",
404
- "is_test_dependency": false,
405
- "is_refactoring_only": true
406
- },
407
- {
408
- "method_sign": "com/monitorjbl/xlsx/sst/CTRstImpl.getT:()Ljava/lang/String",
409
- "change_type": "ADD",
410
- "file_path_old": null,
411
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/sst/CTRstImpl.java",
412
- "source": "production",
413
- "is_test_dependency": false,
414
- "is_refactoring_only": false
415
- },
416
- {
417
- "method_sign": "com/monitorjbl/xlsx/sst/BufferedStringsTable.getItemAt:(I)Lorg/apache/poi/ss/usermodel/RichTextString",
418
- "change_type": "DELETE",
419
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java",
420
- "file_path_new": null,
421
- "source": "production",
422
- "is_test_dependency": false,
423
- "is_refactoring_only": false
424
- }
425
- ],
426
- "variant_result": {
427
- "old_on_old": "pass",
428
- "old_on_new": "error",
429
- "new_on_old": "pass",
430
- "new_on_new": "pass"
431
- }
432
- }
433
- ],
434
- "version": "2.2.0",
435
- "java_version": 8
436
- },
437
- {
438
- "task_id": "monitorjbl_excel-streaming-reader-2.2.0__e36f3b4_5e8ad5b__StreamingReaderTest_f7470444",
439
- "project_name": "monitorjbl_excel-streaming-reader-2.2.0",
440
- "git_clone_url": "https://github.com/monitorjbl/excel-streaming-reader.git",
441
- "rev1": "e36f3b4a3cbca4bebe1ca47ff1510a5fbc91defa",
442
- "rev2": "5e8ad5bd3a37b0eee85267a5c63e347ff295881a",
443
- "rev1_date": "2015-11-13T19:17:19Z",
444
- "rev2_date": "2015-11-13T19:21:03Z",
445
- "git_diff_url": "https://github.com/monitorjbl/excel-streaming-reader/compare/e36f3b4a3cbca4bebe1ca47ff1510a5fbc91defa...5e8ad5bd3a37b0eee85267a5c63e347ff295881a",
446
- "test_file": "src/test/java/com/monitorjbl/xlsx/StreamingReaderTest.java",
447
- "test_changes": [
448
- {
449
- "change_id": "65_monitorjbl_excel-streaming-reader-2.2.0_e36f3b4_5e8ad5b_StreamingReaderTest",
450
- "test_sign": "com/monitorjbl/xlsx/StreamingReaderTest.testSpecialStyles:()V",
451
- "class": "StreamingReaderTest",
452
- "method": "testSpecialStyles",
453
- "module": "",
454
- "junit_selector": "com.monitorjbl.xlsx.StreamingReaderTest#testSpecialStyles",
455
- "old_test_code": "@Test\npublic void testSpecialStyles() throws Exception {\n File f = new File(\"src/test/resources/special_types.xlsx\");\n Map<Integer, List<Cell>> contents = new HashMap<>();\n try (StreamingReader reader = StreamingReader.builder().read(f)) {\n for (Row row : reader) {\n contents.put(row.getRowNum(), new ArrayList<Cell>());\n for (Cell c : row) {\n if (c.getColumnIndex() > 0) {\n contents.get(row.getRowNum()).add(c);\n }\n }\n }\n }\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n assertThat(contents.size(), equalTo(2));\n assertThat(contents.get(1).size(), equalTo(4));\n assertThat(contents.get(1).get(0).getStringCellValue(), equalTo(\"Thu\\\", \\\"Dec 25\\\", \\\"14\"));\n assertThat(contents.get(1).get(0).getDateCellValue(), equalTo(df.parse(\"25/12/2014\")));\n assertThat(contents.get(1).get(1).getStringCellValue(), equalTo(\"02/04/15\"));\n assertThat(contents.get(1).get(1).getDateCellValue(), equalTo(df.parse(\"04/02/2015\")));\n assertThat(contents.get(1).get(2).getStringCellValue(), equalTo(\"14\\\". \\\"Mar\\\". \\\"2015\"));\n assertThat(contents.get(1).get(2).getDateCellValue(), equalTo(df.parse(\"14/03/2015\")));\n assertThat(contents.get(1).get(3).getStringCellValue(), equalTo(\"2015-05-05\"));\n assertThat(contents.get(1).get(3).getDateCellValue(), equalTo(df.parse(\"05/05/2015\")));\n assertThat(contents.get(2).size(), equalTo(4));\n assertThat(contents.get(2).get(0).getStringCellValue(), equalTo(\"3.12\"));\n assertThat(contents.get(2).get(0).getNumericCellValue(), equalTo(3.12312312312));\n assertThat(contents.get(2).get(1).getStringCellValue(), equalTo(\"1,023,042\"));\n assertThat(contents.get(2).get(1).getNumericCellValue(), equalTo(1023042.0));\n assertThat(contents.get(2).get(2).getStringCellValue(), equalTo(\"-312,231.12\"));\n assertThat(contents.get(2).get(2).getNumericCellValue(), equalTo(-312231.12123145));\n assertThat(contents.get(2).get(3).getStringCellValue(), equalTo(\"(132)\"));\n assertThat(contents.get(2).get(3).getNumericCellValue(), equalTo(-132.0));\n}",
456
- "new_test_code": "@Test\npublic void testSpecialStyles() throws Exception {\n File f = new File(\"src/test/resources/special_types.xlsx\");\n Map<Integer, List<Cell>> contents = new HashMap<>();\n try (StreamingReader reader = StreamingReader.builder().read(f)) {\n for (Row row : reader) {\n contents.put(row.getRowNum(), new ArrayList<Cell>());\n for (Cell c : row) {\n if (c.getColumnIndex() > 0) {\n contents.get(row.getRowNum()).add(c);\n }\n }\n }\n }\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n assertThat(contents.size(), equalTo(2));\n assertThat(contents.get(0).size(), equalTo(4));\n assertThat(contents.get(0).get(0).getStringCellValue(), equalTo(\"Thu\\\", \\\"Dec 25\\\", \\\"14\"));\n assertThat(contents.get(0).get(0).getDateCellValue(), equalTo(df.parse(\"25/12/2014\")));\n assertThat(contents.get(0).get(1).getStringCellValue(), equalTo(\"02/04/15\"));\n assertThat(contents.get(0).get(1).getDateCellValue(), equalTo(df.parse(\"04/02/2015\")));\n assertThat(contents.get(0).get(2).getStringCellValue(), equalTo(\"14\\\". \\\"Mar\\\". \\\"2015\"));\n assertThat(contents.get(0).get(2).getDateCellValue(), equalTo(df.parse(\"14/03/2015\")));\n assertThat(contents.get(0).get(3).getStringCellValue(), equalTo(\"2015-05-05\"));\n assertThat(contents.get(0).get(3).getDateCellValue(), equalTo(df.parse(\"05/05/2015\")));\n assertThat(contents.get(1).size(), equalTo(4));\n assertThat(contents.get(1).get(0).getStringCellValue(), equalTo(\"3.12\"));\n assertThat(contents.get(1).get(0).getNumericCellValue(), equalTo(3.12312312312));\n assertThat(contents.get(1).get(1).getStringCellValue(), equalTo(\"1,023,042\"));\n assertThat(contents.get(1).get(1).getNumericCellValue(), equalTo(1023042.0));\n assertThat(contents.get(1).get(2).getStringCellValue(), equalTo(\"-312,231.12\"));\n assertThat(contents.get(1).get(2).getNumericCellValue(), equalTo(-312231.12123145));\n assertThat(contents.get(1).get(3).getStringCellValue(), equalTo(\"(132)\"));\n assertThat(contents.get(1).get(3).getNumericCellValue(), equalTo(-132.0));\n}",
457
- "old_test_file_path": [
458
- "src/test/java/com/monitorjbl/xlsx/StreamingReaderTest.java"
459
- ],
460
- "old_test_lnum": [
461
- "327-365"
462
- ],
463
- "new_test_lnum": [
464
- "328-366"
465
- ],
466
- "old_production_code": "@Override\npublic Date getDateCellValue() {\n return HSSFDateUtil.getJavaDate(getNumericCellValue());\n}",
467
- "new_production_code": "@Override\npublic Date getDateCellValue() {\n return rawContents == null ? null : HSSFDateUtil.getJavaDate(getNumericCellValue());\n}",
468
- "focal_file_path": "src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java",
469
- "focal_method_sign": "com/monitorjbl/xlsx/impl/StreamingCell.getDateCellValue:()Ljava/util/Date",
470
- "focal_all_deps_scored": [
471
- {
472
- "dep_id": 1,
473
- "method_sign": "com/monitorjbl/xlsx/impl/StreamingCell.getDateCellValue:()Ljava/util/Date",
474
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java",
475
- "line_nums_old": "174-177",
476
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java",
477
- "line_nums_new": "174-177",
478
- "dependency_updated": "updated",
479
- "score": 0.0913,
480
- "signal_scores": {
481
- "nc": 0.0,
482
- "lcs_u": 0.3125,
483
- "ed": 0.1875,
484
- "class": 0.0,
485
- "tfidf": 0.0224
486
- }
487
- },
488
- {
489
- "dep_id": 0,
490
- "method_sign": "com/monitorjbl/xlsx/impl/StreamingCell.getNumericCellValue:()D",
491
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java",
492
- "line_nums_old": "161-164",
493
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java",
494
- "line_nums_new": "161-164",
495
- "dependency_updated": "updated",
496
- "score": 0.0811,
497
- "signal_scores": {
498
- "nc": 0.0,
499
- "lcs_u": 0.2632,
500
- "ed": 0.2105,
501
- "class": 0.0,
502
- "tfidf": 0.0
503
- }
504
- }
505
- ],
506
- "coverage_gold": 0.5316455696202531,
507
- "branch_coverage_gold": 48.3871,
508
- "method_coverage_gold": 27.7311,
509
- "line_coverage_gold": 41.9872,
510
- "is_traceback": true,
511
- "commit_gap": {
512
- "count": 1,
513
- "skipped_commits": [
514
- "112d1e2cb5a962b68bc750cd7df44087589aad12"
515
- ]
516
- },
517
- "test_is_refactoring_only": false,
518
- "has_test_dep_change": false,
519
- "all_deps_new": [
520
- "com/monitorjbl/xlsx/impl/StreamingCell.getNumericCellValue:()D",
521
- "com/monitorjbl/xlsx/StreamingReader$StreamingIterator.hasNext:()Z",
522
- "com/monitorjbl/xlsx/impl/StreamingRow.iterator:()Ljava/util/Iterator",
523
- "com/monitorjbl/xlsx/impl/StreamingCell.getColumnIndex:()I",
524
- "com/monitorjbl/xlsx/StreamingReader.close:()V",
525
- "com/monitorjbl/xlsx/StreamingReader$Builder.read:(Ljava/io/File;)Lcom/monitorjbl/xlsx/StreamingReader",
526
- "com/monitorjbl/xlsx/StreamingReader.builder:()Lcom/monitorjbl/xlsx/StreamingReader$Builder",
527
- "com/monitorjbl/xlsx/StreamingReader.iterator:()Ljava/util/Iterator",
528
- "com/monitorjbl/xlsx/impl/StreamingCell.getDateCellValue:()Ljava/util/Date",
529
- "com/monitorjbl/xlsx/impl/StreamingCell.getStringCellValue:()Ljava/lang/String",
530
- "com/monitorjbl/xlsx/impl/StreamingRow.getRowNum:()I"
531
- ],
532
- "all_deps_old": [
533
- "com/monitorjbl/xlsx/impl/StreamingCell.getNumericCellValue:()D",
534
- "com/monitorjbl/xlsx/StreamingReader$StreamingIterator.hasNext:()Z",
535
- "com/monitorjbl/xlsx/impl/StreamingRow.iterator:()Ljava/util/Iterator",
536
- "com/monitorjbl/xlsx/impl/StreamingCell.getColumnIndex:()I",
537
- "com/monitorjbl/xlsx/StreamingReader.close:()V",
538
- "com/monitorjbl/xlsx/StreamingReader$Builder.read:(Ljava/io/File;)Lcom/monitorjbl/xlsx/StreamingReader",
539
- "com/monitorjbl/xlsx/StreamingReader.builder:()Lcom/monitorjbl/xlsx/StreamingReader$Builder",
540
- "com/monitorjbl/xlsx/StreamingReader.iterator:()Ljava/util/Iterator",
541
- "com/monitorjbl/xlsx/impl/StreamingCell.getDateCellValue:()Ljava/util/Date",
542
- "com/monitorjbl/xlsx/impl/StreamingRow.getRowNum:()I",
543
- "com/monitorjbl/xlsx/impl/StreamingCell.getStringCellValue:()Ljava/lang/String"
544
- ],
545
- "deps_changes": [
546
- {
547
- "method_sign": "com/monitorjbl/xlsx/impl/StreamingCell.getNumericCellValue:()D",
548
- "change_type": "UPDATE",
549
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java",
550
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java",
551
- "source": "production",
552
- "is_test_dependency": false,
553
- "is_refactoring_only": false
554
- },
555
- {
556
- "method_sign": "com/monitorjbl/xlsx/impl/StreamingCell.getDateCellValue:()Ljava/util/Date",
557
- "change_type": "UPDATE",
558
- "file_path_old": "src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java",
559
- "file_path_new": "src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java",
560
- "source": "production",
561
- "is_test_dependency": false,
562
- "is_refactoring_only": false
563
- }
564
- ],
565
- "variant_result": {
566
- "old_on_old": "pass",
567
- "old_on_new": "fail",
568
- "new_on_old": "fail",
569
- "new_on_new": "pass"
570
- }
571
- }
572
- ],
573
- "version": "2.2.0",
574
- "java_version": 8
575
- }
576
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mttkay_signpost-oauth-signpost-2.1.1.json DELETED
@@ -1,225 +0,0 @@
1
- [
2
- {
3
- "task_id": "mttkay_signpost-oauth-signpost-2.1.1__ff92331_9b0b7da__OAuthProviderTest_68a73e20",
4
- "project_name": "mttkay_signpost-oauth-signpost-2.1.1",
5
- "git_clone_url": "https://github.com/mttkay/signpost.git",
6
- "rev1": "ff9233101a5f5c6db038cfe9345186df889e3f1d",
7
- "rev2": "9b0b7dac4ff359e078ab0a8ed77a88fe1e7301bb",
8
- "rev1_date": "2009-12-30T10:28:22Z",
9
- "rev2_date": "2009-12-30T12:53:04Z",
10
- "git_diff_url": "https://github.com/mttkay/signpost/compare/ff9233101a5f5c6db038cfe9345186df889e3f1d...9b0b7dac4ff359e078ab0a8ed77a88fe1e7301bb",
11
- "test_file": "signpost-core/src/test/java/oauth/signpost/basic/OAuthProviderTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "52_mttkay_signpost-oauth-signpost-2.1.1_ff92331_9b0b7da_OAuthProviderTest",
15
- "test_sign": "oauth/signpost/basic/OAuthProviderTest.shouldRetrieveAccessTokenAndUpdateConsumer:()V",
16
- "class": "OAuthProviderTest",
17
- "method": "shouldRetrieveAccessTokenAndUpdateConsumer",
18
- "module": "signpost-core",
19
- "junit_selector": "oauth.signpost.basic.OAuthProviderTest#shouldRetrieveAccessTokenAndUpdateConsumer",
20
- "old_test_code": "@Test\npublic void shouldRetrieveAccessTokenAndUpdateConsumer() throws Exception {\n provider.retrieveAccessToken(null);\n verify(consumerMock).sign((HttpRequest) anyObject());\n verify(consumerMock).setTokenWithSecret(TOKEN, TOKEN_SECRET);\n verify(connectionMock).disconnect();\n}",
21
- "new_test_code": "@Test\npublic void shouldRetrieveAccessTokenAndUpdateConsumer() throws Exception {\n provider.retrieveAccessToken(null);\n verify(consumerMock).sign((HttpRequest) anyObject());\n verify(consumerMock).setTokenWithSecret(TOKEN, TOKEN_SECRET);\n}",
22
- "old_test_file_path": [
23
- "signpost-core/src/test/java/oauth/signpost/basic/OAuthProviderTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "130-138"
27
- ],
28
- "new_test_lnum": [
29
- "139-146"
30
- ],
31
- "old_production_code": "public void retrieveAccessToken(String oauthVerifier) throws OAuthMessageSignerException, OAuthNotAuthorizedException, OAuthExpectationFailedException, OAuthCommunicationException {\n if (consumer.getToken() == null || consumer.getTokenSecret() == null) {\n throw new OAuthExpectationFailedException(\"Authorized request token or token secret not set. \" + \"Did you retrieve an authorized request token before?\");\n }\n retrieveToken(isOAuth10a && oauthVerifier != null ? OAuth.addQueryParameters(accessTokenEndpointUrl, OAuth.OAUTH_VERIFIER, oauthVerifier) : accessTokenEndpointUrl);\n}",
32
- "new_production_code": "",
33
- "focal_file_path": "signpost-core/src/main/java/oauth/signpost/basic/DefaultOAuthProvider.java",
34
- "focal_method_sign": "oauth/signpost/basic/DefaultOAuthProvider.retrieveAccessToken:(Ljava/lang/String;)V",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "oauth/signpost/basic/DefaultOAuthProvider.retrieveAccessToken:(Ljava/lang/String;)V",
39
- "file_path_old": "signpost-core/src/main/java/oauth/signpost/basic/DefaultOAuthProvider.java",
40
- "line_nums_old": "99-113",
41
- "file_path_new": null,
42
- "line_nums_new": null,
43
- "dependency_updated": "deleted",
44
- "score": 0.251,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 1.0,
48
- "ed": 0.4524,
49
- "class": 0.0,
50
- "tfidf": 0.0
51
- }
52
- },
53
- {
54
- "dep_id": 1,
55
- "method_sign": "oauth/signpost/AbstractOAuthProvider.retrieveAccessToken:(Ljava/lang/String;)V",
56
- "file_path_old": null,
57
- "line_nums_old": null,
58
- "file_path_new": "signpost-core/src/main/java/oauth/signpost/AbstractOAuthProvider.java",
59
- "line_nums_new": "89-103",
60
- "dependency_updated": "inserted",
61
- "score": 0.251,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 1.0,
65
- "ed": 0.4524,
66
- "class": 0.0,
67
- "tfidf": 0.0
68
- }
69
- }
70
- ],
71
- "coverage_gold": 0.8,
72
- "branch_coverage_gold": 12.459,
73
- "method_coverage_gold": 18.797,
74
- "line_coverage_gold": 16.1243,
75
- "is_traceback": true,
76
- "commit_gap": {
77
- "count": 1,
78
- "skipped_commits": [
79
- "f5ae9a644755a77a98355e052f43030c5b732792"
80
- ]
81
- },
82
- "test_is_refactoring_only": false,
83
- "has_test_dep_change": false,
84
- "all_deps_new": [
85
- "oauth/signpost/AbstractOAuthProvider.retrieveAccessToken:(Ljava/lang/String;)V"
86
- ],
87
- "all_deps_old": [
88
- "oauth/signpost/basic/DefaultOAuthProvider.retrieveAccessToken:(Ljava/lang/String;)V"
89
- ],
90
- "deps_changes": [
91
- {
92
- "method_sign": "oauth/signpost/basic/DefaultOAuthProvider.retrieveAccessToken:(Ljava/lang/String;)V",
93
- "change_type": "DELETE",
94
- "file_path_old": "signpost-core/src/main/java/oauth/signpost/basic/DefaultOAuthProvider.java",
95
- "file_path_new": null,
96
- "source": "production",
97
- "is_test_dependency": false,
98
- "is_refactoring_only": false
99
- },
100
- {
101
- "method_sign": "oauth/signpost/AbstractOAuthProvider.retrieveAccessToken:(Ljava/lang/String;)V",
102
- "change_type": "ADD",
103
- "file_path_old": null,
104
- "file_path_new": "signpost-core/src/main/java/oauth/signpost/AbstractOAuthProvider.java",
105
- "source": "production",
106
- "is_test_dependency": false,
107
- "is_refactoring_only": false
108
- }
109
- ],
110
- "variant_result": {
111
- "old_on_old": "pass",
112
- "old_on_new": "error",
113
- "new_on_old": "pass",
114
- "new_on_new": "pass"
115
- }
116
- },
117
- {
118
- "change_id": "53_mttkay_signpost-oauth-signpost-2.1.1_ff92331_9b0b7da_OAuthProviderTest",
119
- "test_sign": "oauth/signpost/basic/OAuthProviderTest.shouldRetrieveRequestTokenAndUpdateConsumer:()V",
120
- "class": "OAuthProviderTest",
121
- "method": "shouldRetrieveRequestTokenAndUpdateConsumer",
122
- "module": "signpost-core",
123
- "junit_selector": "oauth.signpost.basic.OAuthProviderTest#shouldRetrieveRequestTokenAndUpdateConsumer",
124
- "old_test_code": "@Test\npublic void shouldRetrieveRequestTokenAndUpdateConsumer() throws Exception {\n String callbackUrl = \"http://www.example.com\";\n String result = provider.retrieveRequestToken(callbackUrl);\n verify(consumerMock).sign((HttpRequest) anyObject());\n verify(consumerMock).setTokenWithSecret(TOKEN, TOKEN_SECRET);\n verify(connectionMock).disconnect();\n assertEquals(AUTHORIZE_WEBSITE_URL + \"?\" + OAuth.OAUTH_TOKEN + \"=\" + TOKEN + \"&\" + OAuth.OAUTH_CALLBACK + \"=\" + \"http%3A%2F%2Fwww.example.com\", result);\n}",
125
- "new_test_code": "@Test\npublic void shouldRetrieveRequestTokenAndUpdateConsumer() throws Exception {\n String callbackUrl = \"http://www.example.com\";\n String result = provider.retrieveRequestToken(callbackUrl);\n verify(consumerMock).sign((HttpRequest) anyObject());\n verify(consumerMock).setTokenWithSecret(TOKEN, TOKEN_SECRET);\n assertEquals(AUTHORIZE_WEBSITE_URL + \"?\" + OAuth.OAUTH_TOKEN + \"=\" + TOKEN + \"&\" + OAuth.OAUTH_CALLBACK + \"=\" + \"http%3A%2F%2Fwww.example.com\", result);\n}",
126
- "old_test_file_path": [
127
- "signpost-core/src/test/java/oauth/signpost/basic/OAuthProviderTest.java"
128
- ],
129
- "old_test_lnum": [
130
- "87-100"
131
- ],
132
- "new_test_lnum": [
133
- "100-112"
134
- ],
135
- "old_production_code": "public String retrieveRequestToken(String callbackUrl) throws OAuthMessageSignerException, OAuthNotAuthorizedException, OAuthExpectationFailedException, OAuthCommunicationException {\n consumer.setTokenWithSecret(null, null);\n retrieveToken(OAuth.addQueryParameters(requestTokenEndpointUrl, OAuth.OAUTH_CALLBACK, callbackUrl));\n String callbackConfirmed = responseParameters.get(OAuth.OAUTH_CALLBACK_CONFIRMED);\n responseParameters.remove(OAuth.OAUTH_CALLBACK_CONFIRMED);\n isOAuth10a = Boolean.TRUE.toString().equals(callbackConfirmed);\n if (isOAuth10a) {\n return OAuth.addQueryParameters(authorizationWebsiteUrl, OAuth.OAUTH_TOKEN, consumer.getToken());\n } else {\n return OAuth.addQueryParameters(authorizationWebsiteUrl, OAuth.OAUTH_TOKEN, consumer.getToken(), OAuth.OAUTH_CALLBACK, callbackUrl);\n }\n}",
136
- "new_production_code": "",
137
- "focal_file_path": "signpost-core/src/main/java/oauth/signpost/basic/DefaultOAuthProvider.java",
138
- "focal_method_sign": "oauth/signpost/basic/DefaultOAuthProvider.retrieveRequestToken:(Ljava/lang/String;)Ljava/lang/String",
139
- "focal_all_deps_scored": [
140
- {
141
- "dep_id": 0,
142
- "method_sign": "oauth/signpost/basic/DefaultOAuthProvider.retrieveRequestToken:(Ljava/lang/String;)Ljava/lang/String",
143
- "file_path_old": "signpost-core/src/main/java/oauth/signpost/basic/DefaultOAuthProvider.java",
144
- "line_nums_old": "70-97",
145
- "file_path_new": null,
146
- "line_nums_new": null,
147
- "dependency_updated": "deleted",
148
- "score": 0.2531,
149
- "signal_scores": {
150
- "nc": 0.0,
151
- "lcs_u": 1.0,
152
- "ed": 0.4651,
153
- "class": 0.0,
154
- "tfidf": 0.0
155
- }
156
- },
157
- {
158
- "dep_id": 1,
159
- "method_sign": "oauth/signpost/AbstractOAuthProvider.retrieveRequestToken:(Ljava/lang/String;)Ljava/lang/String",
160
- "file_path_old": null,
161
- "line_nums_old": null,
162
- "file_path_new": "signpost-core/src/main/java/oauth/signpost/AbstractOAuthProvider.java",
163
- "line_nums_new": "60-87",
164
- "dependency_updated": "inserted",
165
- "score": 0.2531,
166
- "signal_scores": {
167
- "nc": 0.0,
168
- "lcs_u": 1.0,
169
- "ed": 0.4651,
170
- "class": 0.0,
171
- "tfidf": 0.0
172
- }
173
- }
174
- ],
175
- "coverage_gold": 0.8181818181818182,
176
- "branch_coverage_gold": 22.623,
177
- "method_coverage_gold": 24.812,
178
- "line_coverage_gold": 26.1834,
179
- "is_traceback": true,
180
- "commit_gap": {
181
- "count": 1,
182
- "skipped_commits": [
183
- "f5ae9a644755a77a98355e052f43030c5b732792"
184
- ]
185
- },
186
- "test_is_refactoring_only": false,
187
- "has_test_dep_change": false,
188
- "all_deps_new": [
189
- "oauth/signpost/AbstractOAuthProvider.retrieveRequestToken:(Ljava/lang/String;)Ljava/lang/String"
190
- ],
191
- "all_deps_old": [
192
- "oauth/signpost/basic/DefaultOAuthProvider.retrieveRequestToken:(Ljava/lang/String;)Ljava/lang/String"
193
- ],
194
- "deps_changes": [
195
- {
196
- "method_sign": "oauth/signpost/basic/DefaultOAuthProvider.retrieveRequestToken:(Ljava/lang/String;)Ljava/lang/String",
197
- "change_type": "DELETE",
198
- "file_path_old": "signpost-core/src/main/java/oauth/signpost/basic/DefaultOAuthProvider.java",
199
- "file_path_new": null,
200
- "source": "production",
201
- "is_test_dependency": false,
202
- "is_refactoring_only": false
203
- },
204
- {
205
- "method_sign": "oauth/signpost/AbstractOAuthProvider.retrieveRequestToken:(Ljava/lang/String;)Ljava/lang/String",
206
- "change_type": "ADD",
207
- "file_path_old": null,
208
- "file_path_new": "signpost-core/src/main/java/oauth/signpost/AbstractOAuthProvider.java",
209
- "source": "production",
210
- "is_test_dependency": false,
211
- "is_refactoring_only": false
212
- }
213
- ],
214
- "variant_result": {
215
- "old_on_old": "pass",
216
- "old_on_new": "error",
217
- "new_on_old": "pass",
218
- "new_on_new": "pass"
219
- }
220
- }
221
- ],
222
- "version": "oauth-signpost-2.1.1",
223
- "java_version": 8
224
- }
225
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
networknt_json-schema-validator-3.0.0.json DELETED
The diff for this file is too large to render. See raw diff
 
openjdk_jol-0.17.json DELETED
@@ -1,181 +0,0 @@
1
- [
2
- {
3
- "task_id": "openjdk_jol-0.17__09987e1_d5e6e63__LayouterInvariantsTest_fbfff32b",
4
- "project_name": "openjdk_jol-0.17",
5
- "git_clone_url": "https://github.com/openjdk/jol.git",
6
- "rev1": "09987e1c7892da1309dbe69038f5c8abecab2b16",
7
- "rev2": "d5e6e63da0fb2d8250302eac192f9f11af5f222e",
8
- "rev1_date": "2020-07-21T13:53:18Z",
9
- "rev2_date": "2020-07-21T14:26:37Z",
10
- "git_diff_url": "https://github.com/openjdk/jol/compare/09987e1c7892da1309dbe69038f5c8abecab2b16...d5e6e63da0fb2d8250302eac192f9f11af5f222e",
11
- "test_file": "jol-core/src/test/java/org/openjdk/jol/layouters/LayouterInvariantsTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "3_openjdk_jol-0.17_09987e1_d5e6e63_LayouterInvariantsTest",
15
- "test_sign": "org/openjdk/jol/layouters/LayouterInvariantsTest.testHotspot:()V",
16
- "class": "LayouterInvariantsTest",
17
- "method": "testHotspot",
18
- "module": "jol-core",
19
- "junit_selector": "org.openjdk.jol.layouters.LayouterInvariantsTest#testHotspot",
20
- "old_test_code": "@Test\npublic void testHotspot() throws Exception {\n Random seeder = new Random();\n for (int c = 0; c < ITERATIONS; c++) {\n int seed = seeder.nextInt();\n Class<?> cl = ClassGenerator.generate(new Random(seed), 5, 50);\n ClassData cd = ClassData.parseClass(cl);\n try {\n for (DataModel model : MODELS) {\n for (boolean hierarchyGaps : BOOLS) {\n for (boolean superClassGaps : BOOLS) {\n for (boolean autoAlign : BOOLS) {\n for (boolean compactFields : BOOLS) {\n for (int fieldAllocationStyle : new int[] { 0, 1, 2 }) {\n HotSpotLayouter layouter = new HotSpotLayouter(model, hierarchyGaps, superClassGaps, autoAlign, compactFields, fieldAllocationStyle);\n layouter.layout(cd);\n }\n }\n }\n }\n }\n }\n } catch (Exception e) {\n Assert.fail(\"Failed. Seed = \" + seed);\n }\n }\n}",
21
- "new_test_code": "@Test\npublic void testHotspot() throws Exception {\n Random seeder = new Random();\n for (int c = 0; c < ITERATIONS; c++) {\n int seed = seeder.nextInt();\n Class<?> cl = ClassGenerator.generate(new Random(seed), 5, 50);\n ClassData cd = ClassData.parseClass(cl);\n try {\n for (DataModel model : MODELS) {\n HotSpotLayouter layouter = new HotSpotLayouter(model);\n layouter.layout(cd);\n }\n } catch (Exception e) {\n Assert.fail(\"Failed. Seed = \" + seed);\n }\n }\n}",
22
- "old_test_file_path": [
23
- "jol-core/src/test/java/org/openjdk/jol/layouters/LayouterInvariantsTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "56-84"
27
- ],
28
- "new_test_lnum": [
29
- "56-72"
30
- ],
31
- "old_production_code": "@Override\npublic ClassLayout layout(ClassData cd) {\n SortedSet<FieldLayout> result = new TreeSet<>();\n if (cd.isArray()) {\n int base = model.arrayHeaderSize();\n int scale = model.sizeOf(cd.arrayComponentType());\n long instanceSize = base + cd.arrayLength() * scale;\n instanceSize = MathUtil.align(instanceSize, model.objectAlignment());\n base = MathUtil.align(base, Math.max(4, scale));\n result.add(new FieldLayout(FieldData.create(cd.arrayClass(), \"<elements>\", cd.arrayComponentType()), base, scale * cd.arrayLength()));\n return new ClassLayout(cd, result, model.arrayHeaderSize(), instanceSize, false);\n }\n List<ClassData> classDataClassHierarchy = new ArrayList<>();\n ClassData cld = cd;\n classDataClassHierarchy.add(cld);\n while ((cld = cld.superClass()) != null) {\n classDataClassHierarchy.add(0, cld);\n }\n int superClassLastOopOffset = 0;\n int superClassFieldsSize = 0;\n int nextPaddedOffset = 0;\n List<Integer> superGapsOffsets = new ArrayList<>();\n List<Integer> superGapsSizes = new ArrayList<>();\n for (ClassData clsData : classDataClassHierarchy) {\n EnumMap<FieldAllocationType, Integer> fieldsAllocationCount = new EnumMap<>(FieldAllocationType.class);\n EnumMap<FieldAllocationType, Integer> nextOffset = new EnumMap<>(FieldAllocationType.class);\n EnumMap<FieldAllocationType, ArrayDeque<Integer>> spaceOffset = new EnumMap<>(FieldAllocationType.class);\n EnumMap<FieldAllocationType, Integer> allocationTypeSizes = new EnumMap<>(FieldAllocationType.class);\n for (FieldAllocationType atype : FieldAllocationType.values()) {\n fieldsAllocationCount.put(atype, 0);\n nextOffset.put(atype, 0);\n spaceOffset.put(atype, new ArrayDeque<Integer>());\n }\n allocationTypeSizes.put(OOP, model.sizeOf(\"oop\"));\n allocationTypeSizes.put(BYTE, model.sizeOf(\"byte\"));\n allocationTypeSizes.put(SHORT, model.sizeOf(\"short\"));\n allocationTypeSizes.put(WORD, model.sizeOf(\"int\"));\n allocationTypeSizes.put(DOUBLE, model.sizeOf(\"long\"));\n for (FieldData f : clsData.ownFields()) {\n FieldAllocationType atype = FieldAllocationType.allocationTypeFor(f);\n Integer count = fieldsAllocationCount.get(atype);\n fieldsAllocationCount.put(atype, ++count);\n }\n int contendedCount = 0;\n EnumMap<FieldAllocationType, Integer> facContended = new EnumMap<>(FieldAllocationType.class);\n for (FieldData f : clsData.ownFields()) {\n FieldAllocationType atype = FieldAllocationType.allocationTypeFor(f);\n if (f.isContended()) {\n Integer count = facContended.get(atype);\n facContended.put(atype, count == null ? 1 : ++count);\n contendedCount++;\n }\n }\n int fieldsStart = (clsData.superClass() == null ? model.headerSize() : 0) + superClassFieldsSize;\n int nextFieldOffset = fieldsStart;\n boolean isContendedClass = clsData.isContended();\n if (isContendedClass) {\n nextFieldOffset += CONTENDED_PADDING_WIDTH;\n }\n int doubleCount = fieldsAllocationCount.get(DOUBLE) - (facContended.containsKey(DOUBLE) ? facContended.get(DOUBLE) : 0);\n int wordCount = fieldsAllocationCount.get(WORD) - (facContended.containsKey(WORD) ? facContended.get(WORD) : 0);\n int shortCount = fieldsAllocationCount.get(SHORT) - (facContended.containsKey(SHORT) ? facContended.get(SHORT) : 0);\n int byteCount = fieldsAllocationCount.get(BYTE) - (facContended.containsKey(BYTE) ? facContended.get(BYTE) : 0);\n int oopCount = fieldsAllocationCount.get(OOP) - (facContended.containsKey(OOP) ? facContended.get(OOP) : 0);\n int firstOopOffset = 0;\n boolean compactFields = this.compactFields;\n int allocationStyle = this.fieldAllocationStyle;\n if (allocationStyle < 0 || allocationStyle > 2) {\n allocationStyle = 1;\n }\n if ((allocationStyle != 0 || compactFields) && PREDEF_OFFSETS.contains(clsData.name())) {\n allocationStyle = 0;\n compactFields = false;\n }\n if (allocationStyle == 0) {\n nextOffset.put(OOP, nextFieldOffset);\n nextOffset.put(DOUBLE, nextOffset.get(OOP) + (oopCount * model.sizeOf(\"oop\")));\n } else if (allocationStyle == 1) {\n nextOffset.put(DOUBLE, nextFieldOffset);\n } else if (allocationStyle == 2) {\n if (superClassFieldsSize > 0) {\n if (clsData.superClass() != null && clsData.superClass().oopsCount() > 0) {\n if (superClassLastOopOffset + model.sizeOf(\"oop\") == nextFieldOffset) {\n allocationStyle = 0;\n nextOffset.put(OOP, nextFieldOffset);\n nextOffset.put(DOUBLE, nextOffset.get(OOP) + (oopCount * model.sizeOf(\"oop\")));\n }\n }\n }\n if (allocationStyle == 2) {\n allocationStyle = 1;\n nextOffset.put(DOUBLE, nextFieldOffset);\n }\n } else {\n throw new IllegalStateException();\n }\n if (takeHierarchyGaps || takeSuperGaps) {\n ListIterator<Integer> itSuperGapsOffsets = superGapsOffsets.listIterator();\n ListIterator<Integer> itSuperGapsSizes = superGapsSizes.listIterator();\n int currentGapIndex = 0;\n while (itSuperGapsOffsets.hasNext() && itSuperGapsSizes.hasNext()) {\n int offset = itSuperGapsOffsets.next();\n int length = itSuperGapsSizes.next();\n if (length >= allocationTypeSizes.get(WORD) && wordCount > 0) {\n int alignedWordOffset = MathUtil.align(offset, allocationTypeSizes.get(WORD));\n if (alignedWordOffset + allocationTypeSizes.get(WORD) <= offset + length) {\n wordCount -= 1;\n spaceOffset.get(WORD).push(alignedWordOffset);\n length -= allocationTypeSizes.get(WORD);\n if (length >= allocationTypeSizes.get(SHORT) && shortCount > 0) {\n int alignedShortOffset = MathUtil.align(offset, allocationTypeSizes.get(SHORT));\n if (alignedShortOffset + allocationTypeSizes.get(SHORT) <= alignedWordOffset) {\n shortCount -= 1;\n spaceOffset.get(SHORT).push(alignedShortOffset);\n length -= allocationTypeSizes.get(SHORT);\n if (length >= allocationTypeSizes.get(BYTE) && byteCount > 0) {\n byteCount -= 1;\n spaceOffset.get(BYTE).push(offset);\n length -= allocationTypeSizes.get(BYTE);\n }\n } else {\n throw new IllegalStateException();\n }\n }\n } else {\n throw new IllegalStateException();\n }\n } else {\n while (length >= allocationTypeSizes.get(SHORT) && shortCount > 0) {\n int alignedShortOffset = MathUtil.align(offset, allocationTypeSizes.get(SHORT));\n int shortAlignmentGapSize = alignedShortOffset - offset;\n int shortAlignmentGapOffset = offset;\n if (alignedShortOffset + allocationTypeSizes.get(SHORT) <= offset + length) {\n shortCount -= 1;\n spaceOffset.get(SHORT).push(alignedShortOffset);\n length -= allocationTypeSizes.get(SHORT);\n offset = alignedShortOffset + allocationTypeSizes.get(SHORT);\n if (shortAlignmentGapSize != 0) {\n if (byteCount > 0) {\n byteCount -= 1;\n spaceOffset.get(BYTE).push(shortAlignmentGapOffset);\n } else {\n itSuperGapsOffsets.previous();\n itSuperGapsSizes.previous();\n itSuperGapsOffsets.add(shortAlignmentGapOffset);\n itSuperGapsSizes.add(shortAlignmentGapSize);\n currentGapIndex++;\n itSuperGapsOffsets.next();\n itSuperGapsSizes.next();\n }\n length -= allocationTypeSizes.get(BYTE);\n }\n }\n }\n }\n while (length > 0 && byteCount > 0) {\n byteCount -= 1;\n spaceOffset.get(BYTE).push(offset);\n length -= allocationTypeSizes.get(BYTE);\n offset += allocationTypeSizes.get(BYTE);\n }\n if (length == 0) {\n itSuperGapsOffsets.remove();\n itSuperGapsSizes.remove();\n continue;\n } else {\n superGapsOffsets.set(currentGapIndex, offset);\n superGapsSizes.set(currentGapIndex, length);\n }\n currentGapIndex++;\n }\n }\n if (doubleCount > 0) {\n int offset = nextOffset.get(DOUBLE);\n nextOffset.put(DOUBLE, MathUtil.align(offset, allocationTypeSizes.get(DOUBLE)));\n if (offset != nextOffset.get(DOUBLE)) {\n int length = nextOffset.get(DOUBLE) - offset;\n if (compactFields) {\n if (wordCount > 0) {\n wordCount -= 1;\n spaceOffset.get(WORD).push(offset);\n length -= allocationTypeSizes.get(WORD);\n offset += allocationTypeSizes.get(WORD);\n }\n while (length >= allocationTypeSizes.get(SHORT) && shortCount > 0) {\n shortCount -= 1;\n spaceOffset.get(SHORT).push(offset);\n length -= allocationTypeSizes.get(SHORT);\n offset += allocationTypeSizes.get(SHORT);\n }\n while (length > 0 && byteCount > 0) {\n byteCount -= 1;\n spaceOffset.get(BYTE).push(offset);\n length -= allocationTypeSizes.get(BYTE);\n offset += allocationTypeSizes.get(BYTE);\n }\n if (length >= allocationTypeSizes.get(OOP) && oopCount > 0 && allocationStyle != 0) {\n oopCount -= 1;\n spaceOffset.get(OOP).push(offset);\n length -= allocationTypeSizes.get(OOP);\n offset += allocationTypeSizes.get(OOP);\n }\n }\n if (takeSuperGaps && length > 0) {\n superGapsOffsets.add(offset);\n superGapsSizes.add(length);\n }\n }\n }\n nextOffset.put(WORD, nextOffset.get(DOUBLE) + (doubleCount * allocationTypeSizes.get(DOUBLE)));\n nextOffset.put(SHORT, nextOffset.get(WORD) + (wordCount * allocationTypeSizes.get(WORD)));\n nextOffset.put(BYTE, nextOffset.get(SHORT) + (shortCount * allocationTypeSizes.get(SHORT)));\n nextPaddedOffset = nextOffset.get(BYTE) + byteCount;\n if (allocationStyle == 1) {\n nextOffset.put(OOP, nextPaddedOffset);\n if (oopCount > 0) {\n nextOffset.put(OOP, MathUtil.align(nextOffset.get(OOP), allocationTypeSizes.get(OOP)));\n }\n nextPaddedOffset = nextOffset.get(OOP) + (oopCount * allocationTypeSizes.get(OOP));\n }\n Set<FieldData> layoutedFields = new HashSet<>();\n for (FieldData f : clsData.ownFields()) {\n if (layoutedFields.contains(f))\n continue;\n if (f.isContended())\n continue;\n FieldAllocationType atype = FieldAllocationType.allocationTypeFor(f);\n int allocationTypeSize = allocationTypeSizes.get(atype);\n Integer allocationTypeSpaceOffset = spaceOffset.get(atype).poll();\n int realOffset;\n if (atype == DOUBLE) {\n int nextDoubleOffset = nextOffset.get(DOUBLE);\n realOffset = nextOffset.get(DOUBLE);\n nextOffset.put(atype, nextDoubleOffset + allocationTypeSize);\n } else {\n if (allocationTypeSpaceOffset != null) {\n realOffset = allocationTypeSpaceOffset;\n } else {\n int allocationTypeNextOffset = nextOffset.get(atype);\n realOffset = allocationTypeNextOffset;\n nextOffset.put(atype, allocationTypeNextOffset + allocationTypeSize);\n }\n }\n layoutedFields.add(f);\n result.add(new FieldLayout(f, realOffset, model.sizeOf(f.typeClass())));\n if (atype == OOP) {\n superClassLastOopOffset = realOffset;\n }\n }\n if (contendedCount > 0) {\n nextPaddedOffset += CONTENDED_PADDING_WIDTH;\n HashSet<String> contendedGroups = new HashSet<>();\n for (FieldData f : clsData.ownFields()) {\n if (f.isContended()) {\n contendedGroups.add(f.contendedGroup());\n }\n }\n for (String currentGroup : contendedGroups) {\n for (FieldData f : clsData.ownFields()) {\n if (layoutedFields.contains(f))\n continue;\n if (!f.isContended() || !f.contendedGroup().equals(currentGroup))\n continue;\n FieldAllocationType atype = FieldAllocationType.allocationTypeFor(f);\n int allocationTypeSize = allocationTypeSizes.get(atype);\n nextPaddedOffset = MathUtil.align(nextPaddedOffset, allocationTypeSize);\n int realOffset = nextPaddedOffset;\n nextPaddedOffset += allocationTypeSize;\n if (atype == OOP && firstOopOffset == 0) {\n firstOopOffset = realOffset;\n }\n if (f.contendedGroup().equals(\"\")) {\n nextPaddedOffset += CONTENDED_PADDING_WIDTH;\n }\n result.add(new FieldLayout(f, realOffset, model.sizeOf(f.typeClass())));\n }\n if (!currentGroup.equals(\"\")) {\n nextPaddedOffset += CONTENDED_PADDING_WIDTH;\n }\n }\n }\n if (isContendedClass) {\n nextPaddedOffset += CONTENDED_PADDING_WIDTH;\n }\n superClassFieldsSize = MathUtil.align(nextPaddedOffset, model.sizeOf(\"oop\"));\n if ((takeHierarchyGaps || takeSuperGaps) && superClassFieldsSize != nextPaddedOffset) {\n superGapsOffsets.add(nextPaddedOffset);\n superGapsSizes.add(superClassFieldsSize - nextPaddedOffset);\n }\n }\n int minAlignment = autoAlign ? 4 : model.objectAlignment();\n for (String k : cd.classHierarchy()) {\n Collection<FieldData> fields = cd.fieldsFor(k);\n for (FieldData f : fields) {\n minAlignment = Math.max(minAlignment, model.sizeOf(f.typeClass()));\n }\n }\n int instanceSize = MathUtil.align(nextPaddedOffset, minAlignment);\n return new ClassLayout(cd, result, model.headerSize(), instanceSize, true);\n}",
32
- "new_production_code": "@Override\npublic ClassLayout layout(ClassData cd) {\n SortedSet<FieldLayout> result = new TreeSet<>();\n if (cd.isArray()) {\n int base = model.arrayHeaderSize();\n int scale = model.sizeOf(cd.arrayComponentType());\n long instanceSize = base + cd.arrayLength() * scale;\n instanceSize = MathUtil.align(instanceSize, model.objectAlignment());\n base = MathUtil.align(base, Math.max(4, scale));\n result.add(new FieldLayout(FieldData.create(cd.arrayClass(), \"<elements>\", cd.arrayComponentType()), base, scale * cd.arrayLength()));\n return new ClassLayout(cd, result, model.arrayHeaderSize(), instanceSize, false);\n }\n List<ClassData> classDataClassHierarchy = new ArrayList<>();\n ClassData cld = cd;\n classDataClassHierarchy.add(cld);\n while ((cld = cld.superClass()) != null) {\n classDataClassHierarchy.add(0, cld);\n }\n int superClassFieldsSize = 0;\n int nextPaddedOffset = 0;\n for (ClassData clsData : classDataClassHierarchy) {\n EnumMap<FieldAllocationType, Integer> fieldsAllocationCount = new EnumMap<>(FieldAllocationType.class);\n EnumMap<FieldAllocationType, Integer> nextOffset = new EnumMap<>(FieldAllocationType.class);\n EnumMap<FieldAllocationType, ArrayDeque<Integer>> spaceOffset = new EnumMap<>(FieldAllocationType.class);\n EnumMap<FieldAllocationType, Integer> allocationTypeSizes = new EnumMap<>(FieldAllocationType.class);\n for (FieldAllocationType atype : FieldAllocationType.values()) {\n fieldsAllocationCount.put(atype, 0);\n nextOffset.put(atype, 0);\n spaceOffset.put(atype, new ArrayDeque<Integer>());\n }\n allocationTypeSizes.put(OOP, model.sizeOf(\"oop\"));\n allocationTypeSizes.put(BYTE, model.sizeOf(\"byte\"));\n allocationTypeSizes.put(SHORT, model.sizeOf(\"short\"));\n allocationTypeSizes.put(WORD, model.sizeOf(\"int\"));\n allocationTypeSizes.put(DOUBLE, model.sizeOf(\"long\"));\n for (FieldData f : clsData.ownFields()) {\n FieldAllocationType atype = FieldAllocationType.allocationTypeFor(f);\n Integer count = fieldsAllocationCount.get(atype);\n fieldsAllocationCount.put(atype, ++count);\n }\n int contendedCount = 0;\n EnumMap<FieldAllocationType, Integer> facContended = new EnumMap<>(FieldAllocationType.class);\n for (FieldData f : clsData.ownFields()) {\n FieldAllocationType atype = FieldAllocationType.allocationTypeFor(f);\n if (f.isContended()) {\n Integer count = facContended.get(atype);\n facContended.put(atype, count == null ? 1 : ++count);\n contendedCount++;\n }\n }\n int nextFieldOffset = (clsData.superClass() == null ? model.headerSize() : 0) + superClassFieldsSize;\n boolean isContendedClass = clsData.isContended();\n if (isContendedClass) {\n nextFieldOffset += CONTENDED_PADDING_WIDTH;\n }\n int doubleCount = fieldsAllocationCount.get(DOUBLE) - (facContended.containsKey(DOUBLE) ? facContended.get(DOUBLE) : 0);\n int wordCount = fieldsAllocationCount.get(WORD) - (facContended.containsKey(WORD) ? facContended.get(WORD) : 0);\n int shortCount = fieldsAllocationCount.get(SHORT) - (facContended.containsKey(SHORT) ? facContended.get(SHORT) : 0);\n int byteCount = fieldsAllocationCount.get(BYTE) - (facContended.containsKey(BYTE) ? facContended.get(BYTE) : 0);\n int oopCount = fieldsAllocationCount.get(OOP) - (facContended.containsKey(OOP) ? facContended.get(OOP) : 0);\n int firstOopOffset = 0;\n boolean compactFields = true;\n int allocationStyle = 1;\n if (PREDEF_OFFSETS.contains(clsData.name())) {\n allocationStyle = 0;\n compactFields = false;\n }\n if (allocationStyle == 0) {\n nextOffset.put(OOP, nextFieldOffset);\n nextOffset.put(DOUBLE, nextOffset.get(OOP) + (oopCount * model.sizeOf(\"oop\")));\n } else {\n nextOffset.put(DOUBLE, nextFieldOffset);\n }\n if (doubleCount > 0) {\n int offset = nextOffset.get(DOUBLE);\n nextOffset.put(DOUBLE, MathUtil.align(offset, allocationTypeSizes.get(DOUBLE)));\n if (offset != nextOffset.get(DOUBLE)) {\n int length = nextOffset.get(DOUBLE) - offset;\n if (compactFields) {\n if (wordCount > 0) {\n wordCount -= 1;\n spaceOffset.get(WORD).push(offset);\n length -= allocationTypeSizes.get(WORD);\n offset += allocationTypeSizes.get(WORD);\n }\n while (length >= allocationTypeSizes.get(SHORT) && shortCount > 0) {\n shortCount -= 1;\n spaceOffset.get(SHORT).push(offset);\n length -= allocationTypeSizes.get(SHORT);\n offset += allocationTypeSizes.get(SHORT);\n }\n while (length > 0 && byteCount > 0) {\n byteCount -= 1;\n spaceOffset.get(BYTE).push(offset);\n length -= allocationTypeSizes.get(BYTE);\n offset += allocationTypeSizes.get(BYTE);\n }\n if (length >= allocationTypeSizes.get(OOP) && oopCount > 0) {\n oopCount -= 1;\n spaceOffset.get(OOP).push(offset);\n }\n }\n }\n }\n nextOffset.put(WORD, nextOffset.get(DOUBLE) + (doubleCount * allocationTypeSizes.get(DOUBLE)));\n nextOffset.put(SHORT, nextOffset.get(WORD) + (wordCount * allocationTypeSizes.get(WORD)));\n nextOffset.put(BYTE, nextOffset.get(SHORT) + (shortCount * allocationTypeSizes.get(SHORT)));\n nextPaddedOffset = nextOffset.get(BYTE) + byteCount;\n if (allocationStyle == 1) {\n nextOffset.put(OOP, nextPaddedOffset);\n if (oopCount > 0) {\n nextOffset.put(OOP, MathUtil.align(nextOffset.get(OOP), allocationTypeSizes.get(OOP)));\n }\n nextPaddedOffset = nextOffset.get(OOP) + (oopCount * allocationTypeSizes.get(OOP));\n }\n Set<FieldData> layoutedFields = new HashSet<>();\n for (FieldData f : clsData.ownFields()) {\n if (layoutedFields.contains(f))\n continue;\n if (f.isContended())\n continue;\n FieldAllocationType atype = FieldAllocationType.allocationTypeFor(f);\n int allocationTypeSize = allocationTypeSizes.get(atype);\n Integer allocationTypeSpaceOffset = spaceOffset.get(atype).poll();\n int realOffset;\n if (atype == DOUBLE) {\n int nextDoubleOffset = nextOffset.get(DOUBLE);\n realOffset = nextOffset.get(DOUBLE);\n nextOffset.put(atype, nextDoubleOffset + allocationTypeSize);\n } else {\n if (allocationTypeSpaceOffset != null) {\n realOffset = allocationTypeSpaceOffset;\n } else {\n int allocationTypeNextOffset = nextOffset.get(atype);\n realOffset = allocationTypeNextOffset;\n nextOffset.put(atype, allocationTypeNextOffset + allocationTypeSize);\n }\n }\n layoutedFields.add(f);\n result.add(new FieldLayout(f, realOffset, model.sizeOf(f.typeClass())));\n }\n if (contendedCount > 0) {\n nextPaddedOffset += CONTENDED_PADDING_WIDTH;\n HashSet<String> contendedGroups = new HashSet<>();\n for (FieldData f : clsData.ownFields()) {\n if (f.isContended()) {\n contendedGroups.add(f.contendedGroup());\n }\n }\n for (String currentGroup : contendedGroups) {\n for (FieldData f : clsData.ownFields()) {\n if (layoutedFields.contains(f))\n continue;\n if (!f.isContended() || !f.contendedGroup().equals(currentGroup))\n continue;\n FieldAllocationType atype = FieldAllocationType.allocationTypeFor(f);\n int allocationTypeSize = allocationTypeSizes.get(atype);\n nextPaddedOffset = MathUtil.align(nextPaddedOffset, allocationTypeSize);\n int realOffset = nextPaddedOffset;\n nextPaddedOffset += allocationTypeSize;\n if (atype == OOP && firstOopOffset == 0) {\n firstOopOffset = realOffset;\n }\n if (f.contendedGroup().equals(\"\")) {\n nextPaddedOffset += CONTENDED_PADDING_WIDTH;\n }\n result.add(new FieldLayout(f, realOffset, model.sizeOf(f.typeClass())));\n }\n if (!currentGroup.equals(\"\")) {\n nextPaddedOffset += CONTENDED_PADDING_WIDTH;\n }\n }\n }\n if (isContendedClass) {\n nextPaddedOffset += CONTENDED_PADDING_WIDTH;\n }\n superClassFieldsSize = MathUtil.align(nextPaddedOffset, model.sizeOf(\"oop\"));\n }\n int minAlignment = model.objectAlignment();\n for (String k : cd.classHierarchy()) {\n Collection<FieldData> fields = cd.fieldsFor(k);\n for (FieldData f : fields) {\n minAlignment = Math.max(minAlignment, model.sizeOf(f.typeClass()));\n }\n }\n int instanceSize = MathUtil.align(nextPaddedOffset, minAlignment);\n return new ClassLayout(cd, result, model.headerSize(), instanceSize, true);\n}",
33
- "focal_file_path": "jol-core/src/main/java/org/openjdk/jol/layouters/HotSpotLayouter.java",
34
- "focal_method_sign": "org/openjdk/jol/layouters/HotSpotLayouter.layout:(Lorg/openjdk/jol/info/ClassData;)Lorg/openjdk/jol/info/ClassLayout",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "org/openjdk/jol/layouters/HotSpotLayouter.layout:(Lorg/openjdk/jol/info/ClassData;)Lorg/openjdk/jol/info/ClassLayout",
39
- "file_path_old": "jol-core/src/main/java/org/openjdk/jol/layouters/HotSpotLayouter.java",
40
- "line_nums_old": "90-510",
41
- "file_path_new": "jol-core/src/main/java/org/openjdk/jol/layouters/HotSpotLayouter.java",
42
- "line_nums_new": "74-353",
43
- "dependency_updated": "updated",
44
- "score": null,
45
- "signal_scores": {}
46
- }
47
- ],
48
- "coverage_gold": 0.7419354838709677,
49
- "branch_coverage_gold": 22.8235,
50
- "method_coverage_gold": 29.5732,
51
- "line_coverage_gold": 24.3229,
52
- "is_traceback": false,
53
- "commit_gap": {
54
- "count": 0,
55
- "skipped_commits": []
56
- },
57
- "test_is_refactoring_only": false,
58
- "has_test_dep_change": false,
59
- "all_deps_new": [
60
- "org/openjdk/jol/layouters/HotSpotLayouter.layout:(Lorg/openjdk/jol/info/ClassData;)Lorg/openjdk/jol/info/ClassLayout",
61
- "org/openjdk/jol/info/ClassData.parseClass:(Ljava/lang/Class;)Lorg/openjdk/jol/info/ClassData",
62
- "org/openjdk/jol/util/ClassGenerator.generate:(Ljava/util/Random;II)Ljava/lang/Class"
63
- ],
64
- "all_deps_old": [
65
- "org/openjdk/jol/info/ClassData.parseClass:(Ljava/lang/Class;)Lorg/openjdk/jol/info/ClassData",
66
- "org/openjdk/jol/layouters/HotSpotLayouter.layout:(Lorg/openjdk/jol/info/ClassData;)Lorg/openjdk/jol/info/ClassLayout",
67
- "org/openjdk/jol/util/ClassGenerator.generate:(Ljava/util/Random;II)Ljava/lang/Class"
68
- ],
69
- "deps_changes": [
70
- {
71
- "method_sign": "org/openjdk/jol/layouters/HotSpotLayouter.layout:(Lorg/openjdk/jol/info/ClassData;)Lorg/openjdk/jol/info/ClassLayout",
72
- "change_type": "UPDATE",
73
- "file_path_old": "jol-core/src/main/java/org/openjdk/jol/layouters/HotSpotLayouter.java",
74
- "file_path_new": "jol-core/src/main/java/org/openjdk/jol/layouters/HotSpotLayouter.java",
75
- "source": "production",
76
- "is_test_dependency": false,
77
- "is_refactoring_only": false
78
- }
79
- ],
80
- "variant_result": {
81
- "old_on_old": "pass",
82
- "old_on_new": "error",
83
- "new_on_old": "pass",
84
- "new_on_new": "pass"
85
- }
86
- }
87
- ],
88
- "version": "0.17",
89
- "java_version": 11
90
- },
91
- {
92
- "task_id": "openjdk_jol-0.17__2c9ae4d_e63ebb5__ClassLayoutInstanceTest_8804b54a",
93
- "project_name": "openjdk_jol-0.17",
94
- "git_clone_url": "https://github.com/openjdk/jol.git",
95
- "rev1": "2c9ae4de14909be502eb5325ff8bede12aab1394",
96
- "rev2": "e63ebb5b00429c772c3f00b46c4cca696deea240",
97
- "rev1_date": "2016-04-13T13:13:50Z",
98
- "rev2_date": "2016-04-13T18:46:35Z",
99
- "git_diff_url": "https://github.com/openjdk/jol/compare/2c9ae4de14909be502eb5325ff8bede12aab1394...e63ebb5b00429c772c3f00b46c4cca696deea240",
100
- "test_file": "jol-core/src/test/java/ClassLayoutInstanceTest.java",
101
- "test_changes": [
102
- {
103
- "change_id": "8_openjdk_jol-0.17_2c9ae4d_e63ebb5_ClassLayoutInstanceTest",
104
- "test_sign": "ClassLayoutInstanceTest.testPrint:()V",
105
- "class": "ClassLayoutInstanceTest",
106
- "method": "testPrint",
107
- "module": "jol-core",
108
- "junit_selector": "ClassLayoutInstanceTest#testPrint",
109
- "old_test_code": "@Test\npublic void testPrint() {\n ClassLayout.parseInstance(new A()).toPrintable();\n ClassLayout.parseInstance(new B()).toPrintable();\n ClassLayout.parseInstance(A.class).toPrintable();\n ClassLayout.parseInstance(B.class).toPrintable();\n ClassLayout.parseInstance(A.class).toPrintable(new A());\n ClassLayout.parseInstance(B.class).toPrintable(new B());\n}",
110
- "new_test_code": "@Test\npublic void testPrint() {\n ClassLayout.parseInstance(new A()).toPrintable();\n ClassLayout.parseInstance(new B()).toPrintable();\n ClassLayout.parseClass(A.class).toPrintable();\n ClassLayout.parseClass(B.class).toPrintable();\n ClassLayout.parseClass(A.class).toPrintable(new A());\n ClassLayout.parseClass(B.class).toPrintable(new B());\n}",
111
- "old_test_file_path": [
112
- "jol-core/src/test/java/ClassLayoutInstanceTest.java"
113
- ],
114
- "old_test_lnum": [
115
- "18-28"
116
- ],
117
- "new_test_lnum": [
118
- "22-32"
119
- ],
120
- "old_production_code": "public String toPrintable(Object instance) {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n int maxTypeLen = 5;\n for (FieldLayout f : fields()) {\n maxTypeLen = Math.max(f.typeClass().length(), maxTypeLen);\n }\n int maxDescrLen = 30;\n for (FieldLayout f : fields()) {\n maxDescrLen = Math.max((f.hostClass() + \"\" + f.name()).length(), maxDescrLen);\n }\n pw.println(classData.name() + \" object internals:\");\n pw.printf(\" %6s %5s %\" + maxTypeLen + \"s %-\" + maxDescrLen + \"s %s%n\", \"OFFSET\", \"SIZE\", \"TYPE\", \"DESCRIPTION\", \"VALUE\");\n if (instance != null) {\n VirtualMachine vm = VM.current();\n for (long off = 0; off < headerSize(); off += 4) {\n int word = vm.getInt(instance, off);\n pw.printf(\" %6d %5d %\" + maxTypeLen + \"s %-\" + maxDescrLen + \"s %s%n\", off, 4, \"\", \"(object header)\", toHex((word >> 0) & 0xFF) + \" \" + toHex((word >> 8) & 0xFF) + \" \" + toHex((word >> 16) & 0xFF) + \" \" + toHex((word >> 24) & 0xFF) + \" \" + \"(\" + toBinary((word >> 0) & 0xFF) + \" \" + toBinary((word >> 8) & 0xFF) + \" \" + toBinary((word >> 16) & 0xFF) + \" \" + toBinary((word >> 24) & 0xFF) + \") \" + \"(\" + word + \")\");\n }\n } else {\n pw.printf(\" %6d %5d %\" + maxTypeLen + \"s %-\" + maxDescrLen + \"s %s%n\", 0, headerSize(), \"\", \"(object header)\", \"N/A\");\n }\n long nextFree = headerSize();\n long interLoss = 0;\n long exterLoss = 0;\n for (FieldLayout f : fields()) {\n if (f.offset() > nextFree) {\n pw.printf(\" %6d %5d %\" + maxTypeLen + \"s %-\" + maxDescrLen + \"s %s%n\", nextFree, (f.offset() - nextFree), \"\", \"(alignment/padding gap)\", \"N/A\");\n interLoss += (f.offset() - nextFree);\n }\n pw.printf(\" %6d %5d %\" + maxTypeLen + \"s %-\" + maxDescrLen + \"s %s%n\", f.offset(), f.size(), f.typeClass(), f.hostClass() + \".\" + f.name(), (instance != null) ? f.safeValue(instance) : \"N/A\");\n nextFree = f.offset() + f.size();\n }\n long sizeOf = VM.current().sizeOf(instance);\n if (sizeOf != nextFree) {\n exterLoss = sizeOf - nextFree;\n pw.printf(\" %6d %5s %\" + maxTypeLen + \"s %s%n\", nextFree, exterLoss, \"\", \"(loss due to the next object alignment)\");\n }\n pw.printf(\"Instance size: %d bytes%n\", sizeOf);\n pw.printf(\"Space losses: %d bytes internal + %d bytes external = %d bytes total%n\", interLoss, exterLoss, interLoss + exterLoss);\n pw.close();\n return sw.toString();\n}",
121
- "new_production_code": "public String toPrintable(Object instance) {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n int maxTypeLen = 5;\n for (FieldLayout f : fields()) {\n maxTypeLen = Math.max(f.typeClass().length(), maxTypeLen);\n }\n int maxDescrLen = 30;\n for (FieldLayout f : fields()) {\n maxDescrLen = Math.max((f.hostClass() + \"\" + f.name()).length(), maxDescrLen);\n }\n if (instance != null) {\n try {\n Class<?> klass = Class.forName(classData.name());\n if (!klass.isAssignableFrom(instance.getClass())) {\n throw new IllegalArgumentException(\"Passed instance type \" + instance.getClass() + \" is not assignable from \" + klass + \".\");\n }\n } catch (ClassNotFoundException e) {\n throw new IllegalArgumentException(\"Class is not found: \" + classData.name() + \".\");\n }\n }\n pw.println(classData.name() + \" object internals:\");\n pw.printf(\" %6s %5s %\" + maxTypeLen + \"s %-\" + maxDescrLen + \"s %s%n\", \"OFFSET\", \"SIZE\", \"TYPE\", \"DESCRIPTION\", \"VALUE\");\n if (instance != null) {\n VirtualMachine vm = VM.current();\n for (long off = 0; off < headerSize(); off += 4) {\n int word = vm.getInt(instance, off);\n pw.printf(\" %6d %5d %\" + maxTypeLen + \"s %-\" + maxDescrLen + \"s %s%n\", off, 4, \"\", \"(object header)\", toHex((word >> 0) & 0xFF) + \" \" + toHex((word >> 8) & 0xFF) + \" \" + toHex((word >> 16) & 0xFF) + \" \" + toHex((word >> 24) & 0xFF) + \" \" + \"(\" + toBinary((word >> 0) & 0xFF) + \" \" + toBinary((word >> 8) & 0xFF) + \" \" + toBinary((word >> 16) & 0xFF) + \" \" + toBinary((word >> 24) & 0xFF) + \") \" + \"(\" + word + \")\");\n }\n } else {\n pw.printf(\" %6d %5d %\" + maxTypeLen + \"s %-\" + maxDescrLen + \"s %s%n\", 0, headerSize(), \"\", \"(object header)\", \"N/A\");\n }\n long nextFree = headerSize();\n long interLoss = 0;\n long exterLoss = 0;\n for (FieldLayout f : fields()) {\n if (f.offset() > nextFree) {\n pw.printf(\" %6d %5d %\" + maxTypeLen + \"s %-\" + maxDescrLen + \"s %s%n\", nextFree, (f.offset() - nextFree), \"\", \"(alignment/padding gap)\", \"N/A\");\n interLoss += (f.offset() - nextFree);\n }\n pw.printf(\" %6d %5d %\" + maxTypeLen + \"s %-\" + maxDescrLen + \"s %s%n\", f.offset(), f.size(), f.typeClass(), f.hostClass() + \".\" + f.name(), (instance != null) ? f.safeValue(instance) : \"N/A\");\n nextFree = f.offset() + f.size();\n }\n long sizeOf = (instance != null) ? VM.current().sizeOf(instance) : instanceSize();\n ;\n if (sizeOf != nextFree) {\n exterLoss = sizeOf - nextFree;\n pw.printf(\" %6d %5s %\" + maxTypeLen + \"s %s%n\", nextFree, exterLoss, \"\", \"(loss due to the next object alignment)\");\n }\n pw.printf(\"Instance size: %d bytes%n\", sizeOf);\n pw.printf(\"Space losses: %d bytes internal + %d bytes external = %d bytes total%n\", interLoss, exterLoss, interLoss + exterLoss);\n pw.close();\n return sw.toString();\n}",
122
- "focal_file_path": "jol-core/src/main/java/org/openjdk/jol/info/ClassLayout.java",
123
- "focal_method_sign": "org/openjdk/jol/info/ClassLayout.toPrintable:(Ljava/lang/Object;)Ljava/lang/String",
124
- "focal_all_deps_scored": [
125
- {
126
- "dep_id": 0,
127
- "method_sign": "org/openjdk/jol/info/ClassLayout.toPrintable:(Ljava/lang/Object;)Ljava/lang/String",
128
- "file_path_old": "jol-core/src/main/java/org/openjdk/jol/info/ClassLayout.java",
129
- "line_nums_old": "195-267",
130
- "file_path_new": "jol-core/src/main/java/org/openjdk/jol/info/ClassLayout.java",
131
- "line_nums_new": "195-278",
132
- "dependency_updated": "updated",
133
- "score": null,
134
- "signal_scores": {}
135
- }
136
- ],
137
- "coverage_gold": 0.9166666666666666,
138
- "branch_coverage_gold": 13.7615,
139
- "method_coverage_gold": 27.758,
140
- "line_coverage_gold": 20.3314,
141
- "is_traceback": false,
142
- "commit_gap": {
143
- "count": 0,
144
- "skipped_commits": []
145
- },
146
- "test_is_refactoring_only": false,
147
- "has_test_dep_change": false,
148
- "all_deps_new": [
149
- "org/openjdk/jol/info/ClassLayout.toPrintable:(Ljava/lang/Object;)Ljava/lang/String",
150
- "org/openjdk/jol/info/ClassLayout.parseClass:(Ljava/lang/Class;)Lorg/openjdk/jol/info/ClassLayout",
151
- "org/openjdk/jol/info/ClassLayout.toPrintable:()Ljava/lang/String",
152
- "org/openjdk/jol/info/ClassLayout.parseInstance:(Ljava/lang/Object;)Lorg/openjdk/jol/info/ClassLayout"
153
- ],
154
- "all_deps_old": [
155
- "org/openjdk/jol/info/ClassLayout.parseInstance:(Ljava/lang/Object;)Lorg/openjdk/jol/info/ClassLayout",
156
- "org/openjdk/jol/info/ClassLayout.toPrintable:(Ljava/lang/Object;)Ljava/lang/String",
157
- "org/openjdk/jol/info/ClassLayout.toPrintable:()Ljava/lang/String"
158
- ],
159
- "deps_changes": [
160
- {
161
- "method_sign": "org/openjdk/jol/info/ClassLayout.toPrintable:(Ljava/lang/Object;)Ljava/lang/String",
162
- "change_type": "UPDATE",
163
- "file_path_old": "jol-core/src/main/java/org/openjdk/jol/info/ClassLayout.java",
164
- "file_path_new": "jol-core/src/main/java/org/openjdk/jol/info/ClassLayout.java",
165
- "source": "production",
166
- "is_test_dependency": false,
167
- "is_refactoring_only": false
168
- }
169
- ],
170
- "variant_result": {
171
- "old_on_old": "pass",
172
- "old_on_new": "fail",
173
- "new_on_old": "fail",
174
- "new_on_new": "pass"
175
- }
176
- }
177
- ],
178
- "version": "0.17",
179
- "java_version": 11
180
- }
181
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pagehelper_Mybatis-PageHelper-v6.1.1.json DELETED
@@ -1,496 +0,0 @@
1
- [
2
- {
3
- "task_id": "pagehelper_Mybatis-PageHelper-v6.1.1__2328682_3e5bdcc__PageSizeLessThenOrEqualZeroTest_cb750440",
4
- "project_name": "pagehelper_Mybatis-PageHelper-v6.1.1",
5
- "git_clone_url": "https://github.com/pagehelper/Mybatis-PageHelper.git",
6
- "rev1": "23286824152c686b80a0dd8c364d632e58eb55bc",
7
- "rev2": "3e5bdcc68bbd6d8b6285054d1352f06c062b54ba",
8
- "rev1_date": "2020-07-21T13:45:38Z",
9
- "rev2_date": "2020-07-21T14:43:43Z",
10
- "git_diff_url": "https://github.com/pagehelper/Mybatis-PageHelper/compare/23286824152c686b80a0dd8c364d632e58eb55bc...3e5bdcc68bbd6d8b6285054d1352f06c062b54ba",
11
- "test_file": "src/test/java/com/github/pagehelper/test/pagesize/PageSizeLessThenOrEqualZeroTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "119_pagehelper_Mybatis-PageHelper-v6.1.1_2328682_3e5bdcc_PageSizeLessThenOrEqualZeroTest",
15
- "test_sign": "com/github/pagehelper/test/pagesize/PageSizeLessThenOrEqualZeroTest.testWithStartPage:()V",
16
- "class": "PageSizeLessThenOrEqualZeroTest",
17
- "method": "testWithStartPage",
18
- "module": "",
19
- "junit_selector": "com.github.pagehelper.test.pagesize.PageSizeLessThenOrEqualZeroTest#testWithStartPage",
20
- "old_test_code": "@Test\npublic void testWithStartPage() {\n SqlSession sqlSession = MybatisHelper.getSqlSession();\n UserMapper userMapper = sqlSession.getMapper(UserMapper.class);\n try {\n PageHelper.startPage(1, 0);\n List<User> list = userMapper.selectAll();\n PageInfo<User> page = new PageInfo<User>(list);\n assertEquals(183, list.size());\n assertEquals(183, page.getTotal());\n PageHelper.startPage(1, -100);\n list = userMapper.selectAll();\n page = new PageInfo<User>(list);\n assertEquals(0, list.size());\n assertEquals(183, page.getTotal());\n } finally {\n sqlSession.close();\n }\n}",
21
- "new_test_code": "@Test\npublic void testWithStartPage() {\n SqlSession sqlSession = MybatisHelper.getSqlSession();\n UserMapper userMapper = sqlSession.getMapper(UserMapper.class);\n try {\n PageHelper.startPage(1, 0);\n List<User> list = userMapper.selectAll();\n PageInfo<User> page = new PageInfo<User>(list);\n assertEquals(0, list.size());\n assertEquals(183, page.getTotal());\n PageHelper.startPage(1, -100);\n list = userMapper.selectAll();\n page = new PageInfo<User>(list);\n assertEquals(0, list.size());\n assertEquals(183, page.getTotal());\n } finally {\n sqlSession.close();\n }\n}",
22
- "old_test_file_path": [
23
- "src/test/java/com/github/pagehelper/test/pagesize/PageSizeLessThenOrEqualZeroTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "45-66"
27
- ],
28
- "new_test_lnum": [
29
- "45-66"
30
- ],
31
- "old_production_code": "@Override\npublic Object intercept(Invocation invocation) throws Throwable {\n try {\n Object[] args = invocation.getArgs();\n MappedStatement ms = (MappedStatement) args[0];\n Object parameter = args[1];\n RowBounds rowBounds = (RowBounds) args[2];\n ResultHandler resultHandler = (ResultHandler) args[3];\n Executor executor = (Executor) invocation.getTarget();\n CacheKey cacheKey;\n BoundSql boundSql;\n if (args.length == 4) {\n boundSql = ms.getBoundSql(parameter);\n cacheKey = executor.createCacheKey(ms, parameter, rowBounds, boundSql);\n } else {\n cacheKey = (CacheKey) args[4];\n boundSql = (BoundSql) args[5];\n }\n checkDialectExists();\n List resultList;\n if (!dialect.skip(ms, parameter, rowBounds)) {\n if (dialect.beforeCount(ms, parameter, rowBounds)) {\n Long count = count(executor, ms, parameter, rowBounds, resultHandler, boundSql);\n if (!dialect.afterCount(count, parameter, rowBounds)) {\n return dialect.afterPage(new ArrayList(), parameter, rowBounds);\n }\n }\n resultList = ExecutorUtil.pageQuery(dialect, executor, ms, parameter, rowBounds, resultHandler, boundSql, cacheKey);\n } else {\n resultList = executor.query(ms, parameter, rowBounds, resultHandler, cacheKey, boundSql);\n }\n return dialect.afterPage(resultList, parameter, rowBounds);\n } finally {\n if (dialect != null) {\n dialect.afterAll();\n }\n }\n}",
32
- "new_production_code": "@Override\npublic Object intercept(Invocation invocation) throws Throwable {\n try {\n Object[] args = invocation.getArgs();\n MappedStatement ms = (MappedStatement) args[0];\n Object parameter = args[1];\n RowBounds rowBounds = (RowBounds) args[2];\n ResultHandler resultHandler = (ResultHandler) args[3];\n Executor executor = (Executor) invocation.getTarget();\n CacheKey cacheKey;\n BoundSql boundSql;\n if (args.length == 4) {\n boundSql = ms.getBoundSql(parameter);\n cacheKey = executor.createCacheKey(ms, parameter, rowBounds, boundSql);\n } else {\n cacheKey = (CacheKey) args[4];\n boundSql = (BoundSql) args[5];\n }\n checkDialectExists();\n List resultList;\n if (!dialect.skip(ms, parameter, rowBounds)) {\n if (dialect.beforeCount(ms, parameter, rowBounds)) {\n Long count = count(executor, ms, parameter, rowBounds, null, boundSql);\n if (!dialect.afterCount(count, parameter, rowBounds)) {\n return dialect.afterPage(new ArrayList(), parameter, rowBounds);\n }\n }\n resultList = ExecutorUtil.pageQuery(dialect, executor, ms, parameter, rowBounds, resultHandler, boundSql, cacheKey);\n } else {\n resultList = executor.query(ms, parameter, rowBounds, resultHandler, cacheKey, boundSql);\n }\n return dialect.afterPage(resultList, parameter, rowBounds);\n } finally {\n if (dialect != null) {\n dialect.afterAll();\n }\n }\n}",
33
- "focal_file_path": "src/main/java/com/github/pagehelper/PageInterceptor.java",
34
- "focal_method_sign": "com/github/pagehelper/PageInterceptor.intercept:(Lorg/apache/ibatis/plugin/Invocation;)Ljava/lang/Object",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "com/github/pagehelper/PageInterceptor.intercept:(Lorg/apache/ibatis/plugin/Invocation;)Ljava/lang/Object",
39
- "file_path_old": "src/main/java/com/github/pagehelper/PageInterceptor.java",
40
- "line_nums_old": "68-116",
41
- "file_path_new": "src/main/java/com/github/pagehelper/PageInterceptor.java",
42
- "line_nums_new": "68-116",
43
- "dependency_updated": "updated",
44
- "score": null,
45
- "signal_scores": {}
46
- }
47
- ],
48
- "coverage_gold": 0.7916666666666666,
49
- "branch_coverage_gold": 17.4716,
50
- "method_coverage_gold": 31.5961,
51
- "line_coverage_gold": 26.6187,
52
- "is_traceback": true,
53
- "commit_gap": {
54
- "count": 1,
55
- "skipped_commits": [
56
- "a93195e1c0833d5014aa59d0584dbf15c40eabae"
57
- ]
58
- },
59
- "test_is_refactoring_only": false,
60
- "has_test_dep_change": false,
61
- "all_deps_new": [
62
- "com/github/pagehelper/PageInterceptor.intercept:(Lorg/apache/ibatis/plugin/Invocation;)Ljava/lang/Object",
63
- "com/github/pagehelper/util/MybatisHelper.getSqlSession:()Lorg/apache/ibatis/session/SqlSession",
64
- "com/github/pagehelper/PageSerializable.getTotal:()J",
65
- "com/github/pagehelper/page/PageMethod.startPage:(II)Lcom/github/pagehelper/Page"
66
- ],
67
- "all_deps_old": [
68
- "com/github/pagehelper/PageInterceptor.intercept:(Lorg/apache/ibatis/plugin/Invocation;)Ljava/lang/Object",
69
- "com/github/pagehelper/util/MybatisHelper.getSqlSession:()Lorg/apache/ibatis/session/SqlSession",
70
- "com/github/pagehelper/PageSerializable.getTotal:()J",
71
- "com/github/pagehelper/page/PageMethod.startPage:(II)Lcom/github/pagehelper/Page"
72
- ],
73
- "deps_changes": [
74
- {
75
- "method_sign": "com/github/pagehelper/PageInterceptor.intercept:(Lorg/apache/ibatis/plugin/Invocation;)Ljava/lang/Object",
76
- "change_type": "UPDATE",
77
- "file_path_old": "src/main/java/com/github/pagehelper/PageInterceptor.java",
78
- "file_path_new": "src/main/java/com/github/pagehelper/PageInterceptor.java",
79
- "source": "production",
80
- "is_test_dependency": false,
81
- "is_refactoring_only": false
82
- }
83
- ],
84
- "variant_result": {
85
- "old_on_old": "pass",
86
- "old_on_new": "fail",
87
- "new_on_old": "fail",
88
- "new_on_new": "pass"
89
- }
90
- }
91
- ],
92
- "version": "v6.1.1",
93
- "java_version": 8
94
- },
95
- {
96
- "task_id": "pagehelper_Mybatis-PageHelper-v6.1.1__28cc92d_621c993__PageInfoTest_4c9e61bc",
97
- "project_name": "pagehelper_Mybatis-PageHelper-v6.1.1",
98
- "git_clone_url": "https://github.com/pagehelper/Mybatis-PageHelper.git",
99
- "rev1": "28cc92d9b7bd32a1331536629025fb5509bfc59a",
100
- "rev2": "621c993772d10462233f4eb4d42c64cdb64610d8",
101
- "rev1_date": "2018-09-02T07:27:30Z",
102
- "rev2_date": "2018-09-02T07:30:26Z",
103
- "git_diff_url": "https://github.com/pagehelper/Mybatis-PageHelper/compare/28cc92d9b7bd32a1331536629025fb5509bfc59a...621c993772d10462233f4eb4d42c64cdb64610d8",
104
- "test_file": "src/test/java/com/github/pagehelper/test/basic/PageInfoTest.java",
105
- "test_changes": [
106
- {
107
- "change_id": "43_pagehelper_Mybatis-PageHelper-v6.1.1_28cc92d_621c993_PageInfoTest",
108
- "test_sign": "com/github/pagehelper/test/basic/PageInfoTest.testPageSize10:()V",
109
- "class": "PageInfoTest",
110
- "method": "testPageSize10",
111
- "module": "",
112
- "junit_selector": "com.github.pagehelper.test.basic.PageInfoTest#testPageSize10",
113
- "old_test_code": "@Test\npublic void testPageSize10() {\n SqlSession sqlSession = MybatisHelper.getSqlSession();\n CountryMapper countryMapper = sqlSession.getMapper(CountryMapper.class);\n try {\n PageHelper.startPage(1, 10);\n List<Country> list = countryMapper.selectAll();\n System.out.println(list);\n PageInfo<Country> page = new PageInfo<Country>(list);\n assertEquals(1, page.getPageNum());\n assertEquals(10, page.getPageSize());\n assertEquals(1, page.getStartRow());\n assertEquals(10, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(19, page.getPages());\n assertEquals(1, page.getFirstPage());\n assertEquals(8, page.getLastPage());\n assertEquals(true, page.isIsFirstPage());\n assertEquals(false, page.isIsLastPage());\n assertEquals(false, page.isHasPreviousPage());\n assertEquals(true, page.isHasNextPage());\n PageSerializable<Country> serializable = PageSerializable.of(list);\n assertEquals(183, serializable.getTotal());\n PageHelper.startPage(2, 10);\n list = countryMapper.selectAll();\n page = new PageInfo<Country>(list);\n assertEquals(2, page.getPageNum());\n assertEquals(10, page.getPageSize());\n assertEquals(11, page.getStartRow());\n assertEquals(20, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(19, page.getPages());\n assertEquals(1, page.getFirstPage());\n assertEquals(8, page.getLastPage());\n assertEquals(false, page.isIsFirstPage());\n assertEquals(false, page.isIsLastPage());\n assertEquals(true, page.isHasPreviousPage());\n assertEquals(true, page.isHasNextPage());\n PageHelper.startPage(19, 10);\n list = countryMapper.selectAll();\n page = new PageInfo<Country>(list);\n assertEquals(19, page.getPageNum());\n assertEquals(10, page.getPageSize());\n assertEquals(181, page.getStartRow());\n assertEquals(183, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(19, page.getPages());\n assertEquals(12, page.getFirstPage());\n assertEquals(19, page.getLastPage());\n assertEquals(false, page.isIsFirstPage());\n assertEquals(true, page.isIsLastPage());\n assertEquals(true, page.isHasPreviousPage());\n assertEquals(false, page.isHasNextPage());\n } finally {\n sqlSession.close();\n }\n}",
114
- "new_test_code": "@Test\npublic void testPageSize10() {\n SqlSession sqlSession = MybatisHelper.getSqlSession();\n CountryMapper countryMapper = sqlSession.getMapper(CountryMapper.class);\n try {\n PageHelper.startPage(1, 10);\n List<Country> list = countryMapper.selectAll();\n System.out.println(list);\n PageInfo<Country> page = new PageInfo<Country>(list);\n assertEquals(1, page.getPageNum());\n assertEquals(10, page.getPageSize());\n assertEquals(1, page.getStartRow());\n assertEquals(10, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(19, page.getPages());\n assertEquals(true, page.isIsFirstPage());\n assertEquals(false, page.isIsLastPage());\n assertEquals(false, page.isHasPreviousPage());\n assertEquals(true, page.isHasNextPage());\n PageSerializable<Country> serializable = PageSerializable.of(list);\n assertEquals(183, serializable.getTotal());\n PageHelper.startPage(2, 10);\n list = countryMapper.selectAll();\n page = new PageInfo<Country>(list);\n assertEquals(2, page.getPageNum());\n assertEquals(10, page.getPageSize());\n assertEquals(11, page.getStartRow());\n assertEquals(20, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(19, page.getPages());\n assertEquals(false, page.isIsFirstPage());\n assertEquals(false, page.isIsLastPage());\n assertEquals(true, page.isHasPreviousPage());\n assertEquals(true, page.isHasNextPage());\n PageHelper.startPage(19, 10);\n list = countryMapper.selectAll();\n page = new PageInfo<Country>(list);\n assertEquals(19, page.getPageNum());\n assertEquals(10, page.getPageSize());\n assertEquals(181, page.getStartRow());\n assertEquals(183, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(19, page.getPages());\n assertEquals(false, page.isIsFirstPage());\n assertEquals(true, page.isIsLastPage());\n assertEquals(true, page.isHasPreviousPage());\n assertEquals(false, page.isHasNextPage());\n } finally {\n sqlSession.close();\n }\n}",
115
- "old_test_file_path": [
116
- "src/test/java/com/github/pagehelper/test/basic/PageInfoTest.java"
117
- ],
118
- "old_test_lnum": [
119
- "45-110"
120
- ],
121
- "new_test_lnum": [
122
- "45-104"
123
- ],
124
- "old_production_code": "@Deprecated\npublic int getLastPage() {\n return navigateLastPage;\n}",
125
- "new_production_code": "",
126
- "focal_file_path": "src/main/java/com/github/pagehelper/PageInfo.java",
127
- "focal_method_sign": "com/github/pagehelper/PageInfo.getLastPage:()I",
128
- "focal_all_deps_scored": [
129
- {
130
- "dep_id": 1,
131
- "method_sign": "com/github/pagehelper/PageInfo.getLastPage:()I",
132
- "file_path_old": "src/main/java/com/github/pagehelper/PageInfo.java",
133
- "line_nums_old": "283-287",
134
- "file_path_new": null,
135
- "line_nums_new": null,
136
- "dependency_updated": "deleted",
137
- "score": 0.2912,
138
- "signal_scores": {
139
- "nc": 0.0,
140
- "lcs_u": 0.3636,
141
- "ed": 0.0909,
142
- "class": 1.0,
143
- "tfidf": 0.1011
144
- }
145
- },
146
- {
147
- "dep_id": 0,
148
- "method_sign": "com/github/pagehelper/PageInfo.getFirstPage:()I",
149
- "file_path_old": "src/main/java/com/github/pagehelper/PageInfo.java",
150
- "line_nums_old": "256-260",
151
- "file_path_new": null,
152
- "line_nums_new": null,
153
- "dependency_updated": "deleted",
154
- "score": 0.2846,
155
- "signal_scores": {
156
- "nc": 0.0,
157
- "lcs_u": 0.3333,
158
- "ed": 0.0833,
159
- "class": 1.0,
160
- "tfidf": 0.1011
161
- }
162
- }
163
- ],
164
- "coverage_gold": 0.8571428571428571,
165
- "branch_coverage_gold": 22.3214,
166
- "method_coverage_gold": 40.625,
167
- "line_coverage_gold": 32.6948,
168
- "is_traceback": false,
169
- "commit_gap": {
170
- "count": 0,
171
- "skipped_commits": []
172
- },
173
- "test_is_refactoring_only": false,
174
- "has_test_dep_change": false,
175
- "all_deps_new": [
176
- "com/github/pagehelper/PageInfo.getPageNum:()I",
177
- "com/github/pagehelper/PageInfo.getEndRow:()I",
178
- "com/github/pagehelper/Page.toString:()Ljava/lang/String",
179
- "com/github/pagehelper/PageInfo.isIsFirstPage:()Z",
180
- "com/github/pagehelper/PageSerializable.getTotal:()J",
181
- "com/github/pagehelper/PageInfo.isIsLastPage:()Z",
182
- "com/github/pagehelper/PageInfo.getPageSize:()I",
183
- "com/github/pagehelper/PageInfo.getStartRow:()I",
184
- "com/github/pagehelper/page/PageMethod.startPage:(II)Lcom/github/pagehelper/Page",
185
- "com/github/pagehelper/PageInfo.isHasNextPage:()Z",
186
- "com/github/pagehelper/PageInfo.isHasPreviousPage:()Z",
187
- "com/github/pagehelper/PageSerializable.of:(Ljava/util/List;)Lcom/github/pagehelper/PageSerializable",
188
- "com/github/pagehelper/PageInfo.getPages:()I",
189
- "com/github/pagehelper/PageInterceptor.intercept:(Lorg/apache/ibatis/plugin/Invocation;)Ljava/lang/Object"
190
- ],
191
- "all_deps_old": [
192
- "com/github/pagehelper/PageInfo.getPageNum:()I",
193
- "com/github/pagehelper/PageInfo.getEndRow:()I",
194
- "com/github/pagehelper/Page.toString:()Ljava/lang/String",
195
- "com/github/pagehelper/PageInfo.getFirstPage:()I",
196
- "com/github/pagehelper/PageSerializable.getTotal:()J",
197
- "com/github/pagehelper/PageInfo.getLastPage:()I",
198
- "com/github/pagehelper/PageInfo.getPageSize:()I",
199
- "com/github/pagehelper/PageInfo.getStartRow:()I",
200
- "com/github/pagehelper/page/PageMethod.startPage:(II)Lcom/github/pagehelper/Page",
201
- "com/github/pagehelper/PageInfo.isIsLastPage:()Z",
202
- "com/github/pagehelper/PageInfo.isIsFirstPage:()Z",
203
- "com/github/pagehelper/PageInfo.isHasPreviousPage:()Z",
204
- "com/github/pagehelper/PageInfo.getPages:()I",
205
- "com/github/pagehelper/PageInterceptor.intercept:(Lorg/apache/ibatis/plugin/Invocation;)Ljava/lang/Object",
206
- "com/github/pagehelper/PageInfo.isHasNextPage:()Z",
207
- "com/github/pagehelper/PageSerializable.of:(Ljava/util/List;)Lcom/github/pagehelper/PageSerializable"
208
- ],
209
- "deps_changes": [
210
- {
211
- "method_sign": "com/github/pagehelper/PageInfo.getFirstPage:()I",
212
- "change_type": "DELETE",
213
- "file_path_old": "src/main/java/com/github/pagehelper/PageInfo.java",
214
- "file_path_new": null,
215
- "source": "production",
216
- "is_test_dependency": false,
217
- "is_refactoring_only": false
218
- },
219
- {
220
- "method_sign": "com/github/pagehelper/PageInfo.getLastPage:()I",
221
- "change_type": "DELETE",
222
- "file_path_old": "src/main/java/com/github/pagehelper/PageInfo.java",
223
- "file_path_new": null,
224
- "source": "production",
225
- "is_test_dependency": false,
226
- "is_refactoring_only": false
227
- }
228
- ],
229
- "variant_result": {
230
- "old_on_old": "pass",
231
- "old_on_new": "error",
232
- "new_on_old": "pass",
233
- "new_on_new": "pass"
234
- }
235
- },
236
- {
237
- "change_id": "44_pagehelper_Mybatis-PageHelper-v6.1.1_28cc92d_621c993_PageInfoTest",
238
- "test_sign": "com/github/pagehelper/test/basic/PageInfoTest.testNavigatePages:()V",
239
- "class": "PageInfoTest",
240
- "method": "testNavigatePages",
241
- "module": "",
242
- "junit_selector": "com.github.pagehelper.test.basic.PageInfoTest#testNavigatePages",
243
- "old_test_code": "@Test\npublic void testNavigatePages() {\n SqlSession sqlSession = MybatisHelper.getSqlSession();\n CountryMapper countryMapper = sqlSession.getMapper(CountryMapper.class);\n try {\n PageHelper.startPage(1, 10);\n List<Country> list = countryMapper.selectAll();\n PageInfo<Country> page = new PageInfo<Country>(list, 20);\n assertEquals(1, page.getPageNum());\n assertEquals(10, page.getPageSize());\n assertEquals(1, page.getStartRow());\n assertEquals(10, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(19, page.getPages());\n assertEquals(1, page.getFirstPage());\n assertEquals(19, page.getLastPage());\n assertEquals(true, page.isIsFirstPage());\n assertEquals(false, page.isIsLastPage());\n assertEquals(false, page.isHasPreviousPage());\n assertEquals(true, page.isHasNextPage());\n PageHelper.startPage(2, 50);\n list = countryMapper.selectAll();\n page = new PageInfo<Country>(list, 2);\n assertEquals(2, page.getPageNum());\n assertEquals(50, page.getPageSize());\n assertEquals(51, page.getStartRow());\n assertEquals(100, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(4, page.getPages());\n assertEquals(1, page.getFirstPage());\n assertEquals(2, page.getLastPage());\n assertEquals(false, page.isIsFirstPage());\n assertEquals(false, page.isIsLastPage());\n assertEquals(true, page.isHasPreviousPage());\n assertEquals(true, page.isHasNextPage());\n } finally {\n sqlSession.close();\n }\n}",
244
- "new_test_code": "@Test\npublic void testNavigatePages() {\n SqlSession sqlSession = MybatisHelper.getSqlSession();\n CountryMapper countryMapper = sqlSession.getMapper(CountryMapper.class);\n try {\n PageHelper.startPage(1, 10);\n List<Country> list = countryMapper.selectAll();\n PageInfo<Country> page = new PageInfo<Country>(list, 20);\n assertEquals(1, page.getPageNum());\n assertEquals(10, page.getPageSize());\n assertEquals(1, page.getStartRow());\n assertEquals(10, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(19, page.getPages());\n assertEquals(true, page.isIsFirstPage());\n assertEquals(false, page.isIsLastPage());\n assertEquals(false, page.isHasPreviousPage());\n assertEquals(true, page.isHasNextPage());\n PageHelper.startPage(2, 50);\n list = countryMapper.selectAll();\n page = new PageInfo<Country>(list, 2);\n assertEquals(2, page.getPageNum());\n assertEquals(50, page.getPageSize());\n assertEquals(51, page.getStartRow());\n assertEquals(100, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(4, page.getPages());\n assertEquals(false, page.isIsFirstPage());\n assertEquals(false, page.isIsLastPage());\n assertEquals(true, page.isHasPreviousPage());\n assertEquals(true, page.isHasNextPage());\n } finally {\n sqlSession.close();\n }\n}",
245
- "old_test_file_path": [
246
- "src/test/java/com/github/pagehelper/test/basic/PageInfoTest.java"
247
- ],
248
- "old_test_lnum": [
249
- "200-241"
250
- ],
251
- "new_test_lnum": [
252
- "186-223"
253
- ],
254
- "old_production_code": "@Deprecated\npublic int getLastPage() {\n return navigateLastPage;\n}",
255
- "new_production_code": "",
256
- "focal_file_path": "src/main/java/com/github/pagehelper/PageInfo.java",
257
- "focal_method_sign": "com/github/pagehelper/PageInfo.getLastPage:()I",
258
- "focal_all_deps_scored": [
259
- {
260
- "dep_id": 1,
261
- "method_sign": "com/github/pagehelper/PageInfo.getLastPage:()I",
262
- "file_path_old": "src/main/java/com/github/pagehelper/PageInfo.java",
263
- "line_nums_old": "283-287",
264
- "file_path_new": null,
265
- "line_nums_new": null,
266
- "dependency_updated": "deleted",
267
- "score": 0.396,
268
- "signal_scores": {
269
- "nc": 0.0,
270
- "lcs_u": 0.6364,
271
- "ed": 0.3846,
272
- "class": 1.0,
273
- "tfidf": 0.1363
274
- }
275
- },
276
- {
277
- "dep_id": 0,
278
- "method_sign": "com/github/pagehelper/PageInfo.getFirstPage:()I",
279
- "file_path_old": "src/main/java/com/github/pagehelper/PageInfo.java",
280
- "line_nums_old": "256-260",
281
- "file_path_new": null,
282
- "line_nums_new": null,
283
- "dependency_updated": "deleted",
284
- "score": 0.3553,
285
- "signal_scores": {
286
- "nc": 0.0,
287
- "lcs_u": 0.5,
288
- "ed": 0.3846,
289
- "class": 1.0,
290
- "tfidf": 0.066
291
- }
292
- }
293
- ],
294
- "coverage_gold": 0.8490566037735849,
295
- "branch_coverage_gold": 21.875,
296
- "method_coverage_gold": 39.5833,
297
- "line_coverage_gold": 32.3116,
298
- "is_traceback": false,
299
- "commit_gap": {
300
- "count": 0,
301
- "skipped_commits": []
302
- },
303
- "test_is_refactoring_only": false,
304
- "has_test_dep_change": false,
305
- "all_deps_new": [
306
- "com/github/pagehelper/PageInfo.getPageNum:()I",
307
- "com/github/pagehelper/PageInfo.getEndRow:()I",
308
- "com/github/pagehelper/PageInfo.isIsFirstPage:()Z",
309
- "com/github/pagehelper/PageSerializable.getTotal:()J",
310
- "com/github/pagehelper/PageInfo.isIsLastPage:()Z",
311
- "com/github/pagehelper/util/MybatisHelper.getSqlSession:()Lorg/apache/ibatis/session/SqlSession",
312
- "com/github/pagehelper/PageInfo.getPageSize:()I",
313
- "com/github/pagehelper/PageInfo.getStartRow:()I",
314
- "com/github/pagehelper/page/PageMethod.startPage:(II)Lcom/github/pagehelper/Page",
315
- "com/github/pagehelper/PageInfo.isHasNextPage:()Z",
316
- "com/github/pagehelper/PageInfo.isHasPreviousPage:()Z",
317
- "com/github/pagehelper/PageInfo.getPages:()I",
318
- "com/github/pagehelper/PageInterceptor.intercept:(Lorg/apache/ibatis/plugin/Invocation;)Ljava/lang/Object"
319
- ],
320
- "all_deps_old": [
321
- "com/github/pagehelper/PageInfo.getPageNum:()I",
322
- "com/github/pagehelper/PageInfo.getEndRow:()I",
323
- "com/github/pagehelper/PageInfo.getFirstPage:()I",
324
- "com/github/pagehelper/PageSerializable.getTotal:()J",
325
- "com/github/pagehelper/PageInfo.getLastPage:()I",
326
- "com/github/pagehelper/PageInfo.getPageSize:()I",
327
- "com/github/pagehelper/PageInfo.getStartRow:()I",
328
- "com/github/pagehelper/page/PageMethod.startPage:(II)Lcom/github/pagehelper/Page",
329
- "com/github/pagehelper/PageInfo.isIsLastPage:()Z",
330
- "com/github/pagehelper/PageInfo.isIsFirstPage:()Z",
331
- "com/github/pagehelper/PageInfo.isHasPreviousPage:()Z",
332
- "com/github/pagehelper/PageInfo.getPages:()I",
333
- "com/github/pagehelper/util/MybatisHelper.getSqlSession:()Lorg/apache/ibatis/session/SqlSession",
334
- "com/github/pagehelper/PageInterceptor.intercept:(Lorg/apache/ibatis/plugin/Invocation;)Ljava/lang/Object",
335
- "com/github/pagehelper/PageInfo.isHasNextPage:()Z"
336
- ],
337
- "deps_changes": [
338
- {
339
- "method_sign": "com/github/pagehelper/PageInfo.getFirstPage:()I",
340
- "change_type": "DELETE",
341
- "file_path_old": "src/main/java/com/github/pagehelper/PageInfo.java",
342
- "file_path_new": null,
343
- "source": "production",
344
- "is_test_dependency": false,
345
- "is_refactoring_only": false
346
- },
347
- {
348
- "method_sign": "com/github/pagehelper/PageInfo.getLastPage:()I",
349
- "change_type": "DELETE",
350
- "file_path_old": "src/main/java/com/github/pagehelper/PageInfo.java",
351
- "file_path_new": null,
352
- "source": "production",
353
- "is_test_dependency": false,
354
- "is_refactoring_only": false
355
- }
356
- ],
357
- "variant_result": {
358
- "old_on_old": "pass",
359
- "old_on_new": "error",
360
- "new_on_old": "pass",
361
- "new_on_new": "pass"
362
- }
363
- },
364
- {
365
- "change_id": "45_pagehelper_Mybatis-PageHelper-v6.1.1_28cc92d_621c993_PageInfoTest",
366
- "test_sign": "com/github/pagehelper/test/basic/PageInfoTest.testPageSize50:()V",
367
- "class": "PageInfoTest",
368
- "method": "testPageSize50",
369
- "module": "",
370
- "junit_selector": "com.github.pagehelper.test.basic.PageInfoTest#testPageSize50",
371
- "old_test_code": "@Test\npublic void testPageSize50() {\n SqlSession sqlSession = MybatisHelper.getSqlSession();\n CountryMapper countryMapper = sqlSession.getMapper(CountryMapper.class);\n try {\n PageHelper.startPage(1, 50);\n List<Country> list = countryMapper.selectAll();\n PageInfo<Country> page = new PageInfo<Country>(list);\n assertEquals(1, page.getPageNum());\n assertEquals(50, page.getPageSize());\n assertEquals(1, page.getStartRow());\n assertEquals(50, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(4, page.getPages());\n assertEquals(1, page.getFirstPage());\n assertEquals(4, page.getLastPage());\n assertEquals(true, page.isIsFirstPage());\n assertEquals(false, page.isIsLastPage());\n assertEquals(false, page.isHasPreviousPage());\n assertEquals(true, page.isHasNextPage());\n PageHelper.startPage(2, 50);\n list = countryMapper.selectAll();\n page = new PageInfo<Country>(list);\n assertEquals(2, page.getPageNum());\n assertEquals(50, page.getPageSize());\n assertEquals(51, page.getStartRow());\n assertEquals(100, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(4, page.getPages());\n assertEquals(1, page.getFirstPage());\n assertEquals(4, page.getLastPage());\n assertEquals(false, page.isIsFirstPage());\n assertEquals(false, page.isIsLastPage());\n assertEquals(true, page.isHasPreviousPage());\n assertEquals(true, page.isHasNextPage());\n PageHelper.startPage(3, 50);\n list = countryMapper.selectAll();\n page = new PageInfo<Country>(list);\n assertEquals(3, page.getPageNum());\n assertEquals(50, page.getPageSize());\n assertEquals(101, page.getStartRow());\n assertEquals(150, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(4, page.getPages());\n assertEquals(1, page.getFirstPage());\n assertEquals(4, page.getLastPage());\n assertEquals(false, page.isIsFirstPage());\n assertEquals(false, page.isIsLastPage());\n assertEquals(true, page.isHasPreviousPage());\n assertEquals(true, page.isHasNextPage());\n PageHelper.startPage(4, 50);\n list = countryMapper.selectAll();\n page = new PageInfo<Country>(list);\n assertEquals(4, page.getPageNum());\n assertEquals(50, page.getPageSize());\n assertEquals(151, page.getStartRow());\n assertEquals(183, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(4, page.getPages());\n assertEquals(1, page.getFirstPage());\n assertEquals(4, page.getLastPage());\n assertEquals(false, page.isIsFirstPage());\n assertEquals(true, page.isIsLastPage());\n assertEquals(true, page.isHasPreviousPage());\n assertEquals(false, page.isHasNextPage());\n } finally {\n sqlSession.close();\n }\n}",
372
- "new_test_code": "@Test\npublic void testPageSize50() {\n SqlSession sqlSession = MybatisHelper.getSqlSession();\n CountryMapper countryMapper = sqlSession.getMapper(CountryMapper.class);\n try {\n PageHelper.startPage(1, 50);\n List<Country> list = countryMapper.selectAll();\n PageInfo<Country> page = new PageInfo<Country>(list);\n assertEquals(1, page.getPageNum());\n assertEquals(50, page.getPageSize());\n assertEquals(1, page.getStartRow());\n assertEquals(50, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(4, page.getPages());\n assertEquals(true, page.isIsFirstPage());\n assertEquals(false, page.isIsLastPage());\n assertEquals(false, page.isHasPreviousPage());\n assertEquals(true, page.isHasNextPage());\n PageHelper.startPage(2, 50);\n list = countryMapper.selectAll();\n page = new PageInfo<Country>(list);\n assertEquals(2, page.getPageNum());\n assertEquals(50, page.getPageSize());\n assertEquals(51, page.getStartRow());\n assertEquals(100, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(4, page.getPages());\n assertEquals(false, page.isIsFirstPage());\n assertEquals(false, page.isIsLastPage());\n assertEquals(true, page.isHasPreviousPage());\n assertEquals(true, page.isHasNextPage());\n PageHelper.startPage(3, 50);\n list = countryMapper.selectAll();\n page = new PageInfo<Country>(list);\n assertEquals(3, page.getPageNum());\n assertEquals(50, page.getPageSize());\n assertEquals(101, page.getStartRow());\n assertEquals(150, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(4, page.getPages());\n assertEquals(false, page.isIsFirstPage());\n assertEquals(false, page.isIsLastPage());\n assertEquals(true, page.isHasPreviousPage());\n assertEquals(true, page.isHasNextPage());\n PageHelper.startPage(4, 50);\n list = countryMapper.selectAll();\n page = new PageInfo<Country>(list);\n assertEquals(4, page.getPageNum());\n assertEquals(50, page.getPageSize());\n assertEquals(151, page.getStartRow());\n assertEquals(183, page.getEndRow());\n assertEquals(183, page.getTotal());\n assertEquals(4, page.getPages());\n assertEquals(false, page.isIsFirstPage());\n assertEquals(true, page.isIsLastPage());\n assertEquals(true, page.isHasPreviousPage());\n assertEquals(false, page.isHasNextPage());\n } finally {\n sqlSession.close();\n }\n}",
373
- "old_test_file_path": [
374
- "src/test/java/com/github/pagehelper/test/basic/PageInfoTest.java"
375
- ],
376
- "old_test_lnum": [
377
- "116-194"
378
- ],
379
- "new_test_lnum": [
380
- "110-180"
381
- ],
382
- "old_production_code": "@Deprecated\npublic int getLastPage() {\n return navigateLastPage;\n}",
383
- "new_production_code": "",
384
- "focal_file_path": "src/main/java/com/github/pagehelper/PageInfo.java",
385
- "focal_method_sign": "com/github/pagehelper/PageInfo.getLastPage:()I",
386
- "focal_all_deps_scored": [
387
- {
388
- "dep_id": 1,
389
- "method_sign": "com/github/pagehelper/PageInfo.getLastPage:()I",
390
- "file_path_old": "src/main/java/com/github/pagehelper/PageInfo.java",
391
- "line_nums_old": "283-287",
392
- "file_path_new": null,
393
- "line_nums_new": null,
394
- "dependency_updated": "deleted",
395
- "score": 0.2918,
396
- "signal_scores": {
397
- "nc": 0.0,
398
- "lcs_u": 0.3636,
399
- "ed": 0.0909,
400
- "class": 1.0,
401
- "tfidf": 0.1037
402
- }
403
- },
404
- {
405
- "dep_id": 0,
406
- "method_sign": "com/github/pagehelper/PageInfo.getFirstPage:()I",
407
- "file_path_old": "src/main/java/com/github/pagehelper/PageInfo.java",
408
- "line_nums_old": "256-260",
409
- "file_path_new": null,
410
- "line_nums_new": null,
411
- "dependency_updated": "deleted",
412
- "score": 0.2852,
413
- "signal_scores": {
414
- "nc": 0.0,
415
- "lcs_u": 0.3333,
416
- "ed": 0.0833,
417
- "class": 1.0,
418
- "tfidf": 0.1037
419
- }
420
- }
421
- ],
422
- "coverage_gold": 0.8490566037735849,
423
- "branch_coverage_gold": 21.5774,
424
- "method_coverage_gold": 39.9306,
425
- "line_coverage_gold": 31.9923,
426
- "is_traceback": false,
427
- "commit_gap": {
428
- "count": 0,
429
- "skipped_commits": []
430
- },
431
- "test_is_refactoring_only": false,
432
- "has_test_dep_change": false,
433
- "all_deps_new": [
434
- "com/github/pagehelper/PageInfo.getPageNum:()I",
435
- "com/github/pagehelper/PageInfo.getEndRow:()I",
436
- "com/github/pagehelper/PageInfo.isIsFirstPage:()Z",
437
- "com/github/pagehelper/PageSerializable.getTotal:()J",
438
- "com/github/pagehelper/PageInfo.isIsLastPage:()Z",
439
- "com/github/pagehelper/util/MybatisHelper.getSqlSession:()Lorg/apache/ibatis/session/SqlSession",
440
- "com/github/pagehelper/PageInfo.getPageSize:()I",
441
- "com/github/pagehelper/PageInfo.getStartRow:()I",
442
- "com/github/pagehelper/page/PageMethod.startPage:(II)Lcom/github/pagehelper/Page",
443
- "com/github/pagehelper/PageInfo.isHasNextPage:()Z",
444
- "com/github/pagehelper/PageInfo.isHasPreviousPage:()Z",
445
- "com/github/pagehelper/PageInfo.getPages:()I",
446
- "com/github/pagehelper/PageInterceptor.intercept:(Lorg/apache/ibatis/plugin/Invocation;)Ljava/lang/Object"
447
- ],
448
- "all_deps_old": [
449
- "com/github/pagehelper/PageInfo.getPageNum:()I",
450
- "com/github/pagehelper/PageInfo.getEndRow:()I",
451
- "com/github/pagehelper/PageInfo.getFirstPage:()I",
452
- "com/github/pagehelper/PageSerializable.getTotal:()J",
453
- "com/github/pagehelper/PageInfo.getLastPage:()I",
454
- "com/github/pagehelper/PageInfo.getPageSize:()I",
455
- "com/github/pagehelper/PageInfo.getStartRow:()I",
456
- "com/github/pagehelper/page/PageMethod.startPage:(II)Lcom/github/pagehelper/Page",
457
- "com/github/pagehelper/PageInfo.isIsLastPage:()Z",
458
- "com/github/pagehelper/PageInfo.isIsFirstPage:()Z",
459
- "com/github/pagehelper/PageInfo.isHasPreviousPage:()Z",
460
- "com/github/pagehelper/PageInfo.getPages:()I",
461
- "com/github/pagehelper/util/MybatisHelper.getSqlSession:()Lorg/apache/ibatis/session/SqlSession",
462
- "com/github/pagehelper/PageInterceptor.intercept:(Lorg/apache/ibatis/plugin/Invocation;)Ljava/lang/Object",
463
- "com/github/pagehelper/PageInfo.isHasNextPage:()Z"
464
- ],
465
- "deps_changes": [
466
- {
467
- "method_sign": "com/github/pagehelper/PageInfo.getFirstPage:()I",
468
- "change_type": "DELETE",
469
- "file_path_old": "src/main/java/com/github/pagehelper/PageInfo.java",
470
- "file_path_new": null,
471
- "source": "production",
472
- "is_test_dependency": false,
473
- "is_refactoring_only": false
474
- },
475
- {
476
- "method_sign": "com/github/pagehelper/PageInfo.getLastPage:()I",
477
- "change_type": "DELETE",
478
- "file_path_old": "src/main/java/com/github/pagehelper/PageInfo.java",
479
- "file_path_new": null,
480
- "source": "production",
481
- "is_test_dependency": false,
482
- "is_refactoring_only": false
483
- }
484
- ],
485
- "variant_result": {
486
- "old_on_old": "pass",
487
- "old_on_new": "error",
488
- "new_on_old": "pass",
489
- "new_on_new": "pass"
490
- }
491
- }
492
- ],
493
- "version": "v6.1.1",
494
- "java_version": 8
495
- }
496
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
palatable_lambda-lambda-5.5.0.json DELETED
@@ -1,257 +0,0 @@
1
- [
2
- {
3
- "task_id": "palatable_lambda-lambda-5.5.0__bbb97ae_a1ba4b7__EitherLensTest_514c81ba",
4
- "project_name": "palatable_lambda-lambda-5.5.0",
5
- "git_clone_url": "https://github.com/palatable/lambda.git",
6
- "rev1": "bbb97ae97f80cf558afe74bcc89a8384f3596aff",
7
- "rev2": "a1ba4b7c9015ba14c1dfa70ecc9c7cbb7a56efd8",
8
- "rev1_date": "2019-05-19T23:36:08Z",
9
- "rev2_date": "2019-05-19T23:36:40Z",
10
- "git_diff_url": "https://github.com/palatable/lambda/compare/bbb97ae97f80cf558afe74bcc89a8384f3596aff...a1ba4b7c9015ba14c1dfa70ecc9c7cbb7a56efd8",
11
- "test_file": "src/test/java/com/jnape/palatable/lambda/optics/lenses/EitherLensTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "30_palatable_lambda-lambda-5.5.0_bbb97ae_a1ba4b7_EitherLensTest",
15
- "test_sign": "com/jnape/palatable/lambda/optics/lenses/EitherLensTest.leftFocusesOnLeftValues:()V",
16
- "class": "EitherLensTest",
17
- "method": "leftFocusesOnLeftValues",
18
- "module": "",
19
- "junit_selector": "com.jnape.palatable.lambda.optics.lenses.EitherLensTest#leftFocusesOnLeftValues",
20
- "old_test_code": "@Test\npublic void leftFocusesOnLeftValues() {\n Lens.Simple<Either<String, Integer>, Maybe<String>> left = EitherLens.left();\n assertEquals(just(\"fail\"), view(left, left(\"fail\")));\n assertEquals(nothing(), view(left, right(1)));\n assertEquals(left(\"foo\"), set(left, just(\"foo\"), left(\"fail\")));\n assertEquals(left(\"fail\"), set(left, nothing(), left(\"fail\")));\n assertEquals(left(\"foo\"), set(left, just(\"foo\"), right(1)));\n assertEquals(right(1), set(left, nothing(), right(1)));\n}",
21
- "new_test_code": "@Test\npublic void leftFocusesOnLeftValues() {\n Lens.Simple<Either<String, Integer>, Maybe<String>> left = EitherLens._left();\n assertEquals(just(\"fail\"), view(left, left(\"fail\")));\n assertEquals(nothing(), view(left, right(1)));\n assertEquals(left(\"foo\"), set(left, just(\"foo\"), left(\"fail\")));\n assertEquals(left(\"fail\"), set(left, nothing(), left(\"fail\")));\n assertEquals(left(\"foo\"), set(left, just(\"foo\"), right(1)));\n assertEquals(right(1), set(left, nothing(), right(1)));\n}",
22
- "old_test_file_path": [
23
- "src/test/java/com/jnape/palatable/lambda/optics/lenses/EitherLensTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "30-40"
27
- ],
28
- "new_test_lnum": [
29
- "30-40"
30
- ],
31
- "old_production_code": "public static <L, R> Lens.Simple<Either<L, R>, Maybe<L>> left() {\n return simpleLens(CoProduct2::projectA, (lOrR, maybeL) -> maybeL.<Either<L, R>>fmap(Either::left).orElse(lOrR));\n}",
32
- "new_production_code": "",
33
- "focal_file_path": "src/main/java/com/jnape/palatable/lambda/optics/lenses/EitherLens.java",
34
- "focal_method_sign": "com/jnape/palatable/lambda/optics/lenses/EitherLens.left:()Lcom/jnape/palatable/lambda/optics/Lens$Simple",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 1,
38
- "method_sign": "com/jnape/palatable/lambda/optics/lenses/EitherLens.left:()Lcom/jnape/palatable/lambda/optics/Lens$Simple",
39
- "file_path_old": "src/main/java/com/jnape/palatable/lambda/optics/lenses/EitherLens.java",
40
- "line_nums_old": "44-46",
41
- "file_path_new": null,
42
- "line_nums_new": null,
43
- "dependency_updated": "deleted",
44
- "score": 0.4694,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 1.0,
48
- "ed": 0.1739,
49
- "class": 1.0,
50
- "tfidf": 0.3233
51
- }
52
- },
53
- {
54
- "dep_id": 0,
55
- "method_sign": "com/jnape/palatable/lambda/optics/lenses/EitherLens._left:()Lcom/jnape/palatable/lambda/optics/Lens$Simple",
56
- "file_path_old": null,
57
- "line_nums_old": null,
58
- "file_path_new": "src/main/java/com/jnape/palatable/lambda/optics/lenses/EitherLens.java",
59
- "line_nums_new": "44-46",
60
- "dependency_updated": "inserted",
61
- "score": 0.4278,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 0.8,
65
- "ed": 0.1739,
66
- "class": 1.0,
67
- "tfidf": 0.2965
68
- }
69
- }
70
- ],
71
- "coverage_gold": 0.7647058823529411,
72
- "branch_coverage_gold": 1.2111,
73
- "method_coverage_gold": 3.3523,
74
- "line_coverage_gold": 3.275,
75
- "is_traceback": false,
76
- "commit_gap": {
77
- "count": 0,
78
- "skipped_commits": []
79
- },
80
- "test_is_refactoring_only": false,
81
- "has_test_dep_change": false,
82
- "all_deps_new": [
83
- "com/jnape/palatable/lambda/optics/functions/View.view:(Lcom/jnape/palatable/lambda/optics/Optic;Ljava/lang/Object;)Ljava/lang/Object",
84
- "com/jnape/palatable/lambda/adt/Maybe.just:(Ljava/lang/Object;)Lcom/jnape/palatable/lambda/adt/Maybe",
85
- "com/jnape/palatable/lambda/adt/Maybe.nothing:()Lcom/jnape/palatable/lambda/adt/Maybe",
86
- "com/jnape/palatable/lambda/adt/Either$Left.equals:(Ljava/lang/Object;)Z",
87
- "com/jnape/palatable/lambda/adt/Maybe$Just.equals:(Ljava/lang/Object;)Z",
88
- "com/jnape/palatable/lambda/optics/lenses/EitherLens._left:()Lcom/jnape/palatable/lambda/optics/Lens$Simple",
89
- "com/jnape/palatable/lambda/adt/Either.right:(Ljava/lang/Object;)Lcom/jnape/palatable/lambda/adt/Either",
90
- "com/jnape/palatable/lambda/optics/functions/Set.set:(Lcom/jnape/palatable/lambda/optics/Optic;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object",
91
- "com/jnape/palatable/lambda/adt/Either.left:(Ljava/lang/Object;)Lcom/jnape/palatable/lambda/adt/Either",
92
- "com/jnape/palatable/lambda/adt/Either$Right.equals:(Ljava/lang/Object;)Z"
93
- ],
94
- "all_deps_old": [
95
- "com/jnape/palatable/lambda/optics/functions/View.view:(Lcom/jnape/palatable/lambda/optics/Optic;Ljava/lang/Object;)Ljava/lang/Object",
96
- "com/jnape/palatable/lambda/adt/Maybe.just:(Ljava/lang/Object;)Lcom/jnape/palatable/lambda/adt/Maybe",
97
- "com/jnape/palatable/lambda/adt/Maybe.nothing:()Lcom/jnape/palatable/lambda/adt/Maybe",
98
- "com/jnape/palatable/lambda/adt/Either$Left.equals:(Ljava/lang/Object;)Z",
99
- "com/jnape/palatable/lambda/adt/Maybe$Just.equals:(Ljava/lang/Object;)Z",
100
- "com/jnape/palatable/lambda/optics/lenses/EitherLens.left:()Lcom/jnape/palatable/lambda/optics/Lens$Simple",
101
- "com/jnape/palatable/lambda/adt/Either.right:(Ljava/lang/Object;)Lcom/jnape/palatable/lambda/adt/Either",
102
- "com/jnape/palatable/lambda/optics/functions/Set.set:(Lcom/jnape/palatable/lambda/optics/Optic;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object",
103
- "com/jnape/palatable/lambda/adt/Either.left:(Ljava/lang/Object;)Lcom/jnape/palatable/lambda/adt/Either",
104
- "com/jnape/palatable/lambda/adt/Either$Right.equals:(Ljava/lang/Object;)Z"
105
- ],
106
- "deps_changes": [
107
- {
108
- "method_sign": "com/jnape/palatable/lambda/optics/lenses/EitherLens._left:()Lcom/jnape/palatable/lambda/optics/Lens$Simple",
109
- "change_type": "ADD",
110
- "file_path_old": null,
111
- "file_path_new": "src/main/java/com/jnape/palatable/lambda/optics/lenses/EitherLens.java",
112
- "source": "production",
113
- "is_test_dependency": false,
114
- "is_refactoring_only": false
115
- },
116
- {
117
- "method_sign": "com/jnape/palatable/lambda/optics/lenses/EitherLens.left:()Lcom/jnape/palatable/lambda/optics/Lens$Simple",
118
- "change_type": "DELETE",
119
- "file_path_old": "src/main/java/com/jnape/palatable/lambda/optics/lenses/EitherLens.java",
120
- "file_path_new": null,
121
- "source": "production",
122
- "is_test_dependency": false,
123
- "is_refactoring_only": false
124
- }
125
- ],
126
- "variant_result": {
127
- "old_on_old": "pass",
128
- "old_on_new": "error",
129
- "new_on_old": "error",
130
- "new_on_new": "pass"
131
- }
132
- },
133
- {
134
- "change_id": "31_palatable_lambda-lambda-5.5.0_bbb97ae_a1ba4b7_EitherLensTest",
135
- "test_sign": "com/jnape/palatable/lambda/optics/lenses/EitherLensTest.rightFocusesOnRightValues:()V",
136
- "class": "EitherLensTest",
137
- "method": "rightFocusesOnRightValues",
138
- "module": "",
139
- "junit_selector": "com.jnape.palatable.lambda.optics.lenses.EitherLensTest#rightFocusesOnRightValues",
140
- "old_test_code": "@Test\npublic void rightFocusesOnRightValues() {\n Lens.Simple<Either<String, Integer>, Maybe<Integer>> right = EitherLens.right();\n assertEquals(just(1), view(right, right(1)));\n assertEquals(nothing(), view(right, left(\"fail\")));\n assertEquals(right(2), set(right, just(2), right(1)));\n assertEquals(right(1), set(right, nothing(), right(1)));\n assertEquals(right(2), set(right, just(2), left(\"fail\")));\n assertEquals(left(\"fail\"), set(right, nothing(), left(\"fail\")));\n}",
141
- "new_test_code": "@Test\npublic void rightFocusesOnRightValues() {\n Lens.Simple<Either<String, Integer>, Maybe<Integer>> right = EitherLens._right();\n assertEquals(just(1), view(right, right(1)));\n assertEquals(nothing(), view(right, left(\"fail\")));\n assertEquals(right(2), set(right, just(2), right(1)));\n assertEquals(right(1), set(right, nothing(), right(1)));\n assertEquals(right(2), set(right, just(2), left(\"fail\")));\n assertEquals(left(\"fail\"), set(right, nothing(), left(\"fail\")));\n}",
142
- "old_test_file_path": [
143
- "src/test/java/com/jnape/palatable/lambda/optics/lenses/EitherLensTest.java"
144
- ],
145
- "old_test_lnum": [
146
- "18-28"
147
- ],
148
- "new_test_lnum": [
149
- "18-28"
150
- ],
151
- "old_production_code": "public static <L, R> Lens.Simple<Either<L, R>, Maybe<R>> right() {\n return simpleLens(CoProduct2::projectB, (lOrR, maybeR) -> maybeR.<Either<L, R>>fmap(Either::right).orElse(lOrR));\n}",
152
- "new_production_code": "",
153
- "focal_file_path": "src/main/java/com/jnape/palatable/lambda/optics/lenses/EitherLens.java",
154
- "focal_method_sign": "com/jnape/palatable/lambda/optics/lenses/EitherLens.right:()Lcom/jnape/palatable/lambda/optics/Lens$Simple",
155
- "focal_all_deps_scored": [
156
- {
157
- "dep_id": 0,
158
- "method_sign": "com/jnape/palatable/lambda/optics/lenses/EitherLens.right:()Lcom/jnape/palatable/lambda/optics/Lens$Simple",
159
- "file_path_old": "src/main/java/com/jnape/palatable/lambda/optics/lenses/EitherLens.java",
160
- "line_nums_old": "29-31",
161
- "file_path_new": null,
162
- "line_nums_new": null,
163
- "dependency_updated": "deleted",
164
- "score": 0.4737,
165
- "signal_scores": {
166
- "nc": 0.0,
167
- "lcs_u": 1.0,
168
- "ed": 0.2,
169
- "class": 1.0,
170
- "tfidf": 0.3233
171
- }
172
- },
173
- {
174
- "dep_id": 1,
175
- "method_sign": "com/jnape/palatable/lambda/optics/lenses/EitherLens._right:()Lcom/jnape/palatable/lambda/optics/Lens$Simple",
176
- "file_path_old": null,
177
- "line_nums_old": null,
178
- "file_path_new": "src/main/java/com/jnape/palatable/lambda/optics/lenses/EitherLens.java",
179
- "line_nums_new": "29-31",
180
- "dependency_updated": "inserted",
181
- "score": 0.438,
182
- "signal_scores": {
183
- "nc": 0.0,
184
- "lcs_u": 0.8333,
185
- "ed": 0.2,
186
- "class": 1.0,
187
- "tfidf": 0.2965
188
- }
189
- }
190
- ],
191
- "coverage_gold": 0.7647058823529411,
192
- "branch_coverage_gold": 1.2111,
193
- "method_coverage_gold": 3.3523,
194
- "line_coverage_gold": 3.275,
195
- "is_traceback": false,
196
- "commit_gap": {
197
- "count": 0,
198
- "skipped_commits": []
199
- },
200
- "test_is_refactoring_only": false,
201
- "has_test_dep_change": false,
202
- "all_deps_new": [
203
- "com/jnape/palatable/lambda/optics/functions/View.view:(Lcom/jnape/palatable/lambda/optics/Optic;Ljava/lang/Object;)Ljava/lang/Object",
204
- "com/jnape/palatable/lambda/adt/Maybe.just:(Ljava/lang/Object;)Lcom/jnape/palatable/lambda/adt/Maybe",
205
- "com/jnape/palatable/lambda/adt/Maybe.nothing:()Lcom/jnape/palatable/lambda/adt/Maybe",
206
- "com/jnape/palatable/lambda/optics/lenses/EitherLens._right:()Lcom/jnape/palatable/lambda/optics/Lens$Simple",
207
- "com/jnape/palatable/lambda/adt/Either$Left.equals:(Ljava/lang/Object;)Z",
208
- "com/jnape/palatable/lambda/adt/Maybe$Just.equals:(Ljava/lang/Object;)Z",
209
- "com/jnape/palatable/lambda/adt/Either.right:(Ljava/lang/Object;)Lcom/jnape/palatable/lambda/adt/Either",
210
- "com/jnape/palatable/lambda/optics/functions/Set.set:(Lcom/jnape/palatable/lambda/optics/Optic;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object",
211
- "com/jnape/palatable/lambda/adt/Either.left:(Ljava/lang/Object;)Lcom/jnape/palatable/lambda/adt/Either",
212
- "com/jnape/palatable/lambda/adt/Either$Right.equals:(Ljava/lang/Object;)Z"
213
- ],
214
- "all_deps_old": [
215
- "com/jnape/palatable/lambda/optics/functions/View.view:(Lcom/jnape/palatable/lambda/optics/Optic;Ljava/lang/Object;)Ljava/lang/Object",
216
- "com/jnape/palatable/lambda/adt/Maybe.just:(Ljava/lang/Object;)Lcom/jnape/palatable/lambda/adt/Maybe",
217
- "com/jnape/palatable/lambda/adt/Maybe.nothing:()Lcom/jnape/palatable/lambda/adt/Maybe",
218
- "com/jnape/palatable/lambda/optics/lenses/EitherLens.right:()Lcom/jnape/palatable/lambda/optics/Lens$Simple",
219
- "com/jnape/palatable/lambda/adt/Either$Left.equals:(Ljava/lang/Object;)Z",
220
- "com/jnape/palatable/lambda/adt/Maybe$Just.equals:(Ljava/lang/Object;)Z",
221
- "com/jnape/palatable/lambda/adt/Either.right:(Ljava/lang/Object;)Lcom/jnape/palatable/lambda/adt/Either",
222
- "com/jnape/palatable/lambda/optics/functions/Set.set:(Lcom/jnape/palatable/lambda/optics/Optic;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object",
223
- "com/jnape/palatable/lambda/adt/Either.left:(Ljava/lang/Object;)Lcom/jnape/palatable/lambda/adt/Either",
224
- "com/jnape/palatable/lambda/adt/Either$Right.equals:(Ljava/lang/Object;)Z"
225
- ],
226
- "deps_changes": [
227
- {
228
- "method_sign": "com/jnape/palatable/lambda/optics/lenses/EitherLens.right:()Lcom/jnape/palatable/lambda/optics/Lens$Simple",
229
- "change_type": "DELETE",
230
- "file_path_old": "src/main/java/com/jnape/palatable/lambda/optics/lenses/EitherLens.java",
231
- "file_path_new": null,
232
- "source": "production",
233
- "is_test_dependency": false,
234
- "is_refactoring_only": false
235
- },
236
- {
237
- "method_sign": "com/jnape/palatable/lambda/optics/lenses/EitherLens._right:()Lcom/jnape/palatable/lambda/optics/Lens$Simple",
238
- "change_type": "ADD",
239
- "file_path_old": null,
240
- "file_path_new": "src/main/java/com/jnape/palatable/lambda/optics/lenses/EitherLens.java",
241
- "source": "production",
242
- "is_test_dependency": false,
243
- "is_refactoring_only": false
244
- }
245
- ],
246
- "variant_result": {
247
- "old_on_old": "pass",
248
- "old_on_new": "error",
249
- "new_on_old": "error",
250
- "new_on_new": "pass"
251
- }
252
- }
253
- ],
254
- "version": "lambda-5.5.0",
255
- "java_version": 8
256
- }
257
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pedrovgs_Algorithms-master.json DELETED
@@ -1,665 +0,0 @@
1
- [
2
- {
3
- "task_id": "pedrovgs_Algorithms-master__261c263_b7ca0a2__FindLongestConsecutiveSequenceTest_afceb59e",
4
- "project_name": "pedrovgs_Algorithms-master",
5
- "git_clone_url": "https://github.com/pedrovgs/Algorithms.git",
6
- "rev1": "261c263fe40baff31a46b4f19f0099ab6015b3d7",
7
- "rev2": "b7ca0a2afc43e167e38993cd0ede6e8c1fb60ff8",
8
- "rev1_date": "2014-12-15T23:44:04Z",
9
- "rev2_date": "2014-12-15T23:44:58Z",
10
- "git_diff_url": "https://github.com/pedrovgs/Algorithms/compare/261c263fe40baff31a46b4f19f0099ab6015b3d7...b7ca0a2afc43e167e38993cd0ede6e8c1fb60ff8",
11
- "test_file": "src/test/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequenceTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "11_pedrovgs_Algorithms-master_261c263_b7ca0a2_FindLongestConsecutiveSequenceTest",
15
- "test_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequenceTest.shouldReturnLengthArrayIfTheArrayIsOneConsecutiveSequence:()V",
16
- "class": "FindLongestConsecutiveSequenceTest",
17
- "method": "shouldReturnLengthArrayIfTheArrayIsOneConsecutiveSequence",
18
- "module": "",
19
- "junit_selector": "com.github.pedrovgs.problem31.FindLongestConsecutiveSequenceTest#shouldReturnLengthArrayIfTheArrayIsOneConsecutiveSequence",
20
- "old_test_code": "@Test\npublic void shouldReturnLengthArrayIfTheArrayIsOneConsecutiveSequence() {\n int[] array = { 1, 3, 4, 5, 64, 4, 5, 6, 7, 8, 9, 98, -1, -2 };\n int sequenceLength = lcs.find(array);\n assertEquals(7, sequenceLength);\n}",
21
- "new_test_code": "@Test\npublic void shouldReturnLengthArrayIfTheArrayIsOneConsecutiveSequence() {\n int[] array = { 1, 3, 4, 5, 64, 4, 5, 6, 7, 8, 9, 98, -1, -2 };\n int sequenceLength = lcs.findIterative(array);\n assertEquals(7, sequenceLength);\n}",
22
- "old_test_file_path": [
23
- "src/test/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequenceTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "55-61"
27
- ],
28
- "new_test_lnum": [
29
- "54-60"
30
- ],
31
- "old_production_code": "",
32
- "new_production_code": "public int findIterative(int[] numbers) {\n if (numbers == null) {\n throw new IllegalArgumentException(\"You can't pass a null array as input.\");\n }\n if (numbers.length == 0) {\n return 0;\n }\n int result = 0;\n int start = 0, end = 0;\n for (int i = 1; i < numbers.length; i++) {\n if (numbers[i - 1] < numbers[i]) {\n end = i;\n } else {\n start = i;\n }\n if (end - start > result) {\n result = end - start;\n }\n }\n return result + 1;\n}",
33
- "focal_file_path": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
34
- "focal_method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 1,
38
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I",
39
- "file_path_old": null,
40
- "line_nums_old": null,
41
- "file_path_new": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
42
- "line_nums_new": "32-53",
43
- "dependency_updated": "inserted",
44
- "score": 0.3634,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 0.7692,
48
- "ed": 0.1754,
49
- "class": 1.0,
50
- "tfidf": 0.0449
51
- }
52
- },
53
- {
54
- "dep_id": 0,
55
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.find:([I)I",
56
- "file_path_old": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
57
- "line_nums_old": "32-53",
58
- "file_path_new": null,
59
- "line_nums_new": null,
60
- "dependency_updated": "deleted",
61
- "score": 0.3398,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 0.75,
65
- "ed": 0.0526,
66
- "class": 1.0,
67
- "tfidf": 0.0449
68
- }
69
- }
70
- ],
71
- "coverage_gold": 0.8461538461538461,
72
- "branch_coverage_gold": 1.6667,
73
- "method_coverage_gold": 1.3158,
74
- "line_coverage_gold": 1.6371,
75
- "is_traceback": false,
76
- "commit_gap": {
77
- "count": 0,
78
- "skipped_commits": []
79
- },
80
- "test_is_refactoring_only": false,
81
- "has_test_dep_change": false,
82
- "all_deps_new": [
83
- "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I"
84
- ],
85
- "all_deps_old": [
86
- "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.find:([I)I"
87
- ],
88
- "deps_changes": [
89
- {
90
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.find:([I)I",
91
- "change_type": "DELETE",
92
- "file_path_old": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
93
- "file_path_new": null,
94
- "source": "production",
95
- "is_test_dependency": false,
96
- "is_refactoring_only": false
97
- },
98
- {
99
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I",
100
- "change_type": "ADD",
101
- "file_path_old": null,
102
- "file_path_new": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
103
- "source": "production",
104
- "is_test_dependency": false,
105
- "is_refactoring_only": false
106
- }
107
- ],
108
- "variant_result": {
109
- "old_on_old": "pass",
110
- "old_on_new": "error",
111
- "new_on_old": "error",
112
- "new_on_new": "pass"
113
- }
114
- },
115
- {
116
- "change_id": "12_pedrovgs_Algorithms-master_261c263_b7ca0a2_FindLongestConsecutiveSequenceTest",
117
- "test_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequenceTest.shouldReturnZeroIfTheArrayIsEmpty:()V",
118
- "class": "FindLongestConsecutiveSequenceTest",
119
- "method": "shouldReturnZeroIfTheArrayIsEmpty",
120
- "module": "",
121
- "junit_selector": "com.github.pedrovgs.problem31.FindLongestConsecutiveSequenceTest#shouldReturnZeroIfTheArrayIsEmpty",
122
- "old_test_code": "@Test\npublic void shouldReturnZeroIfTheArrayIsEmpty() {\n int[] array = {};\n int sequenceLength = lcs.find(array);\n assertEquals(0, sequenceLength);\n}",
123
- "new_test_code": "@Test\npublic void shouldReturnZeroIfTheArrayIsEmpty() {\n int[] array = {};\n int sequenceLength = lcs.findIterative(array);\n assertEquals(0, sequenceLength);\n}",
124
- "old_test_file_path": [
125
- "src/test/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequenceTest.java"
126
- ],
127
- "old_test_lnum": [
128
- "39-45"
129
- ],
130
- "new_test_lnum": [
131
- "38-44"
132
- ],
133
- "old_production_code": "",
134
- "new_production_code": "public int findIterative(int[] numbers) {\n if (numbers == null) {\n throw new IllegalArgumentException(\"You can't pass a null array as input.\");\n }\n if (numbers.length == 0) {\n return 0;\n }\n int result = 0;\n int start = 0, end = 0;\n for (int i = 1; i < numbers.length; i++) {\n if (numbers[i - 1] < numbers[i]) {\n end = i;\n } else {\n start = i;\n }\n if (end - start > result) {\n result = end - start;\n }\n }\n return result + 1;\n}",
135
- "focal_file_path": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
136
- "focal_method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I",
137
- "focal_all_deps_scored": [
138
- {
139
- "dep_id": 1,
140
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I",
141
- "file_path_old": null,
142
- "line_nums_old": null,
143
- "file_path_new": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
144
- "line_nums_new": "32-53",
145
- "dependency_updated": "inserted",
146
- "score": 0.3473,
147
- "signal_scores": {
148
- "nc": 0.0,
149
- "lcs_u": 0.6154,
150
- "ed": 0.2424,
151
- "class": 1.0,
152
- "tfidf": 0.0449
153
- }
154
- },
155
- {
156
- "dep_id": 0,
157
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.find:([I)I",
158
- "file_path_old": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
159
- "line_nums_old": "32-53",
160
- "file_path_new": null,
161
- "line_nums_new": null,
162
- "dependency_updated": "deleted",
163
- "score": 0.297,
164
- "signal_scores": {
165
- "nc": 0.0,
166
- "lcs_u": 0.5,
167
- "ed": 0.0606,
168
- "class": 1.0,
169
- "tfidf": 0.0449
170
- }
171
- }
172
- ],
173
- "coverage_gold": 0.23076923076923078,
174
- "branch_coverage_gold": 0.4167,
175
- "method_coverage_gold": 1.3158,
176
- "line_coverage_gold": 0.5457,
177
- "is_traceback": false,
178
- "commit_gap": {
179
- "count": 0,
180
- "skipped_commits": []
181
- },
182
- "test_is_refactoring_only": false,
183
- "has_test_dep_change": false,
184
- "all_deps_new": [
185
- "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I"
186
- ],
187
- "all_deps_old": [
188
- "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.find:([I)I"
189
- ],
190
- "deps_changes": [
191
- {
192
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.find:([I)I",
193
- "change_type": "DELETE",
194
- "file_path_old": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
195
- "file_path_new": null,
196
- "source": "production",
197
- "is_test_dependency": false,
198
- "is_refactoring_only": false
199
- },
200
- {
201
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I",
202
- "change_type": "ADD",
203
- "file_path_old": null,
204
- "file_path_new": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
205
- "source": "production",
206
- "is_test_dependency": false,
207
- "is_refactoring_only": false
208
- }
209
- ],
210
- "variant_result": {
211
- "old_on_old": "pass",
212
- "old_on_new": "error",
213
- "new_on_old": "error",
214
- "new_on_new": "pass"
215
- }
216
- },
217
- {
218
- "change_id": "13_pedrovgs_Algorithms-master_261c263_b7ca0a2_FindLongestConsecutiveSequenceTest",
219
- "test_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequenceTest.shouldNotAcceptNullArrays:()V",
220
- "class": "FindLongestConsecutiveSequenceTest",
221
- "method": "shouldNotAcceptNullArrays",
222
- "module": "",
223
- "junit_selector": "com.github.pedrovgs.problem31.FindLongestConsecutiveSequenceTest#shouldNotAcceptNullArrays",
224
- "old_test_code": "@Test(expected = IllegalArgumentException.class)\npublic void shouldNotAcceptNullArrays() {\n lcs.find(null);\n}",
225
- "new_test_code": "@Test(expected = IllegalArgumentException.class)\npublic void shouldNotAcceptNullArrays() {\n lcs.findIterative(null);\n}",
226
- "old_test_file_path": [
227
- "src/test/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequenceTest.java"
228
- ],
229
- "old_test_lnum": [
230
- "35-37"
231
- ],
232
- "new_test_lnum": [
233
- "34-36"
234
- ],
235
- "old_production_code": "",
236
- "new_production_code": "public int findIterative(int[] numbers) {\n if (numbers == null) {\n throw new IllegalArgumentException(\"You can't pass a null array as input.\");\n }\n if (numbers.length == 0) {\n return 0;\n }\n int result = 0;\n int start = 0, end = 0;\n for (int i = 1; i < numbers.length; i++) {\n if (numbers[i - 1] < numbers[i]) {\n end = i;\n } else {\n start = i;\n }\n if (end - start > result) {\n result = end - start;\n }\n }\n return result + 1;\n}",
237
- "focal_file_path": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
238
- "focal_method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I",
239
- "focal_all_deps_scored": [
240
- {
241
- "dep_id": 1,
242
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I",
243
- "file_path_old": null,
244
- "line_nums_old": null,
245
- "file_path_new": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
246
- "line_nums_new": "32-53",
247
- "dependency_updated": "inserted",
248
- "score": 0.3044,
249
- "signal_scores": {
250
- "nc": 0.0,
251
- "lcs_u": 0.3846,
252
- "ed": 0.16,
253
- "class": 1.0,
254
- "tfidf": 0.0934
255
- }
256
- },
257
- {
258
- "dep_id": 0,
259
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.find:([I)I",
260
- "file_path_old": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
261
- "line_nums_old": "32-53",
262
- "file_path_new": null,
263
- "line_nums_new": null,
264
- "dependency_updated": "deleted",
265
- "score": 0.2609,
266
- "signal_scores": {
267
- "nc": 0.0,
268
- "lcs_u": 0.25,
269
- "ed": 0.04,
270
- "class": 1.0,
271
- "tfidf": 0.0934
272
- }
273
- }
274
- ],
275
- "coverage_gold": 0.15384615384615385,
276
- "branch_coverage_gold": 0.2083,
277
- "method_coverage_gold": 1.3158,
278
- "line_coverage_gold": 0.4093,
279
- "is_traceback": false,
280
- "commit_gap": {
281
- "count": 0,
282
- "skipped_commits": []
283
- },
284
- "test_is_refactoring_only": false,
285
- "has_test_dep_change": false,
286
- "all_deps_new": [
287
- "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I"
288
- ],
289
- "all_deps_old": [
290
- "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.find:([I)I"
291
- ],
292
- "deps_changes": [
293
- {
294
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.find:([I)I",
295
- "change_type": "DELETE",
296
- "file_path_old": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
297
- "file_path_new": null,
298
- "source": "production",
299
- "is_test_dependency": false,
300
- "is_refactoring_only": false
301
- },
302
- {
303
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I",
304
- "change_type": "ADD",
305
- "file_path_old": null,
306
- "file_path_new": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
307
- "source": "production",
308
- "is_test_dependency": false,
309
- "is_refactoring_only": false
310
- }
311
- ],
312
- "variant_result": {
313
- "old_on_old": "pass",
314
- "old_on_new": "error",
315
- "new_on_old": "error",
316
- "new_on_new": "pass"
317
- }
318
- },
319
- {
320
- "change_id": "14_pedrovgs_Algorithms-master_261c263_b7ca0a2_FindLongestConsecutiveSequenceTest",
321
- "test_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequenceTest.shouldReturnZeroIfThereIsNoAnyConsecutiveSequence:()V",
322
- "class": "FindLongestConsecutiveSequenceTest",
323
- "method": "shouldReturnZeroIfThereIsNoAnyConsecutiveSequence",
324
- "module": "",
325
- "junit_selector": "com.github.pedrovgs.problem31.FindLongestConsecutiveSequenceTest#shouldReturnZeroIfThereIsNoAnyConsecutiveSequence",
326
- "old_test_code": "@Test\npublic void shouldReturnZeroIfThereIsNoAnyConsecutiveSequence() {\n int[] array = { 1, 2, 3, 4, 5, 6 };\n int sequenceLength = lcs.find(array);\n assertEquals(6, sequenceLength);\n}",
327
- "new_test_code": "@Test\npublic void shouldReturnZeroIfThereIsNoAnyConsecutiveSequence() {\n int[] array = { 1, 2, 3, 4, 5, 6 };\n int sequenceLength = lcs.findIterative(array);\n assertEquals(6, sequenceLength);\n}",
328
- "old_test_file_path": [
329
- "src/test/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequenceTest.java"
330
- ],
331
- "old_test_lnum": [
332
- "47-53"
333
- ],
334
- "new_test_lnum": [
335
- "46-52"
336
- ],
337
- "old_production_code": "",
338
- "new_production_code": "public int findIterative(int[] numbers) {\n if (numbers == null) {\n throw new IllegalArgumentException(\"You can't pass a null array as input.\");\n }\n if (numbers.length == 0) {\n return 0;\n }\n int result = 0;\n int start = 0, end = 0;\n for (int i = 1; i < numbers.length; i++) {\n if (numbers[i - 1] < numbers[i]) {\n end = i;\n } else {\n start = i;\n }\n if (end - start > result) {\n result = end - start;\n }\n }\n return result + 1;\n}",
339
- "focal_file_path": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
340
- "focal_method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I",
341
- "focal_all_deps_scored": [
342
- {
343
- "dep_id": 1,
344
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I",
345
- "file_path_old": null,
346
- "line_nums_old": null,
347
- "file_path_new": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
348
- "line_nums_new": "32-53",
349
- "dependency_updated": "inserted",
350
- "score": 0.3682,
351
- "signal_scores": {
352
- "nc": 0.0,
353
- "lcs_u": 0.7692,
354
- "ed": 0.2041,
355
- "class": 1.0,
356
- "tfidf": 0.0449
357
- }
358
- },
359
- {
360
- "dep_id": 0,
361
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.find:([I)I",
362
- "file_path_old": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
363
- "line_nums_old": "32-53",
364
- "file_path_new": null,
365
- "line_nums_new": null,
366
- "dependency_updated": "deleted",
367
- "score": 0.3412,
368
- "signal_scores": {
369
- "nc": 0.0,
370
- "lcs_u": 0.75,
371
- "ed": 0.0612,
372
- "class": 1.0,
373
- "tfidf": 0.0449
374
- }
375
- }
376
- ],
377
- "coverage_gold": 0.7692307692307693,
378
- "branch_coverage_gold": 1.25,
379
- "method_coverage_gold": 1.3158,
380
- "line_coverage_gold": 1.5007,
381
- "is_traceback": false,
382
- "commit_gap": {
383
- "count": 0,
384
- "skipped_commits": []
385
- },
386
- "test_is_refactoring_only": false,
387
- "has_test_dep_change": false,
388
- "all_deps_new": [
389
- "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I"
390
- ],
391
- "all_deps_old": [
392
- "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.find:([I)I"
393
- ],
394
- "deps_changes": [
395
- {
396
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.find:([I)I",
397
- "change_type": "DELETE",
398
- "file_path_old": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
399
- "file_path_new": null,
400
- "source": "production",
401
- "is_test_dependency": false,
402
- "is_refactoring_only": false
403
- },
404
- {
405
- "method_sign": "com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.findIterative:([I)I",
406
- "change_type": "ADD",
407
- "file_path_old": null,
408
- "file_path_new": "src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java",
409
- "source": "production",
410
- "is_test_dependency": false,
411
- "is_refactoring_only": false
412
- }
413
- ],
414
- "variant_result": {
415
- "old_on_old": "pass",
416
- "old_on_new": "error",
417
- "new_on_old": "error",
418
- "new_on_new": "pass"
419
- }
420
- }
421
- ],
422
- "version": "master",
423
- "java_version": 11
424
- },
425
- {
426
- "task_id": "pedrovgs_Algorithms-master__cd2e02b_3030c54__SumBinaryNumberTest_3178d4f4",
427
- "project_name": "pedrovgs_Algorithms-master",
428
- "git_clone_url": "https://github.com/pedrovgs/Algorithms.git",
429
- "rev1": "cd2e02b8bc249becd7dc58407c7a23d470e14be0",
430
- "rev2": "3030c54ca85e874f7622ea77fccd9829e0b64032",
431
- "rev1_date": "2016-02-04T10:30:42Z",
432
- "rev2_date": "2016-02-04T10:51:49Z",
433
- "git_diff_url": "https://github.com/pedrovgs/Algorithms/compare/cd2e02b8bc249becd7dc58407c7a23d470e14be0...3030c54ca85e874f7622ea77fccd9829e0b64032",
434
- "test_file": "src/test/java/com/github/pedrovgs/problem3/SumBinaryNumberTest.java",
435
- "test_changes": [
436
- {
437
- "change_id": "4_pedrovgs_Algorithms-master_cd2e02b_3030c54_SumBinaryNumberTest",
438
- "test_sign": "com/github/pedrovgs/problem3/SumBinaryNumberTest.onePlusOneEqualsTwoBasedOnCount:()V",
439
- "class": "SumBinaryNumberTest",
440
- "method": "onePlusOneEqualsTwoBasedOnCount",
441
- "module": "",
442
- "junit_selector": "com.github.pedrovgs.problem3.SumBinaryNumberTest#onePlusOneEqualsTwoBasedOnCount",
443
- "old_test_code": "@Test\npublic void onePlusOneEqualsTwoBasedOnCount() {\n String n1 = \"01\";\n String n2 = \"01\";\n String result = sumBinaryNumbers.sumBinaryNumbersBasedOnCount(n1, n2);\n assertEquals(\"010\", result);\n}",
444
- "new_test_code": "@Test\npublic void onePlusOneEqualsTwoBasedOnCount() {\n String n1 = \"01\";\n String n2 = \"01\";\n String result = sumBinaryNumbers.sumBinaryNumbersBasedOnCount(n1, n2);\n assertEquals(\"10\", result);\n}",
445
- "old_test_file_path": [
446
- "src/test/java/com/github/pedrovgs/problem3/SumBinaryNumberTest.java"
447
- ],
448
- "old_test_lnum": [
449
- "153-160"
450
- ],
451
- "new_test_lnum": [
452
- "153-160"
453
- ],
454
- "old_production_code": "public String sumBinaryNumbersBasedOnCount(String n1, String n2) {\n validateInput(n1, n2);\n StringBuilder result = new StringBuilder();\n int lengthVal1 = n1.length();\n int lengthVal2 = n2.length();\n int length = Math.max(lengthVal1, lengthVal2);\n int acc = 0;\n for (int i = 0; i < length; i++) {\n char c1 = i >= lengthVal1 ? '0' : n1.charAt(lengthVal1 - i - 1);\n char c2 = i >= lengthVal2 ? '0' : n2.charAt(lengthVal2 - i - 1);\n if (c1 == '0' && c2 == '0') {\n if (acc == 0) {\n result.append(0);\n } else {\n result.append(1);\n }\n acc = 0;\n } else if (c1 == '0' && c2 == '1' || c1 == '1' && c2 == '0') {\n if (acc == 0) {\n result.append(1);\n acc = 0;\n } else {\n result.append(0);\n acc = 1;\n }\n } else if (c1 == '1' && c2 == '1') {\n if (acc == 0) {\n result.append(0);\n } else {\n result.append(1);\n }\n acc = 1;\n } else {\n throw new IllegalArgumentException(\"Error parsing input data, review your parameters, should be a valid binary number!\");\n }\n }\n result.append(acc);\n return result.reverse().toString();\n}",
455
- "new_production_code": "public String sumBinaryNumbersBasedOnCount(String n1, String n2) {\n validateInput(n1, n2);\n StringBuilder result = new StringBuilder();\n int lengthVal1 = n1.length();\n int lengthVal2 = n2.length();\n int length = Math.max(lengthVal1, lengthVal2);\n int carry = 0;\n int sum = 0;\n int remainder = 0;\n for (int i = 0; i < length; i++) {\n int digit1 = i >= lengthVal1 ? 0 : n1.charAt(lengthVal1 - i - 1) - '0';\n int digit2 = i >= lengthVal2 ? 0 : n2.charAt(lengthVal2 - i - 1) - '0';\n if (digit1 < 2 && digit2 < 2) {\n sum = digit1 + digit2 + carry;\n carry = sum / 2;\n remainder = sum % 2;\n result.append((char) (remainder + '0'));\n } else {\n throw new IllegalArgumentException(\"Error parsing input data, review your parameters, should be a valid binary number!\");\n }\n }\n if (carry != 0)\n result.append((char) (carry + '0'));\n return result.reverse().toString();\n}",
456
- "focal_file_path": "src/main/java/com/github/pedrovgs/problem3/SumBinaryNumbers.java",
457
- "focal_method_sign": "com/github/pedrovgs/problem3/SumBinaryNumbers.sumBinaryNumbersBasedOnCount:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String",
458
- "focal_all_deps_scored": [
459
- {
460
- "dep_id": 0,
461
- "method_sign": "com/github/pedrovgs/problem3/SumBinaryNumbers.sumBinaryNumbersBasedOnCount:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String",
462
- "file_path_old": "src/main/java/com/github/pedrovgs/problem3/SumBinaryNumbers.java",
463
- "line_nums_old": "84-127",
464
- "file_path_new": "src/main/java/com/github/pedrovgs/problem3/SumBinaryNumbers.java",
465
- "line_nums_new": "84-112",
466
- "dependency_updated": "updated",
467
- "score": null,
468
- "signal_scores": {}
469
- }
470
- ],
471
- "coverage_gold": 0.9,
472
- "branch_coverage_gold": 0.8621,
473
- "method_coverage_gold": 0.8596,
474
- "line_coverage_gold": 1.2658,
475
- "is_traceback": false,
476
- "commit_gap": {
477
- "count": 0,
478
- "skipped_commits": []
479
- },
480
- "test_is_refactoring_only": false,
481
- "has_test_dep_change": false,
482
- "all_deps_new": [
483
- "com/github/pedrovgs/problem3/SumBinaryNumbers.sumBinaryNumbersBasedOnCount:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String"
484
- ],
485
- "all_deps_old": [
486
- "com/github/pedrovgs/problem3/SumBinaryNumbers.sumBinaryNumbersBasedOnCount:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String"
487
- ],
488
- "deps_changes": [
489
- {
490
- "method_sign": "com/github/pedrovgs/problem3/SumBinaryNumbers.sumBinaryNumbersBasedOnCount:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String",
491
- "change_type": "UPDATE",
492
- "file_path_old": "src/main/java/com/github/pedrovgs/problem3/SumBinaryNumbers.java",
493
- "file_path_new": "src/main/java/com/github/pedrovgs/problem3/SumBinaryNumbers.java",
494
- "source": "production",
495
- "is_test_dependency": false,
496
- "is_refactoring_only": false
497
- }
498
- ],
499
- "variant_result": {
500
- "old_on_old": "pass",
501
- "old_on_new": "fail",
502
- "new_on_old": "fail",
503
- "new_on_new": "pass"
504
- }
505
- }
506
- ],
507
- "version": "master",
508
- "java_version": 11
509
- },
510
- {
511
- "task_id": "pedrovgs_Algorithms-master__d54df58_35dc1d9__UniqueCharsTest_f45f6fbf",
512
- "project_name": "pedrovgs_Algorithms-master",
513
- "git_clone_url": "https://github.com/pedrovgs/Algorithms.git",
514
- "rev1": "d54df58a8d1767b3536da3233de9c0e8e04b9248",
515
- "rev2": "35dc1d92df57b391ca632ff0eea93bf49e0ea16e",
516
- "rev1_date": "2015-01-03T23:58:39Z",
517
- "rev2_date": "2015-01-04T00:09:43Z",
518
- "git_diff_url": "https://github.com/pedrovgs/Algorithms/compare/d54df58a8d1767b3536da3233de9c0e8e04b9248...35dc1d92df57b391ca632ff0eea93bf49e0ea16e",
519
- "test_file": "src/test/java/com/github/pedrovgs/problem50/UniqueCharsTest.java",
520
- "test_changes": [
521
- {
522
- "change_id": "16_pedrovgs_Algorithms-master_d54df58_35dc1d9_UniqueCharsTest",
523
- "test_sign": "com/github/pedrovgs/problem50/UniqueCharsTest.shouldReturnFalseIfInputStringIsEmpty:()V",
524
- "class": "UniqueCharsTest",
525
- "method": "shouldReturnFalseIfInputStringIsEmpty",
526
- "module": "",
527
- "junit_selector": "com.github.pedrovgs.problem50.UniqueCharsTest#shouldReturnFalseIfInputStringIsEmpty",
528
- "old_test_code": "@Test\npublic void shouldReturnFalseIfInputStringIsEmpty() {\n assertFalse(uniqueChars.evaluate(\"\"));\n}",
529
- "new_test_code": "@Test\npublic void shouldReturnFalseIfInputStringIsEmpty() {\n assertTrue(uniqueChars.evaluate(\"\"));\n}",
530
- "old_test_file_path": [
531
- "src/test/java/com/github/pedrovgs/problem50/UniqueCharsTest.java"
532
- ],
533
- "old_test_lnum": [
534
- "39-41"
535
- ],
536
- "new_test_lnum": [
537
- "39-41"
538
- ],
539
- "old_production_code": "public boolean evaluate(String input) {\n validateInput(input);\n Map<String, Integer> chars = countCharAppearances(input);\n return containsDuplicatedChars(chars);\n}",
540
- "new_production_code": "public boolean evaluate(String input) {\n validateInput(input);\n Map<String, Integer> chars = countCharAppearances(input);\n return !containsDuplicatedChars(chars);\n}",
541
- "focal_file_path": "src/main/java/com/github/pedrovgs/problem50/UniqueChars.java",
542
- "focal_method_sign": "com/github/pedrovgs/problem50/UniqueChars.evaluate:(Ljava/lang/String;)Z",
543
- "focal_all_deps_scored": [
544
- {
545
- "dep_id": 0,
546
- "method_sign": "com/github/pedrovgs/problem50/UniqueChars.evaluate:(Ljava/lang/String;)Z",
547
- "file_path_old": "src/main/java/com/github/pedrovgs/problem50/UniqueChars.java",
548
- "line_nums_old": "34-38",
549
- "file_path_new": "src/main/java/com/github/pedrovgs/problem50/UniqueChars.java",
550
- "line_nums_new": "34-38",
551
- "dependency_updated": "updated",
552
- "score": null,
553
- "signal_scores": {}
554
- }
555
- ],
556
- "coverage_gold": 1.0,
557
- "branch_coverage_gold": 0.5063,
558
- "method_coverage_gold": 2.2321,
559
- "line_coverage_gold": 1.0657,
560
- "is_traceback": false,
561
- "commit_gap": {
562
- "count": 0,
563
- "skipped_commits": []
564
- },
565
- "test_is_refactoring_only": false,
566
- "has_test_dep_change": false,
567
- "all_deps_new": [
568
- "com/github/pedrovgs/problem50/UniqueChars.evaluate:(Ljava/lang/String;)Z"
569
- ],
570
- "all_deps_old": [
571
- "com/github/pedrovgs/problem50/UniqueChars.evaluate:(Ljava/lang/String;)Z"
572
- ],
573
- "deps_changes": [
574
- {
575
- "method_sign": "com/github/pedrovgs/problem50/UniqueChars.evaluate:(Ljava/lang/String;)Z",
576
- "change_type": "UPDATE",
577
- "file_path_old": "src/main/java/com/github/pedrovgs/problem50/UniqueChars.java",
578
- "file_path_new": "src/main/java/com/github/pedrovgs/problem50/UniqueChars.java",
579
- "source": "production",
580
- "is_test_dependency": false,
581
- "is_refactoring_only": false
582
- }
583
- ],
584
- "variant_result": {
585
- "old_on_old": "pass",
586
- "old_on_new": "fail",
587
- "new_on_old": "fail",
588
- "new_on_new": "pass"
589
- }
590
- },
591
- {
592
- "change_id": "17_pedrovgs_Algorithms-master_d54df58_35dc1d9_UniqueCharsTest",
593
- "test_sign": "com/github/pedrovgs/problem50/UniqueCharsTest.shouldReturnFalseIfInputStringDoesNotContainDuplicatedChars:()V",
594
- "class": "UniqueCharsTest",
595
- "method": "shouldReturnFalseIfInputStringDoesNotContainDuplicatedChars",
596
- "module": "",
597
- "junit_selector": "com.github.pedrovgs.problem50.UniqueCharsTest#shouldReturnFalseIfInputStringDoesNotContainDuplicatedChars",
598
- "old_test_code": "@Test\npublic void shouldReturnFalseIfInputStringDoesNotContainDuplicatedChars() {\n assertFalse(uniqueChars.evaluate(\"pedro\"));\n}",
599
- "new_test_code": "@Test\npublic void shouldReturnFalseIfInputStringDoesNotContainDuplicatedChars() {\n assertTrue(uniqueChars.evaluate(\"pedro\"));\n}",
600
- "old_test_file_path": [
601
- "src/test/java/com/github/pedrovgs/problem50/UniqueCharsTest.java"
602
- ],
603
- "old_test_lnum": [
604
- "47-49"
605
- ],
606
- "new_test_lnum": [
607
- "47-49"
608
- ],
609
- "old_production_code": "public boolean evaluate(String input) {\n validateInput(input);\n Map<String, Integer> chars = countCharAppearances(input);\n return containsDuplicatedChars(chars);\n}",
610
- "new_production_code": "public boolean evaluate(String input) {\n validateInput(input);\n Map<String, Integer> chars = countCharAppearances(input);\n return !containsDuplicatedChars(chars);\n}",
611
- "focal_file_path": "src/main/java/com/github/pedrovgs/problem50/UniqueChars.java",
612
- "focal_method_sign": "com/github/pedrovgs/problem50/UniqueChars.evaluate:(Ljava/lang/String;)Z",
613
- "focal_all_deps_scored": [
614
- {
615
- "dep_id": 0,
616
- "method_sign": "com/github/pedrovgs/problem50/UniqueChars.evaluate:(Ljava/lang/String;)Z",
617
- "file_path_old": "src/main/java/com/github/pedrovgs/problem50/UniqueChars.java",
618
- "line_nums_old": "34-38",
619
- "file_path_new": "src/main/java/com/github/pedrovgs/problem50/UniqueChars.java",
620
- "line_nums_new": "34-38",
621
- "dependency_updated": "updated",
622
- "score": null,
623
- "signal_scores": {}
624
- }
625
- ],
626
- "coverage_gold": 1.0,
627
- "branch_coverage_gold": 1.0127,
628
- "method_coverage_gold": 2.6786,
629
- "line_coverage_gold": 1.5986,
630
- "is_traceback": false,
631
- "commit_gap": {
632
- "count": 0,
633
- "skipped_commits": []
634
- },
635
- "test_is_refactoring_only": false,
636
- "has_test_dep_change": false,
637
- "all_deps_new": [
638
- "com/github/pedrovgs/problem50/UniqueChars.evaluate:(Ljava/lang/String;)Z"
639
- ],
640
- "all_deps_old": [
641
- "com/github/pedrovgs/problem50/UniqueChars.evaluate:(Ljava/lang/String;)Z"
642
- ],
643
- "deps_changes": [
644
- {
645
- "method_sign": "com/github/pedrovgs/problem50/UniqueChars.evaluate:(Ljava/lang/String;)Z",
646
- "change_type": "UPDATE",
647
- "file_path_old": "src/main/java/com/github/pedrovgs/problem50/UniqueChars.java",
648
- "file_path_new": "src/main/java/com/github/pedrovgs/problem50/UniqueChars.java",
649
- "source": "production",
650
- "is_test_dependency": false,
651
- "is_refactoring_only": false
652
- }
653
- ],
654
- "variant_result": {
655
- "old_on_old": "pass",
656
- "old_on_new": "fail",
657
- "new_on_old": "fail",
658
- "new_on_new": "pass"
659
- }
660
- }
661
- ],
662
- "version": "master",
663
- "java_version": 11
664
- }
665
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pf4j_pf4j-release-3.15.0.json DELETED
@@ -1,229 +0,0 @@
1
- [
2
- {
3
- "task_id": "pf4j_pf4j-release-3.15.0__dd45a1e_40846fa__DefaultPluginRepositoryTest_c5e2114b",
4
- "project_name": "pf4j_pf4j-release-3.15.0",
5
- "git_clone_url": "https://github.com/pf4j/pf4j.git",
6
- "rev1": "dd45a1e6dcfdcc39b3fe182417d48a2e801f7d28",
7
- "rev2": "40846fa1864da287690ef01402d5b5ccccbf351f",
8
- "rev1_date": "2019-04-13T20:25:04Z",
9
- "rev2_date": "2019-04-13T21:06:47Z",
10
- "git_diff_url": "https://github.com/pf4j/pf4j/compare/dd45a1e6dcfdcc39b3fe182417d48a2e801f7d28...40846fa1864da287690ef01402d5b5ccccbf351f",
11
- "test_file": "pf4j/src/test/java/org/pf4j/DefaultPluginRepositoryTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "110_pf4j_pf4j-release-3.15.0_dd45a1e_40846fa_DefaultPluginRepositoryTest",
15
- "test_sign": "org/pf4j/DefaultPluginRepositoryTest.testGetPluginArchives:()V",
16
- "class": "DefaultPluginRepositoryTest",
17
- "method": "testGetPluginArchives",
18
- "module": "pf4j",
19
- "junit_selector": "org.pf4j.DefaultPluginRepositoryTest#testGetPluginArchives",
20
- "old_test_code": "@Test\npublic void testGetPluginArchives() {\n PluginRepository repository = new DefaultPluginRepository(pluginsPath, false);\n List<Path> pluginPaths = repository.getPluginPaths();\n assertEquals(5, pluginPaths.size());\n assertPathExists(pluginPaths, pluginsPath.resolve(\"plugin-1\"));\n assertPathExists(pluginPaths, pluginsPath.resolve(\"plugin-2\"));\n assertPathExists(pluginPaths, pluginsPath.resolve(\"plugin-3\"));\n assertPathExists(pluginPaths, pluginsPath.resolve(\"target\"));\n assertPathExists(pluginPaths, pluginsPath.resolve(\"build\"));\n}",
21
- "new_test_code": "@Test\npublic void testGetPluginArchives() {\n PluginRepository repository = new DefaultPluginRepository(pluginsPath, false);\n List<Path> pluginsPaths = repository.getPluginsPaths();\n assertEquals(5, pluginsPaths.size());\n assertPathExists(pluginsPaths, pluginsPath.resolve(\"plugin-1\"));\n assertPathExists(pluginsPaths, pluginsPath.resolve(\"plugin-2\"));\n assertPathExists(pluginsPaths, pluginsPath.resolve(\"plugin-3\"));\n assertPathExists(pluginsPaths, pluginsPath.resolve(\"target\"));\n assertPathExists(pluginsPaths, pluginsPath.resolve(\"build\"));\n}",
22
- "old_test_file_path": [
23
- "pf4j/src/test/java/org/pf4j/DefaultPluginRepositoryTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "57-70"
27
- ],
28
- "new_test_lnum": [
29
- "57-70"
30
- ],
31
- "old_production_code": "@Override\npublic List<Path> getPluginPaths() {\n File[] pluginZips = pluginsRoot.toFile().listFiles(new ZipFileFilter());\n if ((pluginZips != null) && pluginZips.length > 0) {\n for (File pluginZip : pluginZips) {\n try {\n FileUtils.expandIfZip(pluginZip.toPath());\n } catch (IOException e) {\n log.error(\"Cannot expand plugin zip '{}'\", pluginZip);\n log.error(e.getMessage(), e);\n }\n }\n }\n return super.getPluginPaths();\n}",
32
- "new_production_code": "",
33
- "focal_file_path": "pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java",
34
- "focal_method_sign": "org/pf4j/DefaultPluginRepository.getPluginPaths:()Ljava/util/List",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 1,
38
- "method_sign": "org/pf4j/DefaultPluginRepository.getPluginPaths:()Ljava/util/List",
39
- "file_path_old": "pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java",
40
- "line_nums_old": "50-66",
41
- "file_path_new": null,
42
- "line_nums_new": null,
43
- "dependency_updated": "deleted",
44
- "score": 0.4552,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 0.8571,
48
- "ed": 0.6471,
49
- "class": 1.0,
50
- "tfidf": 0.0388
51
- }
52
- },
53
- {
54
- "dep_id": 0,
55
- "method_sign": "org/pf4j/DefaultPluginRepository.getPluginsPaths:()Ljava/util/List",
56
- "file_path_old": null,
57
- "line_nums_old": null,
58
- "file_path_new": "pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java",
59
- "line_nums_new": "50-66",
60
- "dependency_updated": "inserted",
61
- "score": 0.4354,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 0.8,
65
- "ed": 0.5882,
66
- "class": 1.0,
67
- "tfidf": 0.0388
68
- }
69
- }
70
- ],
71
- "coverage_gold": 0.6666666666666666,
72
- "branch_coverage_gold": 3.4722,
73
- "method_coverage_gold": 6.3781,
74
- "line_coverage_gold": 4.0082,
75
- "is_traceback": false,
76
- "commit_gap": {
77
- "count": 1,
78
- "skipped_commits": [
79
- "c1062e7cc77a87068ce63e0443524da98bc0ae64"
80
- ]
81
- },
82
- "test_is_refactoring_only": false,
83
- "has_test_dep_change": false,
84
- "all_deps_new": [
85
- "org/pf4j/DefaultPluginRepositoryTest.assertPathExists:(Ljava/util/List;Ljava/nio/file/Path;)V",
86
- "org/pf4j/DefaultPluginRepository.getPluginsPaths:()Ljava/util/List"
87
- ],
88
- "all_deps_old": [
89
- "org/pf4j/DefaultPluginRepositoryTest.assertPathExists:(Ljava/util/List;Ljava/nio/file/Path;)V",
90
- "org/pf4j/DefaultPluginRepository.getPluginPaths:()Ljava/util/List"
91
- ],
92
- "deps_changes": [
93
- {
94
- "method_sign": "org/pf4j/DefaultPluginRepository.getPluginsPaths:()Ljava/util/List",
95
- "change_type": "ADD",
96
- "file_path_old": null,
97
- "file_path_new": "pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java",
98
- "source": "production",
99
- "is_test_dependency": false,
100
- "is_refactoring_only": false
101
- },
102
- {
103
- "method_sign": "org/pf4j/DefaultPluginRepository.getPluginPaths:()Ljava/util/List",
104
- "change_type": "DELETE",
105
- "file_path_old": "pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java",
106
- "file_path_new": null,
107
- "source": "production",
108
- "is_test_dependency": false,
109
- "is_refactoring_only": false
110
- }
111
- ],
112
- "variant_result": {
113
- "old_on_old": "pass",
114
- "old_on_new": "error",
115
- "new_on_old": "error",
116
- "new_on_new": "pass"
117
- }
118
- },
119
- {
120
- "change_id": "111_pf4j_pf4j-release-3.15.0_dd45a1e_40846fa_DefaultPluginRepositoryTest",
121
- "test_sign": "org/pf4j/DefaultPluginRepositoryTest.testDeletePluginPath:()V",
122
- "class": "DefaultPluginRepositoryTest",
123
- "method": "testDeletePluginPath",
124
- "module": "pf4j",
125
- "junit_selector": "org.pf4j.DefaultPluginRepositoryTest#testDeletePluginPath",
126
- "old_test_code": "@Test\npublic void testDeletePluginPath() {\n PluginRepository repository = new DefaultPluginRepository(pluginsPath, false);\n assertTrue(Files.exists(pluginsPath.resolve(\"plugin-1.zip\")));\n assertTrue(repository.deletePluginPath(pluginsPath.resolve(\"plugin-1\")));\n assertFalse(Files.exists(pluginsPath.resolve(\"plugin-1.zip\")));\n assertTrue(repository.deletePluginPath(pluginsPath.resolve(\"plugin-3\")));\n assertFalse(repository.deletePluginPath(pluginsPath.resolve(\"plugin-4\")));\n assertTrue(repository.deletePluginPath(pluginsPath.resolve(\"target\")));\n assertTrue(repository.deletePluginPath(pluginsPath.resolve(\"build\")));\n List<Path> pluginPaths = repository.getPluginPaths();\n assertEquals(1, pluginPaths.size());\n assertEquals(pluginsPath.relativize(pluginPaths.get(0)).toString(), \"plugin-2\");\n}",
127
- "new_test_code": "@Test\npublic void testDeletePluginPath() {\n PluginRepository repository = new DefaultPluginRepository(pluginsPath, false);\n assertTrue(Files.exists(pluginsPath.resolve(\"plugin-1.zip\")));\n assertTrue(repository.deletePluginPath(pluginsPath.resolve(\"plugin-1\")));\n assertFalse(Files.exists(pluginsPath.resolve(\"plugin-1.zip\")));\n assertTrue(repository.deletePluginPath(pluginsPath.resolve(\"plugin-3\")));\n assertFalse(repository.deletePluginPath(pluginsPath.resolve(\"plugin-4\")));\n assertTrue(repository.deletePluginPath(pluginsPath.resolve(\"target\")));\n assertTrue(repository.deletePluginPath(pluginsPath.resolve(\"build\")));\n List<Path> pluginsPaths = repository.getPluginsPaths();\n assertEquals(1, pluginsPaths.size());\n assertEquals(pluginsPath.relativize(pluginsPaths.get(0)).toString(), \"plugin-2\");\n}",
128
- "old_test_file_path": [
129
- "pf4j/src/test/java/org/pf4j/DefaultPluginRepositoryTest.java"
130
- ],
131
- "old_test_lnum": [
132
- "87-103"
133
- ],
134
- "new_test_lnum": [
135
- "87-103"
136
- ],
137
- "old_production_code": "@Override\npublic List<Path> getPluginPaths() {\n File[] pluginZips = pluginsRoot.toFile().listFiles(new ZipFileFilter());\n if ((pluginZips != null) && pluginZips.length > 0) {\n for (File pluginZip : pluginZips) {\n try {\n FileUtils.expandIfZip(pluginZip.toPath());\n } catch (IOException e) {\n log.error(\"Cannot expand plugin zip '{}'\", pluginZip);\n log.error(e.getMessage(), e);\n }\n }\n }\n return super.getPluginPaths();\n}",
138
- "new_production_code": "",
139
- "focal_file_path": "pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java",
140
- "focal_method_sign": "org/pf4j/DefaultPluginRepository.getPluginPaths:()Ljava/util/List",
141
- "focal_all_deps_scored": [
142
- {
143
- "dep_id": 1,
144
- "method_sign": "org/pf4j/DefaultPluginRepository.getPluginPaths:()Ljava/util/List",
145
- "file_path_old": "pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java",
146
- "line_nums_old": "50-66",
147
- "file_path_new": null,
148
- "line_nums_new": null,
149
- "dependency_updated": "deleted",
150
- "score": 0.4685,
151
- "signal_scores": {
152
- "nc": 0.0,
153
- "lcs_u": 0.8571,
154
- "ed": 0.6875,
155
- "class": 1.0,
156
- "tfidf": 0.0671
157
- }
158
- },
159
- {
160
- "dep_id": 0,
161
- "method_sign": "org/pf4j/DefaultPluginRepository.getPluginsPaths:()Ljava/util/List",
162
- "file_path_old": null,
163
- "line_nums_old": null,
164
- "file_path_new": "pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java",
165
- "line_nums_new": "50-66",
166
- "dependency_updated": "inserted",
167
- "score": 0.4481,
168
- "signal_scores": {
169
- "nc": 0.0,
170
- "lcs_u": 0.8,
171
- "ed": 0.625,
172
- "class": 1.0,
173
- "tfidf": 0.0671
174
- }
175
- }
176
- ],
177
- "coverage_gold": 0.45454545454545453,
178
- "branch_coverage_gold": 3.3333,
179
- "method_coverage_gold": 7.5171,
180
- "line_coverage_gold": 4.5735,
181
- "is_traceback": false,
182
- "commit_gap": {
183
- "count": 1,
184
- "skipped_commits": [
185
- "c1062e7cc77a87068ce63e0443524da98bc0ae64"
186
- ]
187
- },
188
- "test_is_refactoring_only": false,
189
- "has_test_dep_change": false,
190
- "all_deps_new": [
191
- "org/pf4j/DefaultPluginRepository.deletePluginPath:(Ljava/nio/file/Path;)Z",
192
- "org/pf4j/DefaultPluginRepository.getPluginsPaths:()Ljava/util/List"
193
- ],
194
- "all_deps_old": [
195
- "org/pf4j/DefaultPluginRepository.deletePluginPath:(Ljava/nio/file/Path;)Z",
196
- "org/pf4j/DefaultPluginRepository.getPluginPaths:()Ljava/util/List"
197
- ],
198
- "deps_changes": [
199
- {
200
- "method_sign": "org/pf4j/DefaultPluginRepository.getPluginsPaths:()Ljava/util/List",
201
- "change_type": "ADD",
202
- "file_path_old": null,
203
- "file_path_new": "pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java",
204
- "source": "production",
205
- "is_test_dependency": false,
206
- "is_refactoring_only": false
207
- },
208
- {
209
- "method_sign": "org/pf4j/DefaultPluginRepository.getPluginPaths:()Ljava/util/List",
210
- "change_type": "DELETE",
211
- "file_path_old": "pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java",
212
- "file_path_new": null,
213
- "source": "production",
214
- "is_test_dependency": false,
215
- "is_refactoring_only": false
216
- }
217
- ],
218
- "variant_result": {
219
- "old_on_old": "pass",
220
- "old_on_new": "error",
221
- "new_on_old": "error",
222
- "new_on_new": "pass"
223
- }
224
- }
225
- ],
226
- "version": "release-3.15.0",
227
- "java_version": 11
228
- }
229
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
projectdiscovery_nuclei-burp-plugin-v1.1.3.json DELETED
@@ -1,210 +0,0 @@
1
- [
2
- {
3
- "task_id": "projectdiscovery_nuclei-burp-plugin-v1.1.3__2458ced_9005945__YamlUtilTest_b1b302a7",
4
- "project_name": "projectdiscovery_nuclei-burp-plugin-v1.1.3",
5
- "git_clone_url": "https://github.com/projectdiscovery/nuclei-burp-plugin.git",
6
- "rev1": "2458cedc932f3dae1740a82f43bf36784817ddc1",
7
- "rev2": "90059454c43d8d1f379d22e539eda1877f568b30",
8
- "rev1_date": "2022-03-02T10:12:51Z",
9
- "rev2_date": "2022-03-02T11:46:28Z",
10
- "git_diff_url": "https://github.com/projectdiscovery/nuclei-burp-plugin/compare/2458cedc932f3dae1740a82f43bf36784817ddc1...90059454c43d8d1f379d22e539eda1877f568b30",
11
- "test_file": "src/test/java/io/projectdiscovery/nuclei/util/YamlUtilTest.java",
12
- "test_changes": [
13
- {
14
- "change_id": "3_projectdiscovery_nuclei-burp-plugin-v1.1.3_2458ced_9005945_YamlUtilTest",
15
- "test_sign": "io/projectdiscovery/nuclei/util/YamlUtilTest.testDeserializeYaml:()V",
16
- "class": "YamlUtilTest",
17
- "method": "testDeserializeYaml",
18
- "module": "",
19
- "junit_selector": "io.projectdiscovery.nuclei.util.YamlUtilTest#testDeserializeYaml",
20
- "old_test_code": "@Test\nvoid testDeserializeYaml() {\n final String expected = \"id: template-id\\n\" + \"\\n\" + \"info:\\n\" + \" name: Template Name\\n\" + \" author: forgedhallpass\\n\" + \" severity: high\\n\" + \" description: description\\n\" + \" reference: https://\\n\" + \" tags: tags\\n\" + \"\\n\" + \"requests:\\n\" + \"- raw:\\n\" + \" - |-\\n\" + \" GET / HTTP/1.1\\n\" + \" Host: {{Hostname}}\\n\" + \" Accept: */*\\n\" + \" HeaderOne: {{param1}}\\n\" + \" HeaderTwo: {{param2}}\\n\" + \"\\n\" + \" attack: clusterbomb\\n\" + \" payloads:\\n\" + \" param1:\\n\" + \" - headerOne\\n\" + \" - one\\n\" + \" param2:\\n\" + \" - headerTwo\\n\" + \" - two\\n\" + \"\\n\" + \" matchers-condition: or\\n\" + \" matchers:\\n\" + \" - type: word\\n\" + \" part: all\\n\" + \" condition: and\\n\" + \" words:\\n\" + \" - word1\\n\" + \" - word2\\n\" + \" - type: status\\n\" + \" status:\\n\" + \" - 200\\n\" + \" - 500\\n\";\n final Template template = YamlUtil.load(expected, Template.class);\n Assertions.assertEquals(expected, Utils.normalizeTemplate(YamlUtil.dump(template)));\n}",
21
- "new_test_code": "@Test\nvoid testDeserializeYaml() {\n final String expected = \"id: template-id\\n\" + \"\\n\" + \"info:\\n\" + \" name: Template Name\\n\" + \" author: forgedhallpass\\n\" + \" severity: high\\n\" + \" description: description\\n\" + \" reference: https://\\n\" + \" tags: tags\\n\" + \"\\n\" + \"requests:\\n\" + \"- raw:\\n\" + \" - |-\\n\" + \" GET / HTTP/1.1\\n\" + \" Host: {{Hostname}}\\n\" + \" Accept: */*\\n\" + \" HeaderOne: {{param1}}\\n\" + \" HeaderTwo: {{param2}}\\n\" + \"\\n\" + \" attack: clusterbomb\\n\" + \" payloads:\\n\" + \" param1:\\n\" + \" - headerOne\\n\" + \" - one\\n\" + \" param2:\\n\" + \" - headerTwo\\n\" + \" - two\\n\" + \"\\n\" + \" matchers-condition: or\\n\" + \" matchers:\\n\" + \" - type: word\\n\" + \" part: all\\n\" + \" condition: and\\n\" + \" words:\\n\" + \" - word1\\n\" + \" - word2\\n\" + \" - type: status\\n\" + \" status:\\n\" + \" - 200\\n\" + \" - 500\\n\";\n final Template template = YamlUtil.load(expected, Template.class);\n Assertions.assertEquals(expected, TemplateUtils.normalizeTemplate(YamlUtil.dump(template)));\n}",
22
- "old_test_file_path": [
23
- "src/test/java/io/projectdiscovery/nuclei/util/YamlUtilTest.java"
24
- ],
25
- "old_test_lnum": [
26
- "111-156"
27
- ],
28
- "new_test_lnum": [
29
- "111-156"
30
- ],
31
- "old_production_code": "",
32
- "new_production_code": "public static String normalizeTemplate(String yamlTemplate) {\n String result = yamlTemplate;\n for (String fieldName : Arrays.asList(\"info\", \"requests\", \"extractors\")) {\n result = addNewLineBeforeProperty(result, fieldName);\n }\n result = result.contains(\"matchers-condition: \") ? addNewLineBeforeProperty(result, \"matchers-condition\", Utils.getEnumValues(Requests.MatchersCondition.class)) : addNewLineBeforeProperty(result, \"matchers\");\n result = result.contains(\"attack: \") ? addNewLineBeforeProperty(result, \"attack\", Utils.getEnumValues(Requests.AttackType.class)) : addNewLineBeforeProperty(result, \"payloads\");\n return result;\n}",
33
- "focal_file_path": "src/main/java/io/projectdiscovery/nuclei/util/TemplateUtils.java",
34
- "focal_method_sign": "io/projectdiscovery/nuclei/util/TemplateUtils.normalizeTemplate:(Ljava/lang/String;)Ljava/lang/String",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 1,
38
- "method_sign": "io/projectdiscovery/nuclei/util/TemplateUtils.normalizeTemplate:(Ljava/lang/String;)Ljava/lang/String",
39
- "file_path_old": null,
40
- "line_nums_old": null,
41
- "file_path_new": "src/main/java/io/projectdiscovery/nuclei/util/TemplateUtils.java",
42
- "line_nums_new": "55-69",
43
- "dependency_updated": "inserted",
44
- "score": 0.1471,
45
- "signal_scores": {
46
- "nc": 0.0,
47
- "lcs_u": 0.4706,
48
- "ed": 0.3529,
49
- "class": 0.0,
50
- "tfidf": 0.0251
51
- }
52
- },
53
- {
54
- "dep_id": 0,
55
- "method_sign": "io/projectdiscovery/nuclei/util/Utils.normalizeTemplate:(Ljava/lang/String;)Ljava/lang/String",
56
- "file_path_old": "src/main/java/io/projectdiscovery/nuclei/util/Utils.java",
57
- "line_nums_old": "115-129",
58
- "file_path_new": null,
59
- "line_nums_new": null,
60
- "dependency_updated": "deleted",
61
- "score": 0.1441,
62
- "signal_scores": {
63
- "nc": 0.0,
64
- "lcs_u": 0.4706,
65
- "ed": 0.3529,
66
- "class": 0.0,
67
- "tfidf": 0.0125
68
- }
69
- }
70
- ],
71
- "coverage_gold": 1.0,
72
- "branch_coverage_gold": 8.6567,
73
- "method_coverage_gold": 9.8315,
74
- "line_coverage_gold": 9.0976,
75
- "is_traceback": false,
76
- "commit_gap": {
77
- "count": 0,
78
- "skipped_commits": []
79
- },
80
- "test_is_refactoring_only": false,
81
- "has_test_dep_change": false,
82
- "all_deps_new": [
83
- "io/projectdiscovery/nuclei/yaml/YamlUtil.dump:(Ljava/lang/Object;)Ljava/lang/String",
84
- "io/projectdiscovery/nuclei/util/TemplateUtils.normalizeTemplate:(Ljava/lang/String;)Ljava/lang/String",
85
- "io/projectdiscovery/nuclei/yaml/YamlUtil.load:(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object"
86
- ],
87
- "all_deps_old": [
88
- "io/projectdiscovery/nuclei/yaml/YamlUtil.dump:(Ljava/lang/Object;)Ljava/lang/String",
89
- "io/projectdiscovery/nuclei/util/Utils.normalizeTemplate:(Ljava/lang/String;)Ljava/lang/String",
90
- "io/projectdiscovery/nuclei/yaml/YamlUtil.load:(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object"
91
- ],
92
- "deps_changes": [
93
- {
94
- "method_sign": "io/projectdiscovery/nuclei/util/Utils.normalizeTemplate:(Ljava/lang/String;)Ljava/lang/String",
95
- "change_type": "DELETE",
96
- "file_path_old": "src/main/java/io/projectdiscovery/nuclei/util/Utils.java",
97
- "file_path_new": null,
98
- "source": "production",
99
- "is_test_dependency": false,
100
- "is_refactoring_only": false
101
- },
102
- {
103
- "method_sign": "io/projectdiscovery/nuclei/util/TemplateUtils.normalizeTemplate:(Ljava/lang/String;)Ljava/lang/String",
104
- "change_type": "ADD",
105
- "file_path_old": null,
106
- "file_path_new": "src/main/java/io/projectdiscovery/nuclei/util/TemplateUtils.java",
107
- "source": "production",
108
- "is_test_dependency": false,
109
- "is_refactoring_only": false
110
- }
111
- ],
112
- "variant_result": {
113
- "old_on_old": "pass",
114
- "old_on_new": "error",
115
- "new_on_old": "error",
116
- "new_on_new": "pass"
117
- }
118
- }
119
- ],
120
- "version": "v1.1.3",
121
- "java_version": 11
122
- },
123
- {
124
- "task_id": "projectdiscovery_nuclei-burp-plugin-v1.1.3__75f17fb_067ed32__UtilsTest_ef9d596d",
125
- "project_name": "projectdiscovery_nuclei-burp-plugin-v1.1.3",
126
- "git_clone_url": "https://github.com/projectdiscovery/nuclei-burp-plugin.git",
127
- "rev1": "75f17fb985a40133a01150ca7666e467c0adafa4",
128
- "rev2": "067ed32ad87dadc397fcf8536fa050951724b9ba",
129
- "rev1_date": "2022-01-27T14:04:12Z",
130
- "rev2_date": "2022-01-27T16:01:03Z",
131
- "git_diff_url": "https://github.com/projectdiscovery/nuclei-burp-plugin/compare/75f17fb985a40133a01150ca7666e467c0adafa4...067ed32ad87dadc397fcf8536fa050951724b9ba",
132
- "test_file": "src/test/java/io/projectdiscovery/nuclei/util/UtilsTest.java",
133
- "test_changes": [
134
- {
135
- "change_id": "2_projectdiscovery_nuclei-burp-plugin-v1.1.3_75f17fb_067ed32_UtilsTest",
136
- "test_sign": "io/projectdiscovery/nuclei/util/UtilsTest.testExtensiveYamlGeneration:()V",
137
- "class": "UtilsTest",
138
- "method": "testExtensiveYamlGeneration",
139
- "module": "",
140
- "junit_selector": "io.projectdiscovery.nuclei.util.UtilsTest#testExtensiveYamlGeneration",
141
- "old_test_code": "@Test\nvoid testExtensiveYamlGeneration() {\n final Template template = createExtensiveTemplate();\n final String expected = \"id: template-id\\n\" + \"info:\\n\" + \" author: forgedhallpass\\n\" + \" name: Template Name\\n\" + \" severity: info\\n\" + \"requests:\\n\" + \"- matchers-condition: or\\n\" + \" attack: clusterbomb\\n\" + \" matchers:\\n\" + \" - part: all\\n\" + \" type: word\\n\" + \" words:\\n\" + \" - word1\\n\" + \" - word2\\n\" + \" - status:\\n\" + \" - 200\\n\" + \" - 500\\n\" + \" type: status\\n\" + \" payloads:\\n\" + \" param1:\\n\" + \" - headerOne\\n\" + \" - one\\n\" + \" param2:\\n\" + \" - headerTwo\\n\" + \" - two\\n\" + \" raw:\\n\" + \" - |-\\n\" + \" GET / HTTP/1.1\\n\" + \" Host: {{Hostname}}\\n\" + \" Accept: */*\\n\" + \" HeaderOne: {{param1}}\\n\" + \" HeaderTwo: {{param2}}\\n\";\n Assertions.assertEquals(expected, Utils.dumpYaml(template));\n}",
142
- "new_test_code": "@Test\nvoid testExtensiveYamlGeneration() {\n final Template template = createExtensiveTemplate();\n final String expected = \"id: template-id\\n\" + \"info:\\n\" + \" author: forgedhallpass\\n\" + \" classification:\\n\" + \" cvss-metrics: CVSS:3.0/\\n\" + \" cvss-score: 1.0\\n\" + \" cve-id: CVE-\\n\" + \" cwe-id: CWE-\\n\" + \" description: description\\n\" + \" name: Template Name\\n\" + \" reference: https://\\n\" + \" severity: info\\n\" + \" tags: tags\\n\" + \"requests:\\n\" + \"- matchers-condition: or\\n\" + \" attack: clusterbomb\\n\" + \" matchers:\\n\" + \" - part: all\\n\" + \" type: word\\n\" + \" words:\\n\" + \" - word1\\n\" + \" - word2\\n\" + \" - status:\\n\" + \" - 200\\n\" + \" - 500\\n\" + \" type: status\\n\" + \" payloads:\\n\" + \" param1:\\n\" + \" - headerOne\\n\" + \" - one\\n\" + \" param2:\\n\" + \" - headerTwo\\n\" + \" - two\\n\" + \" raw:\\n\" + \" - |-\\n\" + \" GET / HTTP/1.1\\n\" + \" Host: {{Hostname}}\\n\" + \" Accept: */*\\n\" + \" HeaderOne: {{param1}}\\n\" + \" HeaderTwo: {{param2}}\\n\";\n Assertions.assertEquals(expected, Utils.dumpYaml(template));\n}",
143
- "old_test_file_path": [
144
- "src/test/java/io/projectdiscovery/nuclei/util/UtilsTest.java"
145
- ],
146
- "old_test_lnum": [
147
- "77-115"
148
- ],
149
- "new_test_lnum": [
150
- "90-136"
151
- ],
152
- "old_production_code": "public static String dumpYaml(Object data) {\n final Representer representer = new Representer() {\n\n @Override\n protected NodeTuple representJavaBeanProperty(Object javaBean, Property property, Object propertyValue, Tag customTag) {\n if (Objects.isNull(propertyValue)) {\n return null;\n }\n return super.representJavaBeanProperty(javaBean, property, propertyValue, customTag);\n }\n\n @Override\n protected MappingNode representJavaBean(Set<Property> properties, Object javaBean) {\n if (!this.classTags.containsKey(javaBean.getClass())) {\n addClassTag(javaBean.getClass(), Tag.MAP);\n }\n return super.representJavaBean(properties, javaBean);\n }\n };\n final TypeDescription typeDescription = new TypeDescription(Requests.class, Tag.MAP);\n typeDescription.substituteProperty(\"matchers-condition\", Requests.class, \"getMatchersCondition\", \"setMatchersCondition\");\n typeDescription.setExcludes(\"matchersCondition\");\n representer.addTypeDescription(typeDescription);\n final DumperOptions options = new DumperOptions();\n options.setIndent(2);\n options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);\n options.setPrettyFlow(true);\n final Yaml yaml = new Yaml(representer, options);\n return yaml.dumpAsMap(data);\n}",
153
- "new_production_code": "public static String dumpYaml(Object data) {\n final Representer representer = new Representer() {\n\n @Override\n protected NodeTuple representJavaBeanProperty(Object javaBean, Property property, Object propertyValue, Tag customTag) {\n if (Objects.isNull(propertyValue)) {\n return null;\n }\n return super.representJavaBeanProperty(javaBean, property, propertyValue, customTag);\n }\n\n @Override\n protected MappingNode representJavaBean(Set<Property> properties, Object javaBean) {\n if (!this.classTags.containsKey(javaBean.getClass())) {\n addClassTag(javaBean.getClass(), Tag.MAP);\n }\n return super.representJavaBean(properties, javaBean);\n }\n };\n Map.of(Requests.class, List.of(\"matchersCondition\"), Info.Classification.class, List.of(\"cvssMetrics\", \"cvssScore\", \"cveId\", \"cweId\")).forEach((clazz, fields) -> {\n final TypeDescription requestsTypeDescription = new TypeDescription(clazz, Tag.MAP);\n fields.forEach(field -> requestsTypeDescription.substituteProperty(toSnakeCase(field), Info.Classification.class, createGetterMethodName(field), createSetterMethodName(field)));\n requestsTypeDescription.setExcludes(fields.toArray(String[]::new));\n representer.addTypeDescription(requestsTypeDescription);\n });\n final DumperOptions options = new DumperOptions();\n options.setIndent(2);\n options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);\n options.setPrettyFlow(true);\n final Yaml yaml = new Yaml(representer, options);\n return yaml.dumpAsMap(data);\n}",
154
- "focal_file_path": "src/main/java/io/projectdiscovery/nuclei/util/Utils.java",
155
- "focal_method_sign": "io/projectdiscovery/nuclei/util/Utils.dumpYaml:(Ljava/lang/Object;)Ljava/lang/String",
156
- "focal_all_deps_scored": [
157
- {
158
- "dep_id": 0,
159
- "method_sign": "io/projectdiscovery/nuclei/util/Utils.dumpYaml:(Ljava/lang/Object;)Ljava/lang/String",
160
- "file_path_old": "src/main/java/io/projectdiscovery/nuclei/util/Utils.java",
161
- "line_nums_old": "58-91",
162
- "file_path_new": "src/main/java/io/projectdiscovery/nuclei/util/Utils.java",
163
- "line_nums_new": "55-93",
164
- "dependency_updated": "updated",
165
- "score": null,
166
- "signal_scores": {}
167
- }
168
- ],
169
- "coverage_gold": 1.0,
170
- "branch_coverage_gold": 8.0247,
171
- "method_coverage_gold": 27.6316,
172
- "line_coverage_gold": 16.3991,
173
- "is_traceback": false,
174
- "commit_gap": {
175
- "count": 0,
176
- "skipped_commits": []
177
- },
178
- "test_is_refactoring_only": false,
179
- "has_test_dep_change": false,
180
- "all_deps_new": [
181
- "io/projectdiscovery/nuclei/util/UtilsTest.createExtensiveTemplate:()Lio/projectdiscovery/nuclei/model/Template",
182
- "io/projectdiscovery/nuclei/util/Utils.dumpYaml:(Ljava/lang/Object;)Ljava/lang/String"
183
- ],
184
- "all_deps_old": [
185
- "io/projectdiscovery/nuclei/util/Utils.dumpYaml:(Ljava/lang/Object;)Ljava/lang/String",
186
- "io/projectdiscovery/nuclei/util/UtilsTest.createExtensiveTemplate:()Lio/projectdiscovery/nuclei/model/Template"
187
- ],
188
- "deps_changes": [
189
- {
190
- "method_sign": "io/projectdiscovery/nuclei/util/Utils.dumpYaml:(Ljava/lang/Object;)Ljava/lang/String",
191
- "change_type": "UPDATE",
192
- "file_path_old": "src/main/java/io/projectdiscovery/nuclei/util/Utils.java",
193
- "file_path_new": "src/main/java/io/projectdiscovery/nuclei/util/Utils.java",
194
- "source": "production",
195
- "is_test_dependency": false,
196
- "is_refactoring_only": false
197
- }
198
- ],
199
- "variant_result": {
200
- "old_on_old": "pass",
201
- "old_on_new": "fail",
202
- "new_on_old": "fail",
203
- "new_on_new": "pass"
204
- }
205
- }
206
- ],
207
- "version": "v1.1.3",
208
- "java_version": 11
209
- }
210
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
quicktheories_QuickTheories-quicktheories-parent-0.26.json DELETED
The diff for this file is too large to render. See raw diff
 
robert-bor_aho-corasick-v0.6.3.json DELETED
The diff for this file is too large to render. See raw diff
 
rubenlagus_TelegramBots-v9.3.0.json DELETED
@@ -1,789 +0,0 @@
1
- [
2
- {
3
- "task_id": "rubenlagus_TelegramBots-v9.3.0__1f35807_ea2905d__TestBanChatMember_62c26b33",
4
- "project_name": "rubenlagus_TelegramBots-v9.3.0",
5
- "git_clone_url": "https://github.com/rubenlagus/TelegramBots.git",
6
- "rev1": "1f35807cd5c27a47a10b3320d3bdb6e02cab8e78",
7
- "rev2": "ea2905ddec705583564d25a6ab0e3e470f87abe2",
8
- "rev1_date": "2024-12-02T01:17:18Z",
9
- "rev2_date": "2024-12-02T01:17:18Z",
10
- "git_diff_url": "https://github.com/rubenlagus/TelegramBots/compare/1f35807cd5c27a47a10b3320d3bdb6e02cab8e78...ea2905ddec705583564d25a6ab0e3e470f87abe2",
11
- "test_file": "telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/methods/groupadministration/TestBanChatMember.java",
12
- "test_changes": [
13
- {
14
- "change_id": "19_rubenlagus_TelegramBots-v9.3.0_1f35807_ea2905d_TestBanChatMember",
15
- "test_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/TestBanChatMember.testBanChatMemberWithEmptyChatId:()V",
16
- "class": "TestBanChatMember",
17
- "method": "testBanChatMemberWithEmptyChatId",
18
- "module": "telegrambots-meta",
19
- "junit_selector": "org.telegram.telegrambots.meta.api.methods.groupadministration.TestBanChatMember#testBanChatMemberWithEmptyChatId",
20
- "old_test_code": "@Test\npublic void testBanChatMemberWithEmptyChatId() {\n BanChatMember banChatMember = BanChatMember.builder().chatId(\"\").userId(12345L).untilDate(1000).revokeMessages(true).build();\n assertEquals(\"banChatMember\", banChatMember.getMethod());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, banChatMember::validate);\n assertEquals(\"ChatId can't be empty\", thrown.getMessage());\n}",
21
- "new_test_code": "@Test\npublic void testBanChatMemberWithEmptyChatId() {\n BanChatMember banChatMember = BanChatMember.builder().chatId(\"\").userId(12345L).untilDate(1000).revokeMessages(true).build();\n assertEquals(\"banChatMember\", banChatMember.getMethod());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, banChatMember::validate);\n assertEquals(Validations.CHAT_ID_VALIDATION, thrown.getMessage());\n}",
22
- "old_test_file_path": [
23
- "telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/methods/groupadministration/TestBanChatMember.java"
24
- ],
25
- "old_test_lnum": [
26
- "28-40"
27
- ],
28
- "new_test_lnum": [
29
- "29-41"
30
- ],
31
- "old_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n if (chatId.isEmpty()) {\n throw new TelegramApiValidationException(\"ChatId can't be empty\", this);\n }\n if (userId == 0) {\n throw new TelegramApiValidationException(\"UserId can't be null or 0\", this);\n }\n}",
32
- "new_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n Validations.requiredChatId(chatId, this);\n Validations.requiredUserId(userId, this);\n}",
33
- "focal_file_path": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.java",
34
- "focal_method_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.validate:()V",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.validate:()V",
39
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.java",
40
- "line_nums_old": "94-102",
41
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.java",
42
- "line_nums_new": "95-99",
43
- "dependency_updated": "updated",
44
- "score": null,
45
- "signal_scores": {}
46
- }
47
- ],
48
- "coverage_gold": 0.25,
49
- "branch_coverage_gold": 0.0985,
50
- "method_coverage_gold": 0.9184,
51
- "line_coverage_gold": 0.5462,
52
- "is_traceback": false,
53
- "commit_gap": {
54
- "count": 0,
55
- "skipped_commits": []
56
- },
57
- "test_is_refactoring_only": false,
58
- "has_test_dep_change": false,
59
- "all_deps_new": [
60
- "org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.validate:()V",
61
- "org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.getMethod:()Ljava/lang/String"
62
- ],
63
- "all_deps_old": [
64
- "org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.validate:()V",
65
- "org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.getMethod:()Ljava/lang/String"
66
- ],
67
- "deps_changes": [
68
- {
69
- "method_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.validate:()V",
70
- "change_type": "UPDATE",
71
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.java",
72
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.java",
73
- "source": "production",
74
- "is_test_dependency": false,
75
- "is_refactoring_only": false
76
- }
77
- ],
78
- "variant_result": {
79
- "old_on_old": "pass",
80
- "old_on_new": "fail",
81
- "new_on_old": "error",
82
- "new_on_new": "pass"
83
- }
84
- },
85
- {
86
- "change_id": "22_rubenlagus_TelegramBots-v9.3.0_1f35807_ea2905d_TestBanChatMember",
87
- "test_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/TestBanChatMember.testBanChatMemberWithEmptyUserId:()V",
88
- "class": "TestBanChatMember",
89
- "method": "testBanChatMemberWithEmptyUserId",
90
- "module": "telegrambots-meta",
91
- "junit_selector": "org.telegram.telegrambots.meta.api.methods.groupadministration.TestBanChatMember#testBanChatMemberWithEmptyUserId",
92
- "old_test_code": "@Test\npublic void testBanChatMemberWithEmptyUserId() {\n BanChatMember banChatMember = BanChatMember.builder().chatId(\"12345\").userId(0L).untilDate(1000).revokeMessages(true).build();\n assertEquals(\"banChatMember\", banChatMember.getMethod());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, banChatMember::validate);\n assertEquals(\"UserId can't be null or 0\", thrown.getMessage());\n}",
93
- "new_test_code": "@Test\npublic void testBanChatMemberWithEmptyUserId() {\n BanChatMember banChatMember = BanChatMember.builder().chatId(\"12345\").userId(0L).untilDate(1000).revokeMessages(true).build();\n assertEquals(\"banChatMember\", banChatMember.getMethod());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, banChatMember::validate);\n assertEquals(Validations.USER_ID_VALIDATION, thrown.getMessage());\n}",
94
- "old_test_file_path": [
95
- "telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/methods/groupadministration/TestBanChatMember.java"
96
- ],
97
- "old_test_lnum": [
98
- "42-54"
99
- ],
100
- "new_test_lnum": [
101
- "43-55"
102
- ],
103
- "old_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n if (chatId.isEmpty()) {\n throw new TelegramApiValidationException(\"ChatId can't be empty\", this);\n }\n if (userId == 0) {\n throw new TelegramApiValidationException(\"UserId can't be null or 0\", this);\n }\n}",
104
- "new_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n Validations.requiredChatId(chatId, this);\n Validations.requiredUserId(userId, this);\n}",
105
- "focal_file_path": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.java",
106
- "focal_method_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.validate:()V",
107
- "focal_all_deps_scored": [
108
- {
109
- "dep_id": 0,
110
- "method_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.validate:()V",
111
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.java",
112
- "line_nums_old": "94-102",
113
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.java",
114
- "line_nums_new": "95-99",
115
- "dependency_updated": "updated",
116
- "score": null,
117
- "signal_scores": {}
118
- }
119
- ],
120
- "coverage_gold": 0.375,
121
- "branch_coverage_gold": 0.1969,
122
- "method_coverage_gold": 1.1224,
123
- "line_coverage_gold": 0.6919,
124
- "is_traceback": false,
125
- "commit_gap": {
126
- "count": 0,
127
- "skipped_commits": []
128
- },
129
- "test_is_refactoring_only": false,
130
- "has_test_dep_change": false,
131
- "all_deps_new": [
132
- "org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.validate:()V",
133
- "org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.getMethod:()Ljava/lang/String"
134
- ],
135
- "all_deps_old": [
136
- "org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.validate:()V",
137
- "org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.getMethod:()Ljava/lang/String"
138
- ],
139
- "deps_changes": [
140
- {
141
- "method_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.validate:()V",
142
- "change_type": "UPDATE",
143
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.java",
144
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/BanChatMember.java",
145
- "source": "production",
146
- "is_test_dependency": false,
147
- "is_refactoring_only": false
148
- }
149
- ],
150
- "variant_result": {
151
- "old_on_old": "pass",
152
- "old_on_new": "fail",
153
- "new_on_old": "error",
154
- "new_on_new": "pass"
155
- }
156
- }
157
- ],
158
- "version": "v9.3.0",
159
- "java_version": 17
160
- },
161
- {
162
- "task_id": "rubenlagus_TelegramBots-v9.3.0__1f35807_ea2905d__TestGetChatMemberCount_7a63f8a9",
163
- "project_name": "rubenlagus_TelegramBots-v9.3.0",
164
- "git_clone_url": "https://github.com/rubenlagus/TelegramBots.git",
165
- "rev1": "1f35807cd5c27a47a10b3320d3bdb6e02cab8e78",
166
- "rev2": "ea2905ddec705583564d25a6ab0e3e470f87abe2",
167
- "rev1_date": "2024-12-02T01:17:18Z",
168
- "rev2_date": "2024-12-02T01:17:18Z",
169
- "git_diff_url": "https://github.com/rubenlagus/TelegramBots/compare/1f35807cd5c27a47a10b3320d3bdb6e02cab8e78...ea2905ddec705583564d25a6ab0e3e470f87abe2",
170
- "test_file": "telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/methods/groupadministration/TestGetChatMemberCount.java",
171
- "test_changes": [
172
- {
173
- "change_id": "15_rubenlagus_TelegramBots-v9.3.0_1f35807_ea2905d_TestGetChatMemberCount",
174
- "test_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/TestGetChatMemberCount.testGetChatMemberCountWithEmptyChatId:()V",
175
- "class": "TestGetChatMemberCount",
176
- "method": "testGetChatMemberCountWithEmptyChatId",
177
- "module": "telegrambots-meta",
178
- "junit_selector": "org.telegram.telegrambots.meta.api.methods.groupadministration.TestGetChatMemberCount#testGetChatMemberCountWithEmptyChatId",
179
- "old_test_code": "@Test\npublic void testGetChatMemberCountWithEmptyChatId() {\n GetChatMemberCount getChatMemberCount = GetChatMemberCount.builder().chatId(\"\").build();\n assertEquals(\"getChatMemberCount\", getChatMemberCount.getMethod());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, getChatMemberCount::validate);\n assertEquals(\"ChatId can't be empty\", thrown.getMessage());\n}",
180
- "new_test_code": "@Test\npublic void testGetChatMemberCountWithEmptyChatId() {\n GetChatMemberCount getChatMemberCount = GetChatMemberCount.builder().chatId(\"\").build();\n assertEquals(\"getChatMemberCount\", getChatMemberCount.getMethod());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, getChatMemberCount::validate);\n assertEquals(Validations.CHAT_ID_VALIDATION, thrown.getMessage());\n}",
181
- "old_test_file_path": [
182
- "telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/methods/groupadministration/TestGetChatMemberCount.java"
183
- ],
184
- "old_test_lnum": [
185
- "25-34"
186
- ],
187
- "new_test_lnum": [
188
- "26-35"
189
- ],
190
- "old_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n if (chatId.isEmpty()) {\n throw new TelegramApiValidationException(\"ChatId can't be empty\", this);\n }\n}",
191
- "new_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n Validations.requiredChatId(chatId, this);\n}",
192
- "focal_file_path": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/GetChatMemberCount.java",
193
- "focal_method_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/GetChatMemberCount.validate:()V",
194
- "focal_all_deps_scored": [
195
- {
196
- "dep_id": 0,
197
- "method_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/GetChatMemberCount.validate:()V",
198
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/GetChatMemberCount.java",
199
- "line_nums_old": "53-58",
200
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/GetChatMemberCount.java",
201
- "line_nums_new": "54-57",
202
- "dependency_updated": "updated",
203
- "score": null,
204
- "signal_scores": {}
205
- }
206
- ],
207
- "coverage_gold": 0.2857142857142857,
208
- "branch_coverage_gold": 0.0985,
209
- "method_coverage_gold": 0.8163,
210
- "line_coverage_gold": 0.5098,
211
- "is_traceback": false,
212
- "commit_gap": {
213
- "count": 0,
214
- "skipped_commits": []
215
- },
216
- "test_is_refactoring_only": false,
217
- "has_test_dep_change": false,
218
- "all_deps_new": [
219
- "org/telegram/telegrambots/meta/api/methods/groupadministration/GetChatMemberCount.validate:()V",
220
- "org/telegram/telegrambots/meta/api/methods/groupadministration/GetChatMemberCount.getMethod:()Ljava/lang/String"
221
- ],
222
- "all_deps_old": [
223
- "org/telegram/telegrambots/meta/api/methods/groupadministration/GetChatMemberCount.validate:()V",
224
- "org/telegram/telegrambots/meta/api/methods/groupadministration/GetChatMemberCount.getMethod:()Ljava/lang/String"
225
- ],
226
- "deps_changes": [
227
- {
228
- "method_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/GetChatMemberCount.validate:()V",
229
- "change_type": "UPDATE",
230
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/GetChatMemberCount.java",
231
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/GetChatMemberCount.java",
232
- "source": "production",
233
- "is_test_dependency": false,
234
- "is_refactoring_only": false
235
- }
236
- ],
237
- "variant_result": {
238
- "old_on_old": "pass",
239
- "old_on_new": "fail",
240
- "new_on_old": "error",
241
- "new_on_new": "pass"
242
- }
243
- }
244
- ],
245
- "version": "v9.3.0",
246
- "java_version": 17
247
- },
248
- {
249
- "task_id": "rubenlagus_TelegramBots-v9.3.0__1f35807_ea2905d__TestPromoteChatMember_5a7123fa",
250
- "project_name": "rubenlagus_TelegramBots-v9.3.0",
251
- "git_clone_url": "https://github.com/rubenlagus/TelegramBots.git",
252
- "rev1": "1f35807cd5c27a47a10b3320d3bdb6e02cab8e78",
253
- "rev2": "ea2905ddec705583564d25a6ab0e3e470f87abe2",
254
- "rev1_date": "2024-12-02T01:17:18Z",
255
- "rev2_date": "2024-12-02T01:17:18Z",
256
- "git_diff_url": "https://github.com/rubenlagus/TelegramBots/compare/1f35807cd5c27a47a10b3320d3bdb6e02cab8e78...ea2905ddec705583564d25a6ab0e3e470f87abe2",
257
- "test_file": "telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/methods/groupadministration/TestPromoteChatMember.java",
258
- "test_changes": [
259
- {
260
- "change_id": "23_rubenlagus_TelegramBots-v9.3.0_1f35807_ea2905d_TestPromoteChatMember",
261
- "test_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/TestPromoteChatMember.testPromoteChatMemberWithEmptyChatId:()V",
262
- "class": "TestPromoteChatMember",
263
- "method": "testPromoteChatMemberWithEmptyChatId",
264
- "module": "telegrambots-meta",
265
- "junit_selector": "org.telegram.telegrambots.meta.api.methods.groupadministration.TestPromoteChatMember#testPromoteChatMemberWithEmptyChatId",
266
- "old_test_code": "@Test\npublic void testPromoteChatMemberWithEmptyChatId() {\n PromoteChatMember promoteChatMember = PromoteChatMember.builder().chatId(\"\").userId(12345L).build();\n assertEquals(\"promoteChatMember\", promoteChatMember.getMethod());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, promoteChatMember::validate);\n assertEquals(\"ChatId can't be empty\", thrown.getMessage());\n}",
267
- "new_test_code": "@Test\npublic void testPromoteChatMemberWithEmptyChatId() {\n PromoteChatMember promoteChatMember = PromoteChatMember.builder().chatId(\"\").userId(12345L).build();\n assertEquals(\"promoteChatMember\", promoteChatMember.getMethod());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, promoteChatMember::validate);\n assertEquals(Validations.CHAT_ID_VALIDATION, thrown.getMessage());\n}",
268
- "old_test_file_path": [
269
- "telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/methods/groupadministration/TestPromoteChatMember.java"
270
- ],
271
- "old_test_lnum": [
272
- "29-39"
273
- ],
274
- "new_test_lnum": [
275
- "30-40"
276
- ],
277
- "old_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n if (chatId.isEmpty()) {\n throw new TelegramApiValidationException(\"ChatId can't be empty\", this);\n }\n if (userId == 0L) {\n throw new TelegramApiValidationException(\"UserId can't be empty\", this);\n }\n}",
278
- "new_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n Validations.requiredChatId(chatId, this);\n Validations.requiredUserId(userId, this);\n}",
279
- "focal_file_path": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.java",
280
- "focal_method_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.validate:()V",
281
- "focal_all_deps_scored": [
282
- {
283
- "dep_id": 0,
284
- "method_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.validate:()V",
285
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.java",
286
- "line_nums_old": "130-138",
287
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.java",
288
- "line_nums_new": "131-135",
289
- "dependency_updated": "updated",
290
- "score": null,
291
- "signal_scores": {}
292
- }
293
- ],
294
- "coverage_gold": 0.25,
295
- "branch_coverage_gold": 0.0985,
296
- "method_coverage_gold": 0.9184,
297
- "line_coverage_gold": 0.5462,
298
- "is_traceback": false,
299
- "commit_gap": {
300
- "count": 0,
301
- "skipped_commits": []
302
- },
303
- "test_is_refactoring_only": false,
304
- "has_test_dep_change": false,
305
- "all_deps_new": [
306
- "org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.getMethod:()Ljava/lang/String",
307
- "org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.validate:()V"
308
- ],
309
- "all_deps_old": [
310
- "org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.getMethod:()Ljava/lang/String",
311
- "org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.validate:()V"
312
- ],
313
- "deps_changes": [
314
- {
315
- "method_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.validate:()V",
316
- "change_type": "UPDATE",
317
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.java",
318
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.java",
319
- "source": "production",
320
- "is_test_dependency": false,
321
- "is_refactoring_only": false
322
- }
323
- ],
324
- "variant_result": {
325
- "old_on_old": "pass",
326
- "old_on_new": "fail",
327
- "new_on_old": "error",
328
- "new_on_new": "pass"
329
- }
330
- },
331
- {
332
- "change_id": "24_rubenlagus_TelegramBots-v9.3.0_1f35807_ea2905d_TestPromoteChatMember",
333
- "test_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/TestPromoteChatMember.testPromoteChatMemberWithEmptyUserId:()V",
334
- "class": "TestPromoteChatMember",
335
- "method": "testPromoteChatMemberWithEmptyUserId",
336
- "module": "telegrambots-meta",
337
- "junit_selector": "org.telegram.telegrambots.meta.api.methods.groupadministration.TestPromoteChatMember#testPromoteChatMemberWithEmptyUserId",
338
- "old_test_code": "@Test\npublic void testPromoteChatMemberWithEmptyUserId() {\n PromoteChatMember promoteChatMember = PromoteChatMember.builder().chatId(\"12345\").userId(0L).build();\n assertEquals(\"promoteChatMember\", promoteChatMember.getMethod());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, promoteChatMember::validate);\n assertEquals(\"UserId can't be empty\", thrown.getMessage());\n}",
339
- "new_test_code": "@Test\npublic void testPromoteChatMemberWithEmptyUserId() {\n PromoteChatMember promoteChatMember = PromoteChatMember.builder().chatId(\"12345\").userId(0L).build();\n assertEquals(\"promoteChatMember\", promoteChatMember.getMethod());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, promoteChatMember::validate);\n assertEquals(Validations.USER_ID_VALIDATION, thrown.getMessage());\n}",
340
- "old_test_file_path": [
341
- "telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/methods/groupadministration/TestPromoteChatMember.java"
342
- ],
343
- "old_test_lnum": [
344
- "41-51"
345
- ],
346
- "new_test_lnum": [
347
- "42-52"
348
- ],
349
- "old_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n if (chatId.isEmpty()) {\n throw new TelegramApiValidationException(\"ChatId can't be empty\", this);\n }\n if (userId == 0L) {\n throw new TelegramApiValidationException(\"UserId can't be empty\", this);\n }\n}",
350
- "new_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n Validations.requiredChatId(chatId, this);\n Validations.requiredUserId(userId, this);\n}",
351
- "focal_file_path": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.java",
352
- "focal_method_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.validate:()V",
353
- "focal_all_deps_scored": [
354
- {
355
- "dep_id": 0,
356
- "method_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.validate:()V",
357
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.java",
358
- "line_nums_old": "130-138",
359
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.java",
360
- "line_nums_new": "131-135",
361
- "dependency_updated": "updated",
362
- "score": null,
363
- "signal_scores": {}
364
- }
365
- ],
366
- "coverage_gold": 0.375,
367
- "branch_coverage_gold": 0.1969,
368
- "method_coverage_gold": 1.1224,
369
- "line_coverage_gold": 0.6919,
370
- "is_traceback": false,
371
- "commit_gap": {
372
- "count": 0,
373
- "skipped_commits": []
374
- },
375
- "test_is_refactoring_only": false,
376
- "has_test_dep_change": false,
377
- "all_deps_new": [
378
- "org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.getMethod:()Ljava/lang/String",
379
- "org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.validate:()V"
380
- ],
381
- "all_deps_old": [
382
- "org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.getMethod:()Ljava/lang/String",
383
- "org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.validate:()V"
384
- ],
385
- "deps_changes": [
386
- {
387
- "method_sign": "org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.validate:()V",
388
- "change_type": "UPDATE",
389
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.java",
390
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/PromoteChatMember.java",
391
- "source": "production",
392
- "is_test_dependency": false,
393
- "is_refactoring_only": false
394
- }
395
- ],
396
- "variant_result": {
397
- "old_on_old": "pass",
398
- "old_on_new": "fail",
399
- "new_on_old": "error",
400
- "new_on_new": "pass"
401
- }
402
- }
403
- ],
404
- "version": "v9.3.0",
405
- "java_version": 17
406
- },
407
- {
408
- "task_id": "rubenlagus_TelegramBots-v9.3.0__1f35807_ea2905d__TestSendInvoice_16ceaf4f",
409
- "project_name": "rubenlagus_TelegramBots-v9.3.0",
410
- "git_clone_url": "https://github.com/rubenlagus/TelegramBots.git",
411
- "rev1": "1f35807cd5c27a47a10b3320d3bdb6e02cab8e78",
412
- "rev2": "ea2905ddec705583564d25a6ab0e3e470f87abe2",
413
- "rev1_date": "2024-12-02T01:17:18Z",
414
- "rev2_date": "2024-12-02T01:17:18Z",
415
- "git_diff_url": "https://github.com/rubenlagus/TelegramBots/compare/1f35807cd5c27a47a10b3320d3bdb6e02cab8e78...ea2905ddec705583564d25a6ab0e3e470f87abe2",
416
- "test_file": "telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/methods/invoices/TestSendInvoice.java",
417
- "test_changes": [
418
- {
419
- "change_id": "18_rubenlagus_TelegramBots-v9.3.0_1f35807_ea2905d_TestSendInvoice",
420
- "test_sign": "org/telegram/telegrambots/meta/api/methods/invoices/TestSendInvoice.chatIdCantBeEmpty:()V",
421
- "class": "TestSendInvoice",
422
- "method": "chatIdCantBeEmpty",
423
- "module": "telegrambots-meta",
424
- "junit_selector": "org.telegram.telegrambots.meta.api.methods.invoices.TestSendInvoice#chatIdCantBeEmpty",
425
- "old_test_code": "@Test\npublic void chatIdCantBeEmpty() {\n SendInvoice sendInvoice = createSendInvoiceObject();\n sendInvoice.setChatId(\"\");\n Throwable thrown = assertThrows(TelegramApiValidationException.class, sendInvoice::validate);\n assertEquals(\"ChatId parameter can't be empty\", thrown.getMessage());\n}",
426
- "new_test_code": "@Test\npublic void chatIdCantBeEmpty() {\n SendInvoice sendInvoice = createSendInvoiceObject();\n sendInvoice.setChatId(\"\");\n Throwable thrown = assertThrows(TelegramApiValidationException.class, sendInvoice::validate);\n assertEquals(Validations.CHAT_ID_VALIDATION, thrown.getMessage());\n}",
427
- "old_test_file_path": [
428
- "telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/methods/invoices/TestSendInvoice.java"
429
- ],
430
- "old_test_lnum": [
431
- "31-37"
432
- ],
433
- "new_test_lnum": [
434
- "32-38"
435
- ],
436
- "old_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n if (StringUtils.isEmpty(chatId)) {\n throw new TelegramApiValidationException(\"ChatId parameter can't be empty\", this);\n }\n if (StringUtils.isEmpty(title) || title.length() > 32) {\n throw new TelegramApiValidationException(\"Title parameter can't be empty or longer than 32 chars\", this);\n }\n if (StringUtils.isEmpty(description) || description.length() > 255) {\n throw new TelegramApiValidationException(\"Description parameter can't be empty or longer than 255 chars\", this);\n }\n if (StringUtils.isEmpty(payload)) {\n throw new TelegramApiValidationException(\"Payload parameter can't be empty\", this);\n }\n if (StringUtils.isEmpty(currency)) {\n throw new TelegramApiValidationException(\"Currency parameter can't be empty\", this);\n }\n if (prices.isEmpty()) {\n throw new TelegramApiValidationException(\"Prices parameter can't be empty\", this);\n } else {\n for (LabeledPrice price : prices) {\n price.validate();\n }\n }\n if (suggestedTipAmounts != null && !suggestedTipAmounts.isEmpty() && suggestedTipAmounts.size() > 4) {\n throw new TelegramApiValidationException(\"No more that 4 suggested tips allowed\", this);\n }\n if (replyMarkup != null) {\n replyMarkup.validate();\n }\n if (replyParameters != null) {\n replyParameters.validate();\n }\n}",
437
- "new_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n Validations.requiredChatId(chatId, this);\n if (StringUtils.isEmpty(title) || title.length() > 32) {\n throw new TelegramApiValidationException(\"Title parameter can't be empty or longer than 32 chars\", this);\n }\n if (StringUtils.isEmpty(description) || description.length() > 255) {\n throw new TelegramApiValidationException(\"Description parameter can't be empty or longer than 255 chars\", this);\n }\n if (StringUtils.isEmpty(payload)) {\n throw new TelegramApiValidationException(\"Payload parameter can't be empty\", this);\n }\n if (StringUtils.isEmpty(currency)) {\n throw new TelegramApiValidationException(\"Currency parameter can't be empty\", this);\n }\n if (prices.isEmpty()) {\n throw new TelegramApiValidationException(\"Prices parameter can't be empty\", this);\n } else {\n for (LabeledPrice price : prices) {\n price.validate();\n }\n }\n if (suggestedTipAmounts != null && !suggestedTipAmounts.isEmpty() && suggestedTipAmounts.size() > 4) {\n throw new TelegramApiValidationException(\"No more that 4 suggested tips allowed\", this);\n }\n if (replyMarkup != null) {\n replyMarkup.validate();\n }\n if (replyParameters != null) {\n replyParameters.validate();\n }\n}",
438
- "focal_file_path": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/invoices/SendInvoice.java",
439
- "focal_method_sign": "org/telegram/telegrambots/meta/api/methods/invoices/SendInvoice.validate:()V",
440
- "focal_all_deps_scored": [
441
- {
442
- "dep_id": 0,
443
- "method_sign": "org/telegram/telegrambots/meta/api/methods/invoices/SendInvoice.validate:()V",
444
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/invoices/SendInvoice.java",
445
- "line_nums_old": "294-327",
446
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/invoices/SendInvoice.java",
447
- "line_nums_new": "295-326",
448
- "dependency_updated": "updated",
449
- "score": null,
450
- "signal_scores": {}
451
- }
452
- ],
453
- "coverage_gold": 0.16,
454
- "branch_coverage_gold": 0.1477,
455
- "method_coverage_gold": 1.0204,
456
- "line_coverage_gold": 0.6919,
457
- "is_traceback": false,
458
- "commit_gap": {
459
- "count": 0,
460
- "skipped_commits": []
461
- },
462
- "test_is_refactoring_only": false,
463
- "has_test_dep_change": false,
464
- "all_deps_new": [
465
- "org/telegram/telegrambots/meta/api/methods/invoices/SendInvoice.validate:()V",
466
- "org/telegram/telegrambots/meta/api/methods/invoices/TestSendInvoice.createSendInvoiceObject:()Lorg/telegram/telegrambots/meta/api/methods/invoices/SendInvoice"
467
- ],
468
- "all_deps_old": [
469
- "org/telegram/telegrambots/meta/api/methods/invoices/SendInvoice.validate:()V",
470
- "org/telegram/telegrambots/meta/api/methods/invoices/TestSendInvoice.createSendInvoiceObject:()Lorg/telegram/telegrambots/meta/api/methods/invoices/SendInvoice"
471
- ],
472
- "deps_changes": [
473
- {
474
- "method_sign": "org/telegram/telegrambots/meta/api/methods/invoices/SendInvoice.validate:()V",
475
- "change_type": "UPDATE",
476
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/invoices/SendInvoice.java",
477
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/invoices/SendInvoice.java",
478
- "source": "production",
479
- "is_test_dependency": false,
480
- "is_refactoring_only": false
481
- }
482
- ],
483
- "variant_result": {
484
- "old_on_old": "pass",
485
- "old_on_new": "fail",
486
- "new_on_old": "error",
487
- "new_on_new": "pass"
488
- }
489
- }
490
- ],
491
- "version": "v9.3.0",
492
- "java_version": 17
493
- },
494
- {
495
- "task_id": "rubenlagus_TelegramBots-v9.3.0__1f35807_ea2905d__TestBotCommandScope_e4afbe93",
496
- "project_name": "rubenlagus_TelegramBots-v9.3.0",
497
- "git_clone_url": "https://github.com/rubenlagus/TelegramBots.git",
498
- "rev1": "1f35807cd5c27a47a10b3320d3bdb6e02cab8e78",
499
- "rev2": "ea2905ddec705583564d25a6ab0e3e470f87abe2",
500
- "rev1_date": "2024-12-02T01:17:18Z",
501
- "rev2_date": "2024-12-02T01:17:18Z",
502
- "git_diff_url": "https://github.com/rubenlagus/TelegramBots/compare/1f35807cd5c27a47a10b3320d3bdb6e02cab8e78...ea2905ddec705583564d25a6ab0e3e470f87abe2",
503
- "test_file": "telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/objects/commands/scope/TestBotCommandScope.java",
504
- "test_changes": [
505
- {
506
- "change_id": "16_rubenlagus_TelegramBots-v9.3.0_1f35807_ea2905d_TestBotCommandScope",
507
- "test_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/TestBotCommandScope.testBotCommandScopeChatMemberWith0UserId:()V",
508
- "class": "TestBotCommandScope",
509
- "method": "testBotCommandScopeChatMemberWith0UserId",
510
- "module": "telegrambots-meta",
511
- "junit_selector": "org.telegram.telegrambots.meta.api.objects.commands.scope.TestBotCommandScope#testBotCommandScopeChatMemberWith0UserId",
512
- "old_test_code": "@Test\npublic void testBotCommandScopeChatMemberWith0UserId() {\n BotCommandScopeChatMember botCommandScope = BotCommandScopeChatMember.builder().chatId(\"12345\").userId(0L).build();\n assertEquals(\"chat_member\", botCommandScope.getType());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, botCommandScope::validate);\n assertEquals(\"UserId parameter can't be empty\", thrown.getMessage());\n}",
513
- "new_test_code": "@Test\npublic void testBotCommandScopeChatMemberWith0UserId() {\n BotCommandScopeChatMember botCommandScope = BotCommandScopeChatMember.builder().chatId(\"12345\").userId(0L).build();\n assertEquals(\"chat_member\", botCommandScope.getType());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, botCommandScope::validate);\n assertEquals(Validations.USER_ID_VALIDATION, thrown.getMessage());\n}",
514
- "old_test_file_path": [
515
- "telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/objects/commands/scope/TestBotCommandScope.java"
516
- ],
517
- "old_test_lnum": [
518
- "109-119"
519
- ],
520
- "new_test_lnum": [
521
- "110-120"
522
- ],
523
- "old_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n if (chatId.isEmpty()) {\n throw new TelegramApiValidationException(\"ChatId parameter can't be empty\", this);\n }\n if (userId == 0L) {\n throw new TelegramApiValidationException(\"UserId parameter can't be empty\", this);\n }\n}",
524
- "new_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n Validations.requiredChatId(chatId, this);\n Validations.requiredUserId(userId, this);\n}",
525
- "focal_file_path": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.java",
526
- "focal_method_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.validate:()V",
527
- "focal_all_deps_scored": [
528
- {
529
- "dep_id": 0,
530
- "method_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.validate:()V",
531
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.java",
532
- "line_nums_old": "58-66",
533
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.java",
534
- "line_nums_new": "59-63",
535
- "dependency_updated": "updated",
536
- "score": null,
537
- "signal_scores": {}
538
- }
539
- ],
540
- "coverage_gold": 0.2857142857142857,
541
- "branch_coverage_gold": 0.1969,
542
- "method_coverage_gold": 0.6122,
543
- "line_coverage_gold": 0.5098,
544
- "is_traceback": false,
545
- "commit_gap": {
546
- "count": 0,
547
- "skipped_commits": []
548
- },
549
- "test_is_refactoring_only": false,
550
- "has_test_dep_change": false,
551
- "all_deps_new": [
552
- "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.validate:()V"
553
- ],
554
- "all_deps_old": [
555
- "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.validate:()V"
556
- ],
557
- "deps_changes": [
558
- {
559
- "method_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.validate:()V",
560
- "change_type": "UPDATE",
561
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.java",
562
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.java",
563
- "source": "production",
564
- "is_test_dependency": false,
565
- "is_refactoring_only": false
566
- }
567
- ],
568
- "variant_result": {
569
- "old_on_old": "pass",
570
- "old_on_new": "fail",
571
- "new_on_old": "error",
572
- "new_on_new": "pass"
573
- }
574
- },
575
- {
576
- "change_id": "17_rubenlagus_TelegramBots-v9.3.0_1f35807_ea2905d_TestBotCommandScope",
577
- "test_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/TestBotCommandScope.testBotCommandScopeChatMemberWithEmptyChatId:()V",
578
- "class": "TestBotCommandScope",
579
- "method": "testBotCommandScopeChatMemberWithEmptyChatId",
580
- "module": "telegrambots-meta",
581
- "junit_selector": "org.telegram.telegrambots.meta.api.objects.commands.scope.TestBotCommandScope#testBotCommandScopeChatMemberWithEmptyChatId",
582
- "old_test_code": "@Test\npublic void testBotCommandScopeChatMemberWithEmptyChatId() {\n BotCommandScopeChatMember botCommandScope = BotCommandScopeChatMember.builder().chatId(\"\").userId(12345L).build();\n assertEquals(\"chat_member\", botCommandScope.getType());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, botCommandScope::validate);\n assertEquals(\"ChatId parameter can't be empty\", thrown.getMessage());\n}",
583
- "new_test_code": "@Test\npublic void testBotCommandScopeChatMemberWithEmptyChatId() {\n BotCommandScopeChatMember botCommandScope = BotCommandScopeChatMember.builder().chatId(\"\").userId(12345L).build();\n assertEquals(\"chat_member\", botCommandScope.getType());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, botCommandScope::validate);\n assertEquals(Validations.CHAT_ID_VALIDATION, thrown.getMessage());\n}",
584
- "old_test_file_path": [
585
- "telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/objects/commands/scope/TestBotCommandScope.java"
586
- ],
587
- "old_test_lnum": [
588
- "97-107"
589
- ],
590
- "new_test_lnum": [
591
- "98-108"
592
- ],
593
- "old_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n if (chatId.isEmpty()) {\n throw new TelegramApiValidationException(\"ChatId parameter can't be empty\", this);\n }\n if (userId == 0L) {\n throw new TelegramApiValidationException(\"UserId parameter can't be empty\", this);\n }\n}",
594
- "new_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n Validations.requiredChatId(chatId, this);\n Validations.requiredUserId(userId, this);\n}",
595
- "focal_file_path": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.java",
596
- "focal_method_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.validate:()V",
597
- "focal_all_deps_scored": [
598
- {
599
- "dep_id": 0,
600
- "method_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.validate:()V",
601
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.java",
602
- "line_nums_old": "58-66",
603
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.java",
604
- "line_nums_new": "59-63",
605
- "dependency_updated": "updated",
606
- "score": null,
607
- "signal_scores": {}
608
- }
609
- ],
610
- "coverage_gold": 0.14285714285714285,
611
- "branch_coverage_gold": 0.0985,
612
- "method_coverage_gold": 0.4082,
613
- "line_coverage_gold": 0.3642,
614
- "is_traceback": false,
615
- "commit_gap": {
616
- "count": 0,
617
- "skipped_commits": []
618
- },
619
- "test_is_refactoring_only": false,
620
- "has_test_dep_change": false,
621
- "all_deps_new": [
622
- "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.validate:()V"
623
- ],
624
- "all_deps_old": [
625
- "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.validate:()V"
626
- ],
627
- "deps_changes": [
628
- {
629
- "method_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.validate:()V",
630
- "change_type": "UPDATE",
631
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.java",
632
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatMember.java",
633
- "source": "production",
634
- "is_test_dependency": false,
635
- "is_refactoring_only": false
636
- }
637
- ],
638
- "variant_result": {
639
- "old_on_old": "pass",
640
- "old_on_new": "fail",
641
- "new_on_old": "error",
642
- "new_on_new": "pass"
643
- }
644
- },
645
- {
646
- "change_id": "20_rubenlagus_TelegramBots-v9.3.0_1f35807_ea2905d_TestBotCommandScope",
647
- "test_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/TestBotCommandScope.testBotCommandScopeChatWithEmptyChatId:()V",
648
- "class": "TestBotCommandScope",
649
- "method": "testBotCommandScopeChatWithEmptyChatId",
650
- "module": "telegrambots-meta",
651
- "junit_selector": "org.telegram.telegrambots.meta.api.objects.commands.scope.TestBotCommandScope#testBotCommandScopeChatWithEmptyChatId",
652
- "old_test_code": "@Test\npublic void testBotCommandScopeChatWithEmptyChatId() {\n BotCommandScopeChat botCommandScope = BotCommandScopeChat.builder().chatId(\"\").build();\n assertEquals(\"chat\", botCommandScope.getType());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, botCommandScope::validate);\n assertEquals(\"ChatId parameter can't be empty\", thrown.getMessage());\n}",
653
- "new_test_code": "@Test\npublic void testBotCommandScopeChatWithEmptyChatId() {\n BotCommandScopeChat botCommandScope = BotCommandScopeChat.builder().chatId(\"\").build();\n assertEquals(\"chat\", botCommandScope.getType());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, botCommandScope::validate);\n assertEquals(Validations.CHAT_ID_VALIDATION, thrown.getMessage());\n}",
654
- "old_test_file_path": [
655
- "telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/objects/commands/scope/TestBotCommandScope.java"
656
- ],
657
- "old_test_lnum": [
658
- "53-62"
659
- ],
660
- "new_test_lnum": [
661
- "54-63"
662
- ],
663
- "old_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n if (chatId.isEmpty()) {\n throw new TelegramApiValidationException(\"ChatId parameter can't be empty\", this);\n }\n}",
664
- "new_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n Validations.requiredChatId(chatId, this);\n}",
665
- "focal_file_path": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChat.java",
666
- "focal_method_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChat.validate:()V",
667
- "focal_all_deps_scored": [
668
- {
669
- "dep_id": 0,
670
- "method_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChat.validate:()V",
671
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChat.java",
672
- "line_nums_old": "51-56",
673
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChat.java",
674
- "line_nums_new": "52-55",
675
- "dependency_updated": "updated",
676
- "score": null,
677
- "signal_scores": {}
678
- }
679
- ],
680
- "coverage_gold": 0.16666666666666666,
681
- "branch_coverage_gold": 0.0985,
682
- "method_coverage_gold": 0.4082,
683
- "line_coverage_gold": 0.3642,
684
- "is_traceback": false,
685
- "commit_gap": {
686
- "count": 0,
687
- "skipped_commits": []
688
- },
689
- "test_is_refactoring_only": false,
690
- "has_test_dep_change": false,
691
- "all_deps_new": [
692
- "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChat.validate:()V"
693
- ],
694
- "all_deps_old": [
695
- "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChat.validate:()V"
696
- ],
697
- "deps_changes": [
698
- {
699
- "method_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChat.validate:()V",
700
- "change_type": "UPDATE",
701
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChat.java",
702
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChat.java",
703
- "source": "production",
704
- "is_test_dependency": false,
705
- "is_refactoring_only": false
706
- }
707
- ],
708
- "variant_result": {
709
- "old_on_old": "pass",
710
- "old_on_new": "fail",
711
- "new_on_old": "error",
712
- "new_on_new": "pass"
713
- }
714
- },
715
- {
716
- "change_id": "21_rubenlagus_TelegramBots-v9.3.0_1f35807_ea2905d_TestBotCommandScope",
717
- "test_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/TestBotCommandScope.testBotCommandScopeChatAdministratorsWithEmptyChatId:()V",
718
- "class": "TestBotCommandScope",
719
- "method": "testBotCommandScopeChatAdministratorsWithEmptyChatId",
720
- "module": "telegrambots-meta",
721
- "junit_selector": "org.telegram.telegrambots.meta.api.objects.commands.scope.TestBotCommandScope#testBotCommandScopeChatAdministratorsWithEmptyChatId",
722
- "old_test_code": "@Test\npublic void testBotCommandScopeChatAdministratorsWithEmptyChatId() {\n BotCommandScopeChatAdministrators botCommandScope = BotCommandScopeChatAdministrators.builder().chatId(\"\").build();\n assertEquals(\"chat_administrators\", botCommandScope.getType());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, botCommandScope::validate);\n assertEquals(\"ChatId parameter can't be empty\", thrown.getMessage());\n}",
723
- "new_test_code": "@Test\npublic void testBotCommandScopeChatAdministratorsWithEmptyChatId() {\n BotCommandScopeChatAdministrators botCommandScope = BotCommandScopeChatAdministrators.builder().chatId(\"\").build();\n assertEquals(\"chat_administrators\", botCommandScope.getType());\n Throwable thrown = assertThrows(TelegramApiValidationException.class, botCommandScope::validate);\n assertEquals(Validations.CHAT_ID_VALIDATION, thrown.getMessage());\n}",
724
- "old_test_file_path": [
725
- "telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/objects/commands/scope/TestBotCommandScope.java"
726
- ],
727
- "old_test_lnum": [
728
- "75-84"
729
- ],
730
- "new_test_lnum": [
731
- "76-85"
732
- ],
733
- "old_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n if (chatId.isEmpty()) {\n throw new TelegramApiValidationException(\"ChatId parameter can't be empty\", this);\n }\n}",
734
- "new_production_code": "@Override\npublic void validate() throws TelegramApiValidationException {\n Validations.requiredChatId(chatId, this);\n}",
735
- "focal_file_path": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatAdministrators.java",
736
- "focal_method_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatAdministrators.validate:()V",
737
- "focal_all_deps_scored": [
738
- {
739
- "dep_id": 0,
740
- "method_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatAdministrators.validate:()V",
741
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatAdministrators.java",
742
- "line_nums_old": "51-56",
743
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatAdministrators.java",
744
- "line_nums_new": "52-55",
745
- "dependency_updated": "updated",
746
- "score": null,
747
- "signal_scores": {}
748
- }
749
- ],
750
- "coverage_gold": 0.16666666666666666,
751
- "branch_coverage_gold": 0.0985,
752
- "method_coverage_gold": 0.4082,
753
- "line_coverage_gold": 0.3642,
754
- "is_traceback": false,
755
- "commit_gap": {
756
- "count": 0,
757
- "skipped_commits": []
758
- },
759
- "test_is_refactoring_only": false,
760
- "has_test_dep_change": false,
761
- "all_deps_new": [
762
- "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatAdministrators.validate:()V"
763
- ],
764
- "all_deps_old": [
765
- "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatAdministrators.validate:()V"
766
- ],
767
- "deps_changes": [
768
- {
769
- "method_sign": "org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatAdministrators.validate:()V",
770
- "change_type": "UPDATE",
771
- "file_path_old": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatAdministrators.java",
772
- "file_path_new": "telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/commands/scope/BotCommandScopeChatAdministrators.java",
773
- "source": "production",
774
- "is_test_dependency": false,
775
- "is_refactoring_only": false
776
- }
777
- ],
778
- "variant_result": {
779
- "old_on_old": "pass",
780
- "old_on_new": "fail",
781
- "new_on_old": "error",
782
- "new_on_new": "pass"
783
- }
784
- }
785
- ],
786
- "version": "v9.3.0",
787
- "java_version": 17
788
- }
789
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
scribejava_scribejava-scribejava-8.3.3.json DELETED
@@ -1,845 +0,0 @@
1
- [
2
- {
3
- "task_id": "scribejava_scribejava-scribejava-8.3.3__12297f7_36c1c71__Base64Test_3e0e2362",
4
- "project_name": "scribejava_scribejava-scribejava-8.3.3",
5
- "git_clone_url": "https://github.com/scribejava/scribejava.git",
6
- "rev1": "12297f702d5e511704f5c069578dc83691c56197",
7
- "rev2": "36c1c71c789e1d9336c683b688376e380ca61858",
8
- "rev1_date": "2021-02-24T12:19:12Z",
9
- "rev2_date": "2021-02-24T12:19:24Z",
10
- "git_diff_url": "https://github.com/scribejava/scribejava/compare/12297f702d5e511704f5c069578dc83691c56197...36c1c71c789e1d9336c683b688376e380ca61858",
11
- "test_file": "scribejava-core/src/test/java/com/github/scribejava/core/base64/Base64Test.java",
12
- "test_changes": [
13
- {
14
- "change_id": "15_scribejava_scribejava-scribejava-8.3.3_12297f7_36c1c71_Base64Test",
15
- "test_sign": "com/github/scribejava/core/base64/Base64Test.testEncodeUrlWithoutPadding:()V",
16
- "class": "Base64Test",
17
- "method": "testEncodeUrlWithoutPadding",
18
- "module": "scribejava-core",
19
- "junit_selector": "com.github.scribejava.core.base64.Base64Test#testEncodeUrlWithoutPadding",
20
- "old_test_code": "@Test\npublic void testEncodeUrlWithoutPadding() {\n final String helloWorldEncoded = \"SGVsbG8gV29ybGQ\";\n final String helloWorldTwoLinesEncoded = \"SGVsbG8gV29ybGQNCk5ldyBMaW5lMg\";\n final String helloWorldTwoLinesAndNewLineEncoded = \"SGVsbG8gV29ybGQNClNlY29uZCBMaW5lDQo\";\n final String helloWorldDifferentCharsEncoded = \"YDEyMzQ1Njc4OTAtPX4hQCMkJV4mKigpXyvRkdCBIuKEljs6P3F3ZXJ0eXVpb3B\" + \"bXWFzZGZnaGprbDsnenhjdmJubSwuL1FXRVJUWVVJT1B7fXxBU0RGR0hKS0w6WlhDVkJOTTw-P9C50YTRj9GG0YvRh9GD0LLRgdC\" + \"60LDQvNC10L_QuNC90YDRgtCz0L7RjNGI0LvQsdGJ0LTRjtC30LYu0YXRjdGKXNCZ0KTQr9Cm0KvQp9Cj0JLQodCa0JDQnNCV0J_\" + \"QmNCd0KDQotCT0J7QrNCo0JvQkdCp0JTQrtCX0JYs0KXQrdCqLw0JDCcICg\";\n final String str = \"MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMPQ5BCMxlUq2TYy\" + \"iRIoEUsz6HGTJhHuasS2nx1Se4Co3lxwxyubVdFj8AuhHNJSmJvjlpbTsGOjLZpr\" + \"HyDEDdJmf1Fensh1MhUnBZ4a7uLrZrKzFHHJdamX9pxapB89vLeHlCot9hVXdrZH\" + \"nNtg6FdmRKH_8gbs8iDyIayFvzYDAgMBAAECgYA-c9MpTBy9cQsR9BAvkEPjvkx2\" + \"XL4ZnfbDgpNA4Nuu7yzsQrPjPomiXMNkkiAFHH67yVxwAlgRjyuuQlgNNTpKvyQt\" + \"XcHxffnU0820VmE23M-L7jg2TlB3-rUnEDmDvCoyjlwGDR6lNb7t7Fgg2iR-iaov\" + \"0iVzz-l9w0slRlyGsQJBAPWXW2m3NmFgqfDxtw8fsKC2y8o17_cnPjozRGtWb8LQ\" + \"g3VCb8kbOFHOYNGazq3M7-wD1qILF2h_HecgK9eQrZ0CQQDMHXoJMfKKbrFrTKgE\" + \"zyggO1gtuT5OXYeFewMEb5AbDI2FfSc2YP7SHij8iQ2HdukBrbTmi6qxh3HmIR58\" + \"I_AfAkEA0Y9vr0tombsUB8cZv0v5OYoBZvCTbMANtzfb4AOHpiKqqbohDOevLQ7_\" + \"SpvgVCmVaDz2PptcRAyEBZ5MCssneQJAB2pmvaDH7Ambfod5bztLfOhLCtY5EkXJ\" + \"n6rZcDbRaHorRhdG7m3VtDKOUKZ2DF7glkQGV33phKukErVPUzlHBwJAScD9TqaG\" + \"wJ3juUsVtujV23SnH43iMggXT7m82STpPGam1hPfmqu2Z0niePFo927ogQ7H1EMJ\" + \"UHgqXmuvk2X_Ww\";\n assertEquals(helloWorldEncoded, java8Base64.internalEncodeUrlWithoutPadding(helloWorldBytes));\n assertEquals(helloWorldTwoLinesEncoded, java8Base64.internalEncodeUrlWithoutPadding(helloWorldTwoLinesBytes));\n assertEquals(helloWorldTwoLinesAndNewLineEncoded, java8Base64.internalEncodeUrlWithoutPadding(helloWorldTwoLinesAndNewLineBytes));\n assertEquals(helloWorldDifferentCharsEncoded, java8Base64.internalEncodeUrlWithoutPadding(helloWorldDifferentCharsBytes));\n assertEquals(str, java8Base64.internalEncodeUrlWithoutPadding(bytes));\n assertEquals(helloWorldEncoded, commonsCodecBase64.internalEncodeUrlWithoutPadding(helloWorldBytes));\n assertEquals(helloWorldTwoLinesEncoded, commonsCodecBase64.internalEncodeUrlWithoutPadding(helloWorldTwoLinesBytes));\n assertEquals(helloWorldTwoLinesAndNewLineEncoded, commonsCodecBase64.internalEncodeUrlWithoutPadding(helloWorldTwoLinesAndNewLineBytes));\n assertEquals(helloWorldDifferentCharsEncoded, commonsCodecBase64.internalEncodeUrlWithoutPadding(helloWorldDifferentCharsBytes));\n assertEquals(str, commonsCodecBase64.internalEncodeUrlWithoutPadding(bytes));\n}",
21
- "new_test_code": "@Test\npublic void testEncodeUrlWithoutPadding() {\n final String helloWorldEncoded = \"SGVsbG8gV29ybGQ\";\n final String helloWorldTwoLinesEncoded = \"SGVsbG8gV29ybGQNCk5ldyBMaW5lMg\";\n final String helloWorldTwoLinesAndNewLineEncoded = \"SGVsbG8gV29ybGQNClNlY29uZCBMaW5lDQo\";\n final String helloWorldDifferentCharsEncoded = \"YDEyMzQ1Njc4OTAtPX4hQCMkJV4mKigpXyvRkdCBIuKEljs6P3F3ZXJ0eXVpb3B\" + \"bXWFzZGZnaGprbDsnenhjdmJubSwuL1FXRVJUWVVJT1B7fXxBU0RGR0hKS0w6WlhDVkJOTTw-P9C50YTRj9GG0YvRh9GD0LLRgdC\" + \"60LDQvNC10L_QuNC90YDRgtCz0L7RjNGI0LvQsdGJ0LTRjtC30LYu0YXRjdGKXNCZ0KTQr9Cm0KvQp9Cj0JLQodCa0JDQnNCV0J_\" + \"QmNCd0KDQotCT0J7QrNCo0JvQkdCp0JTQrtCX0JYs0KXQrdCqLw0JDCcICg\";\n final String str = \"MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMPQ5BCMxlUq2TYy\" + \"iRIoEUsz6HGTJhHuasS2nx1Se4Co3lxwxyubVdFj8AuhHNJSmJvjlpbTsGOjLZpr\" + \"HyDEDdJmf1Fensh1MhUnBZ4a7uLrZrKzFHHJdamX9pxapB89vLeHlCot9hVXdrZH\" + \"nNtg6FdmRKH_8gbs8iDyIayFvzYDAgMBAAECgYA-c9MpTBy9cQsR9BAvkEPjvkx2\" + \"XL4ZnfbDgpNA4Nuu7yzsQrPjPomiXMNkkiAFHH67yVxwAlgRjyuuQlgNNTpKvyQt\" + \"XcHxffnU0820VmE23M-L7jg2TlB3-rUnEDmDvCoyjlwGDR6lNb7t7Fgg2iR-iaov\" + \"0iVzz-l9w0slRlyGsQJBAPWXW2m3NmFgqfDxtw8fsKC2y8o17_cnPjozRGtWb8LQ\" + \"g3VCb8kbOFHOYNGazq3M7-wD1qILF2h_HecgK9eQrZ0CQQDMHXoJMfKKbrFrTKgE\" + \"zyggO1gtuT5OXYeFewMEb5AbDI2FfSc2YP7SHij8iQ2HdukBrbTmi6qxh3HmIR58\" + \"I_AfAkEA0Y9vr0tombsUB8cZv0v5OYoBZvCTbMANtzfb4AOHpiKqqbohDOevLQ7_\" + \"SpvgVCmVaDz2PptcRAyEBZ5MCssneQJAB2pmvaDH7Ambfod5bztLfOhLCtY5EkXJ\" + \"n6rZcDbRaHorRhdG7m3VtDKOUKZ2DF7glkQGV33phKukErVPUzlHBwJAScD9TqaG\" + \"wJ3juUsVtujV23SnH43iMggXT7m82STpPGam1hPfmqu2Z0niePFo927ogQ7H1EMJ\" + \"UHgqXmuvk2X_Ww\";\n assertEquals(helloWorldEncoded, java8Base64.internalEncodeUrlWithoutPadding(helloWorldBytes));\n assertEquals(helloWorldTwoLinesEncoded, java8Base64.internalEncodeUrlWithoutPadding(helloWorldTwoLinesBytes));\n assertEquals(helloWorldTwoLinesAndNewLineEncoded, java8Base64.internalEncodeUrlWithoutPadding(helloWorldTwoLinesAndNewLineBytes));\n assertEquals(helloWorldDifferentCharsEncoded, java8Base64.internalEncodeUrlWithoutPadding(helloWorldDifferentCharsBytes));\n assertEquals(str, java8Base64.internalEncodeUrlWithoutPadding(bytes));\n assertEquals(helloWorldEncoded, commonsCodecBase64.internalEncodeUrlWithoutPadding(helloWorldBytes));\n assertEquals(helloWorldTwoLinesEncoded, commonsCodecBase64.internalEncodeUrlWithoutPadding(helloWorldTwoLinesBytes));\n assertEquals(helloWorldTwoLinesAndNewLineEncoded, commonsCodecBase64.internalEncodeUrlWithoutPadding(helloWorldTwoLinesAndNewLineBytes));\n assertEquals(helloWorldDifferentCharsEncoded, commonsCodecBase64.internalEncodeUrlWithoutPadding(helloWorldDifferentCharsBytes));\n assertEquals(str, commonsCodecBase64.internalEncodeUrlWithoutPadding(bytes));\n assertEquals(helloWorldEncoded, jaxbBase64.internalEncodeUrlWithoutPadding(helloWorldBytes));\n assertEquals(helloWorldTwoLinesEncoded, jaxbBase64.internalEncodeUrlWithoutPadding(helloWorldTwoLinesBytes));\n assertEquals(helloWorldTwoLinesAndNewLineEncoded, jaxbBase64.internalEncodeUrlWithoutPadding(helloWorldTwoLinesAndNewLineBytes));\n assertEquals(helloWorldDifferentCharsEncoded, jaxbBase64.internalEncodeUrlWithoutPadding(helloWorldDifferentCharsBytes));\n assertEquals(str, jaxbBase64.internalEncodeUrlWithoutPadding(bytes));\n}",
22
- "old_test_file_path": [
23
- "scribejava-core/src/test/java/com/github/scribejava/core/base64/Base64Test.java"
24
- ],
25
- "old_test_lnum": [
26
- "105-145"
27
- ],
28
- "new_test_lnum": [
29
- "114-162"
30
- ],
31
- "old_production_code": "",
32
- "new_production_code": "@Override\nprotected String internalEncodeUrlWithoutPadding(byte[] bytes) {\n String string = DatatypeConverter.printBase64Binary(bytes);\n while (string.endsWith(\"=\")) {\n string = string.substring(0, string.length() - 1);\n }\n return string.replace('+', '-').replace('/', '_');\n}",
33
- "focal_file_path": "scribejava-core/src/main/java/com/github/scribejava/core/base64/JaxbBase64.java",
34
- "focal_method_sign": "com/github/scribejava/core/base64/JaxbBase64.internalEncodeUrlWithoutPadding:([B)Ljava/lang/String",
35
- "focal_all_deps_scored": [
36
- {
37
- "dep_id": 0,
38
- "method_sign": "com/github/scribejava/core/base64/JaxbBase64.internalEncodeUrlWithoutPadding:([B)Ljava/lang/String",
39
- "file_path_old": null,
40
- "line_nums_old": null,
41
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/base64/JaxbBase64.java",
42
- "line_nums_new": "12-19",
43
- "dependency_updated": "inserted",
44
- "score": null,
45
- "signal_scores": {}
46
- }
47
- ],
48
- "coverage_gold": 1.0,
49
- "branch_coverage_gold": 0.4405,
50
- "method_coverage_gold": 1.6043,
51
- "line_coverage_gold": 0.8228,
52
- "is_traceback": false,
53
- "commit_gap": {
54
- "count": 0,
55
- "skipped_commits": []
56
- },
57
- "test_is_refactoring_only": false,
58
- "has_test_dep_change": false,
59
- "all_deps_new": [
60
- "com/github/scribejava/core/base64/CommonsCodecBase64.internalEncodeUrlWithoutPadding:([B)Ljava/lang/String",
61
- "com/github/scribejava/core/base64/Java8Base64.internalEncodeUrlWithoutPadding:([B)Ljava/lang/String",
62
- "com/github/scribejava/core/base64/JaxbBase64.internalEncodeUrlWithoutPadding:([B)Ljava/lang/String"
63
- ],
64
- "all_deps_old": [
65
- "com/github/scribejava/core/base64/Java8Base64.internalEncodeUrlWithoutPadding:([B)Ljava/lang/String",
66
- "com/github/scribejava/core/base64/CommonsCodecBase64.internalEncodeUrlWithoutPadding:([B)Ljava/lang/String"
67
- ],
68
- "deps_changes": [
69
- {
70
- "method_sign": "com/github/scribejava/core/base64/JaxbBase64.internalEncodeUrlWithoutPadding:([B)Ljava/lang/String",
71
- "change_type": "ADD",
72
- "file_path_old": null,
73
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/base64/JaxbBase64.java",
74
- "source": "production",
75
- "is_test_dependency": false,
76
- "is_refactoring_only": false
77
- }
78
- ],
79
- "variant_result": {
80
- "old_on_old": "pass",
81
- "old_on_new": "error",
82
- "new_on_old": "error",
83
- "new_on_new": "pass"
84
- }
85
- },
86
- {
87
- "change_id": "17_scribejava_scribejava-scribejava-8.3.3_12297f7_36c1c71_Base64Test",
88
- "test_sign": "com/github/scribejava/core/base64/Base64Test.testEncode:()V",
89
- "class": "Base64Test",
90
- "method": "testEncode",
91
- "module": "scribejava-core",
92
- "junit_selector": "com.github.scribejava.core.base64.Base64Test#testEncode",
93
- "old_test_code": "@Test\npublic void testEncode() {\n final String helloWorldEncoded = \"SGVsbG8gV29ybGQ=\";\n final String helloWorldTwoLinesEncoded = \"SGVsbG8gV29ybGQNCk5ldyBMaW5lMg==\";\n final String helloWorldTwoLinesAndNewLineEncoded = \"SGVsbG8gV29ybGQNClNlY29uZCBMaW5lDQo=\";\n final String helloWorldDifferentCharsEncoded = \"YDEyMzQ1Njc4OTAtPX4hQCMkJV4mKigpXyvRkdCBIuKEljs6P3F3ZXJ0eXVpb3B\" + \"bXWFzZGZnaGprbDsnenhjdmJubSwuL1FXRVJUWVVJT1B7fXxBU0RGR0hKS0w6WlhDVkJOTTw+P9C50YTRj9GG0YvRh9GD0LLRgdC\" + \"60LDQvNC10L/QuNC90YDRgtCz0L7RjNGI0LvQsdGJ0LTRjtC30LYu0YXRjdGKXNCZ0KTQr9Cm0KvQp9Cj0JLQodCa0JDQnNCV0J/\" + \"QmNCd0KDQotCT0J7QrNCo0JvQkdCp0JTQrtCX0JYs0KXQrdCqLw0JDCcICg==\";\n final String str = \"MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMPQ5BCMxlUq2TYy\" + \"iRIoEUsz6HGTJhHuasS2nx1Se4Co3lxwxyubVdFj8AuhHNJSmJvjlpbTsGOjLZpr\" + \"HyDEDdJmf1Fensh1MhUnBZ4a7uLrZrKzFHHJdamX9pxapB89vLeHlCot9hVXdrZH\" + \"nNtg6FdmRKH/8gbs8iDyIayFvzYDAgMBAAECgYA+c9MpTBy9cQsR9BAvkEPjvkx2\" + \"XL4ZnfbDgpNA4Nuu7yzsQrPjPomiXMNkkiAFHH67yVxwAlgRjyuuQlgNNTpKvyQt\" + \"XcHxffnU0820VmE23M+L7jg2TlB3+rUnEDmDvCoyjlwGDR6lNb7t7Fgg2iR+iaov\" + \"0iVzz+l9w0slRlyGsQJBAPWXW2m3NmFgqfDxtw8fsKC2y8o17/cnPjozRGtWb8LQ\" + \"g3VCb8kbOFHOYNGazq3M7+wD1qILF2h/HecgK9eQrZ0CQQDMHXoJMfKKbrFrTKgE\" + \"zyggO1gtuT5OXYeFewMEb5AbDI2FfSc2YP7SHij8iQ2HdukBrbTmi6qxh3HmIR58\" + \"I/AfAkEA0Y9vr0tombsUB8cZv0v5OYoBZvCTbMANtzfb4AOHpiKqqbohDOevLQ7/\" + \"SpvgVCmVaDz2PptcRAyEBZ5MCssneQJAB2pmvaDH7Ambfod5bztLfOhLCtY5EkXJ\" + \"n6rZcDbRaHorRhdG7m3VtDKOUKZ2DF7glkQGV33phKukErVPUzlHBwJAScD9TqaG\" + \"wJ3juUsVtujV23SnH43iMggXT7m82STpPGam1hPfmqu2Z0niePFo927ogQ7H1EMJ\" + \"UHgqXmuvk2X/Ww==\";\n assertEquals(helloWorldEncoded, java8Base64.internalEncode(helloWorldBytes));\n assertEquals(helloWorldTwoLinesEncoded, java8Base64.internalEncode(helloWorldTwoLinesBytes));\n assertEquals(helloWorldTwoLinesAndNewLineEncoded, java8Base64.internalEncode(helloWorldTwoLinesAndNewLineBytes));\n assertEquals(helloWorldDifferentCharsEncoded, java8Base64.internalEncode(helloWorldDifferentCharsBytes));\n assertEquals(str, java8Base64.internalEncode(bytes));\n assertEquals(helloWorldEncoded, commonsCodecBase64.internalEncode(helloWorldBytes));\n assertEquals(helloWorldTwoLinesEncoded, commonsCodecBase64.internalEncode(helloWorldTwoLinesBytes));\n assertEquals(helloWorldTwoLinesAndNewLineEncoded, commonsCodecBase64.internalEncode(helloWorldTwoLinesAndNewLineBytes));\n assertEquals(helloWorldDifferentCharsEncoded, commonsCodecBase64.internalEncode(helloWorldDifferentCharsBytes));\n assertEquals(str, commonsCodecBase64.internalEncode(bytes));\n}",
94
- "new_test_code": "@Test\npublic void testEncode() {\n final String helloWorldEncoded = \"SGVsbG8gV29ybGQ=\";\n final String helloWorldTwoLinesEncoded = \"SGVsbG8gV29ybGQNCk5ldyBMaW5lMg==\";\n final String helloWorldTwoLinesAndNewLineEncoded = \"SGVsbG8gV29ybGQNClNlY29uZCBMaW5lDQo=\";\n final String helloWorldDifferentCharsEncoded = \"YDEyMzQ1Njc4OTAtPX4hQCMkJV4mKigpXyvRkdCBIuKEljs6P3F3ZXJ0eXVpb3B\" + \"bXWFzZGZnaGprbDsnenhjdmJubSwuL1FXRVJUWVVJT1B7fXxBU0RGR0hKS0w6WlhDVkJOTTw+P9C50YTRj9GG0YvRh9GD0LLRgdC\" + \"60LDQvNC10L/QuNC90YDRgtCz0L7RjNGI0LvQsdGJ0LTRjtC30LYu0YXRjdGKXNCZ0KTQr9Cm0KvQp9Cj0JLQodCa0JDQnNCV0J/\" + \"QmNCd0KDQotCT0J7QrNCo0JvQkdCp0JTQrtCX0JYs0KXQrdCqLw0JDCcICg==\";\n final String str = \"MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMPQ5BCMxlUq2TYy\" + \"iRIoEUsz6HGTJhHuasS2nx1Se4Co3lxwxyubVdFj8AuhHNJSmJvjlpbTsGOjLZpr\" + \"HyDEDdJmf1Fensh1MhUnBZ4a7uLrZrKzFHHJdamX9pxapB89vLeHlCot9hVXdrZH\" + \"nNtg6FdmRKH/8gbs8iDyIayFvzYDAgMBAAECgYA+c9MpTBy9cQsR9BAvkEPjvkx2\" + \"XL4ZnfbDgpNA4Nuu7yzsQrPjPomiXMNkkiAFHH67yVxwAlgRjyuuQlgNNTpKvyQt\" + \"XcHxffnU0820VmE23M+L7jg2TlB3+rUnEDmDvCoyjlwGDR6lNb7t7Fgg2iR+iaov\" + \"0iVzz+l9w0slRlyGsQJBAPWXW2m3NmFgqfDxtw8fsKC2y8o17/cnPjozRGtWb8LQ\" + \"g3VCb8kbOFHOYNGazq3M7+wD1qILF2h/HecgK9eQrZ0CQQDMHXoJMfKKbrFrTKgE\" + \"zyggO1gtuT5OXYeFewMEb5AbDI2FfSc2YP7SHij8iQ2HdukBrbTmi6qxh3HmIR58\" + \"I/AfAkEA0Y9vr0tombsUB8cZv0v5OYoBZvCTbMANtzfb4AOHpiKqqbohDOevLQ7/\" + \"SpvgVCmVaDz2PptcRAyEBZ5MCssneQJAB2pmvaDH7Ambfod5bztLfOhLCtY5EkXJ\" + \"n6rZcDbRaHorRhdG7m3VtDKOUKZ2DF7glkQGV33phKukErVPUzlHBwJAScD9TqaG\" + \"wJ3juUsVtujV23SnH43iMggXT7m82STpPGam1hPfmqu2Z0niePFo927ogQ7H1EMJ\" + \"UHgqXmuvk2X/Ww==\";\n assertEquals(helloWorldEncoded, java8Base64.internalEncode(helloWorldBytes));\n assertEquals(helloWorldTwoLinesEncoded, java8Base64.internalEncode(helloWorldTwoLinesBytes));\n assertEquals(helloWorldTwoLinesAndNewLineEncoded, java8Base64.internalEncode(helloWorldTwoLinesAndNewLineBytes));\n assertEquals(helloWorldDifferentCharsEncoded, java8Base64.internalEncode(helloWorldDifferentCharsBytes));\n assertEquals(str, java8Base64.internalEncode(bytes));\n assertEquals(helloWorldEncoded, commonsCodecBase64.internalEncode(helloWorldBytes));\n assertEquals(helloWorldTwoLinesEncoded, commonsCodecBase64.internalEncode(helloWorldTwoLinesBytes));\n assertEquals(helloWorldTwoLinesAndNewLineEncoded, commonsCodecBase64.internalEncode(helloWorldTwoLinesAndNewLineBytes));\n assertEquals(helloWorldDifferentCharsEncoded, commonsCodecBase64.internalEncode(helloWorldDifferentCharsBytes));\n assertEquals(str, commonsCodecBase64.internalEncode(bytes));\n assertEquals(helloWorldEncoded, jaxbBase64.internalEncode(helloWorldBytes));\n assertEquals(helloWorldTwoLinesEncoded, jaxbBase64.internalEncode(helloWorldTwoLinesBytes));\n assertEquals(helloWorldTwoLinesAndNewLineEncoded, jaxbBase64.internalEncode(helloWorldTwoLinesAndNewLineBytes));\n assertEquals(helloWorldDifferentCharsEncoded, jaxbBase64.internalEncode(helloWorldDifferentCharsBytes));\n assertEquals(str, jaxbBase64.internalEncode(bytes));\n}",
95
- "old_test_file_path": [
96
- "scribejava-core/src/test/java/com/github/scribejava/core/base64/Base64Test.java"
97
- ],
98
- "old_test_lnum": [
99
- "66-103"
100
- ],
101
- "new_test_lnum": [
102
- "69-112"
103
- ],
104
- "old_production_code": "",
105
- "new_production_code": "@Override\nprotected String internalEncode(byte[] bytes) {\n return DatatypeConverter.printBase64Binary(bytes);\n}",
106
- "focal_file_path": "scribejava-core/src/main/java/com/github/scribejava/core/base64/JaxbBase64.java",
107
- "focal_method_sign": "com/github/scribejava/core/base64/JaxbBase64.internalEncode:([B)Ljava/lang/String",
108
- "focal_all_deps_scored": [
109
- {
110
- "dep_id": 0,
111
- "method_sign": "com/github/scribejava/core/base64/JaxbBase64.internalEncode:([B)Ljava/lang/String",
112
- "file_path_old": null,
113
- "line_nums_old": null,
114
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/base64/JaxbBase64.java",
115
- "line_nums_new": "7-10",
116
- "dependency_updated": "inserted",
117
- "score": null,
118
- "signal_scores": {}
119
- }
120
- ],
121
- "coverage_gold": 1.0,
122
- "branch_coverage_gold": 0.0,
123
- "method_coverage_gold": 1.6043,
124
- "line_coverage_gold": 0.6329,
125
- "is_traceback": false,
126
- "commit_gap": {
127
- "count": 0,
128
- "skipped_commits": []
129
- },
130
- "test_is_refactoring_only": false,
131
- "has_test_dep_change": false,
132
- "all_deps_new": [
133
- "com/github/scribejava/core/base64/JaxbBase64.internalEncode:([B)Ljava/lang/String",
134
- "com/github/scribejava/core/base64/Java8Base64.internalEncode:([B)Ljava/lang/String",
135
- "com/github/scribejava/core/base64/CommonsCodecBase64.internalEncode:([B)Ljava/lang/String"
136
- ],
137
- "all_deps_old": [
138
- "com/github/scribejava/core/base64/CommonsCodecBase64.internalEncode:([B)Ljava/lang/String",
139
- "com/github/scribejava/core/base64/Java8Base64.internalEncode:([B)Ljava/lang/String"
140
- ],
141
- "deps_changes": [
142
- {
143
- "method_sign": "com/github/scribejava/core/base64/JaxbBase64.internalEncode:([B)Ljava/lang/String",
144
- "change_type": "ADD",
145
- "file_path_old": null,
146
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/base64/JaxbBase64.java",
147
- "source": "production",
148
- "is_test_dependency": false,
149
- "is_refactoring_only": false
150
- }
151
- ],
152
- "variant_result": {
153
- "old_on_old": "pass",
154
- "old_on_new": "error",
155
- "new_on_old": "error",
156
- "new_on_new": "pass"
157
- }
158
- }
159
- ],
160
- "version": "scribejava-8.3.3",
161
- "java_version": 11
162
- },
163
- {
164
- "task_id": "scribejava_scribejava-scribejava-8.3.3__3ec1be2_ccf4d52__OAuth1AccessTokenExtractorTest_589320d8",
165
- "project_name": "scribejava_scribejava-scribejava-8.3.3",
166
- "git_clone_url": "https://github.com/scribejava/scribejava.git",
167
- "rev1": "3ec1be264e5aea1cbacd462c4a29ec1f6376d69d",
168
- "rev2": "ccf4d52121dc00bb05d6283e2f7c266b01ecf44a",
169
- "rev1_date": "2019-08-19T09:01:42Z",
170
- "rev2_date": "2019-08-19T10:39:55Z",
171
- "git_diff_url": "https://github.com/scribejava/scribejava/compare/3ec1be264e5aea1cbacd462c4a29ec1f6376d69d...ccf4d52121dc00bb05d6283e2f7c266b01ecf44a",
172
- "test_file": "scribejava-core/src/test/java/com/github/scribejava/core/extractors/OAuth1AccessTokenExtractorTest.java",
173
- "test_changes": [
174
- {
175
- "change_id": "29_scribejava_scribejava-scribejava-8.3.3_3ec1be2_ccf4d52_OAuth1AccessTokenExtractorTest",
176
- "test_sign": "com/github/scribejava/core/extractors/OAuth1AccessTokenExtractorTest.shouldExtractTokenFromResponseWithCallbackConfirmed:()V",
177
- "class": "OAuth1AccessTokenExtractorTest",
178
- "method": "shouldExtractTokenFromResponseWithCallbackConfirmed",
179
- "module": "scribejava-core",
180
- "junit_selector": "com.github.scribejava.core.extractors.OAuth1AccessTokenExtractorTest#shouldExtractTokenFromResponseWithCallbackConfirmed",
181
- "old_test_code": "@Test\npublic void shouldExtractTokenFromResponseWithCallbackConfirmed() throws IOException {\n final String response = \"oauth_token=hh5s93j4hdidpola&oauth_token_secret=hdhd0244k9j7ao03\" + \"&callback_confirmed=true\";\n final OAuth1Token extracted = extractor.extract(ok(response));\n assertEquals(\"hh5s93j4hdidpola\", extracted.getToken());\n assertEquals(\"hdhd0244k9j7ao03\", extracted.getTokenSecret());\n}",
182
- "new_test_code": "@Test\npublic void shouldExtractTokenFromResponseWithCallbackConfirmed() throws IOException {\n final String responseBody = \"oauth_token=hh5s93j4hdidpola&oauth_token_secret=hdhd0244k9j7ao03\" + \"&callback_confirmed=true\";\n final OAuth1Token extracted;\n try (Response response = ok(responseBody)) {\n extracted = extractor.extract(response);\n }\n assertEquals(\"hh5s93j4hdidpola\", extracted.getToken());\n assertEquals(\"hdhd0244k9j7ao03\", extracted.getTokenSecret());\n}",
183
- "old_test_file_path": [
184
- "scribejava-core/src/test/java/com/github/scribejava/core/extractors/OAuth1AccessTokenExtractorTest.java"
185
- ],
186
- "old_test_lnum": [
187
- "39-46"
188
- ],
189
- "new_test_lnum": [
190
- "45-55"
191
- ],
192
- "old_production_code": "",
193
- "new_production_code": "@Override\npublic void close() throws IOException {\n if (stream != null) {\n stream.close();\n }\n}",
194
- "focal_file_path": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
195
- "focal_method_sign": "com/github/scribejava/core/model/Response.close:()V",
196
- "focal_all_deps_scored": [
197
- {
198
- "dep_id": 0,
199
- "method_sign": "com/github/scribejava/core/model/Response.close:()V",
200
- "file_path_old": null,
201
- "line_nums_old": null,
202
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
203
- "line_nums_new": "122-127",
204
- "dependency_updated": "inserted",
205
- "score": null,
206
- "signal_scores": {}
207
- }
208
- ],
209
- "coverage_gold": 0.9,
210
- "branch_coverage_gold": 1.5773,
211
- "method_coverage_gold": 4.6729,
212
- "line_coverage_gold": 3.4328,
213
- "is_traceback": false,
214
- "commit_gap": {
215
- "count": 0,
216
- "skipped_commits": []
217
- },
218
- "test_is_refactoring_only": false,
219
- "has_test_dep_change": false,
220
- "all_deps_new": [
221
- "com/github/scribejava/core/model/OAuth1AccessToken.getToken:()Ljava/lang/String",
222
- "com/github/scribejava/core/model/OAuth1AccessToken.getTokenSecret:()Ljava/lang/String",
223
- "com/github/scribejava/core/extractors/OAuth1AccessTokenExtractorTest.ok:(Ljava/lang/String;)Lcom/github/scribejava/core/model/Response",
224
- "com/github/scribejava/core/model/Response.close:()V",
225
- "com/github/scribejava/core/extractors/AbstractOAuth1TokenExtractor.extract:(Lcom/github/scribejava/core/model/Response;)Lcom/github/scribejava/core/model/OAuth1Token"
226
- ],
227
- "all_deps_old": [
228
- "com/github/scribejava/core/model/OAuth1AccessToken.getTokenSecret:()Ljava/lang/String",
229
- "com/github/scribejava/core/extractors/OAuth1AccessTokenExtractorTest.ok:(Ljava/lang/String;)Lcom/github/scribejava/core/model/Response",
230
- "com/github/scribejava/core/model/OAuth1AccessToken.getToken:()Ljava/lang/String",
231
- "com/github/scribejava/core/extractors/AbstractOAuth1TokenExtractor.extract:(Lcom/github/scribejava/core/model/Response;)Lcom/github/scribejava/core/model/OAuth1Token"
232
- ],
233
- "deps_changes": [
234
- {
235
- "method_sign": "com/github/scribejava/core/model/Response.close:()V",
236
- "change_type": "ADD",
237
- "file_path_old": null,
238
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
239
- "source": "production",
240
- "is_test_dependency": false,
241
- "is_refactoring_only": false
242
- }
243
- ],
244
- "variant_result": {
245
- "old_on_old": "pass",
246
- "old_on_new": "error",
247
- "new_on_old": "error",
248
- "new_on_new": "pass"
249
- }
250
- }
251
- ],
252
- "version": "scribejava-8.3.3",
253
- "java_version": 11
254
- },
255
- {
256
- "task_id": "scribejava_scribejava-scribejava-8.3.3__3ec1be2_ccf4d52__OAuth2AccessTokenExtractorTest_10bd750e",
257
- "project_name": "scribejava_scribejava-scribejava-8.3.3",
258
- "git_clone_url": "https://github.com/scribejava/scribejava.git",
259
- "rev1": "3ec1be264e5aea1cbacd462c4a29ec1f6376d69d",
260
- "rev2": "ccf4d52121dc00bb05d6283e2f7c266b01ecf44a",
261
- "rev1_date": "2019-08-19T09:01:42Z",
262
- "rev2_date": "2019-08-19T10:39:55Z",
263
- "git_diff_url": "https://github.com/scribejava/scribejava/compare/3ec1be264e5aea1cbacd462c4a29ec1f6376d69d...ccf4d52121dc00bb05d6283e2f7c266b01ecf44a",
264
- "test_file": "scribejava-core/src/test/java/com/github/scribejava/core/extractors/OAuth2AccessTokenExtractorTest.java",
265
- "test_changes": [
266
- {
267
- "change_id": "27_scribejava_scribejava-scribejava-8.3.3_3ec1be2_ccf4d52_OAuth2AccessTokenExtractorTest",
268
- "test_sign": "com/github/scribejava/core/extractors/OAuth2AccessTokenExtractorTest.shouldExtractTokenFromResponseWithExpiresParam:()V",
269
- "class": "OAuth2AccessTokenExtractorTest",
270
- "method": "shouldExtractTokenFromResponseWithExpiresParam",
271
- "module": "scribejava-core",
272
- "junit_selector": "com.github.scribejava.core.extractors.OAuth2AccessTokenExtractorTest#shouldExtractTokenFromResponseWithExpiresParam",
273
- "old_test_code": "@Test\npublic void shouldExtractTokenFromResponseWithExpiresParam() throws IOException {\n final String response = \"access_token=166942940015970|2.2ltzWXYNDjCtg5ZDVVJJeg__.3600.1295816400-548517159\" + \"|RsXNdKrpxg8L6QNLWcs2TVTmcaE&expires_in=5108\";\n final OAuth2AccessToken extracted = extractor.extract(ok(response));\n assertEquals(\"166942940015970|2.2ltzWXYNDjCtg5ZDVVJJeg__.3600.1295816400-548517159|RsXNdKrpxg8L6QNLWcs2TVTmcaE\", extracted.getAccessToken());\n assertEquals(Integer.valueOf(5108), extracted.getExpiresIn());\n}",
274
- "new_test_code": "@Test\npublic void shouldExtractTokenFromResponseWithExpiresParam() throws IOException {\n final String responseBody = \"access_token=166942940015970|2.2ltzWXYNDjCtg5ZDVVJJeg__.3600.1295816400-548517159\" + \"|RsXNdKrpxg8L6QNLWcs2TVTmcaE&expires_in=5108\";\n final OAuth2AccessToken extracted;\n try (Response response = ok(responseBody)) {\n extracted = extractor.extract(response);\n }\n assertEquals(\"166942940015970|2.2ltzWXYNDjCtg5ZDVVJJeg__.3600.1295816400-548517159|RsXNdKrpxg8L6QNLWcs2TVTmcaE\", extracted.getAccessToken());\n assertEquals(Integer.valueOf(5108), extracted.getExpiresIn());\n}",
275
- "old_test_file_path": [
276
- "scribejava-core/src/test/java/com/github/scribejava/core/extractors/OAuth2AccessTokenExtractorTest.java"
277
- ],
278
- "old_test_lnum": [
279
- "32-40"
280
- ],
281
- "new_test_lnum": [
282
- "35-46"
283
- ],
284
- "old_production_code": "",
285
- "new_production_code": "@Override\npublic void close() throws IOException {\n if (stream != null) {\n stream.close();\n }\n}",
286
- "focal_file_path": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
287
- "focal_method_sign": "com/github/scribejava/core/model/Response.close:()V",
288
- "focal_all_deps_scored": [
289
- {
290
- "dep_id": 0,
291
- "method_sign": "com/github/scribejava/core/model/Response.close:()V",
292
- "file_path_old": null,
293
- "line_nums_old": null,
294
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
295
- "line_nums_new": "122-127",
296
- "dependency_updated": "inserted",
297
- "score": null,
298
- "signal_scores": {}
299
- }
300
- ],
301
- "coverage_gold": 0.7894736842105263,
302
- "branch_coverage_gold": 2.0505,
303
- "method_coverage_gold": 3.9252,
304
- "line_coverage_gold": 3.8829,
305
- "is_traceback": false,
306
- "commit_gap": {
307
- "count": 0,
308
- "skipped_commits": []
309
- },
310
- "test_is_refactoring_only": false,
311
- "has_test_dep_change": false,
312
- "all_deps_new": [
313
- "com/github/scribejava/core/extractors/OAuth2AccessTokenExtractorTest.ok:(Ljava/lang/String;)Lcom/github/scribejava/core/model/Response",
314
- "com/github/scribejava/core/model/OAuth2AccessToken.getExpiresIn:()Ljava/lang/Integer",
315
- "com/github/scribejava/core/extractors/OAuth2AccessTokenExtractor.extract:(Lcom/github/scribejava/core/model/Response;)Lcom/github/scribejava/core/model/OAuth2AccessToken",
316
- "com/github/scribejava/core/model/Response.close:()V",
317
- "com/github/scribejava/core/model/OAuth2AccessToken.getAccessToken:()Ljava/lang/String"
318
- ],
319
- "all_deps_old": [
320
- "com/github/scribejava/core/model/OAuth2AccessToken.getExpiresIn:()Ljava/lang/Integer",
321
- "com/github/scribejava/core/extractors/OAuth2AccessTokenExtractorTest.ok:(Ljava/lang/String;)Lcom/github/scribejava/core/model/Response",
322
- "com/github/scribejava/core/extractors/OAuth2AccessTokenExtractor.extract:(Lcom/github/scribejava/core/model/Response;)Lcom/github/scribejava/core/model/OAuth2AccessToken",
323
- "com/github/scribejava/core/model/OAuth2AccessToken.getAccessToken:()Ljava/lang/String"
324
- ],
325
- "deps_changes": [
326
- {
327
- "method_sign": "com/github/scribejava/core/model/Response.close:()V",
328
- "change_type": "ADD",
329
- "file_path_old": null,
330
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
331
- "source": "production",
332
- "is_test_dependency": false,
333
- "is_refactoring_only": false
334
- }
335
- ],
336
- "variant_result": {
337
- "old_on_old": "pass",
338
- "old_on_new": "error",
339
- "new_on_old": "error",
340
- "new_on_new": "pass"
341
- }
342
- },
343
- {
344
- "change_id": "36_scribejava_scribejava-scribejava-8.3.3_3ec1be2_ccf4d52_OAuth2AccessTokenExtractorTest",
345
- "test_sign": "com/github/scribejava/core/extractors/OAuth2AccessTokenExtractorTest.shouldExtractTokenFromResponseWithExpiresAndRefreshParam:()V",
346
- "class": "OAuth2AccessTokenExtractorTest",
347
- "method": "shouldExtractTokenFromResponseWithExpiresAndRefreshParam",
348
- "module": "scribejava-core",
349
- "junit_selector": "com.github.scribejava.core.extractors.OAuth2AccessTokenExtractorTest#shouldExtractTokenFromResponseWithExpiresAndRefreshParam",
350
- "old_test_code": "@Test\npublic void shouldExtractTokenFromResponseWithExpiresAndRefreshParam() throws IOException {\n final String response = \"access_token=166942940015970|2.2ltzWXYNDjCtg5ZDVVJJeg__.3600.1295816400-548517159\" + \"|RsXNdKrpxg8L6QNLWcs2TVTmcaE&expires_in=5108&token_type=bearer&refresh_token=166942940015970\";\n final OAuth2AccessToken extracted = extractor.extract(ok(response));\n assertEquals(\"166942940015970|2.2ltzWXYNDjCtg5ZDVVJJeg__.3600.1295816400-548517159|RsXNdKrpxg8L6QNLWcs2TVTmcaE\", extracted.getAccessToken());\n assertEquals(Integer.valueOf(5108), extracted.getExpiresIn());\n assertEquals(\"bearer\", extracted.getTokenType());\n assertEquals(\"166942940015970\", extracted.getRefreshToken());\n}",
351
- "new_test_code": "@Test\npublic void shouldExtractTokenFromResponseWithExpiresAndRefreshParam() throws IOException {\n final String responseBody = \"access_token=166942940015970|2.2ltzWXYNDjCtg5ZDVVJJeg__.3600.1295816400-548517159\" + \"|RsXNdKrpxg8L6QNLWcs2TVTmcaE&expires_in=5108&token_type=bearer&refresh_token=166942940015970\";\n final OAuth2AccessToken extracted;\n try (Response response = ok(responseBody)) {\n extracted = extractor.extract(response);\n }\n assertEquals(\"166942940015970|2.2ltzWXYNDjCtg5ZDVVJJeg__.3600.1295816400-548517159|RsXNdKrpxg8L6QNLWcs2TVTmcaE\", extracted.getAccessToken());\n assertEquals(Integer.valueOf(5108), extracted.getExpiresIn());\n assertEquals(\"bearer\", extracted.getTokenType());\n assertEquals(\"166942940015970\", extracted.getRefreshToken());\n}",
352
- "old_test_file_path": [
353
- "scribejava-core/src/test/java/com/github/scribejava/core/extractors/OAuth2AccessTokenExtractorTest.java"
354
- ],
355
- "old_test_lnum": [
356
- "42-52"
357
- ],
358
- "new_test_lnum": [
359
- "48-61"
360
- ],
361
- "old_production_code": "",
362
- "new_production_code": "@Override\npublic void close() throws IOException {\n if (stream != null) {\n stream.close();\n }\n}",
363
- "focal_file_path": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
364
- "focal_method_sign": "com/github/scribejava/core/model/Response.close:()V",
365
- "focal_all_deps_scored": [
366
- {
367
- "dep_id": 0,
368
- "method_sign": "com/github/scribejava/core/model/Response.close:()V",
369
- "file_path_old": null,
370
- "line_nums_old": null,
371
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
372
- "line_nums_new": "122-127",
373
- "dependency_updated": "inserted",
374
- "score": null,
375
- "signal_scores": {}
376
- }
377
- ],
378
- "coverage_gold": 0.8095238095238095,
379
- "branch_coverage_gold": 2.0505,
380
- "method_coverage_gold": 4.2991,
381
- "line_coverage_gold": 3.9955,
382
- "is_traceback": false,
383
- "commit_gap": {
384
- "count": 0,
385
- "skipped_commits": []
386
- },
387
- "test_is_refactoring_only": false,
388
- "has_test_dep_change": false,
389
- "all_deps_new": [
390
- "com/github/scribejava/core/extractors/OAuth2AccessTokenExtractorTest.ok:(Ljava/lang/String;)Lcom/github/scribejava/core/model/Response",
391
- "com/github/scribejava/core/model/OAuth2AccessToken.getExpiresIn:()Ljava/lang/Integer",
392
- "com/github/scribejava/core/model/OAuth2AccessToken.getRefreshToken:()Ljava/lang/String",
393
- "com/github/scribejava/core/extractors/OAuth2AccessTokenExtractor.extract:(Lcom/github/scribejava/core/model/Response;)Lcom/github/scribejava/core/model/OAuth2AccessToken",
394
- "com/github/scribejava/core/model/Response.close:()V",
395
- "com/github/scribejava/core/model/OAuth2AccessToken.getAccessToken:()Ljava/lang/String",
396
- "com/github/scribejava/core/model/OAuth2AccessToken.getTokenType:()Ljava/lang/String"
397
- ],
398
- "all_deps_old": [
399
- "com/github/scribejava/core/model/OAuth2AccessToken.getExpiresIn:()Ljava/lang/Integer",
400
- "com/github/scribejava/core/model/OAuth2AccessToken.getTokenType:()Ljava/lang/String",
401
- "com/github/scribejava/core/extractors/OAuth2AccessTokenExtractorTest.ok:(Ljava/lang/String;)Lcom/github/scribejava/core/model/Response",
402
- "com/github/scribejava/core/extractors/OAuth2AccessTokenExtractor.extract:(Lcom/github/scribejava/core/model/Response;)Lcom/github/scribejava/core/model/OAuth2AccessToken",
403
- "com/github/scribejava/core/model/OAuth2AccessToken.getAccessToken:()Ljava/lang/String",
404
- "com/github/scribejava/core/model/OAuth2AccessToken.getRefreshToken:()Ljava/lang/String"
405
- ],
406
- "deps_changes": [
407
- {
408
- "method_sign": "com/github/scribejava/core/model/Response.close:()V",
409
- "change_type": "ADD",
410
- "file_path_old": null,
411
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
412
- "source": "production",
413
- "is_test_dependency": false,
414
- "is_refactoring_only": false
415
- }
416
- ],
417
- "variant_result": {
418
- "old_on_old": "pass",
419
- "old_on_new": "error",
420
- "new_on_old": "error",
421
- "new_on_new": "pass"
422
- }
423
- },
424
- {
425
- "change_id": "37_scribejava_scribejava-scribejava-8.3.3_3ec1be2_ccf4d52_OAuth2AccessTokenExtractorTest",
426
- "test_sign": "com/github/scribejava/core/extractors/OAuth2AccessTokenExtractorTest.shouldExtractTokenFromOAuthStandardResponse:()V",
427
- "class": "OAuth2AccessTokenExtractorTest",
428
- "method": "shouldExtractTokenFromOAuthStandardResponse",
429
- "module": "scribejava-core",
430
- "junit_selector": "com.github.scribejava.core.extractors.OAuth2AccessTokenExtractorTest#shouldExtractTokenFromOAuthStandardResponse",
431
- "old_test_code": "@Test\npublic void shouldExtractTokenFromOAuthStandardResponse() throws IOException {\n final String response = \"access_token=166942940015970|2.2ltzWXYNDjCtg5ZDVVJJeg__.3600.1295816400-548517159\" + \"|RsXNdKrpxg8L6QNLWcs2TVTmcaE\";\n final OAuth2AccessToken extracted = extractor.extract(ok(response));\n assertEquals(\"166942940015970|2.2ltzWXYNDjCtg5ZDVVJJeg__.3600.1295816400-548517159|RsXNdKrpxg8L6QNLWcs2TVTmcaE\", extracted.getAccessToken());\n}",
432
- "new_test_code": "@Test\npublic void shouldExtractTokenFromOAuthStandardResponse() throws IOException {\n final String responseBody = \"access_token=166942940015970|2.2ltzWXYNDjCtg5ZDVVJJeg__.3600.1295816400-548517159\" + \"|RsXNdKrpxg8L6QNLWcs2TVTmcaE\";\n final OAuth2AccessToken extracted;\n try (Response response = ok(responseBody)) {\n extracted = extractor.extract(response);\n }\n assertEquals(\"166942940015970|2.2ltzWXYNDjCtg5ZDVVJJeg__.3600.1295816400-548517159|RsXNdKrpxg8L6QNLWcs2TVTmcaE\", extracted.getAccessToken());\n}",
433
- "old_test_file_path": [
434
- "scribejava-core/src/test/java/com/github/scribejava/core/extractors/OAuth2AccessTokenExtractorTest.java"
435
- ],
436
- "old_test_lnum": [
437
- "23-30"
438
- ],
439
- "new_test_lnum": [
440
- "23-33"
441
- ],
442
- "old_production_code": "",
443
- "new_production_code": "@Override\npublic void close() throws IOException {\n if (stream != null) {\n stream.close();\n }\n}",
444
- "focal_file_path": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
445
- "focal_method_sign": "com/github/scribejava/core/model/Response.close:()V",
446
- "focal_all_deps_scored": [
447
- {
448
- "dep_id": 0,
449
- "method_sign": "com/github/scribejava/core/model/Response.close:()V",
450
- "file_path_old": null,
451
- "line_nums_old": null,
452
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
453
- "line_nums_new": "122-127",
454
- "dependency_updated": "inserted",
455
- "score": null,
456
- "signal_scores": {}
457
- }
458
- ],
459
- "coverage_gold": 0.7777777777777778,
460
- "branch_coverage_gold": 2.0505,
461
- "method_coverage_gold": 3.7383,
462
- "line_coverage_gold": 3.8267,
463
- "is_traceback": false,
464
- "commit_gap": {
465
- "count": 0,
466
- "skipped_commits": []
467
- },
468
- "test_is_refactoring_only": false,
469
- "has_test_dep_change": false,
470
- "all_deps_new": [
471
- "com/github/scribejava/core/extractors/OAuth2AccessTokenExtractorTest.ok:(Ljava/lang/String;)Lcom/github/scribejava/core/model/Response",
472
- "com/github/scribejava/core/extractors/OAuth2AccessTokenExtractor.extract:(Lcom/github/scribejava/core/model/Response;)Lcom/github/scribejava/core/model/OAuth2AccessToken",
473
- "com/github/scribejava/core/model/Response.close:()V",
474
- "com/github/scribejava/core/model/OAuth2AccessToken.getAccessToken:()Ljava/lang/String"
475
- ],
476
- "all_deps_old": [
477
- "com/github/scribejava/core/extractors/OAuth2AccessTokenExtractorTest.ok:(Ljava/lang/String;)Lcom/github/scribejava/core/model/Response",
478
- "com/github/scribejava/core/extractors/OAuth2AccessTokenExtractor.extract:(Lcom/github/scribejava/core/model/Response;)Lcom/github/scribejava/core/model/OAuth2AccessToken",
479
- "com/github/scribejava/core/model/OAuth2AccessToken.getAccessToken:()Ljava/lang/String"
480
- ],
481
- "deps_changes": [
482
- {
483
- "method_sign": "com/github/scribejava/core/model/Response.close:()V",
484
- "change_type": "ADD",
485
- "file_path_old": null,
486
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
487
- "source": "production",
488
- "is_test_dependency": false,
489
- "is_refactoring_only": false
490
- }
491
- ],
492
- "variant_result": {
493
- "old_on_old": "pass",
494
- "old_on_new": "error",
495
- "new_on_old": "error",
496
- "new_on_new": "pass"
497
- }
498
- }
499
- ],
500
- "version": "scribejava-8.3.3",
501
- "java_version": 11
502
- },
503
- {
504
- "task_id": "scribejava_scribejava-scribejava-8.3.3__3ec1be2_ccf4d52__OAuth2AccessTokenJsonExtractorTest_1ad2450f",
505
- "project_name": "scribejava_scribejava-scribejava-8.3.3",
506
- "git_clone_url": "https://github.com/scribejava/scribejava.git",
507
- "rev1": "3ec1be264e5aea1cbacd462c4a29ec1f6376d69d",
508
- "rev2": "ccf4d52121dc00bb05d6283e2f7c266b01ecf44a",
509
- "rev1_date": "2019-08-19T09:01:42Z",
510
- "rev2_date": "2019-08-19T10:39:55Z",
511
- "git_diff_url": "https://github.com/scribejava/scribejava/compare/3ec1be264e5aea1cbacd462c4a29ec1f6376d69d...ccf4d52121dc00bb05d6283e2f7c266b01ecf44a",
512
- "test_file": "scribejava-core/src/test/java/com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractorTest.java",
513
- "test_changes": [
514
- {
515
- "change_id": "34_scribejava_scribejava-scribejava-8.3.3_3ec1be2_ccf4d52_OAuth2AccessTokenJsonExtractorTest",
516
- "test_sign": "com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractorTest.testEscapedJsonInResponse:()V",
517
- "class": "OAuth2AccessTokenJsonExtractorTest",
518
- "method": "testEscapedJsonInResponse",
519
- "module": "scribejava-core",
520
- "junit_selector": "com.github.scribejava.core.extractors.OAuth2AccessTokenJsonExtractorTest#testEscapedJsonInResponse",
521
- "old_test_code": "@Test\npublic void testEscapedJsonInResponse() throws IOException {\n final OAuth2AccessToken token = extractor.extract(ok(\"{ \\\"access_token\\\":\\\"I0122HKLEM2\\\\/MV3ABKFTDT3T5X\\\",\" + \"\\\"token_type\\\":\\\"example\\\"}\"));\n assertEquals(\"I0122HKLEM2/MV3ABKFTDT3T5X\", token.getAccessToken());\n}",
522
- "new_test_code": "@Test\npublic void testEscapedJsonInResponse() throws IOException {\n final String responseBody = \"{ \\\"access_token\\\":\\\"I0122HKLEM2\\\\/MV3ABKFTDT3T5X\\\",\" + \"\\\"token_type\\\":\\\"example\\\"}\";\n final OAuth2AccessToken token;\n try (Response response = ok(responseBody)) {\n token = extractor.extract(response);\n }\n assertEquals(\"I0122HKLEM2/MV3ABKFTDT3T5X\", token.getAccessToken());\n}",
523
- "old_test_file_path": [
524
- "scribejava-core/src/test/java/com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractorTest.java"
525
- ],
526
- "old_test_lnum": [
527
- "78-83"
528
- ],
529
- "new_test_lnum": [
530
- "95-104"
531
- ],
532
- "old_production_code": "",
533
- "new_production_code": "@Override\npublic void close() throws IOException {\n if (stream != null) {\n stream.close();\n }\n}",
534
- "focal_file_path": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
535
- "focal_method_sign": "com/github/scribejava/core/model/Response.close:()V",
536
- "focal_all_deps_scored": [
537
- {
538
- "dep_id": 0,
539
- "method_sign": "com/github/scribejava/core/model/Response.close:()V",
540
- "file_path_old": null,
541
- "line_nums_old": null,
542
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
543
- "line_nums_new": "122-127",
544
- "dependency_updated": "inserted",
545
- "score": null,
546
- "signal_scores": {}
547
- }
548
- ],
549
- "coverage_gold": 0.7777777777777778,
550
- "branch_coverage_gold": 2.2082,
551
- "method_coverage_gold": 3.7383,
552
- "line_coverage_gold": 3.1514,
553
- "is_traceback": false,
554
- "commit_gap": {
555
- "count": 0,
556
- "skipped_commits": []
557
- },
558
- "test_is_refactoring_only": false,
559
- "has_test_dep_change": false,
560
- "all_deps_new": [
561
- "com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractor.extract:(Lcom/github/scribejava/core/model/Response;)Lcom/github/scribejava/core/model/OAuth2AccessToken",
562
- "com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractorTest.ok:(Ljava/lang/String;)Lcom/github/scribejava/core/model/Response",
563
- "com/github/scribejava/core/model/Response.close:()V",
564
- "com/github/scribejava/core/model/OAuth2AccessToken.getAccessToken:()Ljava/lang/String"
565
- ],
566
- "all_deps_old": [
567
- "com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractor.extract:(Lcom/github/scribejava/core/model/Response;)Lcom/github/scribejava/core/model/OAuth2AccessToken",
568
- "com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractorTest.ok:(Ljava/lang/String;)Lcom/github/scribejava/core/model/Response",
569
- "com/github/scribejava/core/model/OAuth2AccessToken.getAccessToken:()Ljava/lang/String"
570
- ],
571
- "deps_changes": [
572
- {
573
- "method_sign": "com/github/scribejava/core/model/Response.close:()V",
574
- "change_type": "ADD",
575
- "file_path_old": null,
576
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
577
- "source": "production",
578
- "is_test_dependency": false,
579
- "is_refactoring_only": false
580
- }
581
- ],
582
- "variant_result": {
583
- "old_on_old": "pass",
584
- "old_on_new": "error",
585
- "new_on_old": "error",
586
- "new_on_new": "pass"
587
- }
588
- },
589
- {
590
- "change_id": "44_scribejava_scribejava-scribejava-8.3.3_3ec1be2_ccf4d52_OAuth2AccessTokenJsonExtractorTest",
591
- "test_sign": "com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractorTest.shouldParseResponse:()V",
592
- "class": "OAuth2AccessTokenJsonExtractorTest",
593
- "method": "shouldParseResponse",
594
- "module": "scribejava-core",
595
- "junit_selector": "com.github.scribejava.core.extractors.OAuth2AccessTokenJsonExtractorTest#shouldParseResponse",
596
- "old_test_code": "@Test\npublic void shouldParseResponse() throws IOException {\n final OAuth2AccessToken token = extractor.extract(ok(\"{ \\\"access_token\\\":\\\"I0122HHJKLEM21F3WLPYHDKGKZULAUO4SGMV3ABKFTDT3T3X\\\", \" + \"\\\"token_type\\\":\\\"example\\\"}\"));\n assertEquals(\"I0122HHJKLEM21F3WLPYHDKGKZULAUO4SGMV3ABKFTDT3T3X\", token.getAccessToken());\n}",
597
- "new_test_code": "@Test\npublic void shouldParseResponse() throws IOException {\n final String responseBody = \"{ \\\"access_token\\\":\\\"I0122HHJKLEM21F3WLPYHDKGKZULAUO4SGMV3ABKFTDT3T3X\\\", \" + \"\\\"token_type\\\":\\\"example\\\"}\";\n final OAuth2AccessToken token;\n try (Response response = ok(responseBody)) {\n token = extractor.extract(response);\n }\n assertEquals(\"I0122HHJKLEM21F3WLPYHDKGKZULAUO4SGMV3ABKFTDT3T3X\", token.getAccessToken());\n}",
598
- "old_test_file_path": [
599
- "scribejava-core/src/test/java/com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractorTest.java"
600
- ],
601
- "old_test_lnum": [
602
- "19-25"
603
- ],
604
- "new_test_lnum": [
605
- "19-28"
606
- ],
607
- "old_production_code": "",
608
- "new_production_code": "@Override\npublic void close() throws IOException {\n if (stream != null) {\n stream.close();\n }\n}",
609
- "focal_file_path": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
610
- "focal_method_sign": "com/github/scribejava/core/model/Response.close:()V",
611
- "focal_all_deps_scored": [
612
- {
613
- "dep_id": 0,
614
- "method_sign": "com/github/scribejava/core/model/Response.close:()V",
615
- "file_path_old": null,
616
- "line_nums_old": null,
617
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
618
- "line_nums_new": "122-127",
619
- "dependency_updated": "inserted",
620
- "score": null,
621
- "signal_scores": {}
622
- }
623
- ],
624
- "coverage_gold": 0.7777777777777778,
625
- "branch_coverage_gold": 2.2082,
626
- "method_coverage_gold": 3.7383,
627
- "line_coverage_gold": 3.1514,
628
- "is_traceback": false,
629
- "commit_gap": {
630
- "count": 0,
631
- "skipped_commits": []
632
- },
633
- "test_is_refactoring_only": false,
634
- "has_test_dep_change": false,
635
- "all_deps_new": [
636
- "com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractor.extract:(Lcom/github/scribejava/core/model/Response;)Lcom/github/scribejava/core/model/OAuth2AccessToken",
637
- "com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractorTest.ok:(Ljava/lang/String;)Lcom/github/scribejava/core/model/Response",
638
- "com/github/scribejava/core/model/Response.close:()V",
639
- "com/github/scribejava/core/model/OAuth2AccessToken.getAccessToken:()Ljava/lang/String"
640
- ],
641
- "all_deps_old": [
642
- "com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractor.extract:(Lcom/github/scribejava/core/model/Response;)Lcom/github/scribejava/core/model/OAuth2AccessToken",
643
- "com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractorTest.ok:(Ljava/lang/String;)Lcom/github/scribejava/core/model/Response",
644
- "com/github/scribejava/core/model/OAuth2AccessToken.getAccessToken:()Ljava/lang/String"
645
- ],
646
- "deps_changes": [
647
- {
648
- "method_sign": "com/github/scribejava/core/model/Response.close:()V",
649
- "change_type": "ADD",
650
- "file_path_old": null,
651
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java",
652
- "source": "production",
653
- "is_test_dependency": false,
654
- "is_refactoring_only": false
655
- }
656
- ],
657
- "variant_result": {
658
- "old_on_old": "pass",
659
- "old_on_new": "error",
660
- "new_on_old": "error",
661
- "new_on_new": "pass"
662
- }
663
- }
664
- ],
665
- "version": "scribejava-8.3.3",
666
- "java_version": 11
667
- },
668
- {
669
- "task_id": "scribejava_scribejava-scribejava-8.3.3__bc796e4_030d768__OAuth2AccessTokenJsonExtractorTest_3c98cd6d",
670
- "project_name": "scribejava_scribejava-scribejava-8.3.3",
671
- "git_clone_url": "https://github.com/scribejava/scribejava.git",
672
- "rev1": "bc796e4c43d0323c151f7472fb079c22c7a09e58",
673
- "rev2": "030d76872fe371a84b5d05c6c3c33c34e8f611f1",
674
- "rev1_date": "2019-04-11T16:06:08Z",
675
- "rev2_date": "2019-04-11T17:21:58Z",
676
- "git_diff_url": "https://github.com/scribejava/scribejava/compare/bc796e4c43d0323c151f7472fb079c22c7a09e58...030d76872fe371a84b5d05c6c3c33c34e8f611f1",
677
- "test_file": "scribejava-core/src/test/java/com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractorTest.java",
678
- "test_changes": [
679
- {
680
- "change_id": "14_scribejava_scribejava-scribejava-8.3.3_bc796e4_030d768_OAuth2AccessTokenJsonExtractorTest",
681
- "test_sign": "com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractorTest.shouldThrowExceptionIfResponseIsError:()V",
682
- "class": "OAuth2AccessTokenJsonExtractorTest",
683
- "method": "shouldThrowExceptionIfResponseIsError",
684
- "module": "scribejava-core",
685
- "junit_selector": "com.github.scribejava.core.extractors.OAuth2AccessTokenJsonExtractorTest#shouldThrowExceptionIfResponseIsError",
686
- "old_test_code": "@Test\npublic void shouldThrowExceptionIfResponseIsError() throws IOException {\n final String body = \"{\" + \"\\\"error_description\\\":\\\"unknown, invalid, or expired refresh token\\\",\" + \"\\\"error\\\":\\\"invalid_grant\\\"\" + \"}\";\n try {\n extractor.extract(error(body));\n fail();\n } catch (OAuth2AccessTokenErrorResponse oaer) {\n assertEquals(OAuth2AccessTokenErrorResponse.ErrorCode.INVALID_GRANT, oaer.getErrorCode());\n assertEquals(\"unknown, invalid, or expired refresh token\", oaer.getErrorDescription());\n }\n}",
687
- "new_test_code": "@Test\npublic void shouldThrowExceptionIfResponseIsError() throws IOException {\n final String body = \"{\" + \"\\\"error_description\\\":\\\"unknown, invalid, or expired refresh token\\\",\" + \"\\\"error\\\":\\\"invalid_grant\\\"\" + \"}\";\n try {\n extractor.extract(error(body));\n fail();\n } catch (OAuth2AccessTokenErrorResponse oaer) {\n assertEquals(OAuth2AccessTokenErrorResponse.ErrorCode.INVALID_GRANT, oaer.getErrorCode());\n assertEquals(OAuth2Error.INVALID_GRANT, oaer.getError());\n assertEquals(\"unknown, invalid, or expired refresh token\", oaer.getErrorDescription());\n }\n}",
688
- "old_test_file_path": [
689
- "scribejava-core/src/test/java/com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractorTest.java"
690
- ],
691
- "old_test_lnum": [
692
- "58-71"
693
- ],
694
- "new_test_lnum": [
695
- "59-73"
696
- ],
697
- "old_production_code": "",
698
- "new_production_code": "public OAuth2Error getError() {\n return error;\n}",
699
- "focal_file_path": "scribejava-core/src/main/java/com/github/scribejava/core/model/OAuth2AccessTokenErrorResponse.java",
700
- "focal_method_sign": "com/github/scribejava/core/model/OAuth2AccessTokenErrorResponse.getError:()Lcom/github/scribejava/core/oauth2/OAuth2Error",
701
- "focal_all_deps_scored": [
702
- {
703
- "dep_id": 0,
704
- "method_sign": "com/github/scribejava/core/model/OAuth2AccessTokenErrorResponse.getError:()Lcom/github/scribejava/core/oauth2/OAuth2Error",
705
- "file_path_old": null,
706
- "line_nums_old": null,
707
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/model/OAuth2AccessTokenErrorResponse.java",
708
- "line_nums_new": "88-90",
709
- "dependency_updated": "inserted",
710
- "score": null,
711
- "signal_scores": {}
712
- }
713
- ],
714
- "coverage_gold": 0.75,
715
- "branch_coverage_gold": 2.911,
716
- "method_coverage_gold": 4.8237,
717
- "line_coverage_gold": 5.5114,
718
- "is_traceback": false,
719
- "commit_gap": {
720
- "count": 0,
721
- "skipped_commits": []
722
- },
723
- "test_is_refactoring_only": false,
724
- "has_test_dep_change": false,
725
- "all_deps_new": [
726
- "com/github/scribejava/core/model/OAuth2AccessTokenErrorResponse.getErrorCode:()Lcom/github/scribejava/core/model/OAuth2AccessTokenErrorResponse$ErrorCode",
727
- "com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractorTest.error:(Ljava/lang/String;)Lcom/github/scribejava/core/model/Response",
728
- "com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractor.extract:(Lcom/github/scribejava/core/model/Response;)Lcom/github/scribejava/core/model/OAuth2AccessToken",
729
- "com/github/scribejava/core/model/OAuth2AccessTokenErrorResponse.getError:()Lcom/github/scribejava/core/oauth2/OAuth2Error",
730
- "com/github/scribejava/core/model/OAuth2AccessTokenErrorResponse.getErrorDescription:()Ljava/lang/String"
731
- ],
732
- "all_deps_old": [
733
- "com/github/scribejava/core/model/OAuth2AccessTokenErrorResponse.getErrorDescription:()Ljava/lang/String",
734
- "com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractorTest.error:(Ljava/lang/String;)Lcom/github/scribejava/core/model/Response",
735
- "com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractor.extract:(Lcom/github/scribejava/core/model/Response;)Lcom/github/scribejava/core/model/OAuth2AccessToken",
736
- "com/github/scribejava/core/model/OAuth2AccessTokenErrorResponse.getErrorCode:()Lcom/github/scribejava/core/model/OAuth2AccessTokenErrorResponse$ErrorCode"
737
- ],
738
- "deps_changes": [
739
- {
740
- "method_sign": "com/github/scribejava/core/model/OAuth2AccessTokenErrorResponse.getError:()Lcom/github/scribejava/core/oauth2/OAuth2Error",
741
- "change_type": "ADD",
742
- "file_path_old": null,
743
- "file_path_new": "scribejava-core/src/main/java/com/github/scribejava/core/model/OAuth2AccessTokenErrorResponse.java",
744
- "source": "production",
745
- "is_test_dependency": false,
746
- "is_refactoring_only": false
747
- }
748
- ],
749
- "variant_result": {
750
- "old_on_old": "pass",
751
- "old_on_new": "error",
752
- "new_on_old": "error",
753
- "new_on_new": "pass"
754
- }
755
- }
756
- ],
757
- "version": "scribejava-8.3.3",
758
- "java_version": 11
759
- },
760
- {
761
- "task_id": "scribejava_scribejava-scribejava-8.3.3__ea5f7ea_d67a7a6__FitBitJsonTokenExtractorTest_e846d674",
762
- "project_name": "scribejava_scribejava-scribejava-8.3.3",
763
- "git_clone_url": "https://github.com/scribejava/scribejava.git",
764
- "rev1": "ea5f7ea08945fac7a65e9b857e161fbe45144112",
765
- "rev2": "d67a7a69014b0c9bf8225914020741b7a0885ec0",
766
- "rev1_date": "2019-03-29T14:53:36Z",
767
- "rev2_date": "2019-03-29T15:21:34Z",
768
- "git_diff_url": "https://github.com/scribejava/scribejava/compare/ea5f7ea08945fac7a65e9b857e161fbe45144112...d67a7a69014b0c9bf8225914020741b7a0885ec0",
769
- "test_file": "scribejava-apis/src/test/java/com/github/scribejava/apis/fitbit/FitBitJsonTokenExtractorTest.java",
770
- "test_changes": [
771
- {
772
- "change_id": "56_scribejava_scribejava-scribejava-8.3.3_ea5f7ea_d67a7a6_FitBitJsonTokenExtractorTest",
773
- "test_sign": "com/github/scribejava/apis/fitbit/FitBitJsonTokenExtractorTest.testErrorExtraction:()V",
774
- "class": "FitBitJsonTokenExtractorTest",
775
- "method": "testErrorExtraction",
776
- "module": "scribejava-apis",
777
- "junit_selector": "com.github.scribejava.apis.fitbit.FitBitJsonTokenExtractorTest#testErrorExtraction",
778
- "old_test_code": "@Test\npublic void testErrorExtraction() {\n final FitBitJsonTokenExtractor extractor = new FitBitJsonTokenExtractor();\n thrown.expect(OAuth2AccessTokenErrorResponse.class);\n thrown.expect(new ErrorCodeFeatureMatcher(ErrorCode.invalid_grant));\n thrown.expect(new ErrorDescriptionFeatureMatcher(ERROR_DESCRIPTION));\n extractor.generateError(ERROR_JSON);\n}",
779
- "new_test_code": "@Test\npublic void testErrorExtraction() {\n final FitBitJsonTokenExtractor extractor = new FitBitJsonTokenExtractor();\n thrown.expect(OAuth2AccessTokenErrorResponse.class);\n thrown.expect(new ErrorCodeFeatureMatcher(ErrorCode.INVALID_GRANT));\n thrown.expect(new ErrorDescriptionFeatureMatcher(ERROR_DESCRIPTION));\n extractor.generateError(ERROR_JSON);\n}",
780
- "old_test_file_path": [
781
- "scribejava-apis/src/test/java/com/github/scribejava/apis/fitbit/FitBitJsonTokenExtractorTest.java"
782
- ],
783
- "old_test_lnum": [
784
- "25-35"
785
- ],
786
- "new_test_lnum": [
787
- "25-35"
788
- ],
789
- "old_production_code": "@Override\npublic void generateError(String response) {\n final String errorInString = extractParameter(response, ERROR_REGEX_PATTERN, true);\n final String errorDescription = extractParameter(response, ERROR_DESCRIPTION_REGEX_PATTERN, false);\n OAuth2AccessTokenErrorResponse.ErrorCode errorCode;\n try {\n errorCode = OAuth2AccessTokenErrorResponse.ErrorCode.valueOf(errorInString);\n } catch (IllegalArgumentException iaE) {\n errorCode = null;\n }\n throw new OAuth2AccessTokenErrorResponse(errorCode, errorDescription, null, response);\n}",
790
- "new_production_code": "@Override\npublic void generateError(String response) {\n final String errorInString = extractParameter(response, ERROR_REGEX_PATTERN, true);\n final String errorDescription = extractParameter(response, ERROR_DESCRIPTION_REGEX_PATTERN, false);\n OAuth2AccessTokenErrorResponse.ErrorCode errorCode;\n try {\n errorCode = OAuth2AccessTokenErrorResponse.ErrorCode.parseFrom(errorInString);\n } catch (IllegalArgumentException iaE) {\n errorCode = null;\n }\n throw new OAuth2AccessTokenErrorResponse(errorCode, errorDescription, null, response);\n}",
791
- "focal_file_path": "scribejava-apis/src/main/java/com/github/scribejava/apis/fitbit/FitBitJsonTokenExtractor.java",
792
- "focal_method_sign": "com/github/scribejava/apis/fitbit/FitBitJsonTokenExtractor.generateError:(Ljava/lang/String;)V",
793
- "focal_all_deps_scored": [
794
- {
795
- "dep_id": 0,
796
- "method_sign": "com/github/scribejava/apis/fitbit/FitBitJsonTokenExtractor.generateError:(Ljava/lang/String;)V",
797
- "file_path_old": "scribejava-apis/src/main/java/com/github/scribejava/apis/fitbit/FitBitJsonTokenExtractor.java",
798
- "line_nums_old": "35-49",
799
- "file_path_new": "scribejava-apis/src/main/java/com/github/scribejava/apis/fitbit/FitBitJsonTokenExtractor.java",
800
- "line_nums_new": "35-49",
801
- "dependency_updated": "updated",
802
- "score": null,
803
- "signal_scores": {}
804
- }
805
- ],
806
- "coverage_gold": 0.7142857142857143,
807
- "branch_coverage_gold": 0.0,
808
- "method_coverage_gold": 0.6369,
809
- "line_coverage_gold": 1.2563,
810
- "is_traceback": false,
811
- "commit_gap": {
812
- "count": 0,
813
- "skipped_commits": []
814
- },
815
- "test_is_refactoring_only": false,
816
- "has_test_dep_change": false,
817
- "all_deps_new": [
818
- "com/github/scribejava/apis/fitbit/FitBitJsonTokenExtractor.generateError:(Ljava/lang/String;)V"
819
- ],
820
- "all_deps_old": [
821
- "com/github/scribejava/apis/fitbit/FitBitJsonTokenExtractor.generateError:(Ljava/lang/String;)V"
822
- ],
823
- "deps_changes": [
824
- {
825
- "method_sign": "com/github/scribejava/apis/fitbit/FitBitJsonTokenExtractor.generateError:(Ljava/lang/String;)V",
826
- "change_type": "UPDATE",
827
- "file_path_old": "scribejava-apis/src/main/java/com/github/scribejava/apis/fitbit/FitBitJsonTokenExtractor.java",
828
- "file_path_new": "scribejava-apis/src/main/java/com/github/scribejava/apis/fitbit/FitBitJsonTokenExtractor.java",
829
- "source": "production",
830
- "is_test_dependency": false,
831
- "is_refactoring_only": false
832
- }
833
- ],
834
- "variant_result": {
835
- "old_on_old": "pass",
836
- "old_on_new": "error",
837
- "new_on_old": "error",
838
- "new_on_new": "pass"
839
- }
840
- }
841
- ],
842
- "version": "scribejava-8.3.3",
843
- "java_version": 11
844
- }
845
- ]