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–162 unchanged (162 lines)
163 This is a fix for CODEC-101
164 */
165 while (readLen == 0) {
166 if (!base64.hasData()) {
167 byte[] buf = new byte[doEncode ? 4096 : 8192];
168 int c = in.read(buf);
169 if (c > 0 && b.length == len) {
170 base64.setInitialBuffer(b, offset, len);
171 }
172 if (doEncode) {
173 base64.encode(buf, 0, c);
174 } else {
175 base64.decode(buf, 0, c);
176 }
177 }
…lines 178–193 unchanged (16 lines)

After

…lines 1–162 unchanged (162 lines)
163 This is a fix for CODEC-101
164 */
165 while (readLen == 0) {
166 if (!base64.hasData()) {
167 byte[] buf = new byte[doEncode ? 4096 : 8192];
168 int c = in.read(buf);
169 if (doEncode) {
170 base64.encode(buf, 0, c);
171 } else {
172 base64.decode(buf, 0, c);
173 }
174 }
175 readLen = base64.readResults(b, offset, len);
…lines 176–190 unchanged (15 lines)

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 "codec"
. "."
identifier "binary"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "FilterInputStream"
; ";"
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"
; ";"
block_comment "/**\n * Provides Base64 encoding and decoding in a streaming "...
class_declaration
modifiers
public "public"
class "class"
identifier "Base64InputStream"
superclass
extends "extends"
type_identifier "FilterInputStream"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "doEncode"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Base64"
variable_declarator
identifier "base64"
; ";"
field_declaration (+22 nodes collapsed)
block_comment "/**\n * Creates a Base64InputStream such that all data re"...
constructor_declaration (+22 nodes collapsed)
block_comment "/**\n * Creates a Base64InputStream such that all data re"...
constructor_declaration (+48 nodes collapsed)
block_comment "/**\n * Creates a Base64InputStream such that all data re"...
constructor_declaration (+64 nodes collapsed)
block_comment "/**\n * Reads one <code>byte</code> from this input strea"...
method_declaration (+104 nodes collapsed)
block_comment "/**\n * Attempts to read <code>len</code> bytes into the "...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "read"
formal_parameters
( "("
formal_parameter
integral_type
byte "byte"
identifier "b"
dimensions
[ "["
] "]"
, ","
formal_parameter
integral_type
int "int"
identifier "offset"
, ","
formal_parameter
integral_type
int "int"
identifier "len"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "b"
== "=="
null_literal "null"
) ")"
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "NullPointerException"
argument_list
( "("
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
binary_expression
identifier "offset"
< "<"
decimal_integer_literal "0"
|| "||"
binary_expression
identifier "len"
< "<"
decimal_integer_literal "0"
) ")"
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "IndexOutOfBoundsException"
argument_list
( "("
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression (+22 nodes collapsed)
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "IndexOutOfBoundsException"
argument_list
( "("
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "len"
== "=="
decimal_integer_literal "0"
) ")"
block
{ "{"
return_statement
return "return"
decimal_integer_literal "0"
; ";"
} "}"
else "else"
block
{ "{"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "readLen"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/*\n Rationale for while-loop on (readLen == 0):\n"...
while_statement
while "while"
parenthesized_expression
( "("
binary_expression
identifier "readLen"
== "=="
decimal_integer_literal "0"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
unary_expression
! "!"
method_invocation
identifier "base64"
. "."
identifier "hasData"
argument_list
( "("
) ")"
) ")"
block
{ "{"
local_variable_declaration (+24 nodes collapsed)
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "c"
= "="
method_invocation
identifier "in"
. "."
identifier "read"
argument_list
( "("
identifier "buf"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
binary_expression
identifier "c"
> ">"
decimal_integer_literal "0"
&& "&&"
binary_expression
field_access
identifier "b"
. "."
identifier "length"
== "=="
identifier "len"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "base64"
. "."
identifier "setInitialBuffer"
argument_list
( "("
identifier "b"
, ","
identifier "offset"
, ","
identifier "len"
) ")"
; ";"
} "}"
if_statement (+41 nodes collapsed)
} "}"
expression_statement
assignment_expression
identifier "readLen"
= "="
method_invocation
identifier "base64"
. "."
identifier "readResults"
argument_list
( "("
identifier "b"
, ","
identifier "offset"
, ","
identifier "len"
) ")"
; ";"
} "}"
return_statement
return "return"
identifier "readLen"
; ";"
} "}"
} "}"
block_comment "/**\n * {@inheritDoc}\n * \n * @return false\n *"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "markSupported"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
line_comment "// not an easy job to support marks"
} "}"
} "}"

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 "codec"
. "."
identifier "binary"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "FilterInputStream"
; ";"
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"
; ";"
block_comment "/**\n * Provides Base64 encoding and decoding in a streaming "...
class_declaration
modifiers
public "public"
class "class"
identifier "Base64InputStream"
superclass
extends "extends"
type_identifier "FilterInputStream"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "doEncode"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Base64"
variable_declarator
identifier "base64"
; ";"
field_declaration (+22 nodes collapsed)
block_comment "/**\n * Creates a Base64InputStream such that all data re"...
constructor_declaration (+22 nodes collapsed)
block_comment "/**\n * Creates a Base64InputStream such that all data re"...
constructor_declaration (+48 nodes collapsed)
block_comment "/**\n * Creates a Base64InputStream such that all data re"...
constructor_declaration (+64 nodes collapsed)
block_comment "/**\n * Reads one <code>byte</code> from this input strea"...
method_declaration (+104 nodes collapsed)
block_comment "/**\n * Attempts to read <code>len</code> bytes into the "...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "read"
formal_parameters
( "("
formal_parameter
integral_type
byte "byte"
identifier "b"
dimensions
[ "["
] "]"
, ","
formal_parameter
integral_type
int "int"
identifier "offset"
, ","
formal_parameter
integral_type
int "int"
identifier "len"
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "b"
== "=="
null_literal "null"
) ")"
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "NullPointerException"
argument_list
( "("
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
binary_expression
identifier "offset"
< "<"
decimal_integer_literal "0"
|| "||"
binary_expression
identifier "len"
< "<"
decimal_integer_literal "0"
) ")"
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "IndexOutOfBoundsException"
argument_list
( "("
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression (+22 nodes collapsed)
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "IndexOutOfBoundsException"
argument_list
( "("
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "len"
== "=="
decimal_integer_literal "0"
) ")"
block
{ "{"
return_statement
return "return"
decimal_integer_literal "0"
; ";"
} "}"
else "else"
block
{ "{"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "readLen"
= "="
decimal_integer_literal "0"
; ";"
block_comment "/*\n Rationale for while-loop on (readLen == 0):\n"...
while_statement
while "while"
parenthesized_expression
( "("
binary_expression
identifier "readLen"
== "=="
decimal_integer_literal "0"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
unary_expression
! "!"
method_invocation
identifier "base64"
. "."
identifier "hasData"
argument_list
( "("
) ")"
) ")"
block
{ "{"
local_variable_declaration (+24 nodes collapsed)
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "c"
= "="
method_invocation
identifier "in"
. "."
identifier "read"
argument_list
( "("
identifier "buf"
) ")"
; ";"
if_statement (+41 nodes collapsed)
} "}"
expression_statement
assignment_expression
identifier "readLen"
= "="
method_invocation
identifier "base64"
. "."
identifier "readResults"
argument_list
( "("
identifier "b"
, ","
identifier "offset"
, ","
identifier "len"
) ")"
; ";"
} "}"
return_statement
return "return"
identifier "readLen"
; ";"
} "}"
} "}"
block_comment "/**\n * {@inheritDoc}\n * \n * @return false\n *"...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "markSupported"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
line_comment "// not an easy job to support marks"
} "}"
} "}"