id
stringlengths
11
16
language
stringclasses
2 values
question
stringlengths
13
844
answer
stringlengths
1
900
code
stringlengths
162
27.4k
code_original
stringlengths
162
26k
code_word_count
int64
51
5.96k
java-test-2031
java
What does setter fire for the scale values for scale and offset with the affinetransforms representing the previous and new ?
a propertychangeevent
public void scale ( double scalex , double scaley , Point 2 D from ) { Affine Transform xf = Affine Transform . get Translate Instance ( from . get X ( ) , from . get Y ( ) ) ; xf . scale ( scalex , scaley ) ; xf . translate ( - from . get X ( ) , - from . get Y ( ) ) ; inverse = null ; transform . pre Concatenate ( xf...
public void scale ( double scalex , double scaley , Point2D from ) { AffineTransform xf = AffineTransform . getTranslateInstance ( from . getX ( ) , from . getY ( ) ) ; xf . scale ( scalex , scaley ) ; xf . translate ( - from . getX ( ) , - from . getY ( ) ) ; inverse = null ; transform . preConcatenate ( xf ) ; fireSt...
91
java-test-2032
java
What do the affinetransforms represent ?
the previous and new values for scale and offset
public void scale ( double scalex , double scaley , Point 2 D from ) { Affine Transform xf = Affine Transform . get Translate Instance ( from . get X ( ) , from . get Y ( ) ) ; xf . scale ( scalex , scaley ) ; xf . translate ( - from . get X ( ) , - from . get Y ( ) ) ; inverse = null ; transform . pre Concatenate ( xf...
public void scale ( double scalex , double scaley , Point2D from ) { AffineTransform xf = AffineTransform . getTranslateInstance ( from . getX ( ) , from . getY ( ) ) ; xf . scale ( scalex , scaley ) ; xf . translate ( - from . getX ( ) , - from . getY ( ) ) ; inverse = null ; transform . preConcatenate ( xf ) ; fireSt...
91
java-test-2033
java
What does the code create ?
a widget based in its metadata information
private Widget create Widget ( JSON Object elem , View view ) throws Screen Config Exception { if ( ! elem . has ( STRING ) ) { throw new Crux Generator Exception ( STRING + STRING + view . get Id ( ) + STRING + elem . opt String ( STRING ) + STRING ) ; } String widget Id ; try { widget Id = elem . get String ( STRING ...
private Widget createWidget ( JSONObject elem , View view ) throws ScreenConfigException { if ( ! elem . has ( STRING ) ) { throw new CruxGeneratorException ( STRING + STRING + view . getId ( ) + STRING + elem . optString ( STRING ) + STRING ) ; } String widgetId ; try { widgetId = elem . getString ( STRING ) ; } catch...
208
java-test-2034
java
How does the code handle a set / map of data attributes ?
with specified notification action
@ Suppress Warnings ( STRING ) public synchronized Object handle Data ( Map data , int action , boolean allow Child Events ) { Object result = null ; if ( data . contains Key ( get Key Attribute ( ) ) ) { boolean old Allow Events = allow Events ; allow Events = allow Child Events ; Process Var dataset = ( Process Var )...
@ SuppressWarnings ( STRING ) public synchronized Object handleData ( Map data , int action , boolean allowChildEvents ) { Object result = null ; if ( data . containsKey ( getKeyAttribute ( ) ) ) { boolean oldAllowEvents = allowEvents ; allowEvents = allowChildEvents ; ProcessVar dataset = ( ProcessVar ) get ( data . g...
155
java-test-2035
java
What does the code handle with specified notification action ?
a set / map of data attributes
@ Suppress Warnings ( STRING ) public synchronized Object handle Data ( Map data , int action , boolean allow Child Events ) { Object result = null ; if ( data . contains Key ( get Key Attribute ( ) ) ) { boolean old Allow Events = allow Events ; allow Events = allow Child Events ; Process Var dataset = ( Process Var )...
@ SuppressWarnings ( STRING ) public synchronized Object handleData ( Map data , int action , boolean allowChildEvents ) { Object result = null ; if ( data . containsKey ( getKeyAttribute ( ) ) ) { boolean oldAllowEvents = allowEvents ; allowEvents = allowChildEvents ; ProcessVar dataset = ( ProcessVar ) get ( data . g...
155
java-test-2040
java
What does the code add ?
the currentdatabase
protected void add Backups To Backup Request Buffer ( Fb Service service , Service Request Buffer backup SPB ) throws SQL Exception { for ( Iterator < Path Size Struct > iter = backup Paths . iterator ( ) ; iter . has Next ( ) ; ) { Path Size Struct path Size = iter . next ( ) ; backup SPB . add Argument ( isc spb bkp ...
protected void addBackupsToBackupRequestBuffer ( FbService service , ServiceRequestBuffer backupSPB ) throws SQLException { for ( Iterator < PathSizeStruct > iter = backupPaths . iterator ( ) ; iter . hasNext ( ) ; ) { PathSizeStruct pathSize = iter . next ( ) ; backupSPB . addArgument ( isc_spb_bkp_file , pathSize . g...
152
java-test-2042
java
What does the code validate for openstack now ?
the mask for only non openstack storage systems
private void validate Mask And Place Volumes ( Storage System array , URI varray URI , Map < URI , Export Mask > mask Set , Set < URI > invalid Masks , Export Mask mask , Export Mask Placement Descriptor placement Descriptor , Map < URI , Volume > volume Map , String log Msg ) { if ( ! is Open Stack ( array ) ) { log ....
private void validateMaskAndPlaceVolumes ( StorageSystem array , URI varrayURI , Map < URI , ExportMask > maskSet , Set < URI > invalidMasks , ExportMask mask , ExportMaskPlacementDescriptor placementDescriptor , Map < URI , Volume > volumeMap , String logMsg ) { if ( ! isOpenStack ( array ) ) { _log . info ( logMsg ) ...
217
java-test-2043
java
For what purpose does the code validate the mask for only non openstack storage systems now ?
for openstack
private void validate Mask And Place Volumes ( Storage System array , URI varray URI , Map < URI , Export Mask > mask Set , Set < URI > invalid Masks , Export Mask mask , Export Mask Placement Descriptor placement Descriptor , Map < URI , Volume > volume Map , String log Msg ) { if ( ! is Open Stack ( array ) ) { log ....
private void validateMaskAndPlaceVolumes ( StorageSystem array , URI varrayURI , Map < URI , ExportMask > maskSet , Set < URI > invalidMasks , ExportMask mask , ExportMaskPlacementDescriptor placementDescriptor , Map < URI , Volume > volumeMap , String logMsg ) { if ( ! isOpenStack ( array ) ) { _log . info ( logMsg ) ...
217
java-test-2044
java
How does the code create a type - 3 message ?
in response to the given type - 2 message
public Type 3 Message ( Type 2 Message type 2 ) { set Flags ( get Default Flags ( type 2 ) ) ; set Workstation ( get Default Workstation ( ) ) ; String domain = get Default Domain ( ) ; set Domain ( domain ) ; String user = get Default User ( ) ; set User ( user ) ; String password = get Default Password ( ) ; switch (...
public Type3Message ( Type2Message type2 ) { setFlags ( getDefaultFlags ( type2 ) ) ; setWorkstation ( getDefaultWorkstation ( ) ) ; String domain = getDefaultDomain ( ) ; setDomain ( domain ) ; String user = getDefaultUser ( ) ; setUser ( user ) ; String password = getDefaultPassword ( ) ; switch ( LM_COMPATIBILITY ) ...
241
java-test-2045
java
How does the code make a third - level domain if no binding to cname ?
by appending bucket name to front of original endpoint
public static URI determine Final Endpoint ( URI endpoint , String bucket , Client Configuration client Config ) { try { String Builder conbined Endpoint = new String Builder ( ) ; conbined Endpoint . append ( String . format ( STRING , endpoint . get Scheme ( ) ) ) ; conbined Endpoint . append ( build Canonical Host (...
public static URI determineFinalEndpoint ( URI endpoint , String bucket , ClientConfiguration clientConfig ) { try { StringBuilder conbinedEndpoint = new StringBuilder ( ) ; conbinedEndpoint . append ( String . format ( STRING , endpoint . getScheme ( ) ) ) ; conbinedEndpoint . append ( buildCanonicalHost ( endpoint , ...
155
java-test-2046
java
What does the code make if no binding to cname by appending bucket name to front of original endpoint ?
a third - level domain
public static URI determine Final Endpoint ( URI endpoint , String bucket , Client Configuration client Config ) { try { String Builder conbined Endpoint = new String Builder ( ) ; conbined Endpoint . append ( String . format ( STRING , endpoint . get Scheme ( ) ) ) ; conbined Endpoint . append ( build Canonical Host (...
public static URI determineFinalEndpoint ( URI endpoint , String bucket , ClientConfiguration clientConfig ) { try { StringBuilder conbinedEndpoint = new StringBuilder ( ) ; conbinedEndpoint . append ( String . format ( STRING , endpoint . getScheme ( ) ) ) ; conbinedEndpoint . append ( buildCanonicalHost ( endpoint , ...
155
java-test-2047
java
What does the code use as second - level domain otherwise directly ?
original endpoint
public static URI determine Final Endpoint ( URI endpoint , String bucket , Client Configuration client Config ) { try { String Builder conbined Endpoint = new String Builder ( ) ; conbined Endpoint . append ( String . format ( STRING , endpoint . get Scheme ( ) ) ) ; conbined Endpoint . append ( build Canonical Host (...
public static URI determineFinalEndpoint ( URI endpoint , String bucket , ClientConfiguration clientConfig ) { try { StringBuilder conbinedEndpoint = new StringBuilder ( ) ; conbinedEndpoint . append ( String . format ( STRING , endpoint . getScheme ( ) ) ) ; conbinedEndpoint . append ( buildCanonicalHost ( endpoint , ...
155
java-test-2048
java
How do html convert to plain text ?
by replacing html special characters with html entities
public static String encode ( String raw ) { String Builder sb = new String Builder ( ( raw . length ( ) * NUM ) / NUM ) ; Escaping . escape Xml ( raw , BOOL , sb ) ; return sb . to String ( ) ; }
public static String encode ( String raw ) { StringBuilder sb = new StringBuilder ( ( raw . length ( ) * _NUM ) / _NUM ) ; Escaping . escapeXml ( raw , _BOOL , sb ) ; return sb . toString ( ) ; }
51
java-test-2049
java
What will create it ?
another web component
@ Override public Action Forward execute Sub ( Action Mapping mapping , Action Form form , Http Servlet Request request , Http Servlet Response response ) throws Exception { Action Errors errors = new Action Errors ( ) ; String forward = STRING ; String req Category = clean Null ( request . get Parameter ( STRING ) ) ;...
@ Override public ActionForward executeSub ( ActionMapping mapping , ActionForm form , HttpServletRequest request , HttpServletResponse response ) throws Exception { ActionErrors errors = new ActionErrors ( ) ; String forward = STRING ; String reqCategory = cleanNull ( request . getParameter ( STRING ) ) ; PersonalBlog...
216
java-test-2050
java
What does the code skip ?
any leading space characters
private void append Trimmed ( final String s ) { boolean skip = BOOL ; for ( int i = NUM ; i < s . length ( ) ; i ++ ) { final char c = s . char At ( i ) ; if ( c != STRING ) { skip = BOOL ; } if ( ! skip ) { append ( c ) ; } } }
private void appendTrimmed ( final String s ) { boolean skip = _BOOL ; for ( int i = _NUM ; i < s . length ( ) ; i ++ ) { final char c = s . charAt ( i ) ; if ( c != STRING ) { skip = _BOOL ; } if ( ! skip ) { append ( c ) ; } } }
72
java-test-2051
java
What does the code find ?
the first occurrence of ' - ' , or if that character is not found , the first occurrence of ' , ' , or the first occurrence of ' ' or '
private static int find Separator ( String s ) { int result = s . index Of ( STRING ) ; if ( result == - NUM ) { result = s . index Of ( STRING ) ; } if ( result == - NUM ) { result = s . index Of ( STRING ) ; } if ( result == - NUM ) { result = s . index Of ( STRING ) ; } return result ; }
private static int findSeparator ( String s ) { int result = s . indexOf ( STRING ) ; if ( result == - _NUM ) { result = s . indexOf ( STRING ) ; } if ( result == - _NUM ) { result = s . indexOf ( STRING ) ; } if ( result == - _NUM ) { result = s . indexOf ( STRING ) ; } return result ; }
82
java-test-2052
java
What does the code handle ?
a mouse move
public void mouse Move ( int x , int y , int dx , int dy , int button ) { if ( ( mouse X < NUM ) || ( Math . abs ( dx ) > NUM ) || ( Math . abs ( dy ) > NUM ) ) { dx = NUM ; dy = NUM ; } else { dx = x - mouse X ; dy = y - mouse Y ; } mouse X = x ; mouse Y = y ; switch ( button ) { case NUM : mouse X = - NUM ; mouse Y =...
public void mouseMove ( int x , int y , int dx , int dy , int button ) { if ( ( mouseX < _NUM ) || ( Math . abs ( dx ) > _NUM ) || ( Math . abs ( dy ) > _NUM ) ) { dx = _NUM ; dy = _NUM ; } else { dx = x - mouseX ; dy = y - mouseY ; } mouseX = x ; mouseY = y ; switch ( button ) { case _NUM : mouseX = - _NUM ; mouseY = ...
231
java-test-2053
java
What does the code add ?
a long switch ( - - switch = value ) with the given name and value applying the unary operator on the key
public Command Builder with Long Switch ( String switch Name , Object value , Unary Operator < String > switch Name Mapper ) { if ( value != null ) { switches . add ( String . format ( STRING , switch Name Mapper . apply ( switch Name ) , escape Quoted Switch ( String . value Of ( value ) ) ) ) ; } else { switches . ad...
public CommandBuilder withLongSwitch ( String switchName , Object value , UnaryOperator < String > switchNameMapper ) { if ( value != null ) { switches . add ( String . format ( STRING , switchNameMapper . apply ( switchName ) , escapeQuotedSwitch ( String . valueOf ( value ) ) ) ) ; } else { switches . add ( STRING + ...
91
java-test-2058
java
What does the code create ?
a new instance of raw replicated data
public DBMS Event ( String id , Linked List < Repl Option > metadata , Array List < DBMS Data > data , boolean last Frag , Timestamp source Tstamp ) { if ( id == null ) this . id = STRING ; else this . id = id ; if ( metadata == null ) this . metadata = new Linked List < Repl Option > ( ) ; else this . metadata = metad...
public DBMSEvent ( String id , LinkedList < ReplOption > metadata , ArrayList < DBMSData > data , boolean lastFrag , Timestamp sourceTstamp ) { if ( id == null ) this . id = STRING ; else this . id = id ; if ( metadata == null ) this . metadata = new LinkedList < ReplOption > ( ) ; else this . metadata = metadata ; if ...
159
java-test-2059
java
What does the code send ?
native password stream
public void send ( Output Stream os ) throws IO Exception , Query Exception { Buffer buffer = new Buffer ( auth Data ) ; final Packet Output Stream writer = ( Packet Output Stream ) os ; final String server Principal Name = buffer . read String ( Charset . for Name ( STRING ) ) ; String mechanisms = buffer . read Strin...
public void send ( OutputStream os ) throws IOException , QueryException { Buffer buffer = new Buffer ( authData ) ; final PacketOutputStream writer = ( PacketOutputStream ) os ; final String serverPrincipalName = buffer . readString ( Charset . forName ( STRING ) ) ; String mechanisms = buffer . readString ( Charset ....
114
java-test-2062
java
What do terms collect ?
from the given terms enum and return count = sum ( df ) for terms visited so far or ( - count - 1 ) if this should be rewritten into a boolean query
private long collect Terms ( Leaf Reader Context context , Terms Enum terms Enum , List < Term And State > terms ) throws IO Exception { long count = NUM ; final int threshold = Math . min ( BOOLEAN REWRITE TERM COUNT THRESHOLD , Boolean Query . get Max Clause Count ( ) ) ; for ( int i = NUM ; i < threshold ; ++ i ) { ...
private long collectTerms ( LeafReaderContext context , TermsEnum termsEnum , List < TermAndState > terms ) throws IOException { long count = _NUM ; final int threshold = Math . min ( BOOLEAN_REWRITE_TERM_COUNT_THRESHOLD , BooleanQuery . getMaxClauseCount ( ) ) ; for ( int i = _NUM ; i < threshold ; ++ i ) { final Byte...
180
java-test-2063
java
What collects from the given terms enum and return count = sum ( df ) for terms visited so far or ( - count - 1 ) if this should be rewritten into a boolean query ?
terms
private long collect Terms ( Leaf Reader Context context , Terms Enum terms Enum , List < Term And State > terms ) throws IO Exception { long count = NUM ; final int threshold = Math . min ( BOOLEAN REWRITE TERM COUNT THRESHOLD , Boolean Query . get Max Clause Count ( ) ) ; for ( int i = NUM ; i < threshold ; ++ i ) { ...
private long collectTerms ( LeafReaderContext context , TermsEnum termsEnum , List < TermAndState > terms ) throws IOException { long count = _NUM ; final int threshold = Math . min ( BOOLEAN_REWRITE_TERM_COUNT_THRESHOLD , BooleanQuery . getMaxClauseCount ( ) ) ; for ( int i = _NUM ; i < threshold ; ++ i ) { final Byte...
180
java-test-2064
java
What do that replace ?
the map key
private Map replace Map Key ( Map attributes , Set attribute Names ) { if ( attribute Names != null ) { Iterator iter = attribute Names . iterator ( ) ; while ( iter . has Next ( ) ) { String attr Name = ( String ) iter . next ( ) ; String attr Name Lower = attr Name . to Lower Case ( ) ; if ( attributes . contains Key...
private Map replaceMapKey ( Map attributes , Set attributeNames ) { if ( attributeNames != null ) { Iterator iter = attributeNames . iterator ( ) ; while ( iter . hasNext ( ) ) { String attrName = ( String ) iter . next ( ) ; String attrNameLower = attrName . toLowerCase ( ) ; if ( attributes . containsKey ( attrNameLo...
122
java-test-2065
java
What does the code create ?
the relations between all the entities provided ( but not between an entity adn itself )
protected Stream < Relation > create Meshed Relations ( final J Cas j Cas , final Interaction interaction , final Collection < Entity > collection ) { final List < Relation > relations = new Linked List < > ( ) ; List < Entity > entities ; if ( collection instanceof List ) { entities = ( List < Entity > ) collection ; ...
protected Stream < Relation > createMeshedRelations ( final JCas jCas , final Interaction interaction , final Collection < Entity > collection ) { final List < Relation > relations = new LinkedList < > ( ) ; List < Entity > entities ; if ( collection instanceof List ) { entities = ( List < Entity > ) collection ; } els...
184
java-test-2066
java
What is crafting skill ?
skillid
public static boolean is Crafting Skill ( int skill Id ) { Iterator < Integer > it = crafting Skill Ids . iterator ( ) ; while ( it . has Next ( ) ) { if ( it . next ( ) == skill Id ) { return BOOL ; } } return BOOL ; }
public static boolean isCraftingSkill ( int skillId ) { Iterator < Integer > it = craftingSkillIds . iterator ( ) ; while ( it . hasNext ( ) ) { if ( it . next ( ) == skillId ) { return _BOOL ; } } return _BOOL ; }
57
java-test-2067
java
What is skillid crafting ?
skill
public static boolean is Crafting Skill ( int skill Id ) { Iterator < Integer > it = crafting Skill Ids . iterator ( ) ; while ( it . has Next ( ) ) { if ( it . next ( ) == skill Id ) { return BOOL ; } } return BOOL ; }
public static boolean isCraftingSkill ( int skillId ) { Iterator < Integer > it = craftingSkillIds . iterator ( ) ; while ( it . hasNext ( ) ) { if ( it . next ( ) == skillId ) { return _BOOL ; } } return _BOOL ; }
57
java-test-2081
java
Where do you use every combination of font , style and size ?
in your app
public void register Font Metrics ( String name , Font font , float line Height ) { Html Font Metrics metrics = get Font Metrics ( font ) ; font Metrics . put ( font , new Html Font Metrics ( font , line Height , metrics . emwidth ) ) ; }
public void registerFontMetrics ( String name , Font font , float lineHeight ) { HtmlFontMetrics metrics = getFontMetrics ( font ) ; fontMetrics . put ( font , new HtmlFontMetrics ( font , lineHeight , metrics . emwidth ) ) ; }
53
java-test-2082
java
What does this override ?
the default font metrics calculation ( which is hacky and inaccurate )
public void register Font Metrics ( String name , Font font , float line Height ) { Html Font Metrics metrics = get Font Metrics ( font ) ; font Metrics . put ( font , new Html Font Metrics ( font , line Height , metrics . emwidth ) ) ; }
public void registerFontMetrics ( String name , Font font , float lineHeight ) { HtmlFontMetrics metrics = getFontMetrics ( font ) ; fontMetrics . put ( font , new HtmlFontMetrics ( font , lineHeight , metrics . emwidth ) ) ; }
53
java-test-2083
java
What should you register for every combination of font , style and size that you use in your app if you want to ensure somewhat consistent font layout across browsers ?
font metrics
public void register Font Metrics ( String name , Font font , float line Height ) { Html Font Metrics metrics = get Font Metrics ( font ) ; font Metrics . put ( font , new Html Font Metrics ( font , line Height , metrics . emwidth ) ) ; }
public void registerFontMetrics ( String name , Font font , float lineHeight ) { HtmlFontMetrics metrics = getFontMetrics ( font ) ; fontMetrics . put ( font , new HtmlFontMetrics ( font , lineHeight , metrics . emwidth ) ) ; }
53
java-test-2084
java
What do you ensure across browsers ?
somewhat consistent font layout
public void register Font Metrics ( String name , Font font , float line Height ) { Html Font Metrics metrics = get Font Metrics ( font ) ; font Metrics . put ( font , new Html Font Metrics ( font , line Height , metrics . emwidth ) ) ; }
public void registerFontMetrics ( String name , Font font , float lineHeight ) { HtmlFontMetrics metrics = getFontMetrics ( font ) ; fontMetrics . put ( font , new HtmlFontMetrics ( font , lineHeight , metrics . emwidth ) ) ; }
53
java-test-2085
java
What do you want ?
to ensure somewhat consistent font layout across browsers
public void register Font Metrics ( String name , Font font , float line Height ) { Html Font Metrics metrics = get Font Metrics ( font ) ; font Metrics . put ( font , new Html Font Metrics ( font , line Height , metrics . emwidth ) ) ; }
public void registerFontMetrics ( String name , Font font , float lineHeight ) { HtmlFontMetrics metrics = getFontMetrics ( font ) ; fontMetrics . put ( font , new HtmlFontMetrics ( font , lineHeight , metrics . emwidth ) ) ; }
53
java-test-2086
java
Where do you ensure somewhat consistent font layout ?
across browsers
public void register Font Metrics ( String name , Font font , float line Height ) { Html Font Metrics metrics = get Font Metrics ( font ) ; font Metrics . put ( font , new Html Font Metrics ( font , line Height , metrics . emwidth ) ) ; }
public void registerFontMetrics ( String name , Font font , float lineHeight ) { HtmlFontMetrics metrics = getFontMetrics ( font ) ; fontMetrics . put ( font , new HtmlFontMetrics ( font , lineHeight , metrics . emwidth ) ) ; }
53
java-test-2088
java
What does the code create ?
a rectangle bounded by four positions
public Rectangle ( double top , double left , double bottom , double right ) { double width = Math . abs ( right - left ) ; double height = Math . abs ( bottom - top ) ; Point center = new Point ( left + ( width / NUM ) , top + ( height / NUM ) ) ; set Rect ( new Rect ( ( int ) ( center . x - ( width / NUM ) ) , ( int ...
public Rectangle ( double top , double left , double bottom , double right ) { double width = Math . abs ( right - left ) ; double height = Math . abs ( bottom - top ) ; Point center = new Point ( left + ( width / _NUM ) , top + ( height / _NUM ) ) ; setRect ( new Rect ( ( int ) ( center . x - ( width / _NUM ) ) , ( in...
112
java-test-2089
java
What does the code find if possible ?
the name of the function mapper for an el . reuse a previously generated one
private String match Map ( Array List < EL Node . Function > functions ) { String map Name = null ; for ( int i = NUM ; i < functions . size ( ) ; i ++ ) { EL Node . Function f = functions . get ( i ) ; String tem Name = g Map . get ( f . get Prefix ( ) + STRING + f . get Name ( ) + STRING + f . get Uri ( ) ) ; if ( te...
private String matchMap ( ArrayList < ELNode . Function > functions ) { String mapName = null ; for ( int i = _NUM ; i < functions . size ( ) ; i ++ ) { ELNode . Function f = functions . get ( i ) ; String temName = gMap . get ( f . getPrefix ( ) + STRING + f . getName ( ) + STRING + f . getUri ( ) ) ; if ( temName == ...
140
java-test-2090
java
Be the code put in near cache on originating node ?
No
public void add Near Value ( int key Idx , @ Nullable Cache Object val , long ttl , long expire Time ) { if ( near Vals Idxs == null ) { near Vals Idxs = new Array List < > ( ) ; near Vals = new Array List < > ( ) ; } add Near Ttl ( key Idx , ttl , expire Time ) ; near Vals Idxs . add ( key Idx ) ; near Vals . add ( va...
public void addNearValue ( int keyIdx , @ Nullable CacheObject val , long ttl , long expireTime ) { if ( nearValsIdxs == null ) { nearValsIdxs = new ArrayList < > ( ) ; nearVals = new ArrayList < > ( ) ; } addNearTtl ( keyIdx , ttl , expireTime ) ; nearValsIdxs . add ( keyIdx ) ; nearVals . add ( val ) ; }
89
java-test-2091
java
What does the code add ?
value to be put in near cache on originating node
public void add Near Value ( int key Idx , @ Nullable Cache Object val , long ttl , long expire Time ) { if ( near Vals Idxs == null ) { near Vals Idxs = new Array List < > ( ) ; near Vals = new Array List < > ( ) ; } add Near Ttl ( key Idx , ttl , expire Time ) ; near Vals Idxs . add ( key Idx ) ; near Vals . add ( va...
public void addNearValue ( int keyIdx , @ Nullable CacheObject val , long ttl , long expireTime ) { if ( nearValsIdxs == null ) { nearValsIdxs = new ArrayList < > ( ) ; nearVals = new ArrayList < > ( ) ; } addNearTtl ( keyIdx , ttl , expireTime ) ; nearValsIdxs . add ( keyIdx ) ; nearVals . add ( val ) ; }
89
java-test-2092
java
What has the 100 % percentage ?
the last value
public Percentiles percentiles ( Constant Range range ) { Sorted Set < Constant > sorted = values ( ) ; Sorted Set < Constant > contained = new Tree Set < Constant > ( ) ; Constant prev = null ; for ( Constant pct : sorted ) { if ( range . contains ( pct ) ) { contained . add ( pct ) ; } else if ( contained . is Empty ...
public Percentiles percentiles ( ConstantRange range ) { SortedSet < Constant > sorted = values ( ) ; SortedSet < Constant > contained = new TreeSet < Constant > ( ) ; Constant prev = null ; for ( Constant pct : sorted ) { if ( range . contains ( pct ) ) { contained . add ( pct ) ; } else if ( contained . isEmpty ( ) )...
188
java-test-2093
java
By how much are all new percentiles has adjusted ?
such that the last value has the 100 % percentage
public Percentiles percentiles ( Constant Range range ) { Sorted Set < Constant > sorted = values ( ) ; Sorted Set < Constant > contained = new Tree Set < Constant > ( ) ; Constant prev = null ; for ( Constant pct : sorted ) { if ( range . contains ( pct ) ) { contained . add ( pct ) ; } else if ( contained . is Empty ...
public Percentiles percentiles ( ConstantRange range ) { SortedSet < Constant > sorted = values ( ) ; SortedSet < Constant > contained = new TreeSet < Constant > ( ) ; Constant prev = null ; for ( Constant pct : sorted ) { if ( range . contains ( pct ) ) { contained . add ( pct ) ; } else if ( contained . isEmpty ( ) )...
188
java-test-2094
java
What does a new instance keep ?
only the percentiles with values falling within the specified range
public Percentiles percentiles ( Constant Range range ) { Sorted Set < Constant > sorted = values ( ) ; Sorted Set < Constant > contained = new Tree Set < Constant > ( ) ; Constant prev = null ; for ( Constant pct : sorted ) { if ( range . contains ( pct ) ) { contained . add ( pct ) ; } else if ( contained . is Empty ...
public Percentiles percentiles ( ConstantRange range ) { SortedSet < Constant > sorted = values ( ) ; SortedSet < Constant > contained = new TreeSet < Constant > ( ) ; Constant prev = null ; for ( Constant pct : sorted ) { if ( range . contains ( pct ) ) { contained . add ( pct ) ; } else if ( contained . isEmpty ( ) )...
188
java-test-2095
java
What did the last value have ?
the 100 % percentage
public Percentiles percentiles ( Constant Range range ) { Sorted Set < Constant > sorted = values ( ) ; Sorted Set < Constant > contained = new Tree Set < Constant > ( ) ; Constant prev = null ; for ( Constant pct : sorted ) { if ( range . contains ( pct ) ) { contained . add ( pct ) ; } else if ( contained . is Empty ...
public Percentiles percentiles ( ConstantRange range ) { SortedSet < Constant > sorted = values ( ) ; SortedSet < Constant > contained = new TreeSet < Constant > ( ) ; Constant prev = null ; for ( Constant pct : sorted ) { if ( range . contains ( pct ) ) { contained . add ( pct ) ; } else if ( contained . isEmpty ( ) )...
188
java-test-2096
java
How does the code put the entry with the specified key into the cache ?
without waiting for cache key
@ Override public Cache Header put ( String key , Cache Header entry ) { wait For Key ( key ) ; if ( super . contains Key ( key ) ) { m Total Size . get And Add ( entry . size - super . get ( key ) . size ) ; } else { m Total Size . get And Add ( entry . size ) ; } return super . put ( key , entry ) ; }
@ Override public CacheHeader put ( String key , CacheHeader entry ) { waitForKey ( key ) ; if ( super . containsKey ( key ) ) { mTotalSize . getAndAdd ( entry . size - super . get ( key ) . size ) ; } else { mTotalSize . getAndAdd ( entry . size ) ; } return super . put ( key , entry ) ; }
83
java-test-2097
java
What does pay define ?
parents
public Instances transform ( Instances D ) throws Exception { int L = D . class Index ( ) ; d = D . num Attributes ( ) - L ; int keep [ ] = A . append ( this . pa Y , j ) ; Arrays . sort ( keep ) ; int remv [ ] = A . invert ( keep , L ) ; Arrays . sort ( remv ) ; map = new int [ L ] ; for ( int j = NUM ; j < L ; j ++ )...
public Instances transform ( Instances D ) throws Exception { int L = D . classIndex ( ) ; d = D . numAttributes ( ) - L ; int keep [ ] = A . append ( this . paY , j ) ; Arrays . sort ( keep ) ; int remv [ ] = A . invert ( keep , L ) ; Arrays . sort ( remv ) ; map = new int [ L ] ; for ( int j = _NUM ; j < L ; j ++ ) {...
151
java-test-2098
java
What should we remove , [ 1 , 4 ?
the rest
public Instances transform ( Instances D ) throws Exception { int L = D . class Index ( ) ; d = D . num Attributes ( ) - L ; int keep [ ] = A . append ( this . pa Y , j ) ; Arrays . sort ( keep ) ; int remv [ ] = A . invert ( keep , L ) ; Arrays . sort ( remv ) ; map = new int [ L ] ; for ( int j = NUM ; j < L ; j ++ )...
public Instances transform ( Instances D ) throws Exception { int L = D . classIndex ( ) ; d = D . numAttributes ( ) - L ; int keep [ ] = A . append ( this . paY , j ) ; Arrays . sort ( keep ) ; int remv [ ] = A . invert ( keep , L ) ; Arrays . sort ( remv ) ; map = new int [ L ] ; for ( int j = _NUM ; j < L ; j ++ ) {...
151
java-test-2099
java
When should we remove the rest ?
, [ 1 , 4
public Instances transform ( Instances D ) throws Exception { int L = D . class Index ( ) ; d = D . num Attributes ( ) - L ; int keep [ ] = A . append ( this . pa Y , j ) ; Arrays . sort ( keep ) ; int remv [ ] = A . invert ( keep , L ) ; Arrays . sort ( remv ) ; map = new int [ L ] ; for ( int j = NUM ; j < L ; j ++ )...
public Instances transform ( Instances D ) throws Exception { int L = D . classIndex ( ) ; d = D . numAttributes ( ) - L ; int keep [ ] = A . append ( this . paY , j ) ; Arrays . sort ( keep ) ; int remv [ ] = A . invert ( keep , L ) ; Arrays . sort ( remv ) ; map = new int [ L ] ; for ( int j = _NUM ; j < L ; j ++ ) {...
151
java-test-2100
java
What defines parents ?
pay
public Instances transform ( Instances D ) throws Exception { int L = D . class Index ( ) ; d = D . num Attributes ( ) - L ; int keep [ ] = A . append ( this . pa Y , j ) ; Arrays . sort ( keep ) ; int remv [ ] = A . invert ( keep , L ) ; Arrays . sort ( remv ) ; map = new int [ L ] ; for ( int j = NUM ; j < L ; j ++ )...
public Instances transform ( Instances D ) throws Exception { int L = D . classIndex ( ) ; d = D . numAttributes ( ) - L ; int keep [ ] = A . append ( this . paY , j ) ; Arrays . sort ( keep ) ; int remv [ ] = A . invert ( keep , L ) ; Arrays . sort ( remv ) ; map = new int [ L ] ; for ( int j = _NUM ; j < L ; j ++ ) {...
151
java-test-2101
java
What does the code delete from the table ?
a contiguous set of rows
public void delete Rows ( int row , int length ) throws Table Exception { if ( row < NUM || length < NUM || row + length > this . nrow ) { throw new Table Exception ( STRING + row + STRING + length + STRING + this . nrow + STRING ) ; } if ( length == NUM ) { return ; } for ( int col = NUM ; col < this . arrays . length...
public void deleteRows ( int row , int length ) throws TableException { if ( row < _NUM || length < _NUM || row + length > this . nrow ) { throw new TableException ( STRING + row + STRING + length + STRING + this . nrow + STRING ) ; } if ( length == _NUM ) { return ; } for ( int col = _NUM ; col < this . arrays . lengt...
217
java-test-2102
java
How do each map object update ?
with its interval
public void distribute And Update Map Objects In Interval Set ( ) { for ( Internal Map Object map Object : map Objects ) { for ( Interval interval : interval Set . get Intervals ( ) ) { if ( map Object . get Value ( ) >= interval . get Value Low ( ) && map Object . get Value ( ) <= interval . get Value High ( ) ) { int...
public void distributeAndUpdateMapObjectsInIntervalSet ( ) { for ( InternalMapObject mapObject : mapObjects ) { for ( Interval interval : intervalSet . getIntervals ( ) ) { if ( mapObject . getValue ( ) >= interval . getValueLow ( ) && mapObject . getValue ( ) <= interval . getValueHigh ( ) ) { interval . addMember ( m...
98
java-test-2103
java
What do a named no - argument static method call ?
on a named class
public static Object create Instance And Call Static Method ( Configuration config , String class Name , String method Name ) throws Class Not Found Exception , No Such Method Exception , Illegal Access Exception , Invocation Target Exception { Dex Class Loader dcl = create Instance ( config ) ; Class c = dcl . load Cl...
public static Object createInstanceAndCallStaticMethod ( Configuration config , String className , String methodName ) throws ClassNotFoundException , NoSuchMethodException , IllegalAccessException , InvocationTargetException { DexClassLoader dcl = createInstance ( config ) ; Class c = dcl . loadClass ( className ) ; M...
98
java-test-2104
java
Do we send lock request as such approach does not preserve order of lock acquisition ?
No
private void map ( Collection < Key Cache Object > keys , boolean remap , boolean top Locked ) { try { map 0 ( keys , remap , top Locked ) ; } catch ( Ignite Checked Exception ex ) { on Done ( BOOL , ex ) ; } }
private void map ( Collection < KeyCacheObject > keys , boolean remap , boolean topLocked ) { try { map0 ( keys , remap , topLocked ) ; } catch ( IgniteCheckedException ex ) { onDone ( _BOOL , ex ) ; } }
52
java-test-2105
java
What do we not send as such approach does not preserve order of lock acquisition ?
lock request
private void map ( Collection < Key Cache Object > keys , boolean remap , boolean top Locked ) { try { map 0 ( keys , remap , top Locked ) ; } catch ( Ignite Checked Exception ex ) { on Done ( BOOL , ex ) ; } }
private void map ( Collection < KeyCacheObject > keys , boolean remap , boolean topLocked ) { try { map0 ( keys , remap , topLocked ) ; } catch ( IgniteCheckedException ex ) { onDone ( _BOOL , ex ) ; } }
52
java-test-2106
java
How are keys split ?
in continuous groups belonging to one primary node
private void map ( Collection < Key Cache Object > keys , boolean remap , boolean top Locked ) { try { map 0 ( keys , remap , top Locked ) ; } catch ( Ignite Checked Exception ex ) { on Done ( BOOL , ex ) ; } }
private void map ( Collection < KeyCacheObject > keys , boolean remap , boolean topLocked ) { try { map0 ( keys , remap , topLocked ) ; } catch ( IgniteCheckedException ex ) { onDone ( _BOOL , ex ) ; } }
52
java-test-2107
java
How are locks for these groups acquired ?
sequentially
private void map ( Collection < Key Cache Object > keys , boolean remap , boolean top Locked ) { try { map 0 ( keys , remap , top Locked ) ; } catch ( Ignite Checked Exception ex ) { on Done ( BOOL , ex ) ; } }
private void map ( Collection < KeyCacheObject > keys , boolean remap , boolean topLocked ) { try { map0 ( keys , remap , topLocked ) ; } catch ( IgniteCheckedException ex ) { onDone ( _BOOL , ex ) ; } }
52
java-test-2108
java
What does we not preserve ?
order of lock acquisition
private void map ( Collection < Key Cache Object > keys , boolean remap , boolean top Locked ) { try { map 0 ( keys , remap , top Locked ) ; } catch ( Ignite Checked Exception ex ) { on Done ( BOOL , ex ) ; } }
private void map ( Collection < KeyCacheObject > keys , boolean remap , boolean topLocked ) { try { map0 ( keys , remap , topLocked ) ; } catch ( IgniteCheckedException ex ) { onDone ( _BOOL , ex ) ; } }
52
java-test-2109
java
Does we preserve order of lock acquisition ?
No
private void map ( Collection < Key Cache Object > keys , boolean remap , boolean top Locked ) { try { map 0 ( keys , remap , top Locked ) ; } catch ( Ignite Checked Exception ex ) { on Done ( BOOL , ex ) ; } }
private void map ( Collection < KeyCacheObject > keys , boolean remap , boolean topLocked ) { try { map0 ( keys , remap , topLocked ) ; } catch ( IgniteCheckedException ex ) { onDone ( _BOOL , ex ) ; } }
52
java-test-2114
java
For what purpose be the current location incremeent code ?
to be nearer to the desired location
public void update Current Location ( float animation Speed , float update Radius ) { float distance X = Math . abs ( location On Screen X - current Location X ) ; float distance Y = Math . abs ( location On Screen Y - current Location Y ) ; if ( distance X > update Radius ) { if ( current Location X < location On Scre...
public void updateCurrentLocation ( float animationSpeed , float updateRadius ) { float distanceX = Math . abs ( locationOnScreenX - currentLocationX ) ; float distanceY = Math . abs ( locationOnScreenY - currentLocationY ) ; if ( distanceX > updateRadius ) { if ( currentLocationX < locationOnScreenX ) { currentLocatio...
200
java-test-2115
java
What toggles in the indicator ' s visibility map ?
the visibility of the given element type
public void toggle Visibility ( String type ) { Map < String , Boolean > visibility Map = get Visibility Map ( ) ; Boolean visibility = visibility Map . get ( type ) ; if ( visibility != null ) visibility Map . put ( type , ! visibility . boolean Value ( ) ) ; }
public void toggleVisibility ( String type ) { Map < String , Boolean > visibilityMap = getVisibilityMap ( ) ; Boolean visibility = visibilityMap . get ( type ) ; if ( visibility != null ) visibilityMap . put ( type , ! visibility . booleanValue ( ) ) ; }
58
java-test-2116
java
Where does the visibility of the given element type toggle ?
in the indicator ' s visibility map
public void toggle Visibility ( String type ) { Map < String , Boolean > visibility Map = get Visibility Map ( ) ; Boolean visibility = visibility Map . get ( type ) ; if ( visibility != null ) visibility Map . put ( type , ! visibility . boolean Value ( ) ) ; }
public void toggleVisibility ( String type ) { Map < String , Boolean > visibilityMap = getVisibilityMap ( ) ; Boolean visibility = visibilityMap . get ( type ) ; if ( visibility != null ) visibilityMap . put ( type , ! visibility . booleanValue ( ) ) ; }
58
java-test-2119
java
What does the code remove ?
a listener on group chat events
public void remove Event Listener ( Group Chat Listener listener ) throws Rcs Service Not Available Exception , Rcs Generic Exception { if ( m Api == null ) { throw new Rcs Service Not Available Exception ( ) ; } try { Weak Reference < I Group Chat Listener > weak Ref = m Group Chat Listeners . remove ( listener ) ; if...
public void removeEventListener ( GroupChatListener listener ) throws RcsServiceNotAvailableException , RcsGenericException { if ( mApi == null ) { throw new RcsServiceNotAvailableException ( ) ; } try { WeakReference < IGroupChatListener > weakRef = mGroupChatListeners . remove ( listener ) ; if ( weakRef == null ) { ...
139
java-test-2120
java
What does nothing if lines is null ?
one per line
private static void add Lines To Msg ( Xmpp Msg msg , Array List < String > lines ) { if ( lines == null ) { return ; } Collections . sort ( lines ) ; for ( String line : lines ) { msg . append Line ( line ) ; } }
private static void addLinesToMsg ( XmppMsg msg , ArrayList < String > lines ) { if ( lines == null ) { return ; } Collections . sort ( lines ) ; for ( String line : lines ) { msg . appendLine ( line ) ; } }
55
java-test-2121
java
What does the code adds ?
lines to the xmppmsg
private static void add Lines To Msg ( Xmpp Msg msg , Array List < String > lines ) { if ( lines == null ) { return ; } Collections . sort ( lines ) ; for ( String line : lines ) { msg . append Line ( line ) ; } }
private static void addLinesToMsg ( XmppMsg msg , ArrayList < String > lines ) { if ( lines == null ) { return ; } Collections . sort ( lines ) ; for ( String line : lines ) { msg . appendLine ( line ) ; } }
55
java-test-2122
java
What do this operation change ?
the current fluxfirstemitting instance
public Flux First Emitting < T > amb Additional Source ( Publisher < ? extends T > source ) { if ( array != null ) { int n = array . length ; @ Suppress Warnings ( STRING ) Publisher < ? extends T > [ ] new Array = new Publisher [ n + NUM ] ; System . arraycopy ( array , NUM , new Array , NUM , n ) ; new Array [ n ] = ...
public FluxFirstEmitting < T > ambAdditionalSource ( Publisher < ? extends T > source ) { if ( array != null ) { int n = array . length ; @ SuppressWarnings ( STRING ) Publisher < ? extends T > [ ] newArray = new Publisher [ n + _NUM ] ; System . arraycopy ( array , _NUM , newArray , _NUM , n ) ; newArray [ n ] = sourc...
100
java-test-2123
java
What specified in the input parameter ?
all the absolute path
public static File create Dir If Not Exists ( File directory ) throws IO Exception { if ( ! directory . is Directory ( ) ) { if ( ! directory . mkdirs ( ) ) { throw new IO Exception ( STRING + directory . get Absolute Path ( ) ) ; } } return directory ; }
public static File createDirIfNotExists ( File directory ) throws IOException { if ( ! directory . isDirectory ( ) ) { if ( ! directory . mkdirs ( ) ) { throw new IOException ( STRING + directory . getAbsolutePath ( ) ) ; } } return directory ; }
59
java-test-2124
java
What will it create recursively ?
all the absolute path specified in the input parameter
public static File create Dir If Not Exists ( File directory ) throws IO Exception { if ( ! directory . is Directory ( ) ) { if ( ! directory . mkdirs ( ) ) { throw new IO Exception ( STRING + directory . get Absolute Path ( ) ) ; } } return directory ; }
public static File createDirIfNotExists ( File directory ) throws IOException { if ( ! directory . isDirectory ( ) ) { if ( ! directory . mkdirs ( ) ) { throw new IOException ( STRING + directory . getAbsolutePath ( ) ) ; } } return directory ; }
59
java-test-2125
java
Where did all the absolute path specify ?
in the input parameter
public static File create Dir If Not Exists ( File directory ) throws IO Exception { if ( ! directory . is Directory ( ) ) { if ( ! directory . mkdirs ( ) ) { throw new IO Exception ( STRING + directory . get Absolute Path ( ) ) ; } } return directory ; }
public static File createDirIfNotExists ( File directory ) throws IOException { if ( ! directory . isDirectory ( ) ) { if ( ! directory . mkdirs ( ) ) { throw new IOException ( STRING + directory . getAbsolutePath ( ) ) ; } } return directory ; }
59
java-test-2130
java
What does the code prepare ?
the class index of the data
public static void prepare Data ( Instances data ) throws Exception { String doptions [ ] = null ; try { doptions = ML Utils . get Dataset Options ( data ) ; } catch ( Exception e ) { throw new Exception ( STRING , e ) ; } try { int c = ( Utils . get Option Pos ( STRING , doptions ) >= NUM ) ? Integer . parse Int ( Uti...
public static void prepareData ( Instances data ) throws Exception { String doptions [ ] = null ; try { doptions = MLUtils . getDatasetOptions ( data ) ; } catch ( Exception e ) { throw new Exception ( STRING , e ) ; } try { int c = ( Utils . getOptionPos ( STRING , doptions ) >= _NUM ) ? Integer . parseInt ( Utils . g...
176
java-test-2131
java
What does the code generate ?
a string listing of the script execution history
public static String display Script History ( List < String > script History ) { String Builder sb = new String Builder ( ) ; sb . append ( STRING ) ; if ( script History . is Empty ( ) ) { sb . append ( STRING ) ; } int i = NUM ; for ( String history : script History ) { sb . append ( STRING ) ; sb . append ( STRING +...
public static String displayScriptHistory ( List < String > scriptHistory ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( STRING ) ; if ( scriptHistory . isEmpty ( ) ) { sb . append ( STRING ) ; } int i = _NUM ; for ( String history : scriptHistory ) { sb . append ( STRING ) ; sb . append ( STRING + ( i ++...
103
java-test-2132
java
What does the string contain ?
any leading tabs or spaces
public static String trim Leading Tabs And Spaces ( String line ) { int size = line . length ( ) ; int start = size ; for ( int i = NUM ; i < size ; i ++ ) { char c = line . char At ( i ) ; if ( ! Indent Manipulation . is Indent Char ( c ) ) { start = i ; break ; } } if ( start == NUM ) return line ; else if ( start ==...
public static String trimLeadingTabsAndSpaces ( String line ) { int size = line . length ( ) ; int start = size ; for ( int i = _NUM ; i < size ; i ++ ) { char c = line . charAt ( i ) ; if ( ! IndentManipulation . isIndentChar ( c ) ) { start = i ; break ; } } if ( start == _NUM ) return line ; else if ( start == size ...
104
java-test-2140
java
What does the actual set of dns contain ?
the expected values
private void assert DN Set Equals ( Sorted Set < DN > actual , String ... expected ) { String [ ] actual Strings = new String [ actual . size ( ) ] ; int i = NUM ; for ( DN dn : actual ) { actual Strings [ i ] = dn . to String ( ) ; i ++ ; } Assert . assert Equals No Order ( actual Strings , expected ) ; }
private void assertDNSetEquals ( SortedSet < DN > actual , String ... expected ) { String [ ] actualStrings = new String [ actual . size ( ) ] ; int i = _NUM ; for ( DN dn : actual ) { actualStrings [ i ] = dn . toString ( ) ; i ++ ; } Assert . assertEqualsNoOrder ( actualStrings , expected ) ; }
79
java-test-2141
java
What contains the expected values ?
the actual set of dns
private void assert DN Set Equals ( Sorted Set < DN > actual , String ... expected ) { String [ ] actual Strings = new String [ actual . size ( ) ] ; int i = NUM ; for ( DN dn : actual ) { actual Strings [ i ] = dn . to String ( ) ; i ++ ; } Assert . assert Equals No Order ( actual Strings , expected ) ; }
private void assertDNSetEquals ( SortedSet < DN > actual , String ... expected ) { String [ ] actualStrings = new String [ actual . size ( ) ] ; int i = _NUM ; for ( DN dn : actual ) { actualStrings [ i ] = dn . toString ( ) ; i ++ ; } Assert . assertEqualsNoOrder ( actualStrings , expected ) ; }
79
java-test-2142
java
What will be evaluated in such cases ?
the iter operands
@ Override public Select Results filter Evaluate ( Execution Context context , Select Results intermediate Results , boolean complete Expansion Needed , @ Retained Compiled Value iter Operands , Runtime Iterator [ ] indpndnt Itrs , boolean is Intersection , boolean conditioning Needed , boolean evaluate Projection ) th...
@ Override public SelectResults filterEvaluate ( ExecutionContext context , SelectResults intermediateResults , boolean completeExpansionNeeded , @ Retained CompiledValue iterOperands , RuntimeIterator [ ] indpndntItrs , boolean isIntersection , boolean conditioningNeeded , boolean evaluateProjection ) throws FunctionD...
209
java-test-2143
java
What has only one filter evaluatable condition ?
a groupjunction
@ Override public Select Results filter Evaluate ( Execution Context context , Select Results intermediate Results , boolean complete Expansion Needed , @ Retained Compiled Value iter Operands , Runtime Iterator [ ] indpndnt Itrs , boolean is Intersection , boolean conditioning Needed , boolean evaluate Projection ) th...
@ Override public SelectResults filterEvaluate ( ExecutionContext context , SelectResults intermediateResults , boolean completeExpansionNeeded , @ Retained CompiledValue iterOperands , RuntimeIterator [ ] indpndntItrs , boolean isIntersection , boolean conditioningNeeded , boolean evaluateProjection ) throws FunctionD...
209
java-test-2144
java
What do a compiledvalue represent ?
the operands which are only iter evaluatable
@ Override public Select Results filter Evaluate ( Execution Context context , Select Results intermediate Results , boolean complete Expansion Needed , @ Retained Compiled Value iter Operands , Runtime Iterator [ ] indpndnt Itrs , boolean is Intersection , boolean conditioning Needed , boolean evaluate Projection ) th...
@ Override public SelectResults filterEvaluate ( ExecutionContext context , SelectResults intermediateResults , boolean completeExpansionNeeded , @ Retained CompiledValue iterOperands , RuntimeIterator [ ] indpndntItrs , boolean isIntersection , boolean conditioningNeeded , boolean evaluateProjection ) throws FunctionD...
209
java-test-2145
java
What do the cut down ?
the index resultset
@ Override public Select Results filter Evaluate ( Execution Context context , Select Results intermediate Results , boolean complete Expansion Needed , @ Retained Compiled Value iter Operands , Runtime Iterator [ ] indpndnt Itrs , boolean is Intersection , boolean conditioning Needed , boolean evaluate Projection ) th...
@ Override public SelectResults filterEvaluate ( ExecutionContext context , SelectResults intermediateResults , boolean completeExpansionNeeded , @ Retained CompiledValue iterOperands , RuntimeIterator [ ] indpndntItrs , boolean isIntersection , boolean conditioningNeeded , boolean evaluateProjection ) throws FunctionD...
209
java-test-2146
java
What does this function have only in compiledcomparison & compiledundefined ?
a meaningful implementation
@ Override public Select Results filter Evaluate ( Execution Context context , Select Results intermediate Results , boolean complete Expansion Needed , @ Retained Compiled Value iter Operands , Runtime Iterator [ ] indpndnt Itrs , boolean is Intersection , boolean conditioning Needed , boolean evaluate Projection ) th...
@ Override public SelectResults filterEvaluate ( ExecutionContext context , SelectResults intermediateResults , boolean completeExpansionNeeded , @ Retained CompiledValue iterOperands , RuntimeIterator [ ] indpndntItrs , boolean isIntersection , boolean conditioningNeeded , boolean evaluateProjection ) throws FunctionD...
209
java-test-2147
java
When will the iter operands be evaluated if a groupjunction has only one filter evaluatable condition & rest are iter operands in such cases ?
while expanding / cutting down the index resultset
@ Override public Select Results filter Evaluate ( Execution Context context , Select Results intermediate Results , boolean complete Expansion Needed , @ Retained Compiled Value iter Operands , Runtime Iterator [ ] indpndnt Itrs , boolean is Intersection , boolean conditioning Needed , boolean evaluate Projection ) th...
@ Override public SelectResults filterEvaluate ( ExecutionContext context , SelectResults intermediateResults , boolean completeExpansionNeeded , @ Retained CompiledValue iterOperands , RuntimeIterator [ ] indpndntItrs , boolean isIntersection , boolean conditioningNeeded , boolean evaluateProjection ) throws FunctionD...
209
java-test-2148
java
What does a groupjunction have ?
only one filter evaluatable condition
@ Override public Select Results filter Evaluate ( Execution Context context , Select Results intermediate Results , boolean complete Expansion Needed , @ Retained Compiled Value iter Operands , Runtime Iterator [ ] indpndnt Itrs , boolean is Intersection , boolean conditioning Needed , boolean evaluate Projection ) th...
@ Override public SelectResults filterEvaluate ( ExecutionContext context , SelectResults intermediateResults , boolean completeExpansionNeeded , @ Retained CompiledValue iterOperands , RuntimeIterator [ ] indpndntItrs , boolean isIntersection , boolean conditioningNeeded , boolean evaluateProjection ) throws FunctionD...
209
java-test-2149
java
What is representing the operands which are only iter evaluatable ?
a compiledvalue
@ Override public Select Results filter Evaluate ( Execution Context context , Select Results intermediate Results , boolean complete Expansion Needed , @ Retained Compiled Value iter Operands , Runtime Iterator [ ] indpndnt Itrs , boolean is Intersection , boolean conditioning Needed , boolean evaluate Projection ) th...
@ Override public SelectResults filterEvaluate ( ExecutionContext context , SelectResults intermediateResults , boolean completeExpansionNeeded , @ Retained CompiledValue iterOperands , RuntimeIterator [ ] indpndntItrs , boolean isIntersection , boolean conditioningNeeded , boolean evaluateProjection ) throws FunctionD...
209
java-test-2150
java
Where is it unsupported ?
in other classes
@ Override public Select Results filter Evaluate ( Execution Context context , Select Results intermediate Results , boolean complete Expansion Needed , @ Retained Compiled Value iter Operands , Runtime Iterator [ ] indpndnt Itrs , boolean is Intersection , boolean conditioning Needed , boolean evaluate Projection ) th...
@ Override public SelectResults filterEvaluate ( ExecutionContext context , SelectResults intermediateResults , boolean completeExpansionNeeded , @ Retained CompiledValue iterOperands , RuntimeIterator [ ] indpndntItrs , boolean isIntersection , boolean conditioningNeeded , boolean evaluateProjection ) throws FunctionD...
209
java-test-2151
java
How does this function have a meaningful implementation ?
only in compiledcomparison & compiledundefined
@ Override public Select Results filter Evaluate ( Execution Context context , Select Results intermediate Results , boolean complete Expansion Needed , @ Retained Compiled Value iter Operands , Runtime Iterator [ ] indpndnt Itrs , boolean is Intersection , boolean conditioning Needed , boolean evaluate Projection ) th...
@ Override public SelectResults filterEvaluate ( ExecutionContext context , SelectResults intermediateResults , boolean completeExpansionNeeded , @ Retained CompiledValue iterOperands , RuntimeIterator [ ] indpndntItrs , boolean isIntersection , boolean conditioningNeeded , boolean evaluateProjection ) throws FunctionD...
209
java-test-2152
java
What is a boolean used ?
to indicate whether the index result set needs to be expanded to the top level or not
@ Override public Select Results filter Evaluate ( Execution Context context , Select Results intermediate Results , boolean complete Expansion Needed , @ Retained Compiled Value iter Operands , Runtime Iterator [ ] indpndnt Itrs , boolean is Intersection , boolean conditioning Needed , boolean evaluate Projection ) th...
@ Override public SelectResults filterEvaluate ( ExecutionContext context , SelectResults intermediateResults , boolean completeExpansionNeeded , @ Retained CompiledValue iterOperands , RuntimeIterator [ ] indpndntItrs , boolean isIntersection , boolean conditioningNeeded , boolean evaluateProjection ) throws FunctionD...
209
java-test-2153
java
What can we match ?
http - style naming e . g
public static String make Init Cap ( String name ) { int i ; String Builder icap = new String Builder ( name ) ; int nlen = icap . length ( ) ; boolean cap flag = BOOL ; for ( i = NUM ; i < nlen ; ++ i ) { char c = icap . char At ( i ) ; if ( Character . is Letter Or Digit ( c ) ) { if ( Character . is Lower Case ( c )...
public static String makeInitCap ( String name ) { int i ; StringBuilder icap = new StringBuilder ( name ) ; int nlen = icap . length ( ) ; boolean cap_flag = _BOOL ; for ( i = _NUM ; i < nlen ; ++ i ) { char c = icap . charAt ( i ) ; if ( Character . isLetterOrDigit ( c ) ) { if ( Character . isLowerCase ( c ) ) { if ...
178
java-test-2154
java
What do this ensure ?
that we can match http - style naming e . g . " accept - charset "
public static String make Init Cap ( String name ) { int i ; String Builder icap = new String Builder ( name ) ; int nlen = icap . length ( ) ; boolean cap flag = BOOL ; for ( i = NUM ; i < nlen ; ++ i ) { char c = icap . char At ( i ) ; if ( Character . is Letter Or Digit ( c ) ) { if ( Character . is Lower Case ( c )...
public static String makeInitCap ( String name ) { int i ; StringBuilder icap = new StringBuilder ( name ) ; int nlen = icap . length ( ) ; boolean cap_flag = _BOOL ; for ( i = _NUM ; i < nlen ; ++ i ) { char c = icap . charAt ( i ) ; if ( Character . isLetterOrDigit ( c ) ) { if ( Character . isLowerCase ( c ) ) { if ...
178
java-test-2155
java
Where does the swipe up / down / left / right action perform ?
on the uiobject
@ Override public boolean swipe ( Selector obj , String dir , float percent , int steps ) throws Ui Object Not Found Exception { if ( obj . to Ui Object 2 ( ) == null ) { return swipe ( device . find Object ( obj . to Ui Selector ( ) ) , dir , steps ) ; } return swipe ( obj . to Ui Object 2 ( ) , dir , percent , steps ...
@ Override public boolean swipe ( Selector obj , String dir , float percent , int steps ) throws UiObjectNotFoundException { if ( obj . toUiObject2 ( ) == null ) { return swipe ( device . findObject ( obj . toUiSelector ( ) ) , dir , steps ) ; } return swipe ( obj . toUiObject2 ( ) , dir , percent , steps ) ; }
82
java-test-2156
java
What performs on the uiobject ?
the swipe up / down / left / right action
@ Override public boolean swipe ( Selector obj , String dir , float percent , int steps ) throws Ui Object Not Found Exception { if ( obj . to Ui Object 2 ( ) == null ) { return swipe ( device . find Object ( obj . to Ui Selector ( ) ) , dir , steps ) ; } return swipe ( obj . to Ui Object 2 ( ) , dir , percent , steps ...
@ Override public boolean swipe ( Selector obj , String dir , float percent , int steps ) throws UiObjectNotFoundException { if ( obj . toUiObject2 ( ) == null ) { return swipe ( device . findObject ( obj . toUiSelector ( ) ) , dir , steps ) ; } return swipe ( obj . toUiObject2 ( ) , dir , percent , steps ) ; }
82
java-test-2159
java
What does the code add ?
a couple of common permissions for both unsigned extensions as well as groovy scripts
private static void add Common Permissions ( Permissions permissions ) { permissions . add ( new Audio Permission ( STRING ) ) ; permissions . add ( new AWT Permission ( STRING ) ) ; permissions . add ( new AWT Permission ( STRING ) ) ; permissions . add ( new AWT Permission ( STRING ) ) ; permissions . add ( new Loggi...
private static void addCommonPermissions ( Permissions permissions ) { permissions . add ( new AudioPermission ( STRING ) ) ; permissions . add ( new AWTPermission ( STRING ) ) ; permissions . add ( new AWTPermission ( STRING ) ) ; permissions . add ( new AWTPermission ( STRING ) ) ; permissions . add ( new LoggingPerm...
200
java-test-2160
java
When may they be done ?
during any commit stage , hard or soft
public void insert Record ( int id , byte [ ] record ) throws IO Exception { if ( ! database . is Open ( ) ) throw new Illegal State Exception ( STRING ) ; if ( id < committed Next Row Id ) { throw new Illegal State Exception ( STRING + id + STRING + this ) ; } if ( id != last Transaction Insert Id + NUM ) { throw new ...
public void insertRecord ( int id , byte [ ] record ) throws IOException { if ( ! database . isOpen ( ) ) throw new IllegalStateException ( STRING ) ; if ( id < committedNextRowId ) { throw new IllegalStateException ( STRING + id + STRING + this ) ; } if ( id != lastTransactionInsertId + _NUM ) { throw new IllegalState...
157
java-test-2161
java
What is lockaddress adds ?
the address passed to a lock list
public void lock Address ( final int addr ) { if ( m lock Addresses . put If Absent ( addr , System . current Time Millis ( ) ) != null ) { throw new Illegal State Exception ( STRING + addr + STRING + physical Address ( addr , BOOL ) ) ; } }
public void lockAddress ( final int addr ) { if ( m_lockAddresses . putIfAbsent ( addr , System . currentTimeMillis ( ) ) != null ) { throw new IllegalStateException ( STRING + addr + STRING + physicalAddress ( addr , _BOOL ) ) ; } }
57
java-test-2162
java
What is adds the address passed to a lock list ?
lockaddress
public void lock Address ( final int addr ) { if ( m lock Addresses . put If Absent ( addr , System . current Time Millis ( ) ) != null ) { throw new Illegal State Exception ( STRING + addr + STRING + physical Address ( addr , BOOL ) ) ; } }
public void lockAddress ( final int addr ) { if ( m_lockAddresses . putIfAbsent ( addr , System . currentTimeMillis ( ) ) != null ) { throw new IllegalStateException ( STRING + addr + STRING + physicalAddress ( addr , _BOOL ) ) ; } }
57
java-test-2163
java
How does the method draw non - conflicting times in the event color and times ?
with conflicting events in the dna conflict color defined in colors
protected void draw DNA ( Canvas canvas ) { if ( m Dna != null ) { for ( Utils . DNA Strand strand : m Dna . values ( ) ) { if ( strand . color == CONFLICT COLOR || strand . points == null || strand . points . length == NUM ) { continue ; } mDNA Time Paint . set Color ( strand . color ) ; canvas . draw Lines ( strand ....
protected void drawDNA ( Canvas canvas ) { if ( mDna != null ) { for ( Utils . DNAStrand strand : mDna . values ( ) ) { if ( strand . color == CONFLICT_COLOR || strand . points == null || strand . points . length == _NUM ) { continue ; } mDNATimePaint . setColor ( strand . color ) ; canvas . drawLines ( strand . points...
305
java-test-2164
java
What does the method draw with conflicting events in the dna conflict color defined in colors ?
non - conflicting times in the event color and times
protected void draw DNA ( Canvas canvas ) { if ( m Dna != null ) { for ( Utils . DNA Strand strand : m Dna . values ( ) ) { if ( strand . color == CONFLICT COLOR || strand . points == null || strand . points . length == NUM ) { continue ; } mDNA Time Paint . set Color ( strand . color ) ; canvas . draw Lines ( strand ....
protected void drawDNA ( Canvas canvas ) { if ( mDna != null ) { for ( Utils . DNAStrand strand : mDna . values ( ) ) { if ( strand . color == CONFLICT_COLOR || strand . points == null || strand . points . length == _NUM ) { continue ; } mDNATimePaint . setColor ( strand . color ) ; canvas . drawLines ( strand . points...
305
java-test-2165
java
What does the code draw ?
a line showing busy times in each day of week
protected void draw DNA ( Canvas canvas ) { if ( m Dna != null ) { for ( Utils . DNA Strand strand : m Dna . values ( ) ) { if ( strand . color == CONFLICT COLOR || strand . points == null || strand . points . length == NUM ) { continue ; } mDNA Time Paint . set Color ( strand . color ) ; canvas . draw Lines ( strand ....
protected void drawDNA ( Canvas canvas ) { if ( mDna != null ) { for ( Utils . DNAStrand strand : mDna . values ( ) ) { if ( strand . color == CONFLICT_COLOR || strand . points == null || strand . points . length == _NUM ) { continue ; } mDNATimePaint . setColor ( strand . color ) ; canvas . drawLines ( strand . points...
305
java-test-2166
java
What does the code make ?
it active
public void add Action With Accellerator Key ( GP Action action ) { if ( action != null ) { for ( Key Stroke ks : GP Action . get All Key Strokes ( action . get ID ( ) ) ) { add Action ( action , ks ) ; } } }
public void addActionWithAccelleratorKey ( GPAction action ) { if ( action != null ) { for ( KeyStroke ks : GPAction . getAllKeyStrokes ( action . getID ( ) ) ) { addAction ( action , ks ) ; } } }
54
java-test-2169
java
What does the code compute ?
the estimated cardinality
public long cardinality ( ) throws IO Exception { switch ( format ) { case NORMAL : double E = NUM ; int V = NUM ; for ( int i = NUM ; i < this . m ; i ++ ) { byte rho = get Rho ( i ) ; E = E + NUM / ( NUM << ( int ) rho ) ; if ( NUM == ( int ) rho ) { V ++ ; } } E = NUM / E ; E = alpha [ this . p - NUM ] * this . m * ...
public long cardinality ( ) throws IOException { switch ( format ) { case NORMAL : double E = _NUM ; int V = _NUM ; for ( int i = _NUM ; i < this . m ; i ++ ) { byte rho = getRho ( i ) ; E = E + _NUM / ( _NUM << ( int ) rho ) ; if ( _NUM == ( int ) rho ) { V ++ ; } } E = _NUM / E ; E = alpha [ this . p - _NUM ] * this ...
254
java-test-2170
java
What is the logic here appends onto the end of the url if none is already present , or a bogus query parameter if there is already a query string ending in " . ?
a null query string
private static String maybe Fixup URL For Windows ( String url ) { if ( url == null || url . length ( ) < NUM || url . char At ( NUM ) == STRING || url . char At ( NUM ) == STRING ) return url ; String lower url = url . to Lower Case ( ) ; int i = bad Endings . length ; while ( i -- > NUM ) if ( lower url . ends With (...
private static String maybeFixupURLForWindows ( String url ) { if ( url == null || url . length ( ) < _NUM || url . charAt ( _NUM ) == STRING || url . charAt ( _NUM ) == STRING ) return url ; String lower_url = url . toLowerCase ( ) ; int i = badEndings . length ; while ( i -- > _NUM ) if ( lower_url . endsWith ( badEn...
105
java-test-2171
java
What does their suggested workaround be of course ?
to use the classes from the microsoft java sdk
private static String maybe Fixup URL For Windows ( String url ) { if ( url == null || url . length ( ) < NUM || url . char At ( NUM ) == STRING || url . char At ( NUM ) == STRING ) return url ; String lower url = url . to Lower Case ( ) ; int i = bad Endings . length ; while ( i -- > NUM ) if ( lower url . ends With (...
private static String maybeFixupURLForWindows ( String url ) { if ( url == null || url . length ( ) < _NUM || url . charAt ( _NUM ) == STRING || url . charAt ( _NUM ) == STRING ) return url ; String lower_url = url . toLowerCase ( ) ; int i = badEndings . length ; while ( i -- > _NUM ) if ( lower_url . endsWith ( badEn...
105
java-test-2172
java
What is to use the classes from the microsoft java sdk of course ?
their suggested workaround
private static String maybe Fixup URL For Windows ( String url ) { if ( url == null || url . length ( ) < NUM || url . char At ( NUM ) == STRING || url . char At ( NUM ) == STRING ) return url ; String lower url = url . to Lower Case ( ) ; int i = bad Endings . length ; while ( i -- > NUM ) if ( lower url . ends With (...
private static String maybeFixupURLForWindows ( String url ) { if ( url == null || url . length ( ) < _NUM || url . charAt ( _NUM ) == STRING || url . charAt ( _NUM ) == STRING ) return url ; String lower_url = url . toLowerCase ( ) ; int i = badEndings . length ; while ( i -- > _NUM ) if ( lower_url . endsWith ( badEn...
105
java-test-2173
java
For what purpose do you alter the url slightly ?
so it no longer ends with " . htm
private static String maybe Fixup URL For Windows ( String url ) { if ( url == null || url . length ( ) < NUM || url . char At ( NUM ) == STRING || url . char At ( NUM ) == STRING ) return url ; String lower url = url . to Lower Case ( ) ; int i = bad Endings . length ; while ( i -- > NUM ) if ( lower url . ends With (...
private static String maybeFixupURLForWindows ( String url ) { if ( url == null || url . length ( ) < _NUM || url . charAt ( _NUM ) == STRING || url . charAt ( _NUM ) == STRING ) return url ; String lower_url = url . toLowerCase ( ) ; int i = badEndings . length ; while ( i -- > _NUM ) if ( lower_url . endsWith ( badEn...
105
java-test-2178
java
What does the code serialize to a pretty - printed xml string ?
an object including the xstream
public String to XML ( final X Stream xstream , final Object obj ) throws Object Stream Exception { final Writer writer = new String Writer ( ) ; try { to XML ( xstream , obj , writer ) ; } catch ( final Object Stream Exception e ) { throw e ; } catch ( final IO Exception e ) { throw new Stream Exception ( STRING , e )...
public String toXML ( final XStream xstream , final Object obj ) throws ObjectStreamException { final Writer writer = new StringWriter ( ) ; try { toXML ( xstream , obj , writer ) ; } catch ( final ObjectStreamException e ) { throw e ; } catch ( final IOException e ) { throw new StreamException ( STRING , e ) ; } retur...
83
java-test-2179
java
What do we override if we see a substitution named " < dictionary > " , parse the substitution expression and store the result in dictionarychars to add logic to handle the < dictionary > tag ?
handlespecialsubstitution
protected void handle Special Substitution ( String replace , String replace With , int start Pos , String description ) { super . handle Special Substitution ( replace , replace With , start Pos , description ) ; if ( replace . equals ( STRING ) ) { if ( replace With . char At ( NUM ) == STRING ) { error ( STRING , st...
protected void handleSpecialSubstitution ( String replace , String replaceWith , int startPos , String description ) { super . handleSpecialSubstitution ( replace , replaceWith , startPos , description ) ; if ( replace . equals ( STRING ) ) { if ( replaceWith . charAt ( _NUM ) == STRING ) { error ( STRING , startPos , ...
94
java-test-2180
java
Where do we store the result ?
in dictionarychars
protected void handle Special Substitution ( String replace , String replace With , int start Pos , String description ) { super . handle Special Substitution ( replace , replace With , start Pos , description ) ; if ( replace . equals ( STRING ) ) { if ( replace With . char At ( NUM ) == STRING ) { error ( STRING , st...
protected void handleSpecialSubstitution ( String replace , String replaceWith , int startPos , String description ) { super . handleSpecialSubstitution ( replace , replaceWith , startPos , description ) ; if ( replace . equals ( STRING ) ) { if ( replaceWith . charAt ( _NUM ) == STRING ) { error ( STRING , startPos , ...
94