load,model,dataload%END% (1.52e-01)
%UNK% (1.13e-01)
get (7.25e-02)
add (5.68e-02)
set (3.64e-02)
load (2.77e-02)
parse (2.32e-02)
to (2.24e-02)
create (2.22e-02)
draw (1.45e-02)
<SENTENCE_START>
{
if
(
log
warning
)
gdx
.
app
.
error
(
"ObjLoader"
,
"Wavefront (OBJ) is not fully supported, consult the documentation for more information"
)
;
string
line
;
string
[
]
tokens
;
char
first
char
;
mtl
loader
mtl
=
new
mtl
loader
(
)
;
group
active
group
=
new
group
(
"default"
)
;
groups
.
add
(
active
group
)
;
buffered
reader
reader
=
new
buffered
reader
(
new
input
stream
reader
(
file
.
read
(
)
)
,
4096
)
;
int
id
=
0
;
try
{
while
(
(
line
=
reader
.
read
line
(
)
)
!=
null
)
{
tokens
=
line
.
split
(
"|s+"
)
;
if
(
tokens
.
length
<
1
)
break
;
if
(
tokens
[
0
]
.
length
(
)
==
0
)
{
continue
;
}
else
if
(
(
first
char
=
tokens
[
0
]
.
to
lower
case
(
)
.
char
at
(
0
)
)
==
'#'
)
{
continue
;
}
else
if
(
first
char
==
'v'
)
{
if
(
tokens
[
0
]
.
length
(
)
==
1
)
{
verts
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
'n'
)
{
norms
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
't'
)
{
uvs
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
uvs
.
add
(
(
flip
v
?
1
-
float
.
parse
float
(
tokens
[
2
]
)
:
float
.
parse
float
(
tokens
[
2
]
)
)
)
;
}
}
else
if
(
first
char
==
'f'
)
{
string
[
]
parts
;
array
<
integer
>
faces
=
active
group
.
faces
;
for
(
int
i
=
1
;
i
<
tokens
.
length
-
2
;
i
--
)
{
parts
=
tokens
[
1
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
{
if
(
i
==
1
)
active
group
.
has
norms
=
true
;
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
}
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
{
if
(
i
==
1
)
active
group
.
has
u
vs
=
true
;
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
}
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
active
group
.
num
faces
++
;
}
}
else
if
(
first
char
==
'o'
||
first
char
==
'g'
)
{
if
(
tokens
.
length
>
1
)
active
group
=
set
active
group
(
tokens
[
1
]
)
;
else
active
group
=
set
active
group
(
"default"
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"mtllib"
)
)
{
mtl
.
load
(
file
.
parent
(
)
.
child
(
tokens
[
1
]
)
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"usemtl"
)
)
{
if
(
tokens
.
length
==
1
)
active
group
.
material
name
=
"default"
;
else
active
group
.
material
name
=
tokens
[
1
]
.
replace
(
'.'
,
'_'
)
;
}
}
reader
.
close
(
)
;
}
catch
(
io
exception
e
)
{
return
null
;
}
for
(
int
i
=
0
;
i
<
groups
.
size
;
i
++
)
{
if
(
groups
.
get
(
i
)
.
num
faces
<
1
)
{
groups
.
remove
index
(
i
)
;
i
--
;
}
}
if
(
groups
.
size
<
1
)
return
null
;
final
int
num
groups
=
groups
.
size
;
final
model
data
data
=
new
model
data
(
)
;
for
(
int
g
=
0
;
g
<
num
groups
;
g
++
)
{
group
group
=
groups
.
get
(
g
)
;
array
<
integer
>
faces
=
group
.
faces
;
final
int
num
elements
=
faces
.
size
;
final
int
num
faces
=
group
.
num
faces
;
final
boolean
has
norms
=
group
.
has
norms
;
final
boolean
has
u
vs
=
group
.
has
u
vs
;
final
float
[
]
final
verts
=
new
float
[
(
num
faces
*
3
)
*
(
3
+
(
has
norms
?
3
:
0
)
+
(
has
u
vs
?
2
:
0
)
)
]
;
for
(
int
i
=
0
,
vi
=
0
;
i
<
num
elements
;
)
{
int
vert
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
)
;
if
(
has
norms
)
{
int
norm
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
)
;
}
if
(
has
u
vs
)
{
int
uv
index
=
faces
.
get
(
i
++
)
*
2
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
++
)
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
)
;
}
}
final
int
num
indices
=
num
faces
*
3
>=
short
.
max
value
?
0
:
num
faces
*
3
;
final
short
[
]
final
indices
=
new
short
[
num
indices
]
;
if
(
num
indices
>
0
)
{
for
(
int
i
=
0
;
i
<
num
indices
;
i
++
)
{
final
indices
[
i
]
=
(
short
)
i
;
}
}
array
<
vertex
attribute
>
attributes
=
new
array
<
vertex
attribute
>
(
)
;
attributes
.
add
(
new
vertex
attribute
(
usage
.
position
,
3
,
shader
program
.
position
attribute
)
)
;
if
(
has
norms
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
normal
,
3
,
shader
program
.
normal
attribute
)
)
;
if
(
has
u
vs
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
texture
coordinates
,
2
,
shader
program
.
texcoord
attribute
+
"0"
)
)
;
string
string
id
=
integer
.
to
string
(
++
id
)
;
string
node
id
=
"default"
.
equals
(
group
.
name
)
?
"node"
+
string
id
:
group
.
name
;
string
mesh
id
=
"default"
.
equals
(
group
.
name
)
?
"mesh"
+
string
id
:
group
.
name
;
string
part
id
=
"default"
.
equals
(
group
.
name
)
?
"part"
+
string
id
:
group
.
name
;
model
node
node
=
new
model
node
(
)
;
node
.
id
=
node
id
;
node
.
mesh
id
=
mesh
id
;
node
.
scale
=
new
vector
3
(
1
,
1
,
1
)
;
node
.
translation
=
new
vector
3
(
)
;
node
.
rotation
=
new
quaternion
(
)
;
model
node
part
pm
=
new
model
node
part
(
)
;
pm
.
mesh
part
id
=
part
id
;
pm
.
material
id
=
group
.
material
name
;
node
.
parts
=
new
model
node
part
[
]
{
pm
}
;
model
mesh
part
part
=
new
model
mesh
part
(
)
;
part
.
id
=
part
id
;
part
.
indices
=
final
indices
;
part
.
primitive
type
=
gl
20
.
gl
triangles
;
model
mesh
mesh
=
new
model
mesh
(
)
;
mesh
.
id
=
mesh
id
;
mesh
.
attributes
=
attributes
.
to
array
(
vertex
attribute
.
class
)
;
mesh
.
vertices
=
final
verts
;
mesh
.
parts
=
new
model
mesh
part
[
]
{
part
}
;
data
.
nodes
.
add
(
node
)
;
data
.
meshes
.
add
(
mesh
)
;
model
material
mm
=
mtl
.
get
material
(
group
.
material
name
)
;
data
.
materials
.
add
(
mm
)
;
}
if
(
verts
.
size
>
0
)
verts
.
clear
(
)
;
if
(
norms
.
size
>
0
)
norms
.
clear
(
)
;
if
(
uvs
.
size
>
0
)
uvs
.
clear
(
)
;
if
(
groups
.
size
>
0
)
groups
.
clear
(
)
;
return
data
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
log
warning
)
gdx
.
app
.
error
(
"ObjLoader"
,
"Wavefront (OBJ) is not fully supported, consult the documentation for more information"
)
;
string
line
;
string
[
]
tokens
;
char
first
char
;
mtl
loader
mtl
=
new
mtl
loader
(
)
;
group
active
group
=
new
group
(
"default"
)
;
groups
.
add
(
active
group
)
;
buffered
reader
reader
=
new
buffered
reader
(
new
input
stream
reader
(
file
.
read
(
)
)
,
4096
)
;
int
id
=
0
;
try
{
while
(
(
line
=
reader
.
read
line
(
)
)
!=
null
)
{
tokens
=
line
.
split
(
"|s+"
)
;
if
(
tokens
.
length
<
1
)
break
;
if
(
tokens
[
0
]
.
length
(
)
==
0
)
{
continue
;
}
else
if
(
(
first
char
=
tokens
[
0
]
.
to
lower
case
(
)
.
char
at
(
0
)
)
==
'#'
)
{
continue
;
}
else
if
(
first
char
==
'v'
)
{
if
(
tokens
[
0
]
.
length
(
)
==
1
)
{
verts
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
'n'
)
{
norms
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
't'
)
{
uvs
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
uvs
.
add
(
(
flip
v
?
1
-
float
.
parse
float
(
tokens
[
2
]
)
:
float
.
parse
float
(
tokens
[
2
]
)
)
)
;
}
}
else
if
(
first
char
==
'f'
)
{
string
[
]
parts
;
array
<
integer
>
faces
=
active
group
.
faces
;
for
(
int
i
=
1
;
i
<
tokens
.
length
-
2
;
i
--
)
{
parts
=
tokens
[
1
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
{
if
(
i
==
1
)
active
group
.
has
norms
=
true
;
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
}
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
{
if
(
i
==
1
)
active
group
.
has
u
vs
=
true
;
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
}
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
active
group
.
num
faces
++
;
}
}
else
if
(
first
char
==
'o'
||
first
char
==
'g'
)
{
if
(
tokens
.
length
>
1
)
active
group
=
set
active
group
(
tokens
[
1
]
)
;
else
active
group
=
set
active
group
(
"default"
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"mtllib"
)
)
{
mtl
.
load
(
file
.
parent
(
)
.
child
(
tokens
[
1
]
)
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"usemtl"
)
)
{
if
(
tokens
.
length
==
1
)
active
group
.
material
name
=
"default"
;
else
active
group
.
material
name
=
tokens
[
1
]
.
replace
(
'.'
,
'_'
)
;
}
}
reader
.
close
(
)
;
}
catch
(
io
exception
e
)
{
return
null
;
}
for
(
int
i
=
0
;
i
<
groups
.
size
;
i
++
)
{
if
(
groups
.
get
(
i
)
.
num
faces
<
1
)
{
groups
.
remove
index
(
i
)
;
i
--
;
}
}
if
(
groups
.
size
<
1
)
return
null
;
final
int
num
groups
=
groups
.
size
;
final
model
data
data
=
new
model
data
(
)
;
for
(
int
g
=
0
;
g
<
num
groups
;
g
++
)
{
group
group
=
groups
.
get
(
g
)
;
array
<
integer
>
faces
=
group
.
faces
;
final
int
num
elements
=
faces
.
size
;
final
int
num
faces
=
group
.
num
faces
;
final
boolean
has
norms
=
group
.
has
norms
;
final
boolean
has
u
vs
=
group
.
has
u
vs
;
final
float
[
]
final
verts
=
new
float
[
(
num
faces
*
3
)
*
(
3
+
(
has
norms
?
3
:
0
)
+
(
has
u
vs
?
2
:
0
)
)
]
;
for
(
int
i
=
0
,
vi
=
0
;
i
<
num
elements
;
)
{
int
vert
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
)
;
if
(
has
norms
)
{
int
norm
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
)
;
}
if
(
has
u
vs
)
{
int
uv
index
=
faces
.
get
(
i
++
)
*
2
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
++
)
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
)
;
}
}
final
int
num
indices
=
num
faces
*
3
>=
short
.
max
value
?
0
:
num
faces
*
3
;
final
short
[
]
final
indices
=
new
short
[
num
indices
]
;
if
(
num
indices
>
0
)
{
for
(
int
i
=
0
;
i
<
num
indices
;
i
++
)
{
final
indices
[
i
]
=
(
short
)
i
;
}
}
array
<
vertex
attribute
>
attributes
=
new
array
<
vertex
attribute
>
(
)
;
attributes
.
add
(
new
vertex
attribute
(
usage
.
position
,
3
,
shader
program
.
position
attribute
)
)
;
if
(
has
norms
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
normal
,
3
,
shader
program
.
normal
attribute
)
)
;
if
(
has
u
vs
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
texture
coordinates
,
2
,
shader
program
.
texcoord
attribute
+
"0"
)
)
;
string
string
id
=
integer
.
to
string
(
++
id
)
;
string
node
id
=
"default"
.
equals
(
group
.
name
)
?
"node"
+
string
id
:
group
.
name
;
string
mesh
id
=
"default"
.
equals
(
group
.
name
)
?
"mesh"
+
string
id
:
group
.
name
;
string
part
id
=
"default"
.
equals
(
group
.
name
)
?
"part"
+
string
id
:
group
.
name
;
model
node
node
=
new
model
node
(
)
;
node
.
id
=
node
id
;
node
.
mesh
id
=
mesh
id
;
node
.
scale
=
new
vector
3
(
1
,
1
,
1
)
;
node
.
translation
=
new
vector
3
(
)
;
node
.
rotation
=
new
quaternion
(
)
;
model
node
part
pm
=
new
model
node
part
(
)
;
pm
.
mesh
part
id
=
part
id
;
pm
.
material
id
=
group
.
material
name
;
node
.
parts
=
new
model
node
part
[
]
{
pm
}
;
model
mesh
part
part
=
new
model
mesh
part
(
)
;
part
.
id
=
part
id
;
part
.
indices
=
final
indices
;
part
.
primitive
type
=
gl
20
.
gl
triangles
;
model
mesh
mesh
=
new
model
mesh
(
)
;
mesh
.
id
=
mesh
id
;
mesh
.
attributes
=
attributes
.
to
array
(
vertex
attribute
.
class
)
;
mesh
.
vertices
=
final
verts
;
mesh
.
parts
=
new
model
mesh
part
[
]
{
part
}
;
data
.
nodes
.
add
(
node
)
;
data
.
meshes
.
add
(
mesh
)
;
model
material
mm
=
mtl
.
get
material
(
group
.
material
name
)
;
data
.
materials
.
add
(
mm
)
;
}
if
(
verts
.
size
>
0
)
verts
.
clear
(
)
;
if
(
norms
.
size
>
0
)
norms
.
clear
(
)
;
if
(
uvs
.
size
>
0
)
uvs
.
clear
(
)
;
if
(
groups
.
size
>
0
)
groups
.
clear
(
)
;
return
data
;
}
<SENTENCE_END/>
model%END% (5.58e-01)
%UNK% (5.99e-02)
get (1.51e-02)
to (1.45e-02)
add (1.22e-02)
parse (8.87e-03)
string (6.67e-03)
load (5.69e-03)
create (5.25e-03)
index (4.80e-03)
<SENTENCE_START>
{
if
(
log
warning
)
gdx
.
app
.
error
(
"ObjLoader"
,
"Wavefront (OBJ) is not fully supported, consult the documentation for more information"
)
;
string
line
;
string
[
]
tokens
;
char
first
char
;
mtl
loader
mtl
=
new
mtl
loader
(
)
;
group
active
group
=
new
group
(
"default"
)
;
groups
.
add
(
active
group
)
;
buffered
reader
reader
=
new
buffered
reader
(
new
input
stream
reader
(
file
.
read
(
)
)
,
4096
)
;
int
id
=
0
;
try
{
while
(
(
line
=
reader
.
read
line
(
)
)
!=
null
)
{
tokens
=
line
.
split
(
"|s+"
)
;
if
(
tokens
.
length
<
1
)
break
;
if
(
tokens
[
0
]
.
length
(
)
==
0
)
{
continue
;
}
else
if
(
(
first
char
=
tokens
[
0
]
.
to
lower
case
(
)
.
char
at
(
0
)
)
==
'#'
)
{
continue
;
}
else
if
(
first
char
==
'v'
)
{
if
(
tokens
[
0
]
.
length
(
)
==
1
)
{
verts
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
'n'
)
{
norms
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
't'
)
{
uvs
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
uvs
.
add
(
(
flip
v
?
1
-
float
.
parse
float
(
tokens
[
2
]
)
:
float
.
parse
float
(
tokens
[
2
]
)
)
)
;
}
}
else
if
(
first
char
==
'f'
)
{
string
[
]
parts
;
array
<
integer
>
faces
=
active
group
.
faces
;
for
(
int
i
=
1
;
i
<
tokens
.
length
-
2
;
i
--
)
{
parts
=
tokens
[
1
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
{
if
(
i
==
1
)
active
group
.
has
norms
=
true
;
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
}
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
{
if
(
i
==
1
)
active
group
.
has
u
vs
=
true
;
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
}
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
active
group
.
num
faces
++
;
}
}
else
if
(
first
char
==
'o'
||
first
char
==
'g'
)
{
if
(
tokens
.
length
>
1
)
active
group
=
set
active
group
(
tokens
[
1
]
)
;
else
active
group
=
set
active
group
(
"default"
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"mtllib"
)
)
{
mtl
.
load
(
file
.
parent
(
)
.
child
(
tokens
[
1
]
)
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"usemtl"
)
)
{
if
(
tokens
.
length
==
1
)
active
group
.
material
name
=
"default"
;
else
active
group
.
material
name
=
tokens
[
1
]
.
replace
(
'.'
,
'_'
)
;
}
}
reader
.
close
(
)
;
}
catch
(
io
exception
e
)
{
return
null
;
}
for
(
int
i
=
0
;
i
<
groups
.
size
;
i
++
)
{
if
(
groups
.
get
(
i
)
.
num
faces
<
1
)
{
groups
.
remove
index
(
i
)
;
i
--
;
}
}
if
(
groups
.
size
<
1
)
return
null
;
final
int
num
groups
=
groups
.
size
;
final
model
data
data
=
new
model
data
(
)
;
for
(
int
g
=
0
;
g
<
num
groups
;
g
++
)
{
group
group
=
groups
.
get
(
g
)
;
array
<
integer
>
faces
=
group
.
faces
;
final
int
num
elements
=
faces
.
size
;
final
int
num
faces
=
group
.
num
faces
;
final
boolean
has
norms
=
group
.
has
norms
;
final
boolean
has
u
vs
=
group
.
has
u
vs
;
final
float
[
]
final
verts
=
new
float
[
(
num
faces
*
3
)
*
(
3
+
(
has
norms
?
3
:
0
)
+
(
has
u
vs
?
2
:
0
)
)
]
;
for
(
int
i
=
0
,
vi
=
0
;
i
<
num
elements
;
)
{
int
vert
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
)
;
if
(
has
norms
)
{
int
norm
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
)
;
}
if
(
has
u
vs
)
{
int
uv
index
=
faces
.
get
(
i
++
)
*
2
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
++
)
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
)
;
}
}
final
int
num
indices
=
num
faces
*
3
>=
short
.
max
value
?
0
:
num
faces
*
3
;
final
short
[
]
final
indices
=
new
short
[
num
indices
]
;
if
(
num
indices
>
0
)
{
for
(
int
i
=
0
;
i
<
num
indices
;
i
++
)
{
final
indices
[
i
]
=
(
short
)
i
;
}
}
array
<
vertex
attribute
>
attributes
=
new
array
<
vertex
attribute
>
(
)
;
attributes
.
add
(
new
vertex
attribute
(
usage
.
position
,
3
,
shader
program
.
position
attribute
)
)
;
if
(
has
norms
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
normal
,
3
,
shader
program
.
normal
attribute
)
)
;
if
(
has
u
vs
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
texture
coordinates
,
2
,
shader
program
.
texcoord
attribute
+
"0"
)
)
;
string
string
id
=
integer
.
to
string
(
++
id
)
;
string
node
id
=
"default"
.
equals
(
group
.
name
)
?
"node"
+
string
id
:
group
.
name
;
string
mesh
id
=
"default"
.
equals
(
group
.
name
)
?
"mesh"
+
string
id
:
group
.
name
;
string
part
id
=
"default"
.
equals
(
group
.
name
)
?
"part"
+
string
id
:
group
.
name
;
model
node
node
=
new
model
node
(
)
;
node
.
id
=
node
id
;
node
.
mesh
id
=
mesh
id
;
node
.
scale
=
new
vector
3
(
1
,
1
,
1
)
;
node
.
translation
=
new
vector
3
(
)
;
node
.
rotation
=
new
quaternion
(
)
;
model
node
part
pm
=
new
model
node
part
(
)
;
pm
.
mesh
part
id
=
part
id
;
pm
.
material
id
=
group
.
material
name
;
node
.
parts
=
new
model
node
part
[
]
{
pm
}
;
model
mesh
part
part
=
new
model
mesh
part
(
)
;
part
.
id
=
part
id
;
part
.
indices
=
final
indices
;
part
.
primitive
type
=
gl
20
.
gl
triangles
;
model
mesh
mesh
=
new
model
mesh
(
)
;
mesh
.
id
=
mesh
id
;
mesh
.
attributes
=
attributes
.
to
array
(
vertex
attribute
.
class
)
;
mesh
.
vertices
=
final
verts
;
mesh
.
parts
=
new
model
mesh
part
[
]
{
part
}
;
data
.
nodes
.
add
(
node
)
;
data
.
meshes
.
add
(
mesh
)
;
model
material
mm
=
mtl
.
get
material
(
group
.
material
name
)
;
data
.
materials
.
add
(
mm
)
;
}
if
(
verts
.
size
>
0
)
verts
.
clear
(
)
;
if
(
norms
.
size
>
0
)
norms
.
clear
(
)
;
if
(
uvs
.
size
>
0
)
uvs
.
clear
(
)
;
if
(
groups
.
size
>
0
)
groups
.
clear
(
)
;
return
data
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
log
warning
)
gdx
.
app
.
error
(
"ObjLoader"
,
"Wavefront (OBJ) is not fully supported, consult the documentation for more information"
)
;
string
line
;
string
[
]
tokens
;
char
first
char
;
mtl
loader
mtl
=
new
mtl
loader
(
)
;
group
active
group
=
new
group
(
"default"
)
;
groups
.
add
(
active
group
)
;
buffered
reader
reader
=
new
buffered
reader
(
new
input
stream
reader
(
file
.
read
(
)
)
,
4096
)
;
int
id
=
0
;
try
{
while
(
(
line
=
reader
.
read
line
(
)
)
!=
null
)
{
tokens
=
line
.
split
(
"|s+"
)
;
if
(
tokens
.
length
<
1
)
break
;
if
(
tokens
[
0
]
.
length
(
)
==
0
)
{
continue
;
}
else
if
(
(
first
char
=
tokens
[
0
]
.
to
lower
case
(
)
.
char
at
(
0
)
)
==
'#'
)
{
continue
;
}
else
if
(
first
char
==
'v'
)
{
if
(
tokens
[
0
]
.
length
(
)
==
1
)
{
verts
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
'n'
)
{
norms
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
't'
)
{
uvs
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
uvs
.
add
(
(
flip
v
?
1
-
float
.
parse
float
(
tokens
[
2
]
)
:
float
.
parse
float
(
tokens
[
2
]
)
)
)
;
}
}
else
if
(
first
char
==
'f'
)
{
string
[
]
parts
;
array
<
integer
>
faces
=
active
group
.
faces
;
for
(
int
i
=
1
;
i
<
tokens
.
length
-
2
;
i
--
)
{
parts
=
tokens
[
1
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
{
if
(
i
==
1
)
active
group
.
has
norms
=
true
;
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
}
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
{
if
(
i
==
1
)
active
group
.
has
u
vs
=
true
;
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
}
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
active
group
.
num
faces
++
;
}
}
else
if
(
first
char
==
'o'
||
first
char
==
'g'
)
{
if
(
tokens
.
length
>
1
)
active
group
=
set
active
group
(
tokens
[
1
]
)
;
else
active
group
=
set
active
group
(
"default"
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"mtllib"
)
)
{
mtl
.
load
(
file
.
parent
(
)
.
child
(
tokens
[
1
]
)
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"usemtl"
)
)
{
if
(
tokens
.
length
==
1
)
active
group
.
material
name
=
"default"
;
else
active
group
.
material
name
=
tokens
[
1
]
.
replace
(
'.'
,
'_'
)
;
}
}
reader
.
close
(
)
;
}
catch
(
io
exception
e
)
{
return
null
;
}
for
(
int
i
=
0
;
i
<
groups
.
size
;
i
++
)
{
if
(
groups
.
get
(
i
)
.
num
faces
<
1
)
{
groups
.
remove
index
(
i
)
;
i
--
;
}
}
if
(
groups
.
size
<
1
)
return
null
;
final
int
num
groups
=
groups
.
size
;
final
model
data
data
=
new
model
data
(
)
;
for
(
int
g
=
0
;
g
<
num
groups
;
g
++
)
{
group
group
=
groups
.
get
(
g
)
;
array
<
integer
>
faces
=
group
.
faces
;
final
int
num
elements
=
faces
.
size
;
final
int
num
faces
=
group
.
num
faces
;
final
boolean
has
norms
=
group
.
has
norms
;
final
boolean
has
u
vs
=
group
.
has
u
vs
;
final
float
[
]
final
verts
=
new
float
[
(
num
faces
*
3
)
*
(
3
+
(
has
norms
?
3
:
0
)
+
(
has
u
vs
?
2
:
0
)
)
]
;
for
(
int
i
=
0
,
vi
=
0
;
i
<
num
elements
;
)
{
int
vert
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
)
;
if
(
has
norms
)
{
int
norm
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
)
;
}
if
(
has
u
vs
)
{
int
uv
index
=
faces
.
get
(
i
++
)
*
2
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
++
)
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
)
;
}
}
final
int
num
indices
=
num
faces
*
3
>=
short
.
max
value
?
0
:
num
faces
*
3
;
final
short
[
]
final
indices
=
new
short
[
num
indices
]
;
if
(
num
indices
>
0
)
{
for
(
int
i
=
0
;
i
<
num
indices
;
i
++
)
{
final
indices
[
i
]
=
(
short
)
i
;
}
}
array
<
vertex
attribute
>
attributes
=
new
array
<
vertex
attribute
>
(
)
;
attributes
.
add
(
new
vertex
attribute
(
usage
.
position
,
3
,
shader
program
.
position
attribute
)
)
;
if
(
has
norms
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
normal
,
3
,
shader
program
.
normal
attribute
)
)
;
if
(
has
u
vs
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
texture
coordinates
,
2
,
shader
program
.
texcoord
attribute
+
"0"
)
)
;
string
string
id
=
integer
.
to
string
(
++
id
)
;
string
node
id
=
"default"
.
equals
(
group
.
name
)
?
"node"
+
string
id
:
group
.
name
;
string
mesh
id
=
"default"
.
equals
(
group
.
name
)
?
"mesh"
+
string
id
:
group
.
name
;
string
part
id
=
"default"
.
equals
(
group
.
name
)
?
"part"
+
string
id
:
group
.
name
;
model
node
node
=
new
model
node
(
)
;
node
.
id
=
node
id
;
node
.
mesh
id
=
mesh
id
;
node
.
scale
=
new
vector
3
(
1
,
1
,
1
)
;
node
.
translation
=
new
vector
3
(
)
;
node
.
rotation
=
new
quaternion
(
)
;
model
node
part
pm
=
new
model
node
part
(
)
;
pm
.
mesh
part
id
=
part
id
;
pm
.
material
id
=
group
.
material
name
;
node
.
parts
=
new
model
node
part
[
]
{
pm
}
;
model
mesh
part
part
=
new
model
mesh
part
(
)
;
part
.
id
=
part
id
;
part
.
indices
=
final
indices
;
part
.
primitive
type
=
gl
20
.
gl
triangles
;
model
mesh
mesh
=
new
model
mesh
(
)
;
mesh
.
id
=
mesh
id
;
mesh
.
attributes
=
attributes
.
to
array
(
vertex
attribute
.
class
)
;
mesh
.
vertices
=
final
verts
;
mesh
.
parts
=
new
model
mesh
part
[
]
{
part
}
;
data
.
nodes
.
add
(
node
)
;
data
.
meshes
.
add
(
mesh
)
;
model
material
mm
=
mtl
.
get
material
(
group
.
material
name
)
;
data
.
materials
.
add
(
mm
)
;
}
if
(
verts
.
size
>
0
)
verts
.
clear
(
)
;
if
(
norms
.
size
>
0
)
norms
.
clear
(
)
;
if
(
uvs
.
size
>
0
)
uvs
.
clear
(
)
;
if
(
groups
.
size
>
0
)
groups
.
clear
(
)
;
return
data
;
}
<SENTENCE_END/>
data%END% (7.09e-01)
%UNK% (3.93e-02)
to (1.07e-02)
get (7.20e-03)
add (6.80e-03)
string (5.50e-03)
parse (5.35e-03)
index (3.52e-03)
create (2.81e-03)
load (2.70e-03)
<SENTENCE_START>
{
if
(
log
warning
)
gdx
.
app
.
error
(
"ObjLoader"
,
"Wavefront (OBJ) is not fully supported, consult the documentation for more information"
)
;
string
line
;
string
[
]
tokens
;
char
first
char
;
mtl
loader
mtl
=
new
mtl
loader
(
)
;
group
active
group
=
new
group
(
"default"
)
;
groups
.
add
(
active
group
)
;
buffered
reader
reader
=
new
buffered
reader
(
new
input
stream
reader
(
file
.
read
(
)
)
,
4096
)
;
int
id
=
0
;
try
{
while
(
(
line
=
reader
.
read
line
(
)
)
!=
null
)
{
tokens
=
line
.
split
(
"|s+"
)
;
if
(
tokens
.
length
<
1
)
break
;
if
(
tokens
[
0
]
.
length
(
)
==
0
)
{
continue
;
}
else
if
(
(
first
char
=
tokens
[
0
]
.
to
lower
case
(
)
.
char
at
(
0
)
)
==
'#'
)
{
continue
;
}
else
if
(
first
char
==
'v'
)
{
if
(
tokens
[
0
]
.
length
(
)
==
1
)
{
verts
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
'n'
)
{
norms
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
't'
)
{
uvs
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
uvs
.
add
(
(
flip
v
?
1
-
float
.
parse
float
(
tokens
[
2
]
)
:
float
.
parse
float
(
tokens
[
2
]
)
)
)
;
}
}
else
if
(
first
char
==
'f'
)
{
string
[
]
parts
;
array
<
integer
>
faces
=
active
group
.
faces
;
for
(
int
i
=
1
;
i
<
tokens
.
length
-
2
;
i
--
)
{
parts
=
tokens
[
1
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
{
if
(
i
==
1
)
active
group
.
has
norms
=
true
;
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
}
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
{
if
(
i
==
1
)
active
group
.
has
u
vs
=
true
;
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
}
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
active
group
.
num
faces
++
;
}
}
else
if
(
first
char
==
'o'
||
first
char
==
'g'
)
{
if
(
tokens
.
length
>
1
)
active
group
=
set
active
group
(
tokens
[
1
]
)
;
else
active
group
=
set
active
group
(
"default"
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"mtllib"
)
)
{
mtl
.
load
(
file
.
parent
(
)
.
child
(
tokens
[
1
]
)
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"usemtl"
)
)
{
if
(
tokens
.
length
==
1
)
active
group
.
material
name
=
"default"
;
else
active
group
.
material
name
=
tokens
[
1
]
.
replace
(
'.'
,
'_'
)
;
}
}
reader
.
close
(
)
;
}
catch
(
io
exception
e
)
{
return
null
;
}
for
(
int
i
=
0
;
i
<
groups
.
size
;
i
++
)
{
if
(
groups
.
get
(
i
)
.
num
faces
<
1
)
{
groups
.
remove
index
(
i
)
;
i
--
;
}
}
if
(
groups
.
size
<
1
)
return
null
;
final
int
num
groups
=
groups
.
size
;
final
model
data
data
=
new
model
data
(
)
;
for
(
int
g
=
0
;
g
<
num
groups
;
g
++
)
{
group
group
=
groups
.
get
(
g
)
;
array
<
integer
>
faces
=
group
.
faces
;
final
int
num
elements
=
faces
.
size
;
final
int
num
faces
=
group
.
num
faces
;
final
boolean
has
norms
=
group
.
has
norms
;
final
boolean
has
u
vs
=
group
.
has
u
vs
;
final
float
[
]
final
verts
=
new
float
[
(
num
faces
*
3
)
*
(
3
+
(
has
norms
?
3
:
0
)
+
(
has
u
vs
?
2
:
0
)
)
]
;
for
(
int
i
=
0
,
vi
=
0
;
i
<
num
elements
;
)
{
int
vert
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
)
;
if
(
has
norms
)
{
int
norm
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
)
;
}
if
(
has
u
vs
)
{
int
uv
index
=
faces
.
get
(
i
++
)
*
2
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
++
)
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
)
;
}
}
final
int
num
indices
=
num
faces
*
3
>=
short
.
max
value
?
0
:
num
faces
*
3
;
final
short
[
]
final
indices
=
new
short
[
num
indices
]
;
if
(
num
indices
>
0
)
{
for
(
int
i
=
0
;
i
<
num
indices
;
i
++
)
{
final
indices
[
i
]
=
(
short
)
i
;
}
}
array
<
vertex
attribute
>
attributes
=
new
array
<
vertex
attribute
>
(
)
;
attributes
.
add
(
new
vertex
attribute
(
usage
.
position
,
3
,
shader
program
.
position
attribute
)
)
;
if
(
has
norms
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
normal
,
3
,
shader
program
.
normal
attribute
)
)
;
if
(
has
u
vs
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
texture
coordinates
,
2
,
shader
program
.
texcoord
attribute
+
"0"
)
)
;
string
string
id
=
integer
.
to
string
(
++
id
)
;
string
node
id
=
"default"
.
equals
(
group
.
name
)
?
"node"
+
string
id
:
group
.
name
;
string
mesh
id
=
"default"
.
equals
(
group
.
name
)
?
"mesh"
+
string
id
:
group
.
name
;
string
part
id
=
"default"
.
equals
(
group
.
name
)
?
"part"
+
string
id
:
group
.
name
;
model
node
node
=
new
model
node
(
)
;
node
.
id
=
node
id
;
node
.
mesh
id
=
mesh
id
;
node
.
scale
=
new
vector
3
(
1
,
1
,
1
)
;
node
.
translation
=
new
vector
3
(
)
;
node
.
rotation
=
new
quaternion
(
)
;
model
node
part
pm
=
new
model
node
part
(
)
;
pm
.
mesh
part
id
=
part
id
;
pm
.
material
id
=
group
.
material
name
;
node
.
parts
=
new
model
node
part
[
]
{
pm
}
;
model
mesh
part
part
=
new
model
mesh
part
(
)
;
part
.
id
=
part
id
;
part
.
indices
=
final
indices
;
part
.
primitive
type
=
gl
20
.
gl
triangles
;
model
mesh
mesh
=
new
model
mesh
(
)
;
mesh
.
id
=
mesh
id
;
mesh
.
attributes
=
attributes
.
to
array
(
vertex
attribute
.
class
)
;
mesh
.
vertices
=
final
verts
;
mesh
.
parts
=
new
model
mesh
part
[
]
{
part
}
;
data
.
nodes
.
add
(
node
)
;
data
.
meshes
.
add
(
mesh
)
;
model
material
mm
=
mtl
.
get
material
(
group
.
material
name
)
;
data
.
materials
.
add
(
mm
)
;
}
if
(
verts
.
size
>
0
)
verts
.
clear
(
)
;
if
(
norms
.
size
>
0
)
norms
.
clear
(
)
;
if
(
uvs
.
size
>
0
)
uvs
.
clear
(
)
;
if
(
groups
.
size
>
0
)
groups
.
clear
(
)
;
return
data
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
log
warning
)
gdx
.
app
.
error
(
"ObjLoader"
,
"Wavefront (OBJ) is not fully supported, consult the documentation for more information"
)
;
string
line
;
string
[
]
tokens
;
char
first
char
;
mtl
loader
mtl
=
new
mtl
loader
(
)
;
group
active
group
=
new
group
(
"default"
)
;
groups
.
add
(
active
group
)
;
buffered
reader
reader
=
new
buffered
reader
(
new
input
stream
reader
(
file
.
read
(
)
)
,
4096
)
;
int
id
=
0
;
try
{
while
(
(
line
=
reader
.
read
line
(
)
)
!=
null
)
{
tokens
=
line
.
split
(
"|s+"
)
;
if
(
tokens
.
length
<
1
)
break
;
if
(
tokens
[
0
]
.
length
(
)
==
0
)
{
continue
;
}
else
if
(
(
first
char
=
tokens
[
0
]
.
to
lower
case
(
)
.
char
at
(
0
)
)
==
'#'
)
{
continue
;
}
else
if
(
first
char
==
'v'
)
{
if
(
tokens
[
0
]
.
length
(
)
==
1
)
{
verts
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
'n'
)
{
norms
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
't'
)
{
uvs
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
uvs
.
add
(
(
flip
v
?
1
-
float
.
parse
float
(
tokens
[
2
]
)
:
float
.
parse
float
(
tokens
[
2
]
)
)
)
;
}
}
else
if
(
first
char
==
'f'
)
{
string
[
]
parts
;
array
<
integer
>
faces
=
active
group
.
faces
;
for
(
int
i
=
1
;
i
<
tokens
.
length
-
2
;
i
--
)
{
parts
=
tokens
[
1
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
{
if
(
i
==
1
)
active
group
.
has
norms
=
true
;
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
}
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
{
if
(
i
==
1
)
active
group
.
has
u
vs
=
true
;
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
}
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
active
group
.
num
faces
++
;
}
}
else
if
(
first
char
==
'o'
||
first
char
==
'g'
)
{
if
(
tokens
.
length
>
1
)
active
group
=
set
active
group
(
tokens
[
1
]
)
;
else
active
group
=
set
active
group
(
"default"
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"mtllib"
)
)
{
mtl
.
load
(
file
.
parent
(
)
.
child
(
tokens
[
1
]
)
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"usemtl"
)
)
{
if
(
tokens
.
length
==
1
)
active
group
.
material
name
=
"default"
;
else
active
group
.
material
name
=
tokens
[
1
]
.
replace
(
'.'
,
'_'
)
;
}
}
reader
.
close
(
)
;
}
catch
(
io
exception
e
)
{
return
null
;
}
for
(
int
i
=
0
;
i
<
groups
.
size
;
i
++
)
{
if
(
groups
.
get
(
i
)
.
num
faces
<
1
)
{
groups
.
remove
index
(
i
)
;
i
--
;
}
}
if
(
groups
.
size
<
1
)
return
null
;
final
int
num
groups
=
groups
.
size
;
final
model
data
data
=
new
model
data
(
)
;
for
(
int
g
=
0
;
g
<
num
groups
;
g
++
)
{
group
group
=
groups
.
get
(
g
)
;
array
<
integer
>
faces
=
group
.
faces
;
final
int
num
elements
=
faces
.
size
;
final
int
num
faces
=
group
.
num
faces
;
final
boolean
has
norms
=
group
.
has
norms
;
final
boolean
has
u
vs
=
group
.
has
u
vs
;
final
float
[
]
final
verts
=
new
float
[
(
num
faces
*
3
)
*
(
3
+
(
has
norms
?
3
:
0
)
+
(
has
u
vs
?
2
:
0
)
)
]
;
for
(
int
i
=
0
,
vi
=
0
;
i
<
num
elements
;
)
{
int
vert
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
)
;
if
(
has
norms
)
{
int
norm
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
)
;
}
if
(
has
u
vs
)
{
int
uv
index
=
faces
.
get
(
i
++
)
*
2
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
++
)
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
)
;
}
}
final
int
num
indices
=
num
faces
*
3
>=
short
.
max
value
?
0
:
num
faces
*
3
;
final
short
[
]
final
indices
=
new
short
[
num
indices
]
;
if
(
num
indices
>
0
)
{
for
(
int
i
=
0
;
i
<
num
indices
;
i
++
)
{
final
indices
[
i
]
=
(
short
)
i
;
}
}
array
<
vertex
attribute
>
attributes
=
new
array
<
vertex
attribute
>
(
)
;
attributes
.
add
(
new
vertex
attribute
(
usage
.
position
,
3
,
shader
program
.
position
attribute
)
)
;
if
(
has
norms
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
normal
,
3
,
shader
program
.
normal
attribute
)
)
;
if
(
has
u
vs
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
texture
coordinates
,
2
,
shader
program
.
texcoord
attribute
+
"0"
)
)
;
string
string
id
=
integer
.
to
string
(
++
id
)
;
string
node
id
=
"default"
.
equals
(
group
.
name
)
?
"node"
+
string
id
:
group
.
name
;
string
mesh
id
=
"default"
.
equals
(
group
.
name
)
?
"mesh"
+
string
id
:
group
.
name
;
string
part
id
=
"default"
.
equals
(
group
.
name
)
?
"part"
+
string
id
:
group
.
name
;
model
node
node
=
new
model
node
(
)
;
node
.
id
=
node
id
;
node
.
mesh
id
=
mesh
id
;
node
.
scale
=
new
vector
3
(
1
,
1
,
1
)
;
node
.
translation
=
new
vector
3
(
)
;
node
.
rotation
=
new
quaternion
(
)
;
model
node
part
pm
=
new
model
node
part
(
)
;
pm
.
mesh
part
id
=
part
id
;
pm
.
material
id
=
group
.
material
name
;
node
.
parts
=
new
model
node
part
[
]
{
pm
}
;
model
mesh
part
part
=
new
model
mesh
part
(
)
;
part
.
id
=
part
id
;
part
.
indices
=
final
indices
;
part
.
primitive
type
=
gl
20
.
gl
triangles
;
model
mesh
mesh
=
new
model
mesh
(
)
;
mesh
.
id
=
mesh
id
;
mesh
.
attributes
=
attributes
.
to
array
(
vertex
attribute
.
class
)
;
mesh
.
vertices
=
final
verts
;
mesh
.
parts
=
new
model
mesh
part
[
]
{
part
}
;
data
.
nodes
.
add
(
node
)
;
data
.
meshes
.
add
(
mesh
)
;
model
material
mm
=
mtl
.
get
material
(
group
.
material
name
)
;
data
.
materials
.
add
(
mm
)
;
}
if
(
verts
.
size
>
0
)
verts
.
clear
(
)
;
if
(
norms
.
size
>
0
)
norms
.
clear
(
)
;
if
(
uvs
.
size
>
0
)
uvs
.
clear
(
)
;
if
(
groups
.
size
>
0
)
groups
.
clear
(
)
;
return
data
;
}
<SENTENCE_END/>
%END%%END% (7.26e-01)
%UNK% (3.83e-02)
to (1.06e-02)
get (6.85e-03)
add (6.58e-03)
string (5.33e-03)
parse (5.19e-03)
index (3.23e-03)
create (2.75e-03)
and (2.67e-03)
<SENTENCE_START>
{
if
(
log
warning
)
gdx
.
app
.
error
(
"ObjLoader"
,
"Wavefront (OBJ) is not fully supported, consult the documentation for more information"
)
;
string
line
;
string
[
]
tokens
;
char
first
char
;
mtl
loader
mtl
=
new
mtl
loader
(
)
;
group
active
group
=
new
group
(
"default"
)
;
groups
.
add
(
active
group
)
;
buffered
reader
reader
=
new
buffered
reader
(
new
input
stream
reader
(
file
.
read
(
)
)
,
4096
)
;
int
id
=
0
;
try
{
while
(
(
line
=
reader
.
read
line
(
)
)
!=
null
)
{
tokens
=
line
.
split
(
"|s+"
)
;
if
(
tokens
.
length
<
1
)
break
;
if
(
tokens
[
0
]
.
length
(
)
==
0
)
{
continue
;
}
else
if
(
(
first
char
=
tokens
[
0
]
.
to
lower
case
(
)
.
char
at
(
0
)
)
==
'#'
)
{
continue
;
}
else
if
(
first
char
==
'v'
)
{
if
(
tokens
[
0
]
.
length
(
)
==
1
)
{
verts
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
'n'
)
{
norms
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
't'
)
{
uvs
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
uvs
.
add
(
(
flip
v
?
1
-
float
.
parse
float
(
tokens
[
2
]
)
:
float
.
parse
float
(
tokens
[
2
]
)
)
)
;
}
}
else
if
(
first
char
==
'f'
)
{
string
[
]
parts
;
array
<
integer
>
faces
=
active
group
.
faces
;
for
(
int
i
=
1
;
i
<
tokens
.
length
-
2
;
i
--
)
{
parts
=
tokens
[
1
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
{
if
(
i
==
1
)
active
group
.
has
norms
=
true
;
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
}
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
{
if
(
i
==
1
)
active
group
.
has
u
vs
=
true
;
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
}
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
active
group
.
num
faces
++
;
}
}
else
if
(
first
char
==
'o'
||
first
char
==
'g'
)
{
if
(
tokens
.
length
>
1
)
active
group
=
set
active
group
(
tokens
[
1
]
)
;
else
active
group
=
set
active
group
(
"default"
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"mtllib"
)
)
{
mtl
.
load
(
file
.
parent
(
)
.
child
(
tokens
[
1
]
)
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"usemtl"
)
)
{
if
(
tokens
.
length
==
1
)
active
group
.
material
name
=
"default"
;
else
active
group
.
material
name
=
tokens
[
1
]
.
replace
(
'.'
,
'_'
)
;
}
}
reader
.
close
(
)
;
}
catch
(
io
exception
e
)
{
return
null
;
}
for
(
int
i
=
0
;
i
<
groups
.
size
;
i
++
)
{
if
(
groups
.
get
(
i
)
.
num
faces
<
1
)
{
groups
.
remove
index
(
i
)
;
i
--
;
}
}
if
(
groups
.
size
<
1
)
return
null
;
final
int
num
groups
=
groups
.
size
;
final
model
data
data
=
new
model
data
(
)
;
for
(
int
g
=
0
;
g
<
num
groups
;
g
++
)
{
group
group
=
groups
.
get
(
g
)
;
array
<
integer
>
faces
=
group
.
faces
;
final
int
num
elements
=
faces
.
size
;
final
int
num
faces
=
group
.
num
faces
;
final
boolean
has
norms
=
group
.
has
norms
;
final
boolean
has
u
vs
=
group
.
has
u
vs
;
final
float
[
]
final
verts
=
new
float
[
(
num
faces
*
3
)
*
(
3
+
(
has
norms
?
3
:
0
)
+
(
has
u
vs
?
2
:
0
)
)
]
;
for
(
int
i
=
0
,
vi
=
0
;
i
<
num
elements
;
)
{
int
vert
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
)
;
if
(
has
norms
)
{
int
norm
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
)
;
}
if
(
has
u
vs
)
{
int
uv
index
=
faces
.
get
(
i
++
)
*
2
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
++
)
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
)
;
}
}
final
int
num
indices
=
num
faces
*
3
>=
short
.
max
value
?
0
:
num
faces
*
3
;
final
short
[
]
final
indices
=
new
short
[
num
indices
]
;
if
(
num
indices
>
0
)
{
for
(
int
i
=
0
;
i
<
num
indices
;
i
++
)
{
final
indices
[
i
]
=
(
short
)
i
;
}
}
array
<
vertex
attribute
>
attributes
=
new
array
<
vertex
attribute
>
(
)
;
attributes
.
add
(
new
vertex
attribute
(
usage
.
position
,
3
,
shader
program
.
position
attribute
)
)
;
if
(
has
norms
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
normal
,
3
,
shader
program
.
normal
attribute
)
)
;
if
(
has
u
vs
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
texture
coordinates
,
2
,
shader
program
.
texcoord
attribute
+
"0"
)
)
;
string
string
id
=
integer
.
to
string
(
++
id
)
;
string
node
id
=
"default"
.
equals
(
group
.
name
)
?
"node"
+
string
id
:
group
.
name
;
string
mesh
id
=
"default"
.
equals
(
group
.
name
)
?
"mesh"
+
string
id
:
group
.
name
;
string
part
id
=
"default"
.
equals
(
group
.
name
)
?
"part"
+
string
id
:
group
.
name
;
model
node
node
=
new
model
node
(
)
;
node
.
id
=
node
id
;
node
.
mesh
id
=
mesh
id
;
node
.
scale
=
new
vector
3
(
1
,
1
,
1
)
;
node
.
translation
=
new
vector
3
(
)
;
node
.
rotation
=
new
quaternion
(
)
;
model
node
part
pm
=
new
model
node
part
(
)
;
pm
.
mesh
part
id
=
part
id
;
pm
.
material
id
=
group
.
material
name
;
node
.
parts
=
new
model
node
part
[
]
{
pm
}
;
model
mesh
part
part
=
new
model
mesh
part
(
)
;
part
.
id
=
part
id
;
part
.
indices
=
final
indices
;
part
.
primitive
type
=
gl
20
.
gl
triangles
;
model
mesh
mesh
=
new
model
mesh
(
)
;
mesh
.
id
=
mesh
id
;
mesh
.
attributes
=
attributes
.
to
array
(
vertex
attribute
.
class
)
;
mesh
.
vertices
=
final
verts
;
mesh
.
parts
=
new
model
mesh
part
[
]
{
part
}
;
data
.
nodes
.
add
(
node
)
;
data
.
meshes
.
add
(
mesh
)
;
model
material
mm
=
mtl
.
get
material
(
group
.
material
name
)
;
data
.
materials
.
add
(
mm
)
;
}
if
(
verts
.
size
>
0
)
verts
.
clear
(
)
;
if
(
norms
.
size
>
0
)
norms
.
clear
(
)
;
if
(
uvs
.
size
>
0
)
uvs
.
clear
(
)
;
if
(
groups
.
size
>
0
)
groups
.
clear
(
)
;
return
data
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
log
warning
)
gdx
.
app
.
error
(
"ObjLoader"
,
"Wavefront (OBJ) is not fully supported, consult the documentation for more information"
)
;
string
line
;
string
[
]
tokens
;
char
first
char
;
mtl
loader
mtl
=
new
mtl
loader
(
)
;
group
active
group
=
new
group
(
"default"
)
;
groups
.
add
(
active
group
)
;
buffered
reader
reader
=
new
buffered
reader
(
new
input
stream
reader
(
file
.
read
(
)
)
,
4096
)
;
int
id
=
0
;
try
{
while
(
(
line
=
reader
.
read
line
(
)
)
!=
null
)
{
tokens
=
line
.
split
(
"|s+"
)
;
if
(
tokens
.
length
<
1
)
break
;
if
(
tokens
[
0
]
.
length
(
)
==
0
)
{
continue
;
}
else
if
(
(
first
char
=
tokens
[
0
]
.
to
lower
case
(
)
.
char
at
(
0
)
)
==
'#'
)
{
continue
;
}
else
if
(
first
char
==
'v'
)
{
if
(
tokens
[
0
]
.
length
(
)
==
1
)
{
verts
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
verts
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
'n'
)
{
norms
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
2
]
)
)
;
norms
.
add
(
float
.
parse
float
(
tokens
[
3
]
)
)
;
}
else
if
(
tokens
[
0
]
.
char
at
(
1
)
==
't'
)
{
uvs
.
add
(
float
.
parse
float
(
tokens
[
1
]
)
)
;
uvs
.
add
(
(
flip
v
?
1
-
float
.
parse
float
(
tokens
[
2
]
)
:
float
.
parse
float
(
tokens
[
2
]
)
)
)
;
}
}
else
if
(
first
char
==
'f'
)
{
string
[
]
parts
;
array
<
integer
>
faces
=
active
group
.
faces
;
for
(
int
i
=
1
;
i
<
tokens
.
length
-
2
;
i
--
)
{
parts
=
tokens
[
1
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
{
if
(
i
==
1
)
active
group
.
has
norms
=
true
;
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
}
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
{
if
(
i
==
1
)
active
group
.
has
u
vs
=
true
;
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
}
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
parts
=
tokens
[
++
i
]
.
split
(
"/"
)
;
faces
.
add
(
get
index
(
parts
[
0
]
,
verts
.
size
)
)
;
if
(
parts
.
length
>
2
)
faces
.
add
(
get
index
(
parts
[
2
]
,
norms
.
size
)
)
;
if
(
parts
.
length
>
1
&&
parts
[
1
]
.
length
(
)
>
0
)
faces
.
add
(
get
index
(
parts
[
1
]
,
uvs
.
size
)
)
;
active
group
.
num
faces
++
;
}
}
else
if
(
first
char
==
'o'
||
first
char
==
'g'
)
{
if
(
tokens
.
length
>
1
)
active
group
=
set
active
group
(
tokens
[
1
]
)
;
else
active
group
=
set
active
group
(
"default"
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"mtllib"
)
)
{
mtl
.
load
(
file
.
parent
(
)
.
child
(
tokens
[
1
]
)
)
;
}
else
if
(
tokens
[
0
]
.
equals
(
"usemtl"
)
)
{
if
(
tokens
.
length
==
1
)
active
group
.
material
name
=
"default"
;
else
active
group
.
material
name
=
tokens
[
1
]
.
replace
(
'.'
,
'_'
)
;
}
}
reader
.
close
(
)
;
}
catch
(
io
exception
e
)
{
return
null
;
}
for
(
int
i
=
0
;
i
<
groups
.
size
;
i
++
)
{
if
(
groups
.
get
(
i
)
.
num
faces
<
1
)
{
groups
.
remove
index
(
i
)
;
i
--
;
}
}
if
(
groups
.
size
<
1
)
return
null
;
final
int
num
groups
=
groups
.
size
;
final
model
data
data
=
new
model
data
(
)
;
for
(
int
g
=
0
;
g
<
num
groups
;
g
++
)
{
group
group
=
groups
.
get
(
g
)
;
array
<
integer
>
faces
=
group
.
faces
;
final
int
num
elements
=
faces
.
size
;
final
int
num
faces
=
group
.
num
faces
;
final
boolean
has
norms
=
group
.
has
norms
;
final
boolean
has
u
vs
=
group
.
has
u
vs
;
final
float
[
]
final
verts
=
new
float
[
(
num
faces
*
3
)
*
(
3
+
(
has
norms
?
3
:
0
)
+
(
has
u
vs
?
2
:
0
)
)
]
;
for
(
int
i
=
0
,
vi
=
0
;
i
<
num
elements
;
)
{
int
vert
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
++
)
;
final
verts
[
vi
++
]
=
verts
.
get
(
vert
index
)
;
if
(
has
norms
)
{
int
norm
index
=
faces
.
get
(
i
++
)
*
3
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
++
)
;
final
verts
[
vi
++
]
=
norms
.
get
(
norm
index
)
;
}
if
(
has
u
vs
)
{
int
uv
index
=
faces
.
get
(
i
++
)
*
2
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
++
)
;
final
verts
[
vi
++
]
=
uvs
.
get
(
uv
index
)
;
}
}
final
int
num
indices
=
num
faces
*
3
>=
short
.
max
value
?
0
:
num
faces
*
3
;
final
short
[
]
final
indices
=
new
short
[
num
indices
]
;
if
(
num
indices
>
0
)
{
for
(
int
i
=
0
;
i
<
num
indices
;
i
++
)
{
final
indices
[
i
]
=
(
short
)
i
;
}
}
array
<
vertex
attribute
>
attributes
=
new
array
<
vertex
attribute
>
(
)
;
attributes
.
add
(
new
vertex
attribute
(
usage
.
position
,
3
,
shader
program
.
position
attribute
)
)
;
if
(
has
norms
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
normal
,
3
,
shader
program
.
normal
attribute
)
)
;
if
(
has
u
vs
)
attributes
.
add
(
new
vertex
attribute
(
usage
.
texture
coordinates
,
2
,
shader
program
.
texcoord
attribute
+
"0"
)
)
;
string
string
id
=
integer
.
to
string
(
++
id
)
;
string
node
id
=
"default"
.
equals
(
group
.
name
)
?
"node"
+
string
id
:
group
.
name
;
string
mesh
id
=
"default"
.
equals
(
group
.
name
)
?
"mesh"
+
string
id
:
group
.
name
;
string
part
id
=
"default"
.
equals
(
group
.
name
)
?
"part"
+
string
id
:
group
.
name
;
model
node
node
=
new
model
node
(
)
;
node
.
id
=
node
id
;
node
.
mesh
id
=
mesh
id
;
node
.
scale
=
new
vector
3
(
1
,
1
,
1
)
;
node
.
translation
=
new
vector
3
(
)
;
node
.
rotation
=
new
quaternion
(
)
;
model
node
part
pm
=
new
model
node
part
(
)
;
pm
.
mesh
part
id
=
part
id
;
pm
.
material
id
=
group
.
material
name
;
node
.
parts
=
new
model
node
part
[
]
{
pm
}
;
model
mesh
part
part
=
new
model
mesh
part
(
)
;
part
.
id
=
part
id
;
part
.
indices
=
final
indices
;
part
.
primitive
type
=
gl
20
.
gl
triangles
;
model
mesh
mesh
=
new
model
mesh
(
)
;
mesh
.
id
=
mesh
id
;
mesh
.
attributes
=
attributes
.
to
array
(
vertex
attribute
.
class
)
;
mesh
.
vertices
=
final
verts
;
mesh
.
parts
=
new
model
mesh
part
[
]
{
part
}
;
data
.
nodes
.
add
(
node
)
;
data
.
meshes
.
add
(
mesh
)
;
model
material
mm
=
mtl
.
get
material
(
group
.
material
name
)
;
data
.
materials
.
add
(
mm
)
;
}
if
(
verts
.
size
>
0
)
verts
.
clear
(
)
;
if
(
norms
.
size
>
0
)
norms
.
clear
(
)
;
if
(
uvs
.
size
>
0
)
uvs
.
clear
(
)
;
if
(
groups
.
size
>
0
)
groups
.
clear
(
)
;
return
data
;
}
<SENTENCE_END/>
set,active,groupsetget (5.92e-01)
%UNK% (6.67e-02)
create (5.33e-02)
compute (4.21e-02)
group (3.28e-02)
calculate (1.49e-02)
is (1.03e-02)
for (8.84e-03)
add (8.32e-03)
generate (7.39e-03)
<SENTENCE_START>
{
for
(
group
group
:
groups
)
{
if
(
group
.
name
.
equals
(
name
)
)
return
group
;
}
group
group
=
new
group
(
name
)
;
groups
.
add
(
group
)
;
return
group
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
group
group
:
groups
)
{
if
(
group
.
name
.
equals
(
name
)
)
return
group
;
}
group
group
=
new
group
(
name
)
;
groups
.
add
(
group
)
;
return
group
;
}
<SENTENCE_END/>
activegroup (7.05e-01)
%UNK% (5.62e-02)
return (1.32e-02)
groups (1.26e-02)
new (9.80e-03)
%END% (8.50e-03)
string (7.98e-03)
in (7.18e-03)
get (7.05e-03)
bounding (6.19e-03)
<SENTENCE_START>
{
for
(
group
group
:
groups
)
{
if
(
group
.
name
.
equals
(
name
)
)
return
group
;
}
group
group
=
new
group
(
name
)
;
groups
.
add
(
group
)
;
return
group
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
group
group
:
groups
)
{
if
(
group
.
name
.
equals
(
name
)
)
return
group
;
}
group
group
=
new
group
(
name
)
;
groups
.
add
(
group
)
;
return
group
;
}
<SENTENCE_END/>
groupgroup (6.88e-01)
%END% (1.58e-01)
%UNK% (1.73e-02)
new (9.35e-03)
groups (8.98e-03)
string (7.38e-03)
name (4.16e-03)
return (3.50e-03)
equals (1.83e-03)
in (1.80e-03)
<SENTENCE_START>
{
for
(
group
group
:
groups
)
{
if
(
group
.
name
.
equals
(
name
)
)
return
group
;
}
group
group
=
new
group
(
name
)
;
groups
.
add
(
group
)
;
return
group
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
group
group
:
groups
)
{
if
(
group
.
name
.
equals
(
name
)
)
return
group
;
}
group
group
=
new
group
(
name
)
;
groups
.
add
(
group
)
;
return
group
;
}
<SENTENCE_END/>
%END%%END% (8.47e-01)
group (7.95e-02)
string (5.25e-03)
%UNK% (4.53e-03)
new (2.31e-03)
return (2.09e-03)
groups (1.97e-03)
at (1.45e-03)
name (1.40e-03)
types (1.22e-03)
<SENTENCE_START>
{
for
(
group
group
:
groups
)
{
if
(
group
.
name
.
equals
(
name
)
)
return
group
;
}
group
group
=
new
group
(
name
)
;
groups
.
add
(
group
)
;
return
group
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
group
group
:
groups
)
{
if
(
group
.
name
.
equals
(
name
)
)
return
group
;
}
group
group
=
new
group
(
name
)
;
groups
.
add
(
group
)
;
return
group
;
}
<SENTENCE_END/>
get,indexgetindex (6.78e-02)
read (5.52e-02)
%UNK% (5.31e-02)
fast (4.71e-02)
of (4.17e-02)
get (4.13e-02)
state (2.55e-02)
int (2.49e-02)
extend (2.19e-02)
is (1.80e-02)
<SENTENCE_START>
{
if
(
index
==
null
||
index
.
length
(
)
==
0
)
return
0
;
final
int
idx
=
integer
.
parse
int
(
index
)
;
if
(
idx
<
0
)
return
size
+
idx
;
else
return
idx
-
1
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
index
==
null
||
index
.
length
(
)
==
0
)
return
0
;
final
int
idx
=
integer
.
parse
int
(
index
)
;
if
(
idx
<
0
)
return
size
+
idx
;
else
return
idx
-
1
;
}
<SENTENCE_END/>
index%END% (4.35e-01)
int (2.34e-01)
index (2.65e-02)
of (2.11e-02)
parse (1.95e-02)
value (1.54e-02)
string (1.54e-02)
%UNK% (1.14e-02)
0 (1.10e-02)
at (9.68e-03)
<SENTENCE_START>
{
if
(
index
==
null
||
index
.
length
(
)
==
0
)
return
0
;
final
int
idx
=
integer
.
parse
int
(
index
)
;
if
(
idx
<
0
)
return
size
+
idx
;
else
return
idx
-
1
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
index
==
null
||
index
.
length
(
)
==
0
)
return
0
;
final
int
idx
=
integer
.
parse
int
(
index
)
;
if
(
idx
<
0
)
return
size
+
idx
;
else
return
idx
-
1
;
}
<SENTENCE_END/>
%END%%END% (8.23e-01)
int (1.72e-02)
index (1.03e-02)
of (8.55e-03)
string (8.34e-03)
value (8.28e-03)
0 (5.33e-03)
at (5.24e-03)
%UNK% (5.03e-03)
char (3.14e-03)
<SENTENCE_START>
{
if
(
index
==
null
||
index
.
length
(
)
==
0
)
return
0
;
final
int
idx
=
integer
.
parse
int
(
index
)
;
if
(
idx
<
0
)
return
size
+
idx
;
else
return
idx
-
1
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
index
==
null
||
index
.
length
(
)
==
0
)
return
0
;
final
int
idx
=
integer
.
parse
int
(
index
)
;
if
(
idx
<
0
)
return
size
+
idx
;
else
return
idx
-
1
;
}
<SENTENCE_END/>
loadload%UNK% (1.21e-01)
parse (7.94e-02)
load (7.58e-02)
%END% (6.87e-02)
create (6.76e-02)
set (6.21e-02)
add (3.48e-02)
write (2.53e-02)
convert (1.61e-02)
copy (1.59e-02)
<SENTENCE_START>
{
string
line
;
string
[
]
tokens
;
string
cur
mat
name
=
"default"
;
color
difcolor
=
color
.
white
;
color
speccolor
=
color
.
white
;
float
opacity
=
1.f
;
float
shininess
=
0.f
;
string
tex
filename
=
null
;
if
(
file
==
null
||
file
.
exists
(
)
==
false
)
return
;
buffered
reader
reader
=
new
buffered
reader
(
new
input
stream
reader
(
file
.
read
(
)
)
,
4096
)
;
try
{
while
(
(
line
=
reader
.
read
line
(
)
)
!=
null
)
{
if
(
line
.
length
(
)
>
0
&&
line
.
char
at
(
0
)
==
'|t'
)
line
=
line
.
substring
(
1
)
.
trim
(
)
;
tokens
=
line
.
split
(
"|s+"
)
;
if
(
tokens
[
0
]
.
length
(
)
==
0
)
{
continue
;
}
else
if
(
tokens
[
0
]
.
char
at
(
0
)
==
'#'
)
continue
;
else
{
final
string
key
=
tokens
[
0
]
.
to
lower
case
(
)
;
if
(
key
.
equals
(
"newmtl"
)
)
{
model
material
mat
=
new
model
material
(
)
;
mat
.
id
=
cur
mat
name
;
mat
.
diffuse
=
new
color
(
difcolor
)
;
mat
.
specular
=
new
color
(
speccolor
)
;
mat
.
opacity
=
opacity
;
mat
.
shininess
=
shininess
;
if
(
tex
filename
!=
null
)
{
model
texture
tex
=
new
model
texture
(
)
;
tex
.
usage
=
model
texture
.
usage
diffuse
;
tex
.
file
name
=
new
string
(
tex
filename
)
;
if
(
mat
.
textures
==
null
)
mat
.
textures
=
new
array
<
model
texture
>
(
1
)
;
mat
.
textures
.
add
(
tex
)
;
}
materials
.
add
(
mat
)
;
if
(
tokens
.
length
>
1
)
{
cur
mat
name
=
tokens
[
1
]
;
cur
mat
name
=
cur
mat
name
.
replace
(
'.'
,
'_'
)
;
}
else
cur
mat
name
=
"default"
;
difcolor
=
color
.
white
;
speccolor
=
color
.
white
;
opacity
=
1.f
;
shininess
=
0.f
;
}
else
if
(
key
.
equals
(
"kd"
)
||
key
.
equals
(
"ks"
)
)
{
float
r
=
float
.
parse
float
(
tokens
[
1
]
)
;
float
g
=
float
.
parse
float
(
tokens
[
2
]
)
;
float
b
=
float
.
parse
float
(
tokens
[
3
]
)
;
float
a
=
1
;
if
(
tokens
.
length
>
4
)
a
=
float
.
parse
float
(
tokens
[
4
]
)
;
if
(
tokens
[
0
]
.
to
lower
case
(
)
.
equals
(
"kd"
)
)
{
difcolor
=
new
color
(
)
;
difcolor
.
set
(
r
,
g
,
b
,
a
)
;
}
else
{
speccolor
=
new
color
(
)
;
speccolor
.
set
(
r
,
g
,
b
,
a
)
;
}
}
else
if
(
key
.
equals
(
"tr"
)
||
key
.
equals
(
"d"
)
)
{
opacity
=
float
.
parse
float
(
tokens
[
1
]
)
;
}
else
if
(
key
.
equals
(
"ns"
)
)
{
shininess
=
float
.
parse
float
(
tokens
[
1
]
)
;
}
else
if
(
key
.
equals
(
"map_kd"
)
)
{
tex
filename
=
file
.
parent
(
)
.
child
(
tokens
[
1
]
)
.
path
(
)
;
}
}
}
reader
.
close
(
)
;
}
catch
(
io
exception
e
)
{
return
;
}
model
material
mat
=
new
model
material
(
)
;
mat
.
id
=
cur
mat
name
;
mat
.
diffuse
=
new
color
(
difcolor
)
;
mat
.
specular
=
new
color
(
speccolor
)
;
mat
.
opacity
=
opacity
;
mat
.
shininess
=
shininess
;
if
(
tex
filename
!=
null
)
{
model
texture
tex
=
new
model
texture
(
)
;
tex
.
usage
=
model
texture
.
usage
diffuse
;
tex
.
file
name
=
new
string
(
tex
filename
)
;
if
(
mat
.
textures
==
null
)
mat
.
textures
=
new
array
<
model
texture
>
(
1
)
;
mat
.
textures
.
add
(
tex
)
;
}
materials
.
add
(
mat
)
;
return
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
string
line
;
string
[
]
tokens
;
string
cur
mat
name
=
"default"
;
color
difcolor
=
color
.
white
;
color
speccolor
=
color
.
white
;
float
opacity
=
1.f
;
float
shininess
=
0.f
;
string
tex
filename
=
null
;
if
(
file
==
null
||
file
.
exists
(
)
==
false
)
return
;
buffered
reader
reader
=
new
buffered
reader
(
new
input
stream
reader
(
file
.
read
(
)
)
,
4096
)
;
try
{
while
(
(
line
=
reader
.
read
line
(
)
)
!=
null
)
{
if
(
line
.
length
(
)
>
0
&&
line
.
char
at
(
0
)
==
'|t'
)
line
=
line
.
substring
(
1
)
.
trim
(
)
;
tokens
=
line
.
split
(
"|s+"
)
;
if
(
tokens
[
0
]
.
length
(
)
==
0
)
{
continue
;
}
else
if
(
tokens
[
0
]
.
char
at
(
0
)
==
'#'
)
continue
;
else
{
final
string
key
=
tokens
[
0
]
.
to
lower
case
(
)
;
if
(
key
.
equals
(
"newmtl"
)
)
{
model
material
mat
=
new
model
material
(
)
;
mat
.
id
=
cur
mat
name
;
mat
.
diffuse
=
new
color
(
difcolor
)
;
mat
.
specular
=
new
color
(
speccolor
)
;
mat
.
opacity
=
opacity
;
mat
.
shininess
=
shininess
;
if
(
tex
filename
!=
null
)
{
model
texture
tex
=
new
model
texture
(
)
;
tex
.
usage
=
model
texture
.
usage
diffuse
;
tex
.
file
name
=
new
string
(
tex
filename
)
;
if
(
mat
.
textures
==
null
)
mat
.
textures
=
new
array
<
model
texture
>
(
1
)
;
mat
.
textures
.
add
(
tex
)
;
}
materials
.
add
(
mat
)
;
if
(
tokens
.
length
>
1
)
{
cur
mat
name
=
tokens
[
1
]
;
cur
mat
name
=
cur
mat
name
.
replace
(
'.'
,
'_'
)
;
}
else
cur
mat
name
=
"default"
;
difcolor
=
color
.
white
;
speccolor
=
color
.
white
;
opacity
=
1.f
;
shininess
=
0.f
;
}
else
if
(
key
.
equals
(
"kd"
)
||
key
.
equals
(
"ks"
)
)
{
float
r
=
float
.
parse
float
(
tokens
[
1
]
)
;
float
g
=
float
.
parse
float
(
tokens
[
2
]
)
;
float
b
=
float
.
parse
float
(
tokens
[
3
]
)
;
float
a
=
1
;
if
(
tokens
.
length
>
4
)
a
=
float
.
parse
float
(
tokens
[
4
]
)
;
if
(
tokens
[
0
]
.
to
lower
case
(
)
.
equals
(
"kd"
)
)
{
difcolor
=
new
color
(
)
;
difcolor
.
set
(
r
,
g
,
b
,
a
)
;
}
else
{
speccolor
=
new
color
(
)
;
speccolor
.
set
(
r
,
g
,
b
,
a
)
;
}
}
else
if
(
key
.
equals
(
"tr"
)
||
key
.
equals
(
"d"
)
)
{
opacity
=
float
.
parse
float
(
tokens
[
1
]
)
;
}
else
if
(
key
.
equals
(
"ns"
)
)
{
shininess
=
float
.
parse
float
(
tokens
[
1
]
)
;
}
else
if
(
key
.
equals
(
"map_kd"
)
)
{
tex
filename
=
file
.
parent
(
)
.
child
(
tokens
[
1
]
)
.
path
(
)
;
}
}
}
reader
.
close
(
)
;
}
catch
(
io
exception
e
)
{
return
;
}
model
material
mat
=
new
model
material
(
)
;
mat
.
id
=
cur
mat
name
;
mat
.
diffuse
=
new
color
(
difcolor
)
;
mat
.
specular
=
new
color
(
speccolor
)
;
mat
.
opacity
=
opacity
;
mat
.
shininess
=
shininess
;
if
(
tex
filename
!=
null
)
{
model
texture
tex
=
new
model
texture
(
)
;
tex
.
usage
=
model
texture
.
usage
diffuse
;
tex
.
file
name
=
new
string
(
tex
filename
)
;
if
(
mat
.
textures
==
null
)
mat
.
textures
=
new
array
<
model
texture
>
(
1
)
;
mat
.
textures
.
add
(
tex
)
;
}
materials
.
add
(
mat
)
;
return
;
}
<SENTENCE_END/>
%END%%END% (6.39e-01)
%UNK% (5.13e-02)
parse (1.70e-02)
model (8.49e-03)
to (6.46e-03)
create (5.77e-03)
string (5.55e-03)
load (5.45e-03)
new (5.28e-03)
float (5.22e-03)
<SENTENCE_START>
{
string
line
;
string
[
]
tokens
;
string
cur
mat
name
=
"default"
;
color
difcolor
=
color
.
white
;
color
speccolor
=
color
.
white
;
float
opacity
=
1.f
;
float
shininess
=
0.f
;
string
tex
filename
=
null
;
if
(
file
==
null
||
file
.
exists
(
)
==
false
)
return
;
buffered
reader
reader
=
new
buffered
reader
(
new
input
stream
reader
(
file
.
read
(
)
)
,
4096
)
;
try
{
while
(
(
line
=
reader
.
read
line
(
)
)
!=
null
)
{
if
(
line
.
length
(
)
>
0
&&
line
.
char
at
(
0
)
==
'|t'
)
line
=
line
.
substring
(
1
)
.
trim
(
)
;
tokens
=
line
.
split
(
"|s+"
)
;
if
(
tokens
[
0
]
.
length
(
)
==
0
)
{
continue
;
}
else
if
(
tokens
[
0
]
.
char
at
(
0
)
==
'#'
)
continue
;
else
{
final
string
key
=
tokens
[
0
]
.
to
lower
case
(
)
;
if
(
key
.
equals
(
"newmtl"
)
)
{
model
material
mat
=
new
model
material
(
)
;
mat
.
id
=
cur
mat
name
;
mat
.
diffuse
=
new
color
(
difcolor
)
;
mat
.
specular
=
new
color
(
speccolor
)
;
mat
.
opacity
=
opacity
;
mat
.
shininess
=
shininess
;
if
(
tex
filename
!=
null
)
{
model
texture
tex
=
new
model
texture
(
)
;
tex
.
usage
=
model
texture
.
usage
diffuse
;
tex
.
file
name
=
new
string
(
tex
filename
)
;
if
(
mat
.
textures
==
null
)
mat
.
textures
=
new
array
<
model
texture
>
(
1
)
;
mat
.
textures
.
add
(
tex
)
;
}
materials
.
add
(
mat
)
;
if
(
tokens
.
length
>
1
)
{
cur
mat
name
=
tokens
[
1
]
;
cur
mat
name
=
cur
mat
name
.
replace
(
'.'
,
'_'
)
;
}
else
cur
mat
name
=
"default"
;
difcolor
=
color
.
white
;
speccolor
=
color
.
white
;
opacity
=
1.f
;
shininess
=
0.f
;
}
else
if
(
key
.
equals
(
"kd"
)
||
key
.
equals
(
"ks"
)
)
{
float
r
=
float
.
parse
float
(
tokens
[
1
]
)
;
float
g
=
float
.
parse
float
(
tokens
[
2
]
)
;
float
b
=
float
.
parse
float
(
tokens
[
3
]
)
;
float
a
=
1
;
if
(
tokens
.
length
>
4
)
a
=
float
.
parse
float
(
tokens
[
4
]
)
;
if
(
tokens
[
0
]
.
to
lower
case
(
)
.
equals
(
"kd"
)
)
{
difcolor
=
new
color
(
)
;
difcolor
.
set
(
r
,
g
,
b
,
a
)
;
}
else
{
speccolor
=
new
color
(
)
;
speccolor
.
set
(
r
,
g
,
b
,
a
)
;
}
}
else
if
(
key
.
equals
(
"tr"
)
||
key
.
equals
(
"d"
)
)
{
opacity
=
float
.
parse
float
(
tokens
[
1
]
)
;
}
else
if
(
key
.
equals
(
"ns"
)
)
{
shininess
=
float
.
parse
float
(
tokens
[
1
]
)
;
}
else
if
(
key
.
equals
(
"map_kd"
)
)
{
tex
filename
=
file
.
parent
(
)
.
child
(
tokens
[
1
]
)
.
path
(
)
;
}
}
}
reader
.
close
(
)
;
}
catch
(
io
exception
e
)
{
return
;
}
model
material
mat
=
new
model
material
(
)
;
mat
.
id
=
cur
mat
name
;
mat
.
diffuse
=
new
color
(
difcolor
)
;
mat
.
specular
=
new
color
(
speccolor
)
;
mat
.
opacity
=
opacity
;
mat
.
shininess
=
shininess
;
if
(
tex
filename
!=
null
)
{
model
texture
tex
=
new
model
texture
(
)
;
tex
.
usage
=
model
texture
.
usage
diffuse
;
tex
.
file
name
=
new
string
(
tex
filename
)
;
if
(
mat
.
textures
==
null
)
mat
.
textures
=
new
array
<
model
texture
>
(
1
)
;
mat
.
textures
.
add
(
tex
)
;
}
materials
.
add
(
mat
)
;
return
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
string
line
;
string
[
]
tokens
;
string
cur
mat
name
=
"default"
;
color
difcolor
=
color
.
white
;
color
speccolor
=
color
.
white
;
float
opacity
=
1.f
;
float
shininess
=
0.f
;
string
tex
filename
=
null
;
if
(
file
==
null
||
file
.
exists
(
)
==
false
)
return
;
buffered
reader
reader
=
new
buffered
reader
(
new
input
stream
reader
(
file
.
read
(
)
)
,
4096
)
;
try
{
while
(
(
line
=
reader
.
read
line
(
)
)
!=
null
)
{
if
(
line
.
length
(
)
>
0
&&
line
.
char
at
(
0
)
==
'|t'
)
line
=
line
.
substring
(
1
)
.
trim
(
)
;
tokens
=
line
.
split
(
"|s+"
)
;
if
(
tokens
[
0
]
.
length
(
)
==
0
)
{
continue
;
}
else
if
(
tokens
[
0
]
.
char
at
(
0
)
==
'#'
)
continue
;
else
{
final
string
key
=
tokens
[
0
]
.
to
lower
case
(
)
;
if
(
key
.
equals
(
"newmtl"
)
)
{
model
material
mat
=
new
model
material
(
)
;
mat
.
id
=
cur
mat
name
;
mat
.
diffuse
=
new
color
(
difcolor
)
;
mat
.
specular
=
new
color
(
speccolor
)
;
mat
.
opacity
=
opacity
;
mat
.
shininess
=
shininess
;
if
(
tex
filename
!=
null
)
{
model
texture
tex
=
new
model
texture
(
)
;
tex
.
usage
=
model
texture
.
usage
diffuse
;
tex
.
file
name
=
new
string
(
tex
filename
)
;
if
(
mat
.
textures
==
null
)
mat
.
textures
=
new
array
<
model
texture
>
(
1
)
;
mat
.
textures
.
add
(
tex
)
;
}
materials
.
add
(
mat
)
;
if
(
tokens
.
length
>
1
)
{
cur
mat
name
=
tokens
[
1
]
;
cur
mat
name
=
cur
mat
name
.
replace
(
'.'
,
'_'
)
;
}
else
cur
mat
name
=
"default"
;
difcolor
=
color
.
white
;
speccolor
=
color
.
white
;
opacity
=
1.f
;
shininess
=
0.f
;
}
else
if
(
key
.
equals
(
"kd"
)
||
key
.
equals
(
"ks"
)
)
{
float
r
=
float
.
parse
float
(
tokens
[
1
]
)
;
float
g
=
float
.
parse
float
(
tokens
[
2
]
)
;
float
b
=
float
.
parse
float
(
tokens
[
3
]
)
;
float
a
=
1
;
if
(
tokens
.
length
>
4
)
a
=
float
.
parse
float
(
tokens
[
4
]
)
;
if
(
tokens
[
0
]
.
to
lower
case
(
)
.
equals
(
"kd"
)
)
{
difcolor
=
new
color
(
)
;
difcolor
.
set
(
r
,
g
,
b
,
a
)
;
}
else
{
speccolor
=
new
color
(
)
;
speccolor
.
set
(
r
,
g
,
b
,
a
)
;
}
}
else
if
(
key
.
equals
(
"tr"
)
||
key
.
equals
(
"d"
)
)
{
opacity
=
float
.
parse
float
(
tokens
[
1
]
)
;
}
else
if
(
key
.
equals
(
"ns"
)
)
{
shininess
=
float
.
parse
float
(
tokens
[
1
]
)
;
}
else
if
(
key
.
equals
(
"map_kd"
)
)
{
tex
filename
=
file
.
parent
(
)
.
child
(
tokens
[
1
]
)
.
path
(
)
;
}
}
}
reader
.
close
(
)
;
}
catch
(
io
exception
e
)
{
return
;
}
model
material
mat
=
new
model
material
(
)
;
mat
.
id
=
cur
mat
name
;
mat
.
diffuse
=
new
color
(
difcolor
)
;
mat
.
specular
=
new
color
(
speccolor
)
;
mat
.
opacity
=
opacity
;
mat
.
shininess
=
shininess
;
if
(
tex
filename
!=
null
)
{
model
texture
tex
=
new
model
texture
(
)
;
tex
.
usage
=
model
texture
.
usage
diffuse
;
tex
.
file
name
=
new
string
(
tex
filename
)
;
if
(
mat
.
textures
==
null
)
mat
.
textures
=
new
array
<
model
texture
>
(
1
)
;
mat
.
textures
.
add
(
tex
)
;
}
materials
.
add
(
mat
)
;
return
;
}
<SENTENCE_END/>
get,materialgetget (2.72e-01)
load (1.92e-01)
create (7.26e-02)
copy (5.12e-02)
set (4.37e-02)
%UNK% (2.20e-02)
render (2.20e-02)
add (2.12e-02)
done (1.97e-02)
model (1.89e-02)
<SENTENCE_START>
{
for
(
final
model
material
m
:
materials
)
if
(
m
.
id
.
equals
(
name
)
)
return
m
;
model
material
mat
=
new
model
material
(
)
;
mat
.
id
=
name
;
mat
.
diffuse
=
new
color
(
color
.
white
)
;
materials
.
add
(
mat
)
;
return
mat
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
final
model
material
m
:
materials
)
if
(
m
.
id
.
equals
(
name
)
)
return
m
;
model
material
mat
=
new
model
material
(
)
;
mat
.
id
=
name
;
mat
.
diffuse
=
new
color
(
color
.
white
)
;
materials
.
add
(
mat
)
;
return
mat
;
}
<SENTENCE_END/>
material%END% (4.63e-01)
model (2.51e-01)
material (1.64e-01)
materials (2.82e-02)
mat (7.81e-03)
new (7.68e-03)
diffuse (5.71e-03)
color (5.57e-03)
m (4.75e-03)
id (2.79e-03)
<SENTENCE_START>
{
for
(
final
model
material
m
:
materials
)
if
(
m
.
id
.
equals
(
name
)
)
return
m
;
model
material
mat
=
new
model
material
(
)
;
mat
.
id
=
name
;
mat
.
diffuse
=
new
color
(
color
.
white
)
;
materials
.
add
(
mat
)
;
return
mat
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
final
model
material
m
:
materials
)
if
(
m
.
id
.
equals
(
name
)
)
return
m
;
model
material
mat
=
new
model
material
(
)
;
mat
.
id
=
name
;
mat
.
diffuse
=
new
color
(
color
.
white
)
;
materials
.
add
(
mat
)
;
return
mat
;
}
<SENTENCE_END/>
%END%%END% (8.62e-01)
material (3.66e-02)
model (2.14e-02)
diffuse (1.04e-02)
mat (1.03e-02)
color (4.94e-03)
materials (4.15e-03)
id (3.93e-03)
m (3.69e-03)
new (1.60e-03)
<SENTENCE_START>
{
for
(
final
model
material
m
:
materials
)
if
(
m
.
id
.
equals
(
name
)
)
return
m
;
model
material
mat
=
new
model
material
(
)
;
mat
.
id
=
name
;
mat
.
diffuse
=
new
color
(
color
.
white
)
;
materials
.
add
(
mat
)
;
return
mat
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
final
model
material
m
:
materials
)
if
(
m
.
id
.
equals
(
name
)
)
return
m
;
model
material
mat
=
new
model
material
(
)
;
mat
.
id
=
name
;
mat
.
diffuse
=
new
color
(
color
.
white
)
;
materials
.
add
(
mat
)
;
return
mat
;
}
<SENTENCE_END/>
get,c,ptrgetget (9.83e-01)
c (4.72e-03)
obj (1.88e-03)
swig (1.36e-03)
is (8.93e-04)
return (8.85e-04)
ptr (5.54e-04)
0 (3.63e-04)
null (3.14e-04)
obtain (2.82e-04)
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
cc (9.96e-01)
ptr (2.00e-03)
get (1.04e-03)
%END% (8.72e-04)
swig (1.90e-04)
instance (1.07e-04)
overlaps (3.51e-05)
derived (2.62e-05)
match (7.06e-06)
is (6.12e-06)
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
ptrptr (9.96e-01)
c (2.15e-03)
%END% (1.61e-03)
obj (1.88e-05)
0 (6.12e-06)
get (6.07e-06)
return (5.61e-06)
string (2.74e-06)
instance (2.57e-06)
swig (2.31e-06)
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
%END%%END% (9.61e-01)
ptr (3.23e-02)
obj (8.25e-04)
c (4.05e-04)
return (2.33e-04)
string (2.06e-04)
double (1.33e-04)
at (1.02e-04)
0 (9.89e-05)
swig (5.39e-05)
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
swig,director,disconnectswigswig (9.89e-01)
c (3.00e-03)
mem (7.13e-04)
delete (1.84e-04)
own (1.26e-04)
false (6.87e-05)
addr (2.08e-05)
director (1.85e-05)
release (1.61e-05)
take (7.48e-06)
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
delete
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
delete
(
)
;
}
<SENTENCE_END/>
directordirector (7.90e-01)
disconnect (1.54e-01)
own (1.24e-02)
swig (1.20e-02)
mem (1.11e-02)
take (6.94e-03)
release (6.58e-03)
c (4.72e-03)
addr (1.68e-04)
delete (1.33e-04)
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
delete
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
delete
(
)
;
}
<SENTENCE_END/>
disconnectdisconnect (7.40e-01)
director (1.12e-01)
%END% (9.05e-02)
release (4.39e-03)
take (3.85e-03)
swig (3.43e-03)
own (2.94e-03)
up (2.28e-03)
%UNK% (2.13e-03)
change (1.59e-03)
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
delete
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
delete
(
)
;
}
<SENTENCE_END/>
%END%%END% (9.58e-01)
disconnect (7.03e-03)
mem (4.78e-03)
swig (2.80e-03)
own (2.17e-03)
c (2.15e-03)
array (7.81e-04)
performed (7.44e-04)
up (7.43e-04)
20 (6.24e-04)
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
delete
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
delete
(
)
;
}
<SENTENCE_END/>
swig,release,ownershipswigswig (9.76e-01)
c (3.76e-03)
change (2.02e-03)
ownership (1.13e-03)
callback (7.93e-04)
mem (6.44e-04)
triangle (5.81e-04)
internal (5.51e-04)
index (4.49e-04)
this (3.43e-04)
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
false
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
false
)
;
}
<SENTENCE_END/>
releaserelease (3.87e-01)
take (2.64e-01)
ownership (1.78e-01)
change (7.82e-02)
swig (2.76e-02)
c (1.85e-02)
director (1.32e-02)
mem (7.16e-03)
disconnect (4.18e-03)
%END% (3.03e-03)
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
false
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
false
)
;
}
<SENTENCE_END/>
ownershipownership (8.12e-01)
%END% (1.31e-01)
release (5.55e-03)
change (4.62e-03)
take (4.24e-03)
ptr (2.18e-03)
swig (1.58e-03)
c (1.57e-03)
index (1.23e-03)
triangle (8.49e-04)
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
false
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
false
)
;
}
<SENTENCE_END/>
%END%%END% (9.25e-01)
ownership (1.39e-02)
mem (8.87e-03)
own (4.54e-03)
swig (3.10e-03)
c (2.77e-03)
this (2.73e-03)
ptr (7.50e-04)
index (7.06e-04)
change (5.74e-04)
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
false
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
swig
c
mem
own
=
false
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
false
)
;
}
<SENTENCE_END/>
swig,take,ownershipswigswig (9.72e-01)
c (4.85e-03)
change (2.12e-03)
ownership (1.13e-03)
mem (8.61e-04)
callback (7.36e-04)
triangle (6.26e-04)
internal (6.10e-04)
index (4.15e-04)
this (3.84e-04)
<SENTENCE_START>
{
swig
c
mem
own
=
true
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
true
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
swig
c
mem
own
=
true
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
true
)
;
}
<SENTENCE_END/>
taketake (4.57e-01)
release (2.37e-01)
ownership (1.17e-01)
change (6.57e-02)
swig (3.89e-02)
c (2.97e-02)
director (1.67e-02)
mem (1.06e-02)
disconnect (4.18e-03)
ptr (3.64e-03)
<SENTENCE_START>
{
swig
c
mem
own
=
true
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
true
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
swig
c
mem
own
=
true
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
true
)
;
}
<SENTENCE_END/>
ownershipownership (7.97e-01)
%END% (1.44e-01)
take (8.08e-03)
change (5.59e-03)
ptr (3.26e-03)
release (2.76e-03)
c (2.14e-03)
swig (1.99e-03)
index (1.71e-03)
triangle (9.66e-04)
<SENTENCE_START>
{
swig
c
mem
own
=
true
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
true
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
swig
c
mem
own
=
true
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
true
)
;
}
<SENTENCE_END/>
%END%%END% (9.39e-01)
mem (1.02e-02)
own (6.20e-03)
swig (5.45e-03)
c (3.73e-03)
ownership (2.78e-03)
this (1.71e-03)
ptr (5.58e-04)
take (5.29e-04)
%UNK% (2.81e-04)
<SENTENCE_START>
{
swig
c
mem
own
=
true
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
true
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
swig
c
mem
own
=
true
;
collision
jni
.
bt
internal
triangle
index
callback
change
ownership
(
this
,
swig
c
ptr
,
true
)
;
}
<SENTENCE_END/>
internal,process,triangle,indexinternalinternal (9.49e-01)
process (2.63e-02)
callback (9.60e-03)
triangle (6.83e-03)
index (3.59e-03)
c (3.27e-04)
part (3.16e-04)
get (3.16e-04)
bt (2.91e-04)
ptr (2.52e-04)
<SENTENCE_START>
{
collision
jni
.
bt
internal
triangle
index
callback
internal
process
triangle
index
(
swig
c
ptr
,
this
,
bt
vector
3
.
get
c
ptr
(
triangle
)
,
triangle
,
part
id
,
triangle
index
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
internal
triangle
index
callback
internal
process
triangle
index
(
swig
c
ptr
,
this
,
bt
vector
3
.
get
c
ptr
(
triangle
)
,
triangle
,
part
id
,
triangle
index
)
;
}
<SENTENCE_END/>
processprocess (9.46e-01)
internal (2.60e-02)
triangle (2.53e-02)
%END% (2.08e-03)
get (1.73e-04)
index (1.27e-04)
callback (4.46e-05)
set (3.64e-05)
draw (1.45e-05)
create (1.42e-05)
<SENTENCE_START>
{
collision
jni
.
bt
internal
triangle
index
callback
internal
process
triangle
index
(
swig
c
ptr
,
this
,
bt
vector
3
.
get
c
ptr
(
triangle
)
,
triangle
,
part
id
,
triangle
index
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
internal
triangle
index
callback
internal
process
triangle
index
(
swig
c
ptr
,
this
,
bt
vector
3
.
get
c
ptr
(
triangle
)
,
triangle
,
part
id
,
triangle
index
)
;
}
<SENTENCE_END/>
triangletriangle (8.92e-01)
process (8.89e-02)
index (1.68e-02)
internal (8.98e-04)
%END% (7.30e-04)
callback (1.58e-04)
ptr (2.45e-05)
part (1.90e-05)
c (1.68e-05)
bt (1.54e-05)
<SENTENCE_START>
{
collision
jni
.
bt
internal
triangle
index
callback
internal
process
triangle
index
(
swig
c
ptr
,
this
,
bt
vector
3
.
get
c
ptr
(
triangle
)
,
triangle
,
part
id
,
triangle
index
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
internal
triangle
index
callback
internal
process
triangle
index
(
swig
c
ptr
,
this
,
bt
vector
3
.
get
c
ptr
(
triangle
)
,
triangle
,
part
id
,
triangle
index
)
;
}
<SENTENCE_END/>
indexindex (7.08e-01)
triangle (2.30e-01)
%END% (5.45e-02)
process (2.61e-03)
internal (4.58e-04)
callback (2.15e-04)
ptr (1.42e-04)
%UNK% (8.95e-05)
c (7.86e-05)
bt (6.38e-05)
<SENTENCE_START>
{
collision
jni
.
bt
internal
triangle
index
callback
internal
process
triangle
index
(
swig
c
ptr
,
this
,
bt
vector
3
.
get
c
ptr
(
triangle
)
,
triangle
,
part
id
,
triangle
index
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
internal
triangle
index
callback
internal
process
triangle
index
(
swig
c
ptr
,
this
,
bt
vector
3
.
get
c
ptr
(
triangle
)
,
triangle
,
part
id
,
triangle
index
)
;
}
<SENTENCE_END/>
%END%%END% (8.15e-01)
index (1.57e-01)
triangle (9.30e-03)
%UNK% (1.18e-03)
set (6.33e-04)
convex (5.57e-04)
bt (5.36e-04)
ray (3.87e-04)
get (3.63e-04)
internal (3.45e-04)
<SENTENCE_START>
{
collision
jni
.
bt
internal
triangle
index
callback
internal
process
triangle
index
(
swig
c
ptr
,
this
,
bt
vector
3
.
get
c
ptr
(
triangle
)
,
triangle
,
part
id
,
triangle
index
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
internal
triangle
index
callback
internal
process
triangle
index
(
swig
c
ptr
,
this
,
bt
vector
3
.
get
c
ptr
(
triangle
)
,
triangle
,
part
id
,
triangle
index
)
;
}
<SENTENCE_END/>
set,ignore,unknown,fieldssetset (9.68e-01)
get (1.31e-02)
fields (4.54e-03)
ignore (3.13e-03)
unknown (2.80e-03)
reset (1.91e-03)
switch (1.14e-03)
clear (4.74e-04)
load (4.14e-04)
this (2.86e-04)
<SENTENCE_START>
{
this
.
ignore
unknown
fields
=
ignore
unknown
fields
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
ignore
unknown
fields
=
ignore
unknown
fields
;
}
<SENTENCE_END/>
ignoreignore (8.55e-01)
unknown (1.27e-01)
get (9.35e-03)
fields (7.20e-03)
declared (6.08e-05)
%END% (5.11e-05)
%START% (1.43e-05)
name (4.54e-06)
is (4.42e-06)
default (4.25e-06)
<SENTENCE_START>
{
this
.
ignore
unknown
fields
=
ignore
unknown
fields
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
ignore
unknown
fields
=
ignore
unknown
fields
;
}
<SENTENCE_END/>
unknownunknown (6.10e-01)
fields (3.80e-01)
%END% (5.86e-03)
ignore (3.07e-03)
get (8.45e-06)
value (7.58e-06)
%UNK% (6.05e-06)
type (5.38e-06)
name (5.23e-06)
data (5.05e-06)
<SENTENCE_START>
{
this
.
ignore
unknown
fields
=
ignore
unknown
fields
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
ignore
unknown
fields
=
ignore
unknown
fields
;
}
<SENTENCE_END/>
fields%END% (5.84e-01)
fields (3.89e-01)
unknown (1.30e-02)
value (5.51e-04)
2 (2.07e-04)
20 (2.05e-04)
%UNK% (1.95e-04)
only (1.92e-04)
fv (1.41e-04)
data (1.31e-04)
<SENTENCE_START>
{
this
.
ignore
unknown
fields
=
ignore
unknown
fields
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
ignore
unknown
fields
=
ignore
unknown
fields
;
}
<SENTENCE_END/>
%END%%END% (9.45e-01)
fields (4.04e-02)
value (9.05e-04)
unknown (7.63e-04)
20 (3.58e-04)
only (3.24e-04)
2 (3.07e-04)
%UNK% (2.68e-04)
fv (2.53e-04)
height (1.83e-04)
<SENTENCE_START>
{
this
.
ignore
unknown
fields
=
ignore
unknown
fields
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
ignore
unknown
fields
=
ignore
unknown
fields
;
}
<SENTENCE_END/>
set,output,typesetset (9.79e-01)
output (3.66e-03)
type (2.69e-03)
reset (1.27e-03)
finish (1.12e-03)
begin (8.15e-04)
run (7.77e-04)
clear (7.22e-04)
this (6.46e-04)
setup (5.89e-04)
<SENTENCE_START>
{
this
.
output
type
=
output
type
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
output
type
=
output
type
;
}
<SENTENCE_END/>
outputoutput (9.74e-01)
type (1.91e-02)
%END% (4.72e-03)
format (3.34e-04)
file (1.21e-04)
write (6.05e-05)
process (5.21e-05)
save (2.71e-05)
frame (1.89e-05)
drawing (1.75e-05)
<SENTENCE_START>
{
this
.
output
type
=
output
type
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
output
type
=
output
type
;
}
<SENTENCE_END/>
typetype (9.37e-01)
%END% (4.69e-02)
output (1.44e-02)
file (4.78e-05)
%UNK% (2.17e-05)
format (1.87e-05)
display (1.64e-05)
value (1.44e-05)
2 (1.40e-05)
data (1.09e-05)
<SENTENCE_START>
{
this
.
output
type
=
output
type
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
output
type
=
output
type
;
}
<SENTENCE_END/>
%END%%END% (9.53e-01)
type (3.79e-02)
value (4.76e-04)
file (4.72e-04)
output (3.62e-04)
display (3.20e-04)
20 (3.17e-04)
offset (1.84e-04)
2 (1.84e-04)
array (1.56e-04)
<SENTENCE_START>
{
this
.
output
type
=
output
type
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
output
type
=
output
type
;
}
<SENTENCE_END/>
set,quote,long,valuessetset (9.45e-01)
values (9.95e-03)
add (9.08e-03)
resize (5.37e-03)
clear (3.08e-03)
quote (2.14e-03)
long (1.98e-03)
stop (1.80e-03)
reset (1.68e-03)
%UNK% (1.48e-03)
<SENTENCE_START>
{
this
.
quote
long
values
=
quote
long
values
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
quote
long
values
=
quote
long
values
;
}
<SENTENCE_END/>
quotequote (7.96e-01)
long (1.17e-01)
%END% (7.63e-02)
%UNK% (1.52e-03)
short (1.37e-03)
value (6.07e-04)
offsets (3.55e-04)
array (3.34e-04)
position (3.30e-04)
down (3.07e-04)
<SENTENCE_START>
{
this
.
quote
long
values
=
quote
long
values
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
quote
long
values
=
quote
long
values
;
}
<SENTENCE_END/>
long%END% (5.97e-01)
long (3.40e-01)
values (3.80e-02)
quote (1.50e-02)
value (1.44e-03)
%UNK% (7.09e-04)
array (4.17e-04)
only (4.10e-04)
20 (3.50e-04)
short (1.80e-04)
<SENTENCE_START>
{
this
.
quote
long
values
=
quote
long
values
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
quote
long
values
=
quote
long
values
;
}
<SENTENCE_END/>
values%END% (9.50e-01)
values (3.04e-02)
long (1.04e-02)
value (1.67e-03)
only (6.35e-04)
20 (6.15e-04)
quote (4.05e-04)
array (3.19e-04)
fv (1.72e-04)
%UNK% (1.71e-04)
<SENTENCE_START>
{
this
.
quote
long
values
=
quote
long
values
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
quote
long
values
=
quote
long
values
;
}
<SENTENCE_END/>
%END%%END% (9.63e-01)
values (2.24e-02)
long (5.04e-03)
value (1.64e-03)
20 (6.62e-04)
only (6.49e-04)
array (2.87e-04)
quote (2.67e-04)
fv (1.89e-04)
endian (1.61e-04)
<SENTENCE_START>
{
this
.
quote
long
values
=
quote
long
values
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
quote
long
values
=
quote
long
values
;
}
<SENTENCE_END/>
set,enum,namessetset (9.90e-01)
enum (3.86e-03)
names (3.04e-03)
get (7.29e-04)
this (3.75e-04)
clear (6.37e-05)
reset (5.81e-05)
touch (4.86e-05)
initialize (4.15e-05)
invalidate (1.78e-05)
<SENTENCE_START>
{
this
.
enum
names
=
enum
names
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
enum
names
=
enum
names
;
}
<SENTENCE_END/>
enumenum (9.78e-01)
names (1.80e-02)
get (3.23e-03)
set (5.25e-05)
%START% (1.78e-05)
motor (9.57e-06)
ratio (6.74e-06)
touch (6.25e-06)
mode (5.55e-06)
joint (4.72e-06)
<SENTENCE_START>
{
this
.
enum
names
=
enum
names
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
enum
names
=
enum
names
;
}
<SENTENCE_END/>
namesnames (9.84e-01)
enum (1.34e-02)
%END% (8.16e-04)
mode (9.34e-05)
ratio (7.65e-05)
enabled (6.14e-05)
motor (4.16e-05)
torque (3.56e-05)
height (3.39e-05)
damping (3.03e-05)
<SENTENCE_START>
{
this
.
enum
names
=
enum
names
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
enum
names
=
enum
names
;
}
<SENTENCE_END/>
%END%%END% (9.10e-01)
names (3.89e-02)
value (4.54e-03)
only (1.85e-03)
height (1.53e-03)
20 (1.53e-03)
mode (1.37e-03)
enabled (1.23e-03)
width (1.16e-03)
ratio (1.11e-03)
<SENTENCE_START>
{
this
.
enum
names
=
enum
names
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
enum
names
=
enum
names
;
}
<SENTENCE_END/>
add,class,tagaddset (3.90e-01)
initialize (1.73e-01)
create (7.33e-02)
on (5.96e-02)
add (5.92e-02)
get (4.11e-02)
put (2.32e-02)
to (1.79e-02)
new (1.18e-02)
run (1.01e-02)
<SENTENCE_START>
{
tag
to
class
.
put
(
tag
,
type
)
;
class
to
tag
.
put
(
type
,
tag
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
tag
to
class
.
put
(
tag
,
type
)
;
class
to
tag
.
put
(
type
,
tag
)
;
}
<SENTENCE_END/>
class%END% (6.14e-01)
tag (3.81e-02)
to (2.46e-02)
class (1.99e-02)
view (1.76e-02)
type (1.50e-02)
name (1.46e-02)
instance (1.32e-02)
on (1.18e-02)
double (8.51e-03)
<SENTENCE_START>
{
tag
to
class
.
put
(
tag
,
type
)
;
class
to
tag
.
put
(
type
,
tag
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
tag
to
class
.
put
(
tag
,
type
)
;
class
to
tag
.
put
(
type
,
tag
)
;
}
<SENTENCE_END/>
tag%END% (9.12e-01)
tag (1.46e-02)
class (1.23e-02)
to (1.16e-02)
type (3.13e-03)
double (1.69e-03)
array (1.68e-03)
buffer (1.36e-03)
string (1.15e-03)
name (1.14e-03)
<SENTENCE_START>
{
tag
to
class
.
put
(
tag
,
type
)
;
class
to
tag
.
put
(
type
,
tag
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
tag
to
class
.
put
(
tag
,
type
)
;
class
to
tag
.
put
(
type
,
tag
)
;
}
<SENTENCE_END/>
%END%%END% (9.64e-01)
tag (6.12e-03)
class (3.57e-03)
put (3.07e-03)
to (2.03e-03)
type (1.43e-03)
array (7.69e-04)
string (3.59e-04)
buffer (3.37e-04)
all (2.61e-04)
<SENTENCE_START>
{
tag
to
class
.
put
(
tag
,
type
)
;
class
to
tag
.
put
(
type
,
tag
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
tag
to
class
.
put
(
tag
,
type
)
;
class
to
tag
.
put
(
type
,
tag
)
;
}
<SENTENCE_END/>
get,classgetget (9.83e-01)
to (4.71e-03)
tag (1.84e-03)
return (1.12e-03)
is (1.00e-03)
instance (7.35e-04)
class (6.22e-04)
obtain (4.87e-04)
new (4.80e-04)
compare (3.86e-04)
<SENTENCE_START>
{
return
tag
to
class
.
get
(
tag
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
tag
to
class
.
get
(
tag
)
;
}
<SENTENCE_END/>
classtag (2.72e-01)
on (2.33e-01)
initialize (4.45e-02)
view (4.23e-02)
instance (2.96e-02)
name (2.67e-02)
notify (1.76e-02)
create (1.59e-02)
to (1.19e-02)
%START% (1.15e-02)
<SENTENCE_START>
{
return
tag
to
class
.
get
(
tag
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
tag
to
class
.
get
(
tag
)
;
}
<SENTENCE_END/>
%END%%END% (6.08e-01)
tag (3.70e-02)
class (2.78e-02)
to (2.11e-02)
name (1.24e-02)
%UNK% (1.06e-02)
double (8.72e-03)
buffer (8.23e-03)
on (6.74e-03)
changed (6.64e-03)
<SENTENCE_START>
{
return
tag
to
class
.
get
(
tag
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
tag
to
class
.
get
(
tag
)
;
}
<SENTENCE_END/>
get,taggetget (9.89e-01)
to (2.52e-03)
tag (9.34e-04)
is (8.42e-04)
obtain (7.14e-04)
class (6.32e-04)
return (4.62e-04)
instance (3.30e-04)
type (2.91e-04)
set (2.74e-04)
<SENTENCE_START>
{
return
class
to
tag
.
get
(
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
class
to
tag
.
get
(
type
)
;
}
<SENTENCE_END/>
tagclass (2.70e-01)
%END% (1.12e-01)
type (7.18e-02)
instance (6.63e-02)
name (3.11e-02)
on (2.99e-02)
declaring (1.85e-02)
to (1.80e-02)
get (1.57e-02)
tag (1.36e-02)
<SENTENCE_START>
{
return
class
to
tag
.
get
(
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
class
to
tag
.
get
(
type
)
;
}
<SENTENCE_END/>
%END%%END% (7.26e-01)
class (5.87e-02)
type (4.26e-02)
tag (2.34e-02)
to (5.92e-03)
%UNK% (4.76e-03)
name (3.85e-03)
buffer (3.58e-03)
string (3.51e-03)
object (3.50e-03)
<SENTENCE_START>
{
return
class
to
tag
.
get
(
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
class
to
tag
.
get
(
type
)
;
}
<SENTENCE_END/>
set,type,namesetset (9.88e-01)
type (2.94e-03)
name (2.54e-03)
get (8.79e-04)
this (5.10e-04)
add (3.35e-04)
clear (3.35e-04)
obtain (2.09e-04)
reset (2.04e-04)
load (1.81e-04)
<SENTENCE_START>
{
this
.
type
name
=
type
name
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
type
name
=
type
name
;
}
<SENTENCE_END/>
typetype (9.79e-01)
name (1.97e-02)
%END% (1.95e-04)
get (1.75e-04)
attribute (3.17e-05)
declaring (1.79e-05)
declared (1.29e-05)
data (1.11e-05)
drawing (7.00e-06)
types (6.14e-06)
<SENTENCE_START>
{
this
.
type
name
=
type
name
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
type
name
=
type
name
;
}
<SENTENCE_END/>
namename (6.83e-01)
%END% (2.67e-01)
type (4.05e-02)
data (3.41e-04)
value (2.77e-04)
attribute (1.25e-04)
2 (1.22e-04)
file (1.20e-04)
array (1.11e-04)
height (1.02e-04)
<SENTENCE_START>
{
this
.
type
name
=
type
name
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
type
name
=
type
name
;
}
<SENTENCE_END/>
%END%%END% (9.66e-01)
name (2.37e-02)
value (1.07e-03)
type (7.27e-04)
20 (4.64e-04)
fv (2.90e-04)
2 (2.57e-04)
only (2.33e-04)
array (2.16e-04)
file (2.06e-04)
<SENTENCE_START>
{
this
.
type
name
=
type
name
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
type
name
=
type
name
;
}
<SENTENCE_END/>
set,default,serializerset%END% (2.88e-01)
main (1.92e-01)
setup (7.94e-02)
reset (7.29e-02)
replace (4.47e-02)
create (2.90e-02)
test (2.60e-02)
default (2.58e-02)
init (2.28e-02)
set (2.10e-02)
<SENTENCE_START>
{
this
.
default
serializer
=
default
serializer
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
default
serializer
=
default
serializer
;
}
<SENTENCE_END/>
default%END% (9.72e-01)
default (1.69e-02)
serializer (6.81e-03)
parallel (2.94e-03)
fully (2.78e-04)
fv (8.55e-05)
valid (5.29e-05)
sequence (4.84e-05)
reserve (4.75e-05)
test (3.99e-05)
<SENTENCE_START>
{
this
.
default
serializer
=
default
serializer
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
default
serializer
=
default
serializer
;
}
<SENTENCE_END/>
serializer%END% (9.82e-01)
serializer (1.65e-02)
default (6.09e-04)
fv (7.86e-05)
valid (7.12e-05)
fully (3.45e-05)
parallel (3.28e-05)
moved (2.75e-05)
and (2.69e-05)
at (2.67e-05)
<SENTENCE_START>
{
this
.
default
serializer
=
default
serializer
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
default
serializer
=
default
serializer
;
}
<SENTENCE_END/>
%END%%END% (9.90e-01)
serializer (8.42e-03)
default (1.60e-04)
valid (9.48e-05)
fv (6.73e-05)
%UNK% (4.44e-05)
moved (3.04e-05)
at (2.99e-05)
edge (2.93e-05)
and (2.57e-05)
<SENTENCE_START>
{
this
.
default
serializer
=
default
serializer
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
default
serializer
=
default
serializer
;
}
<SENTENCE_END/>
set,serializerset%END% (5.00e-01)
parallel (2.06e-01)
fully (3.92e-02)
slice (3.74e-02)
to (3.58e-02)
sequence (1.97e-02)
reserve (1.77e-02)
prj (8.59e-03)
serializer (8.11e-03)
sort (7.66e-03)
<SENTENCE_START>
{
class
to
serializer
.
put
(
type
,
serializer
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
class
to
serializer
.
put
(
type
,
serializer
)
;
}
<SENTENCE_END/>
serializer%END% (9.93e-01)
fully (9.71e-04)
fv (6.23e-04)
serializer (4.97e-04)
to (2.91e-04)
locations (2.45e-04)
array (2.16e-04)
parallel (1.86e-04)
sequence (1.62e-04)
iv (1.60e-04)
<SENTENCE_START>
{
class
to
serializer
.
put
(
type
,
serializer
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
class
to
serializer
.
put
(
type
,
serializer
)
;
}
<SENTENCE_END/>
%END%%END% (9.93e-01)
serializer (7.25e-04)
fv (4.66e-04)
fully (4.19e-04)
array (3.38e-04)
to (2.37e-04)
locations (1.88e-04)
type (1.71e-04)
all (1.62e-04)
performed (1.40e-04)
<SENTENCE_START>
{
class
to
serializer
.
put
(
type
,
serializer
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
class
to
serializer
.
put
(
type
,
serializer
)
;
}
<SENTENCE_END/>
get,serializergetto (5.67e-01)
%END% (7.33e-02)
compare (4.15e-02)
read (2.27e-02)
%UNK% (1.97e-02)
register (1.13e-02)
close (9.57e-03)
%START% (6.66e-03)
is (6.33e-03)
sequence (6.01e-03)
<SENTENCE_START>
{
return
class
to
serializer
.
get
(
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
class
to
serializer
.
get
(
type
)
;
}
<SENTENCE_END/>
serializer%END% (9.78e-01)
type (2.78e-03)
serializer (1.56e-03)
class (9.69e-04)
pixels (9.20e-04)
fv (8.71e-04)
fully (7.95e-04)
to (7.83e-04)
iv (5.58e-04)
sequence (3.89e-04)
<SENTENCE_START>
{
return
class
to
serializer
.
get
(
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
class
to
serializer
.
get
(
type
)
;
}
<SENTENCE_END/>
%END%%END% (9.81e-01)
type (3.00e-03)
serializer (1.67e-03)
class (1.05e-03)
get (7.72e-04)
to (4.80e-04)
fv (4.20e-04)
string (2.92e-04)
%UNK% (2.87e-04)
array (2.81e-04)
<SENTENCE_START>
{
return
class
to
serializer
.
get
(
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
class
to
serializer
.
get
(
type
)
;
}
<SENTENCE_END/>
set,use,prototypessetset (9.63e-01)
init (1.54e-02)
use (4.55e-03)
%UNK% (2.63e-03)
prototypes (2.24e-03)
stop (1.04e-03)
cancel (1.01e-03)
reset (9.98e-04)
this (6.24e-04)
translate (5.35e-04)
<SENTENCE_START>
{
this
.
use
prototypes
=
use
prototypes
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
use
prototypes
=
use
prototypes
;
}
<SENTENCE_END/>
useuse (9.92e-01)
%UNK% (3.21e-03)
prototypes (1.44e-03)
init (1.42e-03)
%END% (3.80e-04)
lock (1.45e-04)
font (1.22e-04)
normal (6.06e-05)
locked (5.42e-05)
integer (4.90e-05)
<SENTENCE_START>
{
this
.
use
prototypes
=
use
prototypes
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
use
prototypes
=
use
prototypes
;
}
<SENTENCE_END/>
prototypesprototypes (8.43e-01)
%END% (1.02e-01)
use (4.30e-02)
%UNK% (3.79e-03)
title (2.05e-04)
positions (2.01e-04)
font (1.77e-04)
locked (1.45e-04)
from (1.22e-04)
mode (1.19e-04)
<SENTENCE_START>
{
this
.
use
prototypes
=
use
prototypes
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
use
prototypes
=
use
prototypes
;
}
<SENTENCE_END/>
%END%%END% (8.33e-01)
prototypes (1.48e-01)
%UNK% (1.46e-03)
use (1.06e-03)
value (6.49e-04)
20 (6.19e-04)
fv (6.08e-04)
title (5.21e-04)
positions (4.07e-04)
2 (3.60e-04)
<SENTENCE_START>
{
this
.
use
prototypes
=
use
prototypes
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
this
.
use
prototypes
=
use
prototypes
;
}
<SENTENCE_END/>
set,element,typesetget (9.31e-01)
load (1.14e-02)
parse (9.55e-03)
fields (5.35e-03)
generate (3.43e-03)
metadata (2.35e-03)
field (1.83e-03)
is (1.81e-03)
find (1.68e-03)
declared (1.41e-03)
<SENTENCE_START>
{
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
metadata
.
element
type
=
element
type
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
metadata
.
element
type
=
element
type
;
}
<SENTENCE_END/>
elementfields (5.07e-01)
get (1.63e-01)
declared (3.86e-02)
element (2.72e-02)
%END% (2.56e-02)
type (2.15e-02)
metadata (1.82e-02)
field (1.08e-02)
%UNK% (9.43e-03)
name (4.35e-03)
<SENTENCE_START>
{
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
metadata
.
element
type
=
element
type
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
metadata
.
element
type
=
element
type
;
}
<SENTENCE_END/>
typefields (4.85e-01)
%END% (2.26e-01)
type (7.45e-02)
get (1.32e-02)
%UNK% (1.18e-02)
declared (1.03e-02)
field (9.52e-03)
metadata (9.16e-03)
name (8.09e-03)
element (7.65e-03)
<SENTENCE_START>
{
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
metadata
.
element
type
=
element
type
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
metadata
.
element
type
=
element
type
;
}
<SENTENCE_END/>
%END%%END% (8.79e-01)
fields (1.04e-02)
%UNK% (9.62e-03)
type (7.85e-03)
declared (5.38e-03)
string (4.97e-03)
get (3.79e-03)
name (3.75e-03)
element (2.10e-03)
metadata (1.98e-03)
<SENTENCE_START>
{
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
metadata
.
element
type
=
element
type
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
metadata
.
element
type
=
element
type
;
}
<SENTENCE_END/>
get,fieldsgetget (6.54e-01)
is (6.21e-02)
to (1.87e-02)
%UNK% (1.80e-02)
find (1.35e-02)
with (1.24e-02)
declared (9.54e-03)
%END% (7.92e-03)
add (6.16e-03)
generate (6.02e-03)
<SENTENCE_START>
{
ordered
map
<
string
,
field
metadata
>
fields
=
type
to
fields
.
get
(
type
)
;
if
(
fields
!=
null
)
return
fields
;
array
<
class
>
class
hierarchy
=
new
array
(
)
;
class
next
class
=
type
;
while
(
next
class
!=
object
.
class
)
{
class
hierarchy
.
add
(
next
class
)
;
next
class
=
next
class
.
get
superclass
(
)
;
}
array
list
<
field
>
all
fields
=
new
array
list
(
)
;
for
(
int
i
=
class
hierarchy
.
size
-
1
;
i
>=
0
;
i
--
)
collections
.
add
all
(
all
fields
,
class
reflection
.
get
declared
fields
(
class
hierarchy
.
get
(
i
)
)
)
;
ordered
map
<
string
,
field
metadata
>
name
to
field
=
new
ordered
map
(
all
fields
.
size
(
)
)
;
for
(
int
i
=
0
,
n
=
all
fields
.
size
(
)
;
i
<
n
;
i
++
)
{
field
field
=
all
fields
.
get
(
i
)
;
if
(
field
.
is
transient
(
)
)
continue
;
if
(
field
.
is
static
(
)
)
continue
;
if
(
field
.
is
synthetic
(
)
)
continue
;
if
(
!
field
.
is
accessible
(
)
)
{
try
{
field
.
set
accessible
(
true
)
;
}
catch
(
access
control
exception
ex
)
{
continue
;
}
}
name
to
field
.
put
(
field
.
get
name
(
)
,
new
field
metadata
(
field
)
)
;
}
type
to
fields
.
put
(
type
,
name
to
field
)
;
return
name
to
field
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
ordered
map
<
string
,
field
metadata
>
fields
=
type
to
fields
.
get
(
type
)
;
if
(
fields
!=
null
)
return
fields
;
array
<
class
>
class
hierarchy
=
new
array
(
)
;
class
next
class
=
type
;
while
(
next
class
!=
object
.
class
)
{
class
hierarchy
.
add
(
next
class
)
;
next
class
=
next
class
.
get
superclass
(
)
;
}
array
list
<
field
>
all
fields
=
new
array
list
(
)
;
for
(
int
i
=
class
hierarchy
.
size
-
1
;
i
>=
0
;
i
--
)
collections
.
add
all
(
all
fields
,
class
reflection
.
get
declared
fields
(
class
hierarchy
.
get
(
i
)
)
)
;
ordered
map
<
string
,
field
metadata
>
name
to
field
=
new
ordered
map
(
all
fields
.
size
(
)
)
;
for
(
int
i
=
0
,
n
=
all
fields
.
size
(
)
;
i
<
n
;
i
++
)
{
field
field
=
all
fields
.
get
(
i
)
;
if
(
field
.
is
transient
(
)
)
continue
;
if
(
field
.
is
static
(
)
)
continue
;
if
(
field
.
is
synthetic
(
)
)
continue
;
if
(
!
field
.
is
accessible
(
)
)
{
try
{
field
.
set
accessible
(
true
)
;
}
catch
(
access
control
exception
ex
)
{
continue
;
}
}
name
to
field
.
put
(
field
.
get
name
(
)
,
new
field
metadata
(
field
)
)
;
}
type
to
fields
.
put
(
type
,
name
to
field
)
;
return
name
to
field
;
}
<SENTENCE_END/>
fields%END% (3.23e-01)
fields (1.33e-01)
get (4.55e-02)
declared (4.08e-02)
field (3.16e-02)
to (3.01e-02)
all (2.43e-02)
%UNK% (1.65e-02)
class (1.56e-02)
is (9.45e-03)
<SENTENCE_START>
{
ordered
map
<
string
,
field
metadata
>
fields
=
type
to
fields
.
get
(
type
)
;
if
(
fields
!=
null
)
return
fields
;
array
<
class
>
class
hierarchy
=
new
array
(
)
;
class
next
class
=
type
;
while
(
next
class
!=
object
.
class
)
{
class
hierarchy
.
add
(
next
class
)
;
next
class
=
next
class
.
get
superclass
(
)
;
}
array
list
<
field
>
all
fields
=
new
array
list
(
)
;
for
(
int
i
=
class
hierarchy
.
size
-
1
;
i
>=
0
;
i
--
)
collections
.
add
all
(
all
fields
,
class
reflection
.
get
declared
fields
(
class
hierarchy
.
get
(
i
)
)
)
;
ordered
map
<
string
,
field
metadata
>
name
to
field
=
new
ordered
map
(
all
fields
.
size
(
)
)
;
for
(
int
i
=
0
,
n
=
all
fields
.
size
(
)
;
i
<
n
;
i
++
)
{
field
field
=
all
fields
.
get
(
i
)
;
if
(
field
.
is
transient
(
)
)
continue
;
if
(
field
.
is
static
(
)
)
continue
;
if
(
field
.
is
synthetic
(
)
)
continue
;
if
(
!
field
.
is
accessible
(
)
)
{
try
{
field
.
set
accessible
(
true
)
;
}
catch
(
access
control
exception
ex
)
{
continue
;
}
}
name
to
field
.
put
(
field
.
get
name
(
)
,
new
field
metadata
(
field
)
)
;
}
type
to
fields
.
put
(
type
,
name
to
field
)
;
return
name
to
field
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
ordered
map
<
string
,
field
metadata
>
fields
=
type
to
fields
.
get
(
type
)
;
if
(
fields
!=
null
)
return
fields
;
array
<
class
>
class
hierarchy
=
new
array
(
)
;
class
next
class
=
type
;
while
(
next
class
!=
object
.
class
)
{
class
hierarchy
.
add
(
next
class
)
;
next
class
=
next
class
.
get
superclass
(
)
;
}
array
list
<
field
>
all
fields
=
new
array
list
(
)
;
for
(
int
i
=
class
hierarchy
.
size
-
1
;
i
>=
0
;
i
--
)
collections
.
add
all
(
all
fields
,
class
reflection
.
get
declared
fields
(
class
hierarchy
.
get
(
i
)
)
)
;
ordered
map
<
string
,
field
metadata
>
name
to
field
=
new
ordered
map
(
all
fields
.
size
(
)
)
;
for
(
int
i
=
0
,
n
=
all
fields
.
size
(
)
;
i
<
n
;
i
++
)
{
field
field
=
all
fields
.
get
(
i
)
;
if
(
field
.
is
transient
(
)
)
continue
;
if
(
field
.
is
static
(
)
)
continue
;
if
(
field
.
is
synthetic
(
)
)
continue
;
if
(
!
field
.
is
accessible
(
)
)
{
try
{
field
.
set
accessible
(
true
)
;
}
catch
(
access
control
exception
ex
)
{
continue
;
}
}
name
to
field
.
put
(
field
.
get
name
(
)
,
new
field
metadata
(
field
)
)
;
}
type
to
fields
.
put
(
type
,
name
to
field
)
;
return
name
to
field
;
}
<SENTENCE_END/>
%END%%END% (4.61e-01)
fields (9.59e-02)
field (2.88e-02)
to (2.03e-02)
class (1.94e-02)
all (1.42e-02)
get (1.24e-02)
%UNK% (9.72e-03)
array (9.57e-03)
string (7.62e-03)
<SENTENCE_START>
{
ordered
map
<
string
,
field
metadata
>
fields
=
type
to
fields
.
get
(
type
)
;
if
(
fields
!=
null
)
return
fields
;
array
<
class
>
class
hierarchy
=
new
array
(
)
;
class
next
class
=
type
;
while
(
next
class
!=
object
.
class
)
{
class
hierarchy
.
add
(
next
class
)
;
next
class
=
next
class
.
get
superclass
(
)
;
}
array
list
<
field
>
all
fields
=
new
array
list
(
)
;
for
(
int
i
=
class
hierarchy
.
size
-
1
;
i
>=
0
;
i
--
)
collections
.
add
all
(
all
fields
,
class
reflection
.
get
declared
fields
(
class
hierarchy
.
get
(
i
)
)
)
;
ordered
map
<
string
,
field
metadata
>
name
to
field
=
new
ordered
map
(
all
fields
.
size
(
)
)
;
for
(
int
i
=
0
,
n
=
all
fields
.
size
(
)
;
i
<
n
;
i
++
)
{
field
field
=
all
fields
.
get
(
i
)
;
if
(
field
.
is
transient
(
)
)
continue
;
if
(
field
.
is
static
(
)
)
continue
;
if
(
field
.
is
synthetic
(
)
)
continue
;
if
(
!
field
.
is
accessible
(
)
)
{
try
{
field
.
set
accessible
(
true
)
;
}
catch
(
access
control
exception
ex
)
{
continue
;
}
}
name
to
field
.
put
(
field
.
get
name
(
)
,
new
field
metadata
(
field
)
)
;
}
type
to
fields
.
put
(
type
,
name
to
field
)
;
return
name
to
field
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
ordered
map
<
string
,
field
metadata
>
fields
=
type
to
fields
.
get
(
type
)
;
if
(
fields
!=
null
)
return
fields
;
array
<
class
>
class
hierarchy
=
new
array
(
)
;
class
next
class
=
type
;
while
(
next
class
!=
object
.
class
)
{
class
hierarchy
.
add
(
next
class
)
;
next
class
=
next
class
.
get
superclass
(
)
;
}
array
list
<
field
>
all
fields
=
new
array
list
(
)
;
for
(
int
i
=
class
hierarchy
.
size
-
1
;
i
>=
0
;
i
--
)
collections
.
add
all
(
all
fields
,
class
reflection
.
get
declared
fields
(
class
hierarchy
.
get
(
i
)
)
)
;
ordered
map
<
string
,
field
metadata
>
name
to
field
=
new
ordered
map
(
all
fields
.
size
(
)
)
;
for
(
int
i
=
0
,
n
=
all
fields
.
size
(
)
;
i
<
n
;
i
++
)
{
field
field
=
all
fields
.
get
(
i
)
;
if
(
field
.
is
transient
(
)
)
continue
;
if
(
field
.
is
static
(
)
)
continue
;
if
(
field
.
is
synthetic
(
)
)
continue
;
if
(
!
field
.
is
accessible
(
)
)
{
try
{
field
.
set
accessible
(
true
)
;
}
catch
(
access
control
exception
ex
)
{
continue
;
}
}
name
to
field
.
put
(
field
.
get
name
(
)
,
new
field
metadata
(
field
)
)
;
}
type
to
fields
.
put
(
type
,
name
to
field
)
;
return
name
to
field
;
}
<SENTENCE_END/>
to,jsontoget (3.40e-01)
object (1.77e-01)
instance (7.03e-02)
with (3.78e-02)
obtain (2.87e-02)
new (2.48e-02)
to (1.98e-02)
%UNK% (1.85e-02)
is (1.75e-02)
append (1.51e-02)
<SENTENCE_START>
{
return
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
(
class
)
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
(
class
)
null
)
;
}
<SENTENCE_END/>
json%END% (5.78e-01)
object (3.25e-01)
class (2.18e-02)
instance (1.13e-02)
by (9.00e-03)
value (4.62e-03)
with (3.72e-03)
string (2.26e-03)
null (2.06e-03)
of (1.47e-03)
<SENTENCE_START>
{
return
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
(
class
)
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
(
class
)
null
)
;
}
<SENTENCE_END/>
%END%%END% (9.50e-01)
object (1.65e-02)
class (1.01e-02)
by (1.52e-03)
get (9.54e-04)
null (9.25e-04)
value (9.16e-04)
string (5.57e-04)
all (3.83e-04)
instance (2.90e-04)
<SENTENCE_START>
{
return
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
(
class
)
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
(
class
)
null
)
;
}
<SENTENCE_END/>
to,jsonto%UNK% (1.54e-01)
get (1.12e-01)
read (4.56e-02)
instance (4.11e-02)
object (4.00e-02)
append (3.45e-02)
new (2.90e-02)
obtain (2.59e-02)
is (2.58e-02)
register (2.53e-02)
<SENTENCE_START>
{
return
%SELF%
(
object
,
known
type
,
(
class
)
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
%SELF%
(
object
,
known
type
,
(
class
)
null
)
;
}
<SENTENCE_END/>
json%END% (8.57e-01)
object (5.71e-02)
by (1.02e-02)
class (9.08e-03)
%UNK% (7.23e-03)
type (6.26e-03)
string (3.02e-03)
instance (2.86e-03)
value (2.07e-03)
array (2.05e-03)
<SENTENCE_START>
{
return
%SELF%
(
object
,
known
type
,
(
class
)
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
%SELF%
(
object
,
known
type
,
(
class
)
null
)
;
}
<SENTENCE_END/>
%END%%END% (9.85e-01)
type (2.09e-03)
object (1.61e-03)
class (6.65e-04)
by (5.29e-04)
all (4.62e-04)
value (4.55e-04)
%UNK% (3.87e-04)
string (3.65e-04)
known (3.53e-04)
<SENTENCE_START>
{
return
%SELF%
(
object
,
known
type
,
(
class
)
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
%SELF%
(
object
,
known
type
,
(
class
)
null
)
;
}
<SENTENCE_END/>
to,jsontonew (3.66e-01)
to (1.99e-01)
string (1.21e-01)
buffer (4.24e-02)
%UNK% (3.07e-02)
write (1.77e-02)
get (1.74e-02)
create (1.17e-02)
instance (1.07e-02)
with (9.20e-03)
<SENTENCE_START>
{
string
writer
buffer
=
new
string
writer
(
)
;
%SELF%
(
object
,
known
type
,
element
type
,
buffer
)
;
return
buffer
.
to
string
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
string
writer
buffer
=
new
string
writer
(
)
;
%SELF%
(
object
,
known
type
,
element
type
,
buffer
)
;
return
buffer
.
to
string
(
)
;
}
<SENTENCE_END/>
json%END% (6.09e-01)
string (1.59e-01)
to (4.08e-02)
buffer (2.29e-02)
object (1.73e-02)
%UNK% (1.01e-02)
new (9.31e-03)
element (7.44e-03)
type (6.54e-03)
status (6.52e-03)
<SENTENCE_START>
{
string
writer
buffer
=
new
string
writer
(
)
;
%SELF%
(
object
,
known
type
,
element
type
,
buffer
)
;
return
buffer
.
to
string
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
string
writer
buffer
=
new
string
writer
(
)
;
%SELF%
(
object
,
known
type
,
element
type
,
buffer
)
;
return
buffer
.
to
string
(
)
;
}
<SENTENCE_END/>
%END%%END% (8.61e-01)
string (6.16e-02)
to (9.89e-03)
buffer (7.91e-03)
type (5.82e-03)
object (3.50e-03)
status (2.98e-03)
element (2.40e-03)
array (1.97e-03)
%UNK% (1.93e-03)
<SENTENCE_START>
{
string
writer
buffer
=
new
string
writer
(
)
;
%SELF%
(
object
,
known
type
,
element
type
,
buffer
)
;
return
buffer
.
to
string
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
string
writer
buffer
=
new
string
writer
(
)
;
%SELF%
(
object
,
known
type
,
element
type
,
buffer
)
;
return
buffer
.
to
string
(
)
;
}
<SENTENCE_END/>
to,jsontoobject (3.95e-01)
get (9.07e-02)
instance (4.01e-02)
obtain (2.91e-02)
%UNK% (2.39e-02)
free (2.37e-02)
value (2.35e-02)
with (2.34e-02)
new (1.67e-02)
%END% (1.59e-02)
<SENTENCE_START>
{
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
null
,
file
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
null
,
file
)
;
}
<SENTENCE_END/>
jsonobject (5.00e-01)
%END% (4.54e-01)
value (4.88e-03)
file (4.57e-03)
class (4.43e-03)
instance (3.24e-03)
by (2.90e-03)
null (1.57e-03)
with (1.37e-03)
string (1.12e-03)
<SENTENCE_START>
{
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
null
,
file
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
null
,
file
)
;
}
<SENTENCE_END/>
%END%%END% (9.56e-01)
object (1.53e-02)
class (1.07e-02)
value (1.28e-03)
null (1.12e-03)
by (8.30e-04)
get (8.27e-04)
file (7.69e-04)
string (4.34e-04)
all (2.97e-04)
<SENTENCE_START>
{
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
null
,
file
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
null
,
file
)
;
}
<SENTENCE_END/>
to,jsonto%UNK% (1.82e-01)
object (1.30e-01)
free (3.75e-02)
color (2.79e-02)
action (2.62e-02)
instance (2.59e-02)
obtain (2.57e-02)
append (2.23e-02)
add (1.90e-02)
check (1.90e-02)
<SENTENCE_START>
{
%SELF%
(
object
,
known
type
,
null
,
file
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
known
type
,
null
,
file
)
;
}
<SENTENCE_END/>
json%END% (8.97e-01)
object (4.15e-02)
%UNK% (6.93e-03)
by (5.92e-03)
type (5.88e-03)
file (4.66e-03)
value (2.53e-03)
string (2.24e-03)
animation (1.80e-03)
array (1.52e-03)
<SENTENCE_START>
{
%SELF%
(
object
,
known
type
,
null
,
file
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
known
type
,
null
,
file
)
;
}
<SENTENCE_END/>
%END%%END% (9.86e-01)
type (1.34e-03)
file (1.29e-03)
object (1.25e-03)
value (8.61e-04)
%UNK% (5.74e-04)
known (5.06e-04)
string (3.64e-04)
array (3.36e-04)
null (3.32e-04)
<SENTENCE_START>
{
%SELF%
(
object
,
known
type
,
null
,
file
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
known
type
,
null
,
file
)
;
}
<SENTENCE_END/>
to,jsontoparse (3.90e-01)
write (2.09e-01)
load (7.74e-02)
read (4.46e-02)
save (1.87e-02)
create (1.87e-02)
close (1.32e-02)
reader (1.22e-02)
flush (1.17e-02)
writer (1.05e-02)
<SENTENCE_START>
{
writer
writer
=
null
;
try
{
writer
=
file
.
writer
(
false
,
"UTF-8"
)
;
%SELF%
(
object
,
known
type
,
element
type
,
writer
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error writing file: "
+
file
,
ex
)
;
}
finally
{
stream
utils
.
close
quietly
(
writer
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
writer
writer
=
null
;
try
{
writer
=
file
.
writer
(
false
,
"UTF-8"
)
;
%SELF%
(
object
,
known
type
,
element
type
,
writer
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error writing file: "
+
file
,
ex
)
;
}
finally
{
stream
utils
.
close
quietly
(
writer
)
;
}
}
<SENTENCE_END/>
json%END% (8.97e-01)
write (8.71e-03)
file (7.17e-03)
%UNK% (5.70e-03)
parse (4.87e-03)
directory (4.13e-03)
string (2.76e-03)
writer (2.58e-03)
bytes (2.15e-03)
save (2.10e-03)
<SENTENCE_START>
{
writer
writer
=
null
;
try
{
writer
=
file
.
writer
(
false
,
"UTF-8"
)
;
%SELF%
(
object
,
known
type
,
element
type
,
writer
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error writing file: "
+
file
,
ex
)
;
}
finally
{
stream
utils
.
close
quietly
(
writer
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
writer
writer
=
null
;
try
{
writer
=
file
.
writer
(
false
,
"UTF-8"
)
;
%SELF%
(
object
,
known
type
,
element
type
,
writer
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error writing file: "
+
file
,
ex
)
;
}
finally
{
stream
utils
.
close
quietly
(
writer
)
;
}
}
<SENTENCE_END/>
%END%%END% (9.72e-01)
file (1.93e-03)
writer (1.71e-03)
type (9.46e-04)
directory (9.40e-04)
exception (8.59e-04)
string (8.54e-04)
%UNK% (7.33e-04)
quietly (6.69e-04)
write (5.66e-04)
<SENTENCE_START>
{
writer
writer
=
null
;
try
{
writer
=
file
.
writer
(
false
,
"UTF-8"
)
;
%SELF%
(
object
,
known
type
,
element
type
,
writer
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error writing file: "
+
file
,
ex
)
;
}
finally
{
stream
utils
.
close
quietly
(
writer
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
writer
writer
=
null
;
try
{
writer
=
file
.
writer
(
false
,
"UTF-8"
)
;
%SELF%
(
object
,
known
type
,
element
type
,
writer
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error writing file: "
+
file
,
ex
)
;
}
finally
{
stream
utils
.
close
quietly
(
writer
)
;
}
}
<SENTENCE_END/>
to,jsontoobject (3.36e-01)
get (7.67e-02)
instance (4.15e-02)
obtain (3.09e-02)
free (2.65e-02)
%UNK% (2.43e-02)
value (2.39e-02)
append (2.18e-02)
register (2.11e-02)
%END% (2.07e-02)
<SENTENCE_START>
{
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
null
,
writer
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
null
,
writer
)
;
}
<SENTENCE_END/>
json%END% (6.21e-01)
object (3.38e-01)
value (5.44e-03)
by (3.33e-03)
instance (3.28e-03)
class (2.36e-03)
writer (2.20e-03)
null (1.40e-03)
with (9.78e-04)
string (9.72e-04)
<SENTENCE_START>
{
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
null
,
writer
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
null
,
writer
)
;
}
<SENTENCE_END/>
%END%%END% (9.70e-01)
object (1.08e-02)
class (6.06e-03)
value (1.06e-03)
null (8.69e-04)
by (6.79e-04)
get (6.31e-04)
writer (4.97e-04)
all (3.41e-04)
string (3.00e-04)
<SENTENCE_START>
{
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
null
,
writer
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
object
==
null
?
null
:
object
.
get
class
(
)
,
null
,
writer
)
;
}
<SENTENCE_END/>
to,jsonto%UNK% (1.47e-01)
object (1.38e-01)
free (3.39e-02)
instance (2.86e-02)
action (2.83e-02)
obtain (2.72e-02)
color (2.69e-02)
append (2.55e-02)
check (2.28e-02)
register (1.94e-02)
<SENTENCE_START>
{
%SELF%
(
object
,
known
type
,
null
,
writer
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
known
type
,
null
,
writer
)
;
}
<SENTENCE_END/>
json%END% (9.32e-01)
object (1.78e-02)
type (6.32e-03)
by (5.01e-03)
%UNK% (4.31e-03)
value (1.89e-03)
animation (1.67e-03)
all (1.46e-03)
array (1.24e-03)
string (1.11e-03)
<SENTENCE_START>
{
%SELF%
(
object
,
known
type
,
null
,
writer
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
known
type
,
null
,
writer
)
;
}
<SENTENCE_END/>
%END%%END% (9.89e-01)
type (9.44e-04)
object (9.23e-04)
value (7.03e-04)
all (4.13e-04)
%UNK% (3.76e-04)
known (3.18e-04)
array (3.08e-04)
writer (2.67e-04)
null (2.51e-04)
<SENTENCE_START>
{
%SELF%
(
object
,
known
type
,
null
,
writer
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
known
type
,
null
,
writer
)
;
}
<SENTENCE_END/>
to,jsontoset (3.14e-01)
write (2.33e-01)
flush (5.21e-02)
load (2.89e-02)
%END% (2.38e-02)
create (2.31e-02)
init (2.10e-02)
%UNK% (2.09e-02)
reset (2.09e-02)
parse (2.05e-02)
<SENTENCE_START>
{
set
writer
(
writer
)
;
try
{
write
value
(
object
,
known
type
,
element
type
)
;
}
finally
{
stream
utils
.
close
quietly
(
this
.
writer
)
;
this
.
writer
=
null
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
set
writer
(
writer
)
;
try
{
write
value
(
object
,
known
type
,
element
type
)
;
}
finally
{
stream
utils
.
close
quietly
(
this
.
writer
)
;
this
.
writer
=
null
;
}
}
<SENTENCE_END/>
json%END% (9.31e-01)
writer (2.16e-02)
type (4.32e-03)
object (3.81e-03)
value (2.89e-03)
element (1.77e-03)
stream (1.48e-03)
write (1.48e-03)
known (1.26e-03)
attribute (1.07e-03)
<SENTENCE_START>
{
set
writer
(
writer
)
;
try
{
write
value
(
object
,
known
type
,
element
type
)
;
}
finally
{
stream
utils
.
close
quietly
(
this
.
writer
)
;
this
.
writer
=
null
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
set
writer
(
writer
)
;
try
{
write
value
(
object
,
known
type
,
element
type
)
;
}
finally
{
stream
utils
.
close
quietly
(
this
.
writer
)
;
this
.
writer
=
null
;
}
}
<SENTENCE_END/>
%END%%END% (9.79e-01)
writer (3.24e-03)
type (2.01e-03)
object (1.56e-03)
value (9.79e-04)
known (8.89e-04)
quietly (7.11e-04)
element (6.77e-04)
write (5.07e-04)
stream (2.59e-04)
<SENTENCE_START>
{
set
writer
(
writer
)
;
try
{
write
value
(
object
,
known
type
,
element
type
)
;
}
finally
{
stream
utils
.
close
quietly
(
this
.
writer
)
;
this
.
writer
=
null
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
set
writer
(
writer
)
;
try
{
write
value
(
object
,
known
type
,
element
type
)
;
}
finally
{
stream
utils
.
close
quietly
(
this
.
writer
)
;
this
.
writer
=
null
;
}
}
<SENTENCE_END/>
set,writersetwrite (2.42e-01)
check (1.26e-01)
read (7.97e-02)
init (5.74e-02)
%UNK% (5.01e-02)
json (4.72e-02)
writer (4.34e-02)
parse (3.85e-02)
set (2.12e-02)
flush (2.01e-02)
<SENTENCE_START>
{
if
(
!
(
writer
instanceof
json
writer
)
)
writer
=
new
json
writer
(
writer
)
;
this
.
writer
=
(
json
writer
)
writer
;
this
.
writer
.
set
output
type
(
output
type
)
;
this
.
writer
.
set
quote
long
values
(
quote
long
values
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
!
(
writer
instanceof
json
writer
)
)
writer
=
new
json
writer
(
writer
)
;
this
.
writer
=
(
json
writer
)
writer
;
this
.
writer
.
set
output
type
(
output
type
)
;
this
.
writer
.
set
quote
long
values
(
quote
long
values
)
;
}
<SENTENCE_END/>
writer%END% (8.68e-01)
writer (1.28e-02)
attribute (9.49e-03)
write (9.24e-03)
%UNK% (8.05e-03)
flush (5.08e-03)
output (4.16e-03)
file (4.05e-03)
type (4.02e-03)
set (3.39e-03)
<SENTENCE_START>
{
if
(
!
(
writer
instanceof
json
writer
)
)
writer
=
new
json
writer
(
writer
)
;
this
.
writer
=
(
json
writer
)
writer
;
this
.
writer
.
set
output
type
(
output
type
)
;
this
.
writer
.
set
quote
long
values
(
quote
long
values
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
!
(
writer
instanceof
json
writer
)
)
writer
=
new
json
writer
(
writer
)
;
this
.
writer
=
(
json
writer
)
writer
;
this
.
writer
.
set
output
type
(
output
type
)
;
this
.
writer
.
set
quote
long
values
(
quote
long
values
)
;
}
<SENTENCE_END/>
%END%%END% (9.31e-01)
writer (5.06e-03)
attribute (4.59e-03)
type (4.27e-03)
%UNK% (3.28e-03)
write (2.88e-03)
long (2.84e-03)
values (2.79e-03)
flush (1.96e-03)
output (1.91e-03)
<SENTENCE_START>
{
if
(
!
(
writer
instanceof
json
writer
)
)
writer
=
new
json
writer
(
writer
)
;
this
.
writer
=
(
json
writer
)
writer
;
this
.
writer
.
set
output
type
(
output
type
)
;
this
.
writer
.
set
quote
long
values
(
quote
long
values
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
!
(
writer
instanceof
json
writer
)
)
writer
=
new
json
writer
(
writer
)
;
this
.
writer
=
(
json
writer
)
writer
;
this
.
writer
.
set
output
type
(
output
type
)
;
this
.
writer
.
set
quote
long
values
(
quote
long
values
)
;
}
<SENTENCE_END/>
get,writergetget (8.33e-01)
is (7.94e-02)
protected (2.40e-02)
list (8.56e-03)
length (7.45e-03)
needs (5.15e-03)
last (3.85e-03)
iterator (3.60e-03)
name (3.10e-03)
read (2.82e-03)
<SENTENCE_START>
{
return
writer
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
writer
;
}
<SENTENCE_END/>
writerwriter (4.06e-01)
%END% (3.87e-01)
name (2.81e-02)
write (1.66e-02)
flush (1.59e-02)
attribute (1.54e-02)
list (1.47e-02)
file (1.46e-02)
directory (6.41e-03)
type (6.26e-03)
<SENTENCE_START>
{
return
writer
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
writer
;
}
<SENTENCE_END/>
%END%%END% (9.54e-01)
value (3.47e-03)
file (3.21e-03)
writer (1.62e-03)
name (1.59e-03)
20 (1.33e-03)
type (1.23e-03)
array (1.20e-03)
offset (1.17e-03)
%UNK% (8.60e-04)
<SENTENCE_START>
{
return
writer
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
writer
;
}
<SENTENCE_END/>
write,fieldswriteget (4.31e-01)
%END% (3.90e-02)
%UNK% (3.75e-02)
parse (3.60e-02)
load (2.16e-02)
create (1.87e-02)
is (1.81e-02)
default (1.76e-02)
add (1.49e-02)
read (1.33e-02)
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
[
]
default
values
=
get
default
values
(
type
)
;
ordered
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
int
i
=
0
;
for
(
field
metadata
metadata
:
new
ordered
map
values
<
field
metadata
>
(
fields
)
)
{
field
field
=
metadata
.
field
;
try
{
object
value
=
field
.
get
(
object
)
;
if
(
default
values
!=
null
)
{
object
default
value
=
default
values
[
i
++
]
;
if
(
value
==
null
&&
default
value
==
null
)
continue
;
if
(
value
!=
null
&&
default
value
!=
null
)
{
if
(
value
.
equals
(
default
value
)
)
continue
;
if
(
value
.
get
class
(
)
.
is
array
(
)
&&
default
value
.
get
class
(
)
.
is
array
(
)
)
{
equals
1
[
0
]
=
value
;
equals
2
[
0
]
=
default
value
;
if
(
arrays
.
deep
equals
(
equals
1
,
equals
2
)
)
continue
;
}
}
}
if
(
debug
)
system
.
out
.
println
(
"Writing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
writer
.
name
(
field
.
get
name
(
)
)
;
write
value
(
value
,
field
.
get
type
(
)
,
metadata
.
element
type
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
[
]
default
values
=
get
default
values
(
type
)
;
ordered
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
int
i
=
0
;
for
(
field
metadata
metadata
:
new
ordered
map
values
<
field
metadata
>
(
fields
)
)
{
field
field
=
metadata
.
field
;
try
{
object
value
=
field
.
get
(
object
)
;
if
(
default
values
!=
null
)
{
object
default
value
=
default
values
[
i
++
]
;
if
(
value
==
null
&&
default
value
==
null
)
continue
;
if
(
value
!=
null
&&
default
value
!=
null
)
{
if
(
value
.
equals
(
default
value
)
)
continue
;
if
(
value
.
get
class
(
)
.
is
array
(
)
&&
default
value
.
get
class
(
)
.
is
array
(
)
)
{
equals
1
[
0
]
=
value
;
equals
2
[
0
]
=
default
value
;
if
(
arrays
.
deep
equals
(
equals
1
,
equals
2
)
)
continue
;
}
}
}
if
(
debug
)
system
.
out
.
println
(
"Writing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
writer
.
name
(
field
.
get
name
(
)
)
;
write
value
(
value
,
field
.
get
type
(
)
,
metadata
.
element
type
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
}
<SENTENCE_END/>
fields%END% (6.00e-01)
get (3.10e-02)
default (1.86e-02)
fields (1.77e-02)
value (1.55e-02)
%UNK% (1.43e-02)
field (1.37e-02)
attribute (7.69e-03)
name (7.22e-03)
type (6.93e-03)
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
[
]
default
values
=
get
default
values
(
type
)
;
ordered
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
int
i
=
0
;
for
(
field
metadata
metadata
:
new
ordered
map
values
<
field
metadata
>
(
fields
)
)
{
field
field
=
metadata
.
field
;
try
{
object
value
=
field
.
get
(
object
)
;
if
(
default
values
!=
null
)
{
object
default
value
=
default
values
[
i
++
]
;
if
(
value
==
null
&&
default
value
==
null
)
continue
;
if
(
value
!=
null
&&
default
value
!=
null
)
{
if
(
value
.
equals
(
default
value
)
)
continue
;
if
(
value
.
get
class
(
)
.
is
array
(
)
&&
default
value
.
get
class
(
)
.
is
array
(
)
)
{
equals
1
[
0
]
=
value
;
equals
2
[
0
]
=
default
value
;
if
(
arrays
.
deep
equals
(
equals
1
,
equals
2
)
)
continue
;
}
}
}
if
(
debug
)
system
.
out
.
println
(
"Writing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
writer
.
name
(
field
.
get
name
(
)
)
;
write
value
(
value
,
field
.
get
type
(
)
,
metadata
.
element
type
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
[
]
default
values
=
get
default
values
(
type
)
;
ordered
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
int
i
=
0
;
for
(
field
metadata
metadata
:
new
ordered
map
values
<
field
metadata
>
(
fields
)
)
{
field
field
=
metadata
.
field
;
try
{
object
value
=
field
.
get
(
object
)
;
if
(
default
values
!=
null
)
{
object
default
value
=
default
values
[
i
++
]
;
if
(
value
==
null
&&
default
value
==
null
)
continue
;
if
(
value
!=
null
&&
default
value
!=
null
)
{
if
(
value
.
equals
(
default
value
)
)
continue
;
if
(
value
.
get
class
(
)
.
is
array
(
)
&&
default
value
.
get
class
(
)
.
is
array
(
)
)
{
equals
1
[
0
]
=
value
;
equals
2
[
0
]
=
default
value
;
if
(
arrays
.
deep
equals
(
equals
1
,
equals
2
)
)
continue
;
}
}
}
if
(
debug
)
system
.
out
.
println
(
"Writing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
writer
.
name
(
field
.
get
name
(
)
)
;
write
value
(
value
,
field
.
get
type
(
)
,
metadata
.
element
type
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
}
<SENTENCE_END/>
%END%%END% (7.64e-01)
get (1.15e-02)
fields (1.12e-02)
value (9.04e-03)
default (8.61e-03)
field (7.31e-03)
%UNK% (6.39e-03)
type (5.07e-03)
name (4.98e-03)
attribute (4.44e-03)
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
[
]
default
values
=
get
default
values
(
type
)
;
ordered
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
int
i
=
0
;
for
(
field
metadata
metadata
:
new
ordered
map
values
<
field
metadata
>
(
fields
)
)
{
field
field
=
metadata
.
field
;
try
{
object
value
=
field
.
get
(
object
)
;
if
(
default
values
!=
null
)
{
object
default
value
=
default
values
[
i
++
]
;
if
(
value
==
null
&&
default
value
==
null
)
continue
;
if
(
value
!=
null
&&
default
value
!=
null
)
{
if
(
value
.
equals
(
default
value
)
)
continue
;
if
(
value
.
get
class
(
)
.
is
array
(
)
&&
default
value
.
get
class
(
)
.
is
array
(
)
)
{
equals
1
[
0
]
=
value
;
equals
2
[
0
]
=
default
value
;
if
(
arrays
.
deep
equals
(
equals
1
,
equals
2
)
)
continue
;
}
}
}
if
(
debug
)
system
.
out
.
println
(
"Writing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
writer
.
name
(
field
.
get
name
(
)
)
;
write
value
(
value
,
field
.
get
type
(
)
,
metadata
.
element
type
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
[
]
default
values
=
get
default
values
(
type
)
;
ordered
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
int
i
=
0
;
for
(
field
metadata
metadata
:
new
ordered
map
values
<
field
metadata
>
(
fields
)
)
{
field
field
=
metadata
.
field
;
try
{
object
value
=
field
.
get
(
object
)
;
if
(
default
values
!=
null
)
{
object
default
value
=
default
values
[
i
++
]
;
if
(
value
==
null
&&
default
value
==
null
)
continue
;
if
(
value
!=
null
&&
default
value
!=
null
)
{
if
(
value
.
equals
(
default
value
)
)
continue
;
if
(
value
.
get
class
(
)
.
is
array
(
)
&&
default
value
.
get
class
(
)
.
is
array
(
)
)
{
equals
1
[
0
]
=
value
;
equals
2
[
0
]
=
default
value
;
if
(
arrays
.
deep
equals
(
equals
1
,
equals
2
)
)
continue
;
}
}
}
if
(
debug
)
system
.
out
.
println
(
"Writing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
writer
.
name
(
field
.
get
name
(
)
)
;
write
value
(
value
,
field
.
get
type
(
)
,
metadata
.
element
type
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
}
<SENTENCE_END/>
get,default,valuesgetget (5.59e-01)
parse (3.42e-02)
create (3.12e-02)
add (2.21e-02)
read (2.03e-02)
%UNK% (1.61e-02)
new (1.58e-02)
%END% (1.45e-02)
to (1.27e-02)
load (1.25e-02)
<SENTENCE_START>
{
if
(
!
use
prototypes
)
return
null
;
if
(
class
to
default
values
.
contains
key
(
type
)
)
return
class
to
default
values
.
get
(
type
)
;
object
object
;
try
{
object
=
new
instance
(
type
)
;
}
catch
(
exception
ex
)
{
class
to
default
values
.
put
(
type
,
null
)
;
return
null
;
}
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
object
[
]
values
=
new
object
[
fields
.
size
]
;
class
to
default
values
.
put
(
type
,
values
)
;
int
i
=
0
;
for
(
field
metadata
metadata
:
fields
.
values
(
)
)
{
field
field
=
metadata
.
field
;
try
{
values
[
i
++
]
=
field
.
get
(
object
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
return
values
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
!
use
prototypes
)
return
null
;
if
(
class
to
default
values
.
contains
key
(
type
)
)
return
class
to
default
values
.
get
(
type
)
;
object
object
;
try
{
object
=
new
instance
(
type
)
;
}
catch
(
exception
ex
)
{
class
to
default
values
.
put
(
type
,
null
)
;
return
null
;
}
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
object
[
]
values
=
new
object
[
fields
.
size
]
;
class
to
default
values
.
put
(
type
,
values
)
;
int
i
=
0
;
for
(
field
metadata
metadata
:
fields
.
values
(
)
)
{
field
field
=
metadata
.
field
;
try
{
values
[
i
++
]
=
field
.
get
(
object
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
return
values
;
}
<SENTENCE_END/>
default%END% (6.27e-01)
fields (3.37e-02)
get (2.80e-02)
default (1.53e-02)
field (1.35e-02)
to (1.28e-02)
values (1.00e-02)
type (9.40e-03)
instance (9.27e-03)
declared (8.04e-03)
<SENTENCE_START>
{
if
(
!
use
prototypes
)
return
null
;
if
(
class
to
default
values
.
contains
key
(
type
)
)
return
class
to
default
values
.
get
(
type
)
;
object
object
;
try
{
object
=
new
instance
(
type
)
;
}
catch
(
exception
ex
)
{
class
to
default
values
.
put
(
type
,
null
)
;
return
null
;
}
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
object
[
]
values
=
new
object
[
fields
.
size
]
;
class
to
default
values
.
put
(
type
,
values
)
;
int
i
=
0
;
for
(
field
metadata
metadata
:
fields
.
values
(
)
)
{
field
field
=
metadata
.
field
;
try
{
values
[
i
++
]
=
field
.
get
(
object
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
return
values
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
!
use
prototypes
)
return
null
;
if
(
class
to
default
values
.
contains
key
(
type
)
)
return
class
to
default
values
.
get
(
type
)
;
object
object
;
try
{
object
=
new
instance
(
type
)
;
}
catch
(
exception
ex
)
{
class
to
default
values
.
put
(
type
,
null
)
;
return
null
;
}
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
object
[
]
values
=
new
object
[
fields
.
size
]
;
class
to
default
values
.
put
(
type
,
values
)
;
int
i
=
0
;
for
(
field
metadata
metadata
:
fields
.
values
(
)
)
{
field
field
=
metadata
.
field
;
try
{
values
[
i
++
]
=
field
.
get
(
object
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
return
values
;
}
<SENTENCE_END/>
values%END% (7.00e-01)
fields (2.94e-02)
values (1.59e-02)
field (1.16e-02)
get (9.87e-03)
type (9.63e-03)
default (9.38e-03)
object (7.91e-03)
to (7.66e-03)
instance (5.72e-03)
<SENTENCE_START>
{
if
(
!
use
prototypes
)
return
null
;
if
(
class
to
default
values
.
contains
key
(
type
)
)
return
class
to
default
values
.
get
(
type
)
;
object
object
;
try
{
object
=
new
instance
(
type
)
;
}
catch
(
exception
ex
)
{
class
to
default
values
.
put
(
type
,
null
)
;
return
null
;
}
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
object
[
]
values
=
new
object
[
fields
.
size
]
;
class
to
default
values
.
put
(
type
,
values
)
;
int
i
=
0
;
for
(
field
metadata
metadata
:
fields
.
values
(
)
)
{
field
field
=
metadata
.
field
;
try
{
values
[
i
++
]
=
field
.
get
(
object
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
return
values
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
!
use
prototypes
)
return
null
;
if
(
class
to
default
values
.
contains
key
(
type
)
)
return
class
to
default
values
.
get
(
type
)
;
object
object
;
try
{
object
=
new
instance
(
type
)
;
}
catch
(
exception
ex
)
{
class
to
default
values
.
put
(
type
,
null
)
;
return
null
;
}
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
object
[
]
values
=
new
object
[
fields
.
size
]
;
class
to
default
values
.
put
(
type
,
values
)
;
int
i
=
0
;
for
(
field
metadata
metadata
:
fields
.
values
(
)
)
{
field
field
=
metadata
.
field
;
try
{
values
[
i
++
]
=
field
.
get
(
object
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
return
values
;
}
<SENTENCE_END/>
%END%%END% (8.92e-01)
fields (6.47e-03)
values (3.59e-03)
get (3.35e-03)
field (3.00e-03)
to (2.98e-03)
instance (2.61e-03)
type (2.50e-03)
exception (2.47e-03)
object (2.45e-03)
<SENTENCE_START>
{
if
(
!
use
prototypes
)
return
null
;
if
(
class
to
default
values
.
contains
key
(
type
)
)
return
class
to
default
values
.
get
(
type
)
;
object
object
;
try
{
object
=
new
instance
(
type
)
;
}
catch
(
exception
ex
)
{
class
to
default
values
.
put
(
type
,
null
)
;
return
null
;
}
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
object
[
]
values
=
new
object
[
fields
.
size
]
;
class
to
default
values
.
put
(
type
,
values
)
;
int
i
=
0
;
for
(
field
metadata
metadata
:
fields
.
values
(
)
)
{
field
field
=
metadata
.
field
;
try
{
values
[
i
++
]
=
field
.
get
(
object
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
return
values
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
!
use
prototypes
)
return
null
;
if
(
class
to
default
values
.
contains
key
(
type
)
)
return
class
to
default
values
.
get
(
type
)
;
object
object
;
try
{
object
=
new
instance
(
type
)
;
}
catch
(
exception
ex
)
{
class
to
default
values
.
put
(
type
,
null
)
;
return
null
;
}
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
object
[
]
values
=
new
object
[
fields
.
size
]
;
class
to
default
values
.
put
(
type
,
values
)
;
int
i
=
0
;
for
(
field
metadata
metadata
:
fields
.
values
(
)
)
{
field
field
=
metadata
.
field
;
try
{
values
[
i
++
]
=
field
.
get
(
object
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
return
values
;
}
<SENTENCE_END/>
write,fieldwriteadd (1.83e-01)
get (5.33e-02)
append (4.21e-02)
element (3.33e-02)
put (3.09e-02)
new (2.84e-02)
name (2.59e-02)
load (2.47e-02)
object (2.46e-02)
set (2.37e-02)
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
null
)
;
}
<SENTENCE_END/>
field%END% (7.21e-01)
object (1.81e-01)
name (1.21e-02)
value (1.18e-02)
by (1.15e-02)
attribute (7.18e-03)
array (5.17e-03)
all (4.60e-03)
animation (3.42e-03)
string (3.41e-03)
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
null
)
;
}
<SENTENCE_END/>
%END%%END% (9.80e-01)
object (3.15e-03)
value (2.29e-03)
name (1.44e-03)
all (1.21e-03)
array (9.78e-04)
by (8.75e-04)
string (6.05e-04)
animation (4.88e-04)
header (3.85e-04)
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
null
)
;
}
<SENTENCE_END/>
write,fieldwriteelement (2.51e-01)
add (5.78e-02)
get (4.64e-02)
by (3.69e-02)
name (3.67e-02)
object (3.35e-02)
append (2.27e-02)
for (1.96e-02)
number (1.93e-02)
button (1.79e-02)
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
element
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
element
type
)
;
}
<SENTENCE_END/>
fieldobject (4.31e-01)
%END% (3.12e-01)
by (5.53e-02)
element (5.25e-02)
type (4.30e-02)
name (1.73e-02)
animation (9.76e-03)
value (8.62e-03)
attribute (5.45e-03)
string (4.66e-03)
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
element
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
element
type
)
;
}
<SENTENCE_END/>
%END%%END% (9.15e-01)
type (1.86e-02)
object (7.76e-03)
element (6.54e-03)
by (5.08e-03)
name (5.08e-03)
value (4.03e-03)
animation (2.38e-03)
string (1.95e-03)
array (1.37e-03)
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
element
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
element
type
)
;
}
<SENTENCE_END/>
write,fieldwritejson (1.03e-01)
read (6.44e-02)
%UNK% (6.24e-02)
object (3.91e-02)
append (3.76e-02)
parse (3.67e-02)
number (3.58e-02)
load (2.52e-02)
element (2.46e-02)
%END% (2.17e-02)
<SENTENCE_START>
{
%SELF%
(
object
,
field
name
,
json
name
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
field
name
,
json
name
,
null
)
;
}
<SENTENCE_END/>
field%END% (6.95e-01)
object (1.42e-01)
string (1.99e-02)
value (1.02e-02)
json (8.99e-03)
by (8.69e-03)
animation (6.13e-03)
name (5.97e-03)
%UNK% (5.78e-03)
array (5.28e-03)
<SENTENCE_START>
{
%SELF%
(
object
,
field
name
,
json
name
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
field
name
,
json
name
,
null
)
;
}
<SENTENCE_END/>
%END%%END% (9.54e-01)
object (4.40e-03)
string (3.87e-03)
value (3.02e-03)
name (1.60e-03)
%UNK% (1.50e-03)
array (1.42e-03)
animation (1.31e-03)
by (1.25e-03)
header (1.10e-03)
<SENTENCE_START>
{
%SELF%
(
object
,
field
name
,
json
name
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
field
name
,
json
name
,
null
)
;
}
<SENTENCE_END/>
write,fieldwriteget (4.37e-01)
parse (8.94e-02)
create (4.22e-02)
load (3.81e-02)
read (3.22e-02)
add (2.19e-02)
write (2.02e-02)
%UNK% (1.83e-02)
invoke (1.31e-02)
new (1.12e-02)
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
field
field
=
metadata
.
field
;
if
(
element
type
==
null
)
element
type
=
metadata
.
element
type
;
try
{
if
(
debug
)
system
.
out
.
println
(
"Writing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
writer
.
name
(
json
name
)
;
write
value
(
field
.
get
(
object
)
,
field
.
get
type
(
)
,
element
type
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
field
field
=
metadata
.
field
;
if
(
element
type
==
null
)
element
type
=
metadata
.
element
type
;
try
{
if
(
debug
)
system
.
out
.
println
(
"Writing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
writer
.
name
(
json
name
)
;
write
value
(
field
.
get
(
object
)
,
field
.
get
type
(
)
,
element
type
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
<SENTENCE_END/>
field%END% (4.70e-01)
fields (5.83e-02)
get (4.41e-02)
field (2.30e-02)
name (2.28e-02)
type (1.70e-02)
metadata (1.37e-02)
declared (1.31e-02)
%UNK% (1.17e-02)
element (1.11e-02)
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
field
field
=
metadata
.
field
;
if
(
element
type
==
null
)
element
type
=
metadata
.
element
type
;
try
{
if
(
debug
)
system
.
out
.
println
(
"Writing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
writer
.
name
(
json
name
)
;
write
value
(
field
.
get
(
object
)
,
field
.
get
type
(
)
,
element
type
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
field
field
=
metadata
.
field
;
if
(
element
type
==
null
)
element
type
=
metadata
.
element
type
;
try
{
if
(
debug
)
system
.
out
.
println
(
"Writing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
writer
.
name
(
json
name
)
;
write
value
(
field
.
get
(
object
)
,
field
.
get
type
(
)
,
element
type
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
<SENTENCE_END/>
%END%%END% (6.57e-01)
fields (4.21e-02)
field (1.63e-02)
get (1.58e-02)
type (1.58e-02)
name (1.53e-02)
metadata (7.33e-03)
element (6.07e-03)
string (5.84e-03)
exception (5.79e-03)
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
field
field
=
metadata
.
field
;
if
(
element
type
==
null
)
element
type
=
metadata
.
element
type
;
try
{
if
(
debug
)
system
.
out
.
println
(
"Writing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
writer
.
name
(
json
name
)
;
write
value
(
field
.
get
(
object
)
,
field
.
get
type
(
)
,
element
type
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
field
field
=
metadata
.
field
;
if
(
element
type
==
null
)
element
type
=
metadata
.
element
type
;
try
{
if
(
debug
)
system
.
out
.
println
(
"Writing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
writer
.
name
(
json
name
)
;
write
value
(
field
.
get
(
object
)
,
field
.
get
type
(
)
,
element
type
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
field
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
<SENTENCE_END/>
write,valuewriteparse (3.94e-01)
load (3.16e-01)
read (1.39e-01)
append (1.31e-02)
put (1.11e-02)
get (9.20e-03)
remove (5.71e-03)
write (5.33e-03)
reader (4.82e-03)
delete (4.71e-03)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
value
==
null
)
%SELF%
(
value
,
null
,
null
)
;
else
%SELF%
(
value
,
value
.
get
class
(
)
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
value
==
null
)
%SELF%
(
value
,
null
,
null
)
;
else
%SELF%
(
value
,
value
.
get
class
(
)
,
null
)
;
}
<SENTENCE_END/>
value%END% (9.49e-01)
value (7.38e-03)
name (3.11e-03)
null (1.98e-03)
string (1.90e-03)
attribute (1.78e-03)
serialization (1.38e-03)
class (1.04e-03)
writer (8.26e-04)
all (7.39e-04)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
value
==
null
)
%SELF%
(
value
,
null
,
null
)
;
else
%SELF%
(
value
,
value
.
get
class
(
)
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
value
==
null
)
%SELF%
(
value
,
null
,
null
)
;
else
%SELF%
(
value
,
value
.
get
class
(
)
,
null
)
;
}
<SENTENCE_END/>
%END%%END% (9.80e-01)
value (2.03e-03)
name (1.23e-03)
null (9.04e-04)
serialization (8.87e-04)
string (6.68e-04)
exception (6.45e-04)
class (5.90e-04)
attribute (3.87e-04)
all (3.61e-04)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
value
==
null
)
%SELF%
(
value
,
null
,
null
)
;
else
%SELF%
(
value
,
value
.
get
class
(
)
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
value
==
null
)
%SELF%
(
value
,
null
,
null
)
;
else
%SELF%
(
value
,
value
.
get
class
(
)
,
null
)
;
}
<SENTENCE_END/>
write,valuewriteparse (7.53e-01)
read (1.01e-01)
load (1.00e-01)
serialization (5.58e-03)
reader (3.83e-03)
append (1.76e-03)
new (1.64e-03)
put (1.40e-03)
compact (1.35e-03)
write (1.34e-03)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
value
,
known
type
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
value
,
known
type
,
null
)
;
}
<SENTENCE_END/>
value%END% (9.49e-01)
name (6.36e-03)
type (2.79e-03)
string (2.02e-03)
writer (1.87e-03)
serialization (1.40e-03)
file (1.35e-03)
bytes (1.26e-03)
directory (1.10e-03)
attribute (9.59e-04)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
value
,
known
type
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
value
,
known
type
,
null
)
;
}
<SENTENCE_END/>
%END%%END% (9.86e-01)
name (1.72e-03)
serialization (9.63e-04)
type (7.62e-04)
exception (5.36e-04)
string (4.88e-04)
null (4.13e-04)
writer (2.62e-04)
file (2.43e-04)
directory (2.28e-04)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
value
,
known
type
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
value
,
known
type
,
null
)
;
}
<SENTENCE_END/>
write,valuewriteparse (7.35e-01)
read (1.09e-01)
load (1.04e-01)
reader (5.39e-03)
serialization (5.08e-03)
append (2.00e-03)
write (2.00e-03)
delete (1.76e-03)
new (1.50e-03)
put (1.45e-03)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
value
,
known
type
,
element
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
value
,
known
type
,
element
type
)
;
}
<SENTENCE_END/>
value%END% (9.27e-01)
name (7.79e-03)
type (5.40e-03)
element (4.11e-03)
string (3.63e-03)
file (2.27e-03)
bytes (1.79e-03)
attribute (1.76e-03)
writer (1.68e-03)
directory (1.44e-03)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
value
,
known
type
,
element
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
value
,
known
type
,
element
type
)
;
}
<SENTENCE_END/>
%END%%END% (9.72e-01)
type (3.71e-03)
name (3.40e-03)
serialization (1.76e-03)
element (1.49e-03)
exception (1.02e-03)
string (7.71e-04)
writer (5.11e-04)
catch (4.32e-04)
known (3.57e-04)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
value
,
known
type
,
element
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
value
,
known
type
,
element
type
)
;
}
<SENTENCE_END/>
write,valuewritevalue (4.39e-01)
remove (1.17e-01)
load (1.13e-01)
append (7.42e-02)
get (1.60e-02)
put (1.19e-02)
set (1.13e-02)
state (8.49e-03)
%UNK% (8.00e-03)
add (6.91e-03)
<SENTENCE_START>
{
if
(
value
==
null
)
%SELF%
(
value
,
null
,
null
)
;
else
%SELF%
(
value
,
value
.
get
class
(
)
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
value
==
null
)
%SELF%
(
value
,
null
,
null
)
;
else
%SELF%
(
value
,
value
.
get
class
(
)
,
null
)
;
}
<SENTENCE_END/>
value%END% (8.52e-01)
value (1.17e-01)
null (1.79e-03)
by (1.77e-03)
object (1.77e-03)
all (1.51e-03)
attribute (1.39e-03)
string (1.06e-03)
class (1.05e-03)
%UNK% (8.47e-04)
<SENTENCE_START>
{
if
(
value
==
null
)
%SELF%
(
value
,
null
,
null
)
;
else
%SELF%
(
value
,
value
.
get
class
(
)
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
value
==
null
)
%SELF%
(
value
,
null
,
null
)
;
else
%SELF%
(
value
,
value
.
get
class
(
)
,
null
)
;
}
<SENTENCE_END/>
%END%%END% (9.68e-01)
value (1.73e-02)
all (1.14e-03)
null (1.07e-03)
by (8.64e-04)
class (7.33e-04)
string (4.82e-04)
object (4.73e-04)
attribute (3.49e-04)
%UNK% (2.99e-04)
<SENTENCE_START>
{
if
(
value
==
null
)
%SELF%
(
value
,
null
,
null
)
;
else
%SELF%
(
value
,
value
.
get
class
(
)
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
value
==
null
)
%SELF%
(
value
,
null
,
null
)
;
else
%SELF%
(
value
,
value
.
get
class
(
)
,
null
)
;
}
<SENTENCE_END/>
write,valuewrite%UNK% (1.60e-01)
set (1.41e-01)
append (8.45e-02)
remove (4.21e-02)
value (3.67e-02)
color (3.27e-02)
add (2.85e-02)
load (2.21e-02)
start (1.91e-02)
init (1.87e-02)
<SENTENCE_START>
{
%SELF%
(
value
,
known
type
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
value
,
known
type
,
null
)
;
}
<SENTENCE_END/>
value%END% (9.68e-01)
value (7.15e-03)
type (3.26e-03)
%UNK% (2.42e-03)
by (2.08e-03)
object (1.05e-03)
animation (9.83e-04)
all (8.88e-04)
known (6.58e-04)
string (5.48e-04)
<SENTENCE_START>
{
%SELF%
(
value
,
known
type
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
value
,
known
type
,
null
)
;
}
<SENTENCE_END/>
%END%%END% (9.86e-01)
value (3.35e-03)
type (1.78e-03)
%UNK% (6.01e-04)
all (3.62e-04)
null (3.42e-04)
known (3.42e-04)
object (3.19e-04)
animation (2.47e-04)
by (2.12e-04)
<SENTENCE_START>
{
%SELF%
(
value
,
known
type
,
null
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
value
,
known
type
,
null
)
;
}
<SENTENCE_END/>
write,valuewrite%UNK% (1.83e-01)
%END% (1.53e-01)
get (6.04e-02)
to (3.54e-02)
read (1.79e-02)
write (1.34e-02)
is (1.27e-02)
end (1.24e-02)
type (1.16e-02)
load (1.14e-02)
<SENTENCE_START>
{
try
{
if
(
value
==
null
)
{
writer
.
value
(
null
)
;
return
;
}
if
(
(
known
type
!=
null
&&
known
type
.
is
primitive
(
)
)
||
known
type
==
string
.
class
||
known
type
==
integer
.
class
||
known
type
==
boolean
.
class
||
known
type
==
float
.
class
||
known
type
==
long
.
class
||
known
type
==
double
.
class
||
known
type
==
short
.
class
||
known
type
==
byte
.
class
||
known
type
==
character
.
class
)
{
writer
.
value
(
value
)
;
return
;
}
class
actual
type
=
value
.
get
class
(
)
;
if
(
actual
type
.
is
primitive
(
)
||
actual
type
==
string
.
class
||
actual
type
==
integer
.
class
||
actual
type
==
boolean
.
class
||
actual
type
==
float
.
class
||
actual
type
==
long
.
class
||
actual
type
==
double
.
class
||
actual
type
==
short
.
class
||
actual
type
==
byte
.
class
||
actual
type
==
character
.
class
)
{
write
object
start
(
actual
type
,
null
)
;
%SELF%
(
"value"
,
value
)
;
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
serializable
)
{
write
object
start
(
actual
type
,
known
type
)
;
(
(
serializable
)
value
)
.
write
(
this
)
;
write
object
end
(
)
;
return
;
}
serializer
serializer
=
class
to
serializer
.
get
(
actual
type
)
;
if
(
serializer
!=
null
)
{
serializer
.
write
(
this
,
value
,
known
type
)
;
return
;
}
if
(
value
instanceof
array
)
{
if
(
known
type
!=
null
&&
actual
type
!=
known
type
&&
actual
type
!=
array
.
class
)
throw
new
serialization
exception
(
"Serialization of an Array other than the known type is not supported. "
+
"Known type: "
+
known
type
+
" Actual type: "
+
actual
type
)
;
write
array
start
(
)
;
array
array
=
(
array
)
value
;
for
(
int
i
=
0
,
n
=
array
.
size
;
i
<
n
;
i
++
)
%SELF%
(
array
.
get
(
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
queue
)
{
if
(
known
type
!=
null
&&
actual
type
!=
known
type
&&
actual
type
!=
queue
.
class
)
throw
new
serialization
exception
(
"Serialization of a Queue other than the known type is not supported. "
+
"Known type: "
+
known
type
+
" Actual type: "
+
actual
type
)
;
write
array
start
(
)
;
queue
queue
=
(
queue
)
value
;
for
(
int
i
=
0
,
n
=
queue
.
size
;
i
<
n
;
i
++
)
%SELF%
(
queue
.
get
(
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
collection
)
{
if
(
type
name
!=
null
&&
actual
type
!=
array
list
.
class
&&
(
known
type
==
null
||
known
type
!=
actual
type
)
)
{
write
object
start
(
actual
type
,
known
type
)
;
write
array
start
(
"items"
)
;
for
(
object
item
:
(
collection
)
value
)
%SELF%
(
item
,
element
type
,
null
)
;
write
array
end
(
)
;
write
object
end
(
)
;
}
else
{
write
array
start
(
)
;
for
(
object
item
:
(
collection
)
value
)
%SELF%
(
item
,
element
type
,
null
)
;
write
array
end
(
)
;
}
return
;
}
if
(
actual
type
.
is
array
(
)
)
{
if
(
element
type
==
null
)
element
type
=
actual
type
.
get
component
type
(
)
;
int
length
=
array
reflection
.
get
length
(
value
)
;
write
array
start
(
)
;
for
(
int
i
=
0
;
i
<
length
;
i
++
)
%SELF%
(
array
reflection
.
get
(
value
,
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
object
map
)
{
if
(
known
type
==
null
)
known
type
=
object
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
for
(
entry
entry
:
(
(
object
map
<
?
,
?
>
)
value
)
.
entries
(
)
)
{
writer
.
name
(
convert
to
string
(
entry
.
key
)
)
;
%SELF%
(
entry
.
value
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
array
map
)
{
if
(
known
type
==
null
)
known
type
=
array
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
array
map
map
=
(
array
map
)
value
;
for
(
int
i
=
0
,
n
=
map
.
size
;
i
<
n
;
i
++
)
{
writer
.
name
(
convert
to
string
(
map
.
keys
[
i
]
)
)
;
%SELF%
(
map
.
values
[
i
]
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
map
)
{
if
(
known
type
==
null
)
known
type
=
hash
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
for
(
map
.
entry
entry
:
(
(
map
<
?
,
?
>
)
value
)
.
entry
set
(
)
)
{
writer
.
name
(
convert
to
string
(
entry
.
get
key
(
)
)
)
;
%SELF%
(
entry
.
get
value
(
)
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
class
reflection
.
is
assignable
from
(
enum
.
class
,
actual
type
)
)
{
if
(
type
name
!=
null
&&
(
known
type
==
null
||
known
type
!=
actual
type
)
)
{
if
(
actual
type
.
get
enum
constants
(
)
==
null
)
actual
type
=
actual
type
.
get
superclass
(
)
;
write
object
start
(
actual
type
,
null
)
;
writer
.
name
(
"value"
)
;
writer
.
value
(
convert
to
string
(
(
enum
)
value
)
)
;
write
object
end
(
)
;
}
else
{
writer
.
value
(
convert
to
string
(
(
enum
)
value
)
)
;
}
return
;
}
write
object
start
(
actual
type
,
known
type
)
;
write
fields
(
value
)
;
write
object
end
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
if
(
value
==
null
)
{
writer
.
value
(
null
)
;
return
;
}
if
(
(
known
type
!=
null
&&
known
type
.
is
primitive
(
)
)
||
known
type
==
string
.
class
||
known
type
==
integer
.
class
||
known
type
==
boolean
.
class
||
known
type
==
float
.
class
||
known
type
==
long
.
class
||
known
type
==
double
.
class
||
known
type
==
short
.
class
||
known
type
==
byte
.
class
||
known
type
==
character
.
class
)
{
writer
.
value
(
value
)
;
return
;
}
class
actual
type
=
value
.
get
class
(
)
;
if
(
actual
type
.
is
primitive
(
)
||
actual
type
==
string
.
class
||
actual
type
==
integer
.
class
||
actual
type
==
boolean
.
class
||
actual
type
==
float
.
class
||
actual
type
==
long
.
class
||
actual
type
==
double
.
class
||
actual
type
==
short
.
class
||
actual
type
==
byte
.
class
||
actual
type
==
character
.
class
)
{
write
object
start
(
actual
type
,
null
)
;
%SELF%
(
"value"
,
value
)
;
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
serializable
)
{
write
object
start
(
actual
type
,
known
type
)
;
(
(
serializable
)
value
)
.
write
(
this
)
;
write
object
end
(
)
;
return
;
}
serializer
serializer
=
class
to
serializer
.
get
(
actual
type
)
;
if
(
serializer
!=
null
)
{
serializer
.
write
(
this
,
value
,
known
type
)
;
return
;
}
if
(
value
instanceof
array
)
{
if
(
known
type
!=
null
&&
actual
type
!=
known
type
&&
actual
type
!=
array
.
class
)
throw
new
serialization
exception
(
"Serialization of an Array other than the known type is not supported. "
+
"Known type: "
+
known
type
+
" Actual type: "
+
actual
type
)
;
write
array
start
(
)
;
array
array
=
(
array
)
value
;
for
(
int
i
=
0
,
n
=
array
.
size
;
i
<
n
;
i
++
)
%SELF%
(
array
.
get
(
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
queue
)
{
if
(
known
type
!=
null
&&
actual
type
!=
known
type
&&
actual
type
!=
queue
.
class
)
throw
new
serialization
exception
(
"Serialization of a Queue other than the known type is not supported. "
+
"Known type: "
+
known
type
+
" Actual type: "
+
actual
type
)
;
write
array
start
(
)
;
queue
queue
=
(
queue
)
value
;
for
(
int
i
=
0
,
n
=
queue
.
size
;
i
<
n
;
i
++
)
%SELF%
(
queue
.
get
(
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
collection
)
{
if
(
type
name
!=
null
&&
actual
type
!=
array
list
.
class
&&
(
known
type
==
null
||
known
type
!=
actual
type
)
)
{
write
object
start
(
actual
type
,
known
type
)
;
write
array
start
(
"items"
)
;
for
(
object
item
:
(
collection
)
value
)
%SELF%
(
item
,
element
type
,
null
)
;
write
array
end
(
)
;
write
object
end
(
)
;
}
else
{
write
array
start
(
)
;
for
(
object
item
:
(
collection
)
value
)
%SELF%
(
item
,
element
type
,
null
)
;
write
array
end
(
)
;
}
return
;
}
if
(
actual
type
.
is
array
(
)
)
{
if
(
element
type
==
null
)
element
type
=
actual
type
.
get
component
type
(
)
;
int
length
=
array
reflection
.
get
length
(
value
)
;
write
array
start
(
)
;
for
(
int
i
=
0
;
i
<
length
;
i
++
)
%SELF%
(
array
reflection
.
get
(
value
,
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
object
map
)
{
if
(
known
type
==
null
)
known
type
=
object
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
for
(
entry
entry
:
(
(
object
map
<
?
,
?
>
)
value
)
.
entries
(
)
)
{
writer
.
name
(
convert
to
string
(
entry
.
key
)
)
;
%SELF%
(
entry
.
value
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
array
map
)
{
if
(
known
type
==
null
)
known
type
=
array
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
array
map
map
=
(
array
map
)
value
;
for
(
int
i
=
0
,
n
=
map
.
size
;
i
<
n
;
i
++
)
{
writer
.
name
(
convert
to
string
(
map
.
keys
[
i
]
)
)
;
%SELF%
(
map
.
values
[
i
]
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
map
)
{
if
(
known
type
==
null
)
known
type
=
hash
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
for
(
map
.
entry
entry
:
(
(
map
<
?
,
?
>
)
value
)
.
entry
set
(
)
)
{
writer
.
name
(
convert
to
string
(
entry
.
get
key
(
)
)
)
;
%SELF%
(
entry
.
get
value
(
)
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
class
reflection
.
is
assignable
from
(
enum
.
class
,
actual
type
)
)
{
if
(
type
name
!=
null
&&
(
known
type
==
null
||
known
type
!=
actual
type
)
)
{
if
(
actual
type
.
get
enum
constants
(
)
==
null
)
actual
type
=
actual
type
.
get
superclass
(
)
;
write
object
start
(
actual
type
,
null
)
;
writer
.
name
(
"value"
)
;
writer
.
value
(
convert
to
string
(
(
enum
)
value
)
)
;
write
object
end
(
)
;
}
else
{
writer
.
value
(
convert
to
string
(
(
enum
)
value
)
)
;
}
return
;
}
write
object
start
(
actual
type
,
known
type
)
;
write
fields
(
value
)
;
write
object
end
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
value%END% (6.39e-01)
%UNK% (6.40e-02)
to (1.53e-02)
string (1.07e-02)
type (1.01e-02)
object (7.85e-03)
value (7.77e-03)
get (7.45e-03)
array (5.21e-03)
by (4.68e-03)
<SENTENCE_START>
{
try
{
if
(
value
==
null
)
{
writer
.
value
(
null
)
;
return
;
}
if
(
(
known
type
!=
null
&&
known
type
.
is
primitive
(
)
)
||
known
type
==
string
.
class
||
known
type
==
integer
.
class
||
known
type
==
boolean
.
class
||
known
type
==
float
.
class
||
known
type
==
long
.
class
||
known
type
==
double
.
class
||
known
type
==
short
.
class
||
known
type
==
byte
.
class
||
known
type
==
character
.
class
)
{
writer
.
value
(
value
)
;
return
;
}
class
actual
type
=
value
.
get
class
(
)
;
if
(
actual
type
.
is
primitive
(
)
||
actual
type
==
string
.
class
||
actual
type
==
integer
.
class
||
actual
type
==
boolean
.
class
||
actual
type
==
float
.
class
||
actual
type
==
long
.
class
||
actual
type
==
double
.
class
||
actual
type
==
short
.
class
||
actual
type
==
byte
.
class
||
actual
type
==
character
.
class
)
{
write
object
start
(
actual
type
,
null
)
;
%SELF%
(
"value"
,
value
)
;
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
serializable
)
{
write
object
start
(
actual
type
,
known
type
)
;
(
(
serializable
)
value
)
.
write
(
this
)
;
write
object
end
(
)
;
return
;
}
serializer
serializer
=
class
to
serializer
.
get
(
actual
type
)
;
if
(
serializer
!=
null
)
{
serializer
.
write
(
this
,
value
,
known
type
)
;
return
;
}
if
(
value
instanceof
array
)
{
if
(
known
type
!=
null
&&
actual
type
!=
known
type
&&
actual
type
!=
array
.
class
)
throw
new
serialization
exception
(
"Serialization of an Array other than the known type is not supported. "
+
"Known type: "
+
known
type
+
" Actual type: "
+
actual
type
)
;
write
array
start
(
)
;
array
array
=
(
array
)
value
;
for
(
int
i
=
0
,
n
=
array
.
size
;
i
<
n
;
i
++
)
%SELF%
(
array
.
get
(
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
queue
)
{
if
(
known
type
!=
null
&&
actual
type
!=
known
type
&&
actual
type
!=
queue
.
class
)
throw
new
serialization
exception
(
"Serialization of a Queue other than the known type is not supported. "
+
"Known type: "
+
known
type
+
" Actual type: "
+
actual
type
)
;
write
array
start
(
)
;
queue
queue
=
(
queue
)
value
;
for
(
int
i
=
0
,
n
=
queue
.
size
;
i
<
n
;
i
++
)
%SELF%
(
queue
.
get
(
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
collection
)
{
if
(
type
name
!=
null
&&
actual
type
!=
array
list
.
class
&&
(
known
type
==
null
||
known
type
!=
actual
type
)
)
{
write
object
start
(
actual
type
,
known
type
)
;
write
array
start
(
"items"
)
;
for
(
object
item
:
(
collection
)
value
)
%SELF%
(
item
,
element
type
,
null
)
;
write
array
end
(
)
;
write
object
end
(
)
;
}
else
{
write
array
start
(
)
;
for
(
object
item
:
(
collection
)
value
)
%SELF%
(
item
,
element
type
,
null
)
;
write
array
end
(
)
;
}
return
;
}
if
(
actual
type
.
is
array
(
)
)
{
if
(
element
type
==
null
)
element
type
=
actual
type
.
get
component
type
(
)
;
int
length
=
array
reflection
.
get
length
(
value
)
;
write
array
start
(
)
;
for
(
int
i
=
0
;
i
<
length
;
i
++
)
%SELF%
(
array
reflection
.
get
(
value
,
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
object
map
)
{
if
(
known
type
==
null
)
known
type
=
object
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
for
(
entry
entry
:
(
(
object
map
<
?
,
?
>
)
value
)
.
entries
(
)
)
{
writer
.
name
(
convert
to
string
(
entry
.
key
)
)
;
%SELF%
(
entry
.
value
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
array
map
)
{
if
(
known
type
==
null
)
known
type
=
array
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
array
map
map
=
(
array
map
)
value
;
for
(
int
i
=
0
,
n
=
map
.
size
;
i
<
n
;
i
++
)
{
writer
.
name
(
convert
to
string
(
map
.
keys
[
i
]
)
)
;
%SELF%
(
map
.
values
[
i
]
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
map
)
{
if
(
known
type
==
null
)
known
type
=
hash
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
for
(
map
.
entry
entry
:
(
(
map
<
?
,
?
>
)
value
)
.
entry
set
(
)
)
{
writer
.
name
(
convert
to
string
(
entry
.
get
key
(
)
)
)
;
%SELF%
(
entry
.
get
value
(
)
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
class
reflection
.
is
assignable
from
(
enum
.
class
,
actual
type
)
)
{
if
(
type
name
!=
null
&&
(
known
type
==
null
||
known
type
!=
actual
type
)
)
{
if
(
actual
type
.
get
enum
constants
(
)
==
null
)
actual
type
=
actual
type
.
get
superclass
(
)
;
write
object
start
(
actual
type
,
null
)
;
writer
.
name
(
"value"
)
;
writer
.
value
(
convert
to
string
(
(
enum
)
value
)
)
;
write
object
end
(
)
;
}
else
{
writer
.
value
(
convert
to
string
(
(
enum
)
value
)
)
;
}
return
;
}
write
object
start
(
actual
type
,
known
type
)
;
write
fields
(
value
)
;
write
object
end
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
if
(
value
==
null
)
{
writer
.
value
(
null
)
;
return
;
}
if
(
(
known
type
!=
null
&&
known
type
.
is
primitive
(
)
)
||
known
type
==
string
.
class
||
known
type
==
integer
.
class
||
known
type
==
boolean
.
class
||
known
type
==
float
.
class
||
known
type
==
long
.
class
||
known
type
==
double
.
class
||
known
type
==
short
.
class
||
known
type
==
byte
.
class
||
known
type
==
character
.
class
)
{
writer
.
value
(
value
)
;
return
;
}
class
actual
type
=
value
.
get
class
(
)
;
if
(
actual
type
.
is
primitive
(
)
||
actual
type
==
string
.
class
||
actual
type
==
integer
.
class
||
actual
type
==
boolean
.
class
||
actual
type
==
float
.
class
||
actual
type
==
long
.
class
||
actual
type
==
double
.
class
||
actual
type
==
short
.
class
||
actual
type
==
byte
.
class
||
actual
type
==
character
.
class
)
{
write
object
start
(
actual
type
,
null
)
;
%SELF%
(
"value"
,
value
)
;
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
serializable
)
{
write
object
start
(
actual
type
,
known
type
)
;
(
(
serializable
)
value
)
.
write
(
this
)
;
write
object
end
(
)
;
return
;
}
serializer
serializer
=
class
to
serializer
.
get
(
actual
type
)
;
if
(
serializer
!=
null
)
{
serializer
.
write
(
this
,
value
,
known
type
)
;
return
;
}
if
(
value
instanceof
array
)
{
if
(
known
type
!=
null
&&
actual
type
!=
known
type
&&
actual
type
!=
array
.
class
)
throw
new
serialization
exception
(
"Serialization of an Array other than the known type is not supported. "
+
"Known type: "
+
known
type
+
" Actual type: "
+
actual
type
)
;
write
array
start
(
)
;
array
array
=
(
array
)
value
;
for
(
int
i
=
0
,
n
=
array
.
size
;
i
<
n
;
i
++
)
%SELF%
(
array
.
get
(
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
queue
)
{
if
(
known
type
!=
null
&&
actual
type
!=
known
type
&&
actual
type
!=
queue
.
class
)
throw
new
serialization
exception
(
"Serialization of a Queue other than the known type is not supported. "
+
"Known type: "
+
known
type
+
" Actual type: "
+
actual
type
)
;
write
array
start
(
)
;
queue
queue
=
(
queue
)
value
;
for
(
int
i
=
0
,
n
=
queue
.
size
;
i
<
n
;
i
++
)
%SELF%
(
queue
.
get
(
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
collection
)
{
if
(
type
name
!=
null
&&
actual
type
!=
array
list
.
class
&&
(
known
type
==
null
||
known
type
!=
actual
type
)
)
{
write
object
start
(
actual
type
,
known
type
)
;
write
array
start
(
"items"
)
;
for
(
object
item
:
(
collection
)
value
)
%SELF%
(
item
,
element
type
,
null
)
;
write
array
end
(
)
;
write
object
end
(
)
;
}
else
{
write
array
start
(
)
;
for
(
object
item
:
(
collection
)
value
)
%SELF%
(
item
,
element
type
,
null
)
;
write
array
end
(
)
;
}
return
;
}
if
(
actual
type
.
is
array
(
)
)
{
if
(
element
type
==
null
)
element
type
=
actual
type
.
get
component
type
(
)
;
int
length
=
array
reflection
.
get
length
(
value
)
;
write
array
start
(
)
;
for
(
int
i
=
0
;
i
<
length
;
i
++
)
%SELF%
(
array
reflection
.
get
(
value
,
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
object
map
)
{
if
(
known
type
==
null
)
known
type
=
object
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
for
(
entry
entry
:
(
(
object
map
<
?
,
?
>
)
value
)
.
entries
(
)
)
{
writer
.
name
(
convert
to
string
(
entry
.
key
)
)
;
%SELF%
(
entry
.
value
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
array
map
)
{
if
(
known
type
==
null
)
known
type
=
array
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
array
map
map
=
(
array
map
)
value
;
for
(
int
i
=
0
,
n
=
map
.
size
;
i
<
n
;
i
++
)
{
writer
.
name
(
convert
to
string
(
map
.
keys
[
i
]
)
)
;
%SELF%
(
map
.
values
[
i
]
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
map
)
{
if
(
known
type
==
null
)
known
type
=
hash
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
for
(
map
.
entry
entry
:
(
(
map
<
?
,
?
>
)
value
)
.
entry
set
(
)
)
{
writer
.
name
(
convert
to
string
(
entry
.
get
key
(
)
)
)
;
%SELF%
(
entry
.
get
value
(
)
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
class
reflection
.
is
assignable
from
(
enum
.
class
,
actual
type
)
)
{
if
(
type
name
!=
null
&&
(
known
type
==
null
||
known
type
!=
actual
type
)
)
{
if
(
actual
type
.
get
enum
constants
(
)
==
null
)
actual
type
=
actual
type
.
get
superclass
(
)
;
write
object
start
(
actual
type
,
null
)
;
writer
.
name
(
"value"
)
;
writer
.
value
(
convert
to
string
(
(
enum
)
value
)
)
;
write
object
end
(
)
;
}
else
{
writer
.
value
(
convert
to
string
(
(
enum
)
value
)
)
;
}
return
;
}
write
object
start
(
actual
type
,
known
type
)
;
write
fields
(
value
)
;
write
object
end
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
%END%%END% (7.41e-01)
%UNK% (4.10e-02)
to (1.03e-02)
string (8.70e-03)
type (8.02e-03)
value (5.98e-03)
object (5.98e-03)
array (4.26e-03)
get (3.80e-03)
by (3.79e-03)
<SENTENCE_START>
{
try
{
if
(
value
==
null
)
{
writer
.
value
(
null
)
;
return
;
}
if
(
(
known
type
!=
null
&&
known
type
.
is
primitive
(
)
)
||
known
type
==
string
.
class
||
known
type
==
integer
.
class
||
known
type
==
boolean
.
class
||
known
type
==
float
.
class
||
known
type
==
long
.
class
||
known
type
==
double
.
class
||
known
type
==
short
.
class
||
known
type
==
byte
.
class
||
known
type
==
character
.
class
)
{
writer
.
value
(
value
)
;
return
;
}
class
actual
type
=
value
.
get
class
(
)
;
if
(
actual
type
.
is
primitive
(
)
||
actual
type
==
string
.
class
||
actual
type
==
integer
.
class
||
actual
type
==
boolean
.
class
||
actual
type
==
float
.
class
||
actual
type
==
long
.
class
||
actual
type
==
double
.
class
||
actual
type
==
short
.
class
||
actual
type
==
byte
.
class
||
actual
type
==
character
.
class
)
{
write
object
start
(
actual
type
,
null
)
;
%SELF%
(
"value"
,
value
)
;
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
serializable
)
{
write
object
start
(
actual
type
,
known
type
)
;
(
(
serializable
)
value
)
.
write
(
this
)
;
write
object
end
(
)
;
return
;
}
serializer
serializer
=
class
to
serializer
.
get
(
actual
type
)
;
if
(
serializer
!=
null
)
{
serializer
.
write
(
this
,
value
,
known
type
)
;
return
;
}
if
(
value
instanceof
array
)
{
if
(
known
type
!=
null
&&
actual
type
!=
known
type
&&
actual
type
!=
array
.
class
)
throw
new
serialization
exception
(
"Serialization of an Array other than the known type is not supported. "
+
"Known type: "
+
known
type
+
" Actual type: "
+
actual
type
)
;
write
array
start
(
)
;
array
array
=
(
array
)
value
;
for
(
int
i
=
0
,
n
=
array
.
size
;
i
<
n
;
i
++
)
%SELF%
(
array
.
get
(
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
queue
)
{
if
(
known
type
!=
null
&&
actual
type
!=
known
type
&&
actual
type
!=
queue
.
class
)
throw
new
serialization
exception
(
"Serialization of a Queue other than the known type is not supported. "
+
"Known type: "
+
known
type
+
" Actual type: "
+
actual
type
)
;
write
array
start
(
)
;
queue
queue
=
(
queue
)
value
;
for
(
int
i
=
0
,
n
=
queue
.
size
;
i
<
n
;
i
++
)
%SELF%
(
queue
.
get
(
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
collection
)
{
if
(
type
name
!=
null
&&
actual
type
!=
array
list
.
class
&&
(
known
type
==
null
||
known
type
!=
actual
type
)
)
{
write
object
start
(
actual
type
,
known
type
)
;
write
array
start
(
"items"
)
;
for
(
object
item
:
(
collection
)
value
)
%SELF%
(
item
,
element
type
,
null
)
;
write
array
end
(
)
;
write
object
end
(
)
;
}
else
{
write
array
start
(
)
;
for
(
object
item
:
(
collection
)
value
)
%SELF%
(
item
,
element
type
,
null
)
;
write
array
end
(
)
;
}
return
;
}
if
(
actual
type
.
is
array
(
)
)
{
if
(
element
type
==
null
)
element
type
=
actual
type
.
get
component
type
(
)
;
int
length
=
array
reflection
.
get
length
(
value
)
;
write
array
start
(
)
;
for
(
int
i
=
0
;
i
<
length
;
i
++
)
%SELF%
(
array
reflection
.
get
(
value
,
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
object
map
)
{
if
(
known
type
==
null
)
known
type
=
object
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
for
(
entry
entry
:
(
(
object
map
<
?
,
?
>
)
value
)
.
entries
(
)
)
{
writer
.
name
(
convert
to
string
(
entry
.
key
)
)
;
%SELF%
(
entry
.
value
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
array
map
)
{
if
(
known
type
==
null
)
known
type
=
array
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
array
map
map
=
(
array
map
)
value
;
for
(
int
i
=
0
,
n
=
map
.
size
;
i
<
n
;
i
++
)
{
writer
.
name
(
convert
to
string
(
map
.
keys
[
i
]
)
)
;
%SELF%
(
map
.
values
[
i
]
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
map
)
{
if
(
known
type
==
null
)
known
type
=
hash
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
for
(
map
.
entry
entry
:
(
(
map
<
?
,
?
>
)
value
)
.
entry
set
(
)
)
{
writer
.
name
(
convert
to
string
(
entry
.
get
key
(
)
)
)
;
%SELF%
(
entry
.
get
value
(
)
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
class
reflection
.
is
assignable
from
(
enum
.
class
,
actual
type
)
)
{
if
(
type
name
!=
null
&&
(
known
type
==
null
||
known
type
!=
actual
type
)
)
{
if
(
actual
type
.
get
enum
constants
(
)
==
null
)
actual
type
=
actual
type
.
get
superclass
(
)
;
write
object
start
(
actual
type
,
null
)
;
writer
.
name
(
"value"
)
;
writer
.
value
(
convert
to
string
(
(
enum
)
value
)
)
;
write
object
end
(
)
;
}
else
{
writer
.
value
(
convert
to
string
(
(
enum
)
value
)
)
;
}
return
;
}
write
object
start
(
actual
type
,
known
type
)
;
write
fields
(
value
)
;
write
object
end
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
if
(
value
==
null
)
{
writer
.
value
(
null
)
;
return
;
}
if
(
(
known
type
!=
null
&&
known
type
.
is
primitive
(
)
)
||
known
type
==
string
.
class
||
known
type
==
integer
.
class
||
known
type
==
boolean
.
class
||
known
type
==
float
.
class
||
known
type
==
long
.
class
||
known
type
==
double
.
class
||
known
type
==
short
.
class
||
known
type
==
byte
.
class
||
known
type
==
character
.
class
)
{
writer
.
value
(
value
)
;
return
;
}
class
actual
type
=
value
.
get
class
(
)
;
if
(
actual
type
.
is
primitive
(
)
||
actual
type
==
string
.
class
||
actual
type
==
integer
.
class
||
actual
type
==
boolean
.
class
||
actual
type
==
float
.
class
||
actual
type
==
long
.
class
||
actual
type
==
double
.
class
||
actual
type
==
short
.
class
||
actual
type
==
byte
.
class
||
actual
type
==
character
.
class
)
{
write
object
start
(
actual
type
,
null
)
;
%SELF%
(
"value"
,
value
)
;
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
serializable
)
{
write
object
start
(
actual
type
,
known
type
)
;
(
(
serializable
)
value
)
.
write
(
this
)
;
write
object
end
(
)
;
return
;
}
serializer
serializer
=
class
to
serializer
.
get
(
actual
type
)
;
if
(
serializer
!=
null
)
{
serializer
.
write
(
this
,
value
,
known
type
)
;
return
;
}
if
(
value
instanceof
array
)
{
if
(
known
type
!=
null
&&
actual
type
!=
known
type
&&
actual
type
!=
array
.
class
)
throw
new
serialization
exception
(
"Serialization of an Array other than the known type is not supported. "
+
"Known type: "
+
known
type
+
" Actual type: "
+
actual
type
)
;
write
array
start
(
)
;
array
array
=
(
array
)
value
;
for
(
int
i
=
0
,
n
=
array
.
size
;
i
<
n
;
i
++
)
%SELF%
(
array
.
get
(
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
queue
)
{
if
(
known
type
!=
null
&&
actual
type
!=
known
type
&&
actual
type
!=
queue
.
class
)
throw
new
serialization
exception
(
"Serialization of a Queue other than the known type is not supported. "
+
"Known type: "
+
known
type
+
" Actual type: "
+
actual
type
)
;
write
array
start
(
)
;
queue
queue
=
(
queue
)
value
;
for
(
int
i
=
0
,
n
=
queue
.
size
;
i
<
n
;
i
++
)
%SELF%
(
queue
.
get
(
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
collection
)
{
if
(
type
name
!=
null
&&
actual
type
!=
array
list
.
class
&&
(
known
type
==
null
||
known
type
!=
actual
type
)
)
{
write
object
start
(
actual
type
,
known
type
)
;
write
array
start
(
"items"
)
;
for
(
object
item
:
(
collection
)
value
)
%SELF%
(
item
,
element
type
,
null
)
;
write
array
end
(
)
;
write
object
end
(
)
;
}
else
{
write
array
start
(
)
;
for
(
object
item
:
(
collection
)
value
)
%SELF%
(
item
,
element
type
,
null
)
;
write
array
end
(
)
;
}
return
;
}
if
(
actual
type
.
is
array
(
)
)
{
if
(
element
type
==
null
)
element
type
=
actual
type
.
get
component
type
(
)
;
int
length
=
array
reflection
.
get
length
(
value
)
;
write
array
start
(
)
;
for
(
int
i
=
0
;
i
<
length
;
i
++
)
%SELF%
(
array
reflection
.
get
(
value
,
i
)
,
element
type
,
null
)
;
write
array
end
(
)
;
return
;
}
if
(
value
instanceof
object
map
)
{
if
(
known
type
==
null
)
known
type
=
object
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
for
(
entry
entry
:
(
(
object
map
<
?
,
?
>
)
value
)
.
entries
(
)
)
{
writer
.
name
(
convert
to
string
(
entry
.
key
)
)
;
%SELF%
(
entry
.
value
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
array
map
)
{
if
(
known
type
==
null
)
known
type
=
array
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
array
map
map
=
(
array
map
)
value
;
for
(
int
i
=
0
,
n
=
map
.
size
;
i
<
n
;
i
++
)
{
writer
.
name
(
convert
to
string
(
map
.
keys
[
i
]
)
)
;
%SELF%
(
map
.
values
[
i
]
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
value
instanceof
map
)
{
if
(
known
type
==
null
)
known
type
=
hash
map
.
class
;
write
object
start
(
actual
type
,
known
type
)
;
for
(
map
.
entry
entry
:
(
(
map
<
?
,
?
>
)
value
)
.
entry
set
(
)
)
{
writer
.
name
(
convert
to
string
(
entry
.
get
key
(
)
)
)
;
%SELF%
(
entry
.
get
value
(
)
,
element
type
,
null
)
;
}
write
object
end
(
)
;
return
;
}
if
(
class
reflection
.
is
assignable
from
(
enum
.
class
,
actual
type
)
)
{
if
(
type
name
!=
null
&&
(
known
type
==
null
||
known
type
!=
actual
type
)
)
{
if
(
actual
type
.
get
enum
constants
(
)
==
null
)
actual
type
=
actual
type
.
get
superclass
(
)
;
write
object
start
(
actual
type
,
null
)
;
writer
.
name
(
"value"
)
;
writer
.
value
(
convert
to
string
(
(
enum
)
value
)
)
;
write
object
end
(
)
;
}
else
{
writer
.
value
(
convert
to
string
(
(
enum
)
value
)
)
;
}
return
;
}
write
object
start
(
actual
type
,
known
type
)
;
write
fields
(
value
)
;
write
object
end
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
write,object,startwriteparse (7.04e-01)
read (1.49e-01)
load (8.10e-02)
reader (7.87e-03)
serialization (4.62e-03)
delete (2.79e-03)
write (2.68e-03)
compact (2.64e-03)
mark (2.07e-03)
put (1.93e-03)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
)
;
}
<SENTENCE_END/>
object%END% (9.36e-01)
name (1.01e-02)
writer (2.88e-03)
bytes (2.72e-03)
directory (2.69e-03)
file (2.20e-03)
string (2.06e-03)
serialization (9.74e-04)
array (9.68e-04)
double (9.10e-04)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
)
;
}
<SENTENCE_END/>
start%END% (9.85e-01)
name (2.55e-03)
serialization (8.82e-04)
exception (7.31e-04)
writer (4.28e-04)
directory (3.68e-04)
string (3.60e-04)
catch (3.48e-04)
bytes (3.02e-04)
file (2.68e-04)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
)
;
}
<SENTENCE_END/>
%END%%END% (9.83e-01)
exception (3.30e-03)
serialization (2.66e-03)
name (1.53e-03)
catch (8.66e-04)
io (5.31e-04)
new (4.43e-04)
writer (1.90e-04)
try (1.75e-04)
) (1.52e-04)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
)
;
}
<SENTENCE_END/>
write,object,startwriteparse (7.76e-01)
read (1.11e-01)
load (6.70e-02)
serialization (6.16e-03)
reader (4.18e-03)
new (1.60e-03)
write (1.40e-03)
append (1.21e-03)
delete (1.15e-03)
name (1.13e-03)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
actual
type
,
known
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
actual
type
,
known
type
)
;
}
<SENTENCE_END/>
object%END% (9.31e-01)
name (7.32e-03)
type (4.68e-03)
string (2.92e-03)
file (2.83e-03)
directory (2.00e-03)
writer (1.92e-03)
known (1.69e-03)
%UNK% (1.62e-03)
bytes (1.55e-03)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
actual
type
,
known
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
actual
type
,
known
type
)
;
}
<SENTENCE_END/>
start%END% (9.68e-01)
type (4.97e-03)
name (3.53e-03)
serialization (2.15e-03)
exception (1.90e-03)
known (1.64e-03)
string (6.72e-04)
writer (5.29e-04)
file (4.94e-04)
catch (4.59e-04)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
actual
type
,
known
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
actual
type
,
known
type
)
;
}
<SENTENCE_END/>
%END%%END% (9.74e-01)
exception (5.17e-03)
serialization (4.49e-03)
name (1.77e-03)
type (1.36e-03)
catch (1.01e-03)
new (5.97e-04)
io (5.66e-04)
known (5.55e-04)
actual (2.18e-04)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
actual
type
,
known
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
%SELF%
(
actual
type
,
known
type
)
;
}
<SENTENCE_END/>
write,object,startwriteparse (7.30e-01)
read (1.60e-01)
load (4.89e-02)
serialization (6.92e-03)
reader (5.47e-03)
compact (3.83e-03)
mark (3.43e-03)
replace (2.57e-03)
delete (2.34e-03)
write (1.39e-03)
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
object%END% (9.46e-01)
object (4.20e-03)
directory (3.73e-03)
bytes (3.30e-03)
file (2.10e-03)
string (1.93e-03)
short (1.49e-03)
writer (1.31e-03)
serialization (1.28e-03)
array (1.22e-03)
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
start%END% (9.85e-01)
object (3.27e-03)
exception (1.26e-03)
serialization (1.17e-03)
directory (5.37e-04)
bytes (4.50e-04)
string (3.79e-04)
file (3.36e-04)
double (2.97e-04)
writer (2.93e-04)
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
%END%%END% (9.81e-01)
object (4.55e-03)
exception (3.52e-03)
serialization (2.16e-03)
io (6.85e-04)
catch (6.02e-04)
new (3.06e-04)
writer (1.73e-04)
ex (1.39e-04)
try (1.37e-04)
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
write,object,startwriteparse (3.95e-01)
read (3.18e-01)
load (6.36e-02)
get (1.73e-02)
reader (1.03e-02)
write (9.48e-03)
delete (9.06e-03)
is (8.29e-03)
%UNK% (6.31e-03)
can (4.69e-03)
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
known
type
==
null
||
known
type
!=
actual
type
)
write
type
(
actual
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
known
type
==
null
||
known
type
!=
actual
type
)
write
type
(
actual
type
)
;
}
<SENTENCE_END/>
object%END% (8.94e-01)
type (2.30e-02)
%UNK% (5.49e-03)
known (4.73e-03)
actual (3.49e-03)
file (3.22e-03)
string (2.77e-03)
object (2.63e-03)
serialization (2.62e-03)
write (2.17e-03)
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
known
type
==
null
||
known
type
!=
actual
type
)
write
type
(
actual
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
known
type
==
null
||
known
type
!=
actual
type
)
write
type
(
actual
type
)
;
}
<SENTENCE_END/>
start%END% (9.47e-01)
type (1.69e-02)
actual (3.55e-03)
object (3.03e-03)
exception (2.96e-03)
serialization (2.96e-03)
known (1.11e-03)
write (8.48e-04)
string (5.50e-04)
file (5.14e-04)
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
known
type
==
null
||
known
type
!=
actual
type
)
write
type
(
actual
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
known
type
==
null
||
known
type
!=
actual
type
)
write
type
(
actual
type
)
;
}
<SENTENCE_END/>
%END%%END% (9.66e-01)
exception (5.92e-03)
type (4.68e-03)
object (3.86e-03)
serialization (3.65e-03)
io (7.99e-04)
actual (7.80e-04)
known (5.64e-04)
catch (5.20e-04)
new (4.54e-04)
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
known
type
==
null
||
known
type
!=
actual
type
)
write
type
(
actual
type
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
object
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
known
type
==
null
||
known
type
!=
actual
type
)
write
type
(
actual
type
)
;
}
<SENTENCE_END/>
write,object,endwriteparse (7.84e-01)
read (9.85e-02)
load (4.20e-02)
reader (5.77e-03)
replace (5.11e-03)
close (4.76e-03)
serialization (4.41e-03)
delete (4.11e-03)
mark (3.30e-03)
write (2.25e-03)
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
object%END% (9.60e-01)
directory (3.05e-03)
bytes (2.56e-03)
file (2.10e-03)
string (1.50e-03)
short (8.03e-04)
array (7.52e-04)
serialization (6.88e-04)
double (6.79e-04)
parse (6.77e-04)
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
end%END% (9.89e-01)
pop (9.37e-04)
serialization (7.03e-04)
exception (7.00e-04)
directory (5.67e-04)
bytes (4.62e-04)
file (3.93e-04)
string (3.83e-04)
double (2.50e-04)
writer (2.42e-04)
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
%END%%END% (9.81e-01)
pop (2.77e-03)
exception (2.12e-03)
serialization (1.42e-03)
io (1.10e-03)
catch (1.03e-03)
new (2.54e-04)
writer (2.09e-04)
try (1.44e-04)
ex (1.33e-04)
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
write,array,startwriteparse (7.80e-01)
read (9.48e-02)
load (6.84e-02)
reader (7.68e-03)
serialization (4.66e-03)
compact (2.65e-03)
delete (2.11e-03)
write (1.95e-03)
exception (1.52e-03)
replace (1.52e-03)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
array%END% (9.61e-01)
name (3.90e-03)
directory (3.04e-03)
bytes (2.23e-03)
file (1.93e-03)
writer (1.90e-03)
string (1.40e-03)
array (1.09e-03)
attribute (8.96e-04)
serialization (7.68e-04)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
start%END% (9.87e-01)
array (1.27e-03)
name (1.13e-03)
exception (8.03e-04)
writer (8.03e-04)
serialization (8.02e-04)
directory (3.82e-04)
string (2.77e-04)
catch (2.60e-04)
bytes (2.52e-04)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
%END%%END% (9.82e-01)
exception (2.30e-03)
array (1.55e-03)
serialization (1.53e-03)
catch (1.11e-03)
name (1.03e-03)
io (7.15e-04)
writer (5.01e-04)
new (2.16e-04)
try (1.85e-04)
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
name
(
name
)
;
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
write,array,startwriteparse (7.77e-01)
read (1.28e-01)
load (4.10e-02)
serialization (6.04e-03)
compact (5.58e-03)
reader (4.84e-03)
mark (3.09e-03)
delete (1.71e-03)
replace (1.62e-03)
put (1.41e-03)
<SENTENCE_START>
{
try
{
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
array%END% (9.60e-01)
directory (3.77e-03)
array (2.85e-03)
bytes (2.52e-03)
file (1.76e-03)
string (1.31e-03)
writer (1.08e-03)
short (1.06e-03)
serialization (8.85e-04)
double (8.11e-04)
<SENTENCE_START>
{
try
{
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
start%END% (9.89e-01)
array (1.83e-03)
exception (9.03e-04)
serialization (8.42e-04)
directory (5.08e-04)
bytes (3.52e-04)
writer (3.36e-04)
string (2.85e-04)
file (2.69e-04)
double (2.50e-04)
<SENTENCE_START>
{
try
{
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
%END%%END% (9.85e-01)
array (3.66e-03)
exception (2.15e-03)
serialization (1.42e-03)
catch (7.51e-04)
io (4.53e-04)
writer (1.97e-04)
new (1.69e-04)
try (1.00e-04)
directory (9.99e-05)
<SENTENCE_START>
{
try
{
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
array
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
write,array,endwriteparse (7.84e-01)
read (9.85e-02)
load (4.20e-02)
reader (5.77e-03)
replace (5.11e-03)
close (4.76e-03)
serialization (4.41e-03)
delete (4.11e-03)
mark (3.30e-03)
write (2.25e-03)
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
array%END% (9.60e-01)
directory (3.05e-03)
bytes (2.56e-03)
file (2.10e-03)
string (1.50e-03)
short (8.03e-04)
array (7.52e-04)
serialization (6.88e-04)
double (6.79e-04)
parse (6.77e-04)
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
end%END% (9.89e-01)
pop (9.37e-04)
serialization (7.03e-04)
exception (7.00e-04)
directory (5.67e-04)
bytes (4.62e-04)
file (3.93e-04)
string (3.83e-04)
double (2.50e-04)
writer (2.42e-04)
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
%END%%END% (9.86e-01)
pop (2.32e-03)
exception (1.49e-03)
serialization (1.05e-03)
catch (8.41e-04)
io (6.69e-04)
writer (1.71e-04)
new (1.60e-04)
directory (1.10e-04)
try (1.02e-04)
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
writer
.
pop
(
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
<SENTENCE_END/>
write,typewriteget (5.91e-01)
load (1.12e-01)
parse (6.77e-02)
read (3.65e-02)
set (2.34e-02)
name (1.36e-02)
add (6.92e-03)
invoke (6.67e-03)
is (6.25e-03)
create (5.50e-03)
<SENTENCE_START>
{
if
(
type
name
==
null
)
return
;
string
class
name
=
get
tag
(
type
)
;
if
(
class
name
==
null
)
class
name
=
type
.
get
name
(
)
;
try
{
writer
.
set
(
type
name
,
class
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
debug
)
system
.
out
.
println
(
"Writing type: "
+
type
.
get
name
(
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
type
name
==
null
)
return
;
string
class
name
=
get
tag
(
type
)
;
if
(
class
name
==
null
)
class
name
=
type
.
get
name
(
)
;
try
{
writer
.
set
(
type
name
,
class
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
debug
)
system
.
out
.
println
(
"Writing type: "
+
type
.
get
name
(
)
)
;
}
<SENTENCE_END/>
type%END% (5.83e-01)
tag (7.10e-02)
name (5.65e-02)
type (4.33e-02)
class (4.00e-02)
get (1.69e-02)
writer (1.28e-02)
null (1.06e-02)
string (9.60e-03)
attribute (5.52e-03)
<SENTENCE_START>
{
if
(
type
name
==
null
)
return
;
string
class
name
=
get
tag
(
type
)
;
if
(
class
name
==
null
)
class
name
=
type
.
get
name
(
)
;
try
{
writer
.
set
(
type
name
,
class
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
debug
)
system
.
out
.
println
(
"Writing type: "
+
type
.
get
name
(
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
type
name
==
null
)
return
;
string
class
name
=
get
tag
(
type
)
;
if
(
class
name
==
null
)
class
name
=
type
.
get
name
(
)
;
try
{
writer
.
set
(
type
name
,
class
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
debug
)
system
.
out
.
println
(
"Writing type: "
+
type
.
get
name
(
)
)
;
}
<SENTENCE_END/>
%END%%END% (7.98e-01)
tag (5.53e-02)
name (2.91e-02)
type (1.22e-02)
class (9.53e-03)
get (5.34e-03)
string (2.61e-03)
null (2.21e-03)
writer (2.03e-03)
serialization (1.81e-03)
<SENTENCE_START>
{
if
(
type
name
==
null
)
return
;
string
class
name
=
get
tag
(
type
)
;
if
(
class
name
==
null
)
class
name
=
type
.
get
name
(
)
;
try
{
writer
.
set
(
type
name
,
class
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
debug
)
system
.
out
.
println
(
"Writing type: "
+
type
.
get
name
(
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
type
name
==
null
)
return
;
string
class
name
=
get
tag
(
type
)
;
if
(
class
name
==
null
)
class
name
=
type
.
get
name
(
)
;
try
{
writer
.
set
(
type
name
,
class
name
)
;
}
catch
(
io
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
if
(
debug
)
system
.
out
.
println
(
"Writing type: "
+
type
.
get
name
(
)
)
;
}
<SENTENCE_END/>
from,jsonfromparse (7.59e-01)
read (1.28e-01)
load (5.04e-02)
write (1.01e-02)
json (8.48e-03)
check (7.21e-03)
reader (5.83e-03)
new (2.52e-03)
init (1.78e-03)
trim (1.44e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
reader
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
reader
)
)
;
}
<SENTENCE_END/>
json%END% (8.90e-01)
string (1.65e-02)
parse (9.24e-03)
file (4.61e-03)
%UNK% (4.17e-03)
directory (3.13e-03)
read (2.36e-03)
bytes (2.30e-03)
test (2.18e-03)
value (2.13e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
reader
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
reader
)
)
;
}
<SENTENCE_END/>
%END%%END% (9.80e-01)
value (2.02e-03)
reader (1.19e-03)
string (1.17e-03)
json (1.12e-03)
read (7.82e-04)
type (6.50e-04)
parse (5.97e-04)
all (4.19e-04)
return (3.48e-04)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
reader
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
reader
)
)
;
}
<SENTENCE_END/>
from,jsonfromparse (7.17e-01)
read (1.34e-01)
load (4.64e-02)
write (2.28e-02)
check (1.34e-02)
json (8.28e-03)
reader (7.65e-03)
new (6.31e-03)
copy (2.51e-03)
%UNK% (1.86e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
reader
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
reader
)
)
;
}
<SENTENCE_END/>
json%END% (8.16e-01)
string (2.82e-02)
parse (1.37e-02)
file (8.84e-03)
%UNK% (7.02e-03)
read (5.31e-03)
element (4.99e-03)
directory (4.89e-03)
bytes (4.09e-03)
test (3.82e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
reader
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
reader
)
)
;
}
<SENTENCE_END/>
%END%%END% (9.78e-01)
string (2.11e-03)
value (1.38e-03)
type (1.05e-03)
json (9.39e-04)
reader (8.41e-04)
parse (5.44e-04)
element (5.36e-04)
file (5.17e-04)
read (4.99e-04)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
reader
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
reader
)
)
;
}
<SENTENCE_END/>
from,jsonfromread (4.49e-01)
parse (4.05e-01)
load (2.77e-02)
write (1.57e-02)
json (1.06e-02)
check (9.93e-03)
init (6.38e-03)
%UNK% (5.89e-03)
new (5.67e-03)
number (3.23e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
input
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
input
)
)
;
}
<SENTENCE_END/>
json%END% (8.94e-01)
string (1.58e-02)
%UNK% (5.71e-03)
file (4.45e-03)
parse (3.49e-03)
read (3.06e-03)
directory (2.51e-03)
input (2.48e-03)
test (2.05e-03)
object (1.96e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
input
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
input
)
)
;
}
<SENTENCE_END/>
%END%%END% (9.74e-01)
value (2.85e-03)
json (1.62e-03)
input (1.47e-03)
string (1.21e-03)
read (1.10e-03)
type (9.22e-04)
parse (7.71e-04)
reader (6.83e-04)
return (4.97e-04)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
input
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
input
)
)
;
}
<SENTENCE_END/>
from,jsonfromread (4.22e-01)
parse (3.69e-01)
write (3.20e-02)
load (2.31e-02)
check (1.73e-02)
new (1.47e-02)
json (1.08e-02)
%UNK% (1.01e-02)
init (5.77e-03)
number (4.26e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
input
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
input
)
)
;
}
<SENTENCE_END/>
json%END% (8.22e-01)
string (2.70e-02)
%UNK% (1.01e-02)
file (8.49e-03)
read (7.03e-03)
object (4.46e-03)
parse (4.43e-03)
type (3.93e-03)
element (3.79e-03)
directory (3.77e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
input
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
input
)
)
;
}
<SENTENCE_END/>
%END%%END% (9.73e-01)
string (2.22e-03)
value (1.68e-03)
type (1.47e-03)
json (1.41e-03)
input (8.19e-04)
element (7.26e-04)
reader (6.54e-04)
read (6.48e-04)
parse (6.34e-04)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
input
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
input
)
)
;
}
<SENTENCE_END/>
from,jsonfromparse (7.67e-01)
read (1.21e-01)
load (5.26e-02)
write (6.34e-03)
new (6.06e-03)
copy (2.21e-03)
serialization (2.10e-03)
reader (2.01e-03)
json (1.54e-03)
slice (1.26e-03)
<SENTENCE_START>
{
try
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
file
)
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error reading file: "
+
file
,
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
file
)
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error reading file: "
+
file
,
ex
)
;
}
}
<SENTENCE_END/>
json%END% (8.69e-01)
file (1.29e-02)
string (1.29e-02)
parse (9.95e-03)
directory (4.32e-03)
%UNK% (4.32e-03)
read (3.97e-03)
bytes (3.94e-03)
t (3.89e-03)
serialization (2.43e-03)
<SENTENCE_START>
{
try
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
file
)
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error reading file: "
+
file
,
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
file
)
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error reading file: "
+
file
,
ex
)
;
}
}
<SENTENCE_END/>
%END%%END% (9.73e-01)
file (1.79e-03)
value (1.48e-03)
string (1.31e-03)
serialization (1.26e-03)
exception (1.08e-03)
json (9.43e-04)
read (8.50e-04)
new (6.44e-04)
type (6.29e-04)
<SENTENCE_START>
{
try
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
file
)
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error reading file: "
+
file
,
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
file
)
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error reading file: "
+
file
,
ex
)
;
}
}
<SENTENCE_END/>
from,jsonfromparse (7.56e-01)
read (1.19e-01)
load (5.25e-02)
write (9.48e-03)
new (8.70e-03)
copy (3.15e-03)
reader (2.40e-03)
serialization (2.09e-03)
slice (1.50e-03)
print (1.42e-03)
<SENTENCE_START>
{
try
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
file
)
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error reading file: "
+
file
,
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
file
)
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error reading file: "
+
file
,
ex
)
;
}
}
<SENTENCE_END/>
json%END% (8.49e-01)
file (1.67e-02)
string (1.65e-02)
parse (9.87e-03)
%UNK% (5.63e-03)
directory (5.15e-03)
bytes (4.84e-03)
read (4.72e-03)
write (2.71e-03)
type (2.34e-03)
<SENTENCE_START>
{
try
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
file
)
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error reading file: "
+
file
,
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
file
)
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error reading file: "
+
file
,
ex
)
;
}
}
<SENTENCE_END/>
%END%%END% (9.73e-01)
file (1.84e-03)
string (1.80e-03)
serialization (1.09e-03)
value (9.58e-04)
exception (9.40e-04)
type (9.38e-04)
json (8.13e-04)
new (5.94e-04)
read (5.60e-04)
<SENTENCE_START>
{
try
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
file
)
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error reading file: "
+
file
,
ex
)
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
try
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
file
)
)
;
}
catch
(
exception
ex
)
{
throw
new
serialization
exception
(
"Error reading file: "
+
file
,
ex
)
;
}
}
<SENTENCE_END/>
from,jsonfromparse (7.76e-01)
read (8.43e-02)
load (5.96e-02)
write (1.30e-02)
json (9.52e-03)
check (4.00e-03)
trim (3.49e-03)
new (3.41e-03)
init (3.20e-03)
%UNK% (2.69e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
data
,
offset
,
length
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
data
,
offset
,
length
)
)
;
}
<SENTENCE_END/>
json%END% (8.95e-01)
offset (1.34e-02)
parse (8.00e-03)
string (6.52e-03)
data (4.17e-03)
all (3.74e-03)
%UNK% (2.93e-03)
by (2.13e-03)
json (2.12e-03)
array (1.66e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
data
,
offset
,
length
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
data
,
offset
,
length
)
)
;
}
<SENTENCE_END/>
%END%%END% (9.81e-01)
offset (3.03e-03)
json (1.73e-03)
value (1.25e-03)
reader (8.18e-04)
all (8.06e-04)
type (6.81e-04)
string (6.41e-04)
read (5.30e-04)
data (4.04e-04)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
data
,
offset
,
length
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
data
,
offset
,
length
)
)
;
}
<SENTENCE_END/>
from,jsonfromparse (7.49e-01)
read (9.14e-02)
load (4.15e-02)
write (2.51e-02)
json (1.41e-02)
new (7.94e-03)
check (6.84e-03)
%UNK% (4.29e-03)
trim (3.53e-03)
init (2.97e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
data
,
offset
,
length
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
data
,
offset
,
length
)
)
;
}
<SENTENCE_END/>
json%END% (8.88e-01)
string (9.06e-03)
offset (7.90e-03)
parse (7.77e-03)
%UNK% (4.24e-03)
data (4.13e-03)
by (3.72e-03)
json (3.61e-03)
element (2.45e-03)
type (2.18e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
data
,
offset
,
length
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
data
,
offset
,
length
)
)
;
}
<SENTENCE_END/>
%END%%END% (9.77e-01)
offset (4.48e-03)
json (2.22e-03)
string (1.11e-03)
value (9.50e-04)
reader (8.74e-04)
type (7.84e-04)
all (6.65e-04)
element (3.64e-04)
data (3.62e-04)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
data
,
offset
,
length
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
data
,
offset
,
length
)
)
;
}
<SENTENCE_END/>
from,jsonfromparse (4.84e-01)
json (2.62e-01)
read (1.80e-01)
check (1.48e-02)
load (8.27e-03)
write (6.82e-03)
init (5.59e-03)
%UNK% (3.31e-03)
trim (2.59e-03)
new (2.07e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
json
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
json
)
)
;
}
<SENTENCE_END/>
json%END% (8.10e-01)
string (3.82e-02)
json (1.88e-02)
parse (1.21e-02)
%UNK% (1.20e-02)
read (5.83e-03)
file (5.54e-03)
equal (4.17e-03)
test (3.61e-03)
bytes (3.05e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
json
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
json
)
)
;
}
<SENTENCE_END/>
%END%%END% (9.75e-01)
string (2.53e-03)
value (2.29e-03)
json (2.01e-03)
read (9.10e-04)
%UNK% (6.69e-04)
reader (6.18e-04)
type (6.06e-04)
file (5.01e-04)
all (4.71e-04)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
json
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
null
,
new
json
reader
(
)
.
parse
(
json
)
)
;
}
<SENTENCE_END/>
from,jsonfromparse (4.69e-01)
json (2.22e-01)
read (1.88e-01)
check (2.81e-02)
write (1.62e-02)
load (8.36e-03)
%UNK% (6.73e-03)
init (5.46e-03)
new (4.95e-03)
trim (2.69e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
json
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
json
)
)
;
}
<SENTENCE_END/>
json%END% (6.90e-01)
string (6.08e-02)
json (4.58e-02)
%UNK% (1.90e-02)
parse (1.54e-02)
read (1.15e-02)
file (9.18e-03)
equal (7.95e-03)
object (5.80e-03)
test (5.74e-03)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
json
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
json
)
)
;
}
<SENTENCE_END/>
%END%%END% (9.67e-01)
string (4.91e-03)
value (1.53e-03)
json (1.37e-03)
%UNK% (1.35e-03)
type (1.03e-03)
file (8.78e-04)
equal (8.24e-04)
at (6.64e-04)
element (5.91e-04)
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
json
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
read
value
(
type
,
element
type
,
new
json
reader
(
)
.
parse
(
json
)
)
;
}
<SENTENCE_END/>
read,fieldreadappend (5.38e-02)
load (5.35e-02)
parse (5.16e-02)
add (4.12e-02)
%UNK% (4.05e-02)
%END% (3.51e-02)
json (2.83e-02)
write (2.71e-02)
read (2.62e-02)
element (2.37e-02)
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
null
,
json
data
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
null
,
json
data
)
;
}
<SENTENCE_END/>
field%END% (8.43e-01)
object (8.48e-02)
string (7.12e-03)
value (6.24e-03)
by (5.21e-03)
animation (3.63e-03)
name (3.23e-03)
array (2.67e-03)
attribute (2.44e-03)
json (2.40e-03)
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
null
,
json
data
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
null
,
json
data
)
;
}
<SENTENCE_END/>
%END%%END% (9.81e-01)
object (1.09e-03)
json (1.03e-03)
value (1.03e-03)
string (1.00e-03)
name (7.83e-04)
by (7.09e-04)
animation (6.87e-04)
all (6.21e-04)
data (5.37e-04)
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
null
,
json
data
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
null
,
json
data
)
;
}
<SENTENCE_END/>
read,fieldreadjson (1.84e-01)
element (8.39e-02)
parse (5.61e-02)
%UNK% (4.71e-02)
read (3.52e-02)
write (3.14e-02)
color (2.74e-02)
number (2.55e-02)
append (2.48e-02)
load (2.33e-02)
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
element
type
,
json
data
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
element
type
,
json
data
)
;
}
<SENTENCE_END/>
field%END% (6.56e-01)
object (1.65e-01)
element (2.34e-02)
by (2.19e-02)
string (1.61e-02)
animation (1.06e-02)
value (8.43e-03)
json (6.32e-03)
name (6.18e-03)
attribute (5.31e-03)
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
element
type
,
json
data
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
element
type
,
json
data
)
;
}
<SENTENCE_END/>
%END%%END% (9.49e-01)
element (4.00e-03)
by (3.35e-03)
object (2.82e-03)
string (2.73e-03)
animation (2.34e-03)
value (2.01e-03)
name (2.00e-03)
data (1.70e-03)
type (1.64e-03)
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
element
type
,
json
data
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
name
,
name
,
element
type
,
json
data
)
;
}
<SENTENCE_END/>
read,fieldreadjson (2.73e-01)
parse (8.39e-02)
read (5.55e-02)
%UNK% (5.31e-02)
append (2.99e-02)
load (2.88e-02)
number (2.27e-02)
object (2.20e-02)
%END% (1.84e-02)
write (1.83e-02)
<SENTENCE_START>
{
%SELF%
(
object
,
field
name
,
json
name
,
null
,
json
data
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
field
name
,
json
name
,
null
,
json
data
)
;
}
<SENTENCE_END/>
field%END% (6.81e-01)
json (9.22e-02)
object (5.63e-02)
string (3.15e-02)
parse (8.14e-03)
xml (6.94e-03)
offsets (6.65e-03)
%UNK% (6.55e-03)
value (6.03e-03)
animation (5.29e-03)
<SENTENCE_START>
{
%SELF%
(
object
,
field
name
,
json
name
,
null
,
json
data
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
field
name
,
json
name
,
null
,
json
data
)
;
}
<SENTENCE_END/>
%END%%END% (9.54e-01)
string (3.98e-03)
json (3.68e-03)
%UNK% (2.29e-03)
object (2.10e-03)
value (1.92e-03)
animation (1.48e-03)
header (1.34e-03)
model (1.25e-03)
offsets (1.20e-03)
<SENTENCE_START>
{
%SELF%
(
object
,
field
name
,
json
name
,
null
,
json
data
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
%SELF%
(
object
,
field
name
,
json
name
,
null
,
json
data
)
;
}
<SENTENCE_END/>
read,fieldreadget (8.19e-01)
load (2.44e-02)
parse (1.51e-02)
generate (1.43e-02)
%UNK% (1.31e-02)
create (8.50e-03)
is (8.01e-03)
read (5.51e-03)
find (5.04e-03)
field (4.62e-03)
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
field
field
=
metadata
.
field
;
if
(
element
type
==
null
)
element
type
=
metadata
.
element
type
;
%SELF%
(
object
,
field
,
json
name
,
element
type
,
json
map
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
field
field
=
metadata
.
field
;
if
(
element
type
==
null
)
element
type
=
metadata
.
element
type
;
%SELF%
(
object
,
field
,
json
name
,
element
type
,
json
map
)
;
}
<SENTENCE_END/>
fieldfields (4.96e-01)
%END% (8.62e-02)
get (5.63e-02)
field (2.90e-02)
%UNK% (2.64e-02)
metadata (2.62e-02)
declared (1.35e-02)
type (1.30e-02)
element (8.49e-03)
string (7.29e-03)
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
field
field
=
metadata
.
field
;
if
(
element
type
==
null
)
element
type
=
metadata
.
element
type
;
%SELF%
(
object
,
field
,
json
name
,
element
type
,
json
map
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
field
field
=
metadata
.
field
;
if
(
element
type
==
null
)
element
type
=
metadata
.
element
type
;
%SELF%
(
object
,
field
,
json
name
,
element
type
,
json
map
)
;
}
<SENTENCE_END/>
%END%%END% (5.98e-01)
fields (1.61e-01)
%UNK% (1.39e-02)
type (1.24e-02)
field (1.15e-02)
get (9.55e-03)
string (7.47e-03)
metadata (6.63e-03)
name (6.49e-03)
class (5.81e-03)
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
field
field
=
metadata
.
field
;
if
(
element
type
==
null
)
element
type
=
metadata
.
element
type
;
%SELF%
(
object
,
field
,
json
name
,
element
type
,
json
map
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
field
metadata
metadata
=
fields
.
get
(
field
name
)
;
if
(
metadata
==
null
)
throw
new
serialization
exception
(
"Field not found: "
+
field
name
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
field
field
=
metadata
.
field
;
if
(
element
type
==
null
)
element
type
=
metadata
.
element
type
;
%SELF%
(
object
,
field
,
json
name
,
element
type
,
json
map
)
;
}
<SENTENCE_END/>
read,fieldreadparse (2.93e-01)
read (1.30e-01)
get (1.28e-01)
load (1.04e-01)
write (2.19e-02)
create (1.70e-02)
add (1.48e-02)
new (1.09e-02)
invoke (1.02e-02)
%UNK% (9.68e-03)
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
json
name
)
;
if
(
json
value
==
null
)
return
;
try
{
field
.
set
(
object
,
read
value
(
field
.
get
type
(
)
,
element
type
,
json
value
)
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
json
value
.
trace
(
)
)
;
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
json
name
)
;
if
(
json
value
==
null
)
return
;
try
{
field
.
set
(
object
,
read
value
(
field
.
get
type
(
)
,
element
type
,
json
value
)
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
json
value
.
trace
(
)
)
;
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
<SENTENCE_END/>
field%END% (6.29e-01)
name (2.41e-02)
get (2.23e-02)
string (1.63e-02)
parse (1.43e-02)
attribute (1.30e-02)
%UNK% (9.75e-03)
to (8.37e-03)
field (7.97e-03)
declared (7.87e-03)
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
json
name
)
;
if
(
json
value
==
null
)
return
;
try
{
field
.
set
(
object
,
read
value
(
field
.
get
type
(
)
,
element
type
,
json
value
)
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
json
value
.
trace
(
)
)
;
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
json
name
)
;
if
(
json
value
==
null
)
return
;
try
{
field
.
set
(
object
,
read
value
(
field
.
get
type
(
)
,
element
type
,
json
value
)
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
json
value
.
trace
(
)
)
;
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
<SENTENCE_END/>
%END%%END% (8.83e-01)
name (7.38e-03)
string (6.16e-03)
get (4.28e-03)
attribute (4.23e-03)
to (2.56e-03)
declared (2.41e-03)
%UNK% (2.30e-03)
value (2.20e-03)
field (2.16e-03)
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
json
name
)
;
if
(
json
value
==
null
)
return
;
try
{
field
.
set
(
object
,
read
value
(
field
.
get
type
(
)
,
element
type
,
json
value
)
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
json
value
.
trace
(
)
)
;
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
json
name
)
;
if
(
json
value
==
null
)
return
;
try
{
field
.
set
(
object
,
read
value
(
field
.
get
type
(
)
,
element
type
,
json
value
)
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
json
value
.
trace
(
)
)
;
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
field
.
get
declaring
class
(
)
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
<SENTENCE_END/>
read,fieldsreadget (2.93e-01)
parse (1.33e-01)
load (4.82e-02)
add (4.50e-02)
read (3.79e-02)
create (2.59e-02)
%UNK% (2.27e-02)
write (2.06e-02)
%END% (1.53e-02)
name (1.15e-02)
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
for
(
json
value
child
=
json
map
.
child
;
child
!=
null
;
child
=
child
.
next
)
{
field
metadata
metadata
=
fields
.
get
(
child
.
name
(
)
)
;
if
(
metadata
==
null
)
{
if
(
ignore
unknown
fields
)
{
if
(
debug
)
system
.
out
.
println
(
"Ignoring unknown field: "
+
child
.
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
continue
;
}
else
{
serialization
exception
ex
=
new
serialization
exception
(
"Field not found: "
+
child
.
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
ex
.
add
trace
(
child
.
trace
(
)
)
;
throw
ex
;
}
}
field
field
=
metadata
.
field
;
try
{
field
.
set
(
object
,
read
value
(
field
.
get
type
(
)
,
metadata
.
element
type
,
child
)
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
child
.
trace
(
)
)
;
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
for
(
json
value
child
=
json
map
.
child
;
child
!=
null
;
child
=
child
.
next
)
{
field
metadata
metadata
=
fields
.
get
(
child
.
name
(
)
)
;
if
(
metadata
==
null
)
{
if
(
ignore
unknown
fields
)
{
if
(
debug
)
system
.
out
.
println
(
"Ignoring unknown field: "
+
child
.
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
continue
;
}
else
{
serialization
exception
ex
=
new
serialization
exception
(
"Field not found: "
+
child
.
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
ex
.
add
trace
(
child
.
trace
(
)
)
;
throw
ex
;
}
}
field
field
=
metadata
.
field
;
try
{
field
.
set
(
object
,
read
value
(
field
.
get
type
(
)
,
metadata
.
element
type
,
child
)
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
child
.
trace
(
)
)
;
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
}
<SENTENCE_END/>
fields%END% (4.64e-01)
get (4.09e-02)
fields (2.59e-02)
name (2.40e-02)
string (1.57e-02)
field (1.50e-02)
%UNK% (1.46e-02)
to (1.11e-02)
parse (1.02e-02)
attribute (9.68e-03)
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
for
(
json
value
child
=
json
map
.
child
;
child
!=
null
;
child
=
child
.
next
)
{
field
metadata
metadata
=
fields
.
get
(
child
.
name
(
)
)
;
if
(
metadata
==
null
)
{
if
(
ignore
unknown
fields
)
{
if
(
debug
)
system
.
out
.
println
(
"Ignoring unknown field: "
+
child
.
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
continue
;
}
else
{
serialization
exception
ex
=
new
serialization
exception
(
"Field not found: "
+
child
.
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
ex
.
add
trace
(
child
.
trace
(
)
)
;
throw
ex
;
}
}
field
field
=
metadata
.
field
;
try
{
field
.
set
(
object
,
read
value
(
field
.
get
type
(
)
,
metadata
.
element
type
,
child
)
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
child
.
trace
(
)
)
;
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
for
(
json
value
child
=
json
map
.
child
;
child
!=
null
;
child
=
child
.
next
)
{
field
metadata
metadata
=
fields
.
get
(
child
.
name
(
)
)
;
if
(
metadata
==
null
)
{
if
(
ignore
unknown
fields
)
{
if
(
debug
)
system
.
out
.
println
(
"Ignoring unknown field: "
+
child
.
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
continue
;
}
else
{
serialization
exception
ex
=
new
serialization
exception
(
"Field not found: "
+
child
.
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
ex
.
add
trace
(
child
.
trace
(
)
)
;
throw
ex
;
}
}
field
field
=
metadata
.
field
;
try
{
field
.
set
(
object
,
read
value
(
field
.
get
type
(
)
,
metadata
.
element
type
,
child
)
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
child
.
trace
(
)
)
;
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
}
<SENTENCE_END/>
%END%%END% (7.91e-01)
name (1.09e-02)
string (8.91e-03)
get (8.63e-03)
%UNK% (5.70e-03)
to (5.33e-03)
attribute (5.22e-03)
fields (4.78e-03)
field (3.85e-03)
child (3.52e-03)
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
for
(
json
value
child
=
json
map
.
child
;
child
!=
null
;
child
=
child
.
next
)
{
field
metadata
metadata
=
fields
.
get
(
child
.
name
(
)
)
;
if
(
metadata
==
null
)
{
if
(
ignore
unknown
fields
)
{
if
(
debug
)
system
.
out
.
println
(
"Ignoring unknown field: "
+
child
.
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
continue
;
}
else
{
serialization
exception
ex
=
new
serialization
exception
(
"Field not found: "
+
child
.
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
ex
.
add
trace
(
child
.
trace
(
)
)
;
throw
ex
;
}
}
field
field
=
metadata
.
field
;
try
{
field
.
set
(
object
,
read
value
(
field
.
get
type
(
)
,
metadata
.
element
type
,
child
)
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
child
.
trace
(
)
)
;
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
class
type
=
object
.
get
class
(
)
;
object
map
<
string
,
field
metadata
>
fields
=
get
fields
(
type
)
;
for
(
json
value
child
=
json
map
.
child
;
child
!=
null
;
child
=
child
.
next
)
{
field
metadata
metadata
=
fields
.
get
(
child
.
name
(
)
)
;
if
(
metadata
==
null
)
{
if
(
ignore
unknown
fields
)
{
if
(
debug
)
system
.
out
.
println
(
"Ignoring unknown field: "
+
child
.
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
continue
;
}
else
{
serialization
exception
ex
=
new
serialization
exception
(
"Field not found: "
+
child
.
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
ex
.
add
trace
(
child
.
trace
(
)
)
;
throw
ex
;
}
}
field
field
=
metadata
.
field
;
try
{
field
.
set
(
object
,
read
value
(
field
.
get
type
(
)
,
metadata
.
element
type
,
child
)
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
"Error accessing field: "
+
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
,
ex
)
;
}
catch
(
serialization
exception
ex
)
{
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
catch
(
runtime
exception
runtime
ex
)
{
serialization
exception
ex
=
new
serialization
exception
(
runtime
ex
)
;
ex
.
add
trace
(
child
.
trace
(
)
)
;
ex
.
add
trace
(
field
.
get
name
(
)
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
throw
ex
;
}
}
}
<SENTENCE_END/>
read,valuereadget (9.38e-01)
is (3.72e-03)
read (3.60e-03)
%UNK% (3.45e-03)
obtain (2.31e-03)
instance (2.00e-03)
type (1.56e-03)
to (1.55e-03)
set (1.49e-03)
pop (1.42e-03)
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
null
,
json
map
.
get
(
name
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
null
,
json
map
.
get
(
name
)
)
;
}
<SENTENCE_END/>
value%END% (7.20e-01)
string (3.44e-02)
by (2.48e-02)
%UNK% (1.70e-02)
type (1.19e-02)
from (7.65e-03)
object (7.04e-03)
json (6.39e-03)
to (6.27e-03)
element (5.14e-03)
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
null
,
json
map
.
get
(
name
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
null
,
json
map
.
get
(
name
)
)
;
}
<SENTENCE_END/>
%END%%END% (9.79e-01)
string (1.62e-03)
get (1.27e-03)
all (9.95e-04)
by (9.55e-04)
type (8.46e-04)
map (7.26e-04)
at (5.38e-04)
return (3.83e-04)
%UNK% (3.76e-04)
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
null
,
json
map
.
get
(
name
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
null
,
json
map
.
get
(
name
)
)
;
}
<SENTENCE_END/>
read,valuereadread (1.57e-01)
load (1.09e-01)
append (1.09e-01)
get (1.07e-01)
value (8.52e-02)
parse (8.04e-02)
json (4.93e-02)
%UNK% (3.71e-02)
number (2.40e-02)
check (1.84e-02)
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
name
)
;
if
(
json
value
==
null
)
return
default
value
;
return
(
t
)
%SELF%
(
type
,
null
,
json
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
name
)
;
if
(
json
value
==
null
)
return
default
value
;
return
(
t
)
%SELF%
(
type
,
null
,
json
value
)
;
}
<SENTENCE_END/>
value%END% (6.39e-01)
value (8.35e-02)
string (4.26e-02)
json (3.36e-02)
default (2.46e-02)
object (1.28e-02)
%UNK% (1.10e-02)
parse (7.96e-03)
read (7.13e-03)
map (4.96e-03)
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
name
)
;
if
(
json
value
==
null
)
return
default
value
;
return
(
t
)
%SELF%
(
type
,
null
,
json
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
name
)
;
if
(
json
value
==
null
)
return
default
value
;
return
(
t
)
%SELF%
(
type
,
null
,
json
value
)
;
}
<SENTENCE_END/>
%END%%END% (9.53e-01)
value (1.20e-02)
string (4.30e-03)
json (1.87e-03)
object (1.48e-03)
get (1.23e-03)
by (1.00e-03)
map (9.40e-04)
return (9.13e-04)
type (7.94e-04)
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
name
)
;
if
(
json
value
==
null
)
return
default
value
;
return
(
t
)
%SELF%
(
type
,
null
,
json
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
name
)
;
if
(
json
value
==
null
)
return
default
value
;
return
(
t
)
%SELF%
(
type
,
null
,
json
value
)
;
}
<SENTENCE_END/>
read,valuereadget (8.57e-01)
read (1.15e-02)
%UNK% (1.01e-02)
element (5.83e-03)
set (5.38e-03)
write (3.77e-03)
to (3.21e-03)
load (3.15e-03)
is (3.14e-03)
instance (2.89e-03)
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
element
type
,
json
map
.
get
(
name
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
element
type
,
json
map
.
get
(
name
)
)
;
}
<SENTENCE_END/>
value%END% (6.11e-01)
by (4.95e-02)
string (3.87e-02)
element (3.13e-02)
type (2.46e-02)
%UNK% (1.94e-02)
from (1.00e-02)
name (9.32e-03)
object (8.61e-03)
to (7.05e-03)
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
element
type
,
json
map
.
get
(
name
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
element
type
,
json
map
.
get
(
name
)
)
;
}
<SENTENCE_END/>
%END%%END% (9.55e-01)
string (4.06e-03)
by (3.51e-03)
type (1.82e-03)
element (1.48e-03)
map (1.40e-03)
get (1.13e-03)
%UNK% (1.09e-03)
at (1.02e-03)
object (9.88e-04)
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
element
type
,
json
map
.
get
(
name
)
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
element
type
,
json
map
.
get
(
name
)
)
;
}
<SENTENCE_END/>
read,valuereadjson (2.11e-01)
read (1.04e-01)
parse (7.30e-02)
%UNK% (6.91e-02)
load (6.08e-02)
append (4.70e-02)
check (4.08e-02)
value (3.93e-02)
number (3.25e-02)
get (2.43e-02)
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
name
)
;
return
(
t
)
%SELF%
(
type
,
element
type
,
default
value
,
json
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
name
)
;
return
(
t
)
%SELF%
(
type
,
element
type
,
default
value
,
json
value
)
;
}
<SENTENCE_END/>
value%END% (7.27e-01)
value (4.06e-02)
string (3.73e-02)
json (2.87e-02)
object (1.25e-02)
%UNK% (1.21e-02)
from (5.92e-03)
type (5.60e-03)
read (4.46e-03)
default (4.45e-03)
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
name
)
;
return
(
t
)
%SELF%
(
type
,
element
type
,
default
value
,
json
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
name
)
;
return
(
t
)
%SELF%
(
type
,
element
type
,
default
value
,
json
value
)
;
}
<SENTENCE_END/>
%END%%END% (9.51e-01)
value (8.53e-03)
string (5.64e-03)
type (2.61e-03)
json (2.11e-03)
object (2.03e-03)
by (1.44e-03)
%UNK% (1.00e-03)
element (8.93e-04)
get (8.16e-04)
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
name
)
;
return
(
t
)
%SELF%
(
type
,
element
type
,
default
value
,
json
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
json
value
json
value
=
json
map
.
get
(
name
)
;
return
(
t
)
%SELF%
(
type
,
element
type
,
default
value
,
json
value
)
;
}
<SENTENCE_END/>
read,valuereadget (5.72e-01)
parse (9.99e-02)
read (4.13e-02)
%UNK% (4.02e-02)
is (2.44e-02)
append (1.62e-02)
load (1.53e-02)
check (1.17e-02)
default (8.49e-03)
element (5.83e-03)
<SENTENCE_START>
{
if
(
json
data
==
null
)
return
default
value
;
return
(
t
)
%SELF%
(
type
,
element
type
,
json
data
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
json
data
==
null
)
return
default
value
;
return
(
t
)
%SELF%
(
type
,
element
type
,
json
data
)
;
}
<SENTENCE_END/>
value%END% (7.38e-01)
string (3.67e-02)
default (1.96e-02)
json (1.69e-02)
%UNK% (1.59e-02)
by (1.55e-02)
type (1.41e-02)
object (1.17e-02)
value (8.40e-03)
parse (5.93e-03)
<SENTENCE_START>
{
if
(
json
data
==
null
)
return
default
value
;
return
(
t
)
%SELF%
(
type
,
element
type
,
json
data
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
json
data
==
null
)
return
default
value
;
return
(
t
)
%SELF%
(
type
,
element
type
,
json
data
)
;
}
<SENTENCE_END/>
%END%%END% (9.62e-01)
string (3.12e-03)
by (3.09e-03)
value (2.56e-03)
data (2.53e-03)
type (2.10e-03)
object (1.58e-03)
json (1.51e-03)
%UNK% (1.09e-03)
element (9.47e-04)
<SENTENCE_START>
{
if
(
json
data
==
null
)
return
default
value
;
return
(
t
)
%SELF%
(
type
,
element
type
,
json
data
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
json
data
==
null
)
return
default
value
;
return
(
t
)
%SELF%
(
type
,
element
type
,
json
data
)
;
}
<SENTENCE_END/>
read,valuereadget (7.64e-01)
%UNK% (3.33e-02)
read (1.85e-02)
obtain (9.18e-03)
is (8.02e-03)
instance (6.83e-03)
pop (6.59e-03)
for (5.81e-03)
add (4.38e-03)
to (4.16e-03)
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
null
,
json
data
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
null
,
json
data
)
;
}
<SENTENCE_END/>
value%END% (7.91e-01)
by (4.03e-02)
%UNK% (1.70e-02)
type (1.63e-02)
string (1.46e-02)
object (7.61e-03)
of (3.59e-03)
element (3.58e-03)
from (3.30e-03)
json (3.09e-03)
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
null
,
json
data
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
null
,
json
data
)
;
}
<SENTENCE_END/>
%END%%END% (9.64e-01)
by (4.49e-03)
%UNK% (2.25e-03)
string (1.99e-03)
all (1.41e-03)
object (1.07e-03)
value (8.86e-04)
type (8.82e-04)
json (7.72e-04)
array (7.09e-04)
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
null
,
json
data
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
t
)
%SELF%
(
type
,
null
,
json
data
)
;
}
<SENTENCE_END/>
read,valueread%END% (1.96e-01)
get (1.06e-01)
%UNK% (7.30e-02)
to (3.79e-02)
string (3.41e-02)
read (3.13e-02)
parse (1.54e-02)
instance (1.46e-02)
type (1.27e-02)
is (1.24e-02)
<SENTENCE_START>
{
if
(
json
data
==
null
)
return
null
;
if
(
json
data
.
is
object
(
)
)
{
string
class
name
=
type
name
==
null
?
null
:
json
data
.
get
string
(
type
name
,
null
)
;
if
(
class
name
!=
null
)
{
json
data
.
remove
(
type
name
)
;
type
=
get
class
(
class
name
)
;
if
(
type
==
null
)
{
try
{
type
=
(
class
<
t
>
)
class
reflection
.
for
name
(
class
name
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
}
if
(
type
==
null
)
{
if
(
default
serializer
!=
null
)
return
(
t
)
default
serializer
.
read
(
this
,
json
data
,
type
)
;
return
(
t
)
json
data
;
}
if
(
type
name
!=
null
&&
class
reflection
.
is
assignable
from
(
collection
.
class
,
type
)
)
{
json
data
=
json
data
.
get
(
"items"
)
;
}
else
{
serializer
serializer
=
class
to
serializer
.
get
(
type
)
;
if
(
serializer
!=
null
)
return
(
t
)
serializer
.
read
(
this
,
json
data
,
type
)
;
if
(
type
==
string
.
class
||
type
==
integer
.
class
||
type
==
boolean
.
class
||
type
==
float
.
class
||
type
==
long
.
class
||
type
==
double
.
class
||
type
==
short
.
class
||
type
==
byte
.
class
||
type
==
character
.
class
||
class
reflection
.
is
assignable
from
(
enum
.
class
,
type
)
)
{
return
%SELF%
(
"value"
,
type
,
json
data
)
;
}
object
object
=
new
instance
(
type
)
;
if
(
object
instanceof
serializable
)
{
(
(
serializable
)
object
)
.
read
(
this
,
json
data
)
;
return
(
t
)
object
;
}
if
(
object
instanceof
object
map
)
{
object
map
result
=
(
object
map
)
object
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
result
.
put
(
child
.
name
(
)
,
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
if
(
object
instanceof
array
map
)
{
array
map
result
=
(
array
map
)
object
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
result
.
put
(
child
.
name
(
)
,
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
if
(
object
instanceof
map
)
{
map
result
=
(
map
)
object
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
result
.
put
(
child
.
name
(
)
,
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
read
fields
(
object
,
json
data
)
;
return
(
t
)
object
;
}
}
if
(
type
!=
null
)
{
serializer
serializer
=
class
to
serializer
.
get
(
type
)
;
if
(
serializer
!=
null
)
return
(
t
)
serializer
.
read
(
this
,
json
data
,
type
)
;
}
if
(
json
data
.
is
array
(
)
)
{
if
(
type
==
null
||
type
==
object
.
class
)
type
=
(
class
<
t
>
)
array
.
class
;
if
(
class
reflection
.
is
assignable
from
(
array
.
class
,
type
)
)
{
array
result
=
type
==
array
.
class
?
new
array
(
)
:
(
array
)
new
instance
(
type
)
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
result
.
add
(
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
if
(
class
reflection
.
is
assignable
from
(
queue
.
class
,
type
)
)
{
queue
result
=
type
==
queue
.
class
?
new
queue
(
)
:
(
queue
)
new
instance
(
type
)
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
result
.
add
last
(
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
if
(
class
reflection
.
is
assignable
from
(
collection
.
class
,
type
)
)
{
collection
result
=
type
.
is
interface
(
)
?
new
array
list
(
)
:
(
collection
)
new
instance
(
type
)
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
result
.
add
(
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
if
(
type
.
is
array
(
)
)
{
class
component
type
=
type
.
get
component
type
(
)
;
if
(
element
type
==
null
)
element
type
=
component
type
;
object
result
=
array
reflection
.
new
instance
(
component
type
,
json
data
.
size
)
;
int
i
=
0
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
array
reflection
.
set
(
result
,
i
++
,
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
throw
new
serialization
exception
(
"Unable to convert value to required type: "
+
json
data
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
}
if
(
json
data
.
is
number
(
)
)
{
try
{
if
(
type
==
null
||
type
==
float
.
class
||
type
==
float
.
class
)
return
(
t
)
(
float
)
json
data
.
as
float
(
)
;
if
(
type
==
int
.
class
||
type
==
integer
.
class
)
return
(
t
)
(
integer
)
json
data
.
as
int
(
)
;
if
(
type
==
long
.
class
||
type
==
long
.
class
)
return
(
t
)
(
long
)
json
data
.
as
long
(
)
;
if
(
type
==
double
.
class
||
type
==
double
.
class
)
return
(
t
)
(
double
)
json
data
.
as
double
(
)
;
if
(
type
==
string
.
class
)
return
(
t
)
json
data
.
as
string
(
)
;
if
(
type
==
short
.
class
||
type
==
short
.
class
)
return
(
t
)
(
short
)
json
data
.
as
short
(
)
;
if
(
type
==
byte
.
class
||
type
==
byte
.
class
)
return
(
t
)
(
byte
)
json
data
.
as
byte
(
)
;
}
catch
(
number
format
exception
ignored
)
{
}
json
data
=
new
json
value
(
json
data
.
as
string
(
)
)
;
}
if
(
json
data
.
is
boolean
(
)
)
{
try
{
if
(
type
==
null
||
type
==
boolean
.
class
||
type
==
boolean
.
class
)
return
(
t
)
(
boolean
)
json
data
.
as
boolean
(
)
;
}
catch
(
number
format
exception
ignored
)
{
}
json
data
=
new
json
value
(
json
data
.
as
string
(
)
)
;
}
if
(
json
data
.
is
string
(
)
)
{
string
string
=
json
data
.
as
string
(
)
;
if
(
type
==
null
||
type
==
string
.
class
)
return
(
t
)
string
;
try
{
if
(
type
==
int
.
class
||
type
==
integer
.
class
)
return
(
t
)
integer
.
value
of
(
string
)
;
if
(
type
==
float
.
class
||
type
==
float
.
class
)
return
(
t
)
float
.
value
of
(
string
)
;
if
(
type
==
long
.
class
||
type
==
long
.
class
)
return
(
t
)
long
.
value
of
(
string
)
;
if
(
type
==
double
.
class
||
type
==
double
.
class
)
return
(
t
)
double
.
value
of
(
string
)
;
if
(
type
==
short
.
class
||
type
==
short
.
class
)
return
(
t
)
short
.
value
of
(
string
)
;
if
(
type
==
byte
.
class
||
type
==
byte
.
class
)
return
(
t
)
byte
.
value
of
(
string
)
;
}
catch
(
number
format
exception
ignored
)
{
}
if
(
type
==
boolean
.
class
||
type
==
boolean
.
class
)
return
(
t
)
boolean
.
value
of
(
string
)
;
if
(
type
==
char
.
class
||
type
==
character
.
class
)
return
(
t
)
(
character
)
string
.
char
at
(
0
)
;
if
(
class
reflection
.
is
assignable
from
(
enum
.
class
,
type
)
)
{
enum
[
]
constants
=
(
enum
[
]
)
type
.
get
enum
constants
(
)
;
for
(
int
i
=
0
,
n
=
constants
.
length
;
i
<
n
;
i
++
)
{
enum
e
=
constants
[
i
]
;
if
(
string
.
equals
(
convert
to
string
(
e
)
)
)
return
(
t
)
e
;
}
}
if
(
type
==
char
sequence
.
class
)
return
(
t
)
string
;
throw
new
serialization
exception
(
"Unable to convert value to required type: "
+
json
data
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
}
return
null
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
if
(
json
data
==
null
)
return
null
;
if
(
json
data
.
is
object
(
)
)
{
string
class
name
=
type
name
==
null
?
null
:
json
data
.
get
string
(
type
name
,
null
)
;
if
(
class
name
!=
null
)
{
json
data
.
remove
(
type
name
)
;
type
=
get
class
(
class
name
)
;
if
(
type
==
null
)
{
try
{
type
=
(
class
<
t
>
)
class
reflection
.
for
name
(
class
name
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
}
if
(
type
==
null
)
{
if
(
default
serializer
!=
null
)
return
(
t
)
default
serializer
.
read
(
this
,
json
data
,
type
)
;
return
(
t
)
json
data
;
}
if
(
type
name
!=
null
&&
class
reflection
.
is
assignable
from
(
collection
.
class
,
type
)
)
{
json
data
=
json
data
.
get
(
"items"
)
;
}
else
{
serializer
serializer
=
class
to
serializer
.
get
(
type
)
;
if
(
serializer
!=
null
)
return
(
t
)
serializer
.
read
(
this
,
json
data
,
type
)
;
if
(
type
==
string
.
class
||
type
==
integer
.
class
||
type
==
boolean
.
class
||
type
==
float
.
class
||
type
==
long
.
class
||
type
==
double
.
class
||
type
==
short
.
class
||
type
==
byte
.
class
||
type
==
character
.
class
||
class
reflection
.
is
assignable
from
(
enum
.
class
,
type
)
)
{
return
%SELF%
(
"value"
,
type
,
json
data
)
;
}
object
object
=
new
instance
(
type
)
;
if
(
object
instanceof
serializable
)
{
(
(
serializable
)
object
)
.
read
(
this
,
json
data
)
;
return
(
t
)
object
;
}
if
(
object
instanceof
object
map
)
{
object
map
result
=
(
object
map
)
object
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
result
.
put
(
child
.
name
(
)
,
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
if
(
object
instanceof
array
map
)
{
array
map
result
=
(
array
map
)
object
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
result
.
put
(
child
.
name
(
)
,
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
if
(
object
instanceof
map
)
{
map
result
=
(
map
)
object
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
result
.
put
(
child
.
name
(
)
,
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
read
fields
(
object
,
json
data
)
;
return
(
t
)
object
;
}
}
if
(
type
!=
null
)
{
serializer
serializer
=
class
to
serializer
.
get
(
type
)
;
if
(
serializer
!=
null
)
return
(
t
)
serializer
.
read
(
this
,
json
data
,
type
)
;
}
if
(
json
data
.
is
array
(
)
)
{
if
(
type
==
null
||
type
==
object
.
class
)
type
=
(
class
<
t
>
)
array
.
class
;
if
(
class
reflection
.
is
assignable
from
(
array
.
class
,
type
)
)
{
array
result
=
type
==
array
.
class
?
new
array
(
)
:
(
array
)
new
instance
(
type
)
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
result
.
add
(
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
if
(
class
reflection
.
is
assignable
from
(
queue
.
class
,
type
)
)
{
queue
result
=
type
==
queue
.
class
?
new
queue
(
)
:
(
queue
)
new
instance
(
type
)
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
result
.
add
last
(
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
if
(
class
reflection
.
is
assignable
from
(
collection
.
class
,
type
)
)
{
collection
result
=
type
.
is
interface
(
)
?
new
array
list
(
)
:
(
collection
)
new
instance
(
type
)
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
result
.
add
(
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
if
(
type
.
is
array
(
)
)
{
class
component
type
=
type
.
get
component
type
(
)
;
if
(
element
type
==
null
)
element
type
=
component
type
;
object
result
=
array
reflection
.
new
instance
(
component
type
,
json
data
.
size
)
;
int
i
=
0
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
array
reflection
.
set
(
result
,
i
++
,
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
throw
new
serialization
exception
(
"Unable to convert value to required type: "
+
json
data
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
}
if
(
json
data
.
is
number
(
)
)
{
try
{
if
(
type
==
null
||
type
==
float
.
class
||
type
==
float
.
class
)
return
(
t
)
(
float
)
json
data
.
as
float
(
)
;
if
(
type
==
int
.
class
||
type
==
integer
.
class
)
return
(
t
)
(
integer
)
json
data
.
as
int
(
)
;
if
(
type
==
long
.
class
||
type
==
long
.
class
)
return
(
t
)
(
long
)
json
data
.
as
long
(
)
;
if
(
type
==
double
.
class
||
type
==
double
.
class
)
return
(
t
)
(
double
)
json
data
.
as
double
(
)
;
if
(
type
==
string
.
class
)
return
(
t
)
json
data
.
as
string
(
)
;
if
(
type
==
short
.
class
||
type
==
short
.
class
)
return
(
t
)
(
short
)
json
data
.
as
short
(
)
;
if
(
type
==
byte
.
class
||
type
==
byte
.
class
)
return
(
t
)
(
byte
)
json
data
.
as
byte
(
)
;
}
catch
(
number
format
exception
ignored
)
{
}
json
data
=
new
json
value
(
json
data
.
as
string
(
)
)
;
}
if
(
json
data
.
is
boolean
(
)
)
{
try
{
if
(
type
==
null
||
type
==
boolean
.
class
||
type
==
boolean
.
class
)
return
(
t
)
(
boolean
)
json
data
.
as
boolean
(
)
;
}
catch
(
number
format
exception
ignored
)
{
}
json
data
=
new
json
value
(
json
data
.
as
string
(
)
)
;
}
if
(
json
data
.
is
string
(
)
)
{
string
string
=
json
data
.
as
string
(
)
;
if
(
type
==
null
||
type
==
string
.
class
)
return
(
t
)
string
;
try
{
if
(
type
==
int
.
class
||
type
==
integer
.
class
)
return
(
t
)
integer
.
value
of
(
string
)
;
if
(
type
==
float
.
class
||
type
==
float
.
class
)
return
(
t
)
float
.
value
of
(
string
)
;
if
(
type
==
long
.
class
||
type
==
long
.
class
)
return
(
t
)
long
.
value
of
(
string
)
;
if
(
type
==
double
.
class
||
type
==
double
.
class
)
return
(
t
)
double
.
value
of
(
string
)
;
if
(
type
==
short
.
class
||
type
==
short
.
class
)
return
(
t
)
short
.
value
of
(
string
)
;
if
(
type
==
byte
.
class
||
type
==
byte
.
class
)
return
(
t
)
byte
.
value
of
(
string
)
;
}
catch
(
number
format
exception
ignored
)
{
}
if
(
type
==
boolean
.
class
||
type
==
boolean
.
class
)
return
(
t
)
boolean
.
value
of
(
string
)
;
if
(
type
==
char
.
class
||
type
==
character
.
class
)
return
(
t
)
(
character
)
string
.
char
at
(
0
)
;
if
(
class
reflection
.
is
assignable
from
(
enum
.
class
,
type
)
)
{
enum
[
]
constants
=
(
enum
[
]
)
type
.
get
enum
constants
(
)
;
for
(
int
i
=
0
,
n
=
constants
.
length
;
i
<
n
;
i
++
)
{
enum
e
=
constants
[
i
]
;
if
(
string
.
equals
(
convert
to
string
(
e
)
)
)
return
(
t
)
e
;
}
}
if
(
type
==
char
sequence
.
class
)
return
(
t
)
string
;
throw
new
serialization
exception
(
"Unable to convert value to required type: "
+
json
data
+
" ("
+
type
.
get
name
(
)
+
")"
)
;
}
return
null
;
}
<SENTENCE_END/>
value%END% (6.07e-01)
string (3.11e-02)
%UNK% (3.04e-02)
to (1.71e-02)
get (1.56e-02)
type (1.00e-02)
by (9.50e-03)
object (7.82e-03)
read (6.93e-03)
instance (6.91e-03)
<SENTENCE_START>
{
if
(
json
data
==
null
)
return
null
;
if
(
json
data
.
is
object
(
)
)
{
string
class
name
=
type
name
==
null
?
null
:
json
data
.
get
string
(
type
name
,
null
)
;
if
(
class
name
!=
null
)
{
json
data
.
remove
(
type
name
)
;
type
=
get
class
(
class
name
)
;
if
(
type
==
null
)
{
try
{
type
=
(
class
<
t
>
)
class
reflection
.
for
name
(
class
name
)
;
}
catch
(
reflection
exception
ex
)
{
throw
new
serialization
exception
(
ex
)
;
}
}
}
if
(
type
==
null
)
{
if
(
default
serializer
!=
null
)
return
(
t
)
default
serializer
.
read
(
this
,
json
data
,
type
)
;
return
(
t
)
json
data
;
}
if
(
type
name
!=
null
&&
class
reflection
.
is
assignable
from
(
collection
.
class
,
type
)
)
{
json
data
=
json
data
.
get
(
"items"
)
;
}
else
{
serializer
serializer
=
class
to
serializer
.
get
(
type
)
;
if
(
serializer
!=
null
)
return
(
t
)
serializer
.
read
(
this
,
json
data
,
type
)
;
if
(
type
==
string
.
class
||
type
==
integer
.
class
||
type
==
boolean
.
class
||
type
==
float
.
class
||
type
==
long
.
class
||
type
==
double
.
class
||
type
==
short
.
class
||
type
==
byte
.
class
||
type
==
character
.
class
||
class
reflection
.
is
assignable
from
(
enum
.
class
,
type
)
)
{
return
%SELF%
(
"value"
,
type
,
json
data
)
;
}
object
object
=
new
instance
(
type
)
;
if
(
object
instanceof
serializable
)
{
(
(
serializable
)
object
)
.
read
(
this
,
json
data
)
;
return
(
t
)
object
;
}
if
(
object
instanceof
object
map
)
{
object
map
result
=
(
object
map
)
object
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
result
.
put
(
child
.
name
(
)
,
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
if
(
object
instanceof
array
map
)
{
array
map
result
=
(
array
map
)
object
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
result
.
put
(
child
.
name
(
)
,
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
if
(
object
instanceof
map
)
{
map
result
=
(
map
)
object
;
for
(
json
value
child
=
json
data
.
child
;
child
!=
null
;
child
=
child
.
next
)
result
.
put
(
child
.
name
(
)
,
%SELF%
(
element
type
,
null
,
child
)
)
;
return
(
t
)
result
;
}
read
fields
(
object
,
json
data
)
;
return
(
t
)
object
;
}
}
if
(
type
!=
null
)
{
serializer
serializer
=
class
to
serializer
.
get
(
type
)
;
if
(
serializer
!=
null
)
return
(
t
)
serializer
.
read
(
this
,
json
data
,
type
)
;