task_type
stringclasses
4 values
code_task
stringclasses
15 values
start_line
int64
4
1.79k
end_line
int64
4
1.8k
before
stringlengths
79
76.1k
between
stringlengths
17
806
after
stringlengths
2
72.6k
reason_categories_output
stringlengths
2
2.24k
horizon_categories_output
stringlengths
83
3.99k
reason_freq_analysis
stringclasses
150 values
horizon_freq_analysis
stringlengths
23
185
completion_java
MTreeTester
392
393
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' myQ.insert (myData.get (i).getKey ().getPointInInterior (), myData.get (i).getData (), ', ' query.getDistance (myData.get (i).getKey ().getPointInInterior ()));']
[' }', ' }', ' }', ' ', ' public ArrayList <DataWrapper <PointInMetricSpace, DataType>> find (SphereABCD <PointInMetricSpace> query) {', ' ', ' ArrayList <DataWrapper <PointInMetricSpace, DataType>> returnVal = new ArrayList <DataWrapper <PointInMetricSpace, DataType>> ();', ' ', ' // just searc...
[{'reason_category': 'Loop Body', 'usage_line': 392}, {'reason_category': 'If Body', 'usage_line': 392}, {'reason_category': 'Loop Body', 'usage_line': 393}, {'reason_category': 'If Body', 'usage_line': 393}]
Variable 'myQ' used at line 392 is defined at line 388 and has a Short-Range dependency. Global_Variable 'myData' used at line 392 is defined at line 355 and has a Long-Range dependency. Variable 'i' used at line 392 is defined at line 389 and has a Short-Range dependency. Function 'getKey' used at line 392 is defined ...
{'Loop Body': 2, 'If Body': 2}
{'Variable Short-Range': 4, 'Global_Variable Long-Range': 2, 'Function Long-Range': 5}
completion_java
MTreeTester
404
406
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' if (query.contains (myData.get (i).getKey ().getPointInInterior ())) {', ' returnVal.add (new DataWrapper <PointInMetricSpace, DataType> (myData.get (i).getKey ().getPointInInterior (), myData.get (i).getData ()));', ' }']
[' }', ' ', ' return returnVal;', ' }', ' ', ' public int depth () {', ' return 1; ', ' }', '', ' // this is the max number of entries in the node', ' private static int maxSize;', ' ', ' // and a getter and setter', ' public static void setMaxSize (int toMe) {', ' maxSize = toMe; ', ' }', ' ...
[{'reason_category': 'Loop Body', 'usage_line': 404}, {'reason_category': 'If Condition', 'usage_line': 404}, {'reason_category': 'Loop Body', 'usage_line': 405}, {'reason_category': 'If Body', 'usage_line': 405}, {'reason_category': 'Loop Body', 'usage_line': 406}, {'reason_category': 'If Body', 'usage_line': 406}]
Variable 'query' used at line 404 is defined at line 398 and has a Short-Range dependency. Global_Variable 'myData' used at line 404 is defined at line 355 and has a Long-Range dependency. Variable 'i' used at line 404 is defined at line 403 and has a Short-Range dependency. Function 'getKey' used at line 404 is define...
{'Loop Body': 3, 'If Condition': 1, 'If Body': 2}
{'Variable Short-Range': 4, 'Global_Variable Long-Range': 2, 'Function Long-Range': 5, 'Class Medium-Range': 1}
completion_java
MTreeTester
468
468
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' myData.add (refTwo.getBoundingSphere (), refTwo);']
[' }', ' ', ' // this constructs a new node that holds the list of data that we were passed in', ' public InternalMTreeNodeABCD (IMetricDataListABCD <PointInMetricSpace, SphereABCD <PointInMetricSpace>, IMTreeNodeABCD <PointInMetricSpace, DataType>> useMe) {', ' myData = useMe; ', ' }', ' ', ' // from the in...
[]
Global_Variable 'myData' used at line 468 is defined at line 466 and has a Short-Range dependency. Variable 'refTwo' used at line 468 is defined at line 463 and has a Short-Range dependency.
{}
{'Global_Variable Short-Range': 1, 'Variable Short-Range': 1}
completion_java
MTreeTester
485
488
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' if (newDist < bestDist) {', ' bestDist = newDist;', ' bestIndex = i;', ' }']
[' }', ' ', ' // do the recursive insert', ' IMTreeNodeABCD <PointInMetricSpace, DataType> newRef = myData.get (bestIndex).getData ().insert (keyToAdd, dataToAdd);', ' ', ' // if we got something back, then there was a split, so add the new node into our list', ' if (newRef != null) {', ' myDa...
[{'reason_category': 'If Condition', 'usage_line': 485}, {'reason_category': 'Loop Body', 'usage_line': 485}, {'reason_category': 'Loop Body', 'usage_line': 486}, {'reason_category': 'If Body', 'usage_line': 486}, {'reason_category': 'Loop Body', 'usage_line': 487}, {'reason_category': 'If Body', 'usage_line': 487}, {'...
Variable 'newDist' used at line 485 is defined at line 484 and has a Short-Range dependency. Variable 'bestDist' used at line 485 is defined at line 480 and has a Short-Range dependency. Variable 'newDist' used at line 486 is defined at line 484 and has a Short-Range dependency. Variable 'bestDist' used at line 486 is ...
{'If Condition': 1, 'Loop Body': 4, 'If Body': 3}
{'Variable Short-Range': 6}
completion_java
MTreeTester
496
496
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' myData.add (newRef.getBoundingSphere (), newRef);']
[' }', ' ', ' // if we exceed the max size, then split and create a new node', ' if (myData.size () > getMaxSize ()) {', ' IMetricDataListABCD <PointInMetricSpace, SphereABCD <PointInMetricSpace>, IMTreeNodeABCD <PointInMetricSpace, DataType>> newOne = myData.splitInTwo ();', ' InternalMTreeNode...
[{'reason_category': 'If Body', 'usage_line': 496}]
Global_Variable 'myData' used at line 496 is defined at line 454 and has a Long-Range dependency. Variable 'newRef' used at line 496 is defined at line 492 and has a Short-Range dependency.
{'If Body': 1}
{'Global_Variable Long-Range': 1, 'Variable Short-Range': 1}
completion_java
MTreeTester
501
502
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' IMetricDataListABCD <PointInMetricSpace, SphereABCD <PointInMetricSpace>, IMTreeNodeABCD <PointInMetricSpace, DataType>> newOne = myData.splitInTwo ();', ' InternalMTreeNodeABCD <PointInMetricSpace, DataType> returnVal = new InternalMTreeNodeABCD <PointInMetricSpace, DataType> (newOne);']
[' return returnVal;', ' }', ' ', ' // otherwise, we return a null to indcate that a split did not occur', ' return null;', ' }', ' ', ' public void findKClosest (PointInMetricSpace query, PQueueABCD <PointInMetricSpace, DataType> myQ) {', ' for (int i = 0; i < myData.size (); i++) {', ' Sp...
[{'reason_category': 'If Body', 'usage_line': 501}, {'reason_category': 'If Body', 'usage_line': 502}]
Class 'SphereABCD' used at line 501 is defined at line 261 and has a Long-Range dependency. Global_Variable 'myData' used at line 501 is defined at line 454 and has a Long-Range dependency. Class 'InternalMTreeNodeABCD' used at line 502 is defined at line 450 and has a Long-Range dependency. Variable 'newOne' used at l...
{'If Body': 2}
{'Class Long-Range': 2, 'Global_Variable Long-Range': 1, 'Variable Short-Range': 1}
completion_java
MTreeTester
513
514
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' if (mySphere.intersects (myData.get (i).getKey ())) {', ' myData.get (i).getData ().findKClosest (query, myQ);']
[' }', ' }', ' }', ' ', ' // from the interface', ' public ArrayList <DataWrapper <PointInMetricSpace, DataType>> find (SphereABCD <PointInMetricSpace> query) {', ' ', ' ArrayList <DataWrapper <PointInMetricSpace, DataType>> returnVal = new ArrayList <DataWrapper <PointInMetricSpace, DataType>> ();',...
[{'reason_category': 'Loop Body', 'usage_line': 513}, {'reason_category': 'If Condition', 'usage_line': 513}, {'reason_category': 'Loop Body', 'usage_line': 514}, {'reason_category': 'If Body', 'usage_line': 514}]
Function 'SphereABCD.intersects' used at line 513 is defined at line 284 and has a Long-Range dependency. Global_Variable 'myData' used at line 513 is defined at line 454 and has a Long-Range dependency. Variable 'i' used at line 513 is defined at line 511 and has a Short-Range dependency. Function 'getKey' used at lin...
{'Loop Body': 2, 'If Condition': 1, 'If Body': 1}
{'Function Long-Range': 3, 'Global_Variable Long-Range': 2, 'Variable Short-Range': 4, 'Function Short-Range': 1}
completion_java
MTreeTester
525
529
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' for (int i = 0; i < myData.size (); i++) {', ' if (query.intersects (myData.get (i).getKey ())) {', ' returnVal.addAll (myData.get (i).getData ().find (query));', ' }', ' }']
[' ', ' return returnVal;', ' }', ' ', ' public int depth () {', ' return myData.get (0).getData ().depth () + 1; ', ' }', ' ', ' // this is the max number of entries in the node', ' private static int maxSize;', ' ', ' // and a getter and setter', ' public static void setMaxSize (int toMe) {', ' ...
[{'reason_category': 'Define Stop Criteria', 'usage_line': 525}, {'reason_category': 'Loop Body', 'usage_line': 526}, {'reason_category': 'If Condition', 'usage_line': 526}, {'reason_category': 'Loop Body', 'usage_line': 527}, {'reason_category': 'If Body', 'usage_line': 527}, {'reason_category': 'Loop Body', 'usage_li...
Variable 'i' used at line 525 is defined at line 525 and has a Short-Range dependency. Global_Variable 'myData' used at line 525 is defined at line 454 and has a Long-Range dependency. Variable 'query' used at line 526 is defined at line 520 and has a Short-Range dependency. Global_Variable 'myData' used at line 526 is...
{'Define Stop Criteria': 1, 'Loop Body': 4, 'If Condition': 1, 'If Body': 2}
{'Variable Short-Range': 6, 'Global_Variable Long-Range': 3, 'Function Long-Range': 2, 'Function Short-Range': 1}
completion_java
MTreeTester
625
642
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' for (int i = 0; i < myData.size (); i++) {', ' for (int j = i + 1; j < myData.size (); j++) {', ' ', ' // get the two keys', ' DataWrapper <KeyType, DataType> pointOne = myData.get (i);', ' DataWrapper <KeyType, DataType> pointTwo = myData.get (j);', ' ', ' // find t...
[' ', ' // now, we have the best two points; those are seeds for the clustering', ' DataWrapper <KeyType, DataType> pointOne = myData.remove (bestI);', ' DataWrapper <KeyType, DataType> pointTwo = myData.remove (bestJ - 1);', ' ', ' // these are the two new lists', ' AMetricDataListABCD <PointInMet...
[{'reason_category': 'Define Stop Criteria', 'usage_line': 625}, {'reason_category': 'Loop Body', 'usage_line': 626}, {'reason_category': 'Define Stop Criteria', 'usage_line': 626}, {'reason_category': 'Loop Body', 'usage_line': 627}, {'reason_category': 'Loop Body', 'usage_line': 628}, {'reason_category': 'Loop Body',...
Variable 'i' used at line 625 is defined at line 625 and has a Short-Range dependency. Variable 'myData' used at line 625 is defined at line 622 and has a Short-Range dependency. Variable 'i' used at line 626 is defined at line 625 and has a Short-Range dependency. Variable 'j' used at line 626 is defined at line 626 a...
{'Define Stop Criteria': 2, 'Loop Body': 17, 'If Condition': 1, 'If Body': 4}
{'Variable Short-Range': 13, 'Class Long-Range': 2, 'Function Long-Range': 2, 'Variable Medium-Range': 6}
completion_java
MTreeTester
629
630
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' DataWrapper <KeyType, DataType> pointOne = myData.get (i);', ' DataWrapper <KeyType, DataType> pointTwo = myData.get (j);']
[' ', ' // find the difference between them', ' double curDist = pointOne.getKey ().getPointInInterior ().getDistance (pointTwo.getKey ().getPointInInterior ());', '', ' // see if it is the biggest', ' if (curDist > maxDist) {', ' maxDist = curDist;', ' bestI = i;'...
[{'reason_category': 'Loop Body', 'usage_line': 629}, {'reason_category': 'Loop Body', 'usage_line': 630}]
Class 'DataWrapper' used at line 629 is defined at line 429 and has a Long-Range dependency. Variable 'myData' used at line 629 is defined at line 622 and has a Short-Range dependency. Variable 'i' used at line 629 is defined at line 625 and has a Short-Range dependency. Class 'DataWrapper' used at line 630 is defined ...
{'Loop Body': 2}
{'Class Long-Range': 2, 'Variable Short-Range': 4}
completion_java
MTreeTester
633
633
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' double curDist = pointOne.getKey ().getPointInInterior ().getDistance (pointTwo.getKey ().getPointInInterior ());']
['', ' // see if it is the biggest', ' if (curDist > maxDist) {', ' maxDist = curDist;', ' bestI = i;', ' bestJ = j;', ' }', ' }', ' }', ' ', ' // now, we have the best two points; those are seeds for the clustering', ' DataWrapper <KeyType, DataType> ...
[{'reason_category': 'Loop Body', 'usage_line': 633}]
Variable 'pointOne' used at line 633 is defined at line 629 and has a Short-Range dependency. Function 'getPointInInterior' used at line 633 is defined at line 122 and has a Long-Range dependency. Function 'getDistance' used at line 633 is defined at line 133 and has a Long-Range dependency. Variable 'pointTwo' used at...
{'Loop Body': 1}
{'Variable Short-Range': 2, 'Function Long-Range': 2}
completion_java
MTreeTester
636
640
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' if (curDist > maxDist) {', ' maxDist = curDist;', ' bestI = i;', ' bestJ = j;', ' }']
[' }', ' }', ' ', ' // now, we have the best two points; those are seeds for the clustering', ' DataWrapper <KeyType, DataType> pointOne = myData.remove (bestI);', ' DataWrapper <KeyType, DataType> pointTwo = myData.remove (bestJ - 1);', ' ', ' // these are the two new lists', ' AMetricData...
[{'reason_category': 'Loop Body', 'usage_line': 636}, {'reason_category': 'If Condition', 'usage_line': 636}, {'reason_category': 'Loop Body', 'usage_line': 637}, {'reason_category': 'If Body', 'usage_line': 637}, {'reason_category': 'Loop Body', 'usage_line': 638}, {'reason_category': 'If Body', 'usage_line': 638}, {'...
Variable 'curDist' used at line 636 is defined at line 633 and has a Short-Range dependency. Variable 'maxDist' used at line 636 is defined at line 624 and has a Medium-Range dependency. Variable 'curDist' used at line 637 is defined at line 633 and has a Short-Range dependency. Variable 'maxDist' used at line 637 is d...
{'Loop Body': 5, 'If Condition': 1, 'If Body': 4}
{'Variable Short-Range': 2, 'Variable Medium-Range': 6}
completion_java
MTreeTester
664
669
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' for (int i = 0; i < myData.size (); i++) {', ' if (myData.get (i).getKey ().getPointInInterior ().getDistance (pointOne.getKey ().getPointInInterior ()) < bestDist) {', ' bestDist = myData.get (i).getKey ().getPointInInterior ().getDistance (pointOne.getKey ().getPointInInterior ());', ' ...
[' ', ' // and add the best in', ' listOne.add (myData.get (bestIndex).getKey (), myData.get (bestIndex).getData ());', ' myData.remove (bestIndex);', ' ', ' // break if no more data', ' if (myData.size () == 0)', ' break;', ' ', ' // loop thru all of the candid...
[{'reason_category': 'Define Stop Criteria', 'usage_line': 664}, {'reason_category': 'Loop Body', 'usage_line': 664}, {'reason_category': 'Loop Body', 'usage_line': 665}, {'reason_category': 'If Condition', 'usage_line': 665}, {'reason_category': 'Loop Body', 'usage_line': 666}, {'reason_category': 'If Body', 'usage_li...
Variable 'i' used at line 664 is defined at line 664 and has a Short-Range dependency. Variable 'myData' used at line 664 is defined at line 622 and has a Long-Range dependency. Variable 'myData' used at line 665 is defined at line 622 and has a Long-Range dependency. Variable 'i' used at line 665 is defined at line 66...
{'Define Stop Criteria': 1, 'Loop Body': 6, 'If Condition': 1, 'If Body': 3}
{'Variable Short-Range': 7, 'Variable Long-Range': 3, 'Function Long-Range': 6, 'Variable Medium-Range': 2}
completion_java
MTreeTester
672
672
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' listOne.add (myData.get (bestIndex).getKey (), myData.get (bestIndex).getData ());']
[' myData.remove (bestIndex);', ' ', ' // break if no more data', ' if (myData.size () == 0)', ' break;', ' ', ' // loop thru all of the candidate data objects', ' bestDist = 9e99;', ' for (int i = 0; i < myData.size (); i++) {', ' if (myData.get (i).getKey ()...
[{'reason_category': 'Loop Body', 'usage_line': 672}]
Variable 'listOne' used at line 672 is defined at line 649 and has a Medium-Range dependency. Variable 'myData' used at line 672 is defined at line 622 and has a Long-Range dependency. Variable 'bestIndex' used at line 672 is defined at line 660 and has a Medium-Range dependency. Function 'getKey' used at line 672 is d...
{'Loop Body': 1}
{'Variable Medium-Range': 2, 'Variable Long-Range': 1, 'Function Long-Range': 2}
completion_java
MTreeTester
676
676
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' if (myData.size () == 0)']
[' break;', ' ', ' // loop thru all of the candidate data objects', ' bestDist = 9e99;', ' for (int i = 0; i < myData.size (); i++) {', ' if (myData.get (i).getKey ().getPointInInterior ().getDistance (pointTwo.getKey ().getPointInInterior ()) < bestDist) {', ' bestDist = myDa...
[{'reason_category': 'If Condition', 'usage_line': 676}, {'reason_category': 'Loop Body', 'usage_line': 676}]
Variable 'myData' used at line 676 is defined at line 622 and has a Long-Range dependency.
{'If Condition': 1, 'Loop Body': 1}
{'Variable Long-Range': 1}
completion_java
MTreeTester
681
686
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' for (int i = 0; i < myData.size (); i++) {', ' if (myData.get (i).getKey ().getPointInInterior ().getDistance (pointTwo.getKey ().getPointInInterior ()) < bestDist) {', ' bestDist = myData.get (i).getKey ().getPointInInterior ().getDistance (pointTwo.getKey ().getPointInInterior ());', ' ...
[' ', ' // and add the best in', ' listTwo.add (myData.get (bestIndex).getKey (), myData.get (bestIndex).getData ());', ' myData.remove (bestIndex);', ' }', ' ', ' // now we replace our own guts with the first list', ' replaceGuts (listOne);', ' ', ' // and return the other list', ...
[{'reason_category': 'Define Stop Criteria', 'usage_line': 681}, {'reason_category': 'Loop Body', 'usage_line': 681}, {'reason_category': 'Loop Body', 'usage_line': 682}, {'reason_category': 'If Condition', 'usage_line': 682}, {'reason_category': 'Loop Body', 'usage_line': 683}, {'reason_category': 'If Body', 'usage_li...
Variable 'i' used at line 681 is defined at line 681 and has a Short-Range dependency. Variable 'myData' used at line 681 is defined at line 622 and has a Long-Range dependency. Variable 'myData' used at line 682 is defined at line 622 and has a Long-Range dependency. Variable 'i' used at line 682 is defined at line 68...
{'Define Stop Criteria': 1, 'Loop Body': 6, 'If Condition': 1, 'If Body': 3}
{'Variable Short-Range': 6, 'Variable Long-Range': 5, 'Function Long-Range': 6, 'Variable Medium-Range': 1}
completion_java
MTreeTester
689
689
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' listTwo.add (myData.get (bestIndex).getKey (), myData.get (bestIndex).getData ());']
[' myData.remove (bestIndex);', ' }', ' ', ' // now we replace our own guts with the first list', ' replaceGuts (listOne);', ' ', ' // and return the other list', ' return listTwo;', ' }', '}', '', 'interface IMetricDataListABCD <PointInMetricSpace extends IPointInMetricSpace <PointInMetricSp...
[{'reason_category': 'Loop Body', 'usage_line': 689}]
Variable 'listTwo' used at line 689 is defined at line 650 and has a Long-Range dependency. Variable 'myData' used at line 689 is defined at line 622 and has a Long-Range dependency. Variable 'bestIndex' used at line 689 is defined at line 660 and has a Medium-Range dependency. Function 'getKey' used at line 689 is def...
{'Loop Body': 1}
{'Variable Long-Range': 2, 'Variable Medium-Range': 1, 'Function Long-Range': 2}
completion_java
MTreeTester
732
732
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' LeafMTreeNodeABCD.setMaxSize (leafNodeSize);']
[' root = new LeafMTreeNodeABCD <PointInMetricSpace, DataType> ();', ' }', ' ', ' // insert a new key/data pair into the map', ' public void insert (PointInMetricSpace keyToAdd, DataType dataToAdd) {', ' ', ' // insert the new data point', ' IMTreeNodeABCD <PointInMetricSpace, DataType> res = root.inser...
[]
Function 'LeafMTreeNodeABCD.setMaxSize' used at line 732 is defined at line 420 and has a Long-Range dependency. Variable 'leafNodeSize' used at line 732 is defined at line 730 and has a Short-Range dependency.
{}
{'Function Long-Range': 1, 'Variable Short-Range': 1}
completion_java
MTreeTester
740
740
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' IMTreeNodeABCD <PointInMetricSpace, DataType> res = root.insert (keyToAdd, dataToAdd);']
[' ', ' // if we got back a root split, then construct a new root', ' if (res != null) {', ' root = new InternalMTreeNodeABCD <PointInMetricSpace, DataType> (root, res);', ' }', ' }', ' ', ' // find all of the key/data pairs in the map that fall within a particular distance of query point', ' publi...
[]
Global_Variable 'root' used at line 740 is defined at line 727 and has a Medium-Range dependency. Variable 'keyToAdd' used at line 740 is defined at line 737 and has a Short-Range dependency. Variable 'dataToAdd' used at line 740 is defined at line 737 and has a Short-Range dependency.
{}
{'Global_Variable Medium-Range': 1, 'Variable Short-Range': 2}
completion_java
MTreeTester
744
744
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' root = new InternalMTreeNodeABCD <PointInMetricSpace, DataType> (root, res);']
[' }', ' }', ' ', ' // find all of the key/data pairs in the map that fall within a particular distance of query point', ' public ArrayList <DataWrapper <PointInMetricSpace, DataType>> find (PointInMetricSpace query, double distance) {', ' return root.find (new SphereABCD <PointInMetricSpace> (query, distance...
[{'reason_category': 'If Body', 'usage_line': 744}]
Class 'InternalMTreeNodeABCD' used at line 744 is defined at line 450 and has a Long-Range dependency. Global_Variable 'root' used at line 744 is defined at line 727 and has a Medium-Range dependency. Variable 'res' used at line 744 is defined at line 740 and has a Short-Range dependency.
{'If Body': 1}
{'Class Long-Range': 1, 'Global_Variable Medium-Range': 1, 'Variable Short-Range': 1}
completion_java
MTreeTester
750
750
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' return root.find (new SphereABCD <PointInMetricSpace> (query, distance)); ']
[' }', ' ', ' // find the k closest key/data pairs in the map to a particular query point', ' public ArrayList <DataWrapper <PointInMetricSpace, DataType>> findKClosest (PointInMetricSpace query, int k) {', ' PQueueABCD <PointInMetricSpace, DataType> myQ = new PQueueABCD <PointInMetricSpace, DataType> (k);', ' ...
[]
Global_Variable 'root' used at line 750 is defined at line 727 and has a Medium-Range dependency. Class 'SphereABCD' used at line 750 is defined at line 261 and has a Long-Range dependency. Variable 'query' used at line 750 is defined at line 749 and has a Short-Range dependency. Variable 'distance' used at line 750 is...
{}
{'Global_Variable Medium-Range': 1, 'Class Long-Range': 1, 'Variable Short-Range': 2}
completion_java
MTreeTester
756
757
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' root.findKClosest (query, myQ);', ' return myQ.done ();']
[' }', ' ', ' // get the depth', ' public int depth () {', ' return root.depth (); ', ' }', '}', '', '// this implements a map from a set of keys of type PointInMetricSpace to a set of data of type DataType', 'class SCMTree <PointInMetricSpace extends IPointInMetricSpace <PointInMetricSpace>, DataType> implemen...
[]
Global_Variable 'root' used at line 756 is defined at line 727 and has a Medium-Range dependency. Variable 'query' used at line 756 is defined at line 754 and has a Short-Range dependency. Variable 'myQ' used at line 756 is defined at line 755 and has a Short-Range dependency. Function 'PQueueABCD.done' used at line 75...
{}
{'Global_Variable Medium-Range': 1, 'Variable Short-Range': 2, 'Function Long-Range': 1}
completion_java
MTreeTester
774
776
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' InternalMTreeNodeABCD.setMaxSize (intNodeSize);', ' LeafMTreeNodeABCD.setMaxSize (leafNodeSize);', ' root = new LeafMTreeNodeABCD <PointInMetricSpace, DataType> ();']
[' }', ' ', ' // insert a new key/data pair into the map', ' public void insert (PointInMetricSpace keyToAdd, DataType dataToAdd) {', ' ', ' // insert the new data point', ' IMTreeNodeABCD <PointInMetricSpace, DataType> res = root.insert (keyToAdd, dataToAdd);', ' ', ' // if we got back a root split,...
[]
Function 'InternalMTreeNodeABCD.setMaxSize' used at line 774 is defined at line 542 and has a Long-Range dependency. Variable 'intNodeSize' used at line 774 is defined at line 773 and has a Short-Range dependency. Function 'LeafMTreeNodeABCD.setMaxSize' used at line 775 is defined at line 420 and has a Long-Range depen...
{}
{'Function Long-Range': 2, 'Variable Short-Range': 2, 'Class Long-Range': 1, 'Global_Variable Short-Range': 1}
completion_java
MTreeTester
786
788
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' if (res != null) {', ' root = new InternalMTreeNodeABCD <PointInMetricSpace, DataType> (root, res);', ' }']
[' }', ' ', ' // find all of the key/data pairs in the map that fall within a particular distance of query point', ' public ArrayList <DataWrapper <PointInMetricSpace, DataType>> find (PointInMetricSpace query, double distance) {', ' return root.find (new SphereABCD <PointInMetricSpace> (query, distance)); ', ' ...
[{'reason_category': 'If Condition', 'usage_line': 786}, {'reason_category': 'If Body', 'usage_line': 787}, {'reason_category': 'If Body', 'usage_line': 788}]
Variable 'res' used at line 786 is defined at line 783 and has a Short-Range dependency. Class 'InternalMTreeNodeABCD' used at line 787 is defined at line 450 and has a Long-Range dependency. Global_Variable 'root' used at line 787 is defined at line 770 and has a Medium-Range dependency. Variable 'res' used at line 78...
{'If Condition': 1, 'If Body': 2}
{'Variable Short-Range': 2, 'Class Long-Range': 1, 'Global_Variable Medium-Range': 1}
completion_java
MTreeTester
793
793
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' return root.find (new SphereABCD <PointInMetricSpace> (query, distance)); ']
[' }', ' ', ' // find the k closest key/data pairs in the map to a particular query point', ' public ArrayList <DataWrapper <PointInMetricSpace, DataType>> findKClosest (PointInMetricSpace query, int k) {', ' PQueueABCD <PointInMetricSpace, DataType> myQ = new PQueueABCD <PointInMetricSpace, DataType> (k);', ' ...
[]
Global_Variable 'root' used at line 793 is defined at line 770 and has a Medium-Range dependency. Class 'SphereABCD' used at line 793 is defined at line 261 and has a Long-Range dependency. Variable 'query' used at line 793 is defined at line 792 and has a Short-Range dependency. Variable 'distance' used at line 793 is...
{}
{'Global_Variable Medium-Range': 1, 'Class Long-Range': 1, 'Variable Short-Range': 2}
completion_java
MTreeTester
798
801
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' PQueueABCD <PointInMetricSpace, DataType> myQ = new PQueueABCD <PointInMetricSpace, DataType> (k);', ' root.findKClosest (query, myQ);', ' return myQ.done ();', ' }']
[' ', ' // get the depth', ' public int depth () {', ' return root.depth (); ', ' }', '}', '', '', '/**', ' * A JUnit test case class.', ' * Every method starting with the word "test" will be called when running', ' * the test with JUnit.', ' */', '', 'public class MTreeTester extends TestCase {', ' ', ' // co...
[]
Class 'PQueueABCD' used at line 798 is defined at line 177 and has a Long-Range dependency. Variable 'k' used at line 798 is defined at line 797 and has a Short-Range dependency. Global_Variable 'root' used at line 799 is defined at line 770 and has a Medium-Range dependency. Variable 'query' used at line 799 is define...
{}
{'Class Long-Range': 1, 'Variable Short-Range': 3, 'Global_Variable Medium-Range': 1, 'Function Long-Range': 1}
completion_java
MTreeTester
804
806
['import junit.framework.TestCase;', 'import java.util.ArrayList;', 'import java.util.Random;', 'import java.util.Collections;', '', '// this is a map from a set of keys of type PointInMetricSpace to a', '// set of data of type DataType', 'interface IMTree <Key extends IPointInMetricSpace <Key>, Data> {', ' ', ' // in...
[' public int depth () {', ' return root.depth (); ', ' }']
['}', '', '', '/**', ' * A JUnit test case class.', ' * Every method starting with the word "test" will be called when running', ' * the test with JUnit.', ' */', '', 'public class MTreeTester extends TestCase {', ' ', ' // compare two lists of strings to see if the contents are the same', ' private boolean compareS...
[]
Function 'depth' used at line 804 is defined at line 31 and has a Long-Range dependency. Global_Variable 'root' used at line 805 is defined at line 770 and has a Long-Range dependency.
{}
{'Function Long-Range': 1, 'Global_Variable Long-Range': 1}
completion_java
TopKTester
167
168
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' return (!(left.getHeight () - right.getHeight () >= 2 ||', ' left.getHeight () - right.getHeight () <= -2));']
[' }', ' ', ' Data <T> getVal () {', ' return val; ', ' }', ' ', ' AVLNode <T> removeBig () {', ' AVLNode <T> newRight = right.removeBig ();', ' if (newRight == null) {', ' return left; ', ' } else {', ' right = newRight;', ' setHeight ();', ' ', ' // if we are not balanced, ...
[]
Global_Variable 'left' used at line 167 is defined at line 136 and has a Long-Range dependency. Global_Variable 'right' used at line 167 is defined at line 137 and has a Medium-Range dependency. Global_Variable 'left' used at line 168 is defined at line 136 and has a Long-Range dependency. Global_Variable 'right' used ...
{}
{'Global_Variable Long-Range': 3, 'Global_Variable Medium-Range': 1}
completion_java
TopKTester
187
187
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' left.makeLeftDeep ();']
[' ', ' // and now reconstruct the tree', ' AVLNode <T> oldLeft = left;', ' AVLNode <T> oldRight = right;', ' left = oldLeft.getLeft ();', ' right = new Occupied <T> (val, oldLeft.getRight (), right);', ' val = oldLeft.getVal ();', ' setHeight ();', ' }', ' ...
[{'reason_category': 'Else Reasoning', 'usage_line': 187}, {'reason_category': 'If Body', 'usage_line': 187}]
Global_Variable 'left' used at line 187 is defined at line 136 and has a Long-Range dependency.
{'Else Reasoning': 1, 'If Body': 1}
{'Global_Variable Long-Range': 1}
completion_java
TopKTester
190
195
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' AVLNode <T> oldLeft = left;', ' AVLNode <T> oldRight = right;', ' left = oldLeft.getLeft ();', ' right = new Occupied <T> (val, oldLeft.getRight (), right);', ' val = oldLeft.getVal ();', ' setHeight ();']
[' }', ' ', ' return this;', ' }', ' }', ' ', ' AVLNode <T> getLeft () {', ' return left;', ' }', ' ', ' AVLNode <T> getRight () {', ' return right;', ' }', ' ', ' void setHeight () {', ' ', ' int one = left.getHeight ();', ' int other = right.getHeight ();', ' if (one > other...
[{'reason_category': 'Else Reasoning', 'usage_line': 190}, {'reason_category': 'If Body', 'usage_line': 190}, {'reason_category': 'Else Reasoning', 'usage_line': 191}, {'reason_category': 'If Body', 'usage_line': 191}, {'reason_category': 'Else Reasoning', 'usage_line': 192}, {'reason_category': 'If Body', 'usage_line'...
Class 'AVLNode' used at line 190 is defined at line 28 and has a Long-Range dependency. Global_Variable 'left' used at line 190 is defined at line 136 and has a Long-Range dependency. Class 'AVLNode' used at line 191 is defined at line 28 and has a Long-Range dependency. Global_Variable 'right' used at line 191 is defi...
{'Else Reasoning': 6, 'If Body': 6}
{'Class Long-Range': 3, 'Global_Variable Long-Range': 4, 'Global_Variable Medium-Range': 2, 'Variable Short-Range': 3, 'Function Long-Range': 1}
completion_java
TopKTester
217
217
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' height = other;']
[' height++;', ' }', ' ', ' int getHeight () {', ' return height; ', ' }', ' ', ' void raiseLeft () {', ' ', ' // make sure we are left deep first', ' left.makeLeftDeep ();', ' ', ' // and then balance the thing', ' AVLNode <T> oldLeft = left;', ' AVLNode <T> oldRight = right;', ' lef...
[{'reason_category': 'Else Reasoning', 'usage_line': 217}]
Variable 'other' used at line 217 is defined at line 213 and has a Short-Range dependency. Global_Variable 'height' used at line 217 is defined at line 215 and has a Short-Range dependency.
{'Else Reasoning': 1}
{'Variable Short-Range': 1, 'Global_Variable Short-Range': 1}
completion_java
TopKTester
228
228
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' left.makeLeftDeep ();']
[' ', ' // and then balance the thing', ' AVLNode <T> oldLeft = left;', ' AVLNode <T> oldRight = right;', ' left = oldLeft.getLeft ();', ' right = new Occupied <T> (val, oldLeft.getRight (), right);', ' val = oldLeft.getVal ();', ' setHeight ();', ' }', ' ', ' void raiseRight () {', ' ', '...
[]
Global_Variable 'left' used at line 228 is defined at line 136 and has a Long-Range dependency.
{}
{'Global_Variable Long-Range': 1}
completion_java
TopKTester
231
236
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' AVLNode <T> oldLeft = left;', ' AVLNode <T> oldRight = right;', ' left = oldLeft.getLeft ();', ' right = new Occupied <T> (val, oldLeft.getRight (), right);', ' val = oldLeft.getVal ();', ' setHeight ();']
[' }', ' ', ' void raiseRight () {', ' ', ' // make sure we are right deep first', ' right.makeRightDeep ();', ' ', ' // and then balance the thing', ' AVLNode <T> oldLeft = left;', ' AVLNode <T> oldRight = right;', ' left = new Occupied <T> (val, oldLeft, oldRight.getLeft ());', ' right =...
[]
Class 'AVLNode' used at line 231 is defined at line 28 and has a Long-Range dependency. Global_Variable 'left' used at line 231 is defined at line 136 and has a Long-Range dependency. Class 'AVLNode' used at line 232 is defined at line 28 and has a Long-Range dependency. Global_Variable 'right' used at line 232 is defi...
{}
{'Class Long-Range': 3, 'Global_Variable Long-Range': 6, 'Variable Short-Range': 3, 'Function Medium-Range': 1}
completion_java
TopKTester
242
242
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' right.makeRightDeep ();']
[' ', ' // and then balance the thing', ' AVLNode <T> oldLeft = left;', ' AVLNode <T> oldRight = right;', ' left = new Occupied <T> (val, oldLeft, oldRight.getLeft ());', ' right = oldRight.getRight ();', ' val = oldRight.getVal ();', ' setHeight ();', ' }', ' ', ' void makeLeftDeep () {', ' ...
[]
Global_Variable 'right' used at line 242 is defined at line 137 and has a Long-Range dependency.
{}
{'Global_Variable Long-Range': 1}
completion_java
TopKTester
245
250
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' AVLNode <T> oldLeft = left;', ' AVLNode <T> oldRight = right;', ' left = new Occupied <T> (val, oldLeft, oldRight.getLeft ());', ' right = oldRight.getRight ();', ' val = oldRight.getVal ();', ' setHeight ();']
[' }', ' ', ' void makeLeftDeep () {', ' ', ' if (left.getHeight () >= right.getHeight ())', ' return;', ' ', ' AVLNode <T> oldLeft = left;', ' AVLNode <T> oldRight = right;', ' left = new Occupied <T> (val, oldLeft, oldRight.getLeft ());', ' right = oldRight.getRight ();', ' val = oldRi...
[]
Class 'AVLNode' used at line 245 is defined at line 28 and has a Long-Range dependency. Global_Variable 'left' used at line 245 is defined at line 136 and has a Long-Range dependency. Class 'AVLNode' used at line 246 is defined at line 28 and has a Long-Range dependency. Global_Variable 'right' used at line 246 is defi...
{}
{'Class Long-Range': 3, 'Global_Variable Long-Range': 6, 'Variable Short-Range': 4, 'Function Long-Range': 1}
completion_java
TopKTester
255
255
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' if (left.getHeight () >= right.getHeight ())']
[' return;', ' ', ' AVLNode <T> oldLeft = left;', ' AVLNode <T> oldRight = right;', ' left = new Occupied <T> (val, oldLeft, oldRight.getLeft ());', ' right = oldRight.getRight ();', ' val = oldRight.getVal ();', ' setHeight ();', ' }', ' ', ' void makeRightDeep () {', ' ', ' if (righ...
[{'reason_category': 'If Condition', 'usage_line': 255}]
Global_Variable 'left' used at line 255 is defined at line 136 and has a Long-Range dependency. Global_Variable 'right' used at line 255 is defined at line 137 and has a Long-Range dependency.
{'If Condition': 1}
{'Global_Variable Long-Range': 2}
completion_java
TopKTester
268
268
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' if (right.getHeight () >= left.getHeight ())']
[' return;', ' ', ' AVLNode <T> oldLeft = left;', ' AVLNode <T> oldRight = right;', ' left = oldLeft.getLeft ();', ' right = new Occupied <T> (val, oldLeft.getRight (), oldRight);', ' val = oldLeft.getVal ();', ' setHeight ();', ' }', ' ', ' ', ' Occupied (Data <T> valIn, AVLNode <T> leftI...
[{'reason_category': 'If Condition', 'usage_line': 268}]
Global_Variable 'right' used at line 268 is defined at line 137 and has a Long-Range dependency. Global_Variable 'left' used at line 268 is defined at line 136 and has a Long-Range dependency.
{'If Condition': 1}
{'Global_Variable Long-Range': 2}
completion_java
TopKTester
271
276
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' AVLNode <T> oldLeft = left;', ' AVLNode <T> oldRight = right;', ' left = oldLeft.getLeft ();', ' right = new Occupied <T> (val, oldLeft.getRight (), oldRight);', ' val = oldLeft.getVal ();', ' setHeight ();']
[' }', ' ', ' ', ' Occupied (Data <T> valIn, AVLNode <T> leftIn, AVLNode <T> rightIn) {', ' val = valIn;', ' left = leftIn;', ' right = rightIn;', ' setHeight ();', ' }', ' ', ' AVLNode <T> insert (double myKey, T myVal) {', ' ', ' if (myKey <= val.getScore ()) {', ' left = left.insert (m...
[]
Class 'AVLNode' used at line 271 is defined at line 28 and has a Long-Range dependency. Global_Variable 'left' used at line 271 is defined at line 136 and has a Long-Range dependency. Class 'AVLNode' used at line 272 is defined at line 28 and has a Long-Range dependency. Global_Variable 'right' used at line 272 is defi...
{}
{'Class Long-Range': 3, 'Global_Variable Long-Range': 6, 'Variable Short-Range': 4, 'Function Long-Range': 1}
completion_java
TopKTester
292
292
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' right = right.insert (myKey, myVal); ']
[' }', ' ', ' if (left.getHeight () - right.getHeight () > 1)', ' raiseLeft ();', ' else if (right.getHeight () - left.getHeight () > 1)', ' raiseRight ();', ' ', ' setHeight ();', ' return this;', ' }', '}', '', 'class ChrisAVLTree <T> {', '', ' AVLNode <T> root = new EmptyNode <T> ();...
[{'reason_category': 'Else Reasoning', 'usage_line': 292}]
Global_Variable 'right' used at line 292 is defined at line 137 and has a Long-Range dependency. Variable 'myKey' used at line 292 is defined at line 287 and has a Short-Range dependency. Variable 'myVal' used at line 292 is defined at line 287 and has a Short-Range dependency.
{'Else Reasoning': 1}
{'Global_Variable Long-Range': 1, 'Variable Short-Range': 2}
completion_java
TopKTester
297
298
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' else if (right.getHeight () - left.getHeight () > 1)', ' raiseRight ();']
[' ', ' setHeight ();', ' return this;', ' }', '}', '', 'class ChrisAVLTree <T> {', '', ' AVLNode <T> root = new EmptyNode <T> ();', ' ', ' void insert (double val, T insertMe) {', ' root = root.insert (val, insertMe);', ' }', ' ', ' public ArrayList <T> toList () {', ' ArrayList <T> temp = new Ar...
[{'reason_category': 'Elif Condition', 'usage_line': 297}, {'reason_category': 'Elif Body', 'usage_line': 298}]
Global_Variable 'right' used at line 297 is defined at line 292 and has a Short-Range dependency. Global_Variable 'left' used at line 297 is defined at line 290 and has a Short-Range dependency. Function 'raiseRight' used at line 298 is defined at line 239 and has a Long-Range dependency.
{'Elif Condition': 1, 'Elif Body': 1}
{'Global_Variable Short-Range': 2, 'Function Long-Range': 1}
completion_java
TopKTester
352
353
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[" while (checkMe.charAt (startPos) != '(')", ' startPos++;']
[' ', ' // this is the depth at the left', ' int leftDepth = -1;', ' ', ' // and the depth at the right', ' int rightDepth = -1;', ' ', ' // now, find where the number of parens on each side is equal', ' int lParens = 0;', ' int rParens = 0;', ' for (int i = startPos + 1; i < checkMe.le...
[{'reason_category': 'Define Stop Criteria', 'usage_line': 352}, {'reason_category': 'Loop Body', 'usage_line': 353}]
Variable 'checkMe' used at line 352 is defined at line 348 and has a Short-Range dependency. Variable 'startPos' used at line 352 is defined at line 351 and has a Short-Range dependency. Variable 'startPos' used at line 353 is defined at line 351 and has a Short-Range dependency.
{'Define Stop Criteria': 1, 'Loop Body': 1}
{'Variable Short-Range': 3}
completion_java
TopKTester
369
370
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[" else if (checkMe.charAt (i) == ')')", ' rParens++;']
[' ', ' // if the number of ) and ( are equal', ' if (lParens == rParens && lParens > 0) {', ' ', ' // in this case, we just completed the left tree', ' if (leftDepth == -1) {', ' leftDepth = checkHeight (checkMe.substring (startPos + 1, i + 1));', ' startPos = i + ...
[{'reason_category': 'Loop Body', 'usage_line': 369}, {'reason_category': 'Elif Condition', 'usage_line': 369}, {'reason_category': 'Loop Body', 'usage_line': 370}, {'reason_category': 'Elif Body', 'usage_line': 370}]
Variable 'checkMe' used at line 369 is defined at line 348 and has a Medium-Range dependency. Variable 'i' used at line 369 is defined at line 364 and has a Short-Range dependency. Variable 'rParens' used at line 370 is defined at line 363 and has a Short-Range dependency.
{'Loop Body': 2, 'Elif Condition': 1, 'Elif Body': 1}
{'Variable Medium-Range': 1, 'Variable Short-Range': 2}
completion_java
TopKTester
373
373
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' if (lParens == rParens && lParens > 0) {']
[' ', ' // in this case, we just completed the left tree', ' if (leftDepth == -1) {', ' leftDepth = checkHeight (checkMe.substring (startPos + 1, i + 1));', ' startPos = i + 1;', ' lParens = 0;', ' rParens = 0;', ' ', ' // in this case, we just co...
[{'reason_category': 'Loop Body', 'usage_line': 373}, {'reason_category': 'If Condition', 'usage_line': 373}]
Variable 'lParens' used at line 373 is defined at line 362 and has a Medium-Range dependency. Variable 'rParens' used at line 373 is defined at line 363 and has a Short-Range dependency.
{'Loop Body': 1, 'If Condition': 1}
{'Variable Medium-Range': 1, 'Variable Short-Range': 1}
completion_java
TopKTester
377
381
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' leftDepth = checkHeight (checkMe.substring (startPos + 1, i + 1));', ' startPos = i + 1;', ' lParens = 0;', ' rParens = 0;', ' ']
[' // in this case, we just completed the right tree', ' } else {', ' rightDepth = checkHeight (checkMe.substring (startPos + 1, i + 1));', ' startPos = i + 1;', ' break;', ' }', ' }', ' }', ' ', ' // check to see if this is not a valid AVL tree', ' if (l...
[{'reason_category': 'Loop Body', 'usage_line': 377}, {'reason_category': 'If Body', 'usage_line': 377}, {'reason_category': 'Loop Body', 'usage_line': 378}, {'reason_category': 'If Body', 'usage_line': 378}, {'reason_category': 'Loop Body', 'usage_line': 379}, {'reason_category': 'If Body', 'usage_line': 379}, {'reaso...
Function 'checkHeight' used at line 377 is defined at line 348 and has a Medium-Range dependency. Variable 'checkMe' used at line 377 is defined at line 348 and has a Medium-Range dependency. Variable 'startPos' used at line 377 is defined at line 351 and has a Medium-Range dependency. Variable 'i' used at line 377 is ...
{'Loop Body': 5, 'If Body': 4}
{'Function Medium-Range': 1, 'Variable Medium-Range': 8}
completion_java
TopKTester
384
386
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' rightDepth = checkHeight (checkMe.substring (startPos + 1, i + 1));', ' startPos = i + 1;', ' break;']
[' }', ' }', ' }', ' ', ' // check to see if this is not a valid AVL tree', ' if (leftDepth - rightDepth >= 2 || leftDepth - rightDepth <= -2)', ' throw new RuntimeException ("this tree is not balanced! Left: " + leftDepth + " Right: " + rightDepth);', ' ', ' // search for the closing...
[{'reason_category': 'Loop Body', 'usage_line': 384}, {'reason_category': 'Else Reasoning', 'usage_line': 384}, {'reason_category': 'Loop Body', 'usage_line': 385}, {'reason_category': 'Else Reasoning', 'usage_line': 385}, {'reason_category': 'Loop Body', 'usage_line': 386}, {'reason_category': 'Else Reasoning', 'usage...
Function 'checkHeight' used at line 384 is defined at line 348 and has a Long-Range dependency. Variable 'checkMe' used at line 384 is defined at line 348 and has a Long-Range dependency. Variable 'startPos' used at line 384 is defined at line 378 and has a Short-Range dependency. Variable 'i' used at line 384 is defin...
{'Loop Body': 3, 'Else Reasoning': 3}
{'Function Long-Range': 1, 'Variable Long-Range': 1, 'Variable Short-Range': 2, 'Variable Medium-Range': 3}
completion_java
TopKTester
392
392
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' if (leftDepth - rightDepth >= 2 || leftDepth - rightDepth <= -2)']
[' throw new RuntimeException ("this tree is not balanced! Left: " + leftDepth + " Right: " + rightDepth);', ' ', ' // search for the closing )', " while (checkMe.charAt (startPos) != ')')", ' startPos++;', ' ', ' // and we are outta here', ' if (leftDepth > rightDepth)', ' return leftD...
[{'reason_category': 'If Condition', 'usage_line': 392}]
Variable 'leftDepth' used at line 392 is defined at line 356 and has a Long-Range dependency. Variable 'rightDepth' used at line 392 is defined at line 359 and has a Long-Range dependency.
{'If Condition': 1}
{'Variable Long-Range': 2}
completion_java
TopKTester
396
396
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[" while (checkMe.charAt (startPos) != ')')"]
[' startPos++;', ' ', ' // and we are outta here', ' if (leftDepth > rightDepth)', ' return leftDepth + 1;', ' else', ' return rightDepth + 1;', ' ', ' }', ' ', ' ', '}', '', 'class AVLTopKMachine <T> implements ITopKMachine <T> {', ' ', ' private int spaceLeft;', ' private ChrisAVLTr...
[{'reason_category': 'Define Stop Criteria', 'usage_line': 396}]
Variable 'checkMe' used at line 396 is defined at line 348 and has a Long-Range dependency. Variable 'startPos' used at line 396 is defined at line 351 and has a Long-Range dependency.
{'Define Stop Criteria': 1}
{'Variable Long-Range': 2}
completion_java
TopKTester
426
429
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' myTree.insert (score, value);', ' spaceLeft--;', ' if (spaceLeft == 0)', ' cutoff = myTree.getBig ();']
[' }', ' ', ' if (spaceLeft < 0) {', ' myTree.removeBig ();', ' cutoff = myTree.getBig ();', ' spaceLeft++;', ' }', ' ', ' ', ' }', ' ', ' public double getCurrentCutoff () {', ' return cutoff; ', ' }', ' ', ' public String toString () {', ' return myTree.print (); ', ' }...
[{'reason_category': 'If Body', 'usage_line': 426}, {'reason_category': 'If Body', 'usage_line': 427}, {'reason_category': 'If Condition', 'usage_line': 428}, {'reason_category': 'If Body', 'usage_line': 428}, {'reason_category': 'If Body', 'usage_line': 429}]
Global_Variable 'myTree' used at line 426 is defined at line 413 and has a Medium-Range dependency. Variable 'score' used at line 426 is defined at line 424 and has a Short-Range dependency. Variable 'value' used at line 426 is defined at line 424 and has a Short-Range dependency. Global_Variable 'spaceLeft' used at li...
{'If Body': 4, 'If Condition': 1}
{'Global_Variable Medium-Range': 5, 'Variable Short-Range': 2}
completion_java
TopKTester
433
435
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' myTree.removeBig ();', ' cutoff = myTree.getBig ();', ' spaceLeft++;']
[' }', ' ', ' ', ' }', ' ', ' public double getCurrentCutoff () {', ' return cutoff; ', ' }', ' ', ' public String toString () {', ' return myTree.print (); ', ' }', ' ', ' public ArrayList <T> getTopK () {', ' return myTree.toList (); ', ' }', ' ', ' ', '}', '', '', '/**', ' * A JUnit t...
[{'reason_category': 'If Body', 'usage_line': 433}, {'reason_category': 'If Body', 'usage_line': 434}, {'reason_category': 'If Body', 'usage_line': 435}]
Global_Variable 'myTree' used at line 433 is defined at line 413 and has a Medium-Range dependency. Global_Variable 'myTree' used at line 434 is defined at line 413 and has a Medium-Range dependency. Global_Variable 'cutoff' used at line 434 is defined at line 429 and has a Short-Range dependency. Global_Variable 'spac...
{'If Body': 3}
{'Global_Variable Medium-Range': 3, 'Global_Variable Short-Range': 1}
completion_java
TopKTester
467
471
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' for (Integer i = 0; i < list.length; i++) {', ' Integer pos = i + shuffler.nextInt (list.length - i);', ' Integer temp = list[i];', ' list[i] = list[pos];', ' list[pos] = temp;']
[' }', ' }', ' ', ' // the first param is the number of inserts to try. The second is k. If the third param is true, ', ' // then we do a random order of inserts. If the third param is false, then we do inserts in order,', ' // and the method expects a fourth boolean param that tells us whether we do reverse ...
[{'reason_category': 'Define Stop Criteria', 'usage_line': 467}, {'reason_category': 'Loop Body', 'usage_line': 468}, {'reason_category': 'Loop Body', 'usage_line': 469}, {'reason_category': 'Loop Body', 'usage_line': 470}, {'reason_category': 'Loop Body', 'usage_line': 471}]
Variable 'i' used at line 467 is defined at line 467 and has a Short-Range dependency. Variable 'list' used at line 467 is defined at line 466 and has a Short-Range dependency. Variable 'i' used at line 468 is defined at line 467 and has a Short-Range dependency. Global_Variable 'shuffler' used at line 468 is defined a...
{'Define Stop Criteria': 1, 'Loop Body': 4}
{'Variable Short-Range': 12, 'Global_Variable Short-Range': 1}
completion_java
TopKTester
492
497
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' for (int i = 0; i < numInserts; i++) {', ' if (reverseOrNot)', ' list[i] = numInserts - 1 - i;', ' else', ' list[i] = i; ', ' }']
[' ', ' // if we are looking for randomness, shuffle the list', ' if (randomOrNot)', ' shuffle (list);', ' ', ' // now add the ints', ' for (int j = 0; j < list.length; j++) {', ' ', ' Integer i = list[j];', ' testMe.insert (i * 1.343432, i);', ' ', ' // if we are not ran...
[{'reason_category': 'Define Stop Criteria', 'usage_line': 492}, {'reason_category': 'Loop Body', 'usage_line': 493}, {'reason_category': 'If Condition', 'usage_line': 493}, {'reason_category': 'If Body', 'usage_line': 494}, {'reason_category': 'Loop Body', 'usage_line': 494}, {'reason_category': 'Else Reasoning', 'usa...
Variable 'i' used at line 492 is defined at line 492 and has a Short-Range dependency. Variable 'numInserts' used at line 492 is defined at line 481 and has a Medium-Range dependency. Variable 'reverseOrNot' used at line 493 is defined at line 487 and has a Short-Range dependency. Variable 'numInserts' used at line 494...
{'Define Stop Criteria': 1, 'Loop Body': 5, 'If Condition': 1, 'If Body': 1, 'Else Reasoning': 2}
{'Variable Short-Range': 6, 'Variable Medium-Range': 2}
completion_java
TopKTester
501
501
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' shuffle (list);']
[' ', ' // now add the ints', ' for (int j = 0; j < list.length; j++) {', ' ', ' Integer i = list[j];', ' testMe.insert (i * 1.343432, i);', ' ', ' // if we are not random, check to see that the cutoff is correct', ' if (!randomOrNot) {', ' ', ' double score = testMe...
[{'reason_category': 'If Body', 'usage_line': 501}]
Function 'shuffle' used at line 501 is defined at line 466 and has a Long-Range dependency. Variable 'list' used at line 501 is defined at line 491 and has a Short-Range dependency.
{'If Body': 1}
{'Function Long-Range': 1, 'Variable Short-Range': 1}
completion_java
TopKTester
529
529
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' assertEquals ("when checking cutoff during in order inserts", (k - 1) * 1.343432, score);']
[' }', ' }', ' }', ' }', ' ', ' // and make sure top k are correct', ' ArrayList <Integer> retVal = testMe.getTopK ();', ' Collections.sort (retVal);', ' ', " // don'e go past the size of the list", ' if (k > numInserts)', ' k = numInserts;', ' ', ' // make sure t...
[{'reason_category': 'Loop Body', 'usage_line': 529}, {'reason_category': 'If Body', 'usage_line': 529}, {'reason_category': 'Else Reasoning', 'usage_line': 529}]
Variable 'k' used at line 529 is defined at line 481 and has a Long-Range dependency. Variable 'score' used at line 529 is defined at line 512 and has a Medium-Range dependency.
{'Loop Body': 1, 'If Body': 1, 'Else Reasoning': 1}
{'Variable Long-Range': 1, 'Variable Medium-Range': 1}
completion_java
TopKTester
541
541
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' k = numInserts;']
[' ', ' // make sure the list is the right size', ' assertEquals (retVal.size (), k);', ' ', ' // and check its contents', ' for (int i = 0; i < k; i++) {', ' assertEquals ("when checking values returned getting top k", i, (int) retVal.get (i));', ' }', ' }', ' ', ' // this checks for balan...
[{'reason_category': 'If Body', 'usage_line': 541}]
Variable 'numInserts' used at line 541 is defined at line 481 and has a Long-Range dependency. Variable 'k' used at line 541 is defined at line 481 and has a Long-Range dependency.
{'If Body': 1}
{'Variable Long-Range': 2}
completion_java
TopKTester
544
544
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' assertEquals (retVal.size (), k);']
[' ', ' // and check its contents', ' for (int i = 0; i < k; i++) {', ' assertEquals ("when checking values returned getting top k", i, (int) retVal.get (i));', ' }', ' }', ' ', ' // this checks for balance.. it does NOT check for the right answer... params ae same as above', ' private void testBal...
[]
Variable 'retVal' used at line 544 is defined at line 536 and has a Short-Range dependency. Variable 'k' used at line 544 is defined at line 541 and has a Short-Range dependency.
{}
{'Variable Short-Range': 2}
completion_java
TopKTester
562
569
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' ITopKMachine <Integer> testMe = new AVLTopKMachine <Integer> (k);', ' Integer [] list = new Integer [numInserts];', ' for (int i = 0; i < numInserts; i++) {', ' if (reverseOrNot)', ' list[i] = numInserts - 1 - i;', ' else', ' list[i] = i; ', ' }']
[' ', ' // if we are looking for randomness, shuffle the list', ' if (randomOrNot)', ' shuffle (list);', ' ', ' // now add the ints', ' for (int j = 0; j < list.length; j++) { ', ' Integer i = list[j];', ' testMe.insert (i * 1.343432, i);', ' ', ' // and check for balance', ' ...
[{'reason_category': 'Define Stop Criteria', 'usage_line': 564}, {'reason_category': 'Loop Body', 'usage_line': 565}, {'reason_category': 'If Condition', 'usage_line': 565}, {'reason_category': 'Loop Body', 'usage_line': 566}, {'reason_category': 'If Body', 'usage_line': 566}, {'reason_category': 'Else Reasoning', 'usa...
Class 'AVLTopKMachine' used at line 562 is defined at line 410 and has a Long-Range dependency. Variable 'k' used at line 562 is defined at line 553 and has a Short-Range dependency. Variable 'numInserts' used at line 563 is defined at line 553 and has a Short-Range dependency. Variable 'i' used at line 564 is defined ...
{'Define Stop Criteria': 1, 'Loop Body': 5, 'If Condition': 1, 'If Body': 1, 'Else Reasoning': 2}
{'Class Long-Range': 1, 'Variable Short-Range': 8, 'Variable Medium-Range': 2}
completion_java
TopKTester
572
573
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' if (randomOrNot)', ' shuffle (list);']
[' ', ' // now add the ints', ' for (int j = 0; j < list.length; j++) { ', ' Integer i = list[j];', ' testMe.insert (i * 1.343432, i);', ' ', ' // and check for balance', ' if (j % 10 == 0) {', ' IsBalanced temp = new IsBalanced ();', ' try {', ' temp.checkHeight...
[{'reason_category': 'If Condition', 'usage_line': 572}, {'reason_category': 'If Loop', 'usage_line': 573}]
Variable 'randomOrNot' used at line 572 is defined at line 557 and has a Medium-Range dependency. Function 'shuffle' used at line 573 is defined at line 466 and has a Long-Range dependency. Variable 'list' used at line 573 is defined at line 563 and has a Short-Range dependency.
{'If Condition': 1}
{'Variable Medium-Range': 1, 'Function Long-Range': 1, 'Variable Short-Range': 1}
completion_java
TopKTester
582
584
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' IsBalanced temp = new IsBalanced ();', ' try {', ' temp.checkHeight (testMe.toString ());']
[' } catch (Exception e) {', ' fail ("the tree was found to not be balanced"); ', ' }', ' }', ' ', ' // check for balance one last time', ' IsBalanced temp = new IsBalanced ();', ' try {', ' temp.checkHeight (testMe.toString ());', ' } catch (Exception e) {', ...
[{'reason_category': 'If Body', 'usage_line': 582}, {'reason_category': 'Loop Body', 'usage_line': 582}, {'reason_category': 'Loop Body', 'usage_line': 583}, {'reason_category': 'If Body', 'usage_line': 583}, {'reason_category': 'Loop Body', 'usage_line': 584}, {'reason_category': 'If Body', 'usage_line': 584}]
Class 'IsBalanced' used at line 582 is defined at line 344 and has a Long-Range dependency. Function 'IsBalanced.checkHeight' used at line 584 is defined at line 348 and has a Long-Range dependency. Function 'AVLTopKMachine.toString' used at line 584 is defined at line 445 and has a Long-Range dependency.
{'If Body': 3, 'Loop Body': 3}
{'Class Long-Range': 1, 'Function Long-Range': 2}
completion_java
TopKTester
593
593
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.util.Collections;', 'import java.util.ArrayList;', '', '// This simple interface allows us to get the top K objects out of a large set', '// (that is, the K objects that are inserted having the **lowest** score vales)', '// The idea is that y...
[' temp.checkHeight (testMe.toString ());']
[' } catch (Exception e) {', ' fail ("the tree was found to not be balanced"); ', ' }', ' } ', '', ' }', ' ', ' ', ' /**', ' * A test method.', ' * (Replace "X" with a name describing the test. You may write as', ' * many "testSomething" methods in this class as you wish, and each', ...
[{'reason_category': 'Loop Body', 'usage_line': 593}]
Function 'IsBalanced.checkHeight' used at line 593 is defined at line 348 and has a Long-Range dependency. Function 'AVLTopKMachine.toString' used at line 593 is defined at line 445 and has a Long-Range dependency.
{'Loop Body': 1}
{'Function Long-Range': 2}
completion_java
SparseArrayTester
16
16
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' int getIndex();']
['', ' /**', ' * Get data.', ' *', ' * @return data element', ' */', ' T getData();', '}', '', 'interface ISparseArray<T> extends Iterable<IIndexedData<T>> {', ' /**', ' * Add element to the array at position.', ' * ', ' * @param position position in the array', ' * @param element dat...
[]
null
{}
null
completion_java
SparseArrayTester
23
23
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' T getData();']
['}', '', 'interface ISparseArray<T> extends Iterable<IIndexedData<T>> {', ' /**', ' * Add element to the array at position.', ' * ', ' * @param position position in the array', ' * @param element data to place in the array', ' */', ' void put (int position, T element);', '', ' /**', ' ...
[]
null
{}
null
completion_java
SparseArrayTester
33
33
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' void put (int position, T element);']
['', ' /**', ' * Get element at the given position.', ' *', ' * @param position position in the array', ' * @return element at that position or null if there is none', ' */', ' T get (int position);', '', ' /**', ' * Create an iterator over the array.', ' *', ' * @retu...
[]
null
{}
null
completion_java
SparseArrayTester
41
41
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' T get (int position);']
['', ' /**', ' * Create an iterator over the array.', ' *', ' * @return an iterator over the sparse array', ' */', ' Iterator<IIndexedData<T>> iterator ();', '}', '', 'class LinearIndexedIterator<T> implements Iterator<IIndexedData<T>> {', ' private int curIdx;', ' private int numElements;'...
[]
null
{}
null
completion_java
SparseArrayTester
48
48
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' Iterator<IIndexedData<T>> iterator ();']
['}', '', 'class LinearIndexedIterator<T> implements Iterator<IIndexedData<T>> {', ' private int curIdx;', ' private int numElements;', ' private int [] indices;', ' private Vector<T> data;', '', ' public LinearIndexedIterator (int [] indices, Vector<T> data, int numElements) {', ' this.curIdx = -...
[]
null
{}
null
completion_java
SparseArrayTester
65
65
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' return (curIdx+1) < numElements;']
[' }', '', ' public IndexedData<T> next() {', ' curIdx++;', ' return new IndexedData<T> (indices[curIdx], data.get(curIdx));', ' }', ' ', ' public void remove() throws UnsupportedOperationException {', ' throw new UnsupportedOperationException();', ' }', '}', '', 'class LinearSpar...
[]
Global_Variable 'curIdx' used at line 65 is defined at line 52 and has a Medium-Range dependency. Global_Variable 'numElements' used at line 65 is defined at line 53 and has a Medium-Range dependency.
{}
{'Global_Variable Medium-Range': 2}
completion_java
SparseArrayTester
88
89
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' for (int i = 0; i < numElements; i++) {', ' temp[i] = indices[i]; ']
[' }', ' indices = temp;', ' lastSlot *= 2;', ' }', ' ', ' public LinearIndexedIterator<T> iterator () {', ' return new LinearIndexedIterator<T> (indices, data, numElements);', ' }', ' ', ' public LinearSparseArray(int initialSize) {', ' indices = new int[initialSize];', ' data = new Vector<...
[{'reason_category': 'Define Stop Criteria', 'usage_line': 88}, {'reason_category': 'Loop Body', 'usage_line': 89}]
Variable 'i' used at line 88 is defined at line 88 and has a Short-Range dependency. Global_Variable 'numElements' used at line 88 is defined at line 81 and has a Short-Range dependency. Global_Variable 'indices' used at line 89 is defined at line 79 and has a Short-Range dependency. Variable 'i' used at line 89 is def...
{'Define Stop Criteria': 1, 'Loop Body': 1}
{'Variable Short-Range': 3, 'Global_Variable Short-Range': 2}
completion_java
SparseArrayTester
91
92
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' indices = temp;', ' lastSlot *= 2;']
[' }', ' ', ' public LinearIndexedIterator<T> iterator () {', ' return new LinearIndexedIterator<T> (indices, data, numElements);', ' }', ' ', ' public LinearSparseArray(int initialSize) {', ' indices = new int[initialSize];', ' data = new Vector<T> (initialSize);', ' numElements = 0;', ' ...
[]
Variable 'temp' used at line 91 is defined at line 87 and has a Short-Range dependency. Global_Variable 'indices' used at line 91 is defined at line 79 and has a Medium-Range dependency. Global_Variable 'lastSlot' used at line 92 is defined at line 82 and has a Short-Range dependency.
{}
{'Variable Short-Range': 1, 'Global_Variable Medium-Range': 1, 'Global_Variable Short-Range': 1}
completion_java
SparseArrayTester
111
112
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' data.add (element);', ' indices[numElements] = position;']
[' ', " // if the one ew are adding is not the largest, can't just append", ' } else {', '', ' // first check to see if we have data at that position', ' for (int i = 0; i < numElements; i++) {', ' if (indices[i] == position) {', ' data.setElementAt (element, i);', ' return;'...
[{'reason_category': 'If Body', 'usage_line': 111}, {'reason_category': 'If Body', 'usage_line': 112}]
Global_Variable 'data' used at line 111 is defined at line 80 and has a Long-Range dependency. Variable 'element' used at line 111 is defined at line 107 and has a Short-Range dependency. Variable 'position' used at line 112 is defined at line 107 and has a Short-Range dependency. Global_Variable 'indices' used at line...
{'If Body': 2}
{'Global_Variable Long-Range': 3, 'Variable Short-Range': 2}
completion_java
SparseArrayTester
118
123
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' for (int i = 0; i < numElements; i++) {', ' if (indices[i] == position) {', ' data.setElementAt (element, i);', ' return;', ' }', ' }']
[' ', ' // if we made it here, there is no data at the position', ' int pos;', ' for (pos = numElements; pos > 0 && indices[pos - 1] > position; pos--) {', ' indices[pos] = indices[pos - 1];', ' }', ' indices[pos] = position;', ' data.add (pos, element);', ' }', ' ', ' ...
[{'reason_category': 'Else Reasoning', 'usage_line': 118}, {'reason_category': 'Define Stop Criteria', 'usage_line': 118}, {'reason_category': 'Else Reasoning', 'usage_line': 119}, {'reason_category': 'Loop Body', 'usage_line': 119}, {'reason_category': 'If Condition', 'usage_line': 119}, {'reason_category': 'Else Reas...
Variable 'i' used at line 118 is defined at line 118 and has a Short-Range dependency. Global_Variable 'numElements' used at line 118 is defined at line 81 and has a Long-Range dependency. Global_Variable 'indices' used at line 119 is defined at line 112 and has a Short-Range dependency. Variable 'i' used at line 119 i...
{'Else Reasoning': 6, 'Define Stop Criteria': 1, 'Loop Body': 5, 'If Condition': 1, 'If Body': 3}
{'Variable Short-Range': 3, 'Global_Variable Long-Range': 2, 'Global_Variable Short-Range': 1, 'Variable Medium-Range': 2}
completion_java
SparseArrayTester
119
122
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' if (indices[i] == position) {', ' data.setElementAt (element, i);', ' return;', ' }']
[' }', ' ', ' // if we made it here, there is no data at the position', ' int pos;', ' for (pos = numElements; pos > 0 && indices[pos - 1] > position; pos--) {', ' indices[pos] = indices[pos - 1];', ' }', ' indices[pos] = position;', ' data.add (pos, element);', ' }', '...
[{'reason_category': 'Else Reasoning', 'usage_line': 119}, {'reason_category': 'Loop Body', 'usage_line': 119}, {'reason_category': 'If Condition', 'usage_line': 119}, {'reason_category': 'Else Reasoning', 'usage_line': 120}, {'reason_category': 'Loop Body', 'usage_line': 120}, {'reason_category': 'If Body', 'usage_lin...
Global_Variable 'indices' used at line 119 is defined at line 112 and has a Short-Range dependency. Variable 'i' used at line 119 is defined at line 118 and has a Short-Range dependency. Variable 'position' used at line 119 is defined at line 107 and has a Medium-Range dependency. Global_Variable 'data' used at line 12...
{'Else Reasoning': 4, 'Loop Body': 4, 'If Condition': 1, 'If Body': 3}
{'Global_Variable Short-Range': 1, 'Variable Short-Range': 2, 'Variable Medium-Range': 2, 'Global_Variable Long-Range': 1}
completion_java
SparseArrayTester
120
120
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' data.setElementAt (element, i);']
[' return;', ' }', ' }', ' ', ' // if we made it here, there is no data at the position', ' int pos;', ' for (pos = numElements; pos > 0 && indices[pos - 1] > position; pos--) {', ' indices[pos] = indices[pos - 1];', ' }', ' indices[pos] = position;', ' dat...
[{'reason_category': 'Else Reasoning', 'usage_line': 120}, {'reason_category': 'Loop Body', 'usage_line': 120}, {'reason_category': 'If Body', 'usage_line': 120}]
Global_Variable 'data' used at line 120 is defined at line 80 and has a Long-Range dependency. Variable 'element' used at line 120 is defined at line 107 and has a Medium-Range dependency. Variable 'i' used at line 120 is defined at line 118 and has a Short-Range dependency.
{'Else Reasoning': 1, 'Loop Body': 1, 'If Body': 1}
{'Global_Variable Long-Range': 1, 'Variable Medium-Range': 1, 'Variable Short-Range': 1}
completion_java
SparseArrayTester
128
128
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' indices[pos] = indices[pos - 1];']
[' }', ' indices[pos] = position;', ' data.add (pos, element);', ' }', ' ', ' numElements++;', ' if (numElements == lastSlot) ', ' doubleCapacity ();', ' }', '', ' public T get (int position) {', '', ' // first we find an index value that is less than or equal to the position we wan...
[{'reason_category': 'Else Reasoning', 'usage_line': 128}, {'reason_category': 'Loop Body', 'usage_line': 128}]
Global_Variable 'indices' used at line 128 is defined at line 112 and has a Medium-Range dependency. Variable 'pos' used at line 128 is defined at line 127 and has a Short-Range dependency.
{'Else Reasoning': 1, 'Loop Body': 1}
{'Global_Variable Medium-Range': 1, 'Variable Short-Range': 1}
completion_java
SparseArrayTester
130
130
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' indices[pos] = position;']
[' data.add (pos, element);', ' }', ' ', ' numElements++;', ' if (numElements == lastSlot) ', ' doubleCapacity ();', ' }', '', ' public T get (int position) {', '', ' // first we find an index value that is less than or equal to the position we want', ' for (; lastSlotReturned >= 0 && indi...
[{'reason_category': 'Else Reasoning', 'usage_line': 130}]
Variable 'position' used at line 130 is defined at line 107 and has a Medium-Range dependency. Global_Variable 'indices' used at line 130 is defined at line 112 and has a Medium-Range dependency. Variable 'pos' used at line 130 is defined at line 126 and has a Short-Range dependency.
{'Else Reasoning': 1}
{'Variable Medium-Range': 1, 'Global_Variable Medium-Range': 1, 'Variable Short-Range': 1}
completion_java
SparseArrayTester
131
131
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' data.add (pos, element);']
[' }', ' ', ' numElements++;', ' if (numElements == lastSlot) ', ' doubleCapacity ();', ' }', '', ' public T get (int position) {', '', ' // first we find an index value that is less than or equal to the position we want', ' for (; lastSlotReturned >= 0 && indices[lastSlotReturned] >= position;...
[{'reason_category': 'Else Reasoning', 'usage_line': 131}]
Global_Variable 'data' used at line 131 is defined at line 80 and has a Long-Range dependency. Variable 'pos' used at line 131 is defined at line 126 and has a Short-Range dependency. Variable 'element' used at line 131 is defined at line 107 and has a Medium-Range dependency.
{'Else Reasoning': 1}
{'Global_Variable Long-Range': 1, 'Variable Short-Range': 1, 'Variable Medium-Range': 1}
completion_java
SparseArrayTester
130
131
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' indices[pos] = position;', ' data.add (pos, element);']
[' }', ' ', ' numElements++;', ' if (numElements == lastSlot) ', ' doubleCapacity ();', ' }', '', ' public T get (int position) {', '', ' // first we find an index value that is less than or equal to the position we want', ' for (; lastSlotReturned >= 0 && indices[lastSlotReturned] >= position;...
[{'reason_category': 'Else Reasoning', 'usage_line': 130}, {'reason_category': 'Else Reasoning', 'usage_line': 131}]
Variable 'position' used at line 130 is defined at line 107 and has a Medium-Range dependency. Global_Variable 'indices' used at line 130 is defined at line 112 and has a Medium-Range dependency. Variable 'pos' used at line 130 is defined at line 126 and has a Short-Range dependency. Global_Variable 'data' used at line...
{'Else Reasoning': 2}
{'Variable Medium-Range': 2, 'Global_Variable Medium-Range': 1, 'Variable Short-Range': 2, 'Global_Variable Long-Range': 1}
completion_java
SparseArrayTester
136
136
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' doubleCapacity ();']
[' }', '', ' public T get (int position) {', '', ' // first we find an index value that is less than or equal to the position we want', ' for (; lastSlotReturned >= 0 && indices[lastSlotReturned] >= position; lastSlotReturned--);', ' ', ' // now we go up, and find the first one that is bigger than what we w...
[{'reason_category': 'If Body', 'usage_line': 136}]
Function 'doubleCapacity' used at line 136 is defined at line 85 and has a Long-Range dependency.
{'If Body': 1}
{'Function Long-Range': 1}
completion_java
SparseArrayTester
142
142
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' for (; lastSlotReturned >= 0 && indices[lastSlotReturned] >= position; lastSlotReturned--);']
[' ', ' // now we go up, and find the first one that is bigger than what we want', ' for (; lastSlotReturned + 1 < numElements && indices[lastSlotReturned + 1] <= position; lastSlotReturned++);', ' ', ' // now there are three cases... if we are at position -1, then we have a very small guy', ' if (lastSlo...
[{'reason_category': 'Define Stop Criteria', 'usage_line': 142}]
Global_Variable 'lastSlotReturned' used at line 142 is defined at line 83 and has a Long-Range dependency. Global_Variable 'indices' used at line 142 is defined at line 79 and has a Long-Range dependency. Variable 'position' used at line 142 is defined at line 139 and has a Short-Range dependency.
{'Define Stop Criteria': 1}
{'Global_Variable Long-Range': 2, 'Variable Short-Range': 1}
completion_java
SparseArrayTester
145
145
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' for (; lastSlotReturned + 1 < numElements && indices[lastSlotReturned + 1] <= position; lastSlotReturned++);']
[' ', ' // now there are three cases... if we are at position -1, then we have a very small guy', ' if (lastSlotReturned == -1)', ' return null;', ' ', " // if the guy where we are is less than what we want, we didn't find it", ' if (indices[lastSlotReturned] != position)', ' return null;', ' '...
[{'reason_category': 'Define Stop Criteria', 'usage_line': 145}]
Global_Variable 'lastSlotReturned' used at line 145 is defined at line 83 and has a Long-Range dependency. Global_Variable 'numElements' used at line 145 is defined at line 81 and has a Long-Range dependency. Global_Variable 'indices' used at line 145 is defined at line 79 and has a Long-Range dependency. Variable 'pos...
{'Define Stop Criteria': 1}
{'Global_Variable Long-Range': 3, 'Variable Short-Range': 1}
completion_java
SparseArrayTester
148
148
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' if (lastSlotReturned == -1)']
[' return null;', ' ', " // if the guy where we are is less than what we want, we didn't find it", ' if (indices[lastSlotReturned] != position)', ' return null;', ' ', ' // otherwise, we got it!', ' return data.get(lastSlotReturned);', ' }', '}', '', 'class TreeSparseArray<T> implements ISparse...
[{'reason_category': 'If Condition', 'usage_line': 148}]
Global_Variable 'lastSlotReturned' used at line 148 is defined at line 83 and has a Long-Range dependency.
{'If Condition': 1}
{'Global_Variable Long-Range': 1}
completion_java
SparseArrayTester
152
152
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' if (indices[lastSlotReturned] != position)']
[' return null;', ' ', ' // otherwise, we got it!', ' return data.get(lastSlotReturned);', ' }', '}', '', 'class TreeSparseArray<T> implements ISparseArray<T> {', ' private TreeMap<Integer, T> array;', '', ' public TreeSparseArray() {', ' array = new TreeMap<Integer, T>();', ' }', '', ' public voi...
[{'reason_category': 'If Condition', 'usage_line': 152}]
Global_Variable 'indices' used at line 152 is defined at line 79 and has a Long-Range dependency. Global_Variable 'lastSlotReturned' used at line 152 is defined at line 83 and has a Long-Range dependency. Variable 'position' used at line 152 is defined at line 139 and has a Medium-Range dependency.
{'If Condition': 1}
{'Global_Variable Long-Range': 2, 'Variable Medium-Range': 1}
completion_java
SparseArrayTester
156
156
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' return data.get(lastSlotReturned);']
[' }', '}', '', 'class TreeSparseArray<T> implements ISparseArray<T> {', ' private TreeMap<Integer, T> array;', '', ' public TreeSparseArray() {', ' array = new TreeMap<Integer, T>();', ' }', '', ' public void put (int position, T element) {', ' array.put(position, element);', ' }', '', ' public T get ...
[]
Global_Variable 'data' used at line 156 is defined at line 80 and has a Long-Range dependency. Global_Variable 'lastSlotReturned' used at line 156 is defined at line 83 and has a Long-Range dependency.
{}
{'Global_Variable Long-Range': 2}
completion_java
SparseArrayTester
168
168
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' array.put(position, element);']
[' }', '', ' public T get (int position) {', ' return array.get(position);', ' }', '', ' public IndexedIterator<T> iterator () {', ' return new IndexedIterator<T> (array);', ' }', '}', '', '/**', ' * A JUnit test case class.', ' * Every method starting with the word "test" will be called when running', '...
[]
Global_Variable 'array' used at line 168 is defined at line 161 and has a Short-Range dependency. Variable 'position' used at line 168 is defined at line 167 and has a Short-Range dependency. Variable 'element' used at line 168 is defined at line 167 and has a Short-Range dependency.
{}
{'Global_Variable Short-Range': 1, 'Variable Short-Range': 2}
completion_java
SparseArrayTester
172
172
['import junit.framework.TestCase;', 'import java.util.Calendar;', 'import java.util.*;', '', '', '/**', ' * An interface to an indexed element with an integer index into its', ' * enclosing container and data of parameterized type T.', ' */', 'interface IIndexedData<T> {', ' /**', ' * Get index of this item.', ' ...
[' return array.get(position);']
[' }', '', ' public IndexedIterator<T> iterator () {', ' return new IndexedIterator<T> (array);', ' }', '}', '', '/**', ' * A JUnit test case class.', ' * Every method starting with the word "test" will be called when running', ' * the test with JUnit.', ' */', 'public class SparseArrayTester extends TestCase {...
[]
Global_Variable 'array' used at line 172 is defined at line 161 and has a Medium-Range dependency. Variable 'position' used at line 172 is defined at line 171 and has a Short-Range dependency.
{}
{'Global_Variable Medium-Range': 1, 'Variable Short-Range': 1}
completion_java
DoubleVectorTester
32
42
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' for (int i = 0; i < getLength (); i++) {', ' Double curItem = getItem (i);', ' // If the current index is not 0, add a comma and a space to the string', ' if (i != 0)', ' returnVal = returnVal + ", ";', ' // Add the string representation of the current item to the string', '...
[' } catch (OutOfBoundsException e) {', ' ', ' System.out.println ("This is strange. getLength() seems to be incorrect?");', ' return new String ("<>");', ' }', ' }', ' ', ' public long getRoundedItem (int whichOne) throws OutOfBoundsException {', ' return Math.round (getItem (whichOne)); ...
[{'reason_category': 'Define Stop Criteria', 'usage_line': 32}, {'reason_category': 'Loop Body', 'usage_line': 33}, {'reason_category': 'Loop Body', 'usage_line': 34}, {'reason_category': 'If Condition', 'usage_line': 35}, {'reason_category': 'Loop Body', 'usage_line': 35}, {'reason_category': 'If Body', 'usage_line': ...
Variable 'i' used at line 32 is defined at line 32 and has a Short-Range dependency. Function 'getLength' used at line 32 is defined at line 20 and has a Medium-Range dependency. Function 'getItem' used at line 33 is defined at line 18 and has a Medium-Range dependency. Variable 'i' used at line 33 is defined at line 3...
{'Define Stop Criteria': 1, 'Loop Body': 6, 'If Condition': 1, 'If Body': 1}
{'Variable Short-Range': 8, 'Function Medium-Range': 2}
completion_java
DoubleVectorTester
35
36
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' if (i != 0)', ' returnVal = returnVal + ", ";']
[' // Add the string representation of the current item to the string', ' returnVal = returnVal + curItem.toString (); ', ' }', ' returnVal = returnVal + ">";', ' return returnVal;', ' ', ' } catch (OutOfBoundsException e) {', ' ', ' System.out.println ("This is strange. ge...
[{'reason_category': 'If Condition', 'usage_line': 35}, {'reason_category': 'Loop Body', 'usage_line': 35}, {'reason_category': 'If Body', 'usage_line': 36}, {'reason_category': 'Loop Body', 'usage_line': 36}]
Variable 'i' used at line 35 is defined at line 32 and has a Short-Range dependency. Variable 'returnVal' used at line 36 is defined at line 31 and has a Short-Range dependency.
{'If Condition': 1, 'Loop Body': 2, 'If Body': 1}
{'Variable Short-Range': 2}
completion_java
DoubleVectorTester
38
38
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' returnVal = returnVal + curItem.toString (); ']
[' }', ' returnVal = returnVal + ">";', ' return returnVal;', ' ', ' } catch (OutOfBoundsException e) {', ' ', ' System.out.println ("This is strange. getLength() seems to be incorrect?");', ' return new String ("<>");', ' }', ' }', ' ', ' public long getRoundedItem (int which...
[{'reason_category': 'Loop Body', 'usage_line': 38}]
Variable 'returnVal' used at line 38 is defined at line 36 and has a Short-Range dependency. Variable 'curItem' used at line 38 is defined at line 33 and has a Short-Range dependency.
{'Loop Body': 1}
{'Variable Short-Range': 2}
completion_java
DoubleVectorTester
51
51
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' return Math.round (getItem (whichOne)); ']
[' }', '}', '', '', '/**', ' * This is the interface for a vector of double-precision floating point values.', ' */', 'interface IDoubleVector {', ' ', ' /** ', ' * Adds the contents of this double vector to the other one. ', ' * Will throw OutOfBoundsException if the two vectors', " * don't have exactly the ...
[]
Library 'Math' used at line 51 is defined at line 3 and has a Long-Range dependency. Function 'getItem' used at line 51 is defined at line 18 and has a Long-Range dependency. Variable 'whichOne' used at line 51 is defined at line 50 and has a Short-Range dependency.
{}
{'Library Long-Range': 1, 'Function Long-Range': 1, 'Variable Short-Range': 1}
completion_java
DoubleVectorTester
219
221
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' for (int i = 0; i < len; i++) {', ' myData[i] = 0.0;', ' }']
[' ', ' // the baseline data is set to the initial value', ' baselineData = initialValue;', ' }', ' ', ' public int getLength () {', ' return myData.length;', ' }', ' ', ' /*', ' * Method that calculates the L1 norm of the DoubleVector. ', ' */', ' public double l1Norm () {', ' double returnVa...
[{'reason_category': 'Define Stop Criteria', 'usage_line': 219}, {'reason_category': 'Loop Body', 'usage_line': 220}, {'reason_category': 'Loop Body', 'usage_line': 221}]
Variable 'i' used at line 219 is defined at line 219 and has a Short-Range dependency. Variable 'len' used at line 219 is defined at line 213 and has a Short-Range dependency. Global_Variable 'myData' used at line 220 is defined at line 216 and has a Short-Range dependency. Variable 'i' used at line 220 is defined at l...
{'Define Stop Criteria': 1, 'Loop Body': 2}
{'Variable Short-Range': 3, 'Global_Variable Short-Range': 1}
completion_java
DoubleVectorTester
224
224
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' baselineData = initialValue;']
[' }', ' ', ' public int getLength () {', ' return myData.length;', ' }', ' ', ' /*', ' * Method that calculates the L1 norm of the DoubleVector. ', ' */', ' public double l1Norm () {', ' double returnVal = 0.0;', ' for (int i = 0; i < myData.length; i++) {', ' returnVal += Math.abs (myData[i] ...
[]
Variable 'initialValue' used at line 224 is defined at line 213 and has a Medium-Range dependency. Global_Variable 'baselineData' used at line 224 is defined at line 204 and has a Medium-Range dependency.
{}
{'Variable Medium-Range': 1, 'Global_Variable Medium-Range': 1}
completion_java
DoubleVectorTester
237
237
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' returnVal += Math.abs (myData[i] + baselineData);']
[' }', ' return returnVal;', ' }', ' ', ' public void normalize () {', ' double total = l1Norm ();', ' for (int i = 0; i < myData.length; i++) {', ' double trueVal = myData[i];', ' trueVal += baselineData;', ' myData[i] = trueVal / total - baselineData / total;', ' }', ' baselineDat...
[{'reason_category': 'Loop Body', 'usage_line': 237}]
Library 'Math' used at line 237 is defined at line 3 and has a Long-Range dependency. Global_Variable 'myData' used at line 237 is defined at line 200 and has a Long-Range dependency. Variable 'i' used at line 237 is defined at line 236 and has a Short-Range dependency. Global_Variable 'baselineData' used at line 237 i...
{'Loop Body': 1}
{'Library Long-Range': 1, 'Global_Variable Long-Range': 2, 'Variable Short-Range': 2}
completion_java
DoubleVectorTester
245
247
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' double trueVal = myData[i];', ' trueVal += baselineData;', ' myData[i] = trueVal / total - baselineData / total;']
[' }', ' baselineData /= total;', ' }', ' ', ' public void addMyselfToHim (IDoubleVector addToThisOne) throws OutOfBoundsException {', '', ' if (getLength() != addToThisOne.getLength()) {', ' throw new OutOfBoundsException("vectors are different sizes");', ' }', ' ', ' // easy... just do the e...
[{'reason_category': 'Loop Body', 'usage_line': 245}, {'reason_category': 'Loop Body', 'usage_line': 246}, {'reason_category': 'Loop Body', 'usage_line': 247}]
Global_Variable 'myData' used at line 245 is defined at line 200 and has a Long-Range dependency. Variable 'i' used at line 245 is defined at line 244 and has a Short-Range dependency. Global_Variable 'baselineData' used at line 246 is defined at line 204 and has a Long-Range dependency. Variable 'trueVal' used at line...
{'Loop Body': 3}
{'Global_Variable Long-Range': 4, 'Variable Short-Range': 5}
completion_java
DoubleVectorTester
249
249
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' baselineData /= total;']
[' }', ' ', ' public void addMyselfToHim (IDoubleVector addToThisOne) throws OutOfBoundsException {', '', ' if (getLength() != addToThisOne.getLength()) {', ' throw new OutOfBoundsException("vectors are different sizes");', ' }', ' ', ' // easy... just do the element-by-element addition', ' for (...
[]
Variable 'total' used at line 249 is defined at line 243 and has a Short-Range dependency. Global_Variable 'baselineData' used at line 249 is defined at line 204 and has a Long-Range dependency.
{}
{'Variable Short-Range': 1, 'Global_Variable Long-Range': 1}
completion_java
DoubleVectorTester
260
263
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' double value = addToThisOne.getItem (i);', ' value += myData[i];', ' addToThisOne.setItem (i, value);', ' }']
[' addToThisOne.addToAll (baselineData);', ' }', ' ', ' public double getItem (int whichOne) throws OutOfBoundsException {', ' ', ' if (whichOne >= myData.length) { ', ' throw new OutOfBoundsException ("index too large in getItem");', ' }', ' ', ' return myData[whichOne] + baselineData;',...
[{'reason_category': 'Loop Body', 'usage_line': 260}, {'reason_category': 'Loop Body', 'usage_line': 261}, {'reason_category': 'Loop Body', 'usage_line': 262}, {'reason_category': 'Loop Body', 'usage_line': 263}]
Variable 'addToThisOne' used at line 260 is defined at line 252 and has a Short-Range dependency. Variable 'i' used at line 260 is defined at line 259 and has a Short-Range dependency. Global_Variable 'myData' used at line 261 is defined at line 200 and has a Long-Range dependency. Variable 'i' used at line 261 is defi...
{'Loop Body': 4}
{'Variable Short-Range': 7, 'Global_Variable Long-Range': 1}
completion_java
DoubleVectorTester
273
273
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' return myData[whichOne] + baselineData;']
[' }', ' ', ' public void setItem (int whichOne, double setToMe) throws OutOfBoundsException {', ' ', ' if (whichOne >= myData.length) {', ' throw new OutOfBoundsException ("index too large in setItem");', ' } ', '', ' myData[whichOne] = setToMe - baselineData;', ' }', ' ', ' public void addTo...
[]
Global_Variable 'myData' used at line 273 is defined at line 200 and has a Long-Range dependency. Variable 'whichOne' used at line 273 is defined at line 267 and has a Short-Range dependency. Global_Variable 'baselineData' used at line 273 is defined at line 204 and has a Long-Range dependency.
{}
{'Global_Variable Long-Range': 2, 'Variable Short-Range': 1}
completion_java
DoubleVectorTester
279
279
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' throw new OutOfBoundsException ("index too large in setItem");']
[' } ', '', ' myData[whichOne] = setToMe - baselineData;', ' }', ' ', ' public void addToAll (double addMe) {', ' baselineData += addMe;', ' }', ' ', '}', '', '', '/**', ' * Implementation of the DoubleVector that uses a sparse representation (that is,', ' * not all of the entries in the vector are exp...
[{'reason_category': 'If Body', 'usage_line': 279}]
Class 'OutOfBoundsException' used at line 279 is defined at line 184 and has a Long-Range dependency.
{'If Body': 1}
{'Class Long-Range': 1}
completion_java
DoubleVectorTester
282
282
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' myData[whichOne] = setToMe - baselineData;']
[' }', ' ', ' public void addToAll (double addMe) {', ' baselineData += addMe;', ' }', ' ', '}', '', '', '/**', ' * Implementation of the DoubleVector that uses a sparse representation (that is,', ' * not all of the entries in the vector are explicitly represented). All non-default', ' * entires in the vector ...
[]
Variable 'setToMe' used at line 282 is defined at line 276 and has a Short-Range dependency. Global_Variable 'baselineData' used at line 282 is defined at line 204 and has a Long-Range dependency. Global_Variable 'myData' used at line 282 is defined at line 200 and has a Long-Range dependency. Variable 'whichOne' used ...
{}
{'Variable Short-Range': 2, 'Global_Variable Long-Range': 2}
completion_java
DoubleVectorTester
286
286
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' baselineData += addMe;']
[' }', ' ', '}', '', '', '/**', ' * Implementation of the DoubleVector that uses a sparse representation (that is,', ' * not all of the entries in the vector are explicitly represented). All non-default', ' * entires in the vector are stored in a HashMap.', ' */', 'class SparseDoubleVector extends ADoubleVector {', ...
[]
Variable 'addMe' used at line 286 is defined at line 285 and has a Short-Range dependency. Global_Variable 'baselineData' used at line 286 is defined at line 204 and has a Long-Range dependency.
{}
{'Variable Short-Range': 1, 'Global_Variable Long-Range': 1}
completion_java
DoubleVectorTester
329
330
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' double newValue = (value + baselineValue) / total;', ' value = newValue - (baselineValue / total);']
[' nonEmptyEntries.put(position, value);', ' }', ' ', ' baselineValue /= total;', ' }', ' ', ' public double l1Norm () {', ' ', ' // iterate through all of the values', ' double returnVal = 0.0;', ' int nonEmptyEls = 0;', ' for (IIndexedData<Double> el : nonEmptyEntries) {', ' retur...
[{'reason_category': 'Loop Body', 'usage_line': 329}, {'reason_category': 'Loop Body', 'usage_line': 330}]
Variable 'value' used at line 329 is defined at line 327 and has a Short-Range dependency. Global_Variable 'baselineValue' used at line 329 is defined at line 304 and has a Medium-Range dependency. Variable 'total' used at line 329 is defined at line 325 and has a Short-Range dependency. Variable 'newValue' used at lin...
{'Loop Body': 2}
{'Variable Short-Range': 5, 'Global_Variable Medium-Range': 2}
completion_java
DoubleVectorTester
334
334
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' baselineValue /= total;']
[' }', ' ', ' public double l1Norm () {', ' ', ' // iterate through all of the values', ' double returnVal = 0.0;', ' int nonEmptyEls = 0;', ' for (IIndexedData<Double> el : nonEmptyEntries) {', ' returnVal += Math.abs (el.getData() + baselineValue);', ' nonEmptyEls += 1;', ' }', ' ', ...
[]
Variable 'total' used at line 334 is defined at line 325 and has a Short-Range dependency. Global_Variable 'baselineValue' used at line 334 is defined at line 304 and has a Medium-Range dependency.
{}
{'Variable Short-Range': 1, 'Global_Variable Medium-Range': 1}
completion_java
DoubleVectorTester
343
345
['import junit.framework.TestCase;', 'import java.util.Random;', 'import java.lang.Math;', 'import java.util.*;', '', '/**', ' * This abstract class serves as the basis from which all of the DoubleVector', ' * implementations should be extended. Most of the methods are abstract, but', ' * this class does provide imple...
[' returnVal += Math.abs (el.getData() + baselineValue);', ' nonEmptyEls += 1;', ' }']
[' ', ' // and add in the total for everyone who is not explicitly represented', ' returnVal += Math.abs ((myLength - nonEmptyEls) * baselineValue);', ' return returnVal;', ' }', ' ', ' public void addMyselfToHim (IDoubleVector addToHim) throws OutOfBoundsException {', ' // make sure that the two vect...
[{'reason_category': 'Loop Body', 'usage_line': 343}, {'reason_category': 'Loop Body', 'usage_line': 344}, {'reason_category': 'Loop Body', 'usage_line': 345}]
Library 'Math' used at line 343 is defined at line 3 and has a Long-Range dependency. Variable 'el' used at line 343 is defined at line 342 and has a Short-Range dependency. Global_Variable 'baselineValue' used at line 343 is defined at line 304 and has a Long-Range dependency. Variable 'returnVal' used at line 343 is ...
{'Loop Body': 3}
{'Library Long-Range': 1, 'Variable Short-Range': 3, 'Global_Variable Long-Range': 1}