1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00
semantic/test/corpus/json/javascript/import.json
2016-11-03 15:41:59 -07:00

13799 lines
625 KiB
JSON

[{
"testCaseDescription": "javascript-import-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
7,
20
]
},
{
"category": "StringLiteral",
"range": [
26,
31
]
}
],
"range": [
0,
32
]
}
],
"patch": "insert",
"range": [
0,
33
]
}
],
"hasChanges": true,
"range": [
0,
33
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
45,
49
]
}
],
"range": [
40,
49
]
},
{
"category": "StringLiteral",
"range": [
55,
65
]
}
],
"range": [
33,
66
]
}
],
"patch": "insert",
"range": [
33,
67
]
}
],
"hasChanges": true,
"range": [
33,
67
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
76,
82
]
}
],
"range": [
76,
82
]
}
],
"range": [
74,
84
]
},
{
"category": "StringLiteral",
"range": [
90,
95
]
}
],
"range": [
67,
96
]
}
],
"patch": "insert",
"range": [
67,
97
]
}
],
"hasChanges": true,
"range": [
67,
97
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
106,
113
]
}
],
"range": [
106,
113
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
116,
123
]
}
],
"range": [
116,
123
]
}
],
"range": [
104,
125
]
},
{
"category": "StringLiteral",
"range": [
131,
141
]
}
],
"range": [
97,
142
]
}
],
"patch": "insert",
"range": [
97,
143
]
}
],
"hasChanges": true,
"range": [
97,
143
],
"number": 4
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
152,
159
]
}
],
"range": [
152,
159
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
162,
169
]
},
{
"category": "Identifier",
"range": [
173,
179
]
}
],
"range": [
162,
179
]
}
],
"range": [
150,
181
]
},
{
"category": "StringLiteral",
"range": [
187,
198
]
}
],
"range": [
143,
199
]
}
],
"patch": "insert",
"range": [
143,
200
]
}
],
"hasChanges": true,
"range": [
143,
200
],
"number": 5
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
207,
220
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
224,
231
]
}
],
"range": [
224,
231
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
233,
240
]
},
{
"category": "Identifier",
"range": [
244,
250
]
}
],
"range": [
233,
250
]
}
],
"range": [
222,
252
]
},
{
"category": "StringLiteral",
"range": [
258,
268
]
}
],
"range": [
200,
269
]
}
],
"patch": "insert",
"range": [
200,
270
]
}
],
"hasChanges": true,
"range": [
200,
270
],
"number": 6
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
277,
290
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
297,
301
]
}
],
"range": [
292,
301
]
},
{
"category": "StringLiteral",
"range": [
307,
318
]
}
],
"range": [
270,
319
]
}
],
"patch": "insert",
"range": [
270,
320
]
}
],
"hasChanges": true,
"range": [
270,
320
],
"number": 7
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
327,
340
]
}
],
"range": [
320,
341
]
}
],
"patch": "insert",
"range": [
320,
342
]
}
],
"hasChanges": true,
"range": [
320,
342
],
"number": 8
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
342,
342
]
}
],
"hasChanges": true,
"range": [
342,
342
],
"number": 9
}
]
],
"paths": [
"import.js",
"import.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"491cb15d5f76cfc1be1bf5193ff0580369faaf5c"
]
},
"filePaths": [
"import.js"
],
"patch": [
"diff --git a/import.js b/import.js",
"index e69de29..491cb15 100644",
"--- a/import.js",
"+++ b/import.js",
"@@ -0,0 +1,8 @@",
"+import defaultMember from \"foo\";",
"+import * as name from \"aardvark\";",
"+import { member } from \"ant\";",
"+import { member1 , member2 } from \"antelope\";",
"+import { member1 , member2 as alias2 } from \"ant-eater\";",
"+import defaultMember, { member1, member2 as alias2 } from \"anaconda\";",
"+import defaultMember, * as name from \"alligator\";",
"+import \"arctic-tern\";"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "81a41e72cb6728374f1f2c700f5656622f0966ec..7797a9819842490dcdc548a3dae02898cd7b1939"
}
,{
"testCaseDescription": "javascript-import-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
7,
20
]
},
{
"category": "StringLiteral",
"range": [
26,
36
]
}
],
"patch": "insert",
"range": [
0,
37
]
}
],
"range": [
0,
38
]
}
],
"hasChanges": true,
"range": [
0,
38
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
50,
59
]
}
],
"range": [
45,
59
]
},
{
"category": "StringLiteral",
"range": [
65,
73
]
}
],
"patch": "insert",
"range": [
38,
74
]
}
],
"range": [
38,
75
]
}
],
"hasChanges": true,
"range": [
38,
75
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
84,
91
]
}
],
"range": [
84,
91
]
}
],
"range": [
82,
93
]
},
{
"category": "StringLiteral",
"range": [
99,
107
]
}
],
"patch": "insert",
"range": [
75,
108
]
}
],
"range": [
75,
109
]
}
],
"hasChanges": true,
"range": [
75,
109
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
118,
126
]
}
],
"range": [
118,
126
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
129,
137
]
}
],
"range": [
129,
137
]
}
],
"range": [
116,
139
]
},
{
"category": "StringLiteral",
"range": [
145,
157
]
}
],
"patch": "insert",
"range": [
109,
158
]
}
],
"range": [
109,
159
]
}
],
"hasChanges": true,
"range": [
109,
159
],
"number": 4
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
168,
176
]
}
],
"range": [
168,
176
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
179,
187
]
},
{
"category": "Identifier",
"range": [
191,
204
]
}
],
"range": [
179,
204
]
}
],
"range": [
166,
206
]
},
{
"category": "StringLiteral",
"range": [
212,
223
]
}
],
"patch": "insert",
"range": [
159,
224
]
}
],
"range": [
159,
225
]
}
],
"hasChanges": true,
"range": [
159,
225
],
"number": 5
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
232,
245
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
249,
257
]
}
],
"range": [
249,
257
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
259,
267
]
},
{
"category": "Identifier",
"range": [
271,
284
]
}
],
"range": [
259,
284
]
}
],
"range": [
247,
286
]
},
{
"category": "StringLiteral",
"range": [
292,
301
]
}
],
"patch": "insert",
"range": [
225,
302
]
}
],
"range": [
225,
303
]
}
],
"hasChanges": true,
"range": [
225,
303
],
"number": 6
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
310,
323
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
330,
337
]
}
],
"range": [
325,
337
]
},
{
"category": "StringLiteral",
"range": [
343,
351
]
}
],
"patch": "insert",
"range": [
303,
352
]
}
],
"range": [
303,
353
]
}
],
"hasChanges": true,
"range": [
303,
353
],
"number": 7
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
360,
370
]
}
],
"patch": "insert",
"range": [
353,
371
]
}
],
"range": [
353,
372
]
}
],
"hasChanges": true,
"range": [
353,
372
],
"number": 8
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
379,
392
]
},
{
"category": "StringLiteral",
"range": [
398,
403
]
}
],
"patch": "insert",
"range": [
372,
404
]
}
],
"range": [
372,
405
]
}
],
"hasChanges": true,
"range": [
372,
405
],
"number": 9
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
417,
421
]
}
],
"range": [
412,
421
]
},
{
"category": "StringLiteral",
"range": [
427,
437
]
}
],
"patch": "insert",
"range": [
405,
438
]
}
],
"range": [
405,
439
]
}
],
"hasChanges": true,
"range": [
405,
439
],
"number": 10
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
448,
454
]
}
],
"range": [
448,
454
]
}
],
"range": [
446,
456
]
},
{
"category": "StringLiteral",
"range": [
462,
467
]
}
],
"patch": "insert",
"range": [
439,
468
]
}
],
"range": [
439,
469
]
}
],
"hasChanges": true,
"range": [
439,
469
],
"number": 11
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
478,
485
]
}
],
"range": [
478,
485
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
488,
495
]
}
],
"range": [
488,
495
]
}
],
"range": [
476,
497
]
},
{
"category": "StringLiteral",
"range": [
503,
513
]
}
],
"patch": "insert",
"range": [
469,
514
]
}
],
"range": [
469,
515
]
}
],
"hasChanges": true,
"range": [
469,
515
],
"number": 12
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
524,
531
]
}
],
"range": [
524,
531
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
534,
541
]
},
{
"category": "Identifier",
"range": [
545,
551
]
}
],
"range": [
534,
551
]
}
],
"range": [
522,
553
]
},
{
"category": "StringLiteral",
"range": [
559,
570
]
}
],
"patch": "insert",
"range": [
515,
571
]
}
],
"range": [
515,
572
]
}
],
"hasChanges": true,
"range": [
515,
572
],
"number": 13
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
579,
592
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
596,
603
]
}
],
"range": [
596,
603
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
605,
612
]
},
{
"category": "Identifier",
"range": [
616,
622
]
}
],
"range": [
605,
622
]
}
],
"range": [
594,
624
]
},
{
"category": "StringLiteral",
"range": [
630,
640
]
}
],
"patch": "insert",
"range": [
572,
641
]
}
],
"range": [
572,
642
]
}
],
"hasChanges": true,
"range": [
572,
642
],
"number": 14
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
649,
662
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
669,
673
]
}
],
"range": [
664,
673
]
},
{
"category": "StringLiteral",
"range": [
679,
690
]
}
],
"patch": "insert",
"range": [
642,
691
]
}
],
"range": [
642,
692
]
}
],
"hasChanges": true,
"range": [
642,
692
],
"number": 15
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
699,
712
]
}
],
"patch": "insert",
"range": [
692,
713
]
}
],
"range": [
692,
714
]
}
],
"hasChanges": true,
"range": [
692,
714
],
"number": 16
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
7,
20
]
},
{
"category": "StringLiteral",
"range": [
26,
31
]
}
],
"range": [
0,
32
]
}
],
"range": [
0,
33
]
}
],
"hasChanges": false,
"range": [
0,
33
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
721,
734
]
},
{
"category": "StringLiteral",
"range": [
740,
745
]
}
],
"range": [
714,
746
]
}
],
"range": [
714,
747
]
}
],
"hasChanges": false,
"range": [
714,
747
],
"number": 17
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
45,
49
]
}
],
"range": [
40,
49
]
},
{
"category": "StringLiteral",
"range": [
55,
65
]
}
],
"range": [
33,
66
]
}
],
"range": [
33,
67
]
}
],
"hasChanges": false,
"range": [
33,
67
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
759,
763
]
}
],
"range": [
754,
763
]
},
{
"category": "StringLiteral",
"range": [
769,
779
]
}
],
"range": [
747,
780
]
}
],
"range": [
747,
781
]
}
],
"hasChanges": false,
"range": [
747,
781
],
"number": 18
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
76,
82
]
}
],
"range": [
76,
82
]
}
],
"range": [
74,
84
]
},
{
"category": "StringLiteral",
"range": [
90,
95
]
}
],
"range": [
67,
96
]
}
],
"range": [
67,
97
]
}
],
"hasChanges": false,
"range": [
67,
97
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
790,
796
]
}
],
"range": [
790,
796
]
}
],
"range": [
788,
798
]
},
{
"category": "StringLiteral",
"range": [
804,
809
]
}
],
"range": [
781,
810
]
}
],
"range": [
781,
811
]
}
],
"hasChanges": false,
"range": [
781,
811
],
"number": 19
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
106,
113
]
}
],
"range": [
106,
113
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
116,
123
]
}
],
"range": [
116,
123
]
}
],
"range": [
104,
125
]
},
{
"category": "StringLiteral",
"range": [
131,
141
]
}
],
"range": [
97,
142
]
}
],
"range": [
97,
143
]
}
],
"hasChanges": false,
"range": [
97,
143
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
820,
827
]
}
],
"range": [
820,
827
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
830,
837
]
}
],
"range": [
830,
837
]
}
],
"range": [
818,
839
]
},
{
"category": "StringLiteral",
"range": [
845,
855
]
}
],
"range": [
811,
856
]
}
],
"range": [
811,
857
]
}
],
"hasChanges": false,
"range": [
811,
857
],
"number": 20
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
152,
159
]
}
],
"range": [
152,
159
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
162,
169
]
},
{
"category": "Identifier",
"range": [
173,
179
]
}
],
"range": [
162,
179
]
}
],
"range": [
150,
181
]
},
{
"category": "StringLiteral",
"range": [
187,
198
]
}
],
"range": [
143,
199
]
}
],
"range": [
143,
200
]
}
],
"hasChanges": false,
"range": [
143,
200
],
"number": 5
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
866,
873
]
}
],
"range": [
866,
873
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
876,
883
]
},
{
"category": "Identifier",
"range": [
887,
893
]
}
],
"range": [
876,
893
]
}
],
"range": [
864,
895
]
},
{
"category": "StringLiteral",
"range": [
901,
912
]
}
],
"range": [
857,
913
]
}
],
"range": [
857,
914
]
}
],
"hasChanges": false,
"range": [
857,
914
],
"number": 21
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
207,
220
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
224,
231
]
}
],
"range": [
224,
231
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
233,
240
]
},
{
"category": "Identifier",
"range": [
244,
250
]
}
],
"range": [
233,
250
]
}
],
"range": [
222,
252
]
},
{
"category": "StringLiteral",
"range": [
258,
268
]
}
],
"range": [
200,
269
]
}
],
"range": [
200,
270
]
}
],
"hasChanges": false,
"range": [
200,
270
],
"number": 6
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
921,
934
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
938,
945
]
}
],
"range": [
938,
945
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
947,
954
]
},
{
"category": "Identifier",
"range": [
958,
964
]
}
],
"range": [
947,
964
]
}
],
"range": [
936,
966
]
},
{
"category": "StringLiteral",
"range": [
972,
982
]
}
],
"range": [
914,
983
]
}
],
"range": [
914,
984
]
}
],
"hasChanges": false,
"range": [
914,
984
],
"number": 22
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
277,
290
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
297,
301
]
}
],
"range": [
292,
301
]
},
{
"category": "StringLiteral",
"range": [
307,
318
]
}
],
"range": [
270,
319
]
}
],
"range": [
270,
320
]
}
],
"hasChanges": false,
"range": [
270,
320
],
"number": 7
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
991,
1004
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
1011,
1015
]
}
],
"range": [
1006,
1015
]
},
{
"category": "StringLiteral",
"range": [
1021,
1032
]
}
],
"range": [
984,
1033
]
}
],
"range": [
984,
1034
]
}
],
"hasChanges": false,
"range": [
984,
1034
],
"number": 23
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
327,
340
]
}
],
"range": [
320,
341
]
}
],
"range": [
320,
342
]
}
],
"hasChanges": false,
"range": [
320,
342
],
"number": 8
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
1041,
1054
]
}
],
"range": [
1034,
1055
]
}
],
"range": [
1034,
1056
]
}
],
"hasChanges": false,
"range": [
1034,
1056
],
"number": 24
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
342,
342
]
}
],
"hasChanges": false,
"range": [
342,
342
],
"number": 9
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
1056,
1056
]
}
],
"hasChanges": false,
"range": [
1056,
1056
],
"number": 25
}
]
],
"paths": [
"import.js",
"import.js"
],
"oids": [
"491cb15d5f76cfc1be1bf5193ff0580369faaf5c",
"045c536ef6c74be91ba31c1dd47f8cb5c92a19b2"
]
},
"filePaths": [
"import.js"
],
"patch": [
"diff --git a/import.js b/import.js",
"index 491cb15..045c536 100644",
"--- a/import.js",
"+++ b/import.js",
"@@ -1,3 +1,19 @@",
"+import defaultMember from \"babirusa\";",
"+import * as otherName from \"baboon\";",
"+import { element } from \"badger\";",
"+import { element1 , element2 } from \"bald-eagle\";",
"+import { element1 , element2 as elementAlias2 } from \"bandicoot\";",
"+import defaultMember, { element1, element2 as elementAlias2 } from \"banteng\";",
"+import defaultMember, * as element from \"barbet\";",
"+import \"basilisk\";",
"+import defaultMember from \"foo\";",
"+import * as name from \"aardvark\";",
"+import { member } from \"ant\";",
"+import { member1 , member2 } from \"antelope\";",
"+import { member1 , member2 as alias2 } from \"ant-eater\";",
"+import defaultMember, { member1, member2 as alias2 } from \"anaconda\";",
"+import defaultMember, * as name from \"alligator\";",
"+import \"arctic-tern\";",
" import defaultMember from \"foo\";",
" import * as name from \"aardvark\";",
" import { member } from \"ant\";"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "7797a9819842490dcdc548a3dae02898cd7b1939..4f93e4a12682c20523777c8ff21c23637b93b2c3"
}
,{
"testCaseDescription": "javascript-import-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
7,
20
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
26,
36
]
}
],
"range": [
0,
37
]
}
],
"range": [
0,
38
]
}
],
"hasChanges": true,
"range": [
0,
38
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
7,
20
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
26,
31
]
}
],
"range": [
0,
32
]
}
],
"range": [
0,
33
]
}
],
"hasChanges": true,
"range": [
0,
33
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
50,
59
]
}
],
"range": [
45,
59
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
65,
73
]
}
],
"range": [
38,
74
]
}
],
"range": [
38,
75
]
}
],
"hasChanges": true,
"range": [
38,
75
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
45,
49
]
}
],
"range": [
40,
49
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
55,
65
]
}
],
"range": [
33,
66
]
}
],
"range": [
33,
67
]
}
],
"hasChanges": true,
"range": [
33,
67
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
76,
82
]
}
],
"range": [
76,
82
]
}
],
"range": [
74,
84
]
},
{
"category": "StringLiteral",
"range": [
90,
95
]
}
],
"patch": "insert",
"range": [
67,
96
]
}
],
"range": [
67,
97
]
}
],
"hasChanges": true,
"range": [
67,
97
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
106,
113
]
}
],
"range": [
106,
113
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
116,
123
]
}
],
"range": [
116,
123
]
}
],
"range": [
104,
125
]
},
{
"category": "StringLiteral",
"range": [
131,
141
]
}
],
"patch": "insert",
"range": [
97,
142
]
}
],
"range": [
97,
143
]
}
],
"hasChanges": true,
"range": [
97,
143
],
"number": 4
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
152,
159
]
}
],
"range": [
152,
159
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
162,
169
]
},
{
"category": "Identifier",
"range": [
173,
179
]
}
],
"range": [
162,
179
]
}
],
"range": [
150,
181
]
},
{
"category": "StringLiteral",
"range": [
187,
198
]
}
],
"patch": "insert",
"range": [
143,
199
]
}
],
"range": [
143,
200
]
}
],
"hasChanges": true,
"range": [
143,
200
],
"number": 5
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
207,
220
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
224,
231
]
}
],
"range": [
224,
231
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
233,
240
]
},
{
"category": "Identifier",
"range": [
244,
250
]
}
],
"range": [
233,
250
]
}
],
"range": [
222,
252
]
},
{
"category": "StringLiteral",
"range": [
258,
268
]
}
],
"patch": "insert",
"range": [
200,
269
]
}
],
"range": [
200,
270
]
}
],
"hasChanges": true,
"range": [
200,
270
],
"number": 6
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
84,
91
]
}
],
"range": [
84,
91
]
}
],
"range": [
82,
93
]
},
{
"category": "StringLiteral",
"range": [
99,
107
]
}
],
"patch": "replace",
"range": [
75,
108
]
}
],
"range": [
75,
109
]
}
],
"hasChanges": true,
"range": [
75,
109
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
277,
290
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
297,
301
]
}
],
"range": [
292,
301
]
},
{
"category": "StringLiteral",
"range": [
307,
318
]
}
],
"patch": "replace",
"range": [
270,
319
]
}
],
"range": [
270,
320
]
}
],
"hasChanges": true,
"range": [
270,
320
],
"number": 7
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
118,
126
]
}
],
"range": [
118,
126
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
129,
137
]
}
],
"range": [
129,
137
]
}
],
"range": [
116,
139
]
},
{
"category": "StringLiteral",
"range": [
145,
157
]
}
],
"patch": "delete",
"range": [
109,
158
]
}
],
"range": [
109,
159
]
}
],
"hasChanges": true,
"range": [
109,
159
],
"number": 4
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
168,
176
]
}
],
"range": [
168,
176
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
179,
187
]
},
{
"category": "Identifier",
"range": [
191,
204
]
}
],
"range": [
179,
204
]
}
],
"range": [
166,
206
]
},
{
"category": "StringLiteral",
"range": [
212,
223
]
}
],
"patch": "delete",
"range": [
159,
224
]
}
],
"range": [
159,
225
]
}
],
"hasChanges": true,
"range": [
159,
225
],
"number": 5
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
232,
245
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
249,
257
]
}
],
"range": [
249,
257
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
259,
267
]
},
{
"category": "Identifier",
"range": [
271,
284
]
}
],
"range": [
259,
284
]
}
],
"range": [
247,
286
]
},
{
"category": "StringLiteral",
"range": [
292,
301
]
}
],
"patch": "delete",
"range": [
225,
302
]
}
],
"range": [
225,
303
]
}
],
"hasChanges": true,
"range": [
225,
303
],
"number": 6
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
310,
323
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
330,
337
]
}
],
"range": [
325,
337
]
},
{
"category": "StringLiteral",
"range": [
343,
351
]
}
],
"patch": "delete",
"range": [
303,
352
]
}
],
"range": [
303,
353
]
}
],
"hasChanges": true,
"range": [
303,
353
],
"number": 7
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
360,
370
]
}
],
"patch": "delete",
"range": [
353,
371
]
}
],
"range": [
353,
372
]
}
],
"hasChanges": true,
"range": [
353,
372
],
"number": 8
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
327,
340
]
}
],
"patch": "insert",
"range": [
320,
341
]
}
],
"range": [
320,
342
]
}
],
"hasChanges": true,
"range": [
320,
342
],
"number": 8
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
379,
392
]
},
{
"category": "StringLiteral",
"range": [
398,
403
]
}
],
"range": [
372,
404
]
}
],
"range": [
372,
405
]
}
],
"hasChanges": false,
"range": [
372,
405
],
"number": 9
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
349,
362
]
},
{
"category": "StringLiteral",
"range": [
368,
373
]
}
],
"range": [
342,
374
]
}
],
"range": [
342,
375
]
}
],
"hasChanges": false,
"range": [
342,
375
],
"number": 9
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
417,
421
]
}
],
"range": [
412,
421
]
},
{
"category": "StringLiteral",
"range": [
427,
437
]
}
],
"range": [
405,
438
]
}
],
"range": [
405,
439
]
}
],
"hasChanges": false,
"range": [
405,
439
],
"number": 10
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
387,
391
]
}
],
"range": [
382,
391
]
},
{
"category": "StringLiteral",
"range": [
397,
407
]
}
],
"range": [
375,
408
]
}
],
"range": [
375,
409
]
}
],
"hasChanges": false,
"range": [
375,
409
],
"number": 10
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
448,
454
]
}
],
"range": [
448,
454
]
}
],
"range": [
446,
456
]
},
{
"category": "StringLiteral",
"range": [
462,
467
]
}
],
"range": [
439,
468
]
}
],
"range": [
439,
469
]
}
],
"hasChanges": false,
"range": [
439,
469
],
"number": 11
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
418,
424
]
}
],
"range": [
418,
424
]
}
],
"range": [
416,
426
]
},
{
"category": "StringLiteral",
"range": [
432,
437
]
}
],
"range": [
409,
438
]
}
],
"range": [
409,
439
]
}
],
"hasChanges": false,
"range": [
409,
439
],
"number": 11
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
478,
485
]
}
],
"range": [
478,
485
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
488,
495
]
}
],
"range": [
488,
495
]
}
],
"range": [
476,
497
]
},
{
"category": "StringLiteral",
"range": [
503,
513
]
}
],
"range": [
469,
514
]
}
],
"range": [
469,
515
]
}
],
"hasChanges": false,
"range": [
469,
515
],
"number": 12
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
448,
455
]
}
],
"range": [
448,
455
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
458,
465
]
}
],
"range": [
458,
465
]
}
],
"range": [
446,
467
]
},
{
"category": "StringLiteral",
"range": [
473,
483
]
}
],
"range": [
439,
484
]
}
],
"range": [
439,
485
]
}
],
"hasChanges": false,
"range": [
439,
485
],
"number": 12
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
524,
531
]
}
],
"range": [
524,
531
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
534,
541
]
},
{
"category": "Identifier",
"range": [
545,
551
]
}
],
"range": [
534,
551
]
}
],
"range": [
522,
553
]
},
{
"category": "StringLiteral",
"range": [
559,
570
]
}
],
"range": [
515,
571
]
}
],
"range": [
515,
572
]
}
],
"hasChanges": false,
"range": [
515,
572
],
"number": 13
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
494,
501
]
}
],
"range": [
494,
501
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
504,
511
]
},
{
"category": "Identifier",
"range": [
515,
521
]
}
],
"range": [
504,
521
]
}
],
"range": [
492,
523
]
},
{
"category": "StringLiteral",
"range": [
529,
540
]
}
],
"range": [
485,
541
]
}
],
"range": [
485,
542
]
}
],
"hasChanges": false,
"range": [
485,
542
],
"number": 13
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
579,
592
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
596,
603
]
}
],
"range": [
596,
603
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
605,
612
]
},
{
"category": "Identifier",
"range": [
616,
622
]
}
],
"range": [
605,
622
]
}
],
"range": [
594,
624
]
},
{
"category": "StringLiteral",
"range": [
630,
640
]
}
],
"range": [
572,
641
]
}
],
"range": [
572,
642
]
}
],
"hasChanges": false,
"range": [
572,
642
],
"number": 14
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
549,
562
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
566,
573
]
}
],
"range": [
566,
573
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
575,
582
]
},
{
"category": "Identifier",
"range": [
586,
592
]
}
],
"range": [
575,
592
]
}
],
"range": [
564,
594
]
},
{
"category": "StringLiteral",
"range": [
600,
610
]
}
],
"range": [
542,
611
]
}
],
"range": [
542,
612
]
}
],
"hasChanges": false,
"range": [
542,
612
],
"number": 14
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
649,
662
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
669,
673
]
}
],
"range": [
664,
673
]
},
{
"category": "StringLiteral",
"range": [
679,
690
]
}
],
"range": [
642,
691
]
}
],
"range": [
642,
692
]
}
],
"hasChanges": false,
"range": [
642,
692
],
"number": 15
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
619,
632
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
639,
643
]
}
],
"range": [
634,
643
]
},
{
"category": "StringLiteral",
"range": [
649,
660
]
}
],
"range": [
612,
661
]
}
],
"range": [
612,
662
]
}
],
"hasChanges": false,
"range": [
612,
662
],
"number": 15
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
699,
712
]
}
],
"range": [
692,
713
]
}
],
"range": [
692,
714
]
}
],
"hasChanges": false,
"range": [
692,
714
],
"number": 16
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
669,
682
]
}
],
"range": [
662,
683
]
}
],
"range": [
662,
684
]
}
],
"hasChanges": false,
"range": [
662,
684
],
"number": 16
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
721,
734
]
},
{
"category": "StringLiteral",
"range": [
740,
745
]
}
],
"range": [
714,
746
]
}
],
"range": [
714,
747
]
}
],
"hasChanges": false,
"range": [
714,
747
],
"number": 17
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
691,
704
]
},
{
"category": "StringLiteral",
"range": [
710,
715
]
}
],
"range": [
684,
716
]
}
],
"range": [
684,
717
]
}
],
"hasChanges": false,
"range": [
684,
717
],
"number": 17
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
759,
763
]
}
],
"range": [
754,
763
]
},
{
"category": "StringLiteral",
"range": [
769,
779
]
}
],
"range": [
747,
780
]
}
],
"range": [
747,
781
]
}
],
"hasChanges": false,
"range": [
747,
781
],
"number": 18
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
729,
733
]
}
],
"range": [
724,
733
]
},
{
"category": "StringLiteral",
"range": [
739,
749
]
}
],
"range": [
717,
750
]
}
],
"range": [
717,
751
]
}
],
"hasChanges": false,
"range": [
717,
751
],
"number": 18
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
790,
796
]
}
],
"range": [
790,
796
]
}
],
"range": [
788,
798
]
},
{
"category": "StringLiteral",
"range": [
804,
809
]
}
],
"range": [
781,
810
]
}
],
"range": [
781,
811
]
}
],
"hasChanges": false,
"range": [
781,
811
],
"number": 19
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
760,
766
]
}
],
"range": [
760,
766
]
}
],
"range": [
758,
768
]
},
{
"category": "StringLiteral",
"range": [
774,
779
]
}
],
"range": [
751,
780
]
}
],
"range": [
751,
781
]
}
],
"hasChanges": false,
"range": [
751,
781
],
"number": 19
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
820,
827
]
}
],
"range": [
820,
827
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
830,
837
]
}
],
"range": [
830,
837
]
}
],
"range": [
818,
839
]
},
{
"category": "StringLiteral",
"range": [
845,
855
]
}
],
"range": [
811,
856
]
}
],
"range": [
811,
857
]
}
],
"hasChanges": false,
"range": [
811,
857
],
"number": 20
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
790,
797
]
}
],
"range": [
790,
797
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
800,
807
]
}
],
"range": [
800,
807
]
}
],
"range": [
788,
809
]
},
{
"category": "StringLiteral",
"range": [
815,
825
]
}
],
"range": [
781,
826
]
}
],
"range": [
781,
827
]
}
],
"hasChanges": false,
"range": [
781,
827
],
"number": 20
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
866,
873
]
}
],
"range": [
866,
873
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
876,
883
]
},
{
"category": "Identifier",
"range": [
887,
893
]
}
],
"range": [
876,
893
]
}
],
"range": [
864,
895
]
},
{
"category": "StringLiteral",
"range": [
901,
912
]
}
],
"range": [
857,
913
]
}
],
"range": [
857,
914
]
}
],
"hasChanges": false,
"range": [
857,
914
],
"number": 21
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
836,
843
]
}
],
"range": [
836,
843
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
846,
853
]
},
{
"category": "Identifier",
"range": [
857,
863
]
}
],
"range": [
846,
863
]
}
],
"range": [
834,
865
]
},
{
"category": "StringLiteral",
"range": [
871,
882
]
}
],
"range": [
827,
883
]
}
],
"range": [
827,
884
]
}
],
"hasChanges": false,
"range": [
827,
884
],
"number": 21
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
921,
934
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
938,
945
]
}
],
"range": [
938,
945
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
947,
954
]
},
{
"category": "Identifier",
"range": [
958,
964
]
}
],
"range": [
947,
964
]
}
],
"range": [
936,
966
]
},
{
"category": "StringLiteral",
"range": [
972,
982
]
}
],
"range": [
914,
983
]
}
],
"range": [
914,
984
]
}
],
"hasChanges": false,
"range": [
914,
984
],
"number": 22
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
891,
904
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
908,
915
]
}
],
"range": [
908,
915
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
917,
924
]
},
{
"category": "Identifier",
"range": [
928,
934
]
}
],
"range": [
917,
934
]
}
],
"range": [
906,
936
]
},
{
"category": "StringLiteral",
"range": [
942,
952
]
}
],
"range": [
884,
953
]
}
],
"range": [
884,
954
]
}
],
"hasChanges": false,
"range": [
884,
954
],
"number": 22
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
991,
1004
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
1011,
1015
]
}
],
"range": [
1006,
1015
]
},
{
"category": "StringLiteral",
"range": [
1021,
1032
]
}
],
"range": [
984,
1033
]
}
],
"range": [
984,
1034
]
}
],
"hasChanges": false,
"range": [
984,
1034
],
"number": 23
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
961,
974
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
981,
985
]
}
],
"range": [
976,
985
]
},
{
"category": "StringLiteral",
"range": [
991,
1002
]
}
],
"range": [
954,
1003
]
}
],
"range": [
954,
1004
]
}
],
"hasChanges": false,
"range": [
954,
1004
],
"number": 23
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
1041,
1054
]
}
],
"range": [
1034,
1055
]
}
],
"range": [
1034,
1056
]
}
],
"hasChanges": false,
"range": [
1034,
1056
],
"number": 24
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
1011,
1024
]
}
],
"range": [
1004,
1025
]
}
],
"range": [
1004,
1026
]
}
],
"hasChanges": false,
"range": [
1004,
1026
],
"number": 24
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
1056,
1056
]
}
],
"hasChanges": false,
"range": [
1056,
1056
],
"number": 25
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
1026,
1026
]
}
],
"hasChanges": false,
"range": [
1026,
1026
],
"number": 25
}
]
],
"paths": [
"import.js",
"import.js"
],
"oids": [
"045c536ef6c74be91ba31c1dd47f8cb5c92a19b2",
"cbad5a426013717f643717445d38e31452842a65"
]
},
"filePaths": [
"import.js"
],
"patch": [
"diff --git a/import.js b/import.js",
"index 045c536..cbad5a4 100644",
"--- a/import.js",
"+++ b/import.js",
"@@ -1,11 +1,11 @@",
"-import defaultMember from \"babirusa\";",
"-import * as otherName from \"baboon\";",
"-import { element } from \"badger\";",
"-import { element1 , element2 } from \"bald-eagle\";",
"-import { element1 , element2 as elementAlias2 } from \"bandicoot\";",
"-import defaultMember, { element1, element2 as elementAlias2 } from \"banteng\";",
"-import defaultMember, * as element from \"barbet\";",
"-import \"basilisk\";",
"+import defaultMember from \"foo\";",
"+import * as name from \"aardvark\";",
"+import { member } from \"ant\";",
"+import { member1 , member2 } from \"antelope\";",
"+import { member1 , member2 as alias2 } from \"ant-eater\";",
"+import defaultMember, { member1, member2 as alias2 } from \"anaconda\";",
"+import defaultMember, * as name from \"alligator\";",
"+import \"arctic-tern\";",
" import defaultMember from \"foo\";",
" import * as name from \"aardvark\";",
" import { member } from \"ant\";"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "4f93e4a12682c20523777c8ff21c23637b93b2c3..1a2c0ee4f2d6d47acc0e0b75adfd77412cdb5208"
}
,{
"testCaseDescription": "javascript-import-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
7,
20
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
26,
31
]
}
],
"range": [
0,
32
]
}
],
"range": [
0,
33
]
}
],
"hasChanges": true,
"range": [
0,
33
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
7,
20
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
26,
36
]
}
],
"range": [
0,
37
]
}
],
"range": [
0,
38
]
}
],
"hasChanges": true,
"range": [
0,
38
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
45,
49
]
}
],
"range": [
40,
49
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
55,
65
]
}
],
"range": [
33,
66
]
}
],
"range": [
33,
67
]
}
],
"hasChanges": true,
"range": [
33,
67
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
50,
59
]
}
],
"range": [
45,
59
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
65,
73
]
}
],
"range": [
38,
74
]
}
],
"range": [
38,
75
]
}
],
"hasChanges": true,
"range": [
38,
75
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
84,
91
]
}
],
"range": [
84,
91
]
}
],
"range": [
82,
93
]
},
{
"category": "StringLiteral",
"range": [
99,
107
]
}
],
"patch": "insert",
"range": [
75,
108
]
}
],
"range": [
75,
109
]
}
],
"hasChanges": true,
"range": [
75,
109
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
118,
126
]
}
],
"range": [
118,
126
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
129,
137
]
}
],
"range": [
129,
137
]
}
],
"range": [
116,
139
]
},
{
"category": "StringLiteral",
"range": [
145,
157
]
}
],
"patch": "insert",
"range": [
109,
158
]
}
],
"range": [
109,
159
]
}
],
"hasChanges": true,
"range": [
109,
159
],
"number": 4
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
168,
176
]
}
],
"range": [
168,
176
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
179,
187
]
},
{
"category": "Identifier",
"range": [
191,
204
]
}
],
"range": [
179,
204
]
}
],
"range": [
166,
206
]
},
{
"category": "StringLiteral",
"range": [
212,
223
]
}
],
"patch": "insert",
"range": [
159,
224
]
}
],
"range": [
159,
225
]
}
],
"hasChanges": true,
"range": [
159,
225
],
"number": 5
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
232,
245
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
249,
257
]
}
],
"range": [
249,
257
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
259,
267
]
},
{
"category": "Identifier",
"range": [
271,
284
]
}
],
"range": [
259,
284
]
}
],
"range": [
247,
286
]
},
{
"category": "StringLiteral",
"range": [
292,
301
]
}
],
"patch": "insert",
"range": [
225,
302
]
}
],
"range": [
225,
303
]
}
],
"hasChanges": true,
"range": [
225,
303
],
"number": 6
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
76,
82
]
}
],
"range": [
76,
82
]
}
],
"range": [
74,
84
]
},
{
"category": "StringLiteral",
"range": [
90,
95
]
}
],
"patch": "replace",
"range": [
67,
96
]
}
],
"range": [
67,
97
]
}
],
"hasChanges": true,
"range": [
67,
97
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
310,
323
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
330,
337
]
}
],
"range": [
325,
337
]
},
{
"category": "StringLiteral",
"range": [
343,
351
]
}
],
"patch": "replace",
"range": [
303,
352
]
}
],
"range": [
303,
353
]
}
],
"hasChanges": true,
"range": [
303,
353
],
"number": 7
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
106,
113
]
}
],
"range": [
106,
113
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
116,
123
]
}
],
"range": [
116,
123
]
}
],
"range": [
104,
125
]
},
{
"category": "StringLiteral",
"range": [
131,
141
]
}
],
"patch": "delete",
"range": [
97,
142
]
}
],
"range": [
97,
143
]
}
],
"hasChanges": true,
"range": [
97,
143
],
"number": 4
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
152,
159
]
}
],
"range": [
152,
159
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
162,
169
]
},
{
"category": "Identifier",
"range": [
173,
179
]
}
],
"range": [
162,
179
]
}
],
"range": [
150,
181
]
},
{
"category": "StringLiteral",
"range": [
187,
198
]
}
],
"patch": "delete",
"range": [
143,
199
]
}
],
"range": [
143,
200
]
}
],
"hasChanges": true,
"range": [
143,
200
],
"number": 5
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
207,
220
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
224,
231
]
}
],
"range": [
224,
231
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
233,
240
]
},
{
"category": "Identifier",
"range": [
244,
250
]
}
],
"range": [
233,
250
]
}
],
"range": [
222,
252
]
},
{
"category": "StringLiteral",
"range": [
258,
268
]
}
],
"patch": "delete",
"range": [
200,
269
]
}
],
"range": [
200,
270
]
}
],
"hasChanges": true,
"range": [
200,
270
],
"number": 6
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
277,
290
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
297,
301
]
}
],
"range": [
292,
301
]
},
{
"category": "StringLiteral",
"range": [
307,
318
]
}
],
"patch": "delete",
"range": [
270,
319
]
}
],
"range": [
270,
320
]
}
],
"hasChanges": true,
"range": [
270,
320
],
"number": 7
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
327,
340
]
}
],
"patch": "delete",
"range": [
320,
341
]
}
],
"range": [
320,
342
]
}
],
"hasChanges": true,
"range": [
320,
342
],
"number": 8
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
360,
370
]
}
],
"patch": "insert",
"range": [
353,
371
]
}
],
"range": [
353,
372
]
}
],
"hasChanges": true,
"range": [
353,
372
],
"number": 8
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
349,
362
]
},
{
"category": "StringLiteral",
"range": [
368,
373
]
}
],
"range": [
342,
374
]
}
],
"range": [
342,
375
]
}
],
"hasChanges": false,
"range": [
342,
375
],
"number": 9
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
379,
392
]
},
{
"category": "StringLiteral",
"range": [
398,
403
]
}
],
"range": [
372,
404
]
}
],
"range": [
372,
405
]
}
],
"hasChanges": false,
"range": [
372,
405
],
"number": 9
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
387,
391
]
}
],
"range": [
382,
391
]
},
{
"category": "StringLiteral",
"range": [
397,
407
]
}
],
"range": [
375,
408
]
}
],
"range": [
375,
409
]
}
],
"hasChanges": false,
"range": [
375,
409
],
"number": 10
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
417,
421
]
}
],
"range": [
412,
421
]
},
{
"category": "StringLiteral",
"range": [
427,
437
]
}
],
"range": [
405,
438
]
}
],
"range": [
405,
439
]
}
],
"hasChanges": false,
"range": [
405,
439
],
"number": 10
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
418,
424
]
}
],
"range": [
418,
424
]
}
],
"range": [
416,
426
]
},
{
"category": "StringLiteral",
"range": [
432,
437
]
}
],
"range": [
409,
438
]
}
],
"range": [
409,
439
]
}
],
"hasChanges": false,
"range": [
409,
439
],
"number": 11
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
448,
454
]
}
],
"range": [
448,
454
]
}
],
"range": [
446,
456
]
},
{
"category": "StringLiteral",
"range": [
462,
467
]
}
],
"range": [
439,
468
]
}
],
"range": [
439,
469
]
}
],
"hasChanges": false,
"range": [
439,
469
],
"number": 11
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
448,
455
]
}
],
"range": [
448,
455
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
458,
465
]
}
],
"range": [
458,
465
]
}
],
"range": [
446,
467
]
},
{
"category": "StringLiteral",
"range": [
473,
483
]
}
],
"range": [
439,
484
]
}
],
"range": [
439,
485
]
}
],
"hasChanges": false,
"range": [
439,
485
],
"number": 12
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
478,
485
]
}
],
"range": [
478,
485
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
488,
495
]
}
],
"range": [
488,
495
]
}
],
"range": [
476,
497
]
},
{
"category": "StringLiteral",
"range": [
503,
513
]
}
],
"range": [
469,
514
]
}
],
"range": [
469,
515
]
}
],
"hasChanges": false,
"range": [
469,
515
],
"number": 12
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
494,
501
]
}
],
"range": [
494,
501
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
504,
511
]
},
{
"category": "Identifier",
"range": [
515,
521
]
}
],
"range": [
504,
521
]
}
],
"range": [
492,
523
]
},
{
"category": "StringLiteral",
"range": [
529,
540
]
}
],
"range": [
485,
541
]
}
],
"range": [
485,
542
]
}
],
"hasChanges": false,
"range": [
485,
542
],
"number": 13
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
524,
531
]
}
],
"range": [
524,
531
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
534,
541
]
},
{
"category": "Identifier",
"range": [
545,
551
]
}
],
"range": [
534,
551
]
}
],
"range": [
522,
553
]
},
{
"category": "StringLiteral",
"range": [
559,
570
]
}
],
"range": [
515,
571
]
}
],
"range": [
515,
572
]
}
],
"hasChanges": false,
"range": [
515,
572
],
"number": 13
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
549,
562
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
566,
573
]
}
],
"range": [
566,
573
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
575,
582
]
},
{
"category": "Identifier",
"range": [
586,
592
]
}
],
"range": [
575,
592
]
}
],
"range": [
564,
594
]
},
{
"category": "StringLiteral",
"range": [
600,
610
]
}
],
"range": [
542,
611
]
}
],
"range": [
542,
612
]
}
],
"hasChanges": false,
"range": [
542,
612
],
"number": 14
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
579,
592
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
596,
603
]
}
],
"range": [
596,
603
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
605,
612
]
},
{
"category": "Identifier",
"range": [
616,
622
]
}
],
"range": [
605,
622
]
}
],
"range": [
594,
624
]
},
{
"category": "StringLiteral",
"range": [
630,
640
]
}
],
"range": [
572,
641
]
}
],
"range": [
572,
642
]
}
],
"hasChanges": false,
"range": [
572,
642
],
"number": 14
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
619,
632
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
639,
643
]
}
],
"range": [
634,
643
]
},
{
"category": "StringLiteral",
"range": [
649,
660
]
}
],
"range": [
612,
661
]
}
],
"range": [
612,
662
]
}
],
"hasChanges": false,
"range": [
612,
662
],
"number": 15
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
649,
662
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
669,
673
]
}
],
"range": [
664,
673
]
},
{
"category": "StringLiteral",
"range": [
679,
690
]
}
],
"range": [
642,
691
]
}
],
"range": [
642,
692
]
}
],
"hasChanges": false,
"range": [
642,
692
],
"number": 15
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
669,
682
]
}
],
"range": [
662,
683
]
}
],
"range": [
662,
684
]
}
],
"hasChanges": false,
"range": [
662,
684
],
"number": 16
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
699,
712
]
}
],
"range": [
692,
713
]
}
],
"range": [
692,
714
]
}
],
"hasChanges": false,
"range": [
692,
714
],
"number": 16
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
691,
704
]
},
{
"category": "StringLiteral",
"range": [
710,
715
]
}
],
"range": [
684,
716
]
}
],
"range": [
684,
717
]
}
],
"hasChanges": false,
"range": [
684,
717
],
"number": 17
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
721,
734
]
},
{
"category": "StringLiteral",
"range": [
740,
745
]
}
],
"range": [
714,
746
]
}
],
"range": [
714,
747
]
}
],
"hasChanges": false,
"range": [
714,
747
],
"number": 17
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
729,
733
]
}
],
"range": [
724,
733
]
},
{
"category": "StringLiteral",
"range": [
739,
749
]
}
],
"range": [
717,
750
]
}
],
"range": [
717,
751
]
}
],
"hasChanges": false,
"range": [
717,
751
],
"number": 18
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
759,
763
]
}
],
"range": [
754,
763
]
},
{
"category": "StringLiteral",
"range": [
769,
779
]
}
],
"range": [
747,
780
]
}
],
"range": [
747,
781
]
}
],
"hasChanges": false,
"range": [
747,
781
],
"number": 18
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
760,
766
]
}
],
"range": [
760,
766
]
}
],
"range": [
758,
768
]
},
{
"category": "StringLiteral",
"range": [
774,
779
]
}
],
"range": [
751,
780
]
}
],
"range": [
751,
781
]
}
],
"hasChanges": false,
"range": [
751,
781
],
"number": 19
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
790,
796
]
}
],
"range": [
790,
796
]
}
],
"range": [
788,
798
]
},
{
"category": "StringLiteral",
"range": [
804,
809
]
}
],
"range": [
781,
810
]
}
],
"range": [
781,
811
]
}
],
"hasChanges": false,
"range": [
781,
811
],
"number": 19
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
790,
797
]
}
],
"range": [
790,
797
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
800,
807
]
}
],
"range": [
800,
807
]
}
],
"range": [
788,
809
]
},
{
"category": "StringLiteral",
"range": [
815,
825
]
}
],
"range": [
781,
826
]
}
],
"range": [
781,
827
]
}
],
"hasChanges": false,
"range": [
781,
827
],
"number": 20
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
820,
827
]
}
],
"range": [
820,
827
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
830,
837
]
}
],
"range": [
830,
837
]
}
],
"range": [
818,
839
]
},
{
"category": "StringLiteral",
"range": [
845,
855
]
}
],
"range": [
811,
856
]
}
],
"range": [
811,
857
]
}
],
"hasChanges": false,
"range": [
811,
857
],
"number": 20
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
836,
843
]
}
],
"range": [
836,
843
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
846,
853
]
},
{
"category": "Identifier",
"range": [
857,
863
]
}
],
"range": [
846,
863
]
}
],
"range": [
834,
865
]
},
{
"category": "StringLiteral",
"range": [
871,
882
]
}
],
"range": [
827,
883
]
}
],
"range": [
827,
884
]
}
],
"hasChanges": false,
"range": [
827,
884
],
"number": 21
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
866,
873
]
}
],
"range": [
866,
873
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
876,
883
]
},
{
"category": "Identifier",
"range": [
887,
893
]
}
],
"range": [
876,
893
]
}
],
"range": [
864,
895
]
},
{
"category": "StringLiteral",
"range": [
901,
912
]
}
],
"range": [
857,
913
]
}
],
"range": [
857,
914
]
}
],
"hasChanges": false,
"range": [
857,
914
],
"number": 21
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
891,
904
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
908,
915
]
}
],
"range": [
908,
915
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
917,
924
]
},
{
"category": "Identifier",
"range": [
928,
934
]
}
],
"range": [
917,
934
]
}
],
"range": [
906,
936
]
},
{
"category": "StringLiteral",
"range": [
942,
952
]
}
],
"range": [
884,
953
]
}
],
"range": [
884,
954
]
}
],
"hasChanges": false,
"range": [
884,
954
],
"number": 22
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
921,
934
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
938,
945
]
}
],
"range": [
938,
945
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
947,
954
]
},
{
"category": "Identifier",
"range": [
958,
964
]
}
],
"range": [
947,
964
]
}
],
"range": [
936,
966
]
},
{
"category": "StringLiteral",
"range": [
972,
982
]
}
],
"range": [
914,
983
]
}
],
"range": [
914,
984
]
}
],
"hasChanges": false,
"range": [
914,
984
],
"number": 22
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
961,
974
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
981,
985
]
}
],
"range": [
976,
985
]
},
{
"category": "StringLiteral",
"range": [
991,
1002
]
}
],
"range": [
954,
1003
]
}
],
"range": [
954,
1004
]
}
],
"hasChanges": false,
"range": [
954,
1004
],
"number": 23
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
991,
1004
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
1011,
1015
]
}
],
"range": [
1006,
1015
]
},
{
"category": "StringLiteral",
"range": [
1021,
1032
]
}
],
"range": [
984,
1033
]
}
],
"range": [
984,
1034
]
}
],
"hasChanges": false,
"range": [
984,
1034
],
"number": 23
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
1011,
1024
]
}
],
"range": [
1004,
1025
]
}
],
"range": [
1004,
1026
]
}
],
"hasChanges": false,
"range": [
1004,
1026
],
"number": 24
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
1041,
1054
]
}
],
"range": [
1034,
1055
]
}
],
"range": [
1034,
1056
]
}
],
"hasChanges": false,
"range": [
1034,
1056
],
"number": 24
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
1026,
1026
]
}
],
"hasChanges": false,
"range": [
1026,
1026
],
"number": 25
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
1056,
1056
]
}
],
"hasChanges": false,
"range": [
1056,
1056
],
"number": 25
}
]
],
"paths": [
"import.js",
"import.js"
],
"oids": [
"cbad5a426013717f643717445d38e31452842a65",
"045c536ef6c74be91ba31c1dd47f8cb5c92a19b2"
]
},
"filePaths": [
"import.js"
],
"patch": [
"diff --git a/import.js b/import.js",
"index cbad5a4..045c536 100644",
"--- a/import.js",
"+++ b/import.js",
"@@ -1,11 +1,11 @@",
"-import defaultMember from \"foo\";",
"-import * as name from \"aardvark\";",
"-import { member } from \"ant\";",
"-import { member1 , member2 } from \"antelope\";",
"-import { member1 , member2 as alias2 } from \"ant-eater\";",
"-import defaultMember, { member1, member2 as alias2 } from \"anaconda\";",
"-import defaultMember, * as name from \"alligator\";",
"-import \"arctic-tern\";",
"+import defaultMember from \"babirusa\";",
"+import * as otherName from \"baboon\";",
"+import { element } from \"badger\";",
"+import { element1 , element2 } from \"bald-eagle\";",
"+import { element1 , element2 as elementAlias2 } from \"bandicoot\";",
"+import defaultMember, { element1, element2 as elementAlias2 } from \"banteng\";",
"+import defaultMember, * as element from \"barbet\";",
"+import \"basilisk\";",
" import defaultMember from \"foo\";",
" import * as name from \"aardvark\";",
" import { member } from \"ant\";"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "1a2c0ee4f2d6d47acc0e0b75adfd77412cdb5208..9cee417f36dc72559f8005d43c1c64e38d14b260"
}
,{
"testCaseDescription": "javascript-import-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
7,
20
]
},
{
"category": "StringLiteral",
"range": [
26,
36
]
}
],
"patch": "delete",
"range": [
0,
37
]
}
],
"range": [
0,
38
]
}
],
"hasChanges": true,
"range": [
0,
38
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
50,
59
]
}
],
"range": [
45,
59
]
},
{
"category": "StringLiteral",
"range": [
65,
73
]
}
],
"patch": "delete",
"range": [
38,
74
]
}
],
"range": [
38,
75
]
}
],
"hasChanges": true,
"range": [
38,
75
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
84,
91
]
}
],
"range": [
84,
91
]
}
],
"range": [
82,
93
]
},
{
"category": "StringLiteral",
"range": [
99,
107
]
}
],
"patch": "delete",
"range": [
75,
108
]
}
],
"range": [
75,
109
]
}
],
"hasChanges": true,
"range": [
75,
109
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
118,
126
]
}
],
"range": [
118,
126
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
129,
137
]
}
],
"range": [
129,
137
]
}
],
"range": [
116,
139
]
},
{
"category": "StringLiteral",
"range": [
145,
157
]
}
],
"patch": "delete",
"range": [
109,
158
]
}
],
"range": [
109,
159
]
}
],
"hasChanges": true,
"range": [
109,
159
],
"number": 4
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
168,
176
]
}
],
"range": [
168,
176
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
179,
187
]
},
{
"category": "Identifier",
"range": [
191,
204
]
}
],
"range": [
179,
204
]
}
],
"range": [
166,
206
]
},
{
"category": "StringLiteral",
"range": [
212,
223
]
}
],
"patch": "delete",
"range": [
159,
224
]
}
],
"range": [
159,
225
]
}
],
"hasChanges": true,
"range": [
159,
225
],
"number": 5
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
232,
245
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
249,
257
]
}
],
"range": [
249,
257
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
259,
267
]
},
{
"category": "Identifier",
"range": [
271,
284
]
}
],
"range": [
259,
284
]
}
],
"range": [
247,
286
]
},
{
"category": "StringLiteral",
"range": [
292,
301
]
}
],
"patch": "delete",
"range": [
225,
302
]
}
],
"range": [
225,
303
]
}
],
"hasChanges": true,
"range": [
225,
303
],
"number": 6
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
310,
323
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
330,
337
]
}
],
"range": [
325,
337
]
},
{
"category": "StringLiteral",
"range": [
343,
351
]
}
],
"patch": "delete",
"range": [
303,
352
]
}
],
"range": [
303,
353
]
}
],
"hasChanges": true,
"range": [
303,
353
],
"number": 7
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
360,
370
]
}
],
"patch": "delete",
"range": [
353,
371
]
}
],
"range": [
353,
372
]
}
],
"hasChanges": true,
"range": [
353,
372
],
"number": 8
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
379,
392
]
},
{
"category": "StringLiteral",
"range": [
398,
403
]
}
],
"patch": "delete",
"range": [
372,
404
]
}
],
"range": [
372,
405
]
}
],
"hasChanges": true,
"range": [
372,
405
],
"number": 9
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
417,
421
]
}
],
"range": [
412,
421
]
},
{
"category": "StringLiteral",
"range": [
427,
437
]
}
],
"patch": "delete",
"range": [
405,
438
]
}
],
"range": [
405,
439
]
}
],
"hasChanges": true,
"range": [
405,
439
],
"number": 10
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
448,
454
]
}
],
"range": [
448,
454
]
}
],
"range": [
446,
456
]
},
{
"category": "StringLiteral",
"range": [
462,
467
]
}
],
"patch": "delete",
"range": [
439,
468
]
}
],
"range": [
439,
469
]
}
],
"hasChanges": true,
"range": [
439,
469
],
"number": 11
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
478,
485
]
}
],
"range": [
478,
485
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
488,
495
]
}
],
"range": [
488,
495
]
}
],
"range": [
476,
497
]
},
{
"category": "StringLiteral",
"range": [
503,
513
]
}
],
"patch": "delete",
"range": [
469,
514
]
}
],
"range": [
469,
515
]
}
],
"hasChanges": true,
"range": [
469,
515
],
"number": 12
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
524,
531
]
}
],
"range": [
524,
531
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
534,
541
]
},
{
"category": "Identifier",
"range": [
545,
551
]
}
],
"range": [
534,
551
]
}
],
"range": [
522,
553
]
},
{
"category": "StringLiteral",
"range": [
559,
570
]
}
],
"patch": "delete",
"range": [
515,
571
]
}
],
"range": [
515,
572
]
}
],
"hasChanges": true,
"range": [
515,
572
],
"number": 13
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
579,
592
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
596,
603
]
}
],
"range": [
596,
603
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
605,
612
]
},
{
"category": "Identifier",
"range": [
616,
622
]
}
],
"range": [
605,
622
]
}
],
"range": [
594,
624
]
},
{
"category": "StringLiteral",
"range": [
630,
640
]
}
],
"patch": "delete",
"range": [
572,
641
]
}
],
"range": [
572,
642
]
}
],
"hasChanges": true,
"range": [
572,
642
],
"number": 14
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
649,
662
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
669,
673
]
}
],
"range": [
664,
673
]
},
{
"category": "StringLiteral",
"range": [
679,
690
]
}
],
"patch": "delete",
"range": [
642,
691
]
}
],
"range": [
642,
692
]
}
],
"hasChanges": true,
"range": [
642,
692
],
"number": 15
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
699,
712
]
}
],
"patch": "delete",
"range": [
692,
713
]
}
],
"range": [
692,
714
]
}
],
"hasChanges": true,
"range": [
692,
714
],
"number": 16
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
721,
734
]
},
{
"category": "StringLiteral",
"range": [
740,
745
]
}
],
"range": [
714,
746
]
}
],
"range": [
714,
747
]
}
],
"hasChanges": false,
"range": [
714,
747
],
"number": 17
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
7,
20
]
},
{
"category": "StringLiteral",
"range": [
26,
31
]
}
],
"range": [
0,
32
]
}
],
"range": [
0,
33
]
}
],
"hasChanges": false,
"range": [
0,
33
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
759,
763
]
}
],
"range": [
754,
763
]
},
{
"category": "StringLiteral",
"range": [
769,
779
]
}
],
"range": [
747,
780
]
}
],
"range": [
747,
781
]
}
],
"hasChanges": false,
"range": [
747,
781
],
"number": 18
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
45,
49
]
}
],
"range": [
40,
49
]
},
{
"category": "StringLiteral",
"range": [
55,
65
]
}
],
"range": [
33,
66
]
}
],
"range": [
33,
67
]
}
],
"hasChanges": false,
"range": [
33,
67
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
790,
796
]
}
],
"range": [
790,
796
]
}
],
"range": [
788,
798
]
},
{
"category": "StringLiteral",
"range": [
804,
809
]
}
],
"range": [
781,
810
]
}
],
"range": [
781,
811
]
}
],
"hasChanges": false,
"range": [
781,
811
],
"number": 19
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
76,
82
]
}
],
"range": [
76,
82
]
}
],
"range": [
74,
84
]
},
{
"category": "StringLiteral",
"range": [
90,
95
]
}
],
"range": [
67,
96
]
}
],
"range": [
67,
97
]
}
],
"hasChanges": false,
"range": [
67,
97
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
820,
827
]
}
],
"range": [
820,
827
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
830,
837
]
}
],
"range": [
830,
837
]
}
],
"range": [
818,
839
]
},
{
"category": "StringLiteral",
"range": [
845,
855
]
}
],
"range": [
811,
856
]
}
],
"range": [
811,
857
]
}
],
"hasChanges": false,
"range": [
811,
857
],
"number": 20
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
106,
113
]
}
],
"range": [
106,
113
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
116,
123
]
}
],
"range": [
116,
123
]
}
],
"range": [
104,
125
]
},
{
"category": "StringLiteral",
"range": [
131,
141
]
}
],
"range": [
97,
142
]
}
],
"range": [
97,
143
]
}
],
"hasChanges": false,
"range": [
97,
143
],
"number": 4
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
866,
873
]
}
],
"range": [
866,
873
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
876,
883
]
},
{
"category": "Identifier",
"range": [
887,
893
]
}
],
"range": [
876,
893
]
}
],
"range": [
864,
895
]
},
{
"category": "StringLiteral",
"range": [
901,
912
]
}
],
"range": [
857,
913
]
}
],
"range": [
857,
914
]
}
],
"hasChanges": false,
"range": [
857,
914
],
"number": 21
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
152,
159
]
}
],
"range": [
152,
159
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
162,
169
]
},
{
"category": "Identifier",
"range": [
173,
179
]
}
],
"range": [
162,
179
]
}
],
"range": [
150,
181
]
},
{
"category": "StringLiteral",
"range": [
187,
198
]
}
],
"range": [
143,
199
]
}
],
"range": [
143,
200
]
}
],
"hasChanges": false,
"range": [
143,
200
],
"number": 5
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
921,
934
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
938,
945
]
}
],
"range": [
938,
945
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
947,
954
]
},
{
"category": "Identifier",
"range": [
958,
964
]
}
],
"range": [
947,
964
]
}
],
"range": [
936,
966
]
},
{
"category": "StringLiteral",
"range": [
972,
982
]
}
],
"range": [
914,
983
]
}
],
"range": [
914,
984
]
}
],
"hasChanges": false,
"range": [
914,
984
],
"number": 22
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
207,
220
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
224,
231
]
}
],
"range": [
224,
231
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
233,
240
]
},
{
"category": "Identifier",
"range": [
244,
250
]
}
],
"range": [
233,
250
]
}
],
"range": [
222,
252
]
},
{
"category": "StringLiteral",
"range": [
258,
268
]
}
],
"range": [
200,
269
]
}
],
"range": [
200,
270
]
}
],
"hasChanges": false,
"range": [
200,
270
],
"number": 6
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
991,
1004
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
1011,
1015
]
}
],
"range": [
1006,
1015
]
},
{
"category": "StringLiteral",
"range": [
1021,
1032
]
}
],
"range": [
984,
1033
]
}
],
"range": [
984,
1034
]
}
],
"hasChanges": false,
"range": [
984,
1034
],
"number": 23
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
277,
290
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
297,
301
]
}
],
"range": [
292,
301
]
},
{
"category": "StringLiteral",
"range": [
307,
318
]
}
],
"range": [
270,
319
]
}
],
"range": [
270,
320
]
}
],
"hasChanges": false,
"range": [
270,
320
],
"number": 7
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
1041,
1054
]
}
],
"range": [
1034,
1055
]
}
],
"range": [
1034,
1056
]
}
],
"hasChanges": false,
"range": [
1034,
1056
],
"number": 24
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
327,
340
]
}
],
"range": [
320,
341
]
}
],
"range": [
320,
342
]
}
],
"hasChanges": false,
"range": [
320,
342
],
"number": 8
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
349,
362
]
},
{
"category": "StringLiteral",
"range": [
368,
378
]
}
],
"patch": "insert",
"range": [
342,
379
]
}
],
"range": [
342,
380
]
}
],
"hasChanges": true,
"range": [
342,
380
],
"number": 9
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
392,
401
]
}
],
"range": [
387,
401
]
},
{
"category": "StringLiteral",
"range": [
407,
415
]
}
],
"patch": "insert",
"range": [
380,
416
]
}
],
"range": [
380,
417
]
}
],
"hasChanges": true,
"range": [
380,
417
],
"number": 10
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
426,
433
]
}
],
"range": [
426,
433
]
}
],
"range": [
424,
435
]
},
{
"category": "StringLiteral",
"range": [
441,
449
]
}
],
"patch": "insert",
"range": [
417,
450
]
}
],
"range": [
417,
451
]
}
],
"hasChanges": true,
"range": [
417,
451
],
"number": 11
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
460,
468
]
}
],
"range": [
460,
468
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
471,
479
]
}
],
"range": [
471,
479
]
}
],
"range": [
458,
481
]
},
{
"category": "StringLiteral",
"range": [
487,
499
]
}
],
"patch": "insert",
"range": [
451,
500
]
}
],
"range": [
451,
501
]
}
],
"hasChanges": true,
"range": [
451,
501
],
"number": 12
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
510,
518
]
}
],
"range": [
510,
518
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
521,
529
]
},
{
"category": "Identifier",
"range": [
533,
546
]
}
],
"range": [
521,
546
]
}
],
"range": [
508,
548
]
},
{
"category": "StringLiteral",
"range": [
554,
565
]
}
],
"patch": "insert",
"range": [
501,
566
]
}
],
"range": [
501,
567
]
}
],
"hasChanges": true,
"range": [
501,
567
],
"number": 13
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
574,
587
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
591,
599
]
}
],
"range": [
591,
599
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
601,
609
]
},
{
"category": "Identifier",
"range": [
613,
626
]
}
],
"range": [
601,
626
]
}
],
"range": [
589,
628
]
},
{
"category": "StringLiteral",
"range": [
634,
643
]
}
],
"patch": "insert",
"range": [
567,
644
]
}
],
"range": [
567,
645
]
}
],
"hasChanges": true,
"range": [
567,
645
],
"number": 14
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
652,
665
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
672,
679
]
}
],
"range": [
667,
679
]
},
{
"category": "StringLiteral",
"range": [
685,
693
]
}
],
"patch": "insert",
"range": [
645,
694
]
}
],
"range": [
645,
695
]
}
],
"hasChanges": true,
"range": [
645,
695
],
"number": 15
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
702,
712
]
}
],
"patch": "insert",
"range": [
695,
713
]
}
],
"range": [
695,
714
]
}
],
"hasChanges": true,
"range": [
695,
714
],
"number": 16
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
1056,
1056
]
}
],
"hasChanges": false,
"range": [
1056,
1056
],
"number": 25
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
714,
714
]
}
],
"hasChanges": false,
"range": [
714,
714
],
"number": 17
}
]
],
"paths": [
"import.js",
"import.js"
],
"oids": [
"045c536ef6c74be91ba31c1dd47f8cb5c92a19b2",
"873ff752f28ce7a81e8c7573d696b2de0f08281d"
]
},
"filePaths": [
"import.js"
],
"patch": [
"diff --git a/import.js b/import.js",
"index 045c536..873ff75 100644",
"--- a/import.js",
"+++ b/import.js",
"@@ -1,19 +1,3 @@",
"-import defaultMember from \"babirusa\";",
"-import * as otherName from \"baboon\";",
"-import { element } from \"badger\";",
"-import { element1 , element2 } from \"bald-eagle\";",
"-import { element1 , element2 as elementAlias2 } from \"bandicoot\";",
"-import defaultMember, { element1, element2 as elementAlias2 } from \"banteng\";",
"-import defaultMember, * as element from \"barbet\";",
"-import \"basilisk\";",
"-import defaultMember from \"foo\";",
"-import * as name from \"aardvark\";",
"-import { member } from \"ant\";",
"-import { member1 , member2 } from \"antelope\";",
"-import { member1 , member2 as alias2 } from \"ant-eater\";",
"-import defaultMember, { member1, member2 as alias2 } from \"anaconda\";",
"-import defaultMember, * as name from \"alligator\";",
"-import \"arctic-tern\";",
" import defaultMember from \"foo\";",
" import * as name from \"aardvark\";",
" import { member } from \"ant\";",
"@@ -22,3 +6,11 @@ import { member1 , member2 as alias2 } from \"ant-eater\";",
" import defaultMember, { member1, member2 as alias2 } from \"anaconda\";",
" import defaultMember, * as name from \"alligator\";",
" import \"arctic-tern\";",
"+import defaultMember from \"babirusa\";",
"+import * as otherName from \"baboon\";",
"+import { element } from \"badger\";",
"+import { element1 , element2 } from \"bald-eagle\";",
"+import { element1 , element2 as elementAlias2 } from \"bandicoot\";",
"+import defaultMember, { element1, element2 as elementAlias2 } from \"banteng\";",
"+import defaultMember, * as element from \"barbet\";",
"+import \"basilisk\";"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "9cee417f36dc72559f8005d43c1c64e38d14b260..04525879004b8577a357fe3fa2c7c5937218f3f4"
}
,{
"testCaseDescription": "javascript-import-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
7,
20
]
},
{
"category": "StringLiteral",
"range": [
26,
31
]
}
],
"patch": "delete",
"range": [
0,
32
]
}
],
"range": [
0,
33
]
}
],
"hasChanges": true,
"range": [
0,
33
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
45,
49
]
}
],
"range": [
40,
49
]
},
{
"category": "StringLiteral",
"range": [
55,
65
]
}
],
"patch": "delete",
"range": [
33,
66
]
}
],
"range": [
33,
67
]
}
],
"hasChanges": true,
"range": [
33,
67
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
76,
82
]
}
],
"range": [
76,
82
]
}
],
"range": [
74,
84
]
},
{
"category": "StringLiteral",
"range": [
90,
95
]
}
],
"patch": "delete",
"range": [
67,
96
]
}
],
"range": [
67,
97
]
}
],
"hasChanges": true,
"range": [
67,
97
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
106,
113
]
}
],
"range": [
106,
113
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
116,
123
]
}
],
"range": [
116,
123
]
}
],
"range": [
104,
125
]
},
{
"category": "StringLiteral",
"range": [
131,
141
]
}
],
"patch": "delete",
"range": [
97,
142
]
}
],
"range": [
97,
143
]
}
],
"hasChanges": true,
"range": [
97,
143
],
"number": 4
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
152,
159
]
}
],
"range": [
152,
159
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
162,
169
]
},
{
"category": "Identifier",
"range": [
173,
179
]
}
],
"range": [
162,
179
]
}
],
"range": [
150,
181
]
},
{
"category": "StringLiteral",
"range": [
187,
198
]
}
],
"patch": "delete",
"range": [
143,
199
]
}
],
"range": [
143,
200
]
}
],
"hasChanges": true,
"range": [
143,
200
],
"number": 5
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
207,
220
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
224,
231
]
}
],
"range": [
224,
231
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
233,
240
]
},
{
"category": "Identifier",
"range": [
244,
250
]
}
],
"range": [
233,
250
]
}
],
"range": [
222,
252
]
},
{
"category": "StringLiteral",
"range": [
258,
268
]
}
],
"patch": "delete",
"range": [
200,
269
]
}
],
"range": [
200,
270
]
}
],
"hasChanges": true,
"range": [
200,
270
],
"number": 6
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
277,
290
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
297,
301
]
}
],
"range": [
292,
301
]
},
{
"category": "StringLiteral",
"range": [
307,
318
]
}
],
"patch": "delete",
"range": [
270,
319
]
}
],
"range": [
270,
320
]
}
],
"hasChanges": true,
"range": [
270,
320
],
"number": 7
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
327,
340
]
}
],
"patch": "delete",
"range": [
320,
341
]
}
],
"range": [
320,
342
]
}
],
"hasChanges": true,
"range": [
320,
342
],
"number": 8
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
349,
362
]
},
{
"category": "StringLiteral",
"range": [
368,
378
]
}
],
"range": [
342,
379
]
}
],
"range": [
342,
380
]
}
],
"hasChanges": false,
"range": [
342,
380
],
"number": 9
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
7,
20
]
},
{
"category": "StringLiteral",
"range": [
26,
36
]
}
],
"range": [
0,
37
]
}
],
"range": [
0,
38
]
}
],
"hasChanges": false,
"range": [
0,
38
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
392,
401
]
}
],
"range": [
387,
401
]
},
{
"category": "StringLiteral",
"range": [
407,
415
]
}
],
"range": [
380,
416
]
}
],
"range": [
380,
417
]
}
],
"hasChanges": false,
"range": [
380,
417
],
"number": 10
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
50,
59
]
}
],
"range": [
45,
59
]
},
{
"category": "StringLiteral",
"range": [
65,
73
]
}
],
"range": [
38,
74
]
}
],
"range": [
38,
75
]
}
],
"hasChanges": false,
"range": [
38,
75
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
426,
433
]
}
],
"range": [
426,
433
]
}
],
"range": [
424,
435
]
},
{
"category": "StringLiteral",
"range": [
441,
449
]
}
],
"range": [
417,
450
]
}
],
"range": [
417,
451
]
}
],
"hasChanges": false,
"range": [
417,
451
],
"number": 11
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
84,
91
]
}
],
"range": [
84,
91
]
}
],
"range": [
82,
93
]
},
{
"category": "StringLiteral",
"range": [
99,
107
]
}
],
"range": [
75,
108
]
}
],
"range": [
75,
109
]
}
],
"hasChanges": false,
"range": [
75,
109
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
460,
468
]
}
],
"range": [
460,
468
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
471,
479
]
}
],
"range": [
471,
479
]
}
],
"range": [
458,
481
]
},
{
"category": "StringLiteral",
"range": [
487,
499
]
}
],
"range": [
451,
500
]
}
],
"range": [
451,
501
]
}
],
"hasChanges": false,
"range": [
451,
501
],
"number": 12
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
118,
126
]
}
],
"range": [
118,
126
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
129,
137
]
}
],
"range": [
129,
137
]
}
],
"range": [
116,
139
]
},
{
"category": "StringLiteral",
"range": [
145,
157
]
}
],
"range": [
109,
158
]
}
],
"range": [
109,
159
]
}
],
"hasChanges": false,
"range": [
109,
159
],
"number": 4
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
510,
518
]
}
],
"range": [
510,
518
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
521,
529
]
},
{
"category": "Identifier",
"range": [
533,
546
]
}
],
"range": [
521,
546
]
}
],
"range": [
508,
548
]
},
{
"category": "StringLiteral",
"range": [
554,
565
]
}
],
"range": [
501,
566
]
}
],
"range": [
501,
567
]
}
],
"hasChanges": false,
"range": [
501,
567
],
"number": 13
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
168,
176
]
}
],
"range": [
168,
176
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
179,
187
]
},
{
"category": "Identifier",
"range": [
191,
204
]
}
],
"range": [
179,
204
]
}
],
"range": [
166,
206
]
},
{
"category": "StringLiteral",
"range": [
212,
223
]
}
],
"range": [
159,
224
]
}
],
"range": [
159,
225
]
}
],
"hasChanges": false,
"range": [
159,
225
],
"number": 5
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
574,
587
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
591,
599
]
}
],
"range": [
591,
599
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
601,
609
]
},
{
"category": "Identifier",
"range": [
613,
626
]
}
],
"range": [
601,
626
]
}
],
"range": [
589,
628
]
},
{
"category": "StringLiteral",
"range": [
634,
643
]
}
],
"range": [
567,
644
]
}
],
"range": [
567,
645
]
}
],
"hasChanges": false,
"range": [
567,
645
],
"number": 14
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
232,
245
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
249,
257
]
}
],
"range": [
249,
257
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
259,
267
]
},
{
"category": "Identifier",
"range": [
271,
284
]
}
],
"range": [
259,
284
]
}
],
"range": [
247,
286
]
},
{
"category": "StringLiteral",
"range": [
292,
301
]
}
],
"range": [
225,
302
]
}
],
"range": [
225,
303
]
}
],
"hasChanges": false,
"range": [
225,
303
],
"number": 6
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
652,
665
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
672,
679
]
}
],
"range": [
667,
679
]
},
{
"category": "StringLiteral",
"range": [
685,
693
]
}
],
"range": [
645,
694
]
}
],
"range": [
645,
695
]
}
],
"hasChanges": false,
"range": [
645,
695
],
"number": 15
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
310,
323
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
330,
337
]
}
],
"range": [
325,
337
]
},
{
"category": "StringLiteral",
"range": [
343,
351
]
}
],
"range": [
303,
352
]
}
],
"range": [
303,
353
]
}
],
"hasChanges": false,
"range": [
303,
353
],
"number": 7
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
702,
712
]
}
],
"range": [
695,
713
]
}
],
"range": [
695,
714
]
}
],
"hasChanges": false,
"range": [
695,
714
],
"number": 16
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
360,
370
]
}
],
"range": [
353,
371
]
}
],
"range": [
353,
372
]
}
],
"hasChanges": false,
"range": [
353,
372
],
"number": 8
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
714,
714
]
}
],
"hasChanges": false,
"range": [
714,
714
],
"number": 17
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
372,
372
]
}
],
"hasChanges": false,
"range": [
372,
372
],
"number": 9
}
]
],
"paths": [
"import.js",
"import.js"
],
"oids": [
"873ff752f28ce7a81e8c7573d696b2de0f08281d",
"db723392d3b659586cec185608d7d57ce5da872b"
]
},
"filePaths": [
"import.js"
],
"patch": [
"diff --git a/import.js b/import.js",
"index 873ff75..db72339 100644",
"--- a/import.js",
"+++ b/import.js",
"@@ -1,11 +1,3 @@",
"-import defaultMember from \"foo\";",
"-import * as name from \"aardvark\";",
"-import { member } from \"ant\";",
"-import { member1 , member2 } from \"antelope\";",
"-import { member1 , member2 as alias2 } from \"ant-eater\";",
"-import defaultMember, { member1, member2 as alias2 } from \"anaconda\";",
"-import defaultMember, * as name from \"alligator\";",
"-import \"arctic-tern\";",
" import defaultMember from \"babirusa\";",
" import * as otherName from \"baboon\";",
" import { element } from \"badger\";"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "04525879004b8577a357fe3fa2c7c5937218f3f4..31410516cd8aa6df7e993b64253cb523aab15729"
}
,{
"testCaseDescription": "javascript-import-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
7,
20
]
},
{
"category": "StringLiteral",
"range": [
26,
36
]
}
],
"range": [
0,
37
]
}
],
"patch": "delete",
"range": [
0,
38
]
}
],
"hasChanges": true,
"range": [
0,
38
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
50,
59
]
}
],
"range": [
45,
59
]
},
{
"category": "StringLiteral",
"range": [
65,
73
]
}
],
"range": [
38,
74
]
}
],
"patch": "delete",
"range": [
38,
75
]
}
],
"hasChanges": true,
"range": [
38,
75
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
84,
91
]
}
],
"range": [
84,
91
]
}
],
"range": [
82,
93
]
},
{
"category": "StringLiteral",
"range": [
99,
107
]
}
],
"range": [
75,
108
]
}
],
"patch": "delete",
"range": [
75,
109
]
}
],
"hasChanges": true,
"range": [
75,
109
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
118,
126
]
}
],
"range": [
118,
126
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
129,
137
]
}
],
"range": [
129,
137
]
}
],
"range": [
116,
139
]
},
{
"category": "StringLiteral",
"range": [
145,
157
]
}
],
"range": [
109,
158
]
}
],
"patch": "delete",
"range": [
109,
159
]
}
],
"hasChanges": true,
"range": [
109,
159
],
"number": 4
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
168,
176
]
}
],
"range": [
168,
176
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
179,
187
]
},
{
"category": "Identifier",
"range": [
191,
204
]
}
],
"range": [
179,
204
]
}
],
"range": [
166,
206
]
},
{
"category": "StringLiteral",
"range": [
212,
223
]
}
],
"range": [
159,
224
]
}
],
"patch": "delete",
"range": [
159,
225
]
}
],
"hasChanges": true,
"range": [
159,
225
],
"number": 5
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
232,
245
]
},
{
"category": "named_imports",
"children": [
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
249,
257
]
}
],
"range": [
249,
257
]
},
{
"category": "import_specifier",
"children": [
{
"category": "Identifier",
"range": [
259,
267
]
},
{
"category": "Identifier",
"range": [
271,
284
]
}
],
"range": [
259,
284
]
}
],
"range": [
247,
286
]
},
{
"category": "StringLiteral",
"range": [
292,
301
]
}
],
"range": [
225,
302
]
}
],
"patch": "delete",
"range": [
225,
303
]
}
],
"hasChanges": true,
"range": [
225,
303
],
"number": 6
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "Identifier",
"range": [
310,
323
]
},
{
"category": "namespace_import",
"children": [
{
"category": "Identifier",
"range": [
330,
337
]
}
],
"range": [
325,
337
]
},
{
"category": "StringLiteral",
"range": [
343,
351
]
}
],
"range": [
303,
352
]
}
],
"patch": "delete",
"range": [
303,
353
]
}
],
"hasChanges": true,
"range": [
303,
353
],
"number": 7
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Import",
"children": [
{
"category": "StringLiteral",
"range": [
360,
370
]
}
],
"range": [
353,
371
]
}
],
"patch": "delete",
"range": [
353,
372
]
}
],
"hasChanges": true,
"range": [
353,
372
],
"number": 8
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
372,
372
]
}
],
"hasChanges": true,
"range": [
372,
372
],
"number": 9
}
]
],
"paths": [
"import.js",
"import.js"
],
"oids": [
"db723392d3b659586cec185608d7d57ce5da872b",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"import.js"
],
"patch": [
"diff --git a/import.js b/import.js",
"index db72339..e69de29 100644",
"--- a/import.js",
"+++ b/import.js",
"@@ -1,8 +0,0 @@",
"-import defaultMember from \"babirusa\";",
"-import * as otherName from \"baboon\";",
"-import { element } from \"badger\";",
"-import { element1 , element2 } from \"bald-eagle\";",
"-import { element1 , element2 as elementAlias2 } from \"bandicoot\";",
"-import defaultMember, { element1, element2 as elementAlias2 } from \"banteng\";",
"-import defaultMember, * as element from \"barbet\";",
"-import \"basilisk\";"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "31410516cd8aa6df7e993b64253cb523aab15729..0bb74af8eede739c6d9a6b79a13e61263d3c52e6"
}]