Copy+Attentional Convolutional


Original Name get,particle,flags,buffer

get

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

particle

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

flags

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.3%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

buffer

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 2.0%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>


Original Name get,particle,position,buffer

get

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

particle

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

position

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.3%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

buffer

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 3.5%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>


Original Name get,particle,velocity,buffer

get

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

particle

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

velocity

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.3%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

buffer

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 1.5%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>


Original Name get,particle,color,buffer

get

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

particle

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

color

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.3%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

buffer

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 2.9%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>


Original Name get,particle,group,buffer

get

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

particle

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

group

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.3%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

buffer

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 3.6%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>


Original Name get,particle,user,data,buffer

get

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

particle

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

user

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.3%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

data

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

buffer

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 2.3%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 3.6%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>


Original Name set,particle,flags,buffer

set

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

particle

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

flags

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

buffer

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 1.4%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>


Original Name set,particle,position,buffer

set

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

particle

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

position

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

buffer

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 2.5%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>


Original Name set,particle,velocity,buffer

set

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

particle

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

velocity

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

buffer

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>


Original Name set,particle,color,buffer

set

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

particle

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

color

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

buffer

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 2.0%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>


Original Name set,particle,user,data,buffer

set

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

particle

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

user

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

data

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

buffer

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 1.7%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>

(Copy Probability: 2.6%)

<SENTENCE_START> { m particle system . %SELF% ( buffer , capacity ) ; } <SENTENCE_END/>


Original Name get,particle,contacts

get

<SENTENCE_START> { return m particle system . m contact buffer ; } <SENTENCE_END/>

(Copy Probability: 0.7%)

<SENTENCE_START> { return m particle system . m contact buffer ; } <SENTENCE_END/>

particle

<SENTENCE_START> { return m particle system . m contact buffer ; } <SENTENCE_END/>

(Copy Probability: 37.2%)

<SENTENCE_START> { return m particle system . m contact buffer ; } <SENTENCE_END/>

contacts

<SENTENCE_START> { return m particle system . m contact buffer ; } <SENTENCE_END/>

(Copy Probability: 22.5%)

<SENTENCE_START> { return m particle system . m contact buffer ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return m particle system . m contact buffer ; } <SENTENCE_END/>

(Copy Probability: 2.7%)

<SENTENCE_START> { return m particle system . m contact buffer ; } <SENTENCE_END/>


Original Name get,particle,contact,count

get

<SENTENCE_START> { return m particle system . m contact count ; } <SENTENCE_END/>

(Copy Probability: 0.7%)

<SENTENCE_START> { return m particle system . m contact count ; } <SENTENCE_END/>

particle

<SENTENCE_START> { return m particle system . m contact count ; } <SENTENCE_END/>

(Copy Probability: 26.8%)

<SENTENCE_START> { return m particle system . m contact count ; } <SENTENCE_END/>

contact

<SENTENCE_START> { return m particle system . m contact count ; } <SENTENCE_END/>

(Copy Probability: 20.4%)

<SENTENCE_START> { return m particle system . m contact count ; } <SENTENCE_END/>

count

<SENTENCE_START> { return m particle system . m contact count ; } <SENTENCE_END/>

(Copy Probability: 2.8%)

<SENTENCE_START> { return m particle system . m contact count ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return m particle system . m contact count ; } <SENTENCE_END/>

(Copy Probability: 3.3%)

<SENTENCE_START> { return m particle system . m contact count ; } <SENTENCE_END/>


Original Name get,particle,body,contacts

get

<SENTENCE_START> { return m particle system . m body contact buffer ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { return m particle system . m body contact buffer ; } <SENTENCE_END/>

particle

<SENTENCE_START> { return m particle system . m body contact buffer ; } <SENTENCE_END/>

(Copy Probability: 36.5%)

<SENTENCE_START> { return m particle system . m body contact buffer ; } <SENTENCE_END/>

body

<SENTENCE_START> { return m particle system . m body contact buffer ; } <SENTENCE_END/>

(Copy Probability: 14.4%)

<SENTENCE_START> { return m particle system . m body contact buffer ; } <SENTENCE_END/>

contacts

<SENTENCE_START> { return m particle system . m body contact buffer ; } <SENTENCE_END/>

(Copy Probability: 2.8%)

<SENTENCE_START> { return m particle system . m body contact buffer ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return m particle system . m body contact buffer ; } <SENTENCE_END/>

(Copy Probability: 3.3%)

<SENTENCE_START> { return m particle system . m body contact buffer ; } <SENTENCE_END/>


Original Name get,particle,body,contact,count

get

<SENTENCE_START> { return m particle system . m body contact count ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { return m particle system . m body contact count ; } <SENTENCE_END/>

particle

<SENTENCE_START> { return m particle system . m body contact count ; } <SENTENCE_END/>

(Copy Probability: 18.7%)

<SENTENCE_START> { return m particle system . m body contact count ; } <SENTENCE_END/>

body

<SENTENCE_START> { return m particle system . m body contact count ; } <SENTENCE_END/>

(Copy Probability: 12.5%)

<SENTENCE_START> { return m particle system . m body contact count ; } <SENTENCE_END/>

contact

<SENTENCE_START> { return m particle system . m body contact count ; } <SENTENCE_END/>

(Copy Probability: 2.7%)

<SENTENCE_START> { return m particle system . m body contact count ; } <SENTENCE_END/>

count

<SENTENCE_START> { return m particle system . m body contact count ; } <SENTENCE_END/>

(Copy Probability: 3.6%)

<SENTENCE_START> { return m particle system . m body contact count ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return m particle system . m body contact count ; } <SENTENCE_END/>

(Copy Probability: 3.6%)

<SENTENCE_START> { return m particle system . m body contact count ; } <SENTENCE_END/>


Original Name compute,particle,collision,energy

compute

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

particle

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

collision

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.3%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

energy

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>

(Copy Probability: 3.6%)

<SENTENCE_START> { return m particle system . %SELF% ( ) ; } <SENTENCE_END/>


Original Name tree,callback

tree

<SENTENCE_START> { fixture proxy proxy = ( fixture proxy ) broad phase . get user data ( node id ) ; return callback . report fixture ( proxy . fixture ) ; } <SENTENCE_END/>

(Copy Probability: 2.9%)

<SENTENCE_START> { fixture proxy proxy = ( fixture proxy ) broad phase . get user data ( node id ) ; return callback . report fixture ( proxy . fixture ) ; } <SENTENCE_END/>

callback

<SENTENCE_START> { fixture proxy proxy = ( fixture proxy ) broad phase . get user data ( node id ) ; return callback . report fixture ( proxy . fixture ) ; } <SENTENCE_END/>

(Copy Probability: 75.4%)

<SENTENCE_START> { fixture proxy proxy = ( fixture proxy ) broad phase . get user data ( node id ) ; return callback . report fixture ( proxy . fixture ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { fixture proxy proxy = ( fixture proxy ) broad phase . get user data ( node id ) ; return callback . report fixture ( proxy . fixture ) ; } <SENTENCE_END/>

(Copy Probability: 23.8%)

<SENTENCE_START> { fixture proxy proxy = ( fixture proxy ) broad phase . get user data ( node id ) ; return callback . report fixture ( proxy . fixture ) ; } <SENTENCE_END/>


Original Name raycast,callback

raycast

<SENTENCE_START> { object user data = broad phase . get user data ( node id ) ; fixture proxy proxy = ( fixture proxy ) user data ; fixture fixture = proxy . fixture ; int index = proxy . child index ; boolean hit = fixture . raycast ( output , input , index ) ; if ( hit ) { float fraction = output . fraction ; temp . set ( input . p 2 ) . mul local ( fraction ) ; point . set ( input . p 1 ) . mul local ( 1 - fraction ) . add local ( temp ) ; return callback . report fixture ( fixture , point , output . normal , fraction ) ; } return input . max fraction ; } <SENTENCE_END/>

(Copy Probability: 5.8%)

<SENTENCE_START> { object user data = broad phase . get user data ( node id ) ; fixture proxy proxy = ( fixture proxy ) user data ; fixture fixture = proxy . fixture ; int index = proxy . child index ; boolean hit = fixture . raycast ( output , input , index ) ; if ( hit ) { float fraction = output . fraction ; temp . set ( input . p 2 ) . mul local ( fraction ) ; point . set ( input . p 1 ) . mul local ( 1 - fraction ) . add local ( temp ) ; return callback . report fixture ( fixture , point , output . normal , fraction ) ; } return input . max fraction ; } <SENTENCE_END/>

callback

<SENTENCE_START> { object user data = broad phase . get user data ( node id ) ; fixture proxy proxy = ( fixture proxy ) user data ; fixture fixture = proxy . fixture ; int index = proxy . child index ; boolean hit = fixture . raycast ( output , input , index ) ; if ( hit ) { float fraction = output . fraction ; temp . set ( input . p 2 ) . mul local ( fraction ) ; point . set ( input . p 1 ) . mul local ( 1 - fraction ) . add local ( temp ) ; return callback . report fixture ( fixture , point , output . normal , fraction ) ; } return input . max fraction ; } <SENTENCE_END/>

(Copy Probability: 36.6%)

<SENTENCE_START> { object user data = broad phase . get user data ( node id ) ; fixture proxy proxy = ( fixture proxy ) user data ; fixture fixture = proxy . fixture ; int index = proxy . child index ; boolean hit = fixture . raycast ( output , input , index ) ; if ( hit ) { float fraction = output . fraction ; temp . set ( input . p 2 ) . mul local ( fraction ) ; point . set ( input . p 1 ) . mul local ( 1 - fraction ) . add local ( temp ) ; return callback . report fixture ( fixture , point , output . normal , fraction ) ; } return input . max fraction ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { object user data = broad phase . get user data ( node id ) ; fixture proxy proxy = ( fixture proxy ) user data ; fixture fixture = proxy . fixture ; int index = proxy . child index ; boolean hit = fixture . raycast ( output , input , index ) ; if ( hit ) { float fraction = output . fraction ; temp . set ( input . p 2 ) . mul local ( fraction ) ; point . set ( input . p 1 ) . mul local ( 1 - fraction ) . add local ( temp ) ; return callback . report fixture ( fixture , point , output . normal , fraction ) ; } return input . max fraction ; } <SENTENCE_END/>

(Copy Probability: 10.8%)

<SENTENCE_START> { object user data = broad phase . get user data ( node id ) ; fixture proxy proxy = ( fixture proxy ) user data ; fixture fixture = proxy . fixture ; int index = proxy . child index ; boolean hit = fixture . raycast ( output , input , index ) ; if ( hit ) { float fraction = output . fraction ; temp . set ( input . p 2 ) . mul local ( fraction ) ; point . set ( input . p 1 ) . mul local ( 1 - fraction ) . add local ( temp ) ; return callback . report fixture ( fixture , point , output . normal , fraction ) ; } return input . max fraction ; } <SENTENCE_END/>


Original Name begin

begin

<SENTENCE_START> { start = target . get rotation ( ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { start = target . get rotation ( ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { start = target . get rotation ( ) ; } <SENTENCE_END/>

(Copy Probability: 2.8%)

<SENTENCE_START> { start = target . get rotation ( ) ; } <SENTENCE_END/>


Original Name update

update

<SENTENCE_START> { target . set rotation ( start + ( end - start ) * percent ) ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { target . set rotation ( start + ( end - start ) * percent ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { target . set rotation ( start + ( end - start ) * percent ) ; } <SENTENCE_END/>

(Copy Probability: 3.3%)

<SENTENCE_START> { target . set rotation ( start + ( end - start ) * percent ) ; } <SENTENCE_END/>


Original Name get,rotation

get

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

(Copy Probability: 0.3%)

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

rotation

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

(Copy Probability: 17.3%)

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

%END%

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

(Copy Probability: 0.4%)

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


Original Name set,rotation

set

<SENTENCE_START> { this . end = rotation ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { this . end = rotation ; } <SENTENCE_END/>

rotation

<SENTENCE_START> { this . end = rotation ; } <SENTENCE_END/>

(Copy Probability: 64.2%)

<SENTENCE_START> { this . end = rotation ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { this . end = rotation ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { this . end = rotation ; } <SENTENCE_END/>


Original Name get,default,vertex,shader

get

<SENTENCE_START> { if ( default vertex shader == null ) default vertex shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.vertex.glsl" ) . read string ( ) ; return default vertex shader ; } <SENTENCE_END/>

(Copy Probability: 3.4%)

<SENTENCE_START> { if ( default vertex shader == null ) default vertex shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.vertex.glsl" ) . read string ( ) ; return default vertex shader ; } <SENTENCE_END/>

default

<SENTENCE_START> { if ( default vertex shader == null ) default vertex shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.vertex.glsl" ) . read string ( ) ; return default vertex shader ; } <SENTENCE_END/>

(Copy Probability: 97.2%)

<SENTENCE_START> { if ( default vertex shader == null ) default vertex shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.vertex.glsl" ) . read string ( ) ; return default vertex shader ; } <SENTENCE_END/>

vertex

<SENTENCE_START> { if ( default vertex shader == null ) default vertex shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.vertex.glsl" ) . read string ( ) ; return default vertex shader ; } <SENTENCE_END/>

(Copy Probability: 99.0%)

<SENTENCE_START> { if ( default vertex shader == null ) default vertex shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.vertex.glsl" ) . read string ( ) ; return default vertex shader ; } <SENTENCE_END/>

shader

<SENTENCE_START> { if ( default vertex shader == null ) default vertex shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.vertex.glsl" ) . read string ( ) ; return default vertex shader ; } <SENTENCE_END/>

(Copy Probability: 74.2%)

<SENTENCE_START> { if ( default vertex shader == null ) default vertex shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.vertex.glsl" ) . read string ( ) ; return default vertex shader ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { if ( default vertex shader == null ) default vertex shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.vertex.glsl" ) . read string ( ) ; return default vertex shader ; } <SENTENCE_END/>

(Copy Probability: 5.3%)

<SENTENCE_START> { if ( default vertex shader == null ) default vertex shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.vertex.glsl" ) . read string ( ) ; return default vertex shader ; } <SENTENCE_END/>


Original Name get,default,fragment,shader

get

<SENTENCE_START> { if ( default fragment shader == null ) default fragment shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.fragment.glsl" ) . read string ( ) ; return default fragment shader ; } <SENTENCE_END/>

(Copy Probability: 3.2%)

<SENTENCE_START> { if ( default fragment shader == null ) default fragment shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.fragment.glsl" ) . read string ( ) ; return default fragment shader ; } <SENTENCE_END/>

default

<SENTENCE_START> { if ( default fragment shader == null ) default fragment shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.fragment.glsl" ) . read string ( ) ; return default fragment shader ; } <SENTENCE_END/>

(Copy Probability: 97.5%)

<SENTENCE_START> { if ( default fragment shader == null ) default fragment shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.fragment.glsl" ) . read string ( ) ; return default fragment shader ; } <SENTENCE_END/>

fragment

<SENTENCE_START> { if ( default fragment shader == null ) default fragment shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.fragment.glsl" ) . read string ( ) ; return default fragment shader ; } <SENTENCE_END/>

(Copy Probability: 99.2%)

<SENTENCE_START> { if ( default fragment shader == null ) default fragment shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.fragment.glsl" ) . read string ( ) ; return default fragment shader ; } <SENTENCE_END/>

shader

<SENTENCE_START> { if ( default fragment shader == null ) default fragment shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.fragment.glsl" ) . read string ( ) ; return default fragment shader ; } <SENTENCE_END/>

(Copy Probability: 80.1%)

<SENTENCE_START> { if ( default fragment shader == null ) default fragment shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.fragment.glsl" ) . read string ( ) ; return default fragment shader ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { if ( default fragment shader == null ) default fragment shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.fragment.glsl" ) . read string ( ) ; return default fragment shader ; } <SENTENCE_END/>

(Copy Probability: 5.5%)

<SENTENCE_START> { if ( default fragment shader == null ) default fragment shader = gdx . files . classpath ( "com/badlogic/gdx/tests/g3d/shadows/system/realistic/pass1.fragment.glsl" ) . read string ( ) ; return default fragment shader ; } <SENTENCE_END/>


Original Name add,mesh

add

<SENTENCE_START> { for ( model mesh other : meshes ) { if ( other . id . equals ( mesh . id ) ) { throw new gdx runtime exception ( "Mesh with id '" + other . id + "' already in model" ) ; } } meshes . add ( mesh ) ; } <SENTENCE_END/>

(Copy Probability: 1.9%)

<SENTENCE_START> { for ( model mesh other : meshes ) { if ( other . id . equals ( mesh . id ) ) { throw new gdx runtime exception ( "Mesh with id '" + other . id + "' already in model" ) ; } } meshes . add ( mesh ) ; } <SENTENCE_END/>

mesh

<SENTENCE_START> { for ( model mesh other : meshes ) { if ( other . id . equals ( mesh . id ) ) { throw new gdx runtime exception ( "Mesh with id '" + other . id + "' already in model" ) ; } } meshes . add ( mesh ) ; } <SENTENCE_END/>

(Copy Probability: 7.7%)

<SENTENCE_START> { for ( model mesh other : meshes ) { if ( other . id . equals ( mesh . id ) ) { throw new gdx runtime exception ( "Mesh with id '" + other . id + "' already in model" ) ; } } meshes . add ( mesh ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { for ( model mesh other : meshes ) { if ( other . id . equals ( mesh . id ) ) { throw new gdx runtime exception ( "Mesh with id '" + other . id + "' already in model" ) ; } } meshes . add ( mesh ) ; } <SENTENCE_END/>

(Copy Probability: 4.7%)

<SENTENCE_START> { for ( model mesh other : meshes ) { if ( other . id . equals ( mesh . id ) ) { throw new gdx runtime exception ( "Mesh with id '" + other . id + "' already in model" ) ; } } meshes . add ( mesh ) ; } <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 new,instance

new

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( c , size ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( c , size ) ; } <SENTENCE_END/>

instance

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( c , size ) ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( c , size ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( c , size ) ; } <SENTENCE_END/>

(Copy Probability: 0.7%)

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( c , size ) ; } <SENTENCE_END/>


Original Name get,length

get

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( array ) ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( array ) ; } <SENTENCE_END/>

length

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( array ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( array ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( array ) ; } <SENTENCE_END/>

(Copy Probability: 0.4%)

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( array ) ; } <SENTENCE_END/>


Original Name get

get

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( array , index ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( array , index ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( array , index ) ; } <SENTENCE_END/>

(Copy Probability: 0.6%)

<SENTENCE_START> { return java . lang . reflect . array . %SELF% ( array , index ) ; } <SENTENCE_END/>


Original Name set

set

<SENTENCE_START> { java . lang . reflect . array . %SELF% ( array , index , value ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { java . lang . reflect . array . %SELF% ( array , index , value ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { java . lang . reflect . array . %SELF% ( array , index , value ) ; } <SENTENCE_END/>

(Copy Probability: 0.5%)

<SENTENCE_START> { java . lang . reflect . array . %SELF% ( array , index , value ) ; } <SENTENCE_END/>


Original Name set

set

<SENTENCE_START> { this . x = point . x ; this . y = point . y ; return this ; } <SENTENCE_END/>

(Copy Probability: 1.2%)

<SENTENCE_START> { this . x = point . x ; this . y = point . y ; return this ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { this . x = point . x ; this . y = point . y ; return this ; } <SENTENCE_END/>

(Copy Probability: 11.3%)

<SENTENCE_START> { this . x = point . x ; this . y = point . y ; return this ; } <SENTENCE_END/>


Original Name set

set

<SENTENCE_START> { this . x = x ; this . y = y ; return this ; } <SENTENCE_END/>

(Copy Probability: 0.8%)

<SENTENCE_START> { this . x = x ; this . y = y ; return this ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { this . x = x ; this . y = y ; return this ; } <SENTENCE_END/>

(Copy Probability: 6.8%)

<SENTENCE_START> { this . x = x ; this . y = y ; return this ; } <SENTENCE_END/>


Original Name compute,tag

compute

<SENTENCE_START> { return ( ( ( long ) ( y + y offset ) ) << y shift ) + ( ( ( long ) ( x scale * x ) ) + x offset ) ; } <SENTENCE_END/>

(Copy Probability: 1.7%)

<SENTENCE_START> { return ( ( ( long ) ( y + y offset ) ) << y shift ) + ( ( ( long ) ( x scale * x ) ) + x offset ) ; } <SENTENCE_END/>

tag

<SENTENCE_START> { return ( ( ( long ) ( y + y offset ) ) << y shift ) + ( ( ( long ) ( x scale * x ) ) + x offset ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { return ( ( ( long ) ( y + y offset ) ) << y shift ) + ( ( ( long ) ( x scale * x ) ) + x offset ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return ( ( ( long ) ( y + y offset ) ) << y shift ) + ( ( ( long ) ( x scale * x ) ) + x offset ) ; } <SENTENCE_END/>

(Copy Probability: 1.8%)

<SENTENCE_START> { return ( ( ( long ) ( y + y offset ) ) << y shift ) + ( ( ( long ) ( x scale * x ) ) + x offset ) ; } <SENTENCE_END/>


Original Name compute,relative,tag

compute

<SENTENCE_START> { return tag + ( y << y shift ) + ( x << x shift ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { return tag + ( y << y shift ) + ( x << x shift ) ; } <SENTENCE_END/>

relative

<SENTENCE_START> { return tag + ( y << y shift ) + ( x << x shift ) ; } <SENTENCE_END/>

(Copy Probability: 1.4%)

<SENTENCE_START> { return tag + ( y << y shift ) + ( x << x shift ) ; } <SENTENCE_END/>

tag

<SENTENCE_START> { return tag + ( y << y shift ) + ( x << x shift ) ; } <SENTENCE_END/>

(Copy Probability: 1.0%)

<SENTENCE_START> { return tag + ( y << y shift ) + ( x << x shift ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return tag + ( y << y shift ) + ( x << x shift ) ; } <SENTENCE_END/>

(Copy Probability: 1.9%)

<SENTENCE_START> { return tag + ( y << y shift ) + ( x << x shift ) ; } <SENTENCE_END/>


Original Name limit,capacity

limit

<SENTENCE_START> { return max count != 0 && capacity > max count ? max count : capacity ; } <SENTENCE_END/>

(Copy Probability: 1.1%)

<SENTENCE_START> { return max count != 0 && capacity > max count ? max count : capacity ; } <SENTENCE_END/>

capacity

<SENTENCE_START> { return max count != 0 && capacity > max count ? max count : capacity ; } <SENTENCE_END/>

(Copy Probability: 75.9%)

<SENTENCE_START> { return max count != 0 && capacity > max count ? max count : capacity ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { return max count != 0 && capacity > max count ? max count : capacity ; } <SENTENCE_END/>

(Copy Probability: 41.3%)

<SENTENCE_START> { return max count != 0 && capacity > max count ? max count : capacity ; } <SENTENCE_END/>


Original Name create,particle

create

<SENTENCE_START> { if ( m count >= m internal allocated capacity ) { int capacity = m count != 0 ? 2 * m count : settings . min particle buffer capacity ; capacity = limit capacity ( capacity , m max count ) ; capacity = limit capacity ( capacity , m flags buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m position buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m velocity buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m color buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m user data buffer . user supplied capacity ) ; if ( m internal allocated capacity < capacity ) { m flags buffer . data = reallocate buffer ( m flags buffer , m internal allocated capacity , capacity , false ) ; m position buffer . data = reallocate buffer ( m position buffer , m internal allocated capacity , capacity , false ) ; m velocity buffer . data = reallocate buffer ( m velocity buffer , m internal allocated capacity , capacity , false ) ; m accumulation buffer = buffer utils . reallocate buffer ( m accumulation buffer , 0 , m internal allocated capacity , capacity , false ) ; m accumulation 2 buffer = buffer utils . reallocate buffer ( vec 2 . class , m accumulation 2 buffer , 0 , m internal allocated capacity , capacity , true ) ; m depth buffer = buffer utils . reallocate buffer ( m depth buffer , 0 , m internal allocated capacity , capacity , true ) ; m color buffer . data = reallocate buffer ( m color buffer , m internal allocated capacity , capacity , true ) ; m group buffer = buffer utils . reallocate buffer ( particle group . class , m group buffer , 0 , m internal allocated capacity , capacity , false ) ; m user data buffer . data = reallocate buffer ( m user data buffer , m internal allocated capacity , capacity , true ) ; m internal allocated capacity = capacity ; } } if ( m count >= m internal allocated capacity ) { return settings . invalid particle index ; } int index = m count ++ ; m flags buffer . data [ index ] = def . flags ; m position buffer . data [ index ] . set ( def . position ) ; m velocity buffer . data [ index ] . set ( def . velocity ) ; m group buffer [ index ] = null ; if ( m depth buffer != null ) { m depth buffer [ index ] = 0 ; } if ( m color buffer . data != null || def . color != null ) { m color buffer . data = request particle buffer ( m color buffer . data class , m color buffer . data ) ; m color buffer . data [ index ] . set ( def . color ) ; } if ( m user data buffer . data != null || def . user data != null ) { m user data buffer . data = request particle buffer ( m user data buffer . data class , m user data buffer . data ) ; m user data buffer . data [ index ] = def . user data ; } if ( m proxy count >= m proxy capacity ) { int old capacity = m proxy capacity ; int new capacity = m proxy count != 0 ? 2 * m proxy count : settings . min particle buffer capacity ; m proxy buffer = buffer utils . reallocate buffer ( proxy . class , m proxy buffer , old capacity , new capacity ) ; m proxy capacity = new capacity ; } m proxy buffer [ m proxy count ++ ] . index = index ; return index ; } <SENTENCE_END/>

(Copy Probability: 3.9%)

<SENTENCE_START> { if ( m count >= m internal allocated capacity ) { int capacity = m count != 0 ? 2 * m count : settings . min particle buffer capacity ; capacity = limit capacity ( capacity , m max count ) ; capacity = limit capacity ( capacity , m flags buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m position buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m velocity buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m color buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m user data buffer . user supplied capacity ) ; if ( m internal allocated capacity < capacity ) { m flags buffer . data = reallocate buffer ( m flags buffer , m internal allocated capacity , capacity , false ) ; m position buffer . data = reallocate buffer ( m position buffer , m internal allocated capacity , capacity , false ) ; m velocity buffer . data = reallocate buffer ( m velocity buffer , m internal allocated capacity , capacity , false ) ; m accumulation buffer = buffer utils . reallocate buffer ( m accumulation buffer , 0 , m internal allocated capacity , capacity , false ) ; m accumulation 2 buffer = buffer utils . reallocate buffer ( vec 2 . class , m accumulation 2 buffer , 0 , m internal allocated capacity , capacity , true ) ; m depth buffer = buffer utils . reallocate buffer ( m depth buffer , 0 , m internal allocated capacity , capacity , true ) ; m color buffer . data = reallocate buffer ( m color buffer , m internal allocated capacity , capacity , true ) ; m group buffer = buffer utils . reallocate buffer ( particle group . class , m group buffer , 0 , m internal allocated capacity , capacity , false ) ; m user data buffer . data = reallocate buffer ( m user data buffer , m internal allocated capacity , capacity , true ) ; m internal allocated capacity = capacity ; } } if ( m count >= m internal allocated capacity ) { return settings . invalid particle index ; } int index = m count ++ ; m flags buffer . data [ index ] = def . flags ; m position buffer . data [ index ] . set ( def . position ) ; m velocity buffer . data [ index ] . set ( def . velocity ) ; m group buffer [ index ] = null ; if ( m depth buffer != null ) { m depth buffer [ index ] = 0 ; } if ( m color buffer . data != null || def . color != null ) { m color buffer . data = request particle buffer ( m color buffer . data class , m color buffer . data ) ; m color buffer . data [ index ] . set ( def . color ) ; } if ( m user data buffer . data != null || def . user data != null ) { m user data buffer . data = request particle buffer ( m user data buffer . data class , m user data buffer . data ) ; m user data buffer . data [ index ] = def . user data ; } if ( m proxy count >= m proxy capacity ) { int old capacity = m proxy capacity ; int new capacity = m proxy count != 0 ? 2 * m proxy count : settings . min particle buffer capacity ; m proxy buffer = buffer utils . reallocate buffer ( proxy . class , m proxy buffer , old capacity , new capacity ) ; m proxy capacity = new capacity ; } m proxy buffer [ m proxy count ++ ] . index = index ; return index ; } <SENTENCE_END/>

particle

<SENTENCE_START> { if ( m count >= m internal allocated capacity ) { int capacity = m count != 0 ? 2 * m count : settings . min particle buffer capacity ; capacity = limit capacity ( capacity , m max count ) ; capacity = limit capacity ( capacity , m flags buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m position buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m velocity buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m color buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m user data buffer . user supplied capacity ) ; if ( m internal allocated capacity < capacity ) { m flags buffer . data = reallocate buffer ( m flags buffer , m internal allocated capacity , capacity , false ) ; m position buffer . data = reallocate buffer ( m position buffer , m internal allocated capacity , capacity , false ) ; m velocity buffer . data = reallocate buffer ( m velocity buffer , m internal allocated capacity , capacity , false ) ; m accumulation buffer = buffer utils . reallocate buffer ( m accumulation buffer , 0 , m internal allocated capacity , capacity , false ) ; m accumulation 2 buffer = buffer utils . reallocate buffer ( vec 2 . class , m accumulation 2 buffer , 0 , m internal allocated capacity , capacity , true ) ; m depth buffer = buffer utils . reallocate buffer ( m depth buffer , 0 , m internal allocated capacity , capacity , true ) ; m color buffer . data = reallocate buffer ( m color buffer , m internal allocated capacity , capacity , true ) ; m group buffer = buffer utils . reallocate buffer ( particle group . class , m group buffer , 0 , m internal allocated capacity , capacity , false ) ; m user data buffer . data = reallocate buffer ( m user data buffer , m internal allocated capacity , capacity , true ) ; m internal allocated capacity = capacity ; } } if ( m count >= m internal allocated capacity ) { return settings . invalid particle index ; } int index = m count ++ ; m flags buffer . data [ index ] = def . flags ; m position buffer . data [ index ] . set ( def . position ) ; m velocity buffer . data [ index ] . set ( def . velocity ) ; m group buffer [ index ] = null ; if ( m depth buffer != null ) { m depth buffer [ index ] = 0 ; } if ( m color buffer . data != null || def . color != null ) { m color buffer . data = request particle buffer ( m color buffer . data class , m color buffer . data ) ; m color buffer . data [ index ] . set ( def . color ) ; } if ( m user data buffer . data != null || def . user data != null ) { m user data buffer . data = request particle buffer ( m user data buffer . data class , m user data buffer . data ) ; m user data buffer . data [ index ] = def . user data ; } if ( m proxy count >= m proxy capacity ) { int old capacity = m proxy capacity ; int new capacity = m proxy count != 0 ? 2 * m proxy count : settings . min particle buffer capacity ; m proxy buffer = buffer utils . reallocate buffer ( proxy . class , m proxy buffer , old capacity , new capacity ) ; m proxy capacity = new capacity ; } m proxy buffer [ m proxy count ++ ] . index = index ; return index ; } <SENTENCE_END/>

(Copy Probability: 17.8%)

<SENTENCE_START> { if ( m count >= m internal allocated capacity ) { int capacity = m count != 0 ? 2 * m count : settings . min particle buffer capacity ; capacity = limit capacity ( capacity , m max count ) ; capacity = limit capacity ( capacity , m flags buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m position buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m velocity buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m color buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m user data buffer . user supplied capacity ) ; if ( m internal allocated capacity < capacity ) { m flags buffer . data = reallocate buffer ( m flags buffer , m internal allocated capacity , capacity , false ) ; m position buffer . data = reallocate buffer ( m position buffer , m internal allocated capacity , capacity , false ) ; m velocity buffer . data = reallocate buffer ( m velocity buffer , m internal allocated capacity , capacity , false ) ; m accumulation buffer = buffer utils . reallocate buffer ( m accumulation buffer , 0 , m internal allocated capacity , capacity , false ) ; m accumulation 2 buffer = buffer utils . reallocate buffer ( vec 2 . class , m accumulation 2 buffer , 0 , m internal allocated capacity , capacity , true ) ; m depth buffer = buffer utils . reallocate buffer ( m depth buffer , 0 , m internal allocated capacity , capacity , true ) ; m color buffer . data = reallocate buffer ( m color buffer , m internal allocated capacity , capacity , true ) ; m group buffer = buffer utils . reallocate buffer ( particle group . class , m group buffer , 0 , m internal allocated capacity , capacity , false ) ; m user data buffer . data = reallocate buffer ( m user data buffer , m internal allocated capacity , capacity , true ) ; m internal allocated capacity = capacity ; } } if ( m count >= m internal allocated capacity ) { return settings . invalid particle index ; } int index = m count ++ ; m flags buffer . data [ index ] = def . flags ; m position buffer . data [ index ] . set ( def . position ) ; m velocity buffer . data [ index ] . set ( def . velocity ) ; m group buffer [ index ] = null ; if ( m depth buffer != null ) { m depth buffer [ index ] = 0 ; } if ( m color buffer . data != null || def . color != null ) { m color buffer . data = request particle buffer ( m color buffer . data class , m color buffer . data ) ; m color buffer . data [ index ] . set ( def . color ) ; } if ( m user data buffer . data != null || def . user data != null ) { m user data buffer . data = request particle buffer ( m user data buffer . data class , m user data buffer . data ) ; m user data buffer . data [ index ] = def . user data ; } if ( m proxy count >= m proxy capacity ) { int old capacity = m proxy capacity ; int new capacity = m proxy count != 0 ? 2 * m proxy count : settings . min particle buffer capacity ; m proxy buffer = buffer utils . reallocate buffer ( proxy . class , m proxy buffer , old capacity , new capacity ) ; m proxy capacity = new capacity ; } m proxy buffer [ m proxy count ++ ] . index = index ; return index ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { if ( m count >= m internal allocated capacity ) { int capacity = m count != 0 ? 2 * m count : settings . min particle buffer capacity ; capacity = limit capacity ( capacity , m max count ) ; capacity = limit capacity ( capacity , m flags buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m position buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m velocity buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m color buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m user data buffer . user supplied capacity ) ; if ( m internal allocated capacity < capacity ) { m flags buffer . data = reallocate buffer ( m flags buffer , m internal allocated capacity , capacity , false ) ; m position buffer . data = reallocate buffer ( m position buffer , m internal allocated capacity , capacity , false ) ; m velocity buffer . data = reallocate buffer ( m velocity buffer , m internal allocated capacity , capacity , false ) ; m accumulation buffer = buffer utils . reallocate buffer ( m accumulation buffer , 0 , m internal allocated capacity , capacity , false ) ; m accumulation 2 buffer = buffer utils . reallocate buffer ( vec 2 . class , m accumulation 2 buffer , 0 , m internal allocated capacity , capacity , true ) ; m depth buffer = buffer utils . reallocate buffer ( m depth buffer , 0 , m internal allocated capacity , capacity , true ) ; m color buffer . data = reallocate buffer ( m color buffer , m internal allocated capacity , capacity , true ) ; m group buffer = buffer utils . reallocate buffer ( particle group . class , m group buffer , 0 , m internal allocated capacity , capacity , false ) ; m user data buffer . data = reallocate buffer ( m user data buffer , m internal allocated capacity , capacity , true ) ; m internal allocated capacity = capacity ; } } if ( m count >= m internal allocated capacity ) { return settings . invalid particle index ; } int index = m count ++ ; m flags buffer . data [ index ] = def . flags ; m position buffer . data [ index ] . set ( def . position ) ; m velocity buffer . data [ index ] . set ( def . velocity ) ; m group buffer [ index ] = null ; if ( m depth buffer != null ) { m depth buffer [ index ] = 0 ; } if ( m color buffer . data != null || def . color != null ) { m color buffer . data = request particle buffer ( m color buffer . data class , m color buffer . data ) ; m color buffer . data [ index ] . set ( def . color ) ; } if ( m user data buffer . data != null || def . user data != null ) { m user data buffer . data = request particle buffer ( m user data buffer . data class , m user data buffer . data ) ; m user data buffer . data [ index ] = def . user data ; } if ( m proxy count >= m proxy capacity ) { int old capacity = m proxy capacity ; int new capacity = m proxy count != 0 ? 2 * m proxy count : settings . min particle buffer capacity ; m proxy buffer = buffer utils . reallocate buffer ( proxy . class , m proxy buffer , old capacity , new capacity ) ; m proxy capacity = new capacity ; } m proxy buffer [ m proxy count ++ ] . index = index ; return index ; } <SENTENCE_END/>

(Copy Probability: 16.9%)

<SENTENCE_START> { if ( m count >= m internal allocated capacity ) { int capacity = m count != 0 ? 2 * m count : settings . min particle buffer capacity ; capacity = limit capacity ( capacity , m max count ) ; capacity = limit capacity ( capacity , m flags buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m position buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m velocity buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m color buffer . user supplied capacity ) ; capacity = limit capacity ( capacity , m user data buffer . user supplied capacity ) ; if ( m internal allocated capacity < capacity ) { m flags buffer . data = reallocate buffer ( m flags buffer , m internal allocated capacity , capacity , false ) ; m position buffer . data = reallocate buffer ( m position buffer , m internal allocated capacity , capacity , false ) ; m velocity buffer . data = reallocate buffer ( m velocity buffer , m internal allocated capacity , capacity , false ) ; m accumulation buffer = buffer utils . reallocate buffer ( m accumulation buffer , 0 , m internal allocated capacity , capacity , false ) ; m accumulation 2 buffer = buffer utils . reallocate buffer ( vec 2 . class , m accumulation 2 buffer , 0 , m internal allocated capacity , capacity , true ) ; m depth buffer = buffer utils . reallocate buffer ( m depth buffer , 0 , m internal allocated capacity , capacity , true ) ; m color buffer . data = reallocate buffer ( m color buffer , m internal allocated capacity , capacity , true ) ; m group buffer = buffer utils . reallocate buffer ( particle group . class , m group buffer , 0 , m internal allocated capacity , capacity , false ) ; m user data buffer . data = reallocate buffer ( m user data buffer , m internal allocated capacity , capacity , true ) ; m internal allocated capacity = capacity ; } } if ( m count >= m internal allocated capacity ) { return settings . invalid particle index ; } int index = m count ++ ; m flags buffer . data [ index ] = def . flags ; m position buffer . data [ index ] . set ( def . position ) ; m velocity buffer . data [ index ] . set ( def . velocity ) ; m group buffer [ index ] = null ; if ( m depth buffer != null ) { m depth buffer [ index ] = 0 ; } if ( m color buffer . data != null || def . color != null ) { m color buffer . data = request particle buffer ( m color buffer . data class , m color buffer . data ) ; m color buffer . data [ index ] . set ( def . color ) ; } if ( m user data buffer . data != null || def . user data != null ) { m user data buffer . data = request particle buffer ( m user data buffer . data class , m user data buffer . data ) ; m user data buffer . data [ index ] = def . user data ; } if ( m proxy count >= m proxy capacity ) { int old capacity = m proxy capacity ; int new capacity = m proxy count != 0 ? 2 * m proxy count : settings . min particle buffer capacity ; m proxy buffer = buffer utils . reallocate buffer ( proxy . class , m proxy buffer , old capacity , new capacity ) ; m proxy capacity = new capacity ; } m proxy buffer [ m proxy count ++ ] . index = index ; return index ; } <SENTENCE_END/>


Original Name destroy,particle

destroy

<SENTENCE_START> { int flags = particle type . b 2 zombie particle ; if ( call destruction listener ) { flags |= particle type . b 2 destruction listener ; } m flags buffer . data [ index ] |= flags ; } <SENTENCE_END/>

(Copy Probability: 2.2%)

<SENTENCE_START> { int flags = particle type . b 2 zombie particle ; if ( call destruction listener ) { flags |= particle type . b 2 destruction listener ; } m flags buffer . data [ index ] |= flags ; } <SENTENCE_END/>

particle

<SENTENCE_START> { int flags = particle type . b 2 zombie particle ; if ( call destruction listener ) { flags |= particle type . b 2 destruction listener ; } m flags buffer . data [ index ] |= flags ; } <SENTENCE_END/>

(Copy Probability: 23.5%)

<SENTENCE_START> { int flags = particle type . b 2 zombie particle ; if ( call destruction listener ) { flags |= particle type . b 2 destruction listener ; } m flags buffer . data [ index ] |= flags ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { int flags = particle type . b 2 zombie particle ; if ( call destruction listener ) { flags |= particle type . b 2 destruction listener ; } m flags buffer . data [ index ] |= flags ; } <SENTENCE_END/>

(Copy Probability: 6.3%)

<SENTENCE_START> { int flags = particle type . b 2 zombie particle ; if ( call destruction listener ) { flags |= particle type . b 2 destruction listener ; } m flags buffer . data [ index ] |= flags ; } <SENTENCE_END/>


Original Name destroy,particles,in,shape

destroy

<SENTENCE_START> { dpcallback . init ( this , shape , xf , call destruction listener ) ; shape . compute aabb ( temp , xf , 0 ) ; m world . query aabb ( dpcallback , temp ) ; return dpcallback . destroyed ; } <SENTENCE_END/>

(Copy Probability: 6.6%)

<SENTENCE_START> { dpcallback . init ( this , shape , xf , call destruction listener ) ; shape . compute aabb ( temp , xf , 0 ) ; m world . query aabb ( dpcallback , temp ) ; return dpcallback . destroyed ; } <SENTENCE_END/>

particles

<SENTENCE_START> { dpcallback . init ( this , shape , xf , call destruction listener ) ; shape . compute aabb ( temp , xf , 0 ) ; m world . query aabb ( dpcallback , temp ) ; return dpcallback . destroyed ; } <SENTENCE_END/>

(Copy Probability: 56.8%)

<SENTENCE_START> { dpcallback . init ( this , shape , xf , call destruction listener ) ; shape . compute aabb ( temp , xf , 0 ) ; m world . query aabb ( dpcallback , temp ) ; return dpcallback . destroyed ; } <SENTENCE_END/>

in

<SENTENCE_START> { dpcallback . init ( this , shape , xf , call destruction listener ) ; shape . compute aabb ( temp , xf , 0 ) ; m world . query aabb ( dpcallback , temp ) ; return dpcallback . destroyed ; } <SENTENCE_END/>

(Copy Probability: 15.7%)

<SENTENCE_START> { dpcallback . init ( this , shape , xf , call destruction listener ) ; shape . compute aabb ( temp , xf , 0 ) ; m world . query aabb ( dpcallback , temp ) ; return dpcallback . destroyed ; } <SENTENCE_END/>

shape

<SENTENCE_START> { dpcallback . init ( this , shape , xf , call destruction listener ) ; shape . compute aabb ( temp , xf , 0 ) ; m world . query aabb ( dpcallback , temp ) ; return dpcallback . destroyed ; } <SENTENCE_END/>

(Copy Probability: 5.0%)

<SENTENCE_START> { dpcallback . init ( this , shape , xf , call destruction listener ) ; shape . compute aabb ( temp , xf , 0 ) ; m world . query aabb ( dpcallback , temp ) ; return dpcallback . destroyed ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { dpcallback . init ( this , shape , xf , call destruction listener ) ; shape . compute aabb ( temp , xf , 0 ) ; m world . query aabb ( dpcallback , temp ) ; return dpcallback . destroyed ; } <SENTENCE_END/>

(Copy Probability: 7.7%)

<SENTENCE_START> { dpcallback . init ( this , shape , xf , call destruction listener ) ; shape . compute aabb ( temp , xf , 0 ) ; m world . query aabb ( dpcallback , temp ) ; return dpcallback . destroyed ; } <SENTENCE_END/>


Original Name destroy,particles,in,group

destroy

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { destroy particle ( i , call destruction listener ) ; } } <SENTENCE_END/>

(Copy Probability: 3.1%)

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { destroy particle ( i , call destruction listener ) ; } } <SENTENCE_END/>

particles

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { destroy particle ( i , call destruction listener ) ; } } <SENTENCE_END/>

(Copy Probability: 45.2%)

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { destroy particle ( i , call destruction listener ) ; } } <SENTENCE_END/>

in

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { destroy particle ( i , call destruction listener ) ; } } <SENTENCE_END/>

(Copy Probability: 8.6%)

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { destroy particle ( i , call destruction listener ) ; } } <SENTENCE_END/>

group

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { destroy particle ( i , call destruction listener ) ; } } <SENTENCE_END/>

(Copy Probability: 4.6%)

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { destroy particle ( i , call destruction listener ) ; } } <SENTENCE_END/>

%END%

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { destroy particle ( i , call destruction listener ) ; } } <SENTENCE_END/>

(Copy Probability: 7.7%)

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { destroy particle ( i , call destruction listener ) ; } } <SENTENCE_END/>


Original Name create,particle,group

create

<SENTENCE_START> { float stride = get particle stride ( ) ; final transform identity = temp transform ; identity . set identity ( ) ; transform transform = temp transform 2 ; transform . set identity ( ) ; int first index = m count ; if ( group def . shape != null ) { final particle def particle def = temp particle def ; particle def . flags = group def . flags ; particle def . color = group def . color ; particle def . user data = group def . user data ; shape shape = group def . shape ; transform . set ( group def . position , group def . angle ) ; aabb aabb = temp ; int child count = shape . get child count ( ) ; for ( int child index = 0 ; child index < child count ; child index ++ ) { if ( child index == 0 ) { shape . compute aabb ( aabb , identity , child index ) ; } else { aabb child aabb = temp 2 ; shape . compute aabb ( child aabb , identity , child index ) ; aabb . combine ( child aabb ) ; } } final float upper bound y = aabb . upper bound . y ; final float upper bound x = aabb . upper bound . x ; for ( float y = math utils . floor ( aabb . lower bound . y / stride ) * stride ; y < upper bound y ; y += stride ) { for ( float x = math utils . floor ( aabb . lower bound . x / stride ) * stride ; x < upper bound x ; x += stride ) { vec 2 p = temp vec ; p . x = x ; p . y = y ; if ( shape . test point ( identity , p ) ) { transform . mul to out ( transform , p , p ) ; particle def . position . x = p . x ; particle def . position . y = p . y ; p . sub local ( group def . position ) ; vec 2 . cross to out unsafe ( group def . angular velocity , p , particle def . velocity ) ; particle def . velocity . add local ( group def . linear velocity ) ; create particle ( particle def ) ; } } } } int last index = m count ; particle group group = new particle group ( ) ; group . m system = this ; group . m first index = first index ; group . m last index = last index ; group . m group flags = group def . group flags ; group . m strength = group def . strength ; group . m user data = group def . user data ; group . m transform . set ( transform ) ; group . m destroy automatically = group def . destroy automatically ; group . m prev = null ; group . m next = m group list ; if ( m group list != null ) { m group list . m prev = group ; } m group list = group ; ++ m group count ; for ( int i = first index ; i < last index ; i ++ ) { m group buffer [ i ] = group ; } update contacts ( true ) ; if ( ( group def . flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( first index <= a && b < last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = group def . strength ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( group def . flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( last index - first index ) ; for ( int i = first index ; i < last index ; i ++ ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } diagram . generate ( stride / 2 ) ; create particle group callback . system = this ; create particle group callback . def = group def ; create particle group callback . first index = first index ; diagram . get nodes ( create particle group callback ) ; } if ( ( group def . group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group ) ; } return group ; } <SENTENCE_END/>

(Copy Probability: 3.7%)

<SENTENCE_START> { float stride = get particle stride ( ) ; final transform identity = temp transform ; identity . set identity ( ) ; transform transform = temp transform 2 ; transform . set identity ( ) ; int first index = m count ; if ( group def . shape != null ) { final particle def particle def = temp particle def ; particle def . flags = group def . flags ; particle def . color = group def . color ; particle def . user data = group def . user data ; shape shape = group def . shape ; transform . set ( group def . position , group def . angle ) ; aabb aabb = temp ; int child count = shape . get child count ( ) ; for ( int child index = 0 ; child index < child count ; child index ++ ) { if ( child index == 0 ) { shape . compute aabb ( aabb , identity , child index ) ; } else { aabb child aabb = temp 2 ; shape . compute aabb ( child aabb , identity , child index ) ; aabb . combine ( child aabb ) ; } } final float upper bound y = aabb . upper bound . y ; final float upper bound x = aabb . upper bound . x ; for ( float y = math utils . floor ( aabb . lower bound . y / stride ) * stride ; y < upper bound y ; y += stride ) { for ( float x = math utils . floor ( aabb . lower bound . x / stride ) * stride ; x < upper bound x ; x += stride ) { vec 2 p = temp vec ; p . x = x ; p . y = y ; if ( shape . test point ( identity , p ) ) { transform . mul to out ( transform , p , p ) ; particle def . position . x = p . x ; particle def . position . y = p . y ; p . sub local ( group def . position ) ; vec 2 . cross to out unsafe ( group def . angular velocity , p , particle def . velocity ) ; particle def . velocity . add local ( group def . linear velocity ) ; create particle ( particle def ) ; } } } } int last index = m count ; particle group group = new particle group ( ) ; group . m system = this ; group . m first index = first index ; group . m last index = last index ; group . m group flags = group def . group flags ; group . m strength = group def . strength ; group . m user data = group def . user data ; group . m transform . set ( transform ) ; group . m destroy automatically = group def . destroy automatically ; group . m prev = null ; group . m next = m group list ; if ( m group list != null ) { m group list . m prev = group ; } m group list = group ; ++ m group count ; for ( int i = first index ; i < last index ; i ++ ) { m group buffer [ i ] = group ; } update contacts ( true ) ; if ( ( group def . flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( first index <= a && b < last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = group def . strength ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( group def . flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( last index - first index ) ; for ( int i = first index ; i < last index ; i ++ ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } diagram . generate ( stride / 2 ) ; create particle group callback . system = this ; create particle group callback . def = group def ; create particle group callback . first index = first index ; diagram . get nodes ( create particle group callback ) ; } if ( ( group def . group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group ) ; } return group ; } <SENTENCE_END/>

particle

<SENTENCE_START> { float stride = get particle stride ( ) ; final transform identity = temp transform ; identity . set identity ( ) ; transform transform = temp transform 2 ; transform . set identity ( ) ; int first index = m count ; if ( group def . shape != null ) { final particle def particle def = temp particle def ; particle def . flags = group def . flags ; particle def . color = group def . color ; particle def . user data = group def . user data ; shape shape = group def . shape ; transform . set ( group def . position , group def . angle ) ; aabb aabb = temp ; int child count = shape . get child count ( ) ; for ( int child index = 0 ; child index < child count ; child index ++ ) { if ( child index == 0 ) { shape . compute aabb ( aabb , identity , child index ) ; } else { aabb child aabb = temp 2 ; shape . compute aabb ( child aabb , identity , child index ) ; aabb . combine ( child aabb ) ; } } final float upper bound y = aabb . upper bound . y ; final float upper bound x = aabb . upper bound . x ; for ( float y = math utils . floor ( aabb . lower bound . y / stride ) * stride ; y < upper bound y ; y += stride ) { for ( float x = math utils . floor ( aabb . lower bound . x / stride ) * stride ; x < upper bound x ; x += stride ) { vec 2 p = temp vec ; p . x = x ; p . y = y ; if ( shape . test point ( identity , p ) ) { transform . mul to out ( transform , p , p ) ; particle def . position . x = p . x ; particle def . position . y = p . y ; p . sub local ( group def . position ) ; vec 2 . cross to out unsafe ( group def . angular velocity , p , particle def . velocity ) ; particle def . velocity . add local ( group def . linear velocity ) ; create particle ( particle def ) ; } } } } int last index = m count ; particle group group = new particle group ( ) ; group . m system = this ; group . m first index = first index ; group . m last index = last index ; group . m group flags = group def . group flags ; group . m strength = group def . strength ; group . m user data = group def . user data ; group . m transform . set ( transform ) ; group . m destroy automatically = group def . destroy automatically ; group . m prev = null ; group . m next = m group list ; if ( m group list != null ) { m group list . m prev = group ; } m group list = group ; ++ m group count ; for ( int i = first index ; i < last index ; i ++ ) { m group buffer [ i ] = group ; } update contacts ( true ) ; if ( ( group def . flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( first index <= a && b < last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = group def . strength ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( group def . flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( last index - first index ) ; for ( int i = first index ; i < last index ; i ++ ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } diagram . generate ( stride / 2 ) ; create particle group callback . system = this ; create particle group callback . def = group def ; create particle group callback . first index = first index ; diagram . get nodes ( create particle group callback ) ; } if ( ( group def . group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group ) ; } return group ; } <SENTENCE_END/>

(Copy Probability: 12.9%)

<SENTENCE_START> { float stride = get particle stride ( ) ; final transform identity = temp transform ; identity . set identity ( ) ; transform transform = temp transform 2 ; transform . set identity ( ) ; int first index = m count ; if ( group def . shape != null ) { final particle def particle def = temp particle def ; particle def . flags = group def . flags ; particle def . color = group def . color ; particle def . user data = group def . user data ; shape shape = group def . shape ; transform . set ( group def . position , group def . angle ) ; aabb aabb = temp ; int child count = shape . get child count ( ) ; for ( int child index = 0 ; child index < child count ; child index ++ ) { if ( child index == 0 ) { shape . compute aabb ( aabb , identity , child index ) ; } else { aabb child aabb = temp 2 ; shape . compute aabb ( child aabb , identity , child index ) ; aabb . combine ( child aabb ) ; } } final float upper bound y = aabb . upper bound . y ; final float upper bound x = aabb . upper bound . x ; for ( float y = math utils . floor ( aabb . lower bound . y / stride ) * stride ; y < upper bound y ; y += stride ) { for ( float x = math utils . floor ( aabb . lower bound . x / stride ) * stride ; x < upper bound x ; x += stride ) { vec 2 p = temp vec ; p . x = x ; p . y = y ; if ( shape . test point ( identity , p ) ) { transform . mul to out ( transform , p , p ) ; particle def . position . x = p . x ; particle def . position . y = p . y ; p . sub local ( group def . position ) ; vec 2 . cross to out unsafe ( group def . angular velocity , p , particle def . velocity ) ; particle def . velocity . add local ( group def . linear velocity ) ; create particle ( particle def ) ; } } } } int last index = m count ; particle group group = new particle group ( ) ; group . m system = this ; group . m first index = first index ; group . m last index = last index ; group . m group flags = group def . group flags ; group . m strength = group def . strength ; group . m user data = group def . user data ; group . m transform . set ( transform ) ; group . m destroy automatically = group def . destroy automatically ; group . m prev = null ; group . m next = m group list ; if ( m group list != null ) { m group list . m prev = group ; } m group list = group ; ++ m group count ; for ( int i = first index ; i < last index ; i ++ ) { m group buffer [ i ] = group ; } update contacts ( true ) ; if ( ( group def . flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( first index <= a && b < last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = group def . strength ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( group def . flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( last index - first index ) ; for ( int i = first index ; i < last index ; i ++ ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } diagram . generate ( stride / 2 ) ; create particle group callback . system = this ; create particle group callback . def = group def ; create particle group callback . first index = first index ; diagram . get nodes ( create particle group callback ) ; } if ( ( group def . group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group ) ; } return group ; } <SENTENCE_END/>

group

<SENTENCE_START> { float stride = get particle stride ( ) ; final transform identity = temp transform ; identity . set identity ( ) ; transform transform = temp transform 2 ; transform . set identity ( ) ; int first index = m count ; if ( group def . shape != null ) { final particle def particle def = temp particle def ; particle def . flags = group def . flags ; particle def . color = group def . color ; particle def . user data = group def . user data ; shape shape = group def . shape ; transform . set ( group def . position , group def . angle ) ; aabb aabb = temp ; int child count = shape . get child count ( ) ; for ( int child index = 0 ; child index < child count ; child index ++ ) { if ( child index == 0 ) { shape . compute aabb ( aabb , identity , child index ) ; } else { aabb child aabb = temp 2 ; shape . compute aabb ( child aabb , identity , child index ) ; aabb . combine ( child aabb ) ; } } final float upper bound y = aabb . upper bound . y ; final float upper bound x = aabb . upper bound . x ; for ( float y = math utils . floor ( aabb . lower bound . y / stride ) * stride ; y < upper bound y ; y += stride ) { for ( float x = math utils . floor ( aabb . lower bound . x / stride ) * stride ; x < upper bound x ; x += stride ) { vec 2 p = temp vec ; p . x = x ; p . y = y ; if ( shape . test point ( identity , p ) ) { transform . mul to out ( transform , p , p ) ; particle def . position . x = p . x ; particle def . position . y = p . y ; p . sub local ( group def . position ) ; vec 2 . cross to out unsafe ( group def . angular velocity , p , particle def . velocity ) ; particle def . velocity . add local ( group def . linear velocity ) ; create particle ( particle def ) ; } } } } int last index = m count ; particle group group = new particle group ( ) ; group . m system = this ; group . m first index = first index ; group . m last index = last index ; group . m group flags = group def . group flags ; group . m strength = group def . strength ; group . m user data = group def . user data ; group . m transform . set ( transform ) ; group . m destroy automatically = group def . destroy automatically ; group . m prev = null ; group . m next = m group list ; if ( m group list != null ) { m group list . m prev = group ; } m group list = group ; ++ m group count ; for ( int i = first index ; i < last index ; i ++ ) { m group buffer [ i ] = group ; } update contacts ( true ) ; if ( ( group def . flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( first index <= a && b < last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = group def . strength ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( group def . flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( last index - first index ) ; for ( int i = first index ; i < last index ; i ++ ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } diagram . generate ( stride / 2 ) ; create particle group callback . system = this ; create particle group callback . def = group def ; create particle group callback . first index = first index ; diagram . get nodes ( create particle group callback ) ; } if ( ( group def . group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group ) ; } return group ; } <SENTENCE_END/>

(Copy Probability: 9.6%)

<SENTENCE_START> { float stride = get particle stride ( ) ; final transform identity = temp transform ; identity . set identity ( ) ; transform transform = temp transform 2 ; transform . set identity ( ) ; int first index = m count ; if ( group def . shape != null ) { final particle def particle def = temp particle def ; particle def . flags = group def . flags ; particle def . color = group def . color ; particle def . user data = group def . user data ; shape shape = group def . shape ; transform . set ( group def . position , group def . angle ) ; aabb aabb = temp ; int child count = shape . get child count ( ) ; for ( int child index = 0 ; child index < child count ; child index ++ ) { if ( child index == 0 ) { shape . compute aabb ( aabb , identity , child index ) ; } else { aabb child aabb = temp 2 ; shape . compute aabb ( child aabb , identity , child index ) ; aabb . combine ( child aabb ) ; } } final float upper bound y = aabb . upper bound . y ; final float upper bound x = aabb . upper bound . x ; for ( float y = math utils . floor ( aabb . lower bound . y / stride ) * stride ; y < upper bound y ; y += stride ) { for ( float x = math utils . floor ( aabb . lower bound . x / stride ) * stride ; x < upper bound x ; x += stride ) { vec 2 p = temp vec ; p . x = x ; p . y = y ; if ( shape . test point ( identity , p ) ) { transform . mul to out ( transform , p , p ) ; particle def . position . x = p . x ; particle def . position . y = p . y ; p . sub local ( group def . position ) ; vec 2 . cross to out unsafe ( group def . angular velocity , p , particle def . velocity ) ; particle def . velocity . add local ( group def . linear velocity ) ; create particle ( particle def ) ; } } } } int last index = m count ; particle group group = new particle group ( ) ; group . m system = this ; group . m first index = first index ; group . m last index = last index ; group . m group flags = group def . group flags ; group . m strength = group def . strength ; group . m user data = group def . user data ; group . m transform . set ( transform ) ; group . m destroy automatically = group def . destroy automatically ; group . m prev = null ; group . m next = m group list ; if ( m group list != null ) { m group list . m prev = group ; } m group list = group ; ++ m group count ; for ( int i = first index ; i < last index ; i ++ ) { m group buffer [ i ] = group ; } update contacts ( true ) ; if ( ( group def . flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( first index <= a && b < last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = group def . strength ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( group def . flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( last index - first index ) ; for ( int i = first index ; i < last index ; i ++ ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } diagram . generate ( stride / 2 ) ; create particle group callback . system = this ; create particle group callback . def = group def ; create particle group callback . first index = first index ; diagram . get nodes ( create particle group callback ) ; } if ( ( group def . group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group ) ; } return group ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { float stride = get particle stride ( ) ; final transform identity = temp transform ; identity . set identity ( ) ; transform transform = temp transform 2 ; transform . set identity ( ) ; int first index = m count ; if ( group def . shape != null ) { final particle def particle def = temp particle def ; particle def . flags = group def . flags ; particle def . color = group def . color ; particle def . user data = group def . user data ; shape shape = group def . shape ; transform . set ( group def . position , group def . angle ) ; aabb aabb = temp ; int child count = shape . get child count ( ) ; for ( int child index = 0 ; child index < child count ; child index ++ ) { if ( child index == 0 ) { shape . compute aabb ( aabb , identity , child index ) ; } else { aabb child aabb = temp 2 ; shape . compute aabb ( child aabb , identity , child index ) ; aabb . combine ( child aabb ) ; } } final float upper bound y = aabb . upper bound . y ; final float upper bound x = aabb . upper bound . x ; for ( float y = math utils . floor ( aabb . lower bound . y / stride ) * stride ; y < upper bound y ; y += stride ) { for ( float x = math utils . floor ( aabb . lower bound . x / stride ) * stride ; x < upper bound x ; x += stride ) { vec 2 p = temp vec ; p . x = x ; p . y = y ; if ( shape . test point ( identity , p ) ) { transform . mul to out ( transform , p , p ) ; particle def . position . x = p . x ; particle def . position . y = p . y ; p . sub local ( group def . position ) ; vec 2 . cross to out unsafe ( group def . angular velocity , p , particle def . velocity ) ; particle def . velocity . add local ( group def . linear velocity ) ; create particle ( particle def ) ; } } } } int last index = m count ; particle group group = new particle group ( ) ; group . m system = this ; group . m first index = first index ; group . m last index = last index ; group . m group flags = group def . group flags ; group . m strength = group def . strength ; group . m user data = group def . user data ; group . m transform . set ( transform ) ; group . m destroy automatically = group def . destroy automatically ; group . m prev = null ; group . m next = m group list ; if ( m group list != null ) { m group list . m prev = group ; } m group list = group ; ++ m group count ; for ( int i = first index ; i < last index ; i ++ ) { m group buffer [ i ] = group ; } update contacts ( true ) ; if ( ( group def . flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( first index <= a && b < last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = group def . strength ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( group def . flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( last index - first index ) ; for ( int i = first index ; i < last index ; i ++ ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } diagram . generate ( stride / 2 ) ; create particle group callback . system = this ; create particle group callback . def = group def ; create particle group callback . first index = first index ; diagram . get nodes ( create particle group callback ) ; } if ( ( group def . group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group ) ; } return group ; } <SENTENCE_END/>

(Copy Probability: 4.0%)

<SENTENCE_START> { float stride = get particle stride ( ) ; final transform identity = temp transform ; identity . set identity ( ) ; transform transform = temp transform 2 ; transform . set identity ( ) ; int first index = m count ; if ( group def . shape != null ) { final particle def particle def = temp particle def ; particle def . flags = group def . flags ; particle def . color = group def . color ; particle def . user data = group def . user data ; shape shape = group def . shape ; transform . set ( group def . position , group def . angle ) ; aabb aabb = temp ; int child count = shape . get child count ( ) ; for ( int child index = 0 ; child index < child count ; child index ++ ) { if ( child index == 0 ) { shape . compute aabb ( aabb , identity , child index ) ; } else { aabb child aabb = temp 2 ; shape . compute aabb ( child aabb , identity , child index ) ; aabb . combine ( child aabb ) ; } } final float upper bound y = aabb . upper bound . y ; final float upper bound x = aabb . upper bound . x ; for ( float y = math utils . floor ( aabb . lower bound . y / stride ) * stride ; y < upper bound y ; y += stride ) { for ( float x = math utils . floor ( aabb . lower bound . x / stride ) * stride ; x < upper bound x ; x += stride ) { vec 2 p = temp vec ; p . x = x ; p . y = y ; if ( shape . test point ( identity , p ) ) { transform . mul to out ( transform , p , p ) ; particle def . position . x = p . x ; particle def . position . y = p . y ; p . sub local ( group def . position ) ; vec 2 . cross to out unsafe ( group def . angular velocity , p , particle def . velocity ) ; particle def . velocity . add local ( group def . linear velocity ) ; create particle ( particle def ) ; } } } } int last index = m count ; particle group group = new particle group ( ) ; group . m system = this ; group . m first index = first index ; group . m last index = last index ; group . m group flags = group def . group flags ; group . m strength = group def . strength ; group . m user data = group def . user data ; group . m transform . set ( transform ) ; group . m destroy automatically = group def . destroy automatically ; group . m prev = null ; group . m next = m group list ; if ( m group list != null ) { m group list . m prev = group ; } m group list = group ; ++ m group count ; for ( int i = first index ; i < last index ; i ++ ) { m group buffer [ i ] = group ; } update contacts ( true ) ; if ( ( group def . flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( first index <= a && b < last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = group def . strength ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( group def . flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( last index - first index ) ; for ( int i = first index ; i < last index ; i ++ ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } diagram . generate ( stride / 2 ) ; create particle group callback . system = this ; create particle group callback . def = group def ; create particle group callback . first index = first index ; diagram . get nodes ( create particle group callback ) ; } if ( ( group def . group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group ) ; } return group ; } <SENTENCE_END/>


Original Name join,particle,groups

join

<SENTENCE_START> { assert ( group a != group b ) ; rotate buffer ( group b . m first index , group b . m last index , m count ) ; assert ( group b . m last index == m count ) ; rotate buffer ( group a . m first index , group a . m last index , group b . m first index ) ; assert ( group a . m last index == group b . m first index ) ; int particle flags = 0 ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { particle flags |= m flags buffer . data [ i ] ; } update contacts ( true ) ; if ( ( particle flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( group a . m first index <= a && a < group a . m last index && group b . m first index <= b && b < group b . m last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = math utils . min ( group a . m strength , group b . m strength ) ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( particle flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( group b . m last index - group a . m first index ) ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { if ( ( m flags buffer . data [ i ] & particle type . b 2 zombie particle ) == 0 ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } } diagram . generate ( get particle stride ( ) / 2 ) ; join particle groups callback callback = new join particle groups callback ( ) ; callback . system = this ; callback . group a = group a ; callback . group b = group b ; diagram . get nodes ( callback ) ; } for ( int i = group b . m first index ; i < group b . m last index ; i ++ ) { m group buffer [ i ] = group a ; } int group flags = group a . m group flags | group b . m group flags ; group a . m group flags = group flags ; group a . m last index = group b . m last index ; group b . m first index = group b . m last index ; destroy particle group ( group b ) ; if ( ( group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group a ) ; } } <SENTENCE_END/>

(Copy Probability: 4.0%)

<SENTENCE_START> { assert ( group a != group b ) ; rotate buffer ( group b . m first index , group b . m last index , m count ) ; assert ( group b . m last index == m count ) ; rotate buffer ( group a . m first index , group a . m last index , group b . m first index ) ; assert ( group a . m last index == group b . m first index ) ; int particle flags = 0 ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { particle flags |= m flags buffer . data [ i ] ; } update contacts ( true ) ; if ( ( particle flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( group a . m first index <= a && a < group a . m last index && group b . m first index <= b && b < group b . m last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = math utils . min ( group a . m strength , group b . m strength ) ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( particle flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( group b . m last index - group a . m first index ) ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { if ( ( m flags buffer . data [ i ] & particle type . b 2 zombie particle ) == 0 ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } } diagram . generate ( get particle stride ( ) / 2 ) ; join particle groups callback callback = new join particle groups callback ( ) ; callback . system = this ; callback . group a = group a ; callback . group b = group b ; diagram . get nodes ( callback ) ; } for ( int i = group b . m first index ; i < group b . m last index ; i ++ ) { m group buffer [ i ] = group a ; } int group flags = group a . m group flags | group b . m group flags ; group a . m group flags = group flags ; group a . m last index = group b . m last index ; group b . m first index = group b . m last index ; destroy particle group ( group b ) ; if ( ( group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group a ) ; } } <SENTENCE_END/>

particle

<SENTENCE_START> { assert ( group a != group b ) ; rotate buffer ( group b . m first index , group b . m last index , m count ) ; assert ( group b . m last index == m count ) ; rotate buffer ( group a . m first index , group a . m last index , group b . m first index ) ; assert ( group a . m last index == group b . m first index ) ; int particle flags = 0 ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { particle flags |= m flags buffer . data [ i ] ; } update contacts ( true ) ; if ( ( particle flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( group a . m first index <= a && a < group a . m last index && group b . m first index <= b && b < group b . m last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = math utils . min ( group a . m strength , group b . m strength ) ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( particle flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( group b . m last index - group a . m first index ) ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { if ( ( m flags buffer . data [ i ] & particle type . b 2 zombie particle ) == 0 ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } } diagram . generate ( get particle stride ( ) / 2 ) ; join particle groups callback callback = new join particle groups callback ( ) ; callback . system = this ; callback . group a = group a ; callback . group b = group b ; diagram . get nodes ( callback ) ; } for ( int i = group b . m first index ; i < group b . m last index ; i ++ ) { m group buffer [ i ] = group a ; } int group flags = group a . m group flags | group b . m group flags ; group a . m group flags = group flags ; group a . m last index = group b . m last index ; group b . m first index = group b . m last index ; destroy particle group ( group b ) ; if ( ( group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group a ) ; } } <SENTENCE_END/>

(Copy Probability: 16.5%)

<SENTENCE_START> { assert ( group a != group b ) ; rotate buffer ( group b . m first index , group b . m last index , m count ) ; assert ( group b . m last index == m count ) ; rotate buffer ( group a . m first index , group a . m last index , group b . m first index ) ; assert ( group a . m last index == group b . m first index ) ; int particle flags = 0 ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { particle flags |= m flags buffer . data [ i ] ; } update contacts ( true ) ; if ( ( particle flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( group a . m first index <= a && a < group a . m last index && group b . m first index <= b && b < group b . m last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = math utils . min ( group a . m strength , group b . m strength ) ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( particle flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( group b . m last index - group a . m first index ) ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { if ( ( m flags buffer . data [ i ] & particle type . b 2 zombie particle ) == 0 ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } } diagram . generate ( get particle stride ( ) / 2 ) ; join particle groups callback callback = new join particle groups callback ( ) ; callback . system = this ; callback . group a = group a ; callback . group b = group b ; diagram . get nodes ( callback ) ; } for ( int i = group b . m first index ; i < group b . m last index ; i ++ ) { m group buffer [ i ] = group a ; } int group flags = group a . m group flags | group b . m group flags ; group a . m group flags = group flags ; group a . m last index = group b . m last index ; group b . m first index = group b . m last index ; destroy particle group ( group b ) ; if ( ( group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group a ) ; } } <SENTENCE_END/>

groups

<SENTENCE_START> { assert ( group a != group b ) ; rotate buffer ( group b . m first index , group b . m last index , m count ) ; assert ( group b . m last index == m count ) ; rotate buffer ( group a . m first index , group a . m last index , group b . m first index ) ; assert ( group a . m last index == group b . m first index ) ; int particle flags = 0 ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { particle flags |= m flags buffer . data [ i ] ; } update contacts ( true ) ; if ( ( particle flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( group a . m first index <= a && a < group a . m last index && group b . m first index <= b && b < group b . m last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = math utils . min ( group a . m strength , group b . m strength ) ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( particle flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( group b . m last index - group a . m first index ) ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { if ( ( m flags buffer . data [ i ] & particle type . b 2 zombie particle ) == 0 ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } } diagram . generate ( get particle stride ( ) / 2 ) ; join particle groups callback callback = new join particle groups callback ( ) ; callback . system = this ; callback . group a = group a ; callback . group b = group b ; diagram . get nodes ( callback ) ; } for ( int i = group b . m first index ; i < group b . m last index ; i ++ ) { m group buffer [ i ] = group a ; } int group flags = group a . m group flags | group b . m group flags ; group a . m group flags = group flags ; group a . m last index = group b . m last index ; group b . m first index = group b . m last index ; destroy particle group ( group b ) ; if ( ( group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group a ) ; } } <SENTENCE_END/>

(Copy Probability: 12.0%)

<SENTENCE_START> { assert ( group a != group b ) ; rotate buffer ( group b . m first index , group b . m last index , m count ) ; assert ( group b . m last index == m count ) ; rotate buffer ( group a . m first index , group a . m last index , group b . m first index ) ; assert ( group a . m last index == group b . m first index ) ; int particle flags = 0 ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { particle flags |= m flags buffer . data [ i ] ; } update contacts ( true ) ; if ( ( particle flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( group a . m first index <= a && a < group a . m last index && group b . m first index <= b && b < group b . m last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = math utils . min ( group a . m strength , group b . m strength ) ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( particle flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( group b . m last index - group a . m first index ) ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { if ( ( m flags buffer . data [ i ] & particle type . b 2 zombie particle ) == 0 ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } } diagram . generate ( get particle stride ( ) / 2 ) ; join particle groups callback callback = new join particle groups callback ( ) ; callback . system = this ; callback . group a = group a ; callback . group b = group b ; diagram . get nodes ( callback ) ; } for ( int i = group b . m first index ; i < group b . m last index ; i ++ ) { m group buffer [ i ] = group a ; } int group flags = group a . m group flags | group b . m group flags ; group a . m group flags = group flags ; group a . m last index = group b . m last index ; group b . m first index = group b . m last index ; destroy particle group ( group b ) ; if ( ( group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group a ) ; } } <SENTENCE_END/>

%END%

<SENTENCE_START> { assert ( group a != group b ) ; rotate buffer ( group b . m first index , group b . m last index , m count ) ; assert ( group b . m last index == m count ) ; rotate buffer ( group a . m first index , group a . m last index , group b . m first index ) ; assert ( group a . m last index == group b . m first index ) ; int particle flags = 0 ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { particle flags |= m flags buffer . data [ i ] ; } update contacts ( true ) ; if ( ( particle flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( group a . m first index <= a && a < group a . m last index && group b . m first index <= b && b < group b . m last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = math utils . min ( group a . m strength , group b . m strength ) ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( particle flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( group b . m last index - group a . m first index ) ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { if ( ( m flags buffer . data [ i ] & particle type . b 2 zombie particle ) == 0 ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } } diagram . generate ( get particle stride ( ) / 2 ) ; join particle groups callback callback = new join particle groups callback ( ) ; callback . system = this ; callback . group a = group a ; callback . group b = group b ; diagram . get nodes ( callback ) ; } for ( int i = group b . m first index ; i < group b . m last index ; i ++ ) { m group buffer [ i ] = group a ; } int group flags = group a . m group flags | group b . m group flags ; group a . m group flags = group flags ; group a . m last index = group b . m last index ; group b . m first index = group b . m last index ; destroy particle group ( group b ) ; if ( ( group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group a ) ; } } <SENTENCE_END/>

(Copy Probability: 4.6%)

<SENTENCE_START> { assert ( group a != group b ) ; rotate buffer ( group b . m first index , group b . m last index , m count ) ; assert ( group b . m last index == m count ) ; rotate buffer ( group a . m first index , group a . m last index , group b . m first index ) ; assert ( group a . m last index == group b . m first index ) ; int particle flags = 0 ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { particle flags |= m flags buffer . data [ i ] ; } update contacts ( true ) ; if ( ( particle flags & k pair flags ) != 0 ) { for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } if ( group a . m first index <= a && a < group a . m last index && group b . m first index <= b && b < group b . m last index ) { if ( m pair count >= m pair capacity ) { int old capacity = m pair capacity ; int new capacity = m pair count != 0 ? 2 * m pair count : settings . min particle buffer capacity ; m pair buffer = buffer utils . reallocate buffer ( pair . class , m pair buffer , old capacity , new capacity ) ; m pair capacity = new capacity ; } pair pair = m pair buffer [ m pair count ] ; pair . index a = a ; pair . index b = b ; pair . flags = contact . flags ; pair . strength = math utils . min ( group a . m strength , group b . m strength ) ; pair . distance = math utils . distance ( m position buffer . data [ a ] , m position buffer . data [ b ] ) ; m pair count ++ ; } } } if ( ( particle flags & k triad flags ) != 0 ) { voronoi diagram diagram = new voronoi diagram ( group b . m last index - group a . m first index ) ; for ( int i = group a . m first index ; i < group b . m last index ; i ++ ) { if ( ( m flags buffer . data [ i ] & particle type . b 2 zombie particle ) == 0 ) { diagram . add generator ( m position buffer . data [ i ] , i ) ; } } diagram . generate ( get particle stride ( ) / 2 ) ; join particle groups callback callback = new join particle groups callback ( ) ; callback . system = this ; callback . group a = group a ; callback . group b = group b ; diagram . get nodes ( callback ) ; } for ( int i = group b . m first index ; i < group b . m last index ; i ++ ) { m group buffer [ i ] = group a ; } int group flags = group a . m group flags | group b . m group flags ; group a . m group flags = group flags ; group a . m last index = group b . m last index ; group b . m first index = group b . m last index ; destroy particle group ( group b ) ; if ( ( group flags & particle group type . b 2 solid particle group ) != 0 ) { compute depth for group ( group a ) ; } } <SENTENCE_END/>


Original Name destroy,particle,group

destroy

<SENTENCE_START> { assert ( m group count > 0 ) ; assert ( group != null ) ; if ( m world . get particle destruction listener ( ) != null ) { m world . get particle destruction listener ( ) . say goodbye ( group ) ; } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m group buffer [ i ] = null ; } if ( group . m prev != null ) { group . m prev . m next = group . m next ; } if ( group . m next != null ) { group . m next . m prev = group . m prev ; } if ( group == m group list ) { m group list = group . m next ; } -- m group count ; } <SENTENCE_END/>

(Copy Probability: 3.6%)

<SENTENCE_START> { assert ( m group count > 0 ) ; assert ( group != null ) ; if ( m world . get particle destruction listener ( ) != null ) { m world . get particle destruction listener ( ) . say goodbye ( group ) ; } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m group buffer [ i ] = null ; } if ( group . m prev != null ) { group . m prev . m next = group . m next ; } if ( group . m next != null ) { group . m next . m prev = group . m prev ; } if ( group == m group list ) { m group list = group . m next ; } -- m group count ; } <SENTENCE_END/>

particle

<SENTENCE_START> { assert ( m group count > 0 ) ; assert ( group != null ) ; if ( m world . get particle destruction listener ( ) != null ) { m world . get particle destruction listener ( ) . say goodbye ( group ) ; } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m group buffer [ i ] = null ; } if ( group . m prev != null ) { group . m prev . m next = group . m next ; } if ( group . m next != null ) { group . m next . m prev = group . m prev ; } if ( group == m group list ) { m group list = group . m next ; } -- m group count ; } <SENTENCE_END/>

(Copy Probability: 21.9%)

<SENTENCE_START> { assert ( m group count > 0 ) ; assert ( group != null ) ; if ( m world . get particle destruction listener ( ) != null ) { m world . get particle destruction listener ( ) . say goodbye ( group ) ; } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m group buffer [ i ] = null ; } if ( group . m prev != null ) { group . m prev . m next = group . m next ; } if ( group . m next != null ) { group . m next . m prev = group . m prev ; } if ( group == m group list ) { m group list = group . m next ; } -- m group count ; } <SENTENCE_END/>

group

<SENTENCE_START> { assert ( m group count > 0 ) ; assert ( group != null ) ; if ( m world . get particle destruction listener ( ) != null ) { m world . get particle destruction listener ( ) . say goodbye ( group ) ; } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m group buffer [ i ] = null ; } if ( group . m prev != null ) { group . m prev . m next = group . m next ; } if ( group . m next != null ) { group . m next . m prev = group . m prev ; } if ( group == m group list ) { m group list = group . m next ; } -- m group count ; } <SENTENCE_END/>

(Copy Probability: 25.5%)

<SENTENCE_START> { assert ( m group count > 0 ) ; assert ( group != null ) ; if ( m world . get particle destruction listener ( ) != null ) { m world . get particle destruction listener ( ) . say goodbye ( group ) ; } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m group buffer [ i ] = null ; } if ( group . m prev != null ) { group . m prev . m next = group . m next ; } if ( group . m next != null ) { group . m next . m prev = group . m prev ; } if ( group == m group list ) { m group list = group . m next ; } -- m group count ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { assert ( m group count > 0 ) ; assert ( group != null ) ; if ( m world . get particle destruction listener ( ) != null ) { m world . get particle destruction listener ( ) . say goodbye ( group ) ; } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m group buffer [ i ] = null ; } if ( group . m prev != null ) { group . m prev . m next = group . m next ; } if ( group . m next != null ) { group . m next . m prev = group . m prev ; } if ( group == m group list ) { m group list = group . m next ; } -- m group count ; } <SENTENCE_END/>

(Copy Probability: 8.8%)

<SENTENCE_START> { assert ( m group count > 0 ) ; assert ( group != null ) ; if ( m world . get particle destruction listener ( ) != null ) { m world . get particle destruction listener ( ) . say goodbye ( group ) ; } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m group buffer [ i ] = null ; } if ( group . m prev != null ) { group . m prev . m next = group . m next ; } if ( group . m next != null ) { group . m next . m prev = group . m prev ; } if ( group == m group list ) { m group list = group . m next ; } -- m group count ; } <SENTENCE_END/>


Original Name compute,depth,for,group

compute

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } } m depth buffer = request particle buffer ( m depth buffer ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float w = m accumulation buffer [ i ] ; m depth buffer [ i ] = w < 0.8f ? 0 : float . max value ; } int interation count = group . get particle count ( ) ; for ( int t = 0 ; t < interation count ; t ++ ) { boolean updated = false ; for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float r = 1 - contact . weight ; float ap 0 = m depth buffer [ a ] ; float bp 0 = m depth buffer [ b ] ; float ap 1 = bp 0 + r ; float bp 1 = ap 0 + r ; if ( ap 0 > ap 1 ) { m depth buffer [ a ] = ap 1 ; updated = true ; } if ( bp 0 > bp 1 ) { m depth buffer [ b ] = bp 1 ; updated = true ; } } } if ( ! updated ) { break ; } } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float p = m depth buffer [ i ] ; if ( p < float . max value ) { m depth buffer [ i ] *= m particle diameter ; } else { m depth buffer [ i ] = 0 ; } } } <SENTENCE_END/>

(Copy Probability: 3.8%)

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } } m depth buffer = request particle buffer ( m depth buffer ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float w = m accumulation buffer [ i ] ; m depth buffer [ i ] = w < 0.8f ? 0 : float . max value ; } int interation count = group . get particle count ( ) ; for ( int t = 0 ; t < interation count ; t ++ ) { boolean updated = false ; for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float r = 1 - contact . weight ; float ap 0 = m depth buffer [ a ] ; float bp 0 = m depth buffer [ b ] ; float ap 1 = bp 0 + r ; float bp 1 = ap 0 + r ; if ( ap 0 > ap 1 ) { m depth buffer [ a ] = ap 1 ; updated = true ; } if ( bp 0 > bp 1 ) { m depth buffer [ b ] = bp 1 ; updated = true ; } } } if ( ! updated ) { break ; } } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float p = m depth buffer [ i ] ; if ( p < float . max value ) { m depth buffer [ i ] *= m particle diameter ; } else { m depth buffer [ i ] = 0 ; } } } <SENTENCE_END/>

depth

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } } m depth buffer = request particle buffer ( m depth buffer ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float w = m accumulation buffer [ i ] ; m depth buffer [ i ] = w < 0.8f ? 0 : float . max value ; } int interation count = group . get particle count ( ) ; for ( int t = 0 ; t < interation count ; t ++ ) { boolean updated = false ; for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float r = 1 - contact . weight ; float ap 0 = m depth buffer [ a ] ; float bp 0 = m depth buffer [ b ] ; float ap 1 = bp 0 + r ; float bp 1 = ap 0 + r ; if ( ap 0 > ap 1 ) { m depth buffer [ a ] = ap 1 ; updated = true ; } if ( bp 0 > bp 1 ) { m depth buffer [ b ] = bp 1 ; updated = true ; } } } if ( ! updated ) { break ; } } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float p = m depth buffer [ i ] ; if ( p < float . max value ) { m depth buffer [ i ] *= m particle diameter ; } else { m depth buffer [ i ] = 0 ; } } } <SENTENCE_END/>

(Copy Probability: 22.8%)

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } } m depth buffer = request particle buffer ( m depth buffer ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float w = m accumulation buffer [ i ] ; m depth buffer [ i ] = w < 0.8f ? 0 : float . max value ; } int interation count = group . get particle count ( ) ; for ( int t = 0 ; t < interation count ; t ++ ) { boolean updated = false ; for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float r = 1 - contact . weight ; float ap 0 = m depth buffer [ a ] ; float bp 0 = m depth buffer [ b ] ; float ap 1 = bp 0 + r ; float bp 1 = ap 0 + r ; if ( ap 0 > ap 1 ) { m depth buffer [ a ] = ap 1 ; updated = true ; } if ( bp 0 > bp 1 ) { m depth buffer [ b ] = bp 1 ; updated = true ; } } } if ( ! updated ) { break ; } } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float p = m depth buffer [ i ] ; if ( p < float . max value ) { m depth buffer [ i ] *= m particle diameter ; } else { m depth buffer [ i ] = 0 ; } } } <SENTENCE_END/>

for

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } } m depth buffer = request particle buffer ( m depth buffer ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float w = m accumulation buffer [ i ] ; m depth buffer [ i ] = w < 0.8f ? 0 : float . max value ; } int interation count = group . get particle count ( ) ; for ( int t = 0 ; t < interation count ; t ++ ) { boolean updated = false ; for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float r = 1 - contact . weight ; float ap 0 = m depth buffer [ a ] ; float bp 0 = m depth buffer [ b ] ; float ap 1 = bp 0 + r ; float bp 1 = ap 0 + r ; if ( ap 0 > ap 1 ) { m depth buffer [ a ] = ap 1 ; updated = true ; } if ( bp 0 > bp 1 ) { m depth buffer [ b ] = bp 1 ; updated = true ; } } } if ( ! updated ) { break ; } } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float p = m depth buffer [ i ] ; if ( p < float . max value ) { m depth buffer [ i ] *= m particle diameter ; } else { m depth buffer [ i ] = 0 ; } } } <SENTENCE_END/>

(Copy Probability: 13.4%)

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } } m depth buffer = request particle buffer ( m depth buffer ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float w = m accumulation buffer [ i ] ; m depth buffer [ i ] = w < 0.8f ? 0 : float . max value ; } int interation count = group . get particle count ( ) ; for ( int t = 0 ; t < interation count ; t ++ ) { boolean updated = false ; for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float r = 1 - contact . weight ; float ap 0 = m depth buffer [ a ] ; float bp 0 = m depth buffer [ b ] ; float ap 1 = bp 0 + r ; float bp 1 = ap 0 + r ; if ( ap 0 > ap 1 ) { m depth buffer [ a ] = ap 1 ; updated = true ; } if ( bp 0 > bp 1 ) { m depth buffer [ b ] = bp 1 ; updated = true ; } } } if ( ! updated ) { break ; } } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float p = m depth buffer [ i ] ; if ( p < float . max value ) { m depth buffer [ i ] *= m particle diameter ; } else { m depth buffer [ i ] = 0 ; } } } <SENTENCE_END/>

group

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } } m depth buffer = request particle buffer ( m depth buffer ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float w = m accumulation buffer [ i ] ; m depth buffer [ i ] = w < 0.8f ? 0 : float . max value ; } int interation count = group . get particle count ( ) ; for ( int t = 0 ; t < interation count ; t ++ ) { boolean updated = false ; for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float r = 1 - contact . weight ; float ap 0 = m depth buffer [ a ] ; float bp 0 = m depth buffer [ b ] ; float ap 1 = bp 0 + r ; float bp 1 = ap 0 + r ; if ( ap 0 > ap 1 ) { m depth buffer [ a ] = ap 1 ; updated = true ; } if ( bp 0 > bp 1 ) { m depth buffer [ b ] = bp 1 ; updated = true ; } } } if ( ! updated ) { break ; } } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float p = m depth buffer [ i ] ; if ( p < float . max value ) { m depth buffer [ i ] *= m particle diameter ; } else { m depth buffer [ i ] = 0 ; } } } <SENTENCE_END/>

(Copy Probability: 5.0%)

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } } m depth buffer = request particle buffer ( m depth buffer ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float w = m accumulation buffer [ i ] ; m depth buffer [ i ] = w < 0.8f ? 0 : float . max value ; } int interation count = group . get particle count ( ) ; for ( int t = 0 ; t < interation count ; t ++ ) { boolean updated = false ; for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float r = 1 - contact . weight ; float ap 0 = m depth buffer [ a ] ; float bp 0 = m depth buffer [ b ] ; float ap 1 = bp 0 + r ; float bp 1 = ap 0 + r ; if ( ap 0 > ap 1 ) { m depth buffer [ a ] = ap 1 ; updated = true ; } if ( bp 0 > bp 1 ) { m depth buffer [ b ] = bp 1 ; updated = true ; } } } if ( ! updated ) { break ; } } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float p = m depth buffer [ i ] ; if ( p < float . max value ) { m depth buffer [ i ] *= m particle diameter ; } else { m depth buffer [ i ] = 0 ; } } } <SENTENCE_END/>

%END%

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } } m depth buffer = request particle buffer ( m depth buffer ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float w = m accumulation buffer [ i ] ; m depth buffer [ i ] = w < 0.8f ? 0 : float . max value ; } int interation count = group . get particle count ( ) ; for ( int t = 0 ; t < interation count ; t ++ ) { boolean updated = false ; for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float r = 1 - contact . weight ; float ap 0 = m depth buffer [ a ] ; float bp 0 = m depth buffer [ b ] ; float ap 1 = bp 0 + r ; float bp 1 = ap 0 + r ; if ( ap 0 > ap 1 ) { m depth buffer [ a ] = ap 1 ; updated = true ; } if ( bp 0 > bp 1 ) { m depth buffer [ b ] = bp 1 ; updated = true ; } } } if ( ! updated ) { break ; } } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float p = m depth buffer [ i ] ; if ( p < float . max value ) { m depth buffer [ i ] *= m particle diameter ; } else { m depth buffer [ i ] = 0 ; } } } <SENTENCE_END/>

(Copy Probability: 4.6%)

<SENTENCE_START> { for ( int i = group . m first index ; i < group . m last index ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } } m depth buffer = request particle buffer ( m depth buffer ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float w = m accumulation buffer [ i ] ; m depth buffer [ i ] = w < 0.8f ? 0 : float . max value ; } int interation count = group . get particle count ( ) ; for ( int t = 0 ; t < interation count ; t ++ ) { boolean updated = false ; for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; if ( a >= group . m first index && a < group . m last index && b >= group . m first index && b < group . m last index ) { float r = 1 - contact . weight ; float ap 0 = m depth buffer [ a ] ; float bp 0 = m depth buffer [ b ] ; float ap 1 = bp 0 + r ; float bp 1 = ap 0 + r ; if ( ap 0 > ap 1 ) { m depth buffer [ a ] = ap 1 ; updated = true ; } if ( bp 0 > bp 1 ) { m depth buffer [ b ] = bp 1 ; updated = true ; } } } if ( ! updated ) { break ; } } for ( int i = group . m first index ; i < group . m last index ; i ++ ) { float p = m depth buffer [ i ] ; if ( p < float . max value ) { m depth buffer [ i ] *= m particle diameter ; } else { m depth buffer [ i ] = 0 ; } } } <SENTENCE_END/>


Original Name add,contact

add

<SENTENCE_START> { assert ( a != b ) ; vec 2 pa = m position buffer . data [ a ] ; vec 2 pb = m position buffer . data [ b ] ; float dx = pb . x - pa . x ; float dy = pb . y - pa . y ; float d 2 = dx * dx + dy * dy ; if ( d 2 < m squared diameter ) { if ( m contact count >= m contact capacity ) { int old capacity = m contact capacity ; int new capacity = m contact count != 0 ? 2 * m contact count : settings . min particle buffer capacity ; m contact buffer = buffer utils . reallocate buffer ( particle contact . class , m contact buffer , old capacity , new capacity ) ; m contact capacity = new capacity ; } float inv d = d 2 != 0 ? math utils . sqrt ( 1 / d 2 ) : float . max value ; particle contact contact = m contact buffer [ m contact count ] ; contact . index a = a ; contact . index b = b ; contact . flags = m flags buffer . data [ a ] | m flags buffer . data [ b ] ; contact . weight = 1 - d 2 * inv d * m inverse diameter ; contact . normal . x = inv d * dx ; contact . normal . y = inv d * dy ; m contact count ++ ; } } <SENTENCE_END/>

(Copy Probability: 4.5%)

<SENTENCE_START> { assert ( a != b ) ; vec 2 pa = m position buffer . data [ a ] ; vec 2 pb = m position buffer . data [ b ] ; float dx = pb . x - pa . x ; float dy = pb . y - pa . y ; float d 2 = dx * dx + dy * dy ; if ( d 2 < m squared diameter ) { if ( m contact count >= m contact capacity ) { int old capacity = m contact capacity ; int new capacity = m contact count != 0 ? 2 * m contact count : settings . min particle buffer capacity ; m contact buffer = buffer utils . reallocate buffer ( particle contact . class , m contact buffer , old capacity , new capacity ) ; m contact capacity = new capacity ; } float inv d = d 2 != 0 ? math utils . sqrt ( 1 / d 2 ) : float . max value ; particle contact contact = m contact buffer [ m contact count ] ; contact . index a = a ; contact . index b = b ; contact . flags = m flags buffer . data [ a ] | m flags buffer . data [ b ] ; contact . weight = 1 - d 2 * inv d * m inverse diameter ; contact . normal . x = inv d * dx ; contact . normal . y = inv d * dy ; m contact count ++ ; } } <SENTENCE_END/>

contact

<SENTENCE_START> { assert ( a != b ) ; vec 2 pa = m position buffer . data [ a ] ; vec 2 pb = m position buffer . data [ b ] ; float dx = pb . x - pa . x ; float dy = pb . y - pa . y ; float d 2 = dx * dx + dy * dy ; if ( d 2 < m squared diameter ) { if ( m contact count >= m contact capacity ) { int old capacity = m contact capacity ; int new capacity = m contact count != 0 ? 2 * m contact count : settings . min particle buffer capacity ; m contact buffer = buffer utils . reallocate buffer ( particle contact . class , m contact buffer , old capacity , new capacity ) ; m contact capacity = new capacity ; } float inv d = d 2 != 0 ? math utils . sqrt ( 1 / d 2 ) : float . max value ; particle contact contact = m contact buffer [ m contact count ] ; contact . index a = a ; contact . index b = b ; contact . flags = m flags buffer . data [ a ] | m flags buffer . data [ b ] ; contact . weight = 1 - d 2 * inv d * m inverse diameter ; contact . normal . x = inv d * dx ; contact . normal . y = inv d * dy ; m contact count ++ ; } } <SENTENCE_END/>

(Copy Probability: 32.7%)

<SENTENCE_START> { assert ( a != b ) ; vec 2 pa = m position buffer . data [ a ] ; vec 2 pb = m position buffer . data [ b ] ; float dx = pb . x - pa . x ; float dy = pb . y - pa . y ; float d 2 = dx * dx + dy * dy ; if ( d 2 < m squared diameter ) { if ( m contact count >= m contact capacity ) { int old capacity = m contact capacity ; int new capacity = m contact count != 0 ? 2 * m contact count : settings . min particle buffer capacity ; m contact buffer = buffer utils . reallocate buffer ( particle contact . class , m contact buffer , old capacity , new capacity ) ; m contact capacity = new capacity ; } float inv d = d 2 != 0 ? math utils . sqrt ( 1 / d 2 ) : float . max value ; particle contact contact = m contact buffer [ m contact count ] ; contact . index a = a ; contact . index b = b ; contact . flags = m flags buffer . data [ a ] | m flags buffer . data [ b ] ; contact . weight = 1 - d 2 * inv d * m inverse diameter ; contact . normal . x = inv d * dx ; contact . normal . y = inv d * dy ; m contact count ++ ; } } <SENTENCE_END/>

%END%

<SENTENCE_START> { assert ( a != b ) ; vec 2 pa = m position buffer . data [ a ] ; vec 2 pb = m position buffer . data [ b ] ; float dx = pb . x - pa . x ; float dy = pb . y - pa . y ; float d 2 = dx * dx + dy * dy ; if ( d 2 < m squared diameter ) { if ( m contact count >= m contact capacity ) { int old capacity = m contact capacity ; int new capacity = m contact count != 0 ? 2 * m contact count : settings . min particle buffer capacity ; m contact buffer = buffer utils . reallocate buffer ( particle contact . class , m contact buffer , old capacity , new capacity ) ; m contact capacity = new capacity ; } float inv d = d 2 != 0 ? math utils . sqrt ( 1 / d 2 ) : float . max value ; particle contact contact = m contact buffer [ m contact count ] ; contact . index a = a ; contact . index b = b ; contact . flags = m flags buffer . data [ a ] | m flags buffer . data [ b ] ; contact . weight = 1 - d 2 * inv d * m inverse diameter ; contact . normal . x = inv d * dx ; contact . normal . y = inv d * dy ; m contact count ++ ; } } <SENTENCE_END/>

(Copy Probability: 15.1%)

<SENTENCE_START> { assert ( a != b ) ; vec 2 pa = m position buffer . data [ a ] ; vec 2 pb = m position buffer . data [ b ] ; float dx = pb . x - pa . x ; float dy = pb . y - pa . y ; float d 2 = dx * dx + dy * dy ; if ( d 2 < m squared diameter ) { if ( m contact count >= m contact capacity ) { int old capacity = m contact capacity ; int new capacity = m contact count != 0 ? 2 * m contact count : settings . min particle buffer capacity ; m contact buffer = buffer utils . reallocate buffer ( particle contact . class , m contact buffer , old capacity , new capacity ) ; m contact capacity = new capacity ; } float inv d = d 2 != 0 ? math utils . sqrt ( 1 / d 2 ) : float . max value ; particle contact contact = m contact buffer [ m contact count ] ; contact . index a = a ; contact . index b = b ; contact . flags = m flags buffer . data [ a ] | m flags buffer . data [ b ] ; contact . weight = 1 - d 2 * inv d * m inverse diameter ; contact . normal . x = inv d * dx ; contact . normal . y = inv d * dy ; m contact count ++ ; } } <SENTENCE_END/>


Original Name update,contacts

update

<SENTENCE_START> { for ( int p = 0 ; p < m proxy count ; p ++ ) { proxy proxy = m proxy buffer [ p ] ; int i = proxy . index ; vec 2 pos = m position buffer . data [ i ] ; proxy . tag = compute tag ( m inverse diameter * pos . x , m inverse diameter * pos . y ) ; } arrays . sort ( m proxy buffer , 0 , m proxy count ) ; m contact count = 0 ; int c index = 0 ; for ( int i = 0 ; i < m proxy count ; i ++ ) { proxy a = m proxy buffer [ i ] ; long right tag = compute relative tag ( a . tag , 1 , 0 ) ; for ( int j = i + 1 ; j < m proxy count ; j ++ ) { proxy b = m proxy buffer [ j ] ; if ( right tag < b . tag ) { break ; } add contact ( a . index , b . index ) ; } long bottom left tag = compute relative tag ( a . tag , - 1 , 1 ) ; for ( ; c index < m proxy count ; c index ++ ) { proxy c = m proxy buffer [ c index ] ; if ( bottom left tag <= c . tag ) { break ; } } long bottom right tag = compute relative tag ( a . tag , 1 , 1 ) ; for ( int b index = c index ; b index < m proxy count ; b index ++ ) { proxy b = m proxy buffer [ b index ] ; if ( bottom right tag < b . tag ) { break ; } add contact ( a . index , b . index ) ; } } if ( except zombie ) { int j = m contact count ; for ( int i = 0 ; i < j ; i ++ ) { if ( ( m contact buffer [ i ] . flags & particle type . b 2 zombie particle ) != 0 ) { -- j ; particle contact temp = m contact buffer [ j ] ; m contact buffer [ j ] = m contact buffer [ i ] ; m contact buffer [ i ] = temp ; -- i ; } } m contact count = j ; } } <SENTENCE_END/>

(Copy Probability: 3.2%)

<SENTENCE_START> { for ( int p = 0 ; p < m proxy count ; p ++ ) { proxy proxy = m proxy buffer [ p ] ; int i = proxy . index ; vec 2 pos = m position buffer . data [ i ] ; proxy . tag = compute tag ( m inverse diameter * pos . x , m inverse diameter * pos . y ) ; } arrays . sort ( m proxy buffer , 0 , m proxy count ) ; m contact count = 0 ; int c index = 0 ; for ( int i = 0 ; i < m proxy count ; i ++ ) { proxy a = m proxy buffer [ i ] ; long right tag = compute relative tag ( a . tag , 1 , 0 ) ; for ( int j = i + 1 ; j < m proxy count ; j ++ ) { proxy b = m proxy buffer [ j ] ; if ( right tag < b . tag ) { break ; } add contact ( a . index , b . index ) ; } long bottom left tag = compute relative tag ( a . tag , - 1 , 1 ) ; for ( ; c index < m proxy count ; c index ++ ) { proxy c = m proxy buffer [ c index ] ; if ( bottom left tag <= c . tag ) { break ; } } long bottom right tag = compute relative tag ( a . tag , 1 , 1 ) ; for ( int b index = c index ; b index < m proxy count ; b index ++ ) { proxy b = m proxy buffer [ b index ] ; if ( bottom right tag < b . tag ) { break ; } add contact ( a . index , b . index ) ; } } if ( except zombie ) { int j = m contact count ; for ( int i = 0 ; i < j ; i ++ ) { if ( ( m contact buffer [ i ] . flags & particle type . b 2 zombie particle ) != 0 ) { -- j ; particle contact temp = m contact buffer [ j ] ; m contact buffer [ j ] = m contact buffer [ i ] ; m contact buffer [ i ] = temp ; -- i ; } } m contact count = j ; } } <SENTENCE_END/>

contacts

<SENTENCE_START> { for ( int p = 0 ; p < m proxy count ; p ++ ) { proxy proxy = m proxy buffer [ p ] ; int i = proxy . index ; vec 2 pos = m position buffer . data [ i ] ; proxy . tag = compute tag ( m inverse diameter * pos . x , m inverse diameter * pos . y ) ; } arrays . sort ( m proxy buffer , 0 , m proxy count ) ; m contact count = 0 ; int c index = 0 ; for ( int i = 0 ; i < m proxy count ; i ++ ) { proxy a = m proxy buffer [ i ] ; long right tag = compute relative tag ( a . tag , 1 , 0 ) ; for ( int j = i + 1 ; j < m proxy count ; j ++ ) { proxy b = m proxy buffer [ j ] ; if ( right tag < b . tag ) { break ; } add contact ( a . index , b . index ) ; } long bottom left tag = compute relative tag ( a . tag , - 1 , 1 ) ; for ( ; c index < m proxy count ; c index ++ ) { proxy c = m proxy buffer [ c index ] ; if ( bottom left tag <= c . tag ) { break ; } } long bottom right tag = compute relative tag ( a . tag , 1 , 1 ) ; for ( int b index = c index ; b index < m proxy count ; b index ++ ) { proxy b = m proxy buffer [ b index ] ; if ( bottom right tag < b . tag ) { break ; } add contact ( a . index , b . index ) ; } } if ( except zombie ) { int j = m contact count ; for ( int i = 0 ; i < j ; i ++ ) { if ( ( m contact buffer [ i ] . flags & particle type . b 2 zombie particle ) != 0 ) { -- j ; particle contact temp = m contact buffer [ j ] ; m contact buffer [ j ] = m contact buffer [ i ] ; m contact buffer [ i ] = temp ; -- i ; } } m contact count = j ; } } <SENTENCE_END/>

(Copy Probability: 8.3%)

<SENTENCE_START> { for ( int p = 0 ; p < m proxy count ; p ++ ) { proxy proxy = m proxy buffer [ p ] ; int i = proxy . index ; vec 2 pos = m position buffer . data [ i ] ; proxy . tag = compute tag ( m inverse diameter * pos . x , m inverse diameter * pos . y ) ; } arrays . sort ( m proxy buffer , 0 , m proxy count ) ; m contact count = 0 ; int c index = 0 ; for ( int i = 0 ; i < m proxy count ; i ++ ) { proxy a = m proxy buffer [ i ] ; long right tag = compute relative tag ( a . tag , 1 , 0 ) ; for ( int j = i + 1 ; j < m proxy count ; j ++ ) { proxy b = m proxy buffer [ j ] ; if ( right tag < b . tag ) { break ; } add contact ( a . index , b . index ) ; } long bottom left tag = compute relative tag ( a . tag , - 1 , 1 ) ; for ( ; c index < m proxy count ; c index ++ ) { proxy c = m proxy buffer [ c index ] ; if ( bottom left tag <= c . tag ) { break ; } } long bottom right tag = compute relative tag ( a . tag , 1 , 1 ) ; for ( int b index = c index ; b index < m proxy count ; b index ++ ) { proxy b = m proxy buffer [ b index ] ; if ( bottom right tag < b . tag ) { break ; } add contact ( a . index , b . index ) ; } } if ( except zombie ) { int j = m contact count ; for ( int i = 0 ; i < j ; i ++ ) { if ( ( m contact buffer [ i ] . flags & particle type . b 2 zombie particle ) != 0 ) { -- j ; particle contact temp = m contact buffer [ j ] ; m contact buffer [ j ] = m contact buffer [ i ] ; m contact buffer [ i ] = temp ; -- i ; } } m contact count = j ; } } <SENTENCE_END/>

%END%

<SENTENCE_START> { for ( int p = 0 ; p < m proxy count ; p ++ ) { proxy proxy = m proxy buffer [ p ] ; int i = proxy . index ; vec 2 pos = m position buffer . data [ i ] ; proxy . tag = compute tag ( m inverse diameter * pos . x , m inverse diameter * pos . y ) ; } arrays . sort ( m proxy buffer , 0 , m proxy count ) ; m contact count = 0 ; int c index = 0 ; for ( int i = 0 ; i < m proxy count ; i ++ ) { proxy a = m proxy buffer [ i ] ; long right tag = compute relative tag ( a . tag , 1 , 0 ) ; for ( int j = i + 1 ; j < m proxy count ; j ++ ) { proxy b = m proxy buffer [ j ] ; if ( right tag < b . tag ) { break ; } add contact ( a . index , b . index ) ; } long bottom left tag = compute relative tag ( a . tag , - 1 , 1 ) ; for ( ; c index < m proxy count ; c index ++ ) { proxy c = m proxy buffer [ c index ] ; if ( bottom left tag <= c . tag ) { break ; } } long bottom right tag = compute relative tag ( a . tag , 1 , 1 ) ; for ( int b index = c index ; b index < m proxy count ; b index ++ ) { proxy b = m proxy buffer [ b index ] ; if ( bottom right tag < b . tag ) { break ; } add contact ( a . index , b . index ) ; } } if ( except zombie ) { int j = m contact count ; for ( int i = 0 ; i < j ; i ++ ) { if ( ( m contact buffer [ i ] . flags & particle type . b 2 zombie particle ) != 0 ) { -- j ; particle contact temp = m contact buffer [ j ] ; m contact buffer [ j ] = m contact buffer [ i ] ; m contact buffer [ i ] = temp ; -- i ; } } m contact count = j ; } } <SENTENCE_END/>

(Copy Probability: 4.4%)

<SENTENCE_START> { for ( int p = 0 ; p < m proxy count ; p ++ ) { proxy proxy = m proxy buffer [ p ] ; int i = proxy . index ; vec 2 pos = m position buffer . data [ i ] ; proxy . tag = compute tag ( m inverse diameter * pos . x , m inverse diameter * pos . y ) ; } arrays . sort ( m proxy buffer , 0 , m proxy count ) ; m contact count = 0 ; int c index = 0 ; for ( int i = 0 ; i < m proxy count ; i ++ ) { proxy a = m proxy buffer [ i ] ; long right tag = compute relative tag ( a . tag , 1 , 0 ) ; for ( int j = i + 1 ; j < m proxy count ; j ++ ) { proxy b = m proxy buffer [ j ] ; if ( right tag < b . tag ) { break ; } add contact ( a . index , b . index ) ; } long bottom left tag = compute relative tag ( a . tag , - 1 , 1 ) ; for ( ; c index < m proxy count ; c index ++ ) { proxy c = m proxy buffer [ c index ] ; if ( bottom left tag <= c . tag ) { break ; } } long bottom right tag = compute relative tag ( a . tag , 1 , 1 ) ; for ( int b index = c index ; b index < m proxy count ; b index ++ ) { proxy b = m proxy buffer [ b index ] ; if ( bottom right tag < b . tag ) { break ; } add contact ( a . index , b . index ) ; } } if ( except zombie ) { int j = m contact count ; for ( int i = 0 ; i < j ; i ++ ) { if ( ( m contact buffer [ i ] . flags & particle type . b 2 zombie particle ) != 0 ) { -- j ; particle contact temp = m contact buffer [ j ] ; m contact buffer [ j ] = m contact buffer [ i ] ; m contact buffer [ i ] = temp ; -- i ; } } m contact count = j ; } } <SENTENCE_END/>


Original Name update,body,contacts

update

<SENTENCE_START> { final aabb aabb = temp ; aabb . lower bound . x = float . max value ; aabb . lower bound . y = float . max value ; aabb . upper bound . x = - float . max value ; aabb . upper bound . y = - float . max value ; for ( int i = 0 ; i < m count ; i ++ ) { vec 2 p = m position buffer . data [ i ] ; vec 2 . min to out ( aabb . lower bound , p , aabb . lower bound ) ; vec 2 . max to out ( aabb . upper bound , p , aabb . upper bound ) ; } aabb . lower bound . x -= m particle diameter ; aabb . lower bound . y -= m particle diameter ; aabb . upper bound . x += m particle diameter ; aabb . upper bound . y += m particle diameter ; m body contact count = 0 ; ubccallback . system = this ; m world . query aabb ( ubccallback , aabb ) ; } <SENTENCE_END/>

(Copy Probability: 4.4%)

<SENTENCE_START> { final aabb aabb = temp ; aabb . lower bound . x = float . max value ; aabb . lower bound . y = float . max value ; aabb . upper bound . x = - float . max value ; aabb . upper bound . y = - float . max value ; for ( int i = 0 ; i < m count ; i ++ ) { vec 2 p = m position buffer . data [ i ] ; vec 2 . min to out ( aabb . lower bound , p , aabb . lower bound ) ; vec 2 . max to out ( aabb . upper bound , p , aabb . upper bound ) ; } aabb . lower bound . x -= m particle diameter ; aabb . lower bound . y -= m particle diameter ; aabb . upper bound . x += m particle diameter ; aabb . upper bound . y += m particle diameter ; m body contact count = 0 ; ubccallback . system = this ; m world . query aabb ( ubccallback , aabb ) ; } <SENTENCE_END/>

body

<SENTENCE_START> { final aabb aabb = temp ; aabb . lower bound . x = float . max value ; aabb . lower bound . y = float . max value ; aabb . upper bound . x = - float . max value ; aabb . upper bound . y = - float . max value ; for ( int i = 0 ; i < m count ; i ++ ) { vec 2 p = m position buffer . data [ i ] ; vec 2 . min to out ( aabb . lower bound , p , aabb . lower bound ) ; vec 2 . max to out ( aabb . upper bound , p , aabb . upper bound ) ; } aabb . lower bound . x -= m particle diameter ; aabb . lower bound . y -= m particle diameter ; aabb . upper bound . x += m particle diameter ; aabb . upper bound . y += m particle diameter ; m body contact count = 0 ; ubccallback . system = this ; m world . query aabb ( ubccallback , aabb ) ; } <SENTENCE_END/>

(Copy Probability: 15.8%)

<SENTENCE_START> { final aabb aabb = temp ; aabb . lower bound . x = float . max value ; aabb . lower bound . y = float . max value ; aabb . upper bound . x = - float . max value ; aabb . upper bound . y = - float . max value ; for ( int i = 0 ; i < m count ; i ++ ) { vec 2 p = m position buffer . data [ i ] ; vec 2 . min to out ( aabb . lower bound , p , aabb . lower bound ) ; vec 2 . max to out ( aabb . upper bound , p , aabb . upper bound ) ; } aabb . lower bound . x -= m particle diameter ; aabb . lower bound . y -= m particle diameter ; aabb . upper bound . x += m particle diameter ; aabb . upper bound . y += m particle diameter ; m body contact count = 0 ; ubccallback . system = this ; m world . query aabb ( ubccallback , aabb ) ; } <SENTENCE_END/>

contacts

<SENTENCE_START> { final aabb aabb = temp ; aabb . lower bound . x = float . max value ; aabb . lower bound . y = float . max value ; aabb . upper bound . x = - float . max value ; aabb . upper bound . y = - float . max value ; for ( int i = 0 ; i < m count ; i ++ ) { vec 2 p = m position buffer . data [ i ] ; vec 2 . min to out ( aabb . lower bound , p , aabb . lower bound ) ; vec 2 . max to out ( aabb . upper bound , p , aabb . upper bound ) ; } aabb . lower bound . x -= m particle diameter ; aabb . lower bound . y -= m particle diameter ; aabb . upper bound . x += m particle diameter ; aabb . upper bound . y += m particle diameter ; m body contact count = 0 ; ubccallback . system = this ; m world . query aabb ( ubccallback , aabb ) ; } <SENTENCE_END/>

(Copy Probability: 13.1%)

<SENTENCE_START> { final aabb aabb = temp ; aabb . lower bound . x = float . max value ; aabb . lower bound . y = float . max value ; aabb . upper bound . x = - float . max value ; aabb . upper bound . y = - float . max value ; for ( int i = 0 ; i < m count ; i ++ ) { vec 2 p = m position buffer . data [ i ] ; vec 2 . min to out ( aabb . lower bound , p , aabb . lower bound ) ; vec 2 . max to out ( aabb . upper bound , p , aabb . upper bound ) ; } aabb . lower bound . x -= m particle diameter ; aabb . lower bound . y -= m particle diameter ; aabb . upper bound . x += m particle diameter ; aabb . upper bound . y += m particle diameter ; m body contact count = 0 ; ubccallback . system = this ; m world . query aabb ( ubccallback , aabb ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { final aabb aabb = temp ; aabb . lower bound . x = float . max value ; aabb . lower bound . y = float . max value ; aabb . upper bound . x = - float . max value ; aabb . upper bound . y = - float . max value ; for ( int i = 0 ; i < m count ; i ++ ) { vec 2 p = m position buffer . data [ i ] ; vec 2 . min to out ( aabb . lower bound , p , aabb . lower bound ) ; vec 2 . max to out ( aabb . upper bound , p , aabb . upper bound ) ; } aabb . lower bound . x -= m particle diameter ; aabb . lower bound . y -= m particle diameter ; aabb . upper bound . x += m particle diameter ; aabb . upper bound . y += m particle diameter ; m body contact count = 0 ; ubccallback . system = this ; m world . query aabb ( ubccallback , aabb ) ; } <SENTENCE_END/>

(Copy Probability: 4.8%)

<SENTENCE_START> { final aabb aabb = temp ; aabb . lower bound . x = float . max value ; aabb . lower bound . y = float . max value ; aabb . upper bound . x = - float . max value ; aabb . upper bound . y = - float . max value ; for ( int i = 0 ; i < m count ; i ++ ) { vec 2 p = m position buffer . data [ i ] ; vec 2 . min to out ( aabb . lower bound , p , aabb . lower bound ) ; vec 2 . max to out ( aabb . upper bound , p , aabb . upper bound ) ; } aabb . lower bound . x -= m particle diameter ; aabb . lower bound . y -= m particle diameter ; aabb . upper bound . x += m particle diameter ; aabb . upper bound . y += m particle diameter ; m body contact count = 0 ; ubccallback . system = this ; m world . query aabb ( ubccallback , aabb ) ; } <SENTENCE_END/>


Original Name solve,collision

solve

<SENTENCE_START> { final aabb aabb = temp ; final vec 2 lower bound = aabb . lower bound ; final vec 2 upper bound = aabb . upper bound ; lower bound . x = float . max value ; lower bound . y = float . max value ; upper bound . x = - float . max value ; upper bound . y = - float . max value ; for ( int i = 0 ; i < m count ; i ++ ) { final vec 2 v = m velocity buffer . data [ i ] ; final vec 2 p 1 = m position buffer . data [ i ] ; final float p 1 x = p 1 . x ; final float p 1 y = p 1 . y ; final float p 2 x = p 1 x + step . dt * v . x ; final float p 2 y = p 1 y + step . dt * v . y ; final float bx = p 1 x < p 2 x ? p 1 x : p 2 x ; final float by = p 1 y < p 2 y ? p 1 y : p 2 y ; lower bound . x = lower bound . x < bx ? lower bound . x : bx ; lower bound . y = lower bound . y < by ? lower bound . y : by ; final float b 1 x = p 1 x > p 2 x ? p 1 x : p 2 x ; final float b 1 y = p 1 y > p 2 y ? p 1 y : p 2 y ; upper bound . x = upper bound . x > b 1 x ? upper bound . x : b 1 x ; upper bound . y = upper bound . y > b 1 y ? upper bound . y : b 1 y ; } sccallback . step = step ; sccallback . system = this ; m world . query aabb ( sccallback , aabb ) ; } <SENTENCE_END/>

(Copy Probability: 3.5%)

<SENTENCE_START> { final aabb aabb = temp ; final vec 2 lower bound = aabb . lower bound ; final vec 2 upper bound = aabb . upper bound ; lower bound . x = float . max value ; lower bound . y = float . max value ; upper bound . x = - float . max value ; upper bound . y = - float . max value ; for ( int i = 0 ; i < m count ; i ++ ) { final vec 2 v = m velocity buffer . data [ i ] ; final vec 2 p 1 = m position buffer . data [ i ] ; final float p 1 x = p 1 . x ; final float p 1 y = p 1 . y ; final float p 2 x = p 1 x + step . dt * v . x ; final float p 2 y = p 1 y + step . dt * v . y ; final float bx = p 1 x < p 2 x ? p 1 x : p 2 x ; final float by = p 1 y < p 2 y ? p 1 y : p 2 y ; lower bound . x = lower bound . x < bx ? lower bound . x : bx ; lower bound . y = lower bound . y < by ? lower bound . y : by ; final float b 1 x = p 1 x > p 2 x ? p 1 x : p 2 x ; final float b 1 y = p 1 y > p 2 y ? p 1 y : p 2 y ; upper bound . x = upper bound . x > b 1 x ? upper bound . x : b 1 x ; upper bound . y = upper bound . y > b 1 y ? upper bound . y : b 1 y ; } sccallback . step = step ; sccallback . system = this ; m world . query aabb ( sccallback , aabb ) ; } <SENTENCE_END/>

collision

<SENTENCE_START> { final aabb aabb = temp ; final vec 2 lower bound = aabb . lower bound ; final vec 2 upper bound = aabb . upper bound ; lower bound . x = float . max value ; lower bound . y = float . max value ; upper bound . x = - float . max value ; upper bound . y = - float . max value ; for ( int i = 0 ; i < m count ; i ++ ) { final vec 2 v = m velocity buffer . data [ i ] ; final vec 2 p 1 = m position buffer . data [ i ] ; final float p 1 x = p 1 . x ; final float p 1 y = p 1 . y ; final float p 2 x = p 1 x + step . dt * v . x ; final float p 2 y = p 1 y + step . dt * v . y ; final float bx = p 1 x < p 2 x ? p 1 x : p 2 x ; final float by = p 1 y < p 2 y ? p 1 y : p 2 y ; lower bound . x = lower bound . x < bx ? lower bound . x : bx ; lower bound . y = lower bound . y < by ? lower bound . y : by ; final float b 1 x = p 1 x > p 2 x ? p 1 x : p 2 x ; final float b 1 y = p 1 y > p 2 y ? p 1 y : p 2 y ; upper bound . x = upper bound . x > b 1 x ? upper bound . x : b 1 x ; upper bound . y = upper bound . y > b 1 y ? upper bound . y : b 1 y ; } sccallback . step = step ; sccallback . system = this ; m world . query aabb ( sccallback , aabb ) ; } <SENTENCE_END/>

(Copy Probability: 15.8%)

<SENTENCE_START> { final aabb aabb = temp ; final vec 2 lower bound = aabb . lower bound ; final vec 2 upper bound = aabb . upper bound ; lower bound . x = float . max value ; lower bound . y = float . max value ; upper bound . x = - float . max value ; upper bound . y = - float . max value ; for ( int i = 0 ; i < m count ; i ++ ) { final vec 2 v = m velocity buffer . data [ i ] ; final vec 2 p 1 = m position buffer . data [ i ] ; final float p 1 x = p 1 . x ; final float p 1 y = p 1 . y ; final float p 2 x = p 1 x + step . dt * v . x ; final float p 2 y = p 1 y + step . dt * v . y ; final float bx = p 1 x < p 2 x ? p 1 x : p 2 x ; final float by = p 1 y < p 2 y ? p 1 y : p 2 y ; lower bound . x = lower bound . x < bx ? lower bound . x : bx ; lower bound . y = lower bound . y < by ? lower bound . y : by ; final float b 1 x = p 1 x > p 2 x ? p 1 x : p 2 x ; final float b 1 y = p 1 y > p 2 y ? p 1 y : p 2 y ; upper bound . x = upper bound . x > b 1 x ? upper bound . x : b 1 x ; upper bound . y = upper bound . y > b 1 y ? upper bound . y : b 1 y ; } sccallback . step = step ; sccallback . system = this ; m world . query aabb ( sccallback , aabb ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { final aabb aabb = temp ; final vec 2 lower bound = aabb . lower bound ; final vec 2 upper bound = aabb . upper bound ; lower bound . x = float . max value ; lower bound . y = float . max value ; upper bound . x = - float . max value ; upper bound . y = - float . max value ; for ( int i = 0 ; i < m count ; i ++ ) { final vec 2 v = m velocity buffer . data [ i ] ; final vec 2 p 1 = m position buffer . data [ i ] ; final float p 1 x = p 1 . x ; final float p 1 y = p 1 . y ; final float p 2 x = p 1 x + step . dt * v . x ; final float p 2 y = p 1 y + step . dt * v . y ; final float bx = p 1 x < p 2 x ? p 1 x : p 2 x ; final float by = p 1 y < p 2 y ? p 1 y : p 2 y ; lower bound . x = lower bound . x < bx ? lower bound . x : bx ; lower bound . y = lower bound . y < by ? lower bound . y : by ; final float b 1 x = p 1 x > p 2 x ? p 1 x : p 2 x ; final float b 1 y = p 1 y > p 2 y ? p 1 y : p 2 y ; upper bound . x = upper bound . x > b 1 x ? upper bound . x : b 1 x ; upper bound . y = upper bound . y > b 1 y ? upper bound . y : b 1 y ; } sccallback . step = step ; sccallback . system = this ; m world . query aabb ( sccallback , aabb ) ; } <SENTENCE_END/>

(Copy Probability: 8.2%)

<SENTENCE_START> { final aabb aabb = temp ; final vec 2 lower bound = aabb . lower bound ; final vec 2 upper bound = aabb . upper bound ; lower bound . x = float . max value ; lower bound . y = float . max value ; upper bound . x = - float . max value ; upper bound . y = - float . max value ; for ( int i = 0 ; i < m count ; i ++ ) { final vec 2 v = m velocity buffer . data [ i ] ; final vec 2 p 1 = m position buffer . data [ i ] ; final float p 1 x = p 1 . x ; final float p 1 y = p 1 . y ; final float p 2 x = p 1 x + step . dt * v . x ; final float p 2 y = p 1 y + step . dt * v . y ; final float bx = p 1 x < p 2 x ? p 1 x : p 2 x ; final float by = p 1 y < p 2 y ? p 1 y : p 2 y ; lower bound . x = lower bound . x < bx ? lower bound . x : bx ; lower bound . y = lower bound . y < by ? lower bound . y : by ; final float b 1 x = p 1 x > p 2 x ? p 1 x : p 2 x ; final float b 1 y = p 1 y > p 2 y ? p 1 y : p 2 y ; upper bound . x = upper bound . x > b 1 x ? upper bound . x : b 1 x ; upper bound . y = upper bound . y > b 1 y ? upper bound . y : b 1 y ; } sccallback . step = step ; sccallback . system = this ; m world . query aabb ( sccallback , aabb ) ; } <SENTENCE_END/>


Original Name solve

solve

<SENTENCE_START> { ++ m timestamp ; if ( m count == 0 ) { return ; } m all particle flags = 0 ; for ( int i = 0 ; i < m count ; i ++ ) { m all particle flags |= m flags buffer . data [ i ] ; } if ( ( m all particle flags & particle type . b 2 zombie particle ) != 0 ) { solve zombie ( ) ; } if ( m count == 0 ) { return ; } m all group flags = 0 ; for ( particle group group = m group list ; group != null ; group = group . get next ( ) ) { m all group flags |= group . m group flags ; } final float gravityx = step . dt * m gravity scale * m world . get gravity ( ) . x ; final float gravityy = step . dt * m gravity scale * m world . get gravity ( ) . y ; float critical velocyty squared = get critical velocity squared ( step ) ; for ( int i = 0 ; i < m count ; i ++ ) { vec 2 v = m velocity buffer . data [ i ] ; v . x += gravityx ; v . y += gravityy ; float v 2 = v . x * v . x + v . y * v . y ; if ( v 2 > critical velocyty squared ) { float a = v 2 == 0 ? float . max value : math utils . sqrt ( critical velocyty squared / v 2 ) ; v . x *= a ; v . y *= a ; } } solve collision ( step ) ; if ( ( m all group flags & particle group type . b 2 rigid particle group ) != 0 ) { solve rigid ( step ) ; } if ( ( m all particle flags & particle type . b 2 wall particle ) != 0 ) { solve wall ( step ) ; } for ( int i = 0 ; i < m count ; i ++ ) { vec 2 pos = m position buffer . data [ i ] ; vec 2 vel = m velocity buffer . data [ i ] ; pos . x += step . dt * vel . x ; pos . y += step . dt * vel . y ; } update body contacts ( ) ; update contacts ( false ) ; if ( ( m all particle flags & particle type . b 2 viscous particle ) != 0 ) { solve viscous ( step ) ; } if ( ( m all particle flags & particle type . b 2 powder particle ) != 0 ) { solve powder ( step ) ; } if ( ( m all particle flags & particle type . b 2 tensile particle ) != 0 ) { solve tensile ( step ) ; } if ( ( m all particle flags & particle type . b 2 elastic particle ) != 0 ) { solve elastic ( step ) ; } if ( ( m all particle flags & particle type . b 2 spring particle ) != 0 ) { solve spring ( step ) ; } if ( ( m all group flags & particle group type . b 2 solid particle group ) != 0 ) { solve solid ( step ) ; } if ( ( m all particle flags & particle type . b 2 color mixing particle ) != 0 ) { solve color mixing ( step ) ; } solve pressure ( step ) ; solve damping ( step ) ; } <SENTENCE_END/>

(Copy Probability: 4.0%)

<SENTENCE_START> { ++ m timestamp ; if ( m count == 0 ) { return ; } m all particle flags = 0 ; for ( int i = 0 ; i < m count ; i ++ ) { m all particle flags |= m flags buffer . data [ i ] ; } if ( ( m all particle flags & particle type . b 2 zombie particle ) != 0 ) { solve zombie ( ) ; } if ( m count == 0 ) { return ; } m all group flags = 0 ; for ( particle group group = m group list ; group != null ; group = group . get next ( ) ) { m all group flags |= group . m group flags ; } final float gravityx = step . dt * m gravity scale * m world . get gravity ( ) . x ; final float gravityy = step . dt * m gravity scale * m world . get gravity ( ) . y ; float critical velocyty squared = get critical velocity squared ( step ) ; for ( int i = 0 ; i < m count ; i ++ ) { vec 2 v = m velocity buffer . data [ i ] ; v . x += gravityx ; v . y += gravityy ; float v 2 = v . x * v . x + v . y * v . y ; if ( v 2 > critical velocyty squared ) { float a = v 2 == 0 ? float . max value : math utils . sqrt ( critical velocyty squared / v 2 ) ; v . x *= a ; v . y *= a ; } } solve collision ( step ) ; if ( ( m all group flags & particle group type . b 2 rigid particle group ) != 0 ) { solve rigid ( step ) ; } if ( ( m all particle flags & particle type . b 2 wall particle ) != 0 ) { solve wall ( step ) ; } for ( int i = 0 ; i < m count ; i ++ ) { vec 2 pos = m position buffer . data [ i ] ; vec 2 vel = m velocity buffer . data [ i ] ; pos . x += step . dt * vel . x ; pos . y += step . dt * vel . y ; } update body contacts ( ) ; update contacts ( false ) ; if ( ( m all particle flags & particle type . b 2 viscous particle ) != 0 ) { solve viscous ( step ) ; } if ( ( m all particle flags & particle type . b 2 powder particle ) != 0 ) { solve powder ( step ) ; } if ( ( m all particle flags & particle type . b 2 tensile particle ) != 0 ) { solve tensile ( step ) ; } if ( ( m all particle flags & particle type . b 2 elastic particle ) != 0 ) { solve elastic ( step ) ; } if ( ( m all particle flags & particle type . b 2 spring particle ) != 0 ) { solve spring ( step ) ; } if ( ( m all group flags & particle group type . b 2 solid particle group ) != 0 ) { solve solid ( step ) ; } if ( ( m all particle flags & particle type . b 2 color mixing particle ) != 0 ) { solve color mixing ( step ) ; } solve pressure ( step ) ; solve damping ( step ) ; } <SENTENCE_END/>

%END%

<SENTENCE_START> { ++ m timestamp ; if ( m count == 0 ) { return ; } m all particle flags = 0 ; for ( int i = 0 ; i < m count ; i ++ ) { m all particle flags |= m flags buffer . data [ i ] ; } if ( ( m all particle flags & particle type . b 2 zombie particle ) != 0 ) { solve zombie ( ) ; } if ( m count == 0 ) { return ; } m all group flags = 0 ; for ( particle group group = m group list ; group != null ; group = group . get next ( ) ) { m all group flags |= group . m group flags ; } final float gravityx = step . dt * m gravity scale * m world . get gravity ( ) . x ; final float gravityy = step . dt * m gravity scale * m world . get gravity ( ) . y ; float critical velocyty squared = get critical velocity squared ( step ) ; for ( int i = 0 ; i < m count ; i ++ ) { vec 2 v = m velocity buffer . data [ i ] ; v . x += gravityx ; v . y += gravityy ; float v 2 = v . x * v . x + v . y * v . y ; if ( v 2 > critical velocyty squared ) { float a = v 2 == 0 ? float . max value : math utils . sqrt ( critical velocyty squared / v 2 ) ; v . x *= a ; v . y *= a ; } } solve collision ( step ) ; if ( ( m all group flags & particle group type . b 2 rigid particle group ) != 0 ) { solve rigid ( step ) ; } if ( ( m all particle flags & particle type . b 2 wall particle ) != 0 ) { solve wall ( step ) ; } for ( int i = 0 ; i < m count ; i ++ ) { vec 2 pos = m position buffer . data [ i ] ; vec 2 vel = m velocity buffer . data [ i ] ; pos . x += step . dt * vel . x ; pos . y += step . dt * vel . y ; } update body contacts ( ) ; update contacts ( false ) ; if ( ( m all particle flags & particle type . b 2 viscous particle ) != 0 ) { solve viscous ( step ) ; } if ( ( m all particle flags & particle type . b 2 powder particle ) != 0 ) { solve powder ( step ) ; } if ( ( m all particle flags & particle type . b 2 tensile particle ) != 0 ) { solve tensile ( step ) ; } if ( ( m all particle flags & particle type . b 2 elastic particle ) != 0 ) { solve elastic ( step ) ; } if ( ( m all particle flags & particle type . b 2 spring particle ) != 0 ) { solve spring ( step ) ; } if ( ( m all group flags & particle group type . b 2 solid particle group ) != 0 ) { solve solid ( step ) ; } if ( ( m all particle flags & particle type . b 2 color mixing particle ) != 0 ) { solve color mixing ( step ) ; } solve pressure ( step ) ; solve damping ( step ) ; } <SENTENCE_END/>

(Copy Probability: 9.3%)

<SENTENCE_START> { ++ m timestamp ; if ( m count == 0 ) { return ; } m all particle flags = 0 ; for ( int i = 0 ; i < m count ; i ++ ) { m all particle flags |= m flags buffer . data [ i ] ; } if ( ( m all particle flags & particle type . b 2 zombie particle ) != 0 ) { solve zombie ( ) ; } if ( m count == 0 ) { return ; } m all group flags = 0 ; for ( particle group group = m group list ; group != null ; group = group . get next ( ) ) { m all group flags |= group . m group flags ; } final float gravityx = step . dt * m gravity scale * m world . get gravity ( ) . x ; final float gravityy = step . dt * m gravity scale * m world . get gravity ( ) . y ; float critical velocyty squared = get critical velocity squared ( step ) ; for ( int i = 0 ; i < m count ; i ++ ) { vec 2 v = m velocity buffer . data [ i ] ; v . x += gravityx ; v . y += gravityy ; float v 2 = v . x * v . x + v . y * v . y ; if ( v 2 > critical velocyty squared ) { float a = v 2 == 0 ? float . max value : math utils . sqrt ( critical velocyty squared / v 2 ) ; v . x *= a ; v . y *= a ; } } solve collision ( step ) ; if ( ( m all group flags & particle group type . b 2 rigid particle group ) != 0 ) { solve rigid ( step ) ; } if ( ( m all particle flags & particle type . b 2 wall particle ) != 0 ) { solve wall ( step ) ; } for ( int i = 0 ; i < m count ; i ++ ) { vec 2 pos = m position buffer . data [ i ] ; vec 2 vel = m velocity buffer . data [ i ] ; pos . x += step . dt * vel . x ; pos . y += step . dt * vel . y ; } update body contacts ( ) ; update contacts ( false ) ; if ( ( m all particle flags & particle type . b 2 viscous particle ) != 0 ) { solve viscous ( step ) ; } if ( ( m all particle flags & particle type . b 2 powder particle ) != 0 ) { solve powder ( step ) ; } if ( ( m all particle flags & particle type . b 2 tensile particle ) != 0 ) { solve tensile ( step ) ; } if ( ( m all particle flags & particle type . b 2 elastic particle ) != 0 ) { solve elastic ( step ) ; } if ( ( m all particle flags & particle type . b 2 spring particle ) != 0 ) { solve spring ( step ) ; } if ( ( m all group flags & particle group type . b 2 solid particle group ) != 0 ) { solve solid ( step ) ; } if ( ( m all particle flags & particle type . b 2 color mixing particle ) != 0 ) { solve color mixing ( step ) ; } solve pressure ( step ) ; solve damping ( step ) ; } <SENTENCE_END/>


Original Name solve,pressure

solve

<SENTENCE_START> { for ( int i = 0 ; i < m count ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m body contact count ; k ++ ) { particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; float w = contact . weight ; m accumulation buffer [ a ] += w ; } for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } if ( ( m all particle flags & k no pressure flags ) != 0 ) { for ( int i = 0 ; i < m count ; i ++ ) { if ( ( m flags buffer . data [ i ] & k no pressure flags ) != 0 ) { m accumulation buffer [ i ] = 0 ; } } } float pressure per weight = m pressure strength * get critical pressure ( step ) ; for ( int i = 0 ; i < m count ; i ++ ) { float w = m accumulation buffer [ i ] ; float h = pressure per weight * math utils . max ( 0.0f , math utils . min ( w , settings . max particle weight ) - settings . min particle weight ) ; m accumulation buffer [ i ] = h ; } float velocity per pressure = step . dt / ( m density * m particle diameter ) ; for ( int k = 0 ; k < m body contact count ; k ++ ) { particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; body b = contact . body ; float w = contact . weight ; float m = contact . mass ; vec 2 n = contact . normal ; vec 2 p = m position buffer . data [ a ] ; float h = m accumulation buffer [ a ] + pressure per weight * w ; final vec 2 f = temp vec ; final float coef = velocity per pressure * w * m * h ; f . x = coef * n . x ; f . y = coef * n . y ; final vec 2 vel data = m velocity buffer . data [ a ] ; final float particle inv mass = get particle inv mass ( ) ; vel data . x -= particle inv mass * f . x ; vel data . y -= particle inv mass * f . y ; b . apply linear impulse ( f , p , true ) ; } for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; vec 2 n = contact . normal ; float h = m accumulation buffer [ a ] + m accumulation buffer [ b ] ; final float fx = velocity per pressure * w * h * n . x ; final float fy = velocity per pressure * w * h * n . y ; final vec 2 vel data a = m velocity buffer . data [ a ] ; final vec 2 vel data b = m velocity buffer . data [ b ] ; vel data a . x -= fx ; vel data a . y -= fy ; vel data b . x += fx ; vel data b . y += fy ; } } <SENTENCE_END/>

(Copy Probability: 3.3%)

<SENTENCE_START> { for ( int i = 0 ; i < m count ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m body contact count ; k ++ ) { particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; float w = contact . weight ; m accumulation buffer [ a ] += w ; } for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } if ( ( m all particle flags & k no pressure flags ) != 0 ) { for ( int i = 0 ; i < m count ; i ++ ) { if ( ( m flags buffer . data [ i ] & k no pressure flags ) != 0 ) { m accumulation buffer [ i ] = 0 ; } } } float pressure per weight = m pressure strength * get critical pressure ( step ) ; for ( int i = 0 ; i < m count ; i ++ ) { float w = m accumulation buffer [ i ] ; float h = pressure per weight * math utils . max ( 0.0f , math utils . min ( w , settings . max particle weight ) - settings . min particle weight ) ; m accumulation buffer [ i ] = h ; } float velocity per pressure = step . dt / ( m density * m particle diameter ) ; for ( int k = 0 ; k < m body contact count ; k ++ ) { particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; body b = contact . body ; float w = contact . weight ; float m = contact . mass ; vec 2 n = contact . normal ; vec 2 p = m position buffer . data [ a ] ; float h = m accumulation buffer [ a ] + pressure per weight * w ; final vec 2 f = temp vec ; final float coef = velocity per pressure * w * m * h ; f . x = coef * n . x ; f . y = coef * n . y ; final vec 2 vel data = m velocity buffer . data [ a ] ; final float particle inv mass = get particle inv mass ( ) ; vel data . x -= particle inv mass * f . x ; vel data . y -= particle inv mass * f . y ; b . apply linear impulse ( f , p , true ) ; } for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; vec 2 n = contact . normal ; float h = m accumulation buffer [ a ] + m accumulation buffer [ b ] ; final float fx = velocity per pressure * w * h * n . x ; final float fy = velocity per pressure * w * h * n . y ; final vec 2 vel data a = m velocity buffer . data [ a ] ; final vec 2 vel data b = m velocity buffer . data [ b ] ; vel data a . x -= fx ; vel data a . y -= fy ; vel data b . x += fx ; vel data b . y += fy ; } } <SENTENCE_END/>

pressure

<SENTENCE_START> { for ( int i = 0 ; i < m count ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m body contact count ; k ++ ) { particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; float w = contact . weight ; m accumulation buffer [ a ] += w ; } for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } if ( ( m all particle flags & k no pressure flags ) != 0 ) { for ( int i = 0 ; i < m count ; i ++ ) { if ( ( m flags buffer . data [ i ] & k no pressure flags ) != 0 ) { m accumulation buffer [ i ] = 0 ; } } } float pressure per weight = m pressure strength * get critical pressure ( step ) ; for ( int i = 0 ; i < m count ; i ++ ) { float w = m accumulation buffer [ i ] ; float h = pressure per weight * math utils . max ( 0.0f , math utils . min ( w , settings . max particle weight ) - settings . min particle weight ) ; m accumulation buffer [ i ] = h ; } float velocity per pressure = step . dt / ( m density * m particle diameter ) ; for ( int k = 0 ; k < m body contact count ; k ++ ) { particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; body b = contact . body ; float w = contact . weight ; float m = contact . mass ; vec 2 n = contact . normal ; vec 2 p = m position buffer . data [ a ] ; float h = m accumulation buffer [ a ] + pressure per weight * w ; final vec 2 f = temp vec ; final float coef = velocity per pressure * w * m * h ; f . x = coef * n . x ; f . y = coef * n . y ; final vec 2 vel data = m velocity buffer . data [ a ] ; final float particle inv mass = get particle inv mass ( ) ; vel data . x -= particle inv mass * f . x ; vel data . y -= particle inv mass * f . y ; b . apply linear impulse ( f , p , true ) ; } for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; vec 2 n = contact . normal ; float h = m accumulation buffer [ a ] + m accumulation buffer [ b ] ; final float fx = velocity per pressure * w * h * n . x ; final float fy = velocity per pressure * w * h * n . y ; final vec 2 vel data a = m velocity buffer . data [ a ] ; final vec 2 vel data b = m velocity buffer . data [ b ] ; vel data a . x -= fx ; vel data a . y -= fy ; vel data b . x += fx ; vel data b . y += fy ; } } <SENTENCE_END/>

(Copy Probability: 9.0%)

<SENTENCE_START> { for ( int i = 0 ; i < m count ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m body contact count ; k ++ ) { particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; float w = contact . weight ; m accumulation buffer [ a ] += w ; } for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } if ( ( m all particle flags & k no pressure flags ) != 0 ) { for ( int i = 0 ; i < m count ; i ++ ) { if ( ( m flags buffer . data [ i ] & k no pressure flags ) != 0 ) { m accumulation buffer [ i ] = 0 ; } } } float pressure per weight = m pressure strength * get critical pressure ( step ) ; for ( int i = 0 ; i < m count ; i ++ ) { float w = m accumulation buffer [ i ] ; float h = pressure per weight * math utils . max ( 0.0f , math utils . min ( w , settings . max particle weight ) - settings . min particle weight ) ; m accumulation buffer [ i ] = h ; } float velocity per pressure = step . dt / ( m density * m particle diameter ) ; for ( int k = 0 ; k < m body contact count ; k ++ ) { particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; body b = contact . body ; float w = contact . weight ; float m = contact . mass ; vec 2 n = contact . normal ; vec 2 p = m position buffer . data [ a ] ; float h = m accumulation buffer [ a ] + pressure per weight * w ; final vec 2 f = temp vec ; final float coef = velocity per pressure * w * m * h ; f . x = coef * n . x ; f . y = coef * n . y ; final vec 2 vel data = m velocity buffer . data [ a ] ; final float particle inv mass = get particle inv mass ( ) ; vel data . x -= particle inv mass * f . x ; vel data . y -= particle inv mass * f . y ; b . apply linear impulse ( f , p , true ) ; } for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; vec 2 n = contact . normal ; float h = m accumulation buffer [ a ] + m accumulation buffer [ b ] ; final float fx = velocity per pressure * w * h * n . x ; final float fy = velocity per pressure * w * h * n . y ; final vec 2 vel data a = m velocity buffer . data [ a ] ; final vec 2 vel data b = m velocity buffer . data [ b ] ; vel data a . x -= fx ; vel data a . y -= fy ; vel data b . x += fx ; vel data b . y += fy ; } } <SENTENCE_END/>

%END%

<SENTENCE_START> { for ( int i = 0 ; i < m count ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m body contact count ; k ++ ) { particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; float w = contact . weight ; m accumulation buffer [ a ] += w ; } for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } if ( ( m all particle flags & k no pressure flags ) != 0 ) { for ( int i = 0 ; i < m count ; i ++ ) { if ( ( m flags buffer . data [ i ] & k no pressure flags ) != 0 ) { m accumulation buffer [ i ] = 0 ; } } } float pressure per weight = m pressure strength * get critical pressure ( step ) ; for ( int i = 0 ; i < m count ; i ++ ) { float w = m accumulation buffer [ i ] ; float h = pressure per weight * math utils . max ( 0.0f , math utils . min ( w , settings . max particle weight ) - settings . min particle weight ) ; m accumulation buffer [ i ] = h ; } float velocity per pressure = step . dt / ( m density * m particle diameter ) ; for ( int k = 0 ; k < m body contact count ; k ++ ) { particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; body b = contact . body ; float w = contact . weight ; float m = contact . mass ; vec 2 n = contact . normal ; vec 2 p = m position buffer . data [ a ] ; float h = m accumulation buffer [ a ] + pressure per weight * w ; final vec 2 f = temp vec ; final float coef = velocity per pressure * w * m * h ; f . x = coef * n . x ; f . y = coef * n . y ; final vec 2 vel data = m velocity buffer . data [ a ] ; final float particle inv mass = get particle inv mass ( ) ; vel data . x -= particle inv mass * f . x ; vel data . y -= particle inv mass * f . y ; b . apply linear impulse ( f , p , true ) ; } for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; vec 2 n = contact . normal ; float h = m accumulation buffer [ a ] + m accumulation buffer [ b ] ; final float fx = velocity per pressure * w * h * n . x ; final float fy = velocity per pressure * w * h * n . y ; final vec 2 vel data a = m velocity buffer . data [ a ] ; final vec 2 vel data b = m velocity buffer . data [ b ] ; vel data a . x -= fx ; vel data a . y -= fy ; vel data b . x += fx ; vel data b . y += fy ; } } <SENTENCE_END/>

(Copy Probability: 8.8%)

<SENTENCE_START> { for ( int i = 0 ; i < m count ; i ++ ) { m accumulation buffer [ i ] = 0 ; } for ( int k = 0 ; k < m body contact count ; k ++ ) { particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; float w = contact . weight ; m accumulation buffer [ a ] += w ; } for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; m accumulation buffer [ a ] += w ; m accumulation buffer [ b ] += w ; } if ( ( m all particle flags & k no pressure flags ) != 0 ) { for ( int i = 0 ; i < m count ; i ++ ) { if ( ( m flags buffer . data [ i ] & k no pressure flags ) != 0 ) { m accumulation buffer [ i ] = 0 ; } } } float pressure per weight = m pressure strength * get critical pressure ( step ) ; for ( int i = 0 ; i < m count ; i ++ ) { float w = m accumulation buffer [ i ] ; float h = pressure per weight * math utils . max ( 0.0f , math utils . min ( w , settings . max particle weight ) - settings . min particle weight ) ; m accumulation buffer [ i ] = h ; } float velocity per pressure = step . dt / ( m density * m particle diameter ) ; for ( int k = 0 ; k < m body contact count ; k ++ ) { particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; body b = contact . body ; float w = contact . weight ; float m = contact . mass ; vec 2 n = contact . normal ; vec 2 p = m position buffer . data [ a ] ; float h = m accumulation buffer [ a ] + pressure per weight * w ; final vec 2 f = temp vec ; final float coef = velocity per pressure * w * m * h ; f . x = coef * n . x ; f . y = coef * n . y ; final vec 2 vel data = m velocity buffer . data [ a ] ; final float particle inv mass = get particle inv mass ( ) ; vel data . x -= particle inv mass * f . x ; vel data . y -= particle inv mass * f . y ; b . apply linear impulse ( f , p , true ) ; } for ( int k = 0 ; k < m contact count ; k ++ ) { particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; vec 2 n = contact . normal ; float h = m accumulation buffer [ a ] + m accumulation buffer [ b ] ; final float fx = velocity per pressure * w * h * n . x ; final float fy = velocity per pressure * w * h * n . y ; final vec 2 vel data a = m velocity buffer . data [ a ] ; final vec 2 vel data b = m velocity buffer . data [ b ] ; vel data a . x -= fx ; vel data a . y -= fy ; vel data b . x += fx ; vel data b . y += fy ; } } <SENTENCE_END/>


Original Name solve,damping

solve

<SENTENCE_START> { float damping = m damping strength ; for ( int k = 0 ; k < m body contact count ; k ++ ) { final particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; body b = contact . body ; float w = contact . weight ; float m = contact . mass ; vec 2 n = contact . normal ; vec 2 p = m position buffer . data [ a ] ; final float temp x = p . x - b . m sweep . c . x ; final float temp y = p . y - b . m sweep . c . y ; final vec 2 vel a = m velocity buffer . data [ a ] ; float vx = - b . m angular velocity * temp y + b . m linear velocity . x - vel a . x ; float vy = b . m angular velocity * temp x + b . m linear velocity . y - vel a . y ; float vn = vx * n . x + vy * n . y ; if ( vn < 0 ) { final vec 2 f = temp vec ; f . x = damping * w * m * vn * n . x ; f . y = damping * w * m * vn * n . y ; final float inv mass = get particle inv mass ( ) ; vel a . x += inv mass * f . x ; vel a . y += inv mass * f . y ; f . x = - f . x ; f . y = - f . y ; b . apply linear impulse ( f , p , true ) ; } } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; vec 2 n = contact . normal ; final vec 2 vel a = m velocity buffer . data [ a ] ; final vec 2 vel b = m velocity buffer . data [ b ] ; final float vx = vel b . x - vel a . x ; final float vy = vel b . y - vel a . y ; float vn = vx * n . x + vy * n . y ; if ( vn < 0 ) { float fx = damping * w * vn * n . x ; float fy = damping * w * vn * n . y ; vel a . x += fx ; vel a . y += fy ; vel b . x -= fx ; vel b . y -= fy ; } } } <SENTENCE_END/>

(Copy Probability: 3.5%)

<SENTENCE_START> { float damping = m damping strength ; for ( int k = 0 ; k < m body contact count ; k ++ ) { final particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; body b = contact . body ; float w = contact . weight ; float m = contact . mass ; vec 2 n = contact . normal ; vec 2 p = m position buffer . data [ a ] ; final float temp x = p . x - b . m sweep . c . x ; final float temp y = p . y - b . m sweep . c . y ; final vec 2 vel a = m velocity buffer . data [ a ] ; float vx = - b . m angular velocity * temp y + b . m linear velocity . x - vel a . x ; float vy = b . m angular velocity * temp x + b . m linear velocity . y - vel a . y ; float vn = vx * n . x + vy * n . y ; if ( vn < 0 ) { final vec 2 f = temp vec ; f . x = damping * w * m * vn * n . x ; f . y = damping * w * m * vn * n . y ; final float inv mass = get particle inv mass ( ) ; vel a . x += inv mass * f . x ; vel a . y += inv mass * f . y ; f . x = - f . x ; f . y = - f . y ; b . apply linear impulse ( f , p , true ) ; } } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; vec 2 n = contact . normal ; final vec 2 vel a = m velocity buffer . data [ a ] ; final vec 2 vel b = m velocity buffer . data [ b ] ; final float vx = vel b . x - vel a . x ; final float vy = vel b . y - vel a . y ; float vn = vx * n . x + vy * n . y ; if ( vn < 0 ) { float fx = damping * w * vn * n . x ; float fy = damping * w * vn * n . y ; vel a . x += fx ; vel a . y += fy ; vel b . x -= fx ; vel b . y -= fy ; } } } <SENTENCE_END/>

damping

<SENTENCE_START> { float damping = m damping strength ; for ( int k = 0 ; k < m body contact count ; k ++ ) { final particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; body b = contact . body ; float w = contact . weight ; float m = contact . mass ; vec 2 n = contact . normal ; vec 2 p = m position buffer . data [ a ] ; final float temp x = p . x - b . m sweep . c . x ; final float temp y = p . y - b . m sweep . c . y ; final vec 2 vel a = m velocity buffer . data [ a ] ; float vx = - b . m angular velocity * temp y + b . m linear velocity . x - vel a . x ; float vy = b . m angular velocity * temp x + b . m linear velocity . y - vel a . y ; float vn = vx * n . x + vy * n . y ; if ( vn < 0 ) { final vec 2 f = temp vec ; f . x = damping * w * m * vn * n . x ; f . y = damping * w * m * vn * n . y ; final float inv mass = get particle inv mass ( ) ; vel a . x += inv mass * f . x ; vel a . y += inv mass * f . y ; f . x = - f . x ; f . y = - f . y ; b . apply linear impulse ( f , p , true ) ; } } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; vec 2 n = contact . normal ; final vec 2 vel a = m velocity buffer . data [ a ] ; final vec 2 vel b = m velocity buffer . data [ b ] ; final float vx = vel b . x - vel a . x ; final float vy = vel b . y - vel a . y ; float vn = vx * n . x + vy * n . y ; if ( vn < 0 ) { float fx = damping * w * vn * n . x ; float fy = damping * w * vn * n . y ; vel a . x += fx ; vel a . y += fy ; vel b . x -= fx ; vel b . y -= fy ; } } } <SENTENCE_END/>

(Copy Probability: 9.5%)

<SENTENCE_START> { float damping = m damping strength ; for ( int k = 0 ; k < m body contact count ; k ++ ) { final particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; body b = contact . body ; float w = contact . weight ; float m = contact . mass ; vec 2 n = contact . normal ; vec 2 p = m position buffer . data [ a ] ; final float temp x = p . x - b . m sweep . c . x ; final float temp y = p . y - b . m sweep . c . y ; final vec 2 vel a = m velocity buffer . data [ a ] ; float vx = - b . m angular velocity * temp y + b . m linear velocity . x - vel a . x ; float vy = b . m angular velocity * temp x + b . m linear velocity . y - vel a . y ; float vn = vx * n . x + vy * n . y ; if ( vn < 0 ) { final vec 2 f = temp vec ; f . x = damping * w * m * vn * n . x ; f . y = damping * w * m * vn * n . y ; final float inv mass = get particle inv mass ( ) ; vel a . x += inv mass * f . x ; vel a . y += inv mass * f . y ; f . x = - f . x ; f . y = - f . y ; b . apply linear impulse ( f , p , true ) ; } } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; vec 2 n = contact . normal ; final vec 2 vel a = m velocity buffer . data [ a ] ; final vec 2 vel b = m velocity buffer . data [ b ] ; final float vx = vel b . x - vel a . x ; final float vy = vel b . y - vel a . y ; float vn = vx * n . x + vy * n . y ; if ( vn < 0 ) { float fx = damping * w * vn * n . x ; float fy = damping * w * vn * n . y ; vel a . x += fx ; vel a . y += fy ; vel b . x -= fx ; vel b . y -= fy ; } } } <SENTENCE_END/>

%END%

<SENTENCE_START> { float damping = m damping strength ; for ( int k = 0 ; k < m body contact count ; k ++ ) { final particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; body b = contact . body ; float w = contact . weight ; float m = contact . mass ; vec 2 n = contact . normal ; vec 2 p = m position buffer . data [ a ] ; final float temp x = p . x - b . m sweep . c . x ; final float temp y = p . y - b . m sweep . c . y ; final vec 2 vel a = m velocity buffer . data [ a ] ; float vx = - b . m angular velocity * temp y + b . m linear velocity . x - vel a . x ; float vy = b . m angular velocity * temp x + b . m linear velocity . y - vel a . y ; float vn = vx * n . x + vy * n . y ; if ( vn < 0 ) { final vec 2 f = temp vec ; f . x = damping * w * m * vn * n . x ; f . y = damping * w * m * vn * n . y ; final float inv mass = get particle inv mass ( ) ; vel a . x += inv mass * f . x ; vel a . y += inv mass * f . y ; f . x = - f . x ; f . y = - f . y ; b . apply linear impulse ( f , p , true ) ; } } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; vec 2 n = contact . normal ; final vec 2 vel a = m velocity buffer . data [ a ] ; final vec 2 vel b = m velocity buffer . data [ b ] ; final float vx = vel b . x - vel a . x ; final float vy = vel b . y - vel a . y ; float vn = vx * n . x + vy * n . y ; if ( vn < 0 ) { float fx = damping * w * vn * n . x ; float fy = damping * w * vn * n . y ; vel a . x += fx ; vel a . y += fy ; vel b . x -= fx ; vel b . y -= fy ; } } } <SENTENCE_END/>

(Copy Probability: 13.8%)

<SENTENCE_START> { float damping = m damping strength ; for ( int k = 0 ; k < m body contact count ; k ++ ) { final particle body contact contact = m body contact buffer [ k ] ; int a = contact . index ; body b = contact . body ; float w = contact . weight ; float m = contact . mass ; vec 2 n = contact . normal ; vec 2 p = m position buffer . data [ a ] ; final float temp x = p . x - b . m sweep . c . x ; final float temp y = p . y - b . m sweep . c . y ; final vec 2 vel a = m velocity buffer . data [ a ] ; float vx = - b . m angular velocity * temp y + b . m linear velocity . x - vel a . x ; float vy = b . m angular velocity * temp x + b . m linear velocity . y - vel a . y ; float vn = vx * n . x + vy * n . y ; if ( vn < 0 ) { final vec 2 f = temp vec ; f . x = damping * w * m * vn * n . x ; f . y = damping * w * m * vn * n . y ; final float inv mass = get particle inv mass ( ) ; vel a . x += inv mass * f . x ; vel a . y += inv mass * f . y ; f . x = - f . x ; f . y = - f . y ; b . apply linear impulse ( f , p , true ) ; } } for ( int k = 0 ; k < m contact count ; k ++ ) { final particle contact contact = m contact buffer [ k ] ; int a = contact . index a ; int b = contact . index b ; float w = contact . weight ; vec 2 n = contact . normal ; final vec 2 vel a = m velocity buffer . data [ a ] ; final vec 2 vel b = m velocity buffer . data [ b ] ; final float vx = vel b . x - vel a . x ; final float vy = vel b . y - vel a . y ; float vn = vx * n . x + vy * n . y ; if ( vn < 0 ) { float fx = damping * w * vn * n . x ; float fy = damping * w * vn * n . y ; vel a . x += fx ; vel a . y += fy ; vel b . x -= fx ; vel b . y -= fy ; } } } <SENTENCE_END/>


Original Name solve,wall

solve

<SENTENCE_START> { for ( int i = 0 ; i < m count ; i ++ ) { if ( ( m flags buffer . data [ i ] & particle type . b 2 wall particle ) != 0 ) { final vec 2 r = m velocity buffer . data [ i ] ; r . x = 0.0f ; r . y = 0.0f ; } } } <SENTENCE_END/>

(Copy Probability: 3.4%)

<SENTENCE_START> { for ( int i = 0 ; i < m count ; i ++ ) { if ( ( m flags buffer . data [ i ] & particle type . b 2 wall particle ) != 0 ) { final vec 2 r = m velocity buffer . data [ i ] ; r . x = 0.0f ; r . y = 0.0f ; } } } <SENTENCE_END/>

wall

<SENTENCE_START> { for ( int i = 0 ; i < m count ; i ++ ) { if ( ( m flags buffer . data [ i ] & particle type . b 2 wall particle ) != 0 ) { final vec 2 r = m velocity buffer . data [ i ] ; r . x = 0.0f ; r . y = 0.0f ; } } } <SENTENCE_END/>

(Copy Probability: 48.8%)

<SENTENCE_START> { for ( int i = 0 ; i < m count ; i ++ ) { if ( ( m flags buffer . data [ i ] & particle type . b 2 wall particle ) != 0 ) { final vec 2 r = m velocity buffer . data [ i ] ; r . x = 0.0f ; r . y = 0.0f ; } } } <SENTENCE_END/>

%END%

<SENTENCE_START> { for ( int i = 0 ; i < m count ; i ++ ) { if ( ( m flags buffer . data [ i ] & particle type . b 2 wall particle ) != 0 ) { final vec 2 r = m velocity buffer . data [ i ] ; r . x = 0.0f ; r . y = 0.0f ; } } } <SENTENCE_END/>

(Copy Probability: 9.1%)

<SENTENCE_START> { for ( int i = 0 ; i < m count ; i ++ ) { if ( ( m flags buffer . data [ i ] & particle type . b 2 wall particle ) != 0 ) { final vec 2 r = m velocity buffer . data [ i ] ; r . x = 0.0f ; r . y = 0.0f ; } } } <SENTENCE_END/>


Original Name solve,rigid

solve

<SENTENCE_START> { for ( particle group group = m group list ; group != null ; group = group . get next ( ) ) { if ( ( group . m group flags & particle group type . b 2 rigid particle group ) != 0 ) { group . update statistics ( ) ; vec 2 temp = temp vec ; vec 2 cross = temp vec 2 ; rot rotation = temp rot ; rotation . set ( step . dt * group . m angular velocity ) ; rot . mul to out unsafe ( rotation , group . m center , cross ) ; temp . set ( group . m linear velocity ) . mul local ( step . dt ) . add local ( group . m center ) . sub local ( cross ) ; temp xf . p . set ( temp ) ; temp xf . q . set ( rotation ) ; transform . mul to out ( temp xf , group . m transform , group . m transform ) ; final transform velocity transform = temp xf 2 ; velocity transform . p . x = step . inv dt * temp xf . p . x ; velocity transform . p . y = step . inv dt * temp xf . p . y ; velocity transform . q . s = step . inv dt * temp xf . q . s ; velocity transform . q . c = step . inv dt * ( temp xf . q . c - 1 ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { transform . mul to out unsafe ( velocity transform , m position buffer . data [ i ] , m velocity buffer . data [ i ] ) ; } } } } <SENTENCE_END/>

(Copy Probability: 3.4%)

<SENTENCE_START> { for ( particle group group = m group list ; group != null ; group = group . get next ( ) ) { if ( ( group . m group flags & particle group type . b 2 rigid particle group ) != 0 ) { group . update statistics ( ) ; vec 2 temp = temp vec ; vec 2 cross = temp vec 2 ; rot rotation = temp rot ; rotation . set ( step . dt * group . m angular velocity ) ; rot . mul to out unsafe ( rotation , group . m center , cross ) ; temp . set ( group . m linear velocity ) . mul local ( step . dt ) . add local ( group . m center ) . sub local ( cross ) ; temp xf . p . set ( temp ) ; temp xf . q . set ( rotation ) ; transform . mul to out ( temp xf , group . m transform , group . m transform ) ; final transform velocity transform = temp xf 2 ; velocity transform . p . x = step . inv dt * temp xf . p . x ; velocity transform . p . y = step . inv dt * temp xf . p . y ; velocity transform . q . s = step . inv dt * temp xf . q . s ; velocity transform . q . c = step . inv dt * ( temp xf . q . c - 1 ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { transform . mul to out unsafe ( velocity transform , m position buffer . data [ i ] , m velocity buffer . data [ i ] ) ; } } } } <SENTENCE_END/>

rigid

<SENTENCE_START> { for ( particle group group = m group list ; group != null ; group = group . get next ( ) ) { if ( ( group . m group flags & particle group type . b 2 rigid particle group ) != 0 ) { group . update statistics ( ) ; vec 2 temp = temp vec ; vec 2 cross = temp vec 2 ; rot rotation = temp rot ; rotation . set ( step . dt * group . m angular velocity ) ; rot . mul to out unsafe ( rotation , group . m center , cross ) ; temp . set ( group . m linear velocity ) . mul local ( step . dt ) . add local ( group . m center ) . sub local ( cross ) ; temp xf . p . set ( temp ) ; temp xf . q . set ( rotation ) ; transform . mul to out ( temp xf , group . m transform , group . m transform ) ; final transform velocity transform = temp xf 2 ; velocity transform . p . x = step . inv dt * temp xf . p . x ; velocity transform . p . y = step . inv dt * temp xf . p . y ; velocity transform . q . s = step . inv dt * temp xf . q . s ; velocity transform . q . c = step . inv dt * ( temp xf . q . c - 1 ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { transform . mul to out unsafe ( velocity transform , m position buffer . data [ i ] , m velocity buffer . data [ i ] ) ; } } } } <SENTENCE_END/>

(Copy Probability: 13.3%)

<SENTENCE_START> { for ( particle group group = m group list ; group != null ; group = group . get next ( ) ) { if ( ( group . m group flags & particle group type . b 2 rigid particle group ) != 0 ) { group . update statistics ( ) ; vec 2 temp = temp vec ; vec 2 cross = temp vec 2 ; rot rotation = temp rot ; rotation . set ( step . dt * group . m angular velocity ) ; rot . mul to out unsafe ( rotation , group . m center , cross ) ; temp . set ( group . m linear velocity ) . mul local ( step . dt ) . add local ( group . m center ) . sub local ( cross ) ; temp xf . p . set ( temp ) ; temp xf . q . set ( rotation ) ; transform . mul to out ( temp xf , group . m transform , group . m transform ) ; final transform velocity transform = temp xf 2 ; velocity transform . p . x = step . inv dt * temp xf . p . x ; velocity transform . p . y = step . inv dt * temp xf . p . y ; velocity transform . q . s = step . inv dt * temp xf . q . s ; velocity transform . q . c = step . inv dt * ( temp xf . q . c - 1 ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { transform . mul to out unsafe ( velocity transform , m position buffer . data [ i ] , m velocity buffer . data [ i ] ) ; } } } } <SENTENCE_END/>

%END%

<SENTENCE_START> { for ( particle group group = m group list ; group != null ; group = group . get next ( ) ) { if ( ( group . m group flags & particle group type . b 2 rigid particle group ) != 0 ) { group . update statistics ( ) ; vec 2 temp = temp vec ; vec 2 cross = temp vec 2 ; rot rotation = temp rot ; rotation . set ( step . dt * group . m angular velocity ) ; rot . mul to out unsafe ( rotation , group . m center , cross ) ; temp . set ( group . m linear velocity ) . mul local ( step . dt ) . add local ( group . m center ) . sub local ( cross ) ; temp xf . p . set ( temp ) ; temp xf . q . set ( rotation ) ; transform . mul to out ( temp xf , group . m transform , group . m transform ) ; final transform velocity transform = temp xf 2 ; velocity transform . p . x = step . inv dt * temp xf . p . x ; velocity transform . p . y = step . inv dt * temp xf . p . y ; velocity transform . q . s = step . inv dt * temp xf . q . s ; velocity transform . q . c = step . inv dt * ( temp xf . q . c - 1 ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { transform . mul to out unsafe ( velocity transform , m position buffer . data [ i ] , m velocity buffer . data [ i ] ) ; } } } } <SENTENCE_END/>

(Copy Probability: 18.6%)

<SENTENCE_START> { for ( particle group group = m group list ; group != null ; group = group . get next ( ) ) { if ( ( group . m group flags & particle group type . b 2 rigid particle group ) != 0 ) { group . update statistics ( ) ; vec 2 temp = temp vec ; vec 2 cross = temp vec 2 ; rot rotation = temp rot ; rotation . set ( step . dt * group . m angular velocity ) ; rot . mul to out unsafe ( rotation , group . m center , cross ) ; temp . set ( group . m linear velocity ) . mul local ( step . dt ) . add local ( group . m center ) . sub local ( cross ) ; temp xf . p . set ( temp ) ; temp xf . q . set ( rotation ) ; transform . mul to out ( temp xf , group . m transform , group . m transform ) ; final transform velocity transform = temp xf 2 ; velocity transform . p . x = step . inv dt * temp xf . p . x ; velocity transform . p . y = step . inv dt * temp xf . p . y ; velocity transform . q . s = step . inv dt * temp xf . q . s ; velocity transform . q . c = step . inv dt * ( temp xf . q . c - 1 ) ; for ( int i = group . m first index ; i < group . m last index ; i ++ ) { transform . mul to out unsafe ( velocity transform , m position buffer . data [ i ] , m velocity buffer . data [ i ] ) ; } } } } <SENTENCE_END/>


Original Name solve,elastic

solve

<SENTENCE_START> { float elastic strength = step . inv dt * m elastic strength ; for ( int k = 0 ; k < m triad count ; k ++ ) { final triad triad = m triad buffer [ k ] ; if ( ( triad . flags & particle type . b 2 elastic particle ) != 0 ) { int a = triad . index a ; int b = triad . index b ; int c = triad . index c ; final vec 2 oa = triad . pa ; final vec 2 ob = triad . pb ; final vec 2 oc = triad . pc ; final vec 2 pa = m position buffer . data [ a ] ; final vec 2 pb = m position buffer . data [ b ] ; final vec 2 pc = m position buffer . data [ c ] ; final float px = 1f / 3 * ( pa . x + pb . x + pc . x ) ; final float py = 1f / 3 * ( pa . y + pb . y + pc . y ) ; float rs = vec 2 . cross ( oa , pa ) + vec 2 . cross ( ob , pb ) + vec 2 . cross ( oc , pc ) ; float rc = vec 2 . dot ( oa , pa ) + vec 2 . dot ( ob , pb ) + vec 2 . dot ( oc , pc ) ; float r 2 = rs * rs + rc * rc ; float inv r = r 2 == 0 ? float . max value : math utils . sqrt ( 1f / r 2 ) ; rs *= inv r ; rc *= inv r ; final float strength = elastic strength * triad . strength ; final float roax = rc * oa . x - rs * oa . y ; final float roay = rs * oa . x + rc * oa . y ; final float robx = rc * ob . x - rs * ob . y ; final float roby = rs * ob . x + rc * ob . y ; final float rocx = rc * oc . x - rs * oc . y ; final float rocy = rs * oc . x + rc * oc . y ; final vec 2 va = m velocity buffer . data [ a ] ; final vec 2 vb = m velocity buffer . data [ b ] ; final vec 2 vc = m velocity buffer . data [ c ] ; va . x += strength * ( roax - ( pa . x - px ) ) ; va . y += strength * ( roay - ( pa . y - py ) ) ; vb . x += strength * ( robx - ( pb . x - px ) ) ; vb . y += strength * ( roby - ( pb . y - py ) ) ; vc . x += strength * ( rocx - ( pc . x - px ) ) ; vc . y += strength * ( rocy - ( pc . y - py ) ) ; } } } <SENTENCE_END/>

(Copy Probability: 3.1%)

<SENTENCE_START> { float elastic strength = step . inv dt * m elastic strength ; for ( int k = 0 ; k < m triad count ; k ++ ) { final triad triad = m triad buffer [ k ] ; if ( ( triad . flags & particle type . b 2 elastic particle ) != 0 ) { int a = triad . index a ; int b = triad . index b ; int c = triad . index c ; final vec 2 oa = triad . pa ; final vec 2 ob = triad . pb ; final vec 2 oc = triad . pc ; final vec 2 pa = m position buffer . data [ a ] ; final vec 2 pb = m position buffer . data [ b ] ; final vec 2 pc = m position buffer . data [ c ] ; final float px = 1f / 3 * ( pa . x + pb . x + pc . x ) ; final float py = 1f / 3 * ( pa . y + pb . y + pc . y ) ; float rs = vec 2 . cross ( oa , pa ) + vec 2 . cross ( ob , pb ) + vec 2 . cross ( oc , pc ) ; float rc = vec 2 . dot ( oa , pa ) + vec 2 . dot ( ob , pb ) + vec 2 . dot ( oc , pc ) ; float r 2 = rs * rs + rc * rc ; float inv r = r 2 == 0 ? float . max value : math utils . sqrt ( 1f / r 2 ) ; rs *= inv r ; rc *= inv r ; final float strength = elastic strength * triad . strength ; final float roax = rc * oa . x - rs * oa . y ; final float roay = rs * oa . x + rc * oa . y ; final float robx = rc * ob . x - rs * ob . y ; final float roby = rs * ob . x + rc * ob . y ; final float rocx = rc * oc . x - rs * oc . y ; final float rocy = rs * oc . x + rc * oc . y ; final vec 2 va = m velocity buffer . data [ a ] ; final vec 2 vb = m velocity buffer . data [ b ] ; final vec 2 vc = m velocity buffer . data [ c ] ; va . x += strength * ( roax - ( pa . x - px ) ) ; va . y += strength * ( roay - ( pa . y - py ) ) ; vb . x += strength * ( robx - ( pb . x - px ) ) ; vb . y += strength * ( roby - ( pb . y - py ) ) ; vc . x += strength * ( rocx - ( pc . x - px ) ) ; vc . y += strength * ( rocy - ( pc . y - py ) ) ; } } } <SENTENCE_END/>

elastic

<SENTENCE_START> { float elastic strength = step . inv dt * m elastic strength ; for ( int k = 0 ; k < m triad count ; k ++ ) { final triad triad = m triad buffer [ k ] ; if ( ( triad . flags & particle type . b 2 elastic particle ) != 0 ) { int a = triad . index a ; int b = triad . index b ; int c = triad . index c ; final vec 2 oa = triad . pa ; final vec 2 ob = triad . pb ; final vec 2 oc = triad . pc ; final vec 2 pa = m position buffer . data [ a ] ; final vec 2 pb = m position buffer . data [ b ] ; final vec 2 pc = m position buffer . data [ c ] ; final float px = 1f / 3 * ( pa . x + pb . x + pc . x ) ; final float py = 1f / 3 * ( pa . y + pb . y + pc . y ) ; float rs = vec 2 . cross ( oa , pa ) + vec 2 . cross ( ob , pb ) + vec 2 . cross ( oc , pc ) ; float rc = vec 2 . dot ( oa , pa ) + vec 2 . dot ( ob , pb ) + vec 2 . dot ( oc , pc ) ; float r 2 = rs * rs + rc * rc ; float inv r = r 2 == 0 ? float . max value : math utils . sqrt ( 1f / r 2 ) ; rs *= inv r ; rc *= inv r ; final float strength = elastic strength * triad . strength ; final float roax = rc * oa . x - rs * oa . y ; final float roay = rs * oa . x + rc * oa . y ; final float robx = rc * ob . x - rs * ob . y ; final float roby = rs * ob . x + rc * ob . y ; final float rocx = rc * oc . x - rs * oc . y ; final float rocy = rs * oc . x + rc * oc . y ; final vec 2 va = m velocity buffer . data [ a ] ; final vec 2 vb = m velocity buffer . data [ b ] ; final vec 2 vc = m velocity buffer . data [ c ] ; va . x += strength * ( roax - ( pa . x - px ) ) ; va . y += strength * ( roay - ( pa . y - py ) ) ; vb . x += strength * ( robx - ( pb . x - px ) ) ; vb . y += strength * ( roby - ( pb . y - py ) ) ; vc . x += strength * ( rocx - ( pc . x - px ) ) ; vc . y += strength * ( rocy - ( pc . y - py ) ) ; } } } <SENTENCE_END/>

(Copy Probability: 4.4%)

<SENTENCE_START> { float elastic strength = step . inv dt * m elastic strength ; for ( int k = 0 ; k < m triad count ; k ++ ) { final triad triad = m triad buffer [ k ] ; if ( ( triad . flags & particle type . b 2 elastic particle ) != 0 ) { int a = triad . index a ; int b = triad . index b ; int c = triad . index c ; final vec 2 oa = triad . pa ; final vec 2 ob = triad . pb ; final vec 2 oc = triad . pc ; final vec 2 pa = m position buffer . data [ a ] ; final vec 2 pb = m position buffer . data [ b ] ; final vec 2 pc = m position buffer . data [ c ] ; final float px = 1f / 3 * ( pa . x + pb . x + pc . x ) ; final float py = 1f / 3 * ( pa . y + pb . y + pc . y ) ; float rs = vec 2 . cross ( oa , pa ) + vec 2 . cross ( ob , pb ) + vec 2 . cross ( oc , pc ) ; float rc = vec 2 . dot ( oa , pa ) + vec 2 . dot ( ob , pb ) + vec 2 . dot ( oc , pc ) ; float r 2 = rs * rs + rc * rc ; float inv r = r 2 == 0 ? float . max value : math utils . sqrt ( 1f / r 2 ) ; rs *= inv r ; rc *= inv r ; final float strength = elastic strength * triad . strength ; final float roax = rc * oa . x - rs * oa . y ; final float roay = rs * oa . x + rc * oa . y ; final float robx = rc * ob . x - rs * ob . y ; final float roby = rs * ob . x + rc * ob . y ; final float rocx = rc * oc . x - rs * oc . y ; final float rocy = rs * oc . x + rc * oc . y ; final vec 2 va = m velocity buffer . data [ a ] ; final vec 2 vb = m velocity buffer . data [ b ] ; final vec 2 vc = m velocity buffer . data [ c ] ; va . x += strength * ( roax - ( pa . x - px ) ) ; va . y += strength * ( roay - ( pa . y - py ) ) ; vb . x += strength * ( robx - ( pb . x - px ) ) ; vb . y += strength * ( roby - ( pb . y - py ) ) ; vc . x += strength * ( rocx - ( pc . x - px ) ) ; vc . y += strength * ( rocy - ( pc . y - py ) ) ; } } } <SENTENCE_END/>

%END%

<SENTENCE_START> { float elastic strength = step . inv dt * m elastic strength ; for ( int k = 0 ; k < m triad count ; k ++ ) { final triad triad = m triad buffer [ k ] ; if ( ( triad . flags & particle type . b 2 elastic particle ) != 0 ) { int a = triad . index a ; int b = triad . index b ; int c = triad . index c ; final vec 2 oa = triad . pa ; final vec 2 ob = triad . pb ; final vec 2 oc = triad . pc ; final vec 2 pa = m position buffer . data [ a ] ; final vec 2 pb = m position buffer . data [ b ] ; final vec 2 pc = m position buffer . data [ c ] ; final float px = 1f / 3 * ( pa . x + pb . x + pc . x ) ; final float py = 1f / 3 * ( pa . y + pb . y + pc . y ) ; float rs = vec 2 . cross ( oa , pa ) + vec 2 . cross ( ob , pb ) + vec 2 . cross ( oc , pc ) ; float rc = vec 2 . dot ( oa , pa ) + vec 2 . dot ( ob , pb ) + vec 2 . dot ( oc , pc ) ; float r 2 = rs * rs + rc * rc ; float inv r = r 2 == 0 ? float . max value : math utils . sqrt ( 1f / r 2 ) ; rs *= inv r ; rc *= inv r ; final float strength = elastic strength * triad . strength ; final float roax = rc * oa . x - rs * oa . y ; final float roay = rs * oa . x + rc * oa . y ; final float robx = rc * ob . x - rs * ob . y ; final float roby = rs * ob . x + rc * ob . y ; final float rocx = rc * oc . x - rs * oc . y ; final float rocy = rs * oc . x + rc * oc . y ; final vec 2 va = m velocity buffer . data [ a ] ; final vec 2 vb = m velocity buffer . data [ b ] ; final vec 2 vc = m velocity buffer . data [ c ] ; va . x += strength * ( roax - ( pa . x - px ) ) ; va . y += strength * ( roay - ( pa . y - py ) ) ; vb . x += strength * ( robx - ( pb . x - px ) ) ; vb . y += strength * ( roby - ( pb . y - py ) ) ; vc . x += strength * ( rocx - ( pc . x - px ) ) ; vc . y += strength * ( rocy - ( pc . y - py ) ) ; } } } <SENTENCE_END/>

(Copy Probability: 3.2%)

<SENTENCE_START> { float elastic strength = step . inv dt * m elastic strength ; for ( int k = 0 ; k < m triad count ; k ++ ) { final triad triad = m triad buffer [ k ] ; if ( ( triad . flags & particle type . b 2 elastic particle ) != 0 ) { int a = triad . index a ; int b = triad . index b ; int c = triad . index c ; final vec 2 oa = triad . pa ; final vec 2 ob = triad . pb ; final vec 2 oc = triad . pc ; final vec 2 pa = m position buffer . data [ a ] ; final vec 2 pb = m position buffer . data [ b ] ; final vec 2 pc = m position buffer . data [ c ] ; final float px = 1f / 3 * ( pa . x + pb . x + pc . x ) ; final float py = 1f / 3 * ( pa . y + pb . y + pc . y ) ; float rs = vec 2 . cross ( oa , pa ) + vec 2 . cross ( ob , pb ) + vec 2 . cross ( oc , pc ) ; float rc = vec 2 . dot ( oa , pa ) + vec 2 . dot ( ob , pb ) + vec 2 . dot ( oc , pc ) ; float r 2 = rs * rs + rc * rc ; float inv r = r 2 == 0 ? float . max value : math utils . sqrt ( 1f / r 2 ) ; rs *= inv r ; rc *= inv r ; final float strength = elastic strength * triad . strength ; final float roax = rc * oa . x - rs * oa . y ; final float roay = rs * oa . x + rc * oa . y ; final float robx = rc * ob . x - rs * ob . y ; final float roby = rs * ob . x + rc * ob . y ; final float rocx = rc * oc . x - rs * oc . y ; final float rocy = rs * oc . x + rc * oc . y ; final vec 2 va = m velocity buffer . data [ a ] ; final vec 2 vb = m velocity buffer . data [ b ] ; final vec 2 vc = m velocity buffer . data [ c ] ; va . x += strength * ( roax - ( pa . x - px ) ) ; va . y += strength * ( roay - ( pa . y - py ) ) ; vb . x += strength * ( robx - ( pb . x - px ) ) ; vb . y += strength * ( roby - ( pb . y - py ) ) ; vc . x += strength * ( rocx - ( pc . x - px ) ) ; vc . y += strength * ( rocy - ( pc . y - py ) ) ; } } } <SENTENCE_END/>


Original Name solve,spring

solve

<SENTENCE_START> { float spring strength = step . inv dt * m spring strength ; for ( int k = 0 ; k < m pair count ; k ++ ) { final pair pair = m pair buffer [ k ] ; if ( ( pair . flags & particle type . b 2 spring particle ) != 0 ) { int a = pair . index a ; int b = pair . index b ; final vec 2 pa = m position buffer . data [ a ] ; final vec 2 pb = m position buffer . data [ b ] ; final float dx = pb . x - pa . x ; final float dy = pb . y - pa . y ; float r 0 = pair . distance ; float r 1 = math utils . sqrt ( dx * dx + dy * dy ) ; if ( r 1 == 0 ) r 1 = float . max value ; float strength = spring strength * pair . strength ; final float fx = strength * ( r 0 - r 1 ) / r 1 * dx ; final float fy = strength * ( r 0 - r 1 ) / r 1 * dy ; final vec 2 va = m velocity buffer . data [ a ] ; final vec 2 vb = m velocity buffer . data [ b ] ; va . x -= fx ; va . y -= fy ; vb . x += fx ; vb . y += fy ; } } } <SENTENCE_END/>

(Copy Probability: 3.0%)

<SENTENCE_START> { float spring strength = step . inv dt * m spring strength ; for ( int k = 0 ; k < m pair count ; k ++ ) { final pair pair = m pair buffer [ k ] ; if ( ( pair . flags & particle type . b 2 spring particle ) != 0 ) { int a = pair . index a ; int b = pair . index b ; final vec 2 pa = m position buffer . data [ a ] ; final vec 2 pb = m position buffer . data [ b ] ; final float dx = pb . x - pa . x ; final float dy = pb . y - pa . y ; float r 0 = pair . distance ; float r 1 = math utils . sqrt ( dx * dx + dy * dy ) ; if ( r 1 == 0 ) r 1 = float . max value ; float strength = spring strength * pair . strength ; final float fx = strength * ( r 0 - r 1 ) / r 1 * dx ; final float fy = strength * ( r 0 - r 1 ) / r 1 * dy ; final vec 2 va = m velocity buffer . data [ a ] ; final vec 2 vb = m velocity buffer . data [ b ] ; va . x -= fx ; va . y -= fy ; vb . x += fx ; vb . y += fy ; } } } <SENTENCE_END/>

spring

<SENTENCE_START> { float spring strength = step . inv dt * m spring strength ; for ( int k = 0 ; k < m pair count ; k ++ ) { final pair pair = m pair buffer [ k ] ; if ( ( pair . flags & particle type . b 2 spring particle ) != 0 ) { int a = pair . index a ; int b = pair . index b ; final vec 2 pa = m position buffer . data [ a ] ; final vec 2 pb = m position buffer . data [ b ] ; final float dx = pb . x - pa . x ; final float dy = pb . y - pa . y ; float r 0 = pair . distance ; float r 1 = math utils . sqrt ( dx * dx +