    [Image] or [Truncated image[            Bcol      Ecol
L1
    [// Copied from https://github.com/[    1         49
    [\n]                                    49        50
L2
    [package]                               1         8
    [net]                                   9         12
    [.]                                     12        13
    [sourceforge]                           13        24
    [.]                                     24        25
    [pmd]                                   25        28
    [.]                                     28        29
    [cpd]                                   29        32
    [\n]                                    32        33
L3
    [/**\n * User: Eric\n * Date: 4/30/[    1         4
L6
    [\n]                                    4         5
L7
    [class]                                 1         6
    [BTree]                                 7         12
    [<]                                     12        13
    [K]                                     13        14
    [,]                                     14        15
    [V]                                     16        17
    [>]                                     17        18
    [extends]                               19        26
    [BTreeNode]                             27        36
    [<]                                     36        37
    [K]                                     37        38
    [>]                                     38        39
    [{]                                     40        41
    [\n]                                    41        42
L8
    [\n]                                    1         2
L9
    [static]                                2         8
    [def]                                   9         12
    [instance]                              13        21
    [\n]                                    21        22
L10
    [\n]                                    1         2
L11
    [BlockManager]                          2         14
    [<]                                     14        15
    [V]                                     15        16
    [>]                                     16        17
    [manager]                               18        25
    [\n]                                    25        26
L12
    [\n]                                    1         2
L13
    [BTree]                                 2         7
    [(]                                     7         8
    [)]                                     8         9
    [{]                                     10        11
    [\n]                                    11        12
L14
    [instance]                              3         11
    [=]                                     12        13
    [this]                                  14        18
    [\n]                                    18        19
L15
    [getLeaf]                               3         10
    [(]                                     10        11
    [this]                                  11        15
    [)]                                     15        16
    [\n]                                    16        17
L16
    [manager]                               3         10
    [=]                                     11        12
    [new]                                   13        16
    [BlockManager]                          17        29
    [<]                                     29        30
    [>]                                     30        31
    [(]                                     31        32
    [)]                                     32        33
    [\n]                                    33        34
L17
    [}]                                     2         3
    [\n]                                    3         4
L18
    [\n]                                    1         2
L19
    [def]                                   2         5
    [split]                                 6         11
    [(]                                     11        12
    [)]                                     12        13
    [{]                                     14        15
    [\n]                                    15        16
L20
    [\n]                                    1         2
L21
    [// create two new children]            3         29
    [\n]                                    29        30
L22
    [BTreeNode]                             3         12
    [<]                                     12        13
    [K]                                     13        14
    [>]                                     14        15
    [left]                                  16        20
    [=]                                     21        22
    [clone]                                 23        28
    [(]                                     28        29
    [)]                                     29        30
    [\n]                                    30        31
L23
    [BTreeNode]                             3         12
    [<]                                     12        13
    [K]                                     13        14
    [>]                                     14        15
    [right]                                 16        21
    [=]                                     22        23
    [clone]                                 24        29
    [(]                                     29        30
    [)]                                     30        31
    [\n]                                    31        32
L24
    [\n]                                    1         2
L25
    [// assign parent to this]              3         27
    [\n]                                    27        28
L26
    [\[]                                    3         4
    [left]                                  4         8
    [,]                                     8         9
    [right]                                 10        15
    [\]]                                    15        16
    [*.]                                    16        18
    [parent]                                18        24
    [=]                                     25        26
    [this]                                  27        31
    [\n]                                    31        32
L27
    [\n]                                    1         2
L28
    [// Assign the left and right point[    3         45
    [\n]                                    45        46
L29
    [left]                                  3         7
    [.]                                     7         8
    [pointers]                              8         16
    [=]                                     17        18
    [pointers]                              19        27
    [.]                                     27        28
    [subList]                               28        35
    [(]                                     35        36
    [0]                                     36        37
    [,]                                     37        38
    [count]                                 39        44
    [/]                                     45        46
    [2]                                     47        48
    [as]                                    49        51
    [int]                                   52        55
    [)]                                     55        56
    [as]                                    57        59
    [LinkedList]                            60        70
    [\n]                                    70        71
L30
    [right]                                 3         8
    [.]                                     8         9
    [pointers]                              9         17
    [=]                                     18        19
    [pointers]                              20        28
    [.]                                     28        29
    [subList]                               29        36
    [(]                                     36        37
    [count]                                 37        42
    [/]                                     43        44
    [2]                                     45        46
    [as]                                    47        49
    [int]                                   50        53
    [,]                                     53        54
    [count]                                 55        60
    [)]                                     60        61
    [as]                                    62        64
    [LinkedList]                            65        75
    [\n]                                    75        76
L31
    [\n]                                    1         2
L32
    [// clear the rightmost left key]       3         34
    [\n]                                    34        35
L33
    [if]                                    3         5
    [(]                                     6         7
    [left]                                  7         11
    [.]                                     11        12
    [internalNode]                          12        24
    [)]                                     24        25
    [{]                                     26        27
    [\n]                                    27        28
L34
    [left]                                  4         8
    [.]                                     8         9
    [pointers]                              9         17
    [\[]                                    17        18
    [-]                                     18        19
    [1]                                     19        20
    [\]]                                    20        21
    [.]                                     21        22
    [key]                                   22        25
    [=]                                     26        27
    [null]                                  28        32
    [\n]                                    32        33
L35
    [}]                                     3         4
    [\n]                                    4         5
L36
    [else]                                  3         7
    [{]                                     8         9
    [\n]                                    9         10
L37
    [left]                                  4         8
    [.]                                     8         9
    [rightSibling]                          9         21
    [=]                                     22        23
    [right]                                 24        29
    [\n]                                    29        30
L38
    [right]                                 4         9
    [.]                                     9         10
    [leftSibling]                           10        21
    [=]                                     22        23
    [left]                                  24        28
    [\n]                                    28        29
L39
    [}]                                     3         4
    [\n]                                    4         5
L40
    [\n]                                    1         2
L41
    [// reassign the parent node if not[    3         45
    [\n]                                    45        46
L42
    [if]                                    3         5
    [(]                                     6         7
    [!]                                     7         8
    [bucketNode]                            8         18
    [)]                                     18        19
    [{]                                     20        21
    [\n]                                    21        22
L43
    [\[]                                    4         5
    [left]                                  5         9
    [,]                                     9         10
    [right]                                 11        16
    [\]]                                    16        17
    [.]                                     17        18
    [each]                                  18        22
    [{]                                     23        24
    [node]                                  25        29
    [->]                                    30        32
    [node]                                  33        37
    [.]                                     37        38
    [pointers]                              38        46
    [*.]                                    46        48
    [value]                                 48        53
    [*.]                                    53        55
    [parent]                                55        61
    [=]                                     62        63
    [node]                                  64        68
    [}]                                     69        70
    [\n]                                    70        71
L44
    [}]                                     3         4
    [\n]                                    4         5
L45
    [\n]                                    1         2
L46
    [// add the children to this]           3         30
    [\n]                                    30        31
L47
    [pointers]                              3         11
    [.]                                     11        12
    [clear]                                 12        17
    [(]                                     17        18
    [)]                                     18        19
    [\n]                                    19        20
L48
    [addDirect]                             3         12
    [(]                                     12        13
    [new]                                   13        16
    [BTreeEntry]                            17        27
    [(]                                     27        28
    [right]                                 28        33
    [.]                                     33        34
    [smallestKey]                           34        45
    [,]                                     45        46
    [left]                                  47        51
    [)]                                     51        52
    [)]                                     52        53
    [\n]                                    53        54
L49
    [addDirect]                             3         12
    [(]                                     12        13
    [new]                                   13        16
    [BTreeEntry]                            17        27
    [(]                                     27        28
    [null]                                  28        32
    [,]                                     32        33
    [right]                                 34        39
    [)]                                     39        40
    [)]                                     40        41
    [\n]                                    41        42
L50
    [\n]                                    1         2
L51
    [// Transform into a pointer node]      3         35
    [\n]                                    35        36
L52
    [if]                                    3         5
    [(]                                     6         7
    [leafNode]                              7         15
    [)]                                     15        16
    [{]                                     17        18
    [\n]                                    18        19
L53
    [getPointer]                            4         14
    [(]                                     14        15
    [this]                                  15        19
    [)]                                     19        20
    [\n]                                    20        21
L54
    [}]                                     3         4
    [\n]                                    4         5
L55
    [}]                                     2         3
    [\n]                                    3         4
L56
    [\n]                                    1         2
L57
    [def]                                   2         5
    [add]                                   6         9
    [(]                                     9         10
    [K]                                     10        11
    [key]                                   12        15
    [,]                                     15        16
    [V]                                     17        18
    [value]                                 19        24
    [)]                                     24        25
    [{]                                     26        27
    [\n]                                    27        28
L58
    [\n]                                    1         2
L59
    [if]                                    3         5
    [(]                                     6         7
    [count]                                 7         12
    [>]                                     13        14
    [0]                                     15        16
    [&&]                                    17        19
    [search]                                20        26
    [(]                                     26        27
    [key]                                   27        30
    [)]                                     30        31
    [)]                                     31        32
    [{]                                     33        34
    [\n]                                    34        35
L60
    [throw]                                 4         9
    [new]                                   10        13
    [IllegalArgumentException]              14        38
    [(]                                     38        39
    ["$]                                    39        41
    [key]                                   41        44
    [is already in the tree"]               45        68
    [)]                                     68        69
    [\n]                                    69        70
L61
    [}]                                     3         4
    [\n]                                    4         5
L62
    [\n]                                    1         2
L63
    [BlockManager]                          3         15
    [.]                                     15        16
    [Block]                                 16        21
    [.]                                     21        22
    [BlockElement]                          22        34
    [<]                                     34        35
    [V]                                     35        36
    [>]                                     36        37
    [element]                               38        45
    [=]                                     46        47
    [manager]                               48        55
    [.]                                     55        56
    [element]                               56        63
    [\n]                                    63        64
L64
    [element]                               3         10
    [.]                                     10        11
    [value]                                 11        16
    [=]                                     17        18
    [value]                                 19        24
    [\n]                                    24        25
L65
    [\n]                                    1         2
L66
    [super]                                 3         8
    [.]                                     8         9
    [add]                                   9         12
    [key]                                   13        16
    [,]                                     16        17
    [element]                               18        25
    [\n]                                    25        26
L67
    [}]                                     2         3
    [\n]                                    3         4
L68
    [\n]                                    1         2
L69
    [def]                                   2         5
    [delete]                                6         12
    [(]                                     12        13
    [K]                                     13        14
    [key]                                   15        18
    [)]                                     18        19
    [{]                                     20        21
    [\n]                                    21        22
L70
    [\n]                                    1         2
L71
    [if]                                    3         5
    [(]                                     6         7
    [count]                                 7         12
    [>]                                     13        14
    [0]                                     15        16
    [&&]                                    17        19
    [!]                                     20        21
    [search]                                21        27
    [(]                                     27        28
    [key]                                   28        31
    [)]                                     31        32
    [)]                                     32        33
    [{]                                     34        35
    [\n]                                    35        36
L72
    [throw]                                 4         9
    [new]                                   10        13
    [IllegalArgumentException]              14        38
    [(]                                     38        39
    ["$]                                    39        41
    [key]                                   41        44
    [is not in the tree"]                   45        64
    [)]                                     64        65
    [\n]                                    65        66
L73
    [}]                                     3         4
    [\n]                                    4         5
L74
    [\n]                                    1         2
L75
    [super]                                 3         8
    [.]                                     8         9
    [delete]                                9         15
    [key]                                   16        19
    [\n]                                    19        20
L76
    [\n]                                    1         2
L77
    [if]                                    3         5
    [(]                                     6         7
    [count]                                 7         12
    [==]                                    13        15
    [0]                                     16        17
    [)]                                     17        18
    [{]                                     19        20
    [\n]                                    20        21
L78
    [getLeaf]                               4         11
    [(]                                     11        12
    [this]                                  12        16
    [)]                                     16        17
    [\n]                                    17        18
L79
    [}]                                     3         4
    [\n]                                    4         5
L80
    [}]                                     2         3
    [\n]                                    3         4
L81
    [}]                                     1         2
    [\n]                                    2         3
EOF
