Copy+Attentional Convolutional


Original Name load,model,data

load

<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/>

(Copy Probability: 3.3%)

<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

<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/>

(Copy Probability: 8.3%)

<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

<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/>

(Copy Probability: 5.4%)

<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%

<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/>

(Copy Probability: 4.1%)

<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/>


Original Name set,active,group

set

<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/>

(Copy Probability: 4.7%)

<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/>

active

<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/>

(Copy Probability: 78.0%)

<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/>

group

<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/>

(Copy Probability: 75.1%)

<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%

<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/>

(Copy Probability: 10.3%)

<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/>


Original Name get,index

get

<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/>

(Copy Probability: 5.5%)

<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

<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/>

(Copy Probability: 29.4%)

<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%

<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/>

(Copy Probability: 4.9%)

<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/>


Original Name load

load

<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/>

(Copy Probability: 3.8%)

<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%

<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/>

(Copy Probability: 13.1%)

<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/>


Original Name get,material

get

<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/>

(Copy Probability: 3.9%)

<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

<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/>

(Copy Probability: 51.3%)

<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%

<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/>

(Copy Probability: 12.6%)

<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/>


Original Name get,c,ptr

get

<SENTENCE_START> { return ( obj == null ) ? 0 : obj . swig c ptr ; } <SENTENCE_END/>

(Copy Probability: 1.5%)

<SENTENCE_START> { return ( obj == null ) ? 0 : obj . swig c ptr ; } <SENTENCE_END/>

c

<SENTENCE_START> { return ( obj == null ) ? 0 : obj . swig c ptr ; } <SENTENCE_END/>

(Copy Probability: 99.7%)

<SENTENCE_START> { return ( obj == null ) ? 0 : obj . swig c ptr ; } <SENTENCE_END/>

ptr

<SENTENCE_START> { return ( obj == null ) ? 0 : obj . swig c ptr ; } <SENTENCE_END/>

(Copy Probability: 99.8%)

<SENTENCE_START> { return ( obj == null ) ? 0 : obj . swig c ptr ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return ( obj == null ) ? 0 : obj . swig c ptr ; } <SENTENCE_END/>

(Copy Probability: 3.7%)

<SENTENCE_START> { return ( obj == null ) ? 0 : obj . swig c ptr ; } <SENTENCE_END/>


Original Name swig,director,disconnect

swig

<SENTENCE_START> { swig c mem own = false ; delete ( ) ; } <SENTENCE_END/>

(Copy Probability: 1.5%)

<SENTENCE_START> { swig c mem own = false ; delete ( ) ; } <SENTENCE_END/>

director

<SENTENCE_START> { swig c mem own = false ; delete ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.9%)

<SENTENCE_START> { swig c mem own = false ; delete ( ) ; } <SENTENCE_END/>

disconnect

<SENTENCE_START> { swig c mem own = false ; delete ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.2%)

<SENTENCE_START> { swig c mem own = false ; delete ( ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { swig c mem own = false ; delete ( ) ; } <SENTENCE_END/>

(Copy Probability: 2.3%)

<SENTENCE_START> { swig c mem own = false ; delete ( ) ; } <SENTENCE_END/>


Original Name swig,release,ownership

swig

<SENTENCE_START> { swig c mem own = false ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , false ) ; } <SENTENCE_END/>

(Copy Probability: 3.1%)

<SENTENCE_START> { swig c mem own = false ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , false ) ; } <SENTENCE_END/>

release

<SENTENCE_START> { swig c mem own = false ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , false ) ; } <SENTENCE_END/>

(Copy Probability: 29.9%)

<SENTENCE_START> { swig c mem own = false ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , false ) ; } <SENTENCE_END/>

ownership

<SENTENCE_START> { swig c mem own = false ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , false ) ; } <SENTENCE_END/>

(Copy Probability: 85.4%)

<SENTENCE_START> { swig c mem own = false ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , false ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { swig c mem own = false ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , false ) ; } <SENTENCE_END/>

(Copy Probability: 7.1%)

<SENTENCE_START> { swig c mem own = false ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , false ) ; } <SENTENCE_END/>


Original Name swig,take,ownership

swig

<SENTENCE_START> { swig c mem own = true ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , true ) ; } <SENTENCE_END/>

(Copy Probability: 3.7%)

<SENTENCE_START> { swig c mem own = true ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , true ) ; } <SENTENCE_END/>

take

<SENTENCE_START> { swig c mem own = true ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , true ) ; } <SENTENCE_END/>

(Copy Probability: 24.2%)

<SENTENCE_START> { swig c mem own = true ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , true ) ; } <SENTENCE_END/>

ownership

<SENTENCE_START> { swig c mem own = true ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , true ) ; } <SENTENCE_END/>

(Copy Probability: 84.0%)

<SENTENCE_START> { swig c mem own = true ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , true ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { swig c mem own = true ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , true ) ; } <SENTENCE_END/>

(Copy Probability: 5.7%)

<SENTENCE_START> { swig c mem own = true ; collision jni . bt internal triangle index callback change ownership ( this , swig c ptr , true ) ; } <SENTENCE_END/>


Original Name internal,process,triangle,index

internal

<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/>

(Copy Probability: 9.5%)

<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/>

process

<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/>

(Copy Probability: 99.7%)

<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/>

triangle

<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/>

(Copy Probability: 99.9%)

<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/>

index

<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/>

(Copy Probability: 94.4%)

<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%

<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/>

(Copy Probability: 17.1%)

<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/>


Original Name set,ignore,unknown,fields

set

<SENTENCE_START> { this . ignore unknown fields = ignore unknown fields ; } <SENTENCE_END/>

(Copy Probability: 1.4%)

<SENTENCE_START> { this . ignore unknown fields = ignore unknown fields ; } <SENTENCE_END/>

ignore

<SENTENCE_START> { this . ignore unknown fields = ignore unknown fields ; } <SENTENCE_END/>

(Copy Probability: 99.0%)

<SENTENCE_START> { this . ignore unknown fields = ignore unknown fields ; } <SENTENCE_END/>

unknown

<SENTENCE_START> { this . ignore unknown fields = ignore unknown fields ; } <SENTENCE_END/>

(Copy Probability: 99.4%)

<SENTENCE_START> { this . ignore unknown fields = ignore unknown fields ; } <SENTENCE_END/>

fields

<SENTENCE_START> { this . ignore unknown fields = ignore unknown fields ; } <SENTENCE_END/>

(Copy Probability: 40.8%)

<SENTENCE_START> { this . ignore unknown fields = ignore unknown fields ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { this . ignore unknown fields = ignore unknown fields ; } <SENTENCE_END/>

(Copy Probability: 4.4%)

<SENTENCE_START> { this . ignore unknown fields = ignore unknown fields ; } <SENTENCE_END/>


Original Name set,output,type

set

<SENTENCE_START> { this . output type = output type ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { this . output type = output type ; } <SENTENCE_END/>

output

<SENTENCE_START> { this . output type = output type ; } <SENTENCE_END/>

(Copy Probability: 97.4%)

<SENTENCE_START> { this . output type = output type ; } <SENTENCE_END/>

type

<SENTENCE_START> { this . output type = output type ; } <SENTENCE_END/>

(Copy Probability: 95.2%)

<SENTENCE_START> { this . output type = output type ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { this . output type = output type ; } <SENTENCE_END/>

(Copy Probability: 3.9%)

<SENTENCE_START> { this . output type = output type ; } <SENTENCE_END/>


Original Name set,quote,long,values

set

<SENTENCE_START> { this . quote long values = quote long values ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { this . quote long values = quote long values ; } <SENTENCE_END/>

quote

<SENTENCE_START> { this . quote long values = quote long values ; } <SENTENCE_END/>

(Copy Probability: 82.8%)

<SENTENCE_START> { this . quote long values = quote long values ; } <SENTENCE_END/>

long

<SENTENCE_START> { this . quote long values = quote long values ; } <SENTENCE_END/>

(Copy Probability: 39.4%)

<SENTENCE_START> { this . quote long values = quote long values ; } <SENTENCE_END/>

values

<SENTENCE_START> { this . quote long values = quote long values ; } <SENTENCE_END/>

(Copy Probability: 4.2%)

<SENTENCE_START> { this . quote long values = quote long values ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { this . quote long values = quote long values ; } <SENTENCE_END/>

(Copy Probability: 2.9%)

<SENTENCE_START> { this . quote long values = quote long values ; } <SENTENCE_END/>


Original Name set,enum,names

set

<SENTENCE_START> { this . enum names = enum names ; } <SENTENCE_END/>

(Copy Probability: 0.9%)

<SENTENCE_START> { this . enum names = enum names ; } <SENTENCE_END/>

enum

<SENTENCE_START> { this . enum names = enum names ; } <SENTENCE_END/>

(Copy Probability: 99.6%)

<SENTENCE_START> { this . enum names = enum names ; } <SENTENCE_END/>

names

<SENTENCE_START> { this . enum names = enum names ; } <SENTENCE_END/>

(Copy Probability: 99.8%)

<SENTENCE_START> { this . enum names = enum names ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { this . enum names = enum names ; } <SENTENCE_END/>

(Copy Probability: 4.0%)

<SENTENCE_START> { this . enum names = enum names ; } <SENTENCE_END/>


Original Name add,class,tag

add

<SENTENCE_START> { tag to class . put ( tag , type ) ; class to tag . put ( type , tag ) ; } <SENTENCE_END/>

(Copy Probability: 1.5%)

<SENTENCE_START> { tag to class . put ( tag , type ) ; class to tag . put ( type , tag ) ; } <SENTENCE_END/>

class

<SENTENCE_START> { tag to class . put ( tag , type ) ; class to tag . put ( type , tag ) ; } <SENTENCE_END/>

(Copy Probability: 5.3%)

<SENTENCE_START> { tag to class . put ( tag , type ) ; class to tag . put ( type , tag ) ; } <SENTENCE_END/>

tag

<SENTENCE_START> { tag to class . put ( tag , type ) ; class to tag . put ( type , tag ) ; } <SENTENCE_END/>

(Copy Probability: 4.1%)

<SENTENCE_START> { tag to class . put ( tag , type ) ; class to tag . put ( type , tag ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { tag to class . put ( tag , type ) ; class to tag . put ( type , tag ) ; } <SENTENCE_END/>

(Copy Probability: 2.6%)

<SENTENCE_START> { tag to class . put ( tag , type ) ; class to tag . put ( type , tag ) ; } <SENTENCE_END/>


Original Name get,class

get

<SENTENCE_START> { return tag to class . get ( tag ) ; } <SENTENCE_END/>

(Copy Probability: 0.7%)

<SENTENCE_START> { return tag to class . get ( tag ) ; } <SENTENCE_END/>

class

<SENTENCE_START> { return tag to class . get ( tag ) ; } <SENTENCE_END/>

(Copy Probability: 14.1%)

<SENTENCE_START> { return tag to class . get ( tag ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return tag to class . get ( tag ) ; } <SENTENCE_END/>

(Copy Probability: 7.9%)

<SENTENCE_START> { return tag to class . get ( tag ) ; } <SENTENCE_END/>


Original Name get,tag

get

<SENTENCE_START> { return class to tag . get ( type ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { return class to tag . get ( type ) ; } <SENTENCE_END/>

tag

<SENTENCE_START> { return class to tag . get ( type ) ; } <SENTENCE_END/>

(Copy Probability: 4.4%)

<SENTENCE_START> { return class to tag . get ( type ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return class to tag . get ( type ) ; } <SENTENCE_END/>

(Copy Probability: 9.0%)

<SENTENCE_START> { return class to tag . get ( type ) ; } <SENTENCE_END/>


Original Name set,type,name

set

<SENTENCE_START> { this . type name = type name ; } <SENTENCE_END/>

(Copy Probability: 0.9%)

<SENTENCE_START> { this . type name = type name ; } <SENTENCE_END/>

type

<SENTENCE_START> { this . type name = type name ; } <SENTENCE_END/>

(Copy Probability: 99.2%)

<SENTENCE_START> { this . type name = type name ; } <SENTENCE_END/>

name

<SENTENCE_START> { this . type name = type name ; } <SENTENCE_END/>

(Copy Probability: 72.5%)

<SENTENCE_START> { this . type name = type name ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { this . type name = type name ; } <SENTENCE_END/>

(Copy Probability: 2.5%)

<SENTENCE_START> { this . type name = type name ; } <SENTENCE_END/>


Original Name set,default,serializer

set

<SENTENCE_START> { this . default serializer = default serializer ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { this . default serializer = default serializer ; } <SENTENCE_END/>

default

<SENTENCE_START> { this . default serializer = default serializer ; } <SENTENCE_END/>

(Copy Probability: 2.4%)

<SENTENCE_START> { this . default serializer = default serializer ; } <SENTENCE_END/>

serializer

<SENTENCE_START> { this . default serializer = default serializer ; } <SENTENCE_END/>

(Copy Probability: 1.7%)

<SENTENCE_START> { this . default serializer = default serializer ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { this . default serializer = default serializer ; } <SENTENCE_END/>

(Copy Probability: 0.9%)

<SENTENCE_START> { this . default serializer = default serializer ; } <SENTENCE_END/>


Original Name set,serializer

set

<SENTENCE_START> { class to serializer . put ( type , serializer ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { class to serializer . put ( type , serializer ) ; } <SENTENCE_END/>

serializer

<SENTENCE_START> { class to serializer . put ( type , serializer ) ; } <SENTENCE_END/>

(Copy Probability: 0.1%)

<SENTENCE_START> { class to serializer . put ( type , serializer ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { class to serializer . put ( type , serializer ) ; } <SENTENCE_END/>

(Copy Probability: 0.2%)

<SENTENCE_START> { class to serializer . put ( type , serializer ) ; } <SENTENCE_END/>


Original Name get,serializer

get

<SENTENCE_START> { return class to serializer . get ( type ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { return class to serializer . get ( type ) ; } <SENTENCE_END/>

serializer

<SENTENCE_START> { return class to serializer . get ( type ) ; } <SENTENCE_END/>

(Copy Probability: 0.7%)

<SENTENCE_START> { return class to serializer . get ( type ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return class to serializer . get ( type ) ; } <SENTENCE_END/>

(Copy Probability: 0.9%)

<SENTENCE_START> { return class to serializer . get ( type ) ; } <SENTENCE_END/>


Original Name set,use,prototypes

set

<SENTENCE_START> { this . use prototypes = use prototypes ; } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { this . use prototypes = use prototypes ; } <SENTENCE_END/>

use

<SENTENCE_START> { this . use prototypes = use prototypes ; } <SENTENCE_END/>

(Copy Probability: 98.6%)

<SENTENCE_START> { this . use prototypes = use prototypes ; } <SENTENCE_END/>

prototypes

<SENTENCE_START> { this . use prototypes = use prototypes ; } <SENTENCE_END/>

(Copy Probability: 88.8%)

<SENTENCE_START> { this . use prototypes = use prototypes ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { this . use prototypes = use prototypes ; } <SENTENCE_END/>

(Copy Probability: 15.2%)

<SENTENCE_START> { this . use prototypes = use prototypes ; } <SENTENCE_END/>


Original Name set,element,type

set

<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/>

(Copy Probability: 2.7%)

<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/>

element

<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/>

(Copy Probability: 71.0%)

<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/>

type

<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/>

(Copy Probability: 68.1%)

<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%

<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/>

(Copy Probability: 4.1%)

<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/>


Original Name get,fields

get

<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/>

(Copy Probability: 4.8%)

<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

<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/>

(Copy Probability: 40.2%)

<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%

<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/>

(Copy Probability: 39.2%)

<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/>


Original Name to,json

to

<SENTENCE_START> { return %SELF% ( object , object == null ? null : object . get class ( ) , ( class ) null ) ; } <SENTENCE_END/>

(Copy Probability: 1.2%)

<SENTENCE_START> { return %SELF% ( object , object == null ? null : object . get class ( ) , ( class ) null ) ; } <SENTENCE_END/>

json

<SENTENCE_START> { return %SELF% ( object , object == null ? null : object . get class ( ) , ( class ) null ) ; } <SENTENCE_END/>

(Copy Probability: 3.1%)

<SENTENCE_START> { return %SELF% ( object , object == null ? null : object . get class ( ) , ( class ) null ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return %SELF% ( object , object == null ? null : object . get class ( ) , ( class ) null ) ; } <SENTENCE_END/>

(Copy Probability: 3.0%)

<SENTENCE_START> { return %SELF% ( object , object == null ? null : object . get class ( ) , ( class ) null ) ; } <SENTENCE_END/>


Original Name to,json

to

<SENTENCE_START> { return %SELF% ( object , known type , ( class ) null ) ; } <SENTENCE_END/>

(Copy Probability: 0.7%)

<SENTENCE_START> { return %SELF% ( object , known type , ( class ) null ) ; } <SENTENCE_END/>

json

<SENTENCE_START> { return %SELF% ( object , known type , ( class ) null ) ; } <SENTENCE_END/>

(Copy Probability: 0.9%)

<SENTENCE_START> { return %SELF% ( object , known type , ( class ) null ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return %SELF% ( object , known type , ( class ) null ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { return %SELF% ( object , known type , ( class ) null ) ; } <SENTENCE_END/>


Original Name to,json

to

<SENTENCE_START> { string writer buffer = new string writer ( ) ; %SELF% ( object , known type , element type , buffer ) ; return buffer . to string ( ) ; } <SENTENCE_END/>

(Copy Probability: 2.0%)

<SENTENCE_START> { string writer buffer = new string writer ( ) ; %SELF% ( object , known type , element type , buffer ) ; return buffer . to string ( ) ; } <SENTENCE_END/>

json

<SENTENCE_START> { string writer buffer = new string writer ( ) ; %SELF% ( object , known type , element type , buffer ) ; return buffer . to string ( ) ; } <SENTENCE_END/>

(Copy Probability: 2.5%)

<SENTENCE_START> { string writer buffer = new string writer ( ) ; %SELF% ( object , known type , element type , buffer ) ; return buffer . to string ( ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { string writer buffer = new string writer ( ) ; %SELF% ( object , known type , element type , buffer ) ; return buffer . to string ( ) ; } <SENTENCE_END/>

(Copy Probability: 3.0%)

<SENTENCE_START> { string writer buffer = new string writer ( ) ; %SELF% ( object , known type , element type , buffer ) ; return buffer . to string ( ) ; } <SENTENCE_END/>


Original Name to,json

to

<SENTENCE_START> { %SELF% ( object , object == null ? null : object . get class ( ) , null , file ) ; } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { %SELF% ( object , object == null ? null : object . get class ( ) , null , file ) ; } <SENTENCE_END/>

json

<SENTENCE_START> { %SELF% ( object , object == null ? null : object . get class ( ) , null , file ) ; } <SENTENCE_END/>

(Copy Probability: 2.4%)

<SENTENCE_START> { %SELF% ( object , object == null ? null : object . get class ( ) , null , file ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { %SELF% ( object , object == null ? null : object . get class ( ) , null , file ) ; } <SENTENCE_END/>

(Copy Probability: 2.5%)

<SENTENCE_START> { %SELF% ( object , object == null ? null : object . get class ( ) , null , file ) ; } <SENTENCE_END/>


Original Name to,json

to

<SENTENCE_START> { %SELF% ( object , known type , null , file ) ; } <SENTENCE_END/>

(Copy Probability: 0.7%)

<SENTENCE_START> { %SELF% ( object , known type , null , file ) ; } <SENTENCE_END/>

json

<SENTENCE_START> { %SELF% ( object , known type , null , file ) ; } <SENTENCE_END/>

(Copy Probability: 0.7%)

<SENTENCE_START> { %SELF% ( object , known type , null , file ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { %SELF% ( object , known type , null , file ) ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { %SELF% ( object , known type , null , file ) ; } <SENTENCE_END/>


Original Name to,json

to

<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/>

(Copy Probability: 1.8%)

<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

<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/>

(Copy Probability: 1.6%)

<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%

<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/>

(Copy Probability: 1.3%)

<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/>


Original Name to,json

to

<SENTENCE_START> { %SELF% ( object , object == null ? null : object . get class ( ) , null , writer ) ; } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { %SELF% ( object , object == null ? null : object . get class ( ) , null , writer ) ; } <SENTENCE_END/>

json

<SENTENCE_START> { %SELF% ( object , object == null ? null : object . get class ( ) , null , writer ) ; } <SENTENCE_END/>

(Copy Probability: 1.8%)

<SENTENCE_START> { %SELF% ( object , object == null ? null : object . get class ( ) , null , writer ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { %SELF% ( object , object == null ? null : object . get class ( ) , null , writer ) ; } <SENTENCE_END/>

(Copy Probability: 1.7%)

<SENTENCE_START> { %SELF% ( object , object == null ? null : object . get class ( ) , null , writer ) ; } <SENTENCE_END/>


Original Name to,json

to

<SENTENCE_START> { %SELF% ( object , known type , null , writer ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { %SELF% ( object , known type , null , writer ) ; } <SENTENCE_END/>

json

<SENTENCE_START> { %SELF% ( object , known type , null , writer ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { %SELF% ( object , known type , null , writer ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { %SELF% ( object , known type , null , writer ) ; } <SENTENCE_END/>

(Copy Probability: 0.3%)

<SENTENCE_START> { %SELF% ( object , known type , null , writer ) ; } <SENTENCE_END/>


Original Name to,json

to

<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/>

(Copy Probability: 1.7%)

<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

<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/>

(Copy Probability: 5.6%)

<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%

<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/>

(Copy Probability: 1.9%)

<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/>


Original Name set,writer

set

<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/>

(Copy Probability: 2.1%)

<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

<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/>

(Copy Probability: 3.6%)

<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%

<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/>

(Copy Probability: 2.8%)

<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/>


Original Name get,writer

get

<SENTENCE_START> { return writer ; } <SENTENCE_END/>

(Copy Probability: 0.2%)

<SENTENCE_START> { return writer ; } <SENTENCE_END/>

writer

<SENTENCE_START> { return writer ; } <SENTENCE_END/>

(Copy Probability: 3.1%)

<SENTENCE_START> { return writer ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return writer ; } <SENTENCE_END/>

(Copy Probability: 0.2%)

<SENTENCE_START> { return writer ; } <SENTENCE_END/>


Original Name write,fields

write

<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/>

(Copy Probability: 3.2%)

<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

<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/>

(Copy Probability: 19.9%)

<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%

<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/>

(Copy Probability: 13.9%)

<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/>


Original Name get,default,values

get

<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/>

(Copy Probability: 3.7%)

<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

<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/>

(Copy Probability: 20.7%)

<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

<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/>

(Copy Probability: 22.6%)

<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%

<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/>

(Copy Probability: 6.5%)

<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/>


Original Name write,field

write

<SENTENCE_START> { %SELF% ( object , name , name , null ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { %SELF% ( object , name , name , null ) ; } <SENTENCE_END/>

field

<SENTENCE_START> { %SELF% ( object , name , name , null ) ; } <SENTENCE_END/>

(Copy Probability: 0.7%)

<SENTENCE_START> { %SELF% ( object , name , name , null ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { %SELF% ( object , name , name , null ) ; } <SENTENCE_END/>

(Copy Probability: 0.3%)

<SENTENCE_START> { %SELF% ( object , name , name , null ) ; } <SENTENCE_END/>


Original Name write,field

write

<SENTENCE_START> { %SELF% ( object , name , name , element type ) ; } <SENTENCE_END/>

(Copy Probability: 0.7%)

<SENTENCE_START> { %SELF% ( object , name , name , element type ) ; } <SENTENCE_END/>

field

<SENTENCE_START> { %SELF% ( object , name , name , element type ) ; } <SENTENCE_END/>

(Copy Probability: 5.4%)

<SENTENCE_START> { %SELF% ( object , name , name , element type ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { %SELF% ( object , name , name , element type ) ; } <SENTENCE_END/>

(Copy Probability: 3.1%)

<SENTENCE_START> { %SELF% ( object , name , name , element type ) ; } <SENTENCE_END/>


Original Name write,field

write

<SENTENCE_START> { %SELF% ( object , field name , json name , null ) ; } <SENTENCE_END/>

(Copy Probability: 0.7%)

<SENTENCE_START> { %SELF% ( object , field name , json name , null ) ; } <SENTENCE_END/>

field

<SENTENCE_START> { %SELF% ( object , field name , json name , null ) ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { %SELF% ( object , field name , json name , null ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { %SELF% ( object , field name , json name , null ) ; } <SENTENCE_END/>

(Copy Probability: 0.3%)

<SENTENCE_START> { %SELF% ( object , field name , json name , null ) ; } <SENTENCE_END/>


Original Name write,field

write

<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/>

(Copy Probability: 3.3%)

<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

<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/>

(Copy Probability: 27.8%)

<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%

<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/>

(Copy Probability: 23.9%)

<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/>


Original Name write,value

write

<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/>

(Copy Probability: 1.8%)

<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

<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/>

(Copy Probability: 2.2%)

<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%

<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/>

(Copy Probability: 1.2%)

<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/>


Original Name write,value

write

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( value , known type , null ) ; } <SENTENCE_END/>

(Copy Probability: 1.4%)

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( value , known type , null ) ; } <SENTENCE_END/>

value

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( value , known type , null ) ; } <SENTENCE_END/>

(Copy Probability: 2.3%)

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( value , known type , null ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( value , known type , null ) ; } <SENTENCE_END/>

(Copy Probability: 0.9%)

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( value , known type , null ) ; } <SENTENCE_END/>


Original Name write,value

write

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( value , known type , element type ) ; } <SENTENCE_END/>

(Copy Probability: 1.4%)

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( value , known type , element type ) ; } <SENTENCE_END/>

value

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( value , known type , element type ) ; } <SENTENCE_END/>

(Copy Probability: 2.4%)

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( value , known type , element type ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( value , known type , element type ) ; } <SENTENCE_END/>

(Copy Probability: 2.1%)

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( value , known type , element type ) ; } <SENTENCE_END/>


Original Name write,value

write

<SENTENCE_START> { if ( value == null ) %SELF% ( value , null , null ) ; else %SELF% ( value , value . get class ( ) , null ) ; } <SENTENCE_END/>

(Copy Probability: 1.3%)

<SENTENCE_START> { if ( value == null ) %SELF% ( value , null , null ) ; else %SELF% ( value , value . get class ( ) , null ) ; } <SENTENCE_END/>

value

<SENTENCE_START> { if ( value == null ) %SELF% ( value , null , null ) ; else %SELF% ( value , value . get class ( ) , null ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { if ( value == null ) %SELF% ( value , null , null ) ; else %SELF% ( value , value . get class ( ) , null ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { if ( value == null ) %SELF% ( value , null , null ) ; else %SELF% ( value , value . get class ( ) , null ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { if ( value == null ) %SELF% ( value , null , null ) ; else %SELF% ( value , value . get class ( ) , null ) ; } <SENTENCE_END/>


Original Name write,value

write

<SENTENCE_START> { %SELF% ( value , known type , null ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { %SELF% ( value , known type , null ) ; } <SENTENCE_END/>

value

<SENTENCE_START> { %SELF% ( value , known type , null ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { %SELF% ( value , known type , null ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { %SELF% ( value , known type , null ) ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { %SELF% ( value , known type , null ) ; } <SENTENCE_END/>


Original Name write,value

write

<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/>

(Copy Probability: 3.1%)

<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

<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/>

(Copy Probability: 5.4%)

<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%

<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/>

(Copy Probability: 5.1%)

<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/>


Original Name write,object,start

write

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 1.3%)

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( ) ; } <SENTENCE_END/>

object

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 2.4%)

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( ) ; } <SENTENCE_END/>

start

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 1.6%)

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( ) ; } <SENTENCE_END/>


Original Name write,object,start

write

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( actual type , known type ) ; } <SENTENCE_END/>

(Copy Probability: 1.4%)

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( actual type , known type ) ; } <SENTENCE_END/>

object

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( actual type , known type ) ; } <SENTENCE_END/>

(Copy Probability: 2.3%)

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( actual type , known type ) ; } <SENTENCE_END/>

start

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( actual type , known type ) ; } <SENTENCE_END/>

(Copy Probability: 2.4%)

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( actual type , known type ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( actual type , known type ) ; } <SENTENCE_END/>

(Copy Probability: 2.4%)

<SENTENCE_START> { try { writer . name ( name ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } %SELF% ( actual type , known type ) ; } <SENTENCE_END/>


Original Name write,object,start

write

<SENTENCE_START> { try { writer . object ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 1.2%)

<SENTENCE_START> { try { writer . object ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

object

<SENTENCE_START> { try { writer . object ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 1.4%)

<SENTENCE_START> { try { writer . object ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

start

<SENTENCE_START> { try { writer . object ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 0.9%)

<SENTENCE_START> { try { writer . object ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

%END%

<SENTENCE_START> { try { writer . object ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 1.8%)

<SENTENCE_START> { try { writer . object ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>


Original Name write,object,start

write

<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/>

(Copy Probability: 2.3%)

<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

<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/>

(Copy Probability: 4.2%)

<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

<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/>

(Copy Probability: 4.5%)

<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%

<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/>

(Copy Probability: 3.1%)

<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/>


Original Name write,object,end

write

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

object

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

end

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

%END%

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 1.7%)

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>


Original Name write,array,start

write

<SENTENCE_START> { try { writer . name ( name ) ; writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 1.3%)

<SENTENCE_START> { try { writer . name ( name ) ; writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

array

<SENTENCE_START> { try { writer . name ( name ) ; writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { try { writer . name ( name ) ; writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

start

<SENTENCE_START> { try { writer . name ( name ) ; writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 0.9%)

<SENTENCE_START> { try { writer . name ( name ) ; writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

%END%

<SENTENCE_START> { try { writer . name ( name ) ; writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 1.7%)

<SENTENCE_START> { try { writer . name ( name ) ; writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>


Original Name write,array,start

write

<SENTENCE_START> { try { writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { try { writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

array

<SENTENCE_START> { try { writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 0.7%)

<SENTENCE_START> { try { writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

start

<SENTENCE_START> { try { writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { try { writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

%END%

<SENTENCE_START> { try { writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 1.4%)

<SENTENCE_START> { try { writer . array ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>


Original Name write,array,end

write

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

array

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

end

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

%END%

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>

(Copy Probability: 1.3%)

<SENTENCE_START> { try { writer . pop ( ) ; } catch ( io exception ex ) { throw new serialization exception ( ex ) ; } } <SENTENCE_END/>


Original Name write,type

write

<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/>

(Copy Probability: 2.4%)

<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

<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/>

(Copy Probability: 32.6%)

<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%

<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/>

(Copy Probability: 18.2%)

<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/>


Original Name from,json

from

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( reader ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( reader ) ) ; } <SENTENCE_END/>

json

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( reader ) ) ; } <SENTENCE_END/>

(Copy Probability: 0.9%)

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( reader ) ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( reader ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.2%)

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( reader ) ) ; } <SENTENCE_END/>


Original Name from,json

from

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( reader ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.2%)

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( reader ) ) ; } <SENTENCE_END/>

json

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( reader ) ) ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( reader ) ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( reader ) ) ; } <SENTENCE_END/>

(Copy Probability: 0.9%)

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( reader ) ) ; } <SENTENCE_END/>


Original Name from,json

from

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( input ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.2%)

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( input ) ) ; } <SENTENCE_END/>

json

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( input ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( input ) ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( input ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.8%)

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( input ) ) ; } <SENTENCE_END/>


Original Name from,json

from

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( input ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.3%)

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( input ) ) ; } <SENTENCE_END/>

json

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( input ) ) ; } <SENTENCE_END/>

(Copy Probability: 0.9%)

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( input ) ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( input ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.4%)

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( input ) ) ; } <SENTENCE_END/>


Original Name from,json

from

<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/>

(Copy Probability: 2.1%)

<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

<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/>

(Copy Probability: 2.9%)

<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%

<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/>

(Copy Probability: 1.8%)

<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/>


Original Name from,json

from

<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/>

(Copy Probability: 2.1%)

<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

<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/>

(Copy Probability: 2.1%)

<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%

<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/>

(Copy Probability: 1.5%)

<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/>


Original Name from,json

from

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( data , offset , length ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.3%)

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( data , offset , length ) ) ; } <SENTENCE_END/>

json

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( data , offset , length ) ) ; } <SENTENCE_END/>

(Copy Probability: 4.5%)

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( data , offset , length ) ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( data , offset , length ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.4%)

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( data , offset , length ) ) ; } <SENTENCE_END/>


Original Name from,json

from

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( data , offset , length ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.3%)

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( data , offset , length ) ) ; } <SENTENCE_END/>

json

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( data , offset , length ) ) ; } <SENTENCE_END/>

(Copy Probability: 3.3%)

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( data , offset , length ) ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( data , offset , length ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.5%)

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( data , offset , length ) ) ; } <SENTENCE_END/>


Original Name from,json

from

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( json ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( json ) ) ; } <SENTENCE_END/>

json

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( json ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( json ) ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( json ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.2%)

<SENTENCE_START> { return ( t ) read value ( type , null , new json reader ( ) . parse ( json ) ) ; } <SENTENCE_END/>


Original Name from,json

from

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( json ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.2%)

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( json ) ) ; } <SENTENCE_END/>

json

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( json ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( json ) ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( json ) ) ; } <SENTENCE_END/>

(Copy Probability: 0.9%)

<SENTENCE_START> { return ( t ) read value ( type , element type , new json reader ( ) . parse ( json ) ) ; } <SENTENCE_END/>


Original Name read,field

read

<SENTENCE_START> { %SELF% ( object , name , name , null , json data ) ; } <SENTENCE_END/>

(Copy Probability: 0.7%)

<SENTENCE_START> { %SELF% ( object , name , name , null , json data ) ; } <SENTENCE_END/>

field

<SENTENCE_START> { %SELF% ( object , name , name , null , json data ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { %SELF% ( object , name , name , null , json data ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { %SELF% ( object , name , name , null , json data ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { %SELF% ( object , name , name , null , json data ) ; } <SENTENCE_END/>


Original Name read,field

read

<SENTENCE_START> { %SELF% ( object , name , name , element type , json data ) ; } <SENTENCE_END/>

(Copy Probability: 0.7%)

<SENTENCE_START> { %SELF% ( object , name , name , element type , json data ) ; } <SENTENCE_END/>

field

<SENTENCE_START> { %SELF% ( object , name , name , element type , json data ) ; } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { %SELF% ( object , name , name , element type , json data ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { %SELF% ( object , name , name , element type , json data ) ; } <SENTENCE_END/>

(Copy Probability: 0.7%)

<SENTENCE_START> { %SELF% ( object , name , name , element type , json data ) ; } <SENTENCE_END/>


Original Name read,field

read

<SENTENCE_START> { %SELF% ( object , field name , json name , null , json data ) ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { %SELF% ( object , field name , json name , null , json data ) ; } <SENTENCE_END/>

field

<SENTENCE_START> { %SELF% ( object , field name , json name , null , json data ) ; } <SENTENCE_END/>

(Copy Probability: 1.2%)

<SENTENCE_START> { %SELF% ( object , field name , json name , null , json data ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { %SELF% ( object , field name , json name , null , json data ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { %SELF% ( object , field name , json name , null , json data ) ; } <SENTENCE_END/>


Original Name read,field

read

<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/>

(Copy Probability: 3.4%)

<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/>

field

<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/>

(Copy Probability: 71.7%)

<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%

<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/>

(Copy Probability: 30.0%)

<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/>


Original Name read,field

read

<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/>

(Copy Probability: 3.3%)

<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

<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/>

(Copy Probability: 7.3%)

<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%

<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/>

(Copy Probability: 3.4%)

<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/>


Original Name read,fields

read

<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/>

(Copy Probability: 3.3%)

<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

<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/>

(Copy Probability: 21.9%)

<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%

<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/>

(Copy Probability: 7.3%)

<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/>


Original Name read,value

read

<SENTENCE_START> { return ( t ) %SELF% ( type , null , json map . get ( name ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { return ( t ) %SELF% ( type , null , json map . get ( name ) ) ; } <SENTENCE_END/>

value

<SENTENCE_START> { return ( t ) %SELF% ( type , null , json map . get ( name ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { return ( t ) %SELF% ( type , null , json map . get ( name ) ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return ( t ) %SELF% ( type , null , json map . get ( name ) ) ; } <SENTENCE_END/>

(Copy Probability: 0.9%)

<SENTENCE_START> { return ( t ) %SELF% ( type , null , json map . get ( name ) ) ; } <SENTENCE_END/>


Original Name read,value

read

<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/>

(Copy Probability: 1.9%)

<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

<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/>

(Copy Probability: 7.0%)

<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%

<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/>

(Copy Probability: 1.7%)

<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/>


Original Name read,value

read

<SENTENCE_START> { return ( t ) %SELF% ( type , element type , json map . get ( name ) ) ; } <SENTENCE_END/>

(Copy Probability: 0.9%)

<SENTENCE_START> { return ( t ) %SELF% ( type , element type , json map . get ( name ) ) ; } <SENTENCE_END/>

value

<SENTENCE_START> { return ( t ) %SELF% ( type , element type , json map . get ( name ) ) ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { return ( t ) %SELF% ( type , element type , json map . get ( name ) ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return ( t ) %SELF% ( type , element type , json map . get ( name ) ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { return ( t ) %SELF% ( type , element type , json map . get ( name ) ) ; } <SENTENCE_END/>


Original Name read,value

read

<SENTENCE_START> { json value json value = json map . get ( name ) ; return ( t ) %SELF% ( type , element type , default value , json value ) ; } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { json value json value = json map . get ( name ) ; return ( t ) %SELF% ( type , element type , default value , json value ) ; } <SENTENCE_END/>

value

<SENTENCE_START> { json value json value = json map . get ( name ) ; return ( t ) %SELF% ( type , element type , default value , json value ) ; } <SENTENCE_END/>

(Copy Probability: 2.1%)

<SENTENCE_START> { json value json value = json map . get ( name ) ; return ( t ) %SELF% ( type , element type , default value , json value ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { json value json value = json map . get ( name ) ; return ( t ) %SELF% ( type , element type , default value , json value ) ; } <SENTENCE_END/>

(Copy Probability: 1.6%)

<SENTENCE_START> { json value json value = json map . get ( name ) ; return ( t ) %SELF% ( type , element type , default value , json value ) ; } <SENTENCE_END/>


Original Name read,value

read

<SENTENCE_START> { if ( json data == null ) return default value ; return ( t ) %SELF% ( type , element type , json data ) ; } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { if ( json data == null ) return default value ; return ( t ) %SELF% ( type , element type , json data ) ; } <SENTENCE_END/>

value

<SENTENCE_START> { if ( json data == null ) return default value ; return ( t ) %SELF% ( type , element type , json data ) ; } <SENTENCE_END/>

(Copy Probability: 2.9%)

<SENTENCE_START> { if ( json data == null ) return default value ; return ( t ) %SELF% ( type , element type , json data ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { if ( json data == null ) return default value ; return ( t ) %SELF% ( type , element type , json data ) ; } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { if ( json data == null ) return default value ; return ( t ) %SELF% ( type , element type , json data ) ; } <SENTENCE_END/>


Original Name read,value

read

<SENTENCE_START> { return ( t ) %SELF% ( type , null , json data ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { return ( t ) %SELF% ( type , null , json data ) ; } <SENTENCE_END/>

value

<SENTENCE_START> { return ( t ) %SELF% ( type , null , json data ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { return ( t ) %SELF% ( type , null , json data ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return ( t ) %SELF% ( type , null , json data ) ; } <SENTENCE_END/>

(Copy Probability: 0.3%)

<SENTENCE_START> { return ( t ) %SELF% ( type , null , json data ) ; } <SENTENCE_END/>


Original Name read,value

read

<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/>

(Copy Probability: 3.2%)

<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

<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 ) ;