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-2004
java
What have we seen the number of times ?
each feature
void update Feature Counts ( int [ ] translation Ids , List < List < Rich Translation < I String , String > > > nbest Lists ) { for ( int i = NUM ; i < translation Ids . length ; i ++ ) { Set < String > features = new Hash Set < String > ( ) ; for ( Rich Translation < I String , String > trans : nbest Lists . get ( i )...
void updateFeatureCounts ( int [ ] translationIds , List < List < RichTranslation < IString , String > > > nbestLists ) { for ( int i = _NUM ; i < translationIds . length ; i ++ ) { Set < String > features = new HashSet < String > ( ) ; for ( RichTranslation < IString , String > trans : nbestLists . get ( i ) ) { for (...
200
java-test-2005
java
What do the file indicate ?
the compaction is present or not
public static boolean is Compaction Required For Table ( String meta Folder Path ) { String minor Compaction Status File = meta Folder Path + Carbon Common Constants . FILE SEPARATOR + Carbon Common Constants . minor Compaction Required File ; String major Compaction Status File = meta Folder Path + Carbon Common Const...
public static boolean isCompactionRequiredForTable ( String metaFolderPath ) { String minorCompactionStatusFile = metaFolderPath + CarbonCommonConstants . FILE_SEPARATOR + CarbonCommonConstants . minorCompactionRequiredFile ; String majorCompactionStatusFile = metaFolderPath + CarbonCommonConstants . FILE_SEPARATOR + C...
155
java-test-2010
java
What does mnemonic and returns structure contain ?
plain text and index of mnemonic char ( if any )
public static Text With Mnemonic parse Text ( final String text With Mnemonic ) { if ( text With Mnemonic == null ) { throw new Illegal Argument Exception ( STRING ) ; } int index = - NUM ; final String Buffer plain Text = new String Buffer ( ) ; for ( int i = NUM ; i < text With Mnemonic . length ( ) ; i ++ ) { char c...
public static TextWithMnemonic parseText ( final String textWithMnemonic ) { if ( textWithMnemonic == null ) { throw new IllegalArgumentException ( STRING ) ; } int index = - _NUM ; final StringBuffer plainText = new StringBuffer ( ) ; for ( int i = _NUM ; i < textWithMnemonic . length ( ) ; i ++ ) { char ch = textWith...
169
java-test-2011
java
What might text contain ?
mnemonic and returns structure which contains plain text and index of mnemonic char ( if any )
public static Text With Mnemonic parse Text ( final String text With Mnemonic ) { if ( text With Mnemonic == null ) { throw new Illegal Argument Exception ( STRING ) ; } int index = - NUM ; final String Buffer plain Text = new String Buffer ( ) ; for ( int i = NUM ; i < text With Mnemonic . length ( ) ; i ++ ) { char c...
public static TextWithMnemonic parseText ( final String textWithMnemonic ) { if ( textWithMnemonic == null ) { throw new IllegalArgumentException ( STRING ) ; } int index = - _NUM ; final StringBuffer plainText = new StringBuffer ( ) ; for ( int i = _NUM ; i < textWithMnemonic . length ( ) ; i ++ ) { char ch = textWith...
169
java-test-2012
java
What contains plain text and index of mnemonic char ( if any ) ?
mnemonic and returns structure
public static Text With Mnemonic parse Text ( final String text With Mnemonic ) { if ( text With Mnemonic == null ) { throw new Illegal Argument Exception ( STRING ) ; } int index = - NUM ; final String Buffer plain Text = new String Buffer ( ) ; for ( int i = NUM ; i < text With Mnemonic . length ( ) ; i ++ ) { char c...
public static TextWithMnemonic parseText ( final String textWithMnemonic ) { if ( textWithMnemonic == null ) { throw new IllegalArgumentException ( STRING ) ; } int index = - _NUM ; final StringBuffer plainText = new StringBuffer ( ) ; for ( int i = _NUM ; i < textWithMnemonic . length ( ) ; i ++ ) { char ch = textWith...
169
java-test-2015
java
What does the code destroy ?
the provided bucket
public void destroy Bucket ( Auto Mix Bucket bucket ) { Shared Preferences prefs = get Prefs ( ) ; Shared Preferences . Editor editor = prefs . edit ( ) ; Set < String > set = new Tree Set < > ( prefs . get String Set ( PREF BUCKETS IDS , new Tree Set < String > ( ) ) ) ; set . remove ( bucket . get Session Id ( ) ) ; ...
public void destroyBucket ( AutoMixBucket bucket ) { SharedPreferences prefs = getPrefs ( ) ; SharedPreferences . Editor editor = prefs . edit ( ) ; Set < String > set = new TreeSet < > ( prefs . getStringSet ( PREF_BUCKETS_IDS , new TreeSet < String > ( ) ) ) ; set . remove ( bucket . getSessionId ( ) ) ; editor . put...
106
java-test-2017
java
When do info displayed keep ?
even when outside the component right - click
@ Override public void mouse Clicked ( Mouse Event e ) { if ( Swing Utilities . is Left Mouse Button ( e ) ) { if ( e . get Click Count ( ) == NUM ) { fixed Hover Entry = BOOL ; set Fixed Start At ( hover Entry ) ; } else { long actual Hover Entry = find Hover Entry ( e . get Point ( ) ) ; fixed Hover Entry = actual Ho...
@ Override public void mouseClicked ( MouseEvent e ) { if ( SwingUtilities . isLeftMouseButton ( e ) ) { if ( e . getClickCount ( ) == _NUM ) { fixedHoverEntry = _BOOL ; setFixedStartAt ( hoverEntry ) ; } else { long actualHoverEntry = findHoverEntry ( e . getPoint ( ) ) ; fixedHoverEntry = actualHoverEntry != - _NUM ;...
111
java-test-2018
java
Where do stuff display ?
on mouse
@ Override public void mouse Clicked ( Mouse Event e ) { if ( Swing Utilities . is Left Mouse Button ( e ) ) { if ( e . get Click Count ( ) == NUM ) { fixed Hover Entry = BOOL ; set Fixed Start At ( hover Entry ) ; } else { long actual Hover Entry = find Hover Entry ( e . get Point ( ) ) ; fixed Hover Entry = actual Ho...
@ Override public void mouseClicked ( MouseEvent e ) { if ( SwingUtilities . isLeftMouseButton ( e ) ) { if ( e . getClickCount ( ) == _NUM ) { fixedHoverEntry = _BOOL ; setFixedStartAt ( hoverEntry ) ; } else { long actualHoverEntry = findHoverEntry ( e . getPoint ( ) ) ; fixedHoverEntry = actualHoverEntry != - _NUM ;...
111
java-test-2020
java
What does the code traverse ?
the expanded group metadata list
@ Suppress Warnings ( STRING ) private void refresh Exp Group Metadata List ( boolean force Children Count Refresh , boolean sync Group Positions ) { final Array List < Group Metadata > egml = m Exp Group Metadata List ; int egml Size = egml . size ( ) ; int cur Fl Pos = NUM ; m Total Exp Children Count = NUM ; if ( sy...
@ SuppressWarnings ( STRING ) private void refreshExpGroupMetadataList ( boolean forceChildrenCountRefresh , boolean syncGroupPositions ) { final ArrayList < GroupMetadata > egml = mExpGroupMetadataList ; int egmlSize = egml . size ( ) ; int curFlPos = _NUM ; mTotalExpChildrenCount = _NUM ; if ( syncGroupPositions ) { ...
384
java-test-2021
java
What does the code write ?
a domain specification object
private void write Domain Spec ( Domain Spec spec , Document document , Element parent Element ) { if ( spec instanceof Top Domain ) { Element top Domain = document . create Element ( STRING ) ; parent Element . append Child ( top Domain ) ; } else if ( spec instanceof Bottom Domain ) { Element bottom Domain = document...
private void writeDomainSpec ( DomainSpec spec , Document document , Element parentElement ) { if ( spec instanceof TopDomain ) { Element topDomain = document . createElement ( STRING ) ; parentElement . appendChild ( topDomain ) ; } else if ( spec instanceof BottomDomain ) { Element bottomDomain = document . createEle...
146
java-test-2022
java
What does the code provide ?
an iterator of indices
@ Data Provider ( name = STRING ) public Iterator < Object [ ] > repeat Data Provider ( ) { Collection < Object [ ] > dp = new Array List < > ( experiment Count ) ; for ( int count = NUM ; count < experiment Count ; count ++ ) { dp . add ( new Object [ ] { count } ) ; } return dp . iterator ( ) ; }
@ DataProvider ( name = STRING ) public Iterator < Object [ ] > repeatDataProvider ( ) { Collection < Object [ ] > dp = new ArrayList < > ( experimentCount ) ; for ( int count = _NUM ; count < experimentCount ; count ++ ) { dp . add ( new Object [ ] { count } ) ; } return dp . iterator ( ) ; }
77
java-test-2023
java
What do the given protos not have ?
different hash codes
private void check Not Equal ( Message m1 , Message m2 ) { String equals Error = String . format ( STRING , m1 , m2 ) ; assert False ( equals Error , m1 . equals ( m2 ) ) ; assert False ( equals Error , m2 . equals ( m1 ) ) ; assert False ( String . format ( STRING , m1 , m2 ) , m1 . hash Code ( ) == m2 . hash Code ( )...
private void checkNotEqual ( Message m1 , Message m2 ) { String equalsError = String . format ( STRING , m1 , m2 ) ; assertFalse ( equalsError , m1 . equals ( m2 ) ) ; assertFalse ( equalsError , m2 . equals ( m1 ) ) ; assertFalse ( String . format ( STRING , m1 , m2 ) , m1 . hashCode ( ) == m2 . hashCode ( ) ) ; }
86
java-test-2024
java
What not haves different hash codes ?
the given protos
private void check Not Equal ( Message m1 , Message m2 ) { String equals Error = String . format ( STRING , m1 , m2 ) ; assert False ( equals Error , m1 . equals ( m2 ) ) ; assert False ( equals Error , m2 . equals ( m1 ) ) ; assert False ( String . format ( STRING , m1 , m2 ) , m1 . hash Code ( ) == m2 . hash Code ( )...
private void checkNotEqual ( Message m1 , Message m2 ) { String equalsError = String . format ( STRING , m1 , m2 ) ; assertFalse ( equalsError , m1 . equals ( m2 ) ) ; assertFalse ( equalsError , m2 . equals ( m1 ) ) ; assertFalse ( String . format ( STRING , m1 , m2 ) , m1 . hashCode ( ) == m2 . hashCode ( ) ) ; }
86
java-test-2025
java
Do the given protos have different hash codes ?
No
private void check Not Equal ( Message m1 , Message m2 ) { String equals Error = String . format ( STRING , m1 , m2 ) ; assert False ( equals Error , m1 . equals ( m2 ) ) ; assert False ( equals Error , m2 . equals ( m1 ) ) ; assert False ( String . format ( STRING , m1 , m2 ) , m1 . hash Code ( ) == m2 . hash Code ( )...
private void checkNotEqual ( Message m1 , Message m2 ) { String equalsError = String . format ( STRING , m1 , m2 ) ; assertFalse ( equalsError , m1 . equals ( m2 ) ) ; assertFalse ( equalsError , m2 . equals ( m1 ) ) ; assertFalse ( String . format ( STRING , m1 , m2 ) , m1 . hashCode ( ) == m2 . hashCode ( ) ) ; }
86
java-test-2027
java
When did the code execute ?
before delete operation
protected boolean before Delete ( ) { if ( is Store Attachments On File System ) { for ( int i = NUM ; i < m items . size ( ) ; i ++ ) { final M Attachment Entry entry = m items . get ( i ) ; final File file = entry . get File ( ) ; if ( file != null && file . exists ( ) ) { if ( ! file . delete ( ) ) { log . warning (...
protected boolean beforeDelete ( ) { if ( isStoreAttachmentsOnFileSystem ) { for ( int i = _NUM ; i < m_items . size ( ) ; i ++ ) { final MAttachmentEntry entry = m_items . get ( i ) ; final File file = entry . getFile ( ) ; if ( file != null && file . exists ( ) ) { if ( ! file . delete ( ) ) { log . warning ( STRING ...
164
java-test-2028
java
What fires a propertychangeevent for the scale values for scale and offset with the affinetransforms representing the previous and new ?
setter
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-2029
java
How does setter fire a propertychangeevent for the scale values for scale and offset ?
with the affinetransforms representing the previous and new
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-2030
java
What is representing the previous and new values for scale and offset ?
the affinetransforms
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-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