@@ -85,9 +85,9 @@ public void symbolExtraction01() throws IOException, URISyntaxException {
8585 Class <?> testClass = compileAndLoadClass (CLASS_NAME );
8686 Reflect .on (testClass ).call ("main" , "1" ).get ();
8787 Scope classScope = symbolSinkMock .jarScopes .get (0 ).getScopes ().get (0 );
88- assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 2 , 20 , SOURCE_FILE , 2 , 0 );
89- assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 2 , 2 , SOURCE_FILE , 0 , 0 );
90- assertLineRanges (classScope .getScopes ().get (0 ), "2-2" );
88+ assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 4 , 20 , SOURCE_FILE , 2 , 0 );
89+ assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 0 , 0 , SOURCE_FILE , 0 , 0 );
90+ assertFalse (classScope .getScopes ().get (0 ). hasInjectibleLines () );
9191 Scope mainMethodScope = classScope .getScopes ().get (1 );
9292 assertScope (mainMethodScope , ScopeType .METHOD , "main" , 4 , 20 , SOURCE_FILE , 1 , 1 );
9393 assertLineRanges (mainMethodScope , "4-15" , "17-17" , "19-20" );
@@ -154,9 +154,9 @@ public void symbolExtraction02() throws IOException, URISyntaxException {
154154 Class <?> testClass = compileAndLoadClass (CLASS_NAME );
155155 Reflect .on (testClass ).call ("main" , "1" ).get ();
156156 Scope classScope = symbolSinkMock .jarScopes .get (0 ).getScopes ().get (0 );
157- assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 3 , 6 , SOURCE_FILE , 2 , 0 );
158- assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 3 , 3 , SOURCE_FILE , 0 , 0 );
159- assertLineRanges (classScope .getScopes ().get (0 ), "3-3" );
157+ assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 5 , 6 , SOURCE_FILE , 2 , 0 );
158+ assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 0 , 0 , SOURCE_FILE , 0 , 0 );
159+ assertFalse (classScope .getScopes ().get (0 ). hasInjectibleLines () );
160160 Scope mainMethodScope = classScope .getScopes ().get (1 );
161161 assertScope (mainMethodScope , ScopeType .METHOD , "main" , 5 , 6 , SOURCE_FILE , 1 , 1 );
162162 assertLineRanges (mainMethodScope , "5-6" );
@@ -185,9 +185,9 @@ public void symbolExtraction03() throws IOException, URISyntaxException {
185185 Class <?> testClass = compileAndLoadClass (CLASS_NAME );
186186 Reflect .on (testClass ).call ("main" , "1" ).get ();
187187 Scope classScope = symbolSinkMock .jarScopes .get (0 ).getScopes ().get (0 );
188- assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 4 , 28 , SOURCE_FILE , 2 , 0 );
189- assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 4 , 4 , SOURCE_FILE , 0 , 0 );
190- assertLineRanges (classScope .getScopes ().get (0 ), "4-4" );
188+ assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 6 , 28 , SOURCE_FILE , 2 , 0 );
189+ assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 0 , 0 , SOURCE_FILE , 0 , 0 );
190+ assertFalse (classScope .getScopes ().get (0 ). hasInjectibleLines () );
191191 Scope mainMethodScope = classScope .getScopes ().get (1 );
192192 assertScope (mainMethodScope , ScopeType .METHOD , "main" , 6 , 28 , SOURCE_FILE , 1 , 1 );
193193 assertLineRanges (mainMethodScope , "6-21" , "23-24" , "27-28" );
@@ -256,9 +256,9 @@ public void symbolExtraction04() throws IOException, URISyntaxException {
256256 Class <?> testClass = compileAndLoadClass (CLASS_NAME );
257257 Reflect .on (testClass ).call ("main" , "1" ).get ();
258258 Scope classScope = symbolSinkMock .jarScopes .get (0 ).getScopes ().get (0 );
259- assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 3 , 18 , SOURCE_FILE , 2 , 0 );
260- assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 3 , 3 , SOURCE_FILE , 0 , 0 );
261- assertLineRanges (classScope .getScopes ().get (0 ), "3-3" );
259+ assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 5 , 18 , SOURCE_FILE , 2 , 0 );
260+ assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 0 , 0 , SOURCE_FILE , 0 , 0 );
261+ assertFalse (classScope .getScopes ().get (0 ). hasInjectibleLines () );
262262 Scope mainMethodScope = classScope .getScopes ().get (1 );
263263 assertScope (mainMethodScope , ScopeType .METHOD , "main" , 5 , 18 , SOURCE_FILE , 1 , 1 );
264264 assertLineRanges (mainMethodScope , "5-12" , "14-15" , "18-18" );
@@ -331,9 +331,9 @@ public void symbolExtraction05() throws IOException, URISyntaxException {
331331 Class <?> testClass = compileAndLoadClass (CLASS_NAME );
332332 Reflect .on (testClass ).call ("main" , "1" ).get ();
333333 Scope classScope = symbolSinkMock .jarScopes .get (0 ).getScopes ().get (0 );
334- assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 3 , 15 , SOURCE_FILE , 2 , 0 );
335- assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 3 , 3 , SOURCE_FILE , 0 , 0 );
336- assertLineRanges (classScope .getScopes ().get (0 ), "3-3" );
334+ assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 5 , 15 , SOURCE_FILE , 2 , 0 );
335+ assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 0 , 0 , SOURCE_FILE , 0 , 0 );
336+ assertFalse (classScope .getScopes ().get (0 ). hasInjectibleLines () );
337337 Scope mainMethodScope = classScope .getScopes ().get (1 );
338338 assertScope (mainMethodScope , ScopeType .METHOD , "main" , 5 , 15 , SOURCE_FILE , 1 , 1 );
339339 assertLineRanges (mainMethodScope , "5-15" );
@@ -380,9 +380,9 @@ public void symbolExtraction06() throws IOException, URISyntaxException {
380380 Class <?> testClass = compileAndLoadClass (CLASS_NAME );
381381 Reflect .on (testClass ).call ("main" , "1" ).get ();
382382 Scope classScope = symbolSinkMock .jarScopes .get (0 ).getScopes ().get (0 );
383- assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 3 , 13 , SOURCE_FILE , 2 , 0 );
384- assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 3 , 3 , SOURCE_FILE , 0 , 0 );
385- assertLineRanges (classScope .getScopes ().get (0 ), "3-3" );
383+ assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 5 , 13 , SOURCE_FILE , 2 , 0 );
384+ assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 0 , 0 , SOURCE_FILE , 0 , 0 );
385+ assertFalse (classScope .getScopes ().get (0 ). hasInjectibleLines () );
386386 Scope mainMethodScope = classScope .getScopes ().get (1 );
387387 assertScope (mainMethodScope , ScopeType .METHOD , "main" , 5 , 13 , SOURCE_FILE , 1 , 1 );
388388 assertLineRanges (mainMethodScope , "5-5" , "7-11" , "13-13" );
@@ -429,9 +429,9 @@ public void symbolExtraction07() throws IOException, URISyntaxException {
429429 Class <?> testClass = compileAndLoadClass (CLASS_NAME );
430430 Reflect .on (testClass ).call ("main" , "1" ).get ();
431431 Scope classScope = symbolSinkMock .jarScopes .get (0 ).getScopes ().get (0 );
432- assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 3 , 10 , SOURCE_FILE , 2 , 0 );
433- assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 3 , 3 , SOURCE_FILE , 0 , 0 );
434- assertLineRanges (classScope .getScopes ().get (0 ), "3-3" );
432+ assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 5 , 10 , SOURCE_FILE , 2 , 0 );
433+ assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 0 , 0 , SOURCE_FILE , 0 , 0 );
434+ assertFalse (classScope .getScopes ().get (0 ). hasInjectibleLines () );
435435 Scope mainMethodScope = classScope .getScopes ().get (1 );
436436 assertScope (mainMethodScope , ScopeType .METHOD , "main" , 5 , 10 , SOURCE_FILE , 1 , 1 );
437437 assertLineRanges (mainMethodScope , "5-5" , "7-10" );
@@ -464,9 +464,9 @@ public void symbolExtraction08() throws IOException, URISyntaxException {
464464 Class <?> testClass = compileAndLoadClass (CLASS_NAME );
465465 Reflect .on (testClass ).call ("main" , "1" ).get ();
466466 Scope classScope = symbolSinkMock .jarScopes .get (0 ).getScopes ().get (0 );
467- assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 3 , 11 , SOURCE_FILE , 2 , 0 );
468- assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 3 , 3 , SOURCE_FILE , 0 , 0 );
469- assertLineRanges (classScope .getScopes ().get (0 ), "3-3" );
467+ assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 5 , 11 , SOURCE_FILE , 2 , 0 );
468+ assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 0 , 0 , SOURCE_FILE , 0 , 0 );
469+ assertFalse (classScope .getScopes ().get (0 ). hasInjectibleLines () );
470470 Scope mainMethodScope = classScope .getScopes ().get (1 );
471471 assertScope (mainMethodScope , ScopeType .METHOD , "main" , 5 , 11 , SOURCE_FILE , 1 , 1 );
472472 assertLineRanges (mainMethodScope , "5-5" , "7-9" , "11-11" );
@@ -501,7 +501,7 @@ public void symbolExtraction09() throws IOException, URISyntaxException {
501501 Class <?> testClass = compileAndLoadClass (CLASS_NAME );
502502 Reflect .on (testClass ).call ("main" , "1" ).get ();
503503 Scope classScope = symbolSinkMock .jarScopes .get (0 ).getScopes ().get (0 );
504- assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 5 , 23 , SOURCE_FILE , 6 , 2 );
504+ assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 6 , 23 , SOURCE_FILE , 6 , 2 );
505505 assertSymbol (
506506 classScope .getSymbols ().get (0 ),
507507 SymbolType .STATIC_FIELD ,
@@ -515,8 +515,8 @@ public void symbolExtraction09() throws IOException, URISyntaxException {
515515 Integer .TYPE .getTypeName (),
516516 0 );
517517 assertScope (
518- classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 5 , 17 , SOURCE_FILE , 0 , 0 );
519- assertLineRanges (classScope .getScopes ().get (0 ), "5-5" , " 17-17" );
518+ classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 17 , 17 , SOURCE_FILE , 0 , 0 );
519+ assertLineRanges (classScope .getScopes ().get (0 ), "17-17" );
520520 Scope mainMethodScope = classScope .getScopes ().get (1 );
521521 assertScope (mainMethodScope , ScopeType .METHOD , "main" , 8 , 14 , SOURCE_FILE , 1 , 1 );
522522 assertLineRanges (mainMethodScope , "8-10" , "14-14" );
@@ -601,9 +601,9 @@ public void symbolExtraction10() throws IOException, URISyntaxException {
601601 Reflect .on (testClass ).call ("main" , "1" ).get ();
602602 assertEquals (2 , symbolSinkMock .jarScopes .get (0 ).getScopes ().size ());
603603 Scope classScope = symbolSinkMock .jarScopes .get (0 ).getScopes ().get (0 );
604- assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 3 , 6 , SOURCE_FILE , 2 , 0 );
605- assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 3 , 3 , SOURCE_FILE , 0 , 0 );
606- assertLineRanges (classScope .getScopes ().get (0 ), "3-3" );
604+ assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 5 , 6 , SOURCE_FILE , 2 , 0 );
605+ assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 0 , 0 , SOURCE_FILE , 0 , 0 );
606+ assertFalse (classScope .getScopes ().get (0 ). hasInjectibleLines () );
607607 Scope mainMethodScope = classScope .getScopes ().get (1 );
608608 assertScope (mainMethodScope , ScopeType .METHOD , "main" , 5 , 6 , SOURCE_FILE , 1 , 1 );
609609 assertLineRanges (mainMethodScope , "5-6" );
@@ -618,16 +618,16 @@ public void symbolExtraction10() throws IOException, URISyntaxException {
618618 "com.datadog.debugger.symboltest.SymbolExtraction10$Inner" ,
619619 5 );
620620 Scope innerClassScope = symbolSinkMock .jarScopes .get (0 ).getScopes ().get (1 );
621- assertScope (innerClassScope , ScopeType .CLASS , CLASS_NAME + "$Inner" , 9 , 13 , SOURCE_FILE , 2 , 1 );
621+ assertScope (innerClassScope , ScopeType .CLASS , CLASS_NAME + "$Inner" , 10 , 13 , SOURCE_FILE , 2 , 1 );
622622 assertSymbol (
623623 innerClassScope .getSymbols ().get (0 ),
624624 SymbolType .FIELD ,
625625 "field1" ,
626626 Integer .TYPE .getTypeName (),
627627 0 );
628628 assertScope (
629- innerClassScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 9 , 10 , SOURCE_FILE , 0 , 0 );
630- assertLineRanges (innerClassScope .getScopes ().get (0 ), "9 -10" );
629+ innerClassScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 10 , 10 , SOURCE_FILE , 0 , 0 );
630+ assertLineRanges (innerClassScope .getScopes ().get (0 ), "10 -10" );
631631 Scope addToMethod = innerClassScope .getScopes ().get (1 );
632632 assertScope (addToMethod , ScopeType .METHOD , "addTo" , 12 , 13 , SOURCE_FILE , 1 , 1 );
633633 assertLineRanges (addToMethod , "12-13" );
@@ -656,11 +656,11 @@ public void symbolExtraction11() throws IOException, URISyntaxException {
656656 Class <?> testClass = compileAndLoadClass (CLASS_NAME );
657657 Reflect .on (testClass ).call ("main" , 1 ).get ();
658658 Scope classScope = symbolSinkMock .jarScopes .get (0 ).getScopes ().get (0 );
659- assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 3 , 11 , SOURCE_FILE , 2 , 1 );
659+ assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 4 , 11 , SOURCE_FILE , 2 , 1 );
660660 assertSymbol (
661661 classScope .getSymbols ().get (0 ), SymbolType .FIELD , "field1" , Integer .TYPE .getTypeName (), 0 );
662- assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 3 , 4 , SOURCE_FILE , 0 , 0 );
663- assertLineRanges (classScope .getScopes ().get (0 ), "3 -4" );
662+ assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 4 , 4 , SOURCE_FILE , 0 , 0 );
663+ assertLineRanges (classScope .getScopes ().get (0 ), "4 -4" );
664664 Scope mainMethodScope = classScope .getScopes ().get (1 );
665665 assertScope (mainMethodScope , ScopeType .METHOD , "main" , 6 , 11 , SOURCE_FILE , 1 , 1 );
666666 assertLineRanges (mainMethodScope , "6-9" , "11-11" );
@@ -693,9 +693,9 @@ public void symbolExtraction12() throws IOException, URISyntaxException {
693693 Class <?> testClass = compileAndLoadClass (CLASS_NAME );
694694 Reflect .on (testClass ).call ("main" , 1 ).get ();
695695 Scope classScope = symbolSinkMock .jarScopes .get (0 ).getScopes ().get (0 );
696- assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 6 , 20 , SOURCE_FILE , 7 , 0 );
697- assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 6 , 6 , SOURCE_FILE , 0 , 0 );
698- assertLineRanges (classScope .getScopes ().get (0 ), "6-6" );
696+ assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 8 , 20 , SOURCE_FILE , 7 , 0 );
697+ assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 0 , 0 , SOURCE_FILE , 0 , 0 );
698+ assertFalse (classScope .getScopes ().get (0 ). hasInjectibleLines () );
699699 Scope mainMethodScope = classScope .getScopes ().get (1 );
700700 assertScope (mainMethodScope , ScopeType .METHOD , "main" , 8 , 13 , SOURCE_FILE , 1 , 1 );
701701 assertLineRanges (mainMethodScope , "8-13" );
@@ -936,21 +936,21 @@ public void symbolExtraction15() throws IOException, URISyntaxException {
936936 null ,
937937 null );
938938 Scope initMethodScope = classScope .getScopes ().get (0 );
939- assertScope (initMethodScope , ScopeType .METHOD , "<init>" , 10 , 10 , SOURCE_FILE , 0 , 3 );
939+ assertScope (initMethodScope , ScopeType .METHOD , "<init>" , 0 , 0 , SOURCE_FILE , 0 , 3 );
940940 assertSymbol (
941941 initMethodScope .getSymbols ().get (0 ),
942942 SymbolType .ARG ,
943943 "firstName" ,
944944 String .class .getTypeName (),
945- 10 );
945+ 0 );
946946 assertSymbol (
947947 initMethodScope .getSymbols ().get (1 ),
948948 SymbolType .ARG ,
949949 "lastName" ,
950950 String .class .getTypeName (),
951- 10 );
951+ 0 );
952952 assertSymbol (
953- initMethodScope .getSymbols ().get (2 ), SymbolType .ARG , "age" , Integer .TYPE .getTypeName (), 10 );
953+ initMethodScope .getSymbols ().get (2 ), SymbolType .ARG , "age" , Integer .TYPE .getTypeName (), 0 );
954954 Scope mainMethodScope = classScope .getScopes ().get (1 );
955955 assertScope (mainMethodScope , ScopeType .METHOD , "main" , 13 , 13 , SOURCE_FILE , 0 , 1 );
956956 Scope toStringMethodScope = classScope .getScopes ().get (2 );
@@ -1002,7 +1002,7 @@ public void symbolExtraction16() throws IOException, URISyntaxException {
10021002 }
10031003 assertEquals (2 , symbolSinkMock .jarScopes .size ());
10041004 Scope classScope = symbolSinkMock .jarScopes .get (0 ).getScopes ().get (0 );
1005- assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 0 , 17 , SOURCE_FILE , 4 , 1 );
1005+ assertScope (classScope , ScopeType .CLASS , CLASS_NAME , 6 , 17 , SOURCE_FILE , 4 , 1 );
10061006 assertLangSpecifics (
10071007 classScope .getLanguageSpecifics (),
10081008 asList ("public" , "final" ),
@@ -1016,7 +1016,7 @@ public void symbolExtraction16() throws IOException, URISyntaxException {
10161016 "Companion" ,
10171017 CLASS_NAME + "$Companion" ,
10181018 0 );
1019- assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 3 , 3 , SOURCE_FILE , 0 , 0 );
1019+ assertScope (classScope .getScopes ().get (0 ), ScopeType .METHOD , "<init>" , 0 , 0 , SOURCE_FILE , 0 , 0 );
10201020 Scope f1MethodScope = classScope .getScopes ().get (1 );
10211021 assertScope (f1MethodScope , ScopeType .METHOD , "f1" , 6 , 6 , SOURCE_FILE , 0 , 1 );
10221022 assertSymbol (
@@ -1029,7 +1029,7 @@ public void symbolExtraction16() throws IOException, URISyntaxException {
10291029
10301030 Scope companionClassScope = symbolSinkMock .jarScopes .get (1 ).getScopes ().get (0 );
10311031 assertScope (
1032- companionClassScope , ScopeType .CLASS , CLASS_NAME + "$Companion" , 0 , 23 , SOURCE_FILE , 3 , 0 );
1032+ companionClassScope , ScopeType .CLASS , CLASS_NAME + "$Companion" , 22 , 23 , SOURCE_FILE , 3 , 0 );
10331033 assertLangSpecifics (
10341034 classScope .getLanguageSpecifics (),
10351035 asList ("public" , "final" ),
@@ -1041,8 +1041,8 @@ public void symbolExtraction16() throws IOException, URISyntaxException {
10411041 companionClassScope .getScopes ().get (0 ),
10421042 ScopeType .METHOD ,
10431043 "<init>" ,
1044- 20 ,
1045- 20 ,
1044+ 0 ,
1045+ 0 ,
10461046 SOURCE_FILE ,
10471047 0 ,
10481048 0 );
0 commit comments