This mapping has 2 multi-map groups: 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

1package com.genymobile.scrcpy.video;
2
3import com.genymobile.scrcpy.device.Device;
4import com.genymobile.scrcpy.device.Size;
5import com.genymobile.scrcpy.util.Ln;
6import com.genymobile.scrcpy.wrappers.ServiceManager;
7import com.genymobile.scrcpy.wrappers.SurfaceControl;
8
…lines 9–99 unchanged (91 lines)
100 requestReset();
101 }
102
103 private static IBinder createDisplay() throws Exception {
104 // Since Android 12 (preview), secure displays could not be created with shell permissions anymore.
105 // On Android 12 preview, SDK_INT is still R (not S), but CODENAME is "S".
106 boolean secure = Build.VERSION.SDK_INT < Build.VERSION_CODES.R || (Build.VERSION.SDK_INT == Build.VERSION_CODES.R && !"S".equals(
107 Build.VERSION.CODENAME));
108 return SurfaceControl.createDisplay("scrcpy", secure);
109 }
110
111 private static void setDisplaySurface(IBinder display, Surface surface, int orientation, Rect deviceRect, Rect displayRect, int layerStack) {
112 SurfaceControl.openTransaction();
113 try {
…lines 114–122 unchanged (9 lines)

After

1package com.genymobile.scrcpy.video;
2
3import com.genymobile.scrcpy.AndroidVersions;
4import com.genymobile.scrcpy.device.Device;
5import com.genymobile.scrcpy.device.Size;
6import com.genymobile.scrcpy.util.Ln;
7import com.genymobile.scrcpy.wrappers.ServiceManager;
8import com.genymobile.scrcpy.wrappers.SurfaceControl;
9
…lines 10–100 unchanged (91 lines)
101 requestReset();
102 }
103
104 private static IBinder createDisplay() throws Exception {
105 // Since Android 12 (preview), secure displays could not be created with shell permissions anymore.
106 // On Android 12 preview, SDK_INT is still R (not S), but CODENAME is "S".
107 boolean secure = Build.VERSION.SDK_INT < AndroidVersions.API_30_ANDROID_11 || (Build.VERSION.SDK_INT == AndroidVersions.API_30_ANDROID_11
108 && !"S".equals(Build.VERSION.CODENAME));
109 return SurfaceControl.createDisplay("scrcpy", secure);
110 }
111
112 private static void setDisplaySurface(IBinder display, Surface surface, int orientation, Rect deviceRect, Rect displayRect, int layerStack) {
113 SurfaceControl.openTransaction();
114 try {
…lines 115–123 unchanged (9 lines)

Before

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "genymobile"
. "."
identifier "scrcpy"
. "."
identifier "video"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "genymobile"
. "."
identifier "scrcpy"
. "."
identifier "device"
. "."
identifier "Device"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "genymobile"
. "."
identifier "scrcpy"
. "."
identifier "device"
. "."
identifier "Size"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "genymobile"
. "."
identifier "scrcpy"
. "."
identifier "util"
. "."
identifier "Ln"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "genymobile"
. "."
identifier "scrcpy"
. "."
identifier "wrappers"
. "."
identifier "ServiceManager"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "genymobile"
. "."
identifier "scrcpy"
. "."
identifier "wrappers"
. "."
identifier "SurfaceControl"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "android"
. "."
identifier "graphics"
. "."
identifier "Rect"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "android"
. "."
identifier "hardware"
. "."
identifier "display"
. "."
identifier "VirtualDisplay"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "android"
. "."
identifier "os"
. "."
identifier "Build"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "android"
. "."
identifier "os"
. "."
identifier "IBinder"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "android"
. "."
identifier "view"
. "."
identifier "Surface"
; ";"
class_declaration
modifiers
public "public"
class "class"
identifier "ScreenCapture"
superclass
extends "extends"
type_identifier "SurfaceCapture"
super_interfaces
implements "implements"
type_list
scoped_type_identifier
type_identifier "Device"
. "."
type_identifier "RotationListener"
, ","
scoped_type_identifier
type_identifier "Device"
. "."
type_identifier "FoldListener"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Device"
variable_declarator
identifier "device"
; ";"
field_declaration
modifiers
private "private"
type_identifier "IBinder"
variable_declarator
identifier "display"
; ";"
field_declaration
modifiers
private "private"
type_identifier "VirtualDisplay"
variable_declarator
identifier "virtualDisplay"
; ";"
constructor_declaration (+22 nodes collapsed)
method_declaration (+34 nodes collapsed)
method_declaration (+342 nodes collapsed)
method_declaration (+89 nodes collapsed)
method_declaration (+30 nodes collapsed)
method_declaration (+32 nodes collapsed)
method_declaration (+29 nodes collapsed)
method_declaration (+25 nodes collapsed)
method_declaration
modifiers
private "private"
static "static"
type_identifier "IBinder"
identifier "createDisplay"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "Exception"
block
{ "{"
line_comment "// Since Android 12 (preview), secure displays could not be "...
line_comment "// On Android 12 preview, SDK_INT is still R (not S), but CO"...
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "secure"
= "="
binary_expression
binary_expression
field_access
field_access
identifier "Build"
. "."
identifier "VERSION"
. "."
identifier "SDK_INT"
< "<"
field_access any 2:1
field_access any 2:1
identifier "Build"
. "."
identifier "VERSION_CODES"
. "."
identifier "R"
|| "||"
parenthesized_expression
( "("
binary_expression
binary_expression
field_access
field_access
identifier "Build"
. "."
identifier "VERSION"
. "."
identifier "SDK_INT"
== "=="
field_access any 2:1
field_access any 2:1
identifier "Build"
. "."
identifier "VERSION_CODES"
. "."
identifier "R"
&& "&&"
unary_expression
! "!"
method_invocation
string_literal
" "\""
string_fragment "S"
" "\""
. "."
identifier "equals"
argument_list
( "("
field_access
field_access
identifier "Build"
. "."
identifier "VERSION"
. "."
identifier "CODENAME"
) ")"
) ")"
; ";"
return_statement
return "return"
method_invocation
identifier "SurfaceControl"
. "."
identifier "createDisplay"
argument_list
( "("
string_literal
" "\""
string_fragment "scrcpy"
" "\""
, ","
identifier "secure"
) ")"
; ";"
} "}"
method_declaration (+105 nodes collapsed)
} "}"

After

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "genymobile"
. "."
identifier "scrcpy"
. "."
identifier "video"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "genymobile"
. "."
identifier "scrcpy"
. "."
identifier "AndroidVersions"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "genymobile"
. "."
identifier "scrcpy"
. "."
identifier "device"
. "."
identifier "Device"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "genymobile"
. "."
identifier "scrcpy"
. "."
identifier "device"
. "."
identifier "Size"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "genymobile"
. "."
identifier "scrcpy"
. "."
identifier "util"
. "."
identifier "Ln"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "genymobile"
. "."
identifier "scrcpy"
. "."
identifier "wrappers"
. "."
identifier "ServiceManager"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "genymobile"
. "."
identifier "scrcpy"
. "."
identifier "wrappers"
. "."
identifier "SurfaceControl"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "android"
. "."
identifier "graphics"
. "."
identifier "Rect"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "android"
. "."
identifier "hardware"
. "."
identifier "display"
. "."
identifier "VirtualDisplay"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "android"
. "."
identifier "os"
. "."
identifier "Build"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "android"
. "."
identifier "os"
. "."
identifier "IBinder"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "android"
. "."
identifier "view"
. "."
identifier "Surface"
; ";"
class_declaration
modifiers
public "public"
class "class"
identifier "ScreenCapture"
superclass
extends "extends"
type_identifier "SurfaceCapture"
super_interfaces
implements "implements"
type_list
scoped_type_identifier
type_identifier "Device"
. "."
type_identifier "RotationListener"
, ","
scoped_type_identifier
type_identifier "Device"
. "."
type_identifier "FoldListener"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Device"
variable_declarator
identifier "device"
; ";"
field_declaration
modifiers
private "private"
type_identifier "IBinder"
variable_declarator
identifier "display"
; ";"
field_declaration
modifiers
private "private"
type_identifier "VirtualDisplay"
variable_declarator
identifier "virtualDisplay"
; ";"
constructor_declaration (+22 nodes collapsed)
method_declaration (+34 nodes collapsed)
method_declaration (+342 nodes collapsed)
method_declaration (+89 nodes collapsed)
method_declaration (+30 nodes collapsed)
method_declaration (+32 nodes collapsed)
method_declaration (+29 nodes collapsed)
method_declaration (+25 nodes collapsed)
method_declaration
modifiers
private "private"
static "static"
type_identifier "IBinder"
identifier "createDisplay"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "Exception"
block
{ "{"
line_comment "// Since Android 12 (preview), secure displays could not be "...
line_comment "// On Android 12 preview, SDK_INT is still R (not S), but CO"...
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "secure"
= "="
binary_expression
binary_expression
field_access
field_access
identifier "Build"
. "."
identifier "VERSION"
. "."
identifier "SDK_INT"
< "<"
field_access any 2:1
identifier "AndroidVersions"
. "."
identifier "API_30_ANDROID_11"
|| "||"
parenthesized_expression
( "("
binary_expression
binary_expression
field_access
field_access
identifier "Build"
. "."
identifier "VERSION"
. "."
identifier "SDK_INT"
== "=="
field_access any 2:1
identifier "AndroidVersions"
. "."
identifier "API_30_ANDROID_11"
&& "&&"
unary_expression
! "!"
method_invocation
string_literal
" "\""
string_fragment "S"
" "\""
. "."
identifier "equals"
argument_list
( "("
field_access
field_access
identifier "Build"
. "."
identifier "VERSION"
. "."
identifier "CODENAME"
) ")"
) ")"
; ";"
return_statement
return "return"
method_invocation
identifier "SurfaceControl"
. "."
identifier "createDisplay"
argument_list
( "("
string_literal
" "\""
string_fragment "scrcpy"
" "\""
, ","
identifier "secure"
) ")"
; ";"
} "}"
method_declaration (+105 nodes collapsed)
} "}"