id
stringlengths
11
15
language
stringclasses
1 value
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-9233
java
What do a form allow ?
the user to submit their user code
@ Get public Representation user Code Form ( ) throws O Auth 2 Restlet Exception , Invalid Grant Exception , Not Found Exception , Server Exception { final O Auth 2 Request request = request Factory . create ( get Request ( ) ) ; if ( request . get Parameter ( O Auth 2 Constants . Device Code . USER CODE ) != null ) { ...
@ Get public Representation userCodeForm ( ) throws OAuth2RestletException , InvalidGrantException , NotFoundException , ServerException { final OAuth2Request request = requestFactory . create ( getRequest ( ) ) ; if ( request . getParameter ( OAuth2Constants . DeviceCode . USER_CODE ) != null ) { return verify ( null ...
90
java-test-9234
java
What do the user submit ?
their user code
@ Get public Representation user Code Form ( ) throws O Auth 2 Restlet Exception , Invalid Grant Exception , Not Found Exception , Server Exception { final O Auth 2 Request request = request Factory . create ( get Request ( ) ) ; if ( request . get Parameter ( O Auth 2 Constants . Device Code . USER CODE ) != null ) { ...
@ Get public Representation userCodeForm ( ) throws OAuth2RestletException , InvalidGrantException , NotFoundException , ServerException { final OAuth2Request request = requestFactory . create ( getRequest ( ) ) ; if ( request . getParameter ( OAuth2Constants . DeviceCode . USER_CODE ) != null ) { return verify ( null ...
90
java-test-9235
java
What did method use ?
to put note object into database
public void create Note ( Note note ) { SQ Lite Database db = get Writable Database ( ) ; String spannable As Html = Html . to Html ( note . get Spannable ( ) ) ; String date = dt . format ( new Date ( ) ) ; Content Values values = new Content Values ( ) ; values . put ( KEY SPANNABLE NOTE , spannable As Html ) ; value...
public void createNote ( Note note ) { SQLiteDatabase db = getWritableDatabase ( ) ; String spannableAsHtml = Html . toHtml ( note . getSpannable ( ) ) ; String date = dt . format ( new Date ( ) ) ; ContentValues values = new ContentValues ( ) ; values . put ( KEY_SPANNABLE_NOTE , spannableAsHtml ) ; values . put ( KEY...
142
java-test-9237
java
What does the code draw ?
the boundary
private void draw Fill ( Graphics g , int x , int y , int w , int h ) { g . set Color ( Color . BLACK ) ; g . draw Rect ( x , y , w , h ) ; g . set Color ( Color . LIGHT GRAY ) ; g . fill Rect ( x , y , w , h ) ; }
private void drawFill ( Graphics g , int x , int y , int w , int h ) { g . setColor ( Color . BLACK ) ; g . drawRect ( x , y , w , h ) ; g . setColor ( Color . LIGHT_GRAY ) ; g . fillRect ( x , y , w , h ) ; }
71
java-test-9238
java
What does the code parse ?
a 64 - bit int
long read Long ( ) throws IO Exception { return ( ( ( long ) is . read ( ) << NUM ) | ( ( long ) is . read ( ) << NUM ) | ( ( long ) is . read ( ) << NUM ) | ( ( long ) is . read ( ) << NUM ) | ( ( long ) is . read ( ) << NUM ) | ( ( long ) is . read ( ) << NUM ) | ( ( long ) is . read ( ) << NUM ) | ( ( long ) is . re...
long readLong ( ) throws IOException { return ( ( ( long ) _is . read ( ) << _NUM ) | ( ( long ) _is . read ( ) << _NUM ) | ( ( long ) _is . read ( ) << _NUM ) | ( ( long ) _is . read ( ) << _NUM ) | ( ( long ) _is . read ( ) << _NUM ) | ( ( long ) _is . read ( ) << _NUM ) | ( ( long ) _is . read ( ) << _NUM ) | ( ( lo...
115
java-test-9239
java
What do we have in this project usually ?
the < code > map & lt ; string , set & lt ; string & gt ; & gt
public static Set < String > put Set Into Map ( String key , Map < String , Set < String > > map , String value ) { Set < String > set = new Hash Set < String > ( ) ; set . add ( value ) ; map . put ( key , set ) ; return set ; }
public static Set < String > putSetIntoMap ( String key , Map < String , Set < String > > map , String value ) { Set < String > set = new HashSet < String > ( ) ; set . add ( value ) ; map . put ( key , set ) ; return set ; }
64
java-test-9240
java
Where do we have the < code > map & lt ; string , set & lt ; string & gt ; & gt usually ?
in this project
public static Set < String > put Set Into Map ( String key , Map < String , Set < String > > map , String value ) { Set < String > set = new Hash Set < String > ( ) ; set . add ( value ) ; map . put ( key , set ) ; return set ; }
public static Set < String > putSetIntoMap ( String key , Map < String , Set < String > > map , String value ) { Set < String > set = new HashSet < String > ( ) ; set . add ( value ) ; map . put ( key , set ) ; return set ; }
64
java-test-9241
java
What do we want just many times ?
to add a string to the map
public static Set < String > put Set Into Map ( String key , Map < String , Set < String > > map , String value ) { Set < String > set = new Hash Set < String > ( ) ; set . add ( value ) ; map . put ( key , set ) ; return set ; }
public static Set < String > putSetIntoMap ( String key , Map < String , Set < String > > map , String value ) { Set < String > set = new HashSet < String > ( ) ; set . add ( value ) ; map . put ( key , set ) ; return set ; }
64
java-test-9242
java
When do we want to add a string to the map just ?
many times
public static Set < String > put Set Into Map ( String key , Map < String , Set < String > > map , String value ) { Set < String > set = new Hash Set < String > ( ) ; set . add ( value ) ; map . put ( key , set ) ; return set ; }
public static Set < String > putSetIntoMap ( String key , Map < String , Set < String > > map , String value ) { Set < String > set = new HashSet < String > ( ) ; set . add ( value ) ; map . put ( key , set ) ; return set ; }
64
java-test-9243
java
What does the code create ?
a list of averages from a number . useful for sharing
private static String create Average List ( int n , String current Puzzle , String current Puzzle Subtype , Database Handler db Handler ) { int average ; Array List < Integer > ao List = db Handler . get List Of Truncated Average Of ( n , current Puzzle , current Puzzle Subtype , BOOL ) ; average = ao List . get ( n ) ...
private static String createAverageList ( int n , String currentPuzzle , String currentPuzzleSubtype , DatabaseHandler dbHandler ) { int average ; ArrayList < Integer > aoList = dbHandler . getListOfTruncatedAverageOf ( n , currentPuzzle , currentPuzzleSubtype , _BOOL ) ; average = aoList . get ( n ) ; aoList . remove ...
353
java-test-9244
java
What given the option ?
the long or short option
private Option resolve Option ( String opt ) { opt = Util . strip Leading Hyphens ( opt ) ; for ( Iterator it = options . iterator ( ) ; it . has Next ( ) ; ) { Option option = ( Option ) it . next ( ) ; if ( opt . equals ( option . get Opt ( ) ) ) { return option ; } if ( opt . equals ( option . get Long Opt ( ) ) ) {...
private Option resolveOption ( String opt ) { opt = Util . stripLeadingHyphens ( opt ) ; for ( Iterator it = options . iterator ( ) ; it . hasNext ( ) ; ) { Option option = ( Option ) it . next ( ) ; if ( opt . equals ( option . getOpt ( ) ) ) { return option ; } if ( opt . equals ( option . getLongOpt ( ) ) ) { return...
96
java-test-9245
java
What does the code retrieve ?
the option object given the long or short option as a string
private Option resolve Option ( String opt ) { opt = Util . strip Leading Hyphens ( opt ) ; for ( Iterator it = options . iterator ( ) ; it . has Next ( ) ; ) { Option option = ( Option ) it . next ( ) ; if ( opt . equals ( option . get Opt ( ) ) ) { return option ; } if ( opt . equals ( option . get Long Opt ( ) ) ) {...
private Option resolveOption ( String opt ) { opt = Util . stripLeadingHyphens ( opt ) ; for ( Iterator it = options . iterator ( ) ; it . hasNext ( ) ; ) { Option option = ( Option ) it . next ( ) ; if ( opt . equals ( option . getOpt ( ) ) ) { return option ; } if ( opt . equals ( option . getLongOpt ( ) ) ) { return...
96
java-test-9247
java
What is returning property values for the property names passed in ?
expressions
protected static List < Property Value Expression > to Property Expressions ( String ... properties ) { List < Property Value Expression > expr = new Array List < Property Value Expression > ( ) ; for ( String property : properties ) { expr . add ( get Prop Expr ( property ) ) ; } return expr ; }
protected static List < PropertyValueExpression > toPropertyExpressions ( String ... properties ) { List < PropertyValueExpression > expr = new ArrayList < PropertyValueExpression > ( ) ; for ( String property : properties ) { expr . add ( getPropExpr ( property ) ) ; } return expr ; }
61
java-test-9248
java
What do expressions return ?
property values for the property names passed in
protected static List < Property Value Expression > to Property Expressions ( String ... properties ) { List < Property Value Expression > expr = new Array List < Property Value Expression > ( ) ; for ( String property : properties ) { expr . add ( get Prop Expr ( property ) ) ; } return expr ; }
protected static List < PropertyValueExpression > toPropertyExpressions ( String ... properties ) { List < PropertyValueExpression > expr = new ArrayList < PropertyValueExpression > ( ) ; for ( String property : properties ) { expr . add ( getPropExpr ( property ) ) ; } return expr ; }
61
java-test-9249
java
Where does an error report ?
at a specific location
public String report Error ( XML Locator location , String domain , String key , Object [ ] arguments , short severity , Exception exception ) throws XNI Exception { Message Formatter message Formatter = get Message Formatter ( domain ) ; String message ; if ( message Formatter != null ) { message = message Formatter ....
public String reportError ( XMLLocator location , String domain , String key , Object [ ] arguments , short severity , Exception exception ) throws XNIException { MessageFormatter messageFormatter = getMessageFormatter ( domain ) ; String message ; if ( messageFormatter != null ) { message = messageFormatter . formatMe...
362
java-test-9252
java
What does the code write to an output stream ?
the entry ' s data fields in fcc format
public void write Entry ( C Cache Output Stream cos ) throws IO Exception { cos . write 16 ( ad Type ) ; cos . write 32 ( ad Data . length ) ; cos . write ( ad Data , NUM , ad Data . length ) ; }
public void writeEntry ( CCacheOutputStream cos ) throws IOException { cos . write16 ( adType ) ; cos . write32 ( adData . length ) ; cos . write ( adData , _NUM , adData . length ) ; }
51
java-test-9254
java
Where does this read ?
in a label file
public static String read Label File ( String entry Separator , boolean ensure Initial Boundary , String trfname ) throws IO Exception { Buffered Reader lab = new Buffered Reader ( new File Reader ( trfname ) ) ; try { Xwaves Labelfile Reader xlds = new Xwaves Labelfile Reader ( trfname ) ; String result = String Utils...
public static String readLabelFile ( String entrySeparator , boolean ensureInitialBoundary , String trfname ) throws IOException { BufferedReader lab = new BufferedReader ( new FileReader ( trfname ) ) ; try { XwavesLabelfileReader xlds = new XwavesLabelfileReader ( trfname ) ; String result = StringUtils . join ( entr...
115
java-test-9255
java
What does the code fetch ?
an account with the specified account number
@ Request Mapping ( STRING ) public Account by Number ( @ Path Variable ( STRING ) String account Number ) { logger . info ( STRING + account Number ) ; Account account = account Repository . find By Number ( account Number ) ; logger . info ( STRING + account ) ; if ( account == null ) throw new Account Not Found Exce...
@ RequestMapping ( STRING ) public Account byNumber ( @ PathVariable ( STRING ) String accountNumber ) { logger . info ( STRING + accountNumber ) ; Account account = accountRepository . findByNumber ( accountNumber ) ; logger . info ( STRING + account ) ; if ( account == null ) throw new AccountNotFoundException ( acco...
79
java-test-9256
java
What does the code create ?
a new texture with specified resource
public int add Texture ( int resource id , String uniform Name ) { int tex Id = m Texture Consts [ m Texture Array . size ( ) ] ; if ( m Texture Array . size ( ) + NUM >= MAX TEXTURES ) throw new Illegal State Exception ( STRING ) ; Bitmap bmp = Bitmap Factory . decode Resource ( m Context . get Resources ( ) , resourc...
public int addTexture ( int resource_id , String uniformName ) { int texId = mTextureConsts [ mTextureArray . size ( ) ] ; if ( mTextureArray . size ( ) + _NUM >= MAX_TEXTURES ) throw new IllegalStateException ( STRING ) ; Bitmap bmp = BitmapFactory . decodeResource ( mContext . getResources ( ) , resource_id ) ; retur...
92
java-test-9257
java
What does the code return upon completion ?
the tex i d num
public int add Texture ( int resource id , String uniform Name ) { int tex Id = m Texture Consts [ m Texture Array . size ( ) ] ; if ( m Texture Array . size ( ) + NUM >= MAX TEXTURES ) throw new Illegal State Exception ( STRING ) ; Bitmap bmp = Bitmap Factory . decode Resource ( m Context . get Resources ( ) , resourc...
public int addTexture ( int resource_id , String uniformName ) { int texId = mTextureConsts [ mTextureArray . size ( ) ] ; if ( mTextureArray . size ( ) + _NUM >= MAX_TEXTURES ) throw new IllegalStateException ( STRING ) ; Bitmap bmp = BitmapFactory . decodeResource ( mContext . getResources ( ) , resource_id ) ; retur...
92
java-test-9258
java
What does the code save ?
the initial change of the cash
private void cmd save Change ( ) { M Cash Book cash Book = new M Cash Book ( p ctx , p pos . get C Cash Book ID ( ) , null ) ; Timestamp today = Time Util . get Day ( System . current Time Millis ( ) ) ; M Cash cash = M Cash . get ( p ctx , p pos . get C Cash Book ID ( ) , today , null ) ; Big Decimal initial Change = ...
private void cmd_saveChange ( ) { MCashBook cashBook = new MCashBook ( p_ctx , p_pos . getC_CashBook_ID ( ) , null ) ; Timestamp today = TimeUtil . getDay ( System . currentTimeMillis ( ) ) ; MCash cash = MCash . get ( p_ctx , p_pos . getC_CashBook_ID ( ) , today , null ) ; BigDecimal initialChange = ( BigDecimal ) v_c...
220
java-test-9262
java
What does the code compute ?
the trigamma function of x
public static double trigamma ( double x ) { if ( Double . is Na N ( x ) || Double . is Infinite ( x ) ) { return x ; } if ( x > NUM && x <= S LIMIT ) { return NUM / ( x * x ) ; } if ( x >= C LIMIT ) { double inv = NUM / ( x * x ) ; return NUM / x + inv / NUM + inv / x * ( NUM / NUM - inv * ( NUM / NUM + inv / NUM ) ) ...
public static double trigamma ( double x ) { if ( Double . isNaN ( x ) || Double . isInfinite ( x ) ) { return x ; } if ( x > _NUM && x <= S_LIMIT ) { return _NUM / ( x * x ) ; } if ( x >= C_LIMIT ) { double inv = _NUM / ( x * x ) ; return _NUM / x + inv / _NUM + inv / x * ( _NUM / _NUM - inv * ( _NUM / _NUM + inv / _N...
123
java-test-9263
java
How is this function derived ?
by taking the derivative of the implementation of digamma
public static double trigamma ( double x ) { if ( Double . is Na N ( x ) || Double . is Infinite ( x ) ) { return x ; } if ( x > NUM && x <= S LIMIT ) { return NUM / ( x * x ) ; } if ( x >= C LIMIT ) { double inv = NUM / ( x * x ) ; return NUM / x + inv / NUM + inv / x * ( NUM / NUM - inv * ( NUM / NUM + inv / NUM ) ) ...
public static double trigamma ( double x ) { if ( Double . isNaN ( x ) || Double . isInfinite ( x ) ) { return x ; } if ( x > _NUM && x <= S_LIMIT ) { return _NUM / ( x * x ) ; } if ( x >= C_LIMIT ) { double inv = _NUM / ( x * x ) ; return _NUM / x + inv / _NUM + inv / x * ( _NUM / _NUM - inv * ( _NUM / _NUM + inv / _N...
123
java-test-9264
java
What do the user press when ?
the " lookup acronym " button
public void expand Acronym ( final String acronym ) { if ( m Async Task != null ) m Async Task . cancel ( BOOL ) ; m Async Task = new Generic Async Task < > ( this ) ; m Async Task . execute ( acronym ) ; }
public void expandAcronym ( final String acronym ) { if ( mAsyncTask != null ) mAsyncTask . cancel ( _BOOL ) ; mAsyncTask = new GenericAsyncTask < > ( this ) ; mAsyncTask . execute ( acronym ) ; }
51
java-test-9265
java
What does the code initiate when the user presses the " lookup acronym " button ?
the synchronous acronym lookup
public void expand Acronym ( final String acronym ) { if ( m Async Task != null ) m Async Task . cancel ( BOOL ) ; m Async Task = new Generic Async Task < > ( this ) ; m Async Task . execute ( acronym ) ; }
public void expandAcronym ( final String acronym ) { if ( mAsyncTask != null ) mAsyncTask . cancel ( _BOOL ) ; mAsyncTask = new GenericAsyncTask < > ( this ) ; mAsyncTask . execute ( acronym ) ; }
51
java-test-9266
java
When does the code initiate the synchronous acronym lookup ?
when the user presses the " lookup acronym " button
public void expand Acronym ( final String acronym ) { if ( m Async Task != null ) m Async Task . cancel ( BOOL ) ; m Async Task = new Generic Async Task < > ( this ) ; m Async Task . execute ( acronym ) ; }
public void expandAcronym ( final String acronym ) { if ( mAsyncTask != null ) mAsyncTask . cancel ( _BOOL ) ; mAsyncTask = new GenericAsyncTask < > ( this ) ; mAsyncTask . execute ( acronym ) ; }
51
java-test-9267
java
Where is dirt placed at random ?
a vacuum environment
public Vacuum Environment ( ) { Random r = new Random ( ) ; env State = new Vacuum Environment State ( NUM == r . next Int ( NUM ) ? Location State . Clean : Location State . Dirty , NUM == r . next Int ( NUM ) ? Location State . Clean : Location State . Dirty ) ; }
public VacuumEnvironment ( ) { Random r = new Random ( ) ; envState = new VacuumEnvironmentState ( _NUM == r . nextInt ( _NUM ) ? LocationState . Clean : LocationState . Dirty , _NUM == r . nextInt ( _NUM ) ? LocationState . Clean : LocationState . Dirty ) ; }
64
java-test-9268
java
What is placed at random a vacuum environment ?
dirt
public Vacuum Environment ( ) { Random r = new Random ( ) ; env State = new Vacuum Environment State ( NUM == r . next Int ( NUM ) ? Location State . Clean : Location State . Dirty , NUM == r . next Int ( NUM ) ? Location State . Clean : Location State . Dirty ) ; }
public VacuumEnvironment ( ) { Random r = new Random ( ) ; envState = new VacuumEnvironmentState ( _NUM == r . nextInt ( _NUM ) ? LocationState . Clean : LocationState . Dirty , _NUM == r . nextInt ( _NUM ) ? LocationState . Clean : LocationState . Dirty ) ; }
64
java-test-9269
java
What does the code generate ?
the source files for the stub and / or skeleton classes needed by rmi for the given remote implementation class
public void generate ( Batch Environment env , Class Definition cdef , File dest Dir ) { Remote Class remote Class = Remote Class . for Class ( env , cdef ) ; if ( remote Class == null ) return ; RMI Generator gen ; try { gen = new RMI Generator ( env , cdef , dest Dir , remote Class , version ) ; } catch ( Class Not F...
public void generate ( BatchEnvironment env , ClassDefinition cdef , File destDir ) { RemoteClass remoteClass = RemoteClass . forClass ( env , cdef ) ; if ( remoteClass == null ) return ; RMIGenerator gen ; try { gen = new RMIGenerator ( env , cdef , destDir , remoteClass , version ) ; } catch ( ClassNotFound e ) { env...
99
java-test-9276
java
What did it determine ?
the number of pops
@ Deprecated protected void insert At Boundry ( J Editor Pane editor , HTML Document doc , int offset , Element insert Element , String html , HTML . Tag parent Tag , HTML . Tag add Tag ) { Element e ; Element common Parent ; boolean is First = ( offset == NUM ) ; if ( offset > NUM || insert Element == null ) { e = doc...
@ Deprecated protected void insertAtBoundry ( JEditorPane editor , HTMLDocument doc , int offset , Element insertElement , String html , HTML . Tag parentTag , HTML . Tag addTag ) { Element e ; Element commonParent ; boolean isFirst = ( offset == _NUM ) ; if ( offset > _NUM || insertElement == null ) { e = doc . getDef...
345
java-test-9277
java
When is this invoked ?
when inserting at a boundary
@ Deprecated protected void insert At Boundry ( J Editor Pane editor , HTML Document doc , int offset , Element insert Element , String html , HTML . Tag parent Tag , HTML . Tag add Tag ) { Element e ; Element common Parent ; boolean is First = ( offset == NUM ) ; if ( offset > NUM || insert Element == null ) { e = doc...
@ Deprecated protected void insertAtBoundry ( JEditorPane editor , HTMLDocument doc , int offset , Element insertElement , String html , HTML . Tag parentTag , HTML . Tag addTag ) { Element e ; Element commonParent ; boolean isFirst = ( offset == _NUM ) ; if ( offset > _NUM || insertElement == null ) { e = doc . getDef...
345
java-test-9278
java
What need to be performed ?
the number of pushes
@ Deprecated protected void insert At Boundry ( J Editor Pane editor , HTML Document doc , int offset , Element insert Element , String html , HTML . Tag parent Tag , HTML . Tag add Tag ) { Element e ; Element common Parent ; boolean is First = ( offset == NUM ) ; if ( offset > NUM || insert Element == null ) { e = doc...
@ Deprecated protected void insertAtBoundry ( JEditorPane editor , HTMLDocument doc , int offset , Element insertElement , String html , HTML . Tag parentTag , HTML . Tag addTag ) { Element e ; Element commonParent ; boolean isFirst = ( offset == _NUM ) ; if ( offset > _NUM || insertElement == null ) { e = doc . getDef...
345
java-test-9279
java
What does the code compute without validating parameters ?
the black equivalent volatility
public double unsafe Sabr Volatility ( final double strike , final double forward , final double expiry Time , final double alpha , final double beta , final double nu , final double rho ) { final double one Minus Beta = NUM - beta ; final double A = Math . pow ( forward * strike , one Minus Beta ) ; final double sqrt ...
public double unsafeSabrVolatility ( final double strike , final double forward , final double expiryTime , final double alpha , final double beta , final double nu , final double rho ) { final double oneMinusBeta = _NUM - beta ; final double A = Math . pow ( forward * strike , oneMinusBeta ) ; final double sqrtA = Mat...
403
java-test-9280
java
What does a given walking distance value ( in meters ) convert ?
into a walking time value ( in sec
public Double convert Walk Distance To Walk Time ( double walk Distance ) { Double walk Time = null ; switch ( study Area Code ) { case NUM : double a = NUM ; double b = NUM ; double c = - NUM ; double d = NUM ; double wt = a + b * walk Distance + c * Math . pow ( walk Distance , NUM ) + d * Math . pow ( walk Distance ...
public Double convertWalkDistanceToWalkTime ( double walkDistance ) { Double walkTime = null ; switch ( studyAreaCode ) { case _NUM : double a = _NUM ; double b = _NUM ; double c = - _NUM ; double d = _NUM ; double wt = a + b * walkDistance + c * Math . pow ( walkDistance , _NUM ) + d * Math . pow ( walkDistance , _NUM...
104
java-test-9281
java
What converts into a walking time value ( in sec ?
a given walking distance value ( in meters )
public Double convert Walk Distance To Walk Time ( double walk Distance ) { Double walk Time = null ; switch ( study Area Code ) { case NUM : double a = NUM ; double b = NUM ; double c = - NUM ; double d = NUM ; double wt = a + b * walk Distance + c * Math . pow ( walk Distance , NUM ) + d * Math . pow ( walk Distance ...
public Double convertWalkDistanceToWalkTime ( double walkDistance ) { Double walkTime = null ; switch ( studyAreaCode ) { case _NUM : double a = _NUM ; double b = _NUM ; double c = - _NUM ; double d = _NUM ; double wt = a + b * walkDistance + c * Math . pow ( walkDistance , _NUM ) + d * Math . pow ( walkDistance , _NUM...
104
java-test-9287
java
What do player do with " too recently " being defined in configuration file too recently ?
a list command
private boolean time Authorised List ( Player player ) { if ( player . has Permission ( STRING ) || list Time == NUM ) return BOOL ; long current Time = System . current Time Millis ( ) ; long last List Time = NUM ; if ( players . contains Key ( player ) ) last List Time = players . get ( player ) ; if ( current Time -...
private boolean timeAuthorisedList ( Player player ) { if ( player . hasPermission ( STRING ) || listTime == _NUM ) return _BOOL ; long currentTime = System . currentTimeMillis ( ) ; long lastListTime = _NUM ; if ( players . containsKey ( player ) ) lastListTime = players . get ( player ) ; if ( currentTime - lastListT...
97
java-test-9288
java
What does the code create ?
a new bleachcomposer
Bleach Composer ( Color c ) { int color = c . get RGB ( ) ; int [ ] components = new int [ NUM ] ; split Rgb ( color , components ) ; red = Math . max ( NUM , components [ RED ] ) ; green = Math . max ( NUM , components [ GREEN ] ) ; blue = Math . max ( NUM , components [ BLUE ] ) ; }
BleachComposer ( Color c ) { int color = c . getRGB ( ) ; int [ ] components = new int [ _NUM ] ; splitRgb ( color , components ) ; red = Math . max ( _NUM , components [ RED ] ) ; green = Math . max ( _NUM , components [ GREEN ] ) ; blue = Math . max ( _NUM , components [ BLUE ] ) ; }
79
java-test-9289
java
What can handle the particular parameterblock ?
the xtiffimage
public Rendered Image create ( Parameter Block param Block , Rendering Hints render Hints ) { String Buffer msg = new String Buffer ( ) ; if ( ! validate Parameters ( param Block , msg ) ) { return null ; } try { Seekable Stream in = ( Seekable Stream ) param Block . get Object Parameter ( NUM ) ; XTIFF Image image = n...
public RenderedImage create ( ParameterBlock paramBlock , RenderingHints renderHints ) { StringBuffer msg = new StringBuffer ( ) ; if ( ! validateParameters ( paramBlock , msg ) ) { return null ; } try { SeekableStream in = ( SeekableStream ) paramBlock . getObjectParameter ( _NUM ) ; XTIFFImage image = new XTIFFImage ...
106
java-test-9290
java
What does the code create if the xtiffimage can handle the particular parameterblock with the given parameterblock ?
an xtiffimage
public Rendered Image create ( Parameter Block param Block , Rendering Hints render Hints ) { String Buffer msg = new String Buffer ( ) ; if ( ! validate Parameters ( param Block , msg ) ) { return null ; } try { Seekable Stream in = ( Seekable Stream ) param Block . get Object Parameter ( NUM ) ; XTIFF Image image = n...
public RenderedImage create ( ParameterBlock paramBlock , RenderingHints renderHints ) { StringBuffer msg = new StringBuffer ( ) ; if ( ! validateParameters ( paramBlock , msg ) ) { return null ; } try { SeekableStream in = ( SeekableStream ) paramBlock . getObjectParameter ( _NUM ) ; XTIFFImage image = new XTIFFImage ...
106
java-test-9291
java
What can the xtiffimage handle ?
the particular parameterblock
public Rendered Image create ( Parameter Block param Block , Rendering Hints render Hints ) { String Buffer msg = new String Buffer ( ) ; if ( ! validate Parameters ( param Block , msg ) ) { return null ; } try { Seekable Stream in = ( Seekable Stream ) param Block . get Object Parameter ( NUM ) ; XTIFF Image image = n...
public RenderedImage create ( ParameterBlock paramBlock , RenderingHints renderHints ) { StringBuffer msg = new StringBuffer ( ) ; if ( ! validateParameters ( paramBlock , msg ) ) { return null ; } try { SeekableStream in = ( SeekableStream ) paramBlock . getObjectParameter ( _NUM ) ; XTIFFImage image = new XTIFFImage ...
106
java-test-9292
java
How does the code create an xtiffimage if the xtiffimage can handle the particular parameterblock ?
with the given parameterblock
public Rendered Image create ( Parameter Block param Block , Rendering Hints render Hints ) { String Buffer msg = new String Buffer ( ) ; if ( ! validate Parameters ( param Block , msg ) ) { return null ; } try { Seekable Stream in = ( Seekable Stream ) param Block . get Object Parameter ( NUM ) ; XTIFF Image image = n...
public RenderedImage create ( ParameterBlock paramBlock , RenderingHints renderHints ) { StringBuffer msg = new StringBuffer ( ) ; if ( ! validateParameters ( paramBlock , msg ) ) { return null ; } try { SeekableStream in = ( SeekableStream ) paramBlock . getObjectParameter ( _NUM ) ; XTIFFImage image = new XTIFFImage ...
106
java-test-9293
java
What exists in db ?
check block snapshot
public static Block Snapshot check Block Snapshot Exists In DB ( Db Client db Client , String native Guid ) throws IO Exception { List < Block Snapshot > snapshots = Custom Query Utility . get Active Block Snapshot By Native Guid ( db Client , native Guid ) ; Iterator < Block Snapshot > snapshot Itr = snapshots . itera...
public static BlockSnapshot checkBlockSnapshotExistsInDB ( DbClient dbClient , String nativeGuid ) throws IOException { List < BlockSnapshot > snapshots = CustomQueryUtility . getActiveBlockSnapshotByNativeGuid ( dbClient , nativeGuid ) ; Iterator < BlockSnapshot > snapshotItr = snapshots . iterator ( ) ; if ( snapshot...
88
java-test-9294
java
When will we set it to true if required ?
after profile exchange
private boolean skip Checks For Internal Region ( Cache Distribution Advisee rgn ) { boolean skip = BOOL ; if ( rgn instanceof Local Region ) { Local Region lr = ( Local Region ) rgn ; skip = lr . is Internal Region ( ) ; } return skip ; }
private boolean skipChecksForInternalRegion ( CacheDistributionAdvisee rgn ) { boolean skip = _BOOL ; if ( rgn instanceof LocalRegion ) { LocalRegion lr = ( LocalRegion ) rgn ; skip = lr . isInternalRegion ( ) ; } return skip ; }
52
java-test-9295
java
What do internal regions skip for since we will set it to true after profile exchange if required ?
concurrency - checks - enabled checks
private boolean skip Checks For Internal Region ( Cache Distribution Advisee rgn ) { boolean skip = BOOL ; if ( rgn instanceof Local Region ) { Local Region lr = ( Local Region ) rgn ; skip = lr . is Internal Region ( ) ; } return skip ; }
private boolean skipChecksForInternalRegion ( CacheDistributionAdvisee rgn ) { boolean skip = _BOOL ; if ( rgn instanceof LocalRegion ) { LocalRegion lr = ( LocalRegion ) rgn ; skip = lr . isInternalRegion ( ) ; } return skip ; }
52
java-test-9296
java
What skip concurrency - checks - enabled checks for since we will set it to true after profile exchange if required ?
internal regions
private boolean skip Checks For Internal Region ( Cache Distribution Advisee rgn ) { boolean skip = BOOL ; if ( rgn instanceof Local Region ) { Local Region lr = ( Local Region ) rgn ; skip = lr . is Internal Region ( ) ; } return skip ; }
private boolean skipChecksForInternalRegion ( CacheDistributionAdvisee rgn ) { boolean skip = _BOOL ; if ( rgn instanceof LocalRegion ) { LocalRegion lr = ( LocalRegion ) rgn ; skip = lr . isInternalRegion ( ) ; } return skip ; }
52
java-test-9297
java
Why do internal regions skip concurrency - checks - enabled checks for ?
since we will set it to true after profile exchange if required
private boolean skip Checks For Internal Region ( Cache Distribution Advisee rgn ) { boolean skip = BOOL ; if ( rgn instanceof Local Region ) { Local Region lr = ( Local Region ) rgn ; skip = lr . is Internal Region ( ) ; } return skip ; }
private boolean skipChecksForInternalRegion ( CacheDistributionAdvisee rgn ) { boolean skip = _BOOL ; if ( rgn instanceof LocalRegion ) { LocalRegion lr = ( LocalRegion ) rgn ; skip = lr . isInternalRegion ( ) ; } return skip ; }
52
java-test-9298
java
What helps in any case ?
release current first waiter
private long cancel Waiter ( W Node node , W Node group , boolean interrupted ) { if ( node != null && group != null ) { Thread w ; node . status = CANCELLED ; for ( W Node p = group , q ; ( q = p . cowait ) != null ; ) { if ( q . status == CANCELLED ) { U . compare And Swap Object ( p , WCOWAIT , q , q . cowait ) ; p ...
private long cancelWaiter ( WNode node , WNode group , boolean interrupted ) { if ( node != null && group != null ) { Thread w ; node . status = CANCELLED ; for ( WNode p = group , q ; ( q = p . cowait ) != null ; ) { if ( q . status == CANCELLED ) { U . compareAndSwapObject ( p , WCOWAIT , q , q . cowait ) ; p = group...
529
java-test-9299
java
What may be needed under possible future cancellation policies ?
a conditional form of release
private long cancel Waiter ( W Node node , W Node group , boolean interrupted ) { if ( node != null && group != null ) { Thread w ; node . status = CANCELLED ; for ( W Node p = group , q ; ( q = p . cowait ) != null ; ) { if ( q . status == CANCELLED ) { U . compare And Swap Object ( p , WCOWAIT , q , q . cowait ) ; p ...
private long cancelWaiter ( WNode node , WNode group , boolean interrupted ) { if ( node != null && group != null ) { Thread w ; node . status = CANCELLED ; for ( WNode p = group , q ; ( q = p . cowait ) != null ; ) { if ( q . status == CANCELLED ) { U . compareAndSwapObject ( p , WCOWAIT , q , q . cowait ) ; p = group...
529
java-test-9300
java
Where may a conditional form of release be needed ?
under possible future cancellation policies
private long cancel Waiter ( W Node node , W Node group , boolean interrupted ) { if ( node != null && group != null ) { Thread w ; node . status = CANCELLED ; for ( W Node p = group , q ; ( q = p . cowait ) != null ; ) { if ( q . status == CANCELLED ) { U . compare And Swap Object ( p , WCOWAIT , q , q . cowait ) ; p ...
private long cancelWaiter ( WNode node , WNode group , boolean interrupted ) { if ( node != null && group != null ) { Thread w ; node . status = CANCELLED ; for ( WNode p = group , q ; ( q = p . cowait ) != null ; ) { if ( q . status == CANCELLED ) { U . compareAndSwapObject ( p , WCOWAIT , q , q . cowait ) ; p = group...
529
java-test-9301
java
When did by aiken add the code ?
sam , 2006 - 11 - 15
private ASN 1 Encodable Vector build Unauthenticated Attributes ( byte [ ] time Stamp Token ) throws IO Exception { if ( time Stamp Token == null ) return null ; String ID TIME STAMP TOKEN = STRING ; ASN 1 Input Stream tempstream = new ASN 1 Input Stream ( new Byte Array Input Stream ( time Stamp Token ) ) ; ASN 1 Enco...
private ASN1EncodableVector buildUnauthenticatedAttributes ( byte [ ] timeStampToken ) throws IOException { if ( timeStampToken == null ) return null ; String ID_TIME_STAMP_TOKEN = STRING ; ASN1InputStream tempstream = new ASN1InputStream ( new ByteArrayInputStream ( timeStampToken ) ) ; ASN1EncodableVector unauthAttri...
156
java-test-9302
java
When did by martin modif to start with the timestamptoken ( signeddata 1 . 2 . 840 . 113549 . 1 . 7 . 2 ?
brunecky 07 / 12 / 2007
private ASN 1 Encodable Vector build Unauthenticated Attributes ( byte [ ] time Stamp Token ) throws IO Exception { if ( time Stamp Token == null ) return null ; String ID TIME STAMP TOKEN = STRING ; ASN 1 Input Stream tempstream = new ASN 1 Input Stream ( new Byte Array Input Stream ( time Stamp Token ) ) ; ASN 1 Enco...
private ASN1EncodableVector buildUnauthenticatedAttributes ( byte [ ] timeStampToken ) throws IOException { if ( timeStampToken == null ) return null ; String ID_TIME_STAMP_TOKEN = STRING ; ASN1InputStream tempstream = new ASN1InputStream ( new ByteArrayInputStream ( timeStampToken ) ) ; ASN1EncodableVector unauthAttri...
156
java-test-9303
java
For what purpose did by martin modif brunecky 07 / 12 / 2007 ?
to start with the timestamptoken ( signeddata 1 . 2 . 840 . 113549 . 1 . 7 . 2
private ASN 1 Encodable Vector build Unauthenticated Attributes ( byte [ ] time Stamp Token ) throws IO Exception { if ( time Stamp Token == null ) return null ; String ID TIME STAMP TOKEN = STRING ; ASN 1 Input Stream tempstream = new ASN 1 Input Stream ( new Byte Array Input Stream ( time Stamp Token ) ) ; ASN 1 Enco...
private ASN1EncodableVector buildUnauthenticatedAttributes ( byte [ ] timeStampToken ) throws IOException { if ( timeStampToken == null ) return null ; String ID_TIME_STAMP_TOKEN = STRING ; ASN1InputStream tempstream = new ASN1InputStream ( new ByteArrayInputStream ( timeStampToken ) ) ; ASN1EncodableVector unauthAttri...
156
java-test-9305
java
What has finished execution ?
this cloudlet
public boolean is Finished ( ) { if ( index == - NUM ) { return BOOL ; } boolean completed = BOOL ; final long finish = res List . get ( index ) . finished So Far ; final long result = cloudlet Length - finish ; if ( result <= NUM ) { completed = BOOL ; } return completed ; }
public boolean isFinished ( ) { if ( index == - _NUM ) { return _BOOL ; } boolean completed = _BOOL ; final long finish = resList . get ( index ) . finishedSoFar ; final long result = cloudletLength - finish ; if ( result <= _NUM ) { completed = _BOOL ; } return completed ; }
65
java-test-9310
java
What does the code apply to an incoming instance ?
the outlier treatment methods ( if any )
public void apply Outlier Treatment ( double [ ] values ) throws Exception { for ( int i = NUM ; i < m mining Meta . size ( ) ; i ++ ) { Mining Field Meta Info mfi = m mining Meta . get ( i ) ; values [ i ] = mfi . apply Outlier Treatment ( values [ i ] ) ; } }
public void applyOutlierTreatment ( double [ ] values ) throws Exception { for ( int i = _NUM ; i < m_miningMeta . size ( ) ; i ++ ) { MiningFieldMetaInfo mfi = m_miningMeta . get ( i ) ; values [ i ] = mfi . applyOutlierTreatment ( values [ i ] ) ; } }
69
java-test-9311
java
What is required cases ?
no api - impl replacement
private static Api Usage of ( List < IN 4 JS Project > projects , Map < IN 4 JS Project , IN 4 JS Project > concrete Api Impl Project Mapping , Api Impl Mapping api Impl Mapping ) { return new Api Usage ( null , projects , concrete Api Impl Project Mapping , api Impl Mapping , Collections . empty List ( ) , BOOL ) ; }
private static ApiUsage of ( List < IN4JSProject > projects , Map < IN4JSProject , IN4JSProject > concreteApiImplProjectMapping , ApiImplMapping apiImplMapping ) { return new ApiUsage ( null , projects , concreteApiImplProjectMapping , apiImplMapping , Collections . emptyList ( ) , _BOOL ) ; }
71
java-test-9316
java
What gets garbage collected as long as the sampled datatableview is around ?
this sorteddatatableview
@ Override public Data Table sample ( int new Size ) { int row Count = get Row Number ( ) ; if ( row Count <= new Size ) { return this ; } int [ ] sampled Selected Indices = new int [ row Count ] ; for ( int i = NUM ; i < row Count ; ++ i ) { sampled Selected Indices [ i ] = i ; } Random rng = new Random ( NUM ) ; int ...
@ Override public DataTable sample ( int newSize ) { int rowCount = getRowNumber ( ) ; if ( rowCount <= newSize ) { return this ; } int [ ] sampledSelectedIndices = new int [ rowCount ] ; for ( int i = _NUM ; i < rowCount ; ++ i ) { sampledSelectedIndices [ i ] = i ; } Random rng = new Random ( _NUM ) ; int swapIdx ; i...
253
java-test-9317
java
How does the built - in symbol return if pcalmode = false ?
with string str .
public static Symbol Get Built In Symbol ( String str , boolean pcal Mode ) { Symbol sym ; if ( pcal Mode ) { sym = ( Symbol ) pcal Built In Hash Table . get ( str ) ; } else { sym = ( Symbol ) built In Hash Table . get ( str ) ; } if ( sym == null || ( sym . pcal && ! pcal Mode ) ) { return null ; } return sym ; }
public static Symbol GetBuiltInSymbol ( String str , boolean pcalMode ) { Symbol sym ; if ( pcalMode ) { sym = ( Symbol ) pcalBuiltInHashTable . get ( str ) ; } else { sym = ( Symbol ) builtInHashTable . get ( str ) ; } if ( sym == null || ( sym . pcal && ! pcalMode ) ) { return null ; } return sym ; }
85
java-test-9318
java
What does the code create ?
a new instance based on the given name parameters
public Versioned File ( String base Dir , String base Name , String suffix ) { if ( ! base Dir . ends With ( FILE SEPARATOR ) ) { base Dir += FILE SEPARATOR ; } this . base Dir = base Dir ; this . suffix = suffix ; this . base Name = base Name ; reset Version ( ) ; }
public VersionedFile ( String baseDir , String baseName , String suffix ) { if ( ! baseDir . endsWith ( FILE_SEPARATOR ) ) { baseDir += FILE_SEPARATOR ; } this . baseDir = baseDir ; this . suffix = suffix ; this . baseName = baseName ; resetVersion ( ) ; }
65
java-test-9319
java
What does this assume ?
that all dangling directed edges have been removed from the graph , so that there is always a next diredge
public static List find Dir Edges In Ring ( Polygonize Directed Edge start DE ) { Polygonize Directed Edge de = start DE ; List edges = new Array List ( ) ; do { edges . add ( de ) ; de = de . get Next ( ) ; Assert . is True ( de != null , STRING ) ; Assert . is True ( de == start DE || ! de . is In Ring ( ) , STRING )...
public static List findDirEdgesInRing ( PolygonizeDirectedEdge startDE ) { PolygonizeDirectedEdge de = startDE ; List edges = new ArrayList ( ) ; do { edges . add ( de ) ; de = de . getNext ( ) ; Assert . isTrue ( de != null , STRING ) ; Assert . isTrue ( de == startDE || ! de . isInRing ( ) , STRING ) ; } while ( de !...
98
java-test-9320
java
For what purpose have all dangling directed edges been is removed from the graph ?
so that there is always a next diredge
public static List find Dir Edges In Ring ( Polygonize Directed Edge start DE ) { Polygonize Directed Edge de = start DE ; List edges = new Array List ( ) ; do { edges . add ( de ) ; de = de . get Next ( ) ; Assert . is True ( de != null , STRING ) ; Assert . is True ( de == start DE || ! de . is In Ring ( ) , STRING )...
public static List findDirEdgesInRing ( PolygonizeDirectedEdge startDE ) { PolygonizeDirectedEdge de = startDE ; List edges = new ArrayList ( ) ; do { edges . add ( de ) ; de = de . getNext ( ) ; Assert . isTrue ( de != null , STRING ) ; Assert . isTrue ( de == startDE || ! de . isInRing ( ) , STRING ) ; } while ( de !...
98
java-test-9321
java
What does the code initialize ?
the db configuration properties and back - up directory name
private void init ( ) throws Ade Exception { db Properties Initialized = BOOL ; final Properties prop = new Properties ( ) ; try ( File Input Stream fis = new File Input Stream ( properties File Name ) ) { prop . load ( fis ) ; db URL = prop . get Property ( DATABASE URL PARAM ) ; db Driver = prop . get Property ( DATA...
private void init ( ) throws AdeException { dbPropertiesInitialized = _BOOL ; final Properties prop = new Properties ( ) ; try ( FileInputStream fis = new FileInputStream ( propertiesFileName ) ) { prop . load ( fis ) ; dbURL = prop . getProperty ( DATABASE_URL_PARAM ) ; dbDriver = prop . getProperty ( DATABASE_DRIVER_...
290
java-test-9322
java
For what purpose do method run ?
for actually executing the command
public void run ( ) { try { if ( logger . is Debug Enabled ( ) ) { logger . debug ( STRING ) ; } String ret Value = command Runner . run Command ( source Command Tag Value ) ; if ( logger . is Debug Enabled ( ) ) { logger . debug ( STRING ) ; } synchronized ( command Exec Lock ) { this . return Value = ret Value ; cmd ...
public void run ( ) { try { if ( logger . isDebugEnabled ( ) ) { logger . debug ( STRING ) ; } String retValue = commandRunner . runCommand ( sourceCommandTagValue ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( STRING ) ; } synchronized ( commandExecLock ) { this . returnValue = retValue ; cmdExecutionStatus...
205
java-test-9323
java
What does the code create ?
a reliablelog to handle snapshots and logging in a stable storage directory
public Reliable Log ( String dir Path , Log Handler handler ) throws IO Exception { dir = new File ( dir Path ) ; if ( ! ( dir . exists ( ) ? dir . is Directory ( ) : dir . mkdirs ( ) ) ) { throw new Log Exception ( STRING + dir Path ) ; } this . handler = handler ; try { Data Input Stream in = new Data Input Stream ( ...
public ReliableLog ( String dirPath , LogHandler handler ) throws IOException { dir = new File ( dirPath ) ; if ( ! ( dir . exists ( ) ? dir . isDirectory ( ) : dir . mkdirs ( ) ) ) { throw new LogException ( STRING + dirPath ) ; } this . handler = handler ; try { DataInputStream in = new DataInputStream ( new FileInpu...
147
java-test-9324
java
What does the code set ?
to recover any existing data from the stable storage directory
public Reliable Log ( String dir Path , Log Handler handler ) throws IO Exception { dir = new File ( dir Path ) ; if ( ! ( dir . exists ( ) ? dir . is Directory ( ) : dir . mkdirs ( ) ) ) { throw new Log Exception ( STRING + dir Path ) ; } this . handler = handler ; try { Data Input Stream in = new Data Input Stream ( ...
public ReliableLog ( String dirPath , LogHandler handler ) throws IOException { dir = new File ( dirPath ) ; if ( ! ( dir . exists ( ) ? dir . isDirectory ( ) : dir . mkdirs ( ) ) ) { throw new LogException ( STRING + dirPath ) ; } this . handler = handler ; try { DataInputStream in = new DataInputStream ( new FileInpu...
147
java-test-9325
java
What does the code recover ?
any existing data from the stable storage directory
public Reliable Log ( String dir Path , Log Handler handler ) throws IO Exception { dir = new File ( dir Path ) ; if ( ! ( dir . exists ( ) ? dir . is Directory ( ) : dir . mkdirs ( ) ) ) { throw new Log Exception ( STRING + dir Path ) ; } this . handler = handler ; try { Data Input Stream in = new Data Input Stream ( ...
public ReliableLog ( String dirPath , LogHandler handler ) throws IOException { dir = new File ( dirPath ) ; if ( ! ( dir . exists ( ) ? dir . isDirectory ( ) : dir . mkdirs ( ) ) ) { throw new LogException ( STRING + dirPath ) ; } this . handler = handler ; try { DataInputStream in = new DataInputStream ( new FileInpu...
147
java-test-9326
java
Where do reducers distribute ?
between splits
private Map < Hadoop Input Split , Integer > assign Reducers To Splits ( Collection < Hadoop Input Split > splits , int reducer Cnt ) { Map < Hadoop Input Split , Integer > res = new Identity Hash Map < > ( splits . size ( ) ) ; int base = reducer Cnt / splits . size ( ) ; int remainder = reducer Cnt % splits . size ( ...
private Map < HadoopInputSplit , Integer > assignReducersToSplits ( Collection < HadoopInputSplit > splits , int reducerCnt ) { Map < HadoopInputSplit , Integer > res = new IdentityHashMap < > ( splits . size ( ) ) ; int base = reducerCnt / splits . size ( ) ; int remainder = reducerCnt % splits . size ( ) ; for ( Hado...
123
java-test-9327
java
What distribute between splits ?
reducers
private Map < Hadoop Input Split , Integer > assign Reducers To Splits ( Collection < Hadoop Input Split > splits , int reducer Cnt ) { Map < Hadoop Input Split , Integer > res = new Identity Hash Map < > ( splits . size ( ) ) ; int base = reducer Cnt / splits . size ( ) ; int remainder = reducer Cnt % splits . size ( ...
private Map < HadoopInputSplit , Integer > assignReducersToSplits ( Collection < HadoopInputSplit > splits , int reducerCnt ) { Map < HadoopInputSplit , Integer > res = new IdentityHashMap < > ( splits . size ( ) ) ; int base = reducerCnt / splits . size ( ) ; int remainder = reducerCnt % splits . size ( ) ; for ( Hado...
123
java-test-9329
java
What does this method require because we need to know where any multiple cardinality elements show up in the path ?
the metadata in hand
static Collection < Element > create Parent Elements ( Path path , Element root Element , Element Metadata < ? , ? > root Metadata , int element Count ) throws Parse Exception { Preconditions . check Not Null ( path , STRING ) ; Preconditions . check Not Null ( root Element , STRING ) ; List < Metadata Key < ? > > step...
static Collection < Element > createParentElements ( Path path , Element rootElement , ElementMetadata < ? , ? > rootMetadata , int elementCount ) throws ParseException { Preconditions . checkNotNull ( path , STRING ) ; Preconditions . checkNotNull ( rootElement , STRING ) ; List < MetadataKey < ? > > steps = path . ge...
431
java-test-9330
java
What does we need ?
to know where any multiple cardinality elements show up in the path
static Collection < Element > create Parent Elements ( Path path , Element root Element , Element Metadata < ? , ? > root Metadata , int element Count ) throws Parse Exception { Preconditions . check Not Null ( path , STRING ) ; Preconditions . check Not Null ( root Element , STRING ) ; List < Metadata Key < ? > > step...
static Collection < Element > createParentElements ( Path path , Element rootElement , ElementMetadata < ? , ? > rootMetadata , int elementCount ) throws ParseException { Preconditions . checkNotNull ( path , STRING ) ; Preconditions . checkNotNull ( rootElement , STRING ) ; List < MetadataKey < ? > > steps = path . ge...
431
java-test-9331
java
By how much do code update ?
from from to to
public void update ( int from , int to ) { Change . Source < ? > source = Id Range Change Source . for Items ( from , to , NUM ) ; Executor Service executor Service = new Thread Pool Executor ( NUM , NUM , NUM , Time Unit . SECONDS , new Linked Blocking Queue < Runnable > ( ) ) ; Wikibase Uris uris = new Wikibase Uris ...
public void update ( int from , int to ) { Change . Source < ? > source = IdRangeChangeSource . forItems ( from , to , _NUM ) ; ExecutorService executorService = new ThreadPoolExecutor ( _NUM , _NUM , _NUM , TimeUnit . SECONDS , new LinkedBlockingQueue < Runnable > ( ) ) ; WikibaseUris uris = new WikibaseUris ( STRING ...
124
java-test-9332
java
What did the normal way ( to avoid double copying ) be ?
to get the buffer and write directly to it
public void write ( byte [ ] b , int o , int len ) { while ( len > NUM ) { int n = len <= avail Len ? len : avail Len ; System . arraycopy ( b , o , buf , offset , n ) ; increment Offset ( n ) ; len -= n ; o += n ; } }
public void write ( byte [ ] b , int o , int len ) { while ( len > _NUM ) { int n = len <= availLen ? len : availLen ; System . arraycopy ( b , o , buf , offset , n ) ; incrementOffset ( n ) ; len -= n ; o += n ; } }
67
java-test-9333
java
What is to get the buffer and write directly to it ?
the normal way ( to avoid double copying )
public void write ( byte [ ] b , int o , int len ) { while ( len > NUM ) { int n = len <= avail Len ? len : avail Len ; System . arraycopy ( b , o , buf , offset , n ) ; increment Offset ( n ) ; len -= n ; o += n ; } }
public void write ( byte [ ] b , int o , int len ) { while ( len > _NUM ) { int n = len <= availLen ? len : availLen ; System . arraycopy ( b , o , buf , offset , n ) ; incrementOffset ( n ) ; len -= n ; o += n ; } }
67
java-test-9334
java
What does the code generate ?
a series of encoded longs , each numerical one bigger than the one before
public void test Long Conversion And Ordering ( ) throws Exception { Bytes Ref previous = null ; Bytes Ref current = new Bytes Ref ( new byte [ Long . BYTES ] ) ; for ( long value = - NUM ; value < NUM ; value ++ ) { Numeric Utils . long To Sortable Bytes ( value , current . bytes , current . offset ) ; if ( previous =...
public void testLongConversionAndOrdering ( ) throws Exception { BytesRef previous = null ; BytesRef current = new BytesRef ( new byte [ Long . BYTES ] ) ; for ( long value = - _NUM ; value < _NUM ; value ++ ) { NumericUtils . longToSortableBytes ( value , current . bytes , current . offset ) ; if ( previous == null ) ...
164
java-test-9335
java
When did the code call ?
when an entry of item is clicked
@ Override public void on Item Click ( Adapter View < ? > parent , View view , int position , long id ) { Check Box enable Component Checkbox = ( Check Box ) view . find View By Id ( R . id . enable component checkbox ) ; enable Component Checkbox . perform Click ( ) ; }
@ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { CheckBox enableComponentCheckbox = ( CheckBox ) view . findViewById ( R . id . enable_component_checkbox ) ; enableComponentCheckbox . performClick ( ) ; }
61
java-test-9336
java
What does either series have a dataset ?
less than two ( 2 ) points
private boolean is Either Series Degenerate ( XY Dataset x dataset , boolean x implied Zero Subtrahend ) { if ( x implied Zero Subtrahend ) { return ( x dataset . get Item Count ( NUM ) < NUM ) ; } return ( ( x dataset . get Item Count ( NUM ) < NUM ) || ( x dataset . get Item Count ( NUM ) < NUM ) ) ; }
private boolean isEitherSeriesDegenerate ( XYDataset x_dataset , boolean x_impliedZeroSubtrahend ) { if ( x_impliedZeroSubtrahend ) { return ( x_dataset . getItemCount ( _NUM ) < _NUM ) ; } return ( ( x_dataset . getItemCount ( _NUM ) < _NUM ) || ( x_dataset . getItemCount ( _NUM ) < _NUM ) ) ; }
75
java-test-9337
java
What has less than two ( 2 ) points a dataset ?
either series
private boolean is Either Series Degenerate ( XY Dataset x dataset , boolean x implied Zero Subtrahend ) { if ( x implied Zero Subtrahend ) { return ( x dataset . get Item Count ( NUM ) < NUM ) ; } return ( ( x dataset . get Item Count ( NUM ) < NUM ) || ( x dataset . get Item Count ( NUM ) < NUM ) ) ; }
private boolean isEitherSeriesDegenerate ( XYDataset x_dataset , boolean x_impliedZeroSubtrahend ) { if ( x_impliedZeroSubtrahend ) { return ( x_dataset . getItemCount ( _NUM ) < _NUM ) ; } return ( ( x_dataset . getItemCount ( _NUM ) < _NUM ) || ( x_dataset . getItemCount ( _NUM ) < _NUM ) ) ; }
75
java-test-9338
java
What does the code look ?
an iso - 639 code up in the list
static public Iso 639 find ( String lang ) { Iso 639 rslt = ( Iso 639 ) all . get ( lang ) ; if ( rslt == null ) { if ( lang != null && lang . compare To ( STRING ) >= NUM && lang . compare To ( STRING ) <= NUM && lang . length ( ) == NUM ) { return new Iso 639 ( STRING , null , lang , lang , LT LOCAL USE ) ; } } retur...
static public Iso639 find ( String lang ) { Iso639 rslt = ( Iso639 ) all . get ( lang ) ; if ( rslt == null ) { if ( lang != null && lang . compareTo ( STRING ) >= _NUM && lang . compareTo ( STRING ) <= _NUM && lang . length ( ) == _NUM ) { return new Iso639 ( STRING , null , lang , lang , LT_LOCAL_USE ) ; } } return r...
91
java-test-9341
java
Where do the rule name follow a colon ?
at the end of the label
public Rule Name rule Name ( ) { String label Str = to String ( ) ; int colon Location = label Str . last Index Of ( STRING ) ; int rule Name Start = colon Location + NUM ; String rule Name Str = label Str . substring ( rule Name Start ) ; return Rule Name . create ( rule Name Str ) ; }
public RuleName ruleName ( ) { String labelStr = toString ( ) ; int colonLocation = labelStr . lastIndexOf ( STRING ) ; int ruleNameStart = colonLocation + _NUM ; String ruleNameStr = labelStr . substring ( ruleNameStart ) ; return RuleName . create ( ruleNameStr ) ; }
68
java-test-9342
java
What does the code build ?
the kml structure
public boolean parse KML File ( File file ) { m Local File = file ; Log . d ( Bonus Pack Helper . LOG TAG , STRING + m Local File . get Absolute Path ( ) ) ; Input Stream stream ; boolean ok ; try { stream = new Buffered Input Stream ( new File Input Stream ( m Local File ) ) ; ok = parse KML Stream ( stream , null ) ;...
public boolean parseKMLFile ( File file ) { mLocalFile = file ; Log . d ( BonusPackHelper . LOG_TAG , STRING + mLocalFile . getAbsolutePath ( ) ) ; InputStream stream ; boolean ok ; try { stream = new BufferedInputStream ( new FileInputStream ( mLocalFile ) ) ; ok = parseKMLStream ( stream , null ) ; stream . close ( )...
108
java-test-9345
java
What does the code create locally ?
the entry with the given key
public boolean create Locally ( final Bucket Region bucket Region , final Entry Event Impl event , boolean if New , boolean if Old , boolean require Old Value , final long last Modified ) throws Force Reattempt Exception { boolean result = BOOL ; try { event . set Region ( bucket Region ) ; if ( event . is Origin Remot...
public boolean createLocally ( final BucketRegion bucketRegion , final EntryEventImpl event , boolean ifNew , boolean ifOld , boolean requireOldValue , final long lastModified ) throws ForceReattemptException { boolean result = _BOOL ; try { event . setRegion ( bucketRegion ) ; if ( event . isOriginRemote ( ) ) { resul...
163
java-test-9346
java
What does that mean ?
the bucket is remapped
public boolean create Locally ( final Bucket Region bucket Region , final Entry Event Impl event , boolean if New , boolean if Old , boolean require Old Value , final long last Modified ) throws Force Reattempt Exception { boolean result = BOOL ; try { event . set Region ( bucket Region ) ; if ( event . is Origin Remot...
public boolean createLocally ( final BucketRegion bucketRegion , final EntryEventImpl event , boolean ifNew , boolean ifOld , boolean requireOldValue , final long lastModified ) throws ForceReattemptException { boolean result = _BOOL ; try { event . setRegion ( bucketRegion ) ; if ( event . isOriginRemote ( ) ) { resul...
163
java-test-9347
java
What does it create ?
the entry on the region
public boolean create Locally ( final Bucket Region bucket Region , final Entry Event Impl event , boolean if New , boolean if Old , boolean require Old Value , final long last Modified ) throws Force Reattempt Exception { boolean result = BOOL ; try { event . set Region ( bucket Region ) ; if ( event . is Origin Remot...
public boolean createLocally ( final BucketRegion bucketRegion , final EntryEventImpl event , boolean ifNew , boolean ifOld , boolean requireOldValue , final long lastModified ) throws ForceReattemptException { boolean result = _BOOL ; try { event . setRegion ( bucketRegion ) ; if ( event . isOriginRemote ( ) ) { resul...
163
java-test-9348
java
What does it try if from step 1 it gets null if from step 1 it gets null ?
to creates the entry on the region
public boolean create Locally ( final Bucket Region bucket Region , final Entry Event Impl event , boolean if New , boolean if Old , boolean require Old Value , final long last Modified ) throws Force Reattempt Exception { boolean result = BOOL ; try { event . set Region ( bucket Region ) ; if ( event . is Origin Remot...
public boolean createLocally ( final BucketRegion bucketRegion , final EntryEventImpl event , boolean ifNew , boolean ifOld , boolean requireOldValue , final long lastModified ) throws ForceReattemptException { boolean result = _BOOL ; try { event . setRegion ( bucketRegion ) ; if ( event . isOriginRemote ( ) ) { resul...
163
java-test-9349
java
What does the code draw ?
a line in current pen color
@ Override public void draw Line ( int x1 , int y1 , int x2 , int y2 ) { set State To Local ( ) ; m printstream . println ( x Transform ( x Scale ( x1 ) ) + STRING + y Transform ( y Scale ( y1 ) ) + STRING + x Transform ( x Scale ( x2 ) ) + STRING + y Transform ( y Scale ( y2 ) ) + STRING ) ; }
@ Override public void drawLine ( int x1 , int y1 , int x2 , int y2 ) { setStateToLocal ( ) ; m_printstream . println ( xTransform ( xScale ( x1 ) ) + STRING + yTransform ( yScale ( y1 ) ) + STRING + xTransform ( xScale ( x2 ) ) + STRING + yTransform ( yScale ( y2 ) ) + STRING ) ; }
82
java-test-9350
java
By how much did an upper utility bind ?
less than the parameter minutility
public Linked List < Hypothesis > prune ( Linked List < Hypothesis > hypo List , double min Utility , double total Weight , double total Positive Weight , double delta p ) { double delta hp = delta p / hypo List . size ( ) ; List Iterator it = hypo List . list Iterator ( ) ; while ( it . has Next ( ) ) { Hypothesis hyp...
public LinkedList < Hypothesis > prune ( LinkedList < Hypothesis > hypoList , double minUtility , double totalWeight , double totalPositiveWeight , double delta_p ) { double delta_hp = delta_p / hypoList . size ( ) ; ListIterator it = hypoList . listIterator ( ) ; while ( it . hasNext ( ) ) { Hypothesis hypo = ( Hypoth...
128
java-test-9351
java
What was a network used ?
to construct the netmatcher
public boolean match Inet Network ( Inet Address ip ) { boolean same Net = BOOL ; for ( Iterator < Inet Network > iter = networks . iterator ( ) ; ( ! same Net ) && iter . has Next ( ) ; ) { Inet Network network = iter . next ( ) ; same Net = network . contains ( ip ) ; } return same Net ; }
public boolean matchInetNetwork ( InetAddress ip ) { boolean sameNet = _BOOL ; for ( Iterator < InetNetwork > iter = networks . iterator ( ) ; ( ! sameNet ) && iter . hasNext ( ) ; ) { InetNetwork network = iter . next ( ) ; sameNet = network . contains ( ip ) ; } return sameNet ; }
73
java-test-9352
java
For what purpose do geolocation show ?
for a set of contacts
public static void show Contacts On Map ( Context ctx , Set < Contact Id > contacts ) { Hash Map < String , Geoloc > map Contact Geoloc = new Hash Map < > ( ) ; Rcs Contact Util rcs Contact Util = Rcs Contact Util . get Instance ( ctx ) ; for ( Contact Id contact : contacts ) { Geoloc geoloc = get Last Geoloc ( ctx , c...
public static void showContactsOnMap ( Context ctx , Set < ContactId > contacts ) { HashMap < String , Geoloc > mapContactGeoloc = new HashMap < > ( ) ; RcsContactUtil rcsContactUtil = RcsContactUtil . getInstance ( ctx ) ; for ( ContactId contact : contacts ) { Geoloc geoloc = getLastGeoloc ( ctx , contact ) ; if ( ge...
227
java-test-9353
java
What does the code add ?
followings to a class : 1 . a class field 2 . a getter method 3 . a setter method
public < T > Db Schema Changer add Bean Property ( String property Name , Class < T > property Clazz , String column Name ) throws Exception { Ct Field f = new Ct Field ( pool . get ( property Clazz . get Name ( ) ) , property Name , cc ) ; cc . add Field ( f ) ; String getter Method Name = generate Getter Method Name ...
public < T > DbSchemaChanger addBeanProperty ( String propertyName , Class < T > propertyClazz , String columnName ) throws Exception { CtField f = new CtField ( pool . get ( propertyClazz . getName ( ) ) , propertyName , cc ) ; cc . addField ( f ) ; String getterMethodName = generateGetterMethodName ( propertyName ) ;...
353
java-test-9354
java
What does the code add to the class ?
a bean property
public < T > Db Schema Changer add Bean Property ( String property Name , Class < T > property Clazz , String column Name ) throws Exception { Ct Field f = new Ct Field ( pool . get ( property Clazz . get Name ( ) ) , property Name , cc ) ; cc . add Field ( f ) ; String getter Method Name = generate Getter Method Name ...
public < T > DbSchemaChanger addBeanProperty ( String propertyName , Class < T > propertyClazz , String columnName ) throws Exception { CtField f = new CtField ( pool . get ( propertyClazz . getName ( ) ) , propertyName , cc ) ; cc . addField ( f ) ; String getterMethodName = generateGetterMethodName ( propertyName ) ;...
353
java-test-9355
java
What does the code add from the supplied properties stream ?
all key value pairs
public static synchronized void add From Properties ( Input Stream props Stream ) throws Exception { Properties exp Props = new Properties ( ) ; exp Props . load ( props Stream ) ; props Stream . close ( ) ; props Stream = null ; add From Properties ( exp Props ) ; }
public static synchronized void addFromProperties ( InputStream propsStream ) throws Exception { Properties expProps = new Properties ( ) ; expProps . load ( propsStream ) ; propsStream . close ( ) ; propsStream = null ; addFromProperties ( expProps ) ; }
55
java-test-9356
java
In which direction does the code add all key value pairs ?
from the supplied properties stream
public static synchronized void add From Properties ( Input Stream props Stream ) throws Exception { Properties exp Props = new Properties ( ) ; exp Props . load ( props Stream ) ; props Stream . close ( ) ; props Stream = null ; add From Properties ( exp Props ) ; }
public static synchronized void addFromProperties ( InputStream propsStream ) throws Exception { Properties expProps = new Properties ( ) ; expProps . load ( propsStream ) ; propsStream . close ( ) ; propsStream = null ; addFromProperties ( expProps ) ; }
55
java-test-9357
java
What does the code create ?
a dictionary based on a reader
public Multiple File Dictionary ( Reader [ ] readers ) { ins = new Array List < Buffered Reader > ( ) ; for ( Reader reader : readers ) { Buffered Reader in = new Buffered Reader ( reader ) ; ins . add ( in ) ; } }
public MultipleFileDictionary ( Reader [ ] readers ) { ins = new ArrayList < BufferedReader > ( ) ; for ( Reader reader : readers ) { BufferedReader in = new BufferedReader ( reader ) ; ins . add ( in ) ; } }
51
java-test-9358
java
What does a class load ?
from a buffer of raw class data
private static int Define Class ( JNI Environment env , Address class Name Address , int class Loader , Address data , int data Len ) { if ( trace JNI ) VM . sys Write ( STRING ) ; Runtime Entrypoints . check JNI Count Down To GC ( ) ; try { String class String = null ; if ( ! class Name Address . is Zero ( ) ) { JNI G...
private static int DefineClass ( JNIEnvironment env , Address classNameAddress , int classLoader , Address data , int dataLen ) { if ( traceJNI ) VM . sysWrite ( STRING ) ; RuntimeEntrypoints . checkJNICountDownToGC ( ) ; try { String classString = null ; if ( ! classNameAddress . isZero ( ) ) { JNIGenericHelpers . cre...
235
java-test-9359
java
What does the code delete ?
the entry in the directory
public void delete ( SSO Token token , String dn ) throws SMS Exception , SSO Exception { for ( String entry : sub Entries ( token , dn , STRING , NUM , BOOL , BOOL ) ) { debug . message ( STRING , entry ) ; delete ( token , get Naming Attribute ( ) + STRING + entry + STRING + dn ) ; } for ( String sub Org : search Sub...
public void delete ( SSOToken token , String dn ) throws SMSException , SSOException { for ( String entry : subEntries ( token , dn , STRING , _NUM , _BOOL , _BOOL ) ) { debug . message ( STRING , entry ) ; delete ( token , getNamingAttribute ( ) + STRING + entry + STRING + dn ) ; } for ( String subOrg : searchSubOrgNa...
136
java-test-9361
java
What does the code create ?
a new script action for the workspace
public Run Script Action ( Network Panel network Panel ) { super ( STRING ) ; put Value ( SMALL ICON , Resource Manager . get Image Icon ( STRING ) ) ; put Value ( SHORT DESCRIPTION , STRING ) ; this . network Panel = network Panel ; }
public RunScriptAction ( NetworkPanel networkPanel ) { super ( STRING ) ; putValue ( SMALL_ICON , ResourceManager . getImageIcon ( STRING ) ) ; putValue ( SHORT_DESCRIPTION , STRING ) ; this . networkPanel = networkPanel ; }
51
java-test-9364
java
For what purpose should we remove special characters , i . e . html ?
for some save scnearios and analysis
public static String remove Special Char ( String temp Str ) { if ( temp Str != null ) { temp Str = replace ( temp Str , STRING , STRING , BOOL , BOOL ) ; temp Str = replace ( temp Str , STRING , STRING , BOOL , BOOL ) ; temp Str = replace ( temp Str , STRING , STRING , BOOL , BOOL ) ; temp Str = replace ( temp Str , S...
public static String removeSpecialChar ( String tempStr ) { if ( tempStr != null ) { tempStr = replace ( tempStr , STRING , STRING , _BOOL , _BOOL ) ; tempStr = replace ( tempStr , STRING , STRING , _BOOL , _BOOL ) ; tempStr = replace ( tempStr , STRING , STRING , _BOOL , _BOOL ) ; tempStr = replace ( tempStr , STRING ...
296
java-test-9365
java
What should we remove for some save scnearios and analysis ?
special characters , i . e . html
public static String remove Special Char ( String temp Str ) { if ( temp Str != null ) { temp Str = replace ( temp Str , STRING , STRING , BOOL , BOOL ) ; temp Str = replace ( temp Str , STRING , STRING , BOOL , BOOL ) ; temp Str = replace ( temp Str , STRING , STRING , BOOL , BOOL ) ; temp Str = replace ( temp Str , S...
public static String removeSpecialChar ( String tempStr ) { if ( tempStr != null ) { tempStr = replace ( tempStr , STRING , STRING , _BOOL , _BOOL ) ; tempStr = replace ( tempStr , STRING , STRING , _BOOL , _BOOL ) ; tempStr = replace ( tempStr , STRING , STRING , _BOOL , _BOOL ) ; tempStr = replace ( tempStr , STRING ...
296
java-test-9366
java
Where does the speech input panel disable ?
in the tab
public void enable Speech ( boolean to Enable ) { if ( input Container . get Component Count ( ) == NUM && to Enable && system . get Module ( Audio Module . class ) != null ) { Speech Input Panel panel = new Speech Input Panel ( system . get Module ( Audio Module . class ) ) ; input Container . add ( panel , Border Lay...
public void enableSpeech ( boolean toEnable ) { if ( inputContainer . getComponentCount ( ) == _NUM && toEnable && system . getModule ( AudioModule . class ) != null ) { SpeechInputPanel panel = new SpeechInputPanel ( system . getModule ( AudioModule . class ) ) ; inputContainer . add ( panel , BorderLayout . SOUTH ) ;...
113
java-test-9367
java
What disables in the tab ?
the speech input panel
public void enable Speech ( boolean to Enable ) { if ( input Container . get Component Count ( ) == NUM && to Enable && system . get Module ( Audio Module . class ) != null ) { Speech Input Panel panel = new Speech Input Panel ( system . get Module ( Audio Module . class ) ) ; input Container . add ( panel , Border Lay...
public void enableSpeech ( boolean toEnable ) { if ( inputContainer . getComponentCount ( ) == _NUM && toEnable && system . getModule ( AudioModule . class ) != null ) { SpeechInputPanel panel = new SpeechInputPanel ( system . getModule ( AudioModule . class ) ) ; inputContainer . add ( panel , BorderLayout . SOUTH ) ;...
113
java-test-9368
java
What does the decryption take on the consumer side ?
palce
public byte [ ] decrypt Mac Key ( String enc Mac Key Base 64 , String server Public Key Base 64 ) throws Association Exception { byte [ ] hzz = get Digested ZZ ( server Public Key Base 64 ) ; byte [ ] enc Mac Key = Base 64 . decode Base 64 ( enc Mac Key Base 64 . get Bytes ( ) ) ; if ( hzz . length != enc Mac Key . len...
public byte [ ] decryptMacKey ( String encMacKeyBase64 , String serverPublicKeyBase64 ) throws AssociationException { byte [ ] hzz = getDigestedZZ ( serverPublicKeyBase64 ) ; byte [ ] encMacKey = Base64 . decodeBase64 ( encMacKeyBase64 . getBytes ( ) ) ; if ( hzz . length != encMacKey . length ) throw new AssociationEx...
184