This mapping has 1 multi-map group: several pairings are equally correct there. The code view shows one arbitrary valid pairing, not the only one.

Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–78 unchanged (78 lines)
79 * @throws IOException on error
80 */
81 public long readBits(final int count) throws IOException {
82 if (count < 0 || count > MAXIMUM_CACHE_SIZE) {
83 throw new IllegalArgumentException("count must not be negative or greater than " + MAXIMUM_CACHE_SIZE);
84 }
85 while (bitsCachedSize < count) {
86 final long nextByte = in.read();
87 if (nextByte < 0) {
88 return nextByte;
89 }
90 if (byteOrder == ByteOrder.LITTLE_ENDIAN) {
91 bitsCached |= (nextByte << bitsCachedSize);
92 } else {
93 bitsCached <<= 8;
94 bitsCached |= nextByte;
95 }
96 bitsCachedSize += 8;
97 }
98 // bitsCachedSize >= 57 and left-shifting it 8 bits would cause an overflow
99
100 final long bitsOut;
101 if (byteOrder == ByteOrder.LITTLE_ENDIAN) {
102 bitsOut = (bitsCached & MASKS[count]);
103 bitsCached >>>= count;
104 } else {
105 bitsOut = (bitsCached >> (bitsCachedSize - count)) & MASKS[count];
106 }
107 bitsCachedSize -= count;
108 return bitsOut;
109 }
110}
111

After

…lines 1–78 unchanged (78 lines)
79 * @throws IOException on error
80 */
81 public long readBits(final int count) throws IOException {
82 if (count < 0 || count > MAXIMUM_CACHE_SIZE) {
83 throw new IllegalArgumentException("count must not be negative or greater than " + MAXIMUM_CACHE_SIZE);
84 }
85 while (bitsCachedSize < count && bitsCachedSize < 57) {
86 final long nextByte = in.read();
87 if (nextByte < 0) {
88 return nextByte;
89 }
90 if (byteOrder == ByteOrder.LITTLE_ENDIAN) {
91 bitsCached |= (nextByte << bitsCachedSize);
92 } else {
93 bitsCached <<= 8;
94 bitsCached |= nextByte;
95 }
96 bitsCachedSize += 8;
97 }
98 int overflowBits = 0;
99 long overflow = 0l;
100 if (bitsCachedSize < count) {
101 // bitsCachedSize >= 57 and left-shifting it 8 bits would cause an overflow
102 int bitsToAddCount = count - bitsCachedSize;
103 overflowBits = 8 - bitsToAddCount;
104 final long nextByte = in.read();
105 if (nextByte < 0) {
106 return nextByte;
107 }
108 if (byteOrder == ByteOrder.LITTLE_ENDIAN) {
109 long bitsToAdd = nextByte & MASKS[bitsToAddCount];
110 bitsCached |= (bitsToAdd << bitsCachedSize);
111 overflow = (nextByte >>> bitsToAddCount) & MASKS[overflowBits];
112 } else {
113 bitsCached <<= bitsToAddCount;
114 long bitsToAdd = (nextByte >>> (overflowBits)) & MASKS[bitsToAddCount];
115 bitsCached |= bitsToAdd;
116 overflow = nextByte & MASKS[overflowBits];
117 }
118 bitsCachedSize = count;
119 }
120
121 final long bitsOut;
122 if (overflowBits == 0) {
123 if (byteOrder == ByteOrder.LITTLE_ENDIAN) {
124 bitsOut = (bitsCached & MASKS[count]);
125 bitsCached >>>= count;
126 } else {
127 bitsOut = (bitsCached >> (bitsCachedSize - count)) & MASKS[count];
128 }
129 bitsCachedSize -= count;
130 } else {
131 bitsOut = bitsCached & MASKS[count];
132 bitsCached = overflow;
133 bitsCachedSize = overflowBits;
134 }
135 return bitsOut;
136 }
137}
138

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "utils"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Closeable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "InputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "nio"
. "."
identifier "ByteOrder"
; ";"
block_comment "/**\n * Reads bits from an InputStream.\n * @since 1.10\n * @No"...
class_declaration
modifiers
public "public"
class "class"
identifier "BitInputStream"
super_interfaces
implements "implements"
type_list
type_identifier "Closeable"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "MAXIMUM_CACHE_SIZE"
= "="
decimal_integer_literal "63"
; ";"
line_comment "// bits in long minus sign bit"
field_declaration (+26 nodes collapsed)
static_initializer (+54 nodes collapsed)
field_declaration
modifiers
private "private"
final "final"
type_identifier "InputStream"
variable_declarator
identifier "in"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "ByteOrder"
variable_declarator
identifier "byteOrder"
; ";"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "bitsCached"
= "="
decimal_integer_literal "0"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "bitsCachedSize"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/**\n * Constructor taking an InputStream and its bit arr"...
constructor_declaration (+39 nodes collapsed)
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Clears the cache of bits that have been read from"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns at most 63 bits read from the underlying "...
method_declaration
modifiers
public "public"
integral_type
long "long"
identifier "readBits"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
integral_type
int "int"
identifier "count"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
if_statement (+34 nodes collapsed)
while_statement
while "while"
parenthesized_expression
( "("
binary_expression any 1:2
identifier "bitsCachedSize"
< "<"
identifier "count"
) ")"
block (+84 nodes collapsed)
line_comment "// bitsCachedSize >= 57 and left-shifting it 8 bits would ca"...
local_variable_declaration
modifiers
final "final"
integral_type
long "long"
variable_declarator
identifier "bitsOut"
; ";"
if_statement (+66 nodes collapsed)
expression_statement
assignment_expression
identifier "bitsCachedSize"
-= "-="
identifier "count"
; ";"
return_statement
return "return"
identifier "bitsOut"
; ";"
} "}"
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "compress"
. "."
identifier "utils"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Closeable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "InputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "nio"
. "."
identifier "ByteOrder"
; ";"
block_comment "/**\n * Reads bits from an InputStream.\n * @since 1.10\n * @No"...
class_declaration
modifiers
public "public"
class "class"
identifier "BitInputStream"
super_interfaces
implements "implements"
type_list
type_identifier "Closeable"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "MAXIMUM_CACHE_SIZE"
= "="
decimal_integer_literal "63"
; ";"
line_comment "// bits in long minus sign bit"
field_declaration (+26 nodes collapsed)
static_initializer (+54 nodes collapsed)
field_declaration
modifiers
private "private"
final "final"
type_identifier "InputStream"
variable_declarator
identifier "in"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "ByteOrder"
variable_declarator
identifier "byteOrder"
; ";"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "bitsCached"
= "="
decimal_integer_literal "0"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "bitsCachedSize"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/**\n * Constructor taking an InputStream and its bit arr"...
constructor_declaration (+39 nodes collapsed)
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Clears the cache of bits that have been read from"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Returns at most 63 bits read from the underlying "...
method_declaration
modifiers
public "public"
integral_type
long "long"
identifier "readBits"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
integral_type
int "int"
identifier "count"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
if_statement (+34 nodes collapsed)
while_statement
while "while"
parenthesized_expression
( "("
binary_expression any 1:2
binary_expression any 1:2
identifier "bitsCachedSize"
< "<"
identifier "count"
&& "&&"
binary_expression
identifier "bitsCachedSize"
< "<"
decimal_integer_literal "57"
) ")"
block (+84 nodes collapsed)
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "overflowBits"
= "="
decimal_integer_literal "0"
; ";"
local_variable_declaration
integral_type
long "long"
variable_declarator
identifier "overflow"
= "="
decimal_integer_literal "0l"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "bitsCachedSize"
< "<"
identifier "count"
) ")"
block
{ "{"
line_comment "// bitsCachedSize >= 57 and left-shifting it 8 bits would ca"...
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "bitsToAddCount"
= "="
binary_expression
identifier "count"
- "-"
identifier "bitsCachedSize"
; ";"
expression_statement
assignment_expression
identifier "overflowBits"
= "="
binary_expression
decimal_integer_literal "8"
- "-"
identifier "bitsToAddCount"
; ";"
local_variable_declaration
modifiers
final "final"
integral_type
long "long"
variable_declarator
identifier "nextByte"
= "="
method_invocation
identifier "in"
. "."
identifier "read"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "nextByte"
< "<"
decimal_integer_literal "0"
) ")"
block
{ "{"
return_statement
return "return"
identifier "nextByte"
; ";"
} "}"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "byteOrder"
== "=="
field_access
identifier "ByteOrder"
. "."
identifier "LITTLE_ENDIAN"
) ")"
block
{ "{"
local_variable_declaration
integral_type
long "long"
variable_declarator
identifier "bitsToAdd"
= "="
binary_expression
identifier "nextByte"
& "&"
array_access
identifier "MASKS"
[ "["
identifier "bitsToAddCount"
] "]"
; ";"
expression_statement
assignment_expression
identifier "bitsCached"
|= "|="
parenthesized_expression
( "("
binary_expression
identifier "bitsToAdd"
<< "<<"
identifier "bitsCachedSize"
) ")"
; ";"
expression_statement
assignment_expression
identifier "overflow"
= "="
binary_expression
parenthesized_expression
( "("
binary_expression
identifier "nextByte"
>>> ">>>"
identifier "bitsToAddCount"
) ")"
& "&"
array_access
identifier "MASKS"
[ "["
identifier "overflowBits"
] "]"
; ";"
} "}"
else "else"
block
{ "{"
expression_statement
assignment_expression
identifier "bitsCached"
<<= "<<="
identifier "bitsToAddCount"
; ";"
local_variable_declaration
integral_type
long "long"
variable_declarator
identifier "bitsToAdd"
= "="
binary_expression
parenthesized_expression
( "("
binary_expression
identifier "nextByte"
>>> ">>>"
parenthesized_expression
( "("
identifier "overflowBits"
) ")"
) ")"
& "&"
array_access
identifier "MASKS"
[ "["
identifier "bitsToAddCount"
] "]"
; ";"
expression_statement
assignment_expression
identifier "bitsCached"
|= "|="
identifier "bitsToAdd"
; ";"
expression_statement
assignment_expression
identifier "overflow"
= "="
binary_expression
identifier "nextByte"
& "&"
array_access
identifier "MASKS"
[ "["
identifier "overflowBits"
] "]"
; ";"
} "}"
expression_statement
assignment_expression
identifier "bitsCachedSize"
= "="
identifier "count"
; ";"
} "}"
local_variable_declaration
modifiers
final "final"
integral_type
long "long"
variable_declarator
identifier "bitsOut"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "overflowBits"
== "=="
decimal_integer_literal "0"
) ")"
block
{ "{"
if_statement (+66 nodes collapsed)
expression_statement
assignment_expression
identifier "bitsCachedSize"
-= "-="
identifier "count"
; ";"
} "}"
else "else"
block
{ "{"
expression_statement
assignment_expression
identifier "bitsOut"
= "="
binary_expression
identifier "bitsCached"
& "&"
array_access
identifier "MASKS"
[ "["
identifier "count"
] "]"
; ";"
expression_statement
assignment_expression
identifier "bitsCached"
= "="
identifier "overflow"
; ";"
expression_statement
assignment_expression
identifier "bitsCachedSize"
= "="
identifier "overflowBits"
; ";"
} "}"
return_statement
return "return"
identifier "bitsOut"
; ";"
} "}"
} "}"