id
stringlengths
11
16
language
stringclasses
2 values
question
stringlengths
13
844
answer
stringlengths
1
900
code
stringlengths
162
27.4k
code_original
stringlengths
162
26k
code_word_count
int64
51
5.96k
java-test-9535
java
What does the code instantiate ?
a new z protocol
public Z Protocol ( ) { try { random = Secure Random . get Instance ( M . e ( STRING ) ) ; } catch ( final No Such Algorithm Exception e ) { if ( Cfg . EXCEPTION ) { Check . log ( e ) ; } if ( Cfg . DEBUG ) { Check . log ( TAG + STRING + e ) ; } if ( Cfg . DEBUG ) { Check . log ( e ) ; } } }
public ZProtocol ( ) { try { random = SecureRandom . getInstance ( M . e ( STRING ) ) ; } catch ( final NoSuchAlgorithmException e ) { if ( Cfg . EXCEPTION ) { Check . log ( e ) ; } if ( Cfg . DEBUG ) { Check . log ( TAG + STRING + e ) ; } if ( Cfg . DEBUG ) { Check . log ( e ) ; } } }
86
java-test-9541
java
Where does in a list read ?
of configuration files
public static List < Config > read Config Files ( String [ ] files , boolean low Precedence ) { if ( files == null ) { return Lists . new Array List ( ) ; } Yaml Reader < Config > reader = new Yaml Reader < > ( Config . get Yaml Constructor ( ) ) ; Array List < Config > result = Lists . new Array List ( ) ; for ( Strin...
public static List < Config > readConfigFiles ( String [ ] files , boolean lowPrecedence ) { if ( files == null ) { return Lists . newArrayList ( ) ; } YamlReader < Config > reader = new YamlReader < > ( Config . getYamlConstructor ( ) ) ; ArrayList < Config > result = Lists . newArrayList ( ) ; for ( String file : fil...
123
java-test-9542
java
How does a checkbox - setting create ?
with a listener
public static J Menu Item add Setting ( J Menu parent , final String name , Boolean Setting setting ) { J Menu Item item = new Skin Check Box Menu Item ( name , setting . get Value ( ) ) ; item . put Client Property ( SETTING , setting ) ; item . add Action Listener ( SETTING LISTENER ) ; parent . add ( item ) ; return...
public static JMenuItem addSetting ( JMenu parent , final String name , BooleanSetting setting ) { JMenuItem item = new SkinCheckBoxMenuItem ( name , setting . getValue ( ) ) ; item . putClientProperty ( SETTING , setting ) ; item . addActionListener ( SETTING_LISTENER ) ; parent . add ( item ) ; return item ; }
75
java-test-9544
java
What does the code calculate ?
the distance from the given point
public double calc Max Distance ( final double x , final double y ) { double distance X = Math . max ( Math . abs ( this . min X - x ) , Math . abs ( this . max X - x ) ) ; double distance Y = Math . max ( Math . abs ( this . min Y - y ) , Math . abs ( this . max Y - y ) ) ; return Math . sqrt ( distance X * distance X...
public double calcMaxDistance ( final double x , final double y ) { double distanceX = Math . max ( Math . abs ( this . minX - x ) , Math . abs ( this . maxX - x ) ) ; double distanceY = Math . max ( Math . abs ( this . minY - y ) , Math . abs ( this . maxY - y ) ) ; return Math . sqrt ( distanceX * distanceX + distanc...
100
java-test-9545
java
What does the cff flag determine ?
whether font information should be embedded in the compact font format using swf tag definefont4
private static boolean use Compact Font Format ( Map < String , Object > args , int compatibility Version ) { String value = ( String ) args . get ( EMBEDASCFF ) ; boolean use CFF = BOOL ; if ( compatibility Version < Mxml Configuration . VERSION 4 0 ) use CFF = BOOL ; if ( value != null ) { use CFF = Boolean . parse B...
private static boolean useCompactFontFormat ( Map < String , Object > args , int compatibilityVersion ) { String value = ( String ) args . get ( EMBEDASCFF ) ; boolean useCFF = _BOOL ; if ( compatibilityVersion < MxmlConfiguration . VERSION_4_0 ) useCFF = _BOOL ; if ( value != null ) { useCFF = Boolean . parseBoolean (...
85
java-test-9546
java
How should font information be embedded in the compact font format ?
using swf tag definefont4
private static boolean use Compact Font Format ( Map < String , Object > args , int compatibility Version ) { String value = ( String ) args . get ( EMBEDASCFF ) ; boolean use CFF = BOOL ; if ( compatibility Version < Mxml Configuration . VERSION 4 0 ) use CFF = BOOL ; if ( value != null ) { use CFF = Boolean . parse B...
private static boolean useCompactFontFormat ( Map < String , Object > args , int compatibilityVersion ) { String value = ( String ) args . get ( EMBEDASCFF ) ; boolean useCFF = _BOOL ; if ( compatibilityVersion < MxmlConfiguration . VERSION_4_0 ) useCFF = _BOOL ; if ( value != null ) { useCFF = Boolean . parseBoolean (...
85
java-test-9547
java
What determines whether font information should be embedded in the compact font format using swf tag definefont4 ?
the cff flag
private static boolean use Compact Font Format ( Map < String , Object > args , int compatibility Version ) { String value = ( String ) args . get ( EMBEDASCFF ) ; boolean use CFF = BOOL ; if ( compatibility Version < Mxml Configuration . VERSION 4 0 ) use CFF = BOOL ; if ( value != null ) { use CFF = Boolean . parse B...
private static boolean useCompactFontFormat ( Map < String , Object > args , int compatibilityVersion ) { String value = ( String ) args . get ( EMBEDASCFF ) ; boolean useCFF = _BOOL ; if ( compatibilityVersion < MxmlConfiguration . VERSION_4_0 ) useCFF = _BOOL ; if ( value != null ) { useCFF = Boolean . parseBoolean (...
85
java-test-9551
java
What do a valid number extract ?
from a phone number that is too long to be valid
public boolean truncate Too Long Number ( Phone Number number ) { if ( is Valid Number ( number ) ) { return BOOL ; } Phone Number number Copy = new Phone Number ( ) ; number Copy . merge From ( number ) ; long national Number = number . get National Number ( ) ; do { national Number /= NUM ; number Copy . set National...
public boolean truncateTooLongNumber ( PhoneNumber number ) { if ( isValidNumber ( number ) ) { return _BOOL ; } PhoneNumber numberCopy = new PhoneNumber ( ) ; numberCopy . mergeFrom ( number ) ; long nationalNumber = number . getNationalNumber ( ) ; do { nationalNumber /= _NUM ; numberCopy . setNationalNumber ( nation...
131
java-test-9552
java
What does helper method output ?
the public or protected inner members of a class
private void print Type Members ( List < ? extends Element > members , List < Type Element > inner Class ) { for ( Element element : members ) { if ( is Public Or Protected ( element ) ) { print Member ( element , inner Class ) ; } } }
private void printTypeMembers ( List < ? extends Element > members , List < TypeElement > innerClass ) { for ( Element element : members ) { if ( isPublicOrProtected ( element ) ) { printMember ( element , innerClass ) ; } } }
54
java-test-9560
java
What do it return ?
the revenue account
private int create Revenue Recognition ( int C Revenue Recognition ID , int C Invoice Line ID , int AD Client ID , int AD Org ID , int AD User ID , int Account ID , int C Sub Acct ID , int M Product ID , int C B Partner ID , int AD Org Trx ID , int C Loc From ID , int C Loc To ID , int C S Region ID , int C Project ID ...
private int createRevenueRecognition ( int C_RevenueRecognition_ID , int C_InvoiceLine_ID , int AD_Client_ID , int AD_Org_ID , int AD_User_ID , int Account_ID , int C_SubAcct_ID , int M_Product_ID , int C_BPartner_ID , int AD_OrgTrx_ID , int C_LocFrom_ID , int C_LocTo_ID , int C_SRegion_ID , int C_Project_ID , int C_Ca...
661
java-test-9561
java
By how much be unearned revenue account used ?
instead of revenue account
private int create Revenue Recognition ( int C Revenue Recognition ID , int C Invoice Line ID , int AD Client ID , int AD Org ID , int AD User ID , int Account ID , int C Sub Acct ID , int M Product ID , int C B Partner ID , int AD Org Trx ID , int C Loc From ID , int C Loc To ID , int C S Region ID , int C Project ID ...
private int createRevenueRecognition ( int C_RevenueRecognition_ID , int C_InvoiceLine_ID , int AD_Client_ID , int AD_Org_ID , int AD_User_ID , int Account_ID , int C_SubAcct_ID , int M_Product_ID , int C_BPartner_ID , int AD_OrgTrx_ID , int C_LocFrom_ID , int C_LocTo_ID , int C_SRegion_ID , int C_Project_ID , int C_Ca...
661
java-test-9562
java
What does the code revalidate ?
the range maximum
public boolean validate Maximum ( final String candidate ) { boolean valid = BOOL ; try { if ( Double . parse Double ( candidate ) <= this . minimum Value ) { valid = BOOL ; } } catch ( final Number Format Exception e ) { valid = BOOL ; } return valid ; }
public boolean validateMaximum ( final String candidate ) { boolean valid = _BOOL ; try { if ( Double . parseDouble ( candidate ) <= this . minimumValue ) { valid = _BOOL ; } } catch ( final NumberFormatException e ) { valid = _BOOL ; } return valid ; }
57
java-test-9563
java
What does this method add ?
a record in process table
@ Request Mapping ( value = { STRING , STRING } , method = Request Method . PUT ) @ Response Body public Rest Wrapper insert ( @ Model Attribute ( STRING ) @ Valid Process process , Binding Result binding Result , Principal principal ) { Rest Wrapper rest Wrapper = null ; if ( binding Result . has Errors ( ) ) { Bindin...
@ RequestMapping ( value = { STRING , STRING } , method = RequestMethod . PUT ) @ ResponseBody public RestWrapper insert ( @ ModelAttribute ( STRING ) @ Valid Process process , BindingResult bindingResult , Principal principal ) { RestWrapper restWrapper = null ; if ( bindingResult . hasErrors ( ) ) { BindingResultErro...
1,129
java-test-9564
java
What does the code compare to another byte buffer ' s remaining bytes ?
the remaining bytes of this buffer
@ Override public int compare To ( Byte Buffer other Buffer ) { int compare Remaining = ( remaining ( ) < other Buffer . remaining ( ) ) ? remaining ( ) : other Buffer . remaining ( ) ; int this Pos = position ; int other Pos = other Buffer . position ; byte this Byte , other Byte ; while ( compare Remaining > NUM ) { ...
@ Override public int compareTo ( ByteBuffer otherBuffer ) { int compareRemaining = ( remaining ( ) < otherBuffer . remaining ( ) ) ? remaining ( ) : otherBuffer . remaining ( ) ; int thisPos = position ; int otherPos = otherBuffer . position ; byte thisByte , otherByte ; while ( compareRemaining > _NUM ) { thisByte = ...
140
java-test-9567
java
Where is the point visible ?
on the provided projection
public static boolean is Visible ( Projection source Map Projection , Point 2 D llp ) { boolean ret = BOOL ; if ( source Map Projection != null ) { if ( source Map Projection . is Plotable ( llp ) ) { Point 2 D p = source Map Projection . forward ( llp ) ; double x = p . get X ( ) ; double y = p . get Y ( ) ; if ( x >=...
public static boolean isVisible ( Projection sourceMapProjection , Point2D llp ) { boolean ret = _BOOL ; if ( sourceMapProjection != null ) { if ( sourceMapProjection . isPlotable ( llp ) ) { Point2D p = sourceMapProjection . forward ( llp ) ; double x = p . getX ( ) ; double y = p . getY ( ) ; if ( x >= _NUM && x <= s...
122
java-test-9571
java
What does the code add ?
an association node and endpoint
public void add Association ( int node , int endpoint ) { if ( is Associated ( node , endpoint ) ) { return ; } Z Wave Association new Association = new Z Wave Association ( node , endpoint ) ; associations . add ( new Association ) ; }
public void addAssociation ( int node , int endpoint ) { if ( isAssociated ( node , endpoint ) ) { return ; } ZWaveAssociation newAssociation = new ZWaveAssociation ( node , endpoint ) ; associations . add ( newAssociation ) ; }
51
java-test-9573
java
What does the code add to this track ?
train or route i d
public void add Pickup Id ( String id ) { if ( pickup List . contains ( id ) ) { return ; } pickup List . add ( id ) ; log . debug ( STRING , get Name ( ) , id ) ; set Dirty And Fire Property Change ( PICKUP CHANGED PROPERTY , null , id ) ; }
public void addPickupId ( String id ) { if ( _pickupList . contains ( id ) ) { return ; } _pickupList . add ( id ) ; log . debug ( STRING , getName ( ) , id ) ; setDirtyAndFirePropertyChange ( PICKUP_CHANGED_PROPERTY , null , id ) ; }
63
java-test-9575
java
When should this be called only ?
before an export is done , not for storage
public static void correct Location ( JSON Object map ) { String location = map . has ( STRING ) ? ( String ) map . get ( STRING ) : null ; if ( location != null && location . length ( ) > NUM ) { String location country = map . has ( STRING ) ? ( String ) map . get ( STRING ) : null ; if ( location country != null && ...
public static void correctLocation ( JSONObject map ) { String location = map . has ( STRING ) ? ( String ) map . get ( STRING ) : null ; if ( location != null && location . length ( ) > _NUM ) { String location_country = map . has ( STRING ) ? ( String ) map . get ( STRING ) : null ; if ( location_country != null && l...
139
java-test-9580
java
What updates in the text area ?
wkt string
private void update WKT String ( ) { String wkt String = WKT Conversion . generate WKT String ( wkt Geometry , BOOL ) ; boolean valid = BOOL ; boolean empty = BOOL ; if ( wkt Geometry != null ) { valid = wkt Geometry . is Valid ( ) ; empty = wkt Geometry . is Empty ( ) ; } if ( valid ) { wkt Text Area . set Text ( wkt ...
private void updateWKTString ( ) { String wktString = WKTConversion . generateWKTString ( wktGeometry , _BOOL ) ; boolean valid = _BOOL ; boolean empty = _BOOL ; if ( wktGeometry != null ) { valid = wktGeometry . isValid ( ) ; empty = wktGeometry . isEmpty ( ) ; } if ( valid ) { wktTextArea . setText ( wktString ) ; } ...
126
java-test-9581
java
Where do wkt string update ?
in the text area
private void update WKT String ( ) { String wkt String = WKT Conversion . generate WKT String ( wkt Geometry , BOOL ) ; boolean valid = BOOL ; boolean empty = BOOL ; if ( wkt Geometry != null ) { valid = wkt Geometry . is Valid ( ) ; empty = wkt Geometry . is Empty ( ) ; } if ( valid ) { wkt Text Area . set Text ( wkt ...
private void updateWKTString ( ) { String wktString = WKTConversion . generateWKTString ( wktGeometry , _BOOL ) ; boolean valid = _BOOL ; boolean empty = _BOOL ; if ( wktGeometry != null ) { valid = wktGeometry . isValid ( ) ; empty = wktGeometry . isEmpty ( ) ; } if ( valid ) { wktTextArea . setText ( wktString ) ; } ...
126
java-test-9584
java
What writeouts in a writer ?
content of the char buffer
public void write Out ( Writer writer ) throws IO Exception { Entity e = root ; while ( e . next != null ) { e = e . next ; writer . write ( e . data ) ; } writer . write ( buffer , NUM , pos ) ; }
public void writeOut ( Writer writer ) throws IOException { Entity e = root ; while ( e . next != null ) { e = e . next ; writer . write ( e . data ) ; } writer . write ( buffer , _NUM , pos ) ; }
54
java-test-9585
java
Where do this write ?
in writer
public void write Out ( Writer writer ) throws IO Exception { Entity e = root ; while ( e . next != null ) { e = e . next ; writer . write ( e . data ) ; } writer . write ( buffer , NUM , pos ) ; }
public void writeOut ( Writer writer ) throws IOException { Entity e = root ; while ( e . next != null ) { e = e . next ; writer . write ( e . data ) ; } writer . write ( buffer , _NUM , pos ) ; }
54
java-test-9586
java
What do char array get ?
with ( tochararray ( ) )
public void write Out ( Writer writer ) throws IO Exception { Entity e = root ; while ( e . next != null ) { e = e . next ; writer . write ( e . data ) ; } writer . write ( buffer , NUM , pos ) ; }
public void writeOut ( Writer writer ) throws IOException { Entity e = root ; while ( e . next != null ) { e = e . next ; writer . write ( e . data ) ; } writer . write ( buffer , _NUM , pos ) ; }
54
java-test-9587
java
What gets with ( tochararray ( ) ) ?
char array
public void write Out ( Writer writer ) throws IO Exception { Entity e = root ; while ( e . next != null ) { e = e . next ; writer . write ( e . data ) ; } writer . write ( buffer , NUM , pos ) ; }
public void writeOut ( Writer writer ) throws IOException { Entity e = root ; while ( e . next != null ) { e = e . next ; writer . write ( e . data ) ; } writer . write ( buffer , _NUM , pos ) ; }
54
java-test-9588
java
Where do content of the char buffer writeout ?
in a writer
public void write Out ( Writer writer ) throws IO Exception { Entity e = root ; while ( e . next != null ) { e = e . next ; writer . write ( e . data ) ; } writer . write ( buffer , NUM , pos ) ; }
public void writeOut ( Writer writer ) throws IOException { Entity e = root ; while ( e . next != null ) { e = e . next ; writer . write ( e . data ) ; } writer . write ( buffer , _NUM , pos ) ; }
54
java-test-9589
java
What did it delete if this node has non if this node has non ?
any other nodes in the trie that are no longer needed after the deletion of the node
private void delete Node ( TST Node node To Delete ) { if ( node To Delete == null ) { return ; } node To Delete . data = null ; while ( node To Delete != null ) { node To Delete = delete Node Recursion ( node To Delete ) ; } }
private void deleteNode ( TSTNode nodeToDelete ) { if ( nodeToDelete == null ) { return ; } nodeToDelete . data = null ; while ( nodeToDelete != null ) { nodeToDelete = deleteNodeRecursion ( nodeToDelete ) ; } }
56
java-test-9590
java
What does the code delete if this node has non - null data ?
the node passed in as an argument
private void delete Node ( TST Node node To Delete ) { if ( node To Delete == null ) { return ; } node To Delete . data = null ; while ( node To Delete != null ) { node To Delete = delete Node Recursion ( node To Delete ) ; } }
private void deleteNode ( TSTNode nodeToDelete ) { if ( nodeToDelete == null ) { return ; } nodeToDelete . data = null ; while ( nodeToDelete != null ) { nodeToDelete = deleteNodeRecursion ( nodeToDelete ) ; } }
56
java-test-9591
java
When are any other nodes in the trie no longer needed ?
after the deletion of the node
private void delete Node ( TST Node node To Delete ) { if ( node To Delete == null ) { return ; } node To Delete . data = null ; while ( node To Delete != null ) { node To Delete = delete Node Recursion ( node To Delete ) ; } }
private void deleteNode ( TSTNode nodeToDelete ) { if ( nodeToDelete == null ) { return ; } nodeToDelete . data = null ; while ( nodeToDelete != null ) { nodeToDelete = deleteNodeRecursion ( nodeToDelete ) ; } }
56
java-test-9592
java
What does the code remove ?
the join button of an invite
void expire Invite ( final String name ) { J Component button = invites . get ( name ) ; if ( button != null ) { invite Container . remove ( button ) ; invite Container . revalidate ( ) ; } invites . remove ( name ) ; }
void expireInvite ( final String name ) { JComponent button = invites . get ( name ) ; if ( button != null ) { inviteContainer . remove ( button ) ; inviteContainer . revalidate ( ) ; } invites . remove ( name ) ; }
51
java-test-9594
java
How does the code add the given symbols array to the user defined char entities table ?
with the startcode provided as the code of the first string , startcode + 1 for the second etc
public void add Char Entities Range ( String [ ] symbols , int startcode ) { if ( user Defined Char Entities == null ) { user Defined Char Entities = new Hashtable ( ) ; } int slen = symbols . length ; for ( int i = NUM ; i < slen ; i ++ ) { if ( symbols [ i ] != null ) { user Defined Char Entities . put ( trim Char En...
public void addCharEntitiesRange ( String [ ] symbols , int startcode ) { if ( userDefinedCharEntities == null ) { userDefinedCharEntities = new Hashtable ( ) ; } int slen = symbols . length ; for ( int i = _NUM ; i < slen ; i ++ ) { if ( symbols [ i ] != null ) { userDefinedCharEntities . put ( trimCharEntity ( symbol...
98
java-test-9595
java
What does the code add to the user defined char entities table with the startcode provided as the code of the first string , startcode + 1 for the second etc ?
the given symbols array
public void add Char Entities Range ( String [ ] symbols , int startcode ) { if ( user Defined Char Entities == null ) { user Defined Char Entities = new Hashtable ( ) ; } int slen = symbols . length ; for ( int i = NUM ; i < slen ; i ++ ) { if ( symbols [ i ] != null ) { user Defined Char Entities . put ( trim Char En...
public void addCharEntitiesRange ( String [ ] symbols , int startcode ) { if ( userDefinedCharEntities == null ) { userDefinedCharEntities = new Hashtable ( ) ; } int slen = symbols . length ; for ( int i = _NUM ; i < slen ; i ++ ) { if ( symbols [ i ] != null ) { userDefinedCharEntities . put ( trimCharEntity ( symbol...
98
java-test-9596
java
What does the value supplied match ?
one of the expected values ' names
public static void check Field Value From Enum ( final String value , final String field Name , Class < ? extends Enum > enum Type ) { if ( value != null ) { check Field Value From Enum ( value , field Name , Enum Set . all Of ( enum Type ) ) ; } }
public static void checkFieldValueFromEnum ( final String value , final String fieldName , Class < ? extends Enum > enumType ) { if ( value != null ) { checkFieldValueFromEnum ( value , fieldName , EnumSet . allOf ( enumType ) ) ; } }
59
java-test-9597
java
What matches one of the expected values ' names ?
the value supplied
public static void check Field Value From Enum ( final String value , final String field Name , Class < ? extends Enum > enum Type ) { if ( value != null ) { check Field Value From Enum ( value , field Name , Enum Set . all Of ( enum Type ) ) ; } }
public static void checkFieldValueFromEnum ( final String value , final String fieldName , Class < ? extends Enum > enumType ) { if ( value != null ) { checkFieldValueFromEnum ( value , fieldName , EnumSet . allOf ( enumType ) ) ; } }
59
java-test-9598
java
What does the code get by name ?
a registered featureflag
public Feature Flag for Name ( String name ) throws Bad Api Request Exception { Feature Flag flag = NAMES TO VALUES . get ( name . to Upper Case ( Locale . ENGLISH ) ) ; return flag != null ? flag : Utils . < Feature Flag > instead Throw Runtime ( new Bad Api Request Exception ( STRING + name ) ) ; }
public FeatureFlag forName ( String name ) throws BadApiRequestException { FeatureFlag flag = NAMES_TO_VALUES . get ( name . toUpperCase ( Locale . ENGLISH ) ) ; return flag != null ? flag : Utils . < FeatureFlag > insteadThrowRuntime ( new BadApiRequestException ( STRING + name ) ) ; }
67
java-test-9599
java
What did we use just just currently ?
the startup locale and encoding
private void init Font Config ( ) { init Locale = startup Locale ; init Encoding = encoding ; if ( prefer Locale Fonts && ! will Reorder For Startup Locale ( ) ) { prefer Locale Fonts = BOOL ; } init ELC = get Init ELC ( ) ; init All Component Fonts ( ) ; }
private void initFontConfig ( ) { initLocale = startupLocale ; initEncoding = encoding ; if ( preferLocaleFonts && ! willReorderForStartupLocale ( ) ) { preferLocaleFonts = _BOOL ; } initELC = getInitELC ( ) ; initAllComponentFonts ( ) ; }
59
java-test-9600
java
What does the code calculate ?
the fourier transform of a set of n real - valued data points
public static void real Transform ( double data [ ] , boolean inverse ) { double c1 = NUM ; int n = data . length ; double two Pi = - Math Utils . TWOPI ; if ( inverse ) two Pi = Math Utils . TWOPI ; double delta = two Pi / n ; double w Step Real = Math . cos ( delta ) ; double w Step Imag = Math . sin ( delta ) ; doub...
public static void realTransform ( double data [ ] , boolean inverse ) { double c1 = _NUM ; int n = data . length ; double twoPi = - MathUtils . TWOPI ; if ( inverse ) twoPi = MathUtils . TWOPI ; double delta = twoPi / n ; double wStepReal = Math . cos ( delta ) ; double wStepImag = Math . sin ( delta ) ; double wReal ...
555
java-test-9601
java
What does this routine calculate also also ?
the inverse transform of a complex data array
public static void real Transform ( double data [ ] , boolean inverse ) { double c1 = NUM ; int n = data . length ; double two Pi = - Math Utils . TWOPI ; if ( inverse ) two Pi = Math Utils . TWOPI ; double delta = two Pi / n ; double w Step Real = Math . cos ( delta ) ; double w Step Imag = Math . sin ( delta ) ; doub...
public static void realTransform ( double data [ ] , boolean inverse ) { double c1 = _NUM ; int n = data . length ; double twoPi = - MathUtils . TWOPI ; if ( inverse ) twoPi = MathUtils . TWOPI ; double delta = twoPi / n ; double wStepReal = Math . cos ( delta ) ; double wStepImag = Math . sin ( delta ) ; double wReal ...
555
java-test-9603
java
What does the code read ?
a delta entry from the checkpoint
void read Checkpoint Delta ( Table Kelp table , Page Service Impl page Actor , Read Stream is , int length ) throws IO Exception { Row row = table . row ( ) ; int remove Length = row . remove Length ( ) ; int row Length = row . length ( ) ; Block Leaf block = blocks [ NUM ] ; long end Position = is . position ( ) + len...
void readCheckpointDelta ( TableKelp table , PageServiceImpl pageActor , ReadStream is , int length ) throws IOException { Row row = table . row ( ) ; int removeLength = row . removeLength ( ) ; int rowLength = row . length ( ) ; BlockLeaf block = _blocks [ _NUM ] ; long endPosition = is . position ( ) + length ; int r...
334
java-test-9604
java
For what purpose is resolveclass extended ?
to acquire ( if present ) the location from which to load the specified class . it will find , load , and return the class
protected Class < ? > resolve Class ( Object Stream Class class Desc ) throws IO Exception , Class Not Found Exception { Object annotation = read Location ( ) ; String class Name = class Desc . get Name ( ) ; Class Loader default Loader = skip Default Resolve Class ? null : latest User Defined Loader ( ) ; String codeb...
protected Class < ? > resolveClass ( ObjectStreamClass classDesc ) throws IOException , ClassNotFoundException { Object annotation = readLocation ( ) ; String className = classDesc . getName ( ) ; ClassLoader defaultLoader = skipDefaultResolveClass ? null : latestUserDefinedLoader ( ) ; String codebase = null ; if ( ! ...
196
java-test-9606
java
What does the code create ?
a new dviewkeypair dialog where the parent is a frame
public D View Key Pair ( J Frame parent , String title , Dialog . Modality Type modality , Private Key private Key , X509 Certificate [ ] certificate Chain , Provider provider ) { super ( parent , title , modality ) ; this . private Key = private Key ; this . certificate Chain = certificate Chain ; this . provider = pr...
public DViewKeyPair ( JFrame parent , String title , Dialog . ModalityType modality , PrivateKey privateKey , X509Certificate [ ] certificateChain , Provider provider ) { super ( parent , title , modality ) ; this . privateKey = privateKey ; this . certificateChain = certificateChain ; this . provider = provider ; init...
72
java-test-9607
java
Where is the parent a frame ?
a new dviewkeypair dialog
public D View Key Pair ( J Frame parent , String title , Dialog . Modality Type modality , Private Key private Key , X509 Certificate [ ] certificate Chain , Provider provider ) { super ( parent , title , modality ) ; this . private Key = private Key ; this . certificate Chain = certificate Chain ; this . provider = pr...
public DViewKeyPair ( JFrame parent , String title , Dialog . ModalityType modality , PrivateKey privateKey , X509Certificate [ ] certificateChain , Provider provider ) { super ( parent , title , modality ) ; this . privateKey = privateKey ; this . certificateChain = certificateChain ; this . provider = provider ; init...
72
java-test-9610
java
When will the settings listener be called ?
as soon as the option value changes , e . g . when modifying the configuration through the gui , or when loading a game having a patch file defined
public void register Settings Listener ( String name , String option , I Settings Listener listener ) { remove Settings Listener ( name , option ) ; Settings Listener Info info = new Settings Listener Info ( name , option , listener ) ; all Listeners . add ( info ) ; List < I Settings Listener > listeners For Key = lis...
public void registerSettingsListener ( String name , String option , ISettingsListener listener ) { removeSettingsListener ( name , option ) ; SettingsListenerInfo info = new SettingsListenerInfo ( name , option , listener ) ; allListeners . add ( info ) ; List < ISettingsListener > listenersForKey = listenersByKey . g...
147
java-test-9611
java
For what purpose do a settings listener register ?
for a specific option
public void register Settings Listener ( String name , String option , I Settings Listener listener ) { remove Settings Listener ( name , option ) ; Settings Listener Info info = new Settings Listener Info ( name , option , listener ) ; all Listeners . add ( info ) ; List < I Settings Listener > listeners For Key = lis...
public void registerSettingsListener ( String name , String option , ISettingsListener listener ) { removeSettingsListener ( name , option ) ; SettingsListenerInfo info = new SettingsListenerInfo ( name , option , listener ) ; allListeners . add ( info ) ; List < ISettingsListener > listenersForKey = listenersByKey . g...
147
java-test-9612
java
What do a game have ?
a patch file defined
public void register Settings Listener ( String name , String option , I Settings Listener listener ) { remove Settings Listener ( name , option ) ; Settings Listener Info info = new Settings Listener Info ( name , option , listener ) ; all Listeners . add ( info ) ; List < I Settings Listener > listeners For Key = lis...
public void registerSettingsListener ( String name , String option , ISettingsListener listener ) { removeSettingsListener ( name , option ) ; SettingsListenerInfo info = new SettingsListenerInfo ( name , option , listener ) ; allListeners . add ( info ) ; List < ISettingsListener > listenersForKey = listenersByKey . g...
147
java-test-9613
java
What does this allow ?
to call this method for the same listener multiple times and have it registered only once
public void register Settings Listener ( String name , String option , I Settings Listener listener ) { remove Settings Listener ( name , option ) ; Settings Listener Info info = new Settings Listener Info ( name , option , listener ) ; all Listeners . add ( info ) ; List < I Settings Listener > listeners For Key = lis...
public void registerSettingsListener ( String name , String option , ISettingsListener listener ) { removeSettingsListener ( name , option ) ; SettingsListenerInfo info = new SettingsListenerInfo ( name , option , listener ) ; allListeners . add ( info ) ; List < ISettingsListener > listenersForKey = listenersByKey . g...
147
java-test-9614
java
How did the configuration modify when ?
through the gui
public void register Settings Listener ( String name , String option , I Settings Listener listener ) { remove Settings Listener ( name , option ) ; Settings Listener Info info = new Settings Listener Info ( name , option , listener ) ; all Listeners . add ( info ) ; List < I Settings Listener > listeners For Key = lis...
public void registerSettingsListener ( String name , String option , ISettingsListener listener ) { removeSettingsListener ( name , option ) ; SettingsListenerInfo info = new SettingsListenerInfo ( name , option , listener ) ; allListeners . add ( info ) ; List < ISettingsListener > listenersForKey = listenersByKey . g...
147
java-test-9616
java
What does the code perform ?
a drag operation
public void drag ( double dx , double dy ) { if ( hike Mode ) { work Vec . set ( - dx , - dy , NUM ) ; work Rot . from Angle Normal Axis ( azimuth , Vector 3 . UNIT Z ) ; work Rot . apply Post ( work Vec , work Vec ) ; work Vec . multiply Local ( z Offset ) ; } else { work Vec . set ( - dx , - dy , NUM ) ; work Rot . f...
public void drag ( double dx , double dy ) { if ( hikeMode ) { workVec . set ( - dx , - dy , _NUM ) ; workRot . fromAngleNormalAxis ( azimuth , Vector3 . UNIT_Z ) ; workRot . applyPost ( workVec , workVec ) ; workVec . multiplyLocal ( zOffset ) ; } else { workVec . set ( - dx , - dy , _NUM ) ; workRot . fromAngleNormal...
152
java-test-9617
java
What does the aggregatechecker need ?
to set the active options to the union of all subcheckers
protected void add Options ( Map < String , String > moreopts ) { Map < String , String > active Opts = new Hash Map < String , String > ( get Options ( ) ) ; active Opts . put All ( moreopts ) ; active Options = Collections . unmodifiable Map ( active Opts ) ; }
protected void addOptions ( Map < String , String > moreopts ) { Map < String , String > activeOpts = new HashMap < String , String > ( getOptions ( ) ) ; activeOpts . putAll ( moreopts ) ; activeOptions = Collections . unmodifiableMap ( activeOpts ) ; }
60
java-test-9618
java
What does who set to the union of all subcheckers ?
the active options
protected void add Options ( Map < String , String > moreopts ) { Map < String , String > active Opts = new Hash Map < String , String > ( get Options ( ) ) ; active Opts . put All ( moreopts ) ; active Options = Collections . unmodifiable Map ( active Opts ) ; }
protected void addOptions ( Map < String , String > moreopts ) { Map < String , String > activeOpts = new HashMap < String , String > ( getOptions ( ) ) ; activeOpts . putAll ( moreopts ) ; activeOptions = Collections . unmodifiableMap ( activeOpts ) ; }
60
java-test-9619
java
What needs to set the active options to the union of all subcheckers ?
the aggregatechecker
protected void add Options ( Map < String , String > moreopts ) { Map < String , String > active Opts = new Hash Map < String , String > ( get Options ( ) ) ; active Opts . put All ( moreopts ) ; active Options = Collections . unmodifiable Map ( active Opts ) ; }
protected void addOptions ( Map < String , String > moreopts ) { Map < String , String > activeOpts = new HashMap < String , String > ( getOptions ( ) ) ; activeOpts . putAll ( moreopts ) ; activeOptions = Collections . unmodifiableMap ( activeOpts ) ; }
60
java-test-9620
java
What does the code add ?
additional active options
protected void add Options ( Map < String , String > moreopts ) { Map < String , String > active Opts = new Hash Map < String , String > ( get Options ( ) ) ; active Opts . put All ( moreopts ) ; active Options = Collections . unmodifiable Map ( active Opts ) ; }
protected void addOptions ( Map < String , String > moreopts ) { Map < String , String > activeOpts = new HashMap < String , String > ( getOptions ( ) ) ; activeOpts . putAll ( moreopts ) ; activeOptions = Collections . unmodifiableMap ( activeOpts ) ; }
60
java-test-9621
java
How does a logistic model tree prune ?
using the cart pruning scheme , given a cost - complexity parameter alpha
public void prune ( double alpha ) throws Exception { Vector < LMT Node > node List ; Compare Node comparator = new Compare Node ( ) ; tree Errors ( ) ; calculate Alphas ( ) ; node List = get Nodes ( ) ; boolean prune = ( node List . size ( ) > NUM ) ; while ( prune ) { LMT Node node To Prune = Collections . min ( node...
public void prune ( double alpha ) throws Exception { Vector < LMTNode > nodeList ; CompareNode comparator = new CompareNode ( ) ; treeErrors ( ) ; calculateAlphas ( ) ; nodeList = getNodes ( ) ; boolean prune = ( nodeList . size ( ) > _NUM ) ; while ( prune ) { LMTNode nodeToPrune = Collections . min ( nodeList , comp...
186
java-test-9623
java
For what purpose are the format of the files are sequential 0 ' s of type long ?
to validate the contents of a " long " file on our obbs
protected void do Validate Zero Long File ( String path , String filename , long size , boolean check Contents ) { File in File = new File ( path , filename ) ; Data Input Stream in Stream = null ; Log . i ( LOG TAG , STRING + filename + STRING + path ) ; try { in Stream = new Data Input Stream ( new File Input Stream ...
protected void doValidateZeroLongFile ( String path , String filename , long size , boolean checkContents ) { File inFile = new File ( path , filename ) ; DataInputStream inStream = null ; Log . i ( LOG_TAG , STRING + filename + STRING + path ) ; try { inStream = new DataInputStream ( new FileInputStream ( inFile ) ) ;...
183
java-test-9624
java
When did code execute ?
when the mouse pointer is moving
private void handle Mouse Move ( final Event e ) { final int x = e . x , y = e . y ; final Image img = orientation == SWT . HORIZONTAL ? slider : v Slider ; upper Hover = x >= coord Upper . x && x <= coord Upper . x + img . get Bounds ( ) . width && y >= coord Upper . y && y <= coord Upper . y + img . get Bounds ( ) . ...
private void handleMouseMove ( final Event e ) { final int x = e . x , y = e . y ; final Image img = orientation == SWT . HORIZONTAL ? slider : vSlider ; upperHover = x >= coordUpper . x && x <= coordUpper . x + img . getBounds ( ) . width && y >= coordUpper . y && y <= coordUpper . y + img . getBounds ( ) . height ; l...
360
java-test-9625
java
What will below method be used ?
to fill the level cache
private void load Level File ( String table Name , String column Name , String cube Name , String schema Name ) { String base Location = Carbon Util . get Carbon Store Path ( schema Name , cube Name ) ; base Location = base Location + File . separator + schema Name + File . separator + cube Name ; if ( load Folder List...
private void loadLevelFile ( String tableName , String columnName , String cubeName , String schemaName ) { String baseLocation = CarbonUtil . getCarbonStorePath ( schemaName , cubeName ) ; baseLocation = baseLocation + File . separator + schemaName + File . separator + cubeName ; if ( loadFolderList . size ( ) == _NUM...
194
java-test-9626
java
What does the code compare with the actual file , where rows may be permuted ?
contents of an expected file
public static void compare DML Matrix With Java Matrix Rows Out Of Order ( String expected File , String actual Dir , double epsilon ) { try { File System fs = File System . get ( conf ) ; Path out Directory = new Path ( actual Dir ) ; Path compare File = new Path ( expected File ) ; FS Data Input Stream fsin = fs . op...
public static void compareDMLMatrixWithJavaMatrixRowsOutOfOrder ( String expectedFile , String actualDir , double epsilon ) { try { FileSystem fs = FileSystem . get ( conf ) ; Path outDirectory = new Path ( actualDir ) ; Path compareFile = new Path ( expectedFile ) ; FSDataInputStream fsin = fs . open ( compareFile ) ;...
642
java-test-9627
java
Where may rows be permuted ?
the actual file
public static void compare DML Matrix With Java Matrix Rows Out Of Order ( String expected File , String actual Dir , double epsilon ) { try { File System fs = File System . get ( conf ) ; Path out Directory = new Path ( actual Dir ) ; Path compare File = new Path ( expected File ) ; FS Data Input Stream fsin = fs . op...
public static void compareDMLMatrixWithJavaMatrixRowsOutOfOrder ( String expectedFile , String actualDir , double epsilon ) { try { FileSystem fs = FileSystem . get ( conf ) ; Path outDirectory = new Path ( actualDir ) ; Path compareFile = new Path ( expectedFile ) ; FSDataInputStream fsin = fs . open ( compareFile ) ;...
642
java-test-9628
java
How does the code start a monitor ?
by providing a summary label and optionally a detail string
private void start ( Http Servlet Request request , Http Servlet Response response ) throws IO Exception { String label = request . get Parameter ( STRING ) ; String detail = request . get Parameter ( STRING ) ; Mon Key key = get Mon Key ( label , detail , DEFAULT UNITS ) ; start Mon ( key ) ; Print Writer out = respon...
private void start ( HttpServletRequest request , HttpServletResponse response ) throws IOException { String label = request . getParameter ( STRING ) ; String detail = request . getParameter ( STRING ) ; MonKey key = getMonKey ( label , detail , DEFAULT_UNITS ) ; startMon ( key ) ; PrintWriter out = response . getWrit...
85
java-test-9629
java
What based idm ?
schema object mapping
private static Map < String , Schema Object Mapping DTO > populate Object Schema ( Collection < Identity Store Object Mapping > object Mappings ) throws DTO Mapper Exception { Map < String , Schema Object Mapping DTO > object Schema Mappings = new Hash Map < String , Schema Object Mapping DTO > ( ) ; try { for ( Identi...
private static Map < String , SchemaObjectMappingDTO > populateObjectSchema ( Collection < IdentityStoreObjectMapping > objectMappings ) throws DTOMapperException { Map < String , SchemaObjectMappingDTO > objectSchemaMappings = new HashMap < String , SchemaObjectMappingDTO > ( ) ; try { for ( IdentityStoreObjectMapping...
209
java-test-9630
java
What did idm based schema object mapping transform ?
to rest based schema mapping object
private static Map < String , Schema Object Mapping DTO > populate Object Schema ( Collection < Identity Store Object Mapping > object Mappings ) throws DTO Mapper Exception { Map < String , Schema Object Mapping DTO > object Schema Mappings = new Hash Map < String , Schema Object Mapping DTO > ( ) ; try { for ( Identi...
private static Map < String , SchemaObjectMappingDTO > populateObjectSchema ( Collection < IdentityStoreObjectMapping > objectMappings ) throws DTOMapperException { Map < String , SchemaObjectMappingDTO > objectSchemaMappings = new HashMap < String , SchemaObjectMappingDTO > ( ) ; try { for ( IdentityStoreObjectMapping...
209
java-test-9631
java
What is this helper method used ?
to transform idm based schema object mapping to rest based schema mapping object
private static Map < String , Schema Object Mapping DTO > populate Object Schema ( Collection < Identity Store Object Mapping > object Mappings ) throws DTO Mapper Exception { Map < String , Schema Object Mapping DTO > object Schema Mappings = new Hash Map < String , Schema Object Mapping DTO > ( ) ; try { for ( Identi...
private static Map < String , SchemaObjectMappingDTO > populateObjectSchema ( Collection < IdentityStoreObjectMapping > objectMappings ) throws DTOMapperException { Map < String , SchemaObjectMappingDTO > objectSchemaMappings = new HashMap < String , SchemaObjectMappingDTO > ( ) ; try { for ( IdentityStoreObjectMapping...
209
java-test-9632
java
What transforms to rest based schema mapping object ?
idm based schema object mapping
private static Map < String , Schema Object Mapping DTO > populate Object Schema ( Collection < Identity Store Object Mapping > object Mappings ) throws DTO Mapper Exception { Map < String , Schema Object Mapping DTO > object Schema Mappings = new Hash Map < String , Schema Object Mapping DTO > ( ) ; try { for ( Identi...
private static Map < String , SchemaObjectMappingDTO > populateObjectSchema ( Collection < IdentityStoreObjectMapping > objectMappings ) throws DTOMapperException { Map < String , SchemaObjectMappingDTO > objectSchemaMappings = new HashMap < String , SchemaObjectMappingDTO > ( ) ; try { for ( IdentityStoreObjectMapping...
209
java-test-9633
java
Where did schema object mapping base ?
idm
private static Map < String , Schema Object Mapping DTO > populate Object Schema ( Collection < Identity Store Object Mapping > object Mappings ) throws DTO Mapper Exception { Map < String , Schema Object Mapping DTO > object Schema Mappings = new Hash Map < String , Schema Object Mapping DTO > ( ) ; try { for ( Identi...
private static Map < String , SchemaObjectMappingDTO > populateObjectSchema ( Collection < IdentityStoreObjectMapping > objectMappings ) throws DTOMapperException { Map < String , SchemaObjectMappingDTO > objectSchemaMappings = new HashMap < String , SchemaObjectMappingDTO > ( ) ; try { for ( IdentityStoreObjectMapping...
209
java-test-9634
java
What does the code create ?
a job to rename a table
public Replication Job create Job For Rename Table ( long audit Log Id , long audit Log Entry Create Time , Table rename From Table , Table rename To Table ) throws State Update Exception { Replication Operation replication Operation = Replication Operation . RENAME TABLE ; Map < String , String > extras = new Hash Map...
public ReplicationJob createJobForRenameTable ( long auditLogId , long auditLogEntryCreateTime , Table renameFromTable , Table renameToTable ) throws StateUpdateException { ReplicationOperation replicationOperation = ReplicationOperation . RENAME_TABLE ; Map < String , String > extras = new HashMap < > ( ) ; extras . p...
342
java-test-9644
java
Till when does tags read ?
until getting data
void read To Data ( boolean return On Yield ) throws IO Exception { Input Stream is = get Input Stream ( ) ; if ( is == null ) return ; for ( int tag = is . read ( ) ; tag >= NUM ; tag = is . read ( ) ) { switch ( tag ) { case STRING : server . free Read Lock ( ) ; if ( return On Yield ) return ; server . read Channel ...
void readToData ( boolean returnOnYield ) throws IOException { InputStream is = getInputStream ( ) ; if ( is == null ) return ; for ( int tag = is . read ( ) ; tag >= _NUM ; tag = is . read ( ) ) { switch ( tag ) { case STRING : server . freeReadLock ( ) ; if ( returnOnYield ) return ; server . readChannel ( channel ) ...
166
java-test-9645
java
What does the code initialize using the provided parent class loader and install and instance paths ?
the configuration framework
public synchronized Configuration Framework initialize ( final String install Path , final String instance Path , final Class Loader parent ) throws Config Exception { if ( loader != null ) { throw new Illegal State Exception ( STRING ) ; } this . install Path = install Path != null ? install Path : System . getenv ( S...
public synchronized ConfigurationFramework initialize ( final String installPath , final String instancePath , final ClassLoader parent ) throws ConfigException { if ( loader != null ) { throw new IllegalStateException ( STRING ) ; } this . installPath = installPath != null ? installPath : System . getenv ( STRING ) ; ...
126
java-test-9646
java
What does the code use ?
the provided parent class loader and install and instance paths
public synchronized Configuration Framework initialize ( final String install Path , final String instance Path , final Class Loader parent ) throws Config Exception { if ( loader != null ) { throw new Illegal State Exception ( STRING ) ; } this . install Path = install Path != null ? install Path : System . getenv ( S...
public synchronized ConfigurationFramework initialize ( final String installPath , final String instancePath , final ClassLoader parent ) throws ConfigException { if ( loader != null ) { throw new IllegalStateException ( STRING ) ; } this . installPath = installPath != null ? installPath : System . getenv ( STRING ) ; ...
126
java-test-9647
java
How does the code initialize the configuration framework ?
using the provided parent class loader and install and instance paths
public synchronized Configuration Framework initialize ( final String install Path , final String instance Path , final Class Loader parent ) throws Config Exception { if ( loader != null ) { throw new Illegal State Exception ( STRING ) ; } this . install Path = install Path != null ? install Path : System . getenv ( S...
public synchronized ConfigurationFramework initialize ( final String installPath , final String instancePath , final ClassLoader parent ) throws ConfigException { if ( loader != null ) { throw new IllegalStateException ( STRING ) ; } this . installPath = installPath != null ? installPath : System . getenv ( STRING ) ; ...
126
java-test-9648
java
How may this method report they they are not equal ?
wrongly
public static boolean are Equal ( Bundle bundle 1 , Bundle bundle 2 ) { if ( bundle 1 == null ) { return bundle 2 == null ; } else if ( bundle 2 == null ) { return BOOL ; } else if ( bundle 1 == bundle 2 ) { return BOOL ; } Set < String > key Set = bundle 1 . key Set ( ) ; if ( ! key Set . equals ( bundle 2 . key Set (...
public static boolean areEqual ( Bundle bundle1 , Bundle bundle2 ) { if ( bundle1 == null ) { return bundle2 == null ; } else if ( bundle2 == null ) { return _BOOL ; } else if ( bundle1 == bundle2 ) { return _BOOL ; } Set < String > keySet = bundle1 . keySet ( ) ; if ( ! keySet . equals ( bundle2 . keySet ( ) ) ) { ret...
161
java-test-9649
java
What do you want ?
to build a single root container
public Iterable < Element > elements ( ) { if ( level != NUM ) { throw new Illegal State Exception ( log Id ( ) + STRING + dump Elements ( ) ) ; } if ( elements . is Empty ( ) ) { throw new Illegal State Exception ( log Id ( ) + STRING ) ; } return Iterables . transform ( this . elements , null ) ; }
public Iterable < Element > elements ( ) { if ( level != _NUM ) { throw new IllegalStateException ( logId ( ) + STRING + dumpElements ( ) ) ; } if ( elements . isEmpty ( ) ) { throw new IllegalStateException ( logId ( ) + STRING ) ; } return Iterables . transform ( this . elements , null ) ; }
74
java-test-9650
java
What do you build ?
a single root container
public Iterable < Element > elements ( ) { if ( level != NUM ) { throw new Illegal State Exception ( log Id ( ) + STRING + dump Elements ( ) ) ; } if ( elements . is Empty ( ) ) { throw new Illegal State Exception ( log Id ( ) + STRING ) ; } return Iterables . transform ( this . elements , null ) ; }
public Iterable < Element > elements ( ) { if ( level != _NUM ) { throw new IllegalStateException ( logId ( ) + STRING + dumpElements ( ) ) ; } if ( elements . isEmpty ( ) ) { throw new IllegalStateException ( logId ( ) + STRING ) ; } return Iterables . transform ( this . elements , null ) ; }
74
java-test-9651
java
What does the code return ?
the top level elements added so far
public Iterable < Element > elements ( ) { if ( level != NUM ) { throw new Illegal State Exception ( log Id ( ) + STRING + dump Elements ( ) ) ; } if ( elements . is Empty ( ) ) { throw new Illegal State Exception ( log Id ( ) + STRING ) ; } return Iterables . transform ( this . elements , null ) ; }
public Iterable < Element > elements ( ) { if ( level != _NUM ) { throw new IllegalStateException ( logId ( ) + STRING + dumpElements ( ) ) ; } if ( elements . isEmpty ( ) ) { throw new IllegalStateException ( logId ( ) + STRING ) ; } return Iterables . transform ( this . elements , null ) ; }
74
java-test-9653
java
What does the code restore ?
a previously removed item
public void restore ( @ Non Null Removed Element element ) { int position = NUM ; if ( element . get Element Before ( ) != null ) { position = items . index Of ( element . get Element Before ( ) ) ; if ( position == - NUM ) { Log . w ( TAG , STRING + element . get Element ( ) ) ; return ; } ++ position ; } items . add ...
public void restore ( @ NonNull RemovedElement element ) { int position = _NUM ; if ( element . getElementBefore ( ) != null ) { position = items . indexOf ( element . getElementBefore ( ) ) ; if ( position == - _NUM ) { Log . w ( TAG , STRING + element . getElement ( ) ) ; return ; } ++ position ; } items . add ( posi...
106
java-test-9654
java
What does the code create if needed ?
a new consist
public Consist new Consist ( String name ) { Consist consist = get Consist By Name ( name ) ; if ( consist == null ) { consist = new Consist ( name ) ; Integer old Size = Integer . value Of ( consist Hash Table . size ( ) ) ; consist Hash Table . put ( name , consist ) ; set Dirty And Fire Property Change ( CONSISTLIST...
public Consist newConsist ( String name ) { Consist consist = getConsistByName ( name ) ; if ( consist == null ) { consist = new Consist ( name ) ; Integer oldSize = Integer . valueOf ( _consistHashTable . size ( ) ) ; _consistHashTable . put ( name , consist ) ; setDirtyAndFirePropertyChange ( CONSISTLISTLENGTH_CHANGE...
98
java-test-9655
java
What is representing a field with the given name , signature and unshared setting ?
an objectstreamfield
Object Stream Field ( String name , String signature , boolean unshared ) { if ( name == null ) { throw new Null Pointer Exception ( ) ; } this . name = name ; this . signature = signature . intern ( ) ; this . unshared = unshared ; field = null ; switch ( signature . char At ( NUM ) ) { case STRING : type = Boolean . ...
ObjectStreamField ( String name , String signature , boolean unshared ) { if ( name == null ) { throw new NullPointerException ( ) ; } this . name = name ; this . signature = signature . intern ( ) ; this . unshared = unshared ; field = null ; switch ( signature . charAt ( _NUM ) ) { case STRING : type = Boolean . TYPE...
182
java-test-9656
java
What do an objectstreamfield represent ?
a field with the given name , signature and unshared setting
Object Stream Field ( String name , String signature , boolean unshared ) { if ( name == null ) { throw new Null Pointer Exception ( ) ; } this . name = name ; this . signature = signature . intern ( ) ; this . unshared = unshared ; field = null ; switch ( signature . char At ( NUM ) ) { case STRING : type = Boolean . ...
ObjectStreamField ( String name , String signature , boolean unshared ) { if ( name == null ) { throw new NullPointerException ( ) ; } this . name = name ; this . signature = signature . intern ( ) ; this . unshared = unshared ; field = null ; switch ( signature . charAt ( _NUM ) ) { case STRING : type = Boolean . TYPE...
182
java-test-9657
java
What does this method save ?
a file with the last record read from the device
private void write Local CSV ( Medtronic Sensor Record most Recent Data , Context context ) { try { if ( most Recent Data == null || most Recent Data . bG Value == null ) log . debug ( STRING ) ; else log . debug ( STRING + most Recent Data . bG Value ) ; Object Output Stream oos = new Object Output Stream ( new File O...
private void writeLocalCSV ( MedtronicSensorRecord mostRecentData , Context context ) { try { if ( mostRecentData == null || mostRecentData . bGValue == null ) log . debug ( STRING ) ; else log . debug ( STRING + mostRecentData . bGValue ) ; ObjectOutputStream oos = new ObjectOutputStream ( new FileOutputStream ( new F...
140
java-test-9658
java
What happened the order ?
the charging
public void print ( ) { Object [ ] iter Charging Times = charging Times . to Array ( ) ; Arrays . sort ( iter Charging Times ) ; for ( int i = NUM ; i < iter Charging Times . length ; i ++ ) { Charge Log cur Item = ( Charge Log ) iter Charging Times [ i ] ; cur Item . print ( ) ; } }
public void print ( ) { Object [ ] iterChargingTimes = chargingTimes . toArray ( ) ; Arrays . sort ( iterChargingTimes ) ; for ( int i = _NUM ; i < iterChargingTimes . length ; i ++ ) { ChargeLog curItem = ( ChargeLog ) iterChargingTimes [ i ] ; curItem . print ( ) ; } }
74
java-test-9659
java
Where does the code add a sourcecoderemark ?
on the given element
protected void add Source Code Remark ( Test Solution test Solution , Element element , String message Code , Evidence Element evidence Element ) { if ( evidence Element != null ) { Collection < Evidence Element > evidence Element List = new Array List < > ( ) ; evidence Element List . add ( evidence Element ) ; proces...
protected void addSourceCodeRemark ( TestSolution testSolution , Element element , String messageCode , EvidenceElement evidenceElement ) { if ( evidenceElement != null ) { Collection < EvidenceElement > evidenceElementList = new ArrayList < > ( ) ; evidenceElementList . add ( evidenceElement ) ; processRemarkService ....
109
java-test-9660
java
What does the code add on the given element ?
a sourcecoderemark
protected void add Source Code Remark ( Test Solution test Solution , Element element , String message Code , Evidence Element evidence Element ) { if ( evidence Element != null ) { Collection < Evidence Element > evidence Element List = new Array List < > ( ) ; evidence Element List . add ( evidence Element ) ; proces...
protected void addSourceCodeRemark ( TestSolution testSolution , Element element , String messageCode , EvidenceElement evidenceElement ) { if ( evidenceElement != null ) { Collection < EvidenceElement > evidenceElementList = new ArrayList < > ( ) ; evidenceElementList . add ( evidenceElement ) ; processRemarkService ....
109
java-test-9661
java
What did the service give ?
configuration attributes
public Service Config create Organization Config ( String org Name , Map attrs ) throws SMS Exception , SSO Exception { validate SSM ( ) ; Service Schema Impl ss = ssm . get Schema ( Schema Type . ORGANIZATION ) ; if ( ss == null ) { String [ ] args = { service Name } ; throw ( new SMS Exception ( IUMS Constants . UMS ...
public ServiceConfig createOrganizationConfig ( String orgName , Map attrs ) throws SMSException , SSOException { validateSSM ( ) ; ServiceSchemaImpl ss = ssm . getSchema ( SchemaType . ORGANIZATION ) ; if ( ss == null ) { String [ ] args = { serviceName } ; throw ( new SMSException ( IUMSConstants . UMS_BUNDLE_NAME , ...
353
java-test-9662
java
What may the accelerated device have like if the device restoration failed when one device exits fs mode while others remain ) ?
this graphics config
public Volatile Image create Back Buffer ( W Component Peer peer ) { Component target = ( Component ) peer . get Target ( ) ; return new Sun Volatile Image ( target , target . get Width ( ) , target . get Height ( ) , Boolean . TRUE ) ; }
public VolatileImage createBackBuffer ( WComponentPeer peer ) { Component target = ( Component ) peer . getTarget ( ) ; return new SunVolatileImage ( target , target . getWidth ( ) , target . getHeight ( ) , Boolean . TRUE ) ; }
54
java-test-9663
java
When is this method called from wcomponentpeer while the default pipeline doesn ' t support flipping , it may happen that the accelerated device may have this graphics config ( like if the device restoration failed when one device exits fs mode while others remain ?
when a surface data is replaced
public Volatile Image create Back Buffer ( W Component Peer peer ) { Component target = ( Component ) peer . get Target ( ) ; return new Sun Volatile Image ( target , target . get Width ( ) , target . get Height ( ) , Boolean . TRUE ) ; }
public VolatileImage createBackBuffer ( WComponentPeer peer ) { Component target = ( Component ) peer . getTarget ( ) ; return new SunVolatileImage ( target , target . getWidth ( ) , target . getHeight ( ) , Boolean . TRUE ) ; }
54
java-test-9664
java
How may the accelerated device have this graphics config ?
like if the device restoration failed when one device exits fs mode while others remain )
public Volatile Image create Back Buffer ( W Component Peer peer ) { Component target = ( Component ) peer . get Target ( ) ; return new Sun Volatile Image ( target , target . get Width ( ) , target . get Height ( ) , Boolean . TRUE ) ; }
public VolatileImage createBackBuffer ( WComponentPeer peer ) { Component target = ( Component ) peer . getTarget ( ) ; return new SunVolatileImage ( target , target . getWidth ( ) , target . getHeight ( ) , Boolean . TRUE ) ; }
54
java-test-9665
java
What may have this graphics config like if the device restoration failed when one device exits fs mode while others remain ) ?
the accelerated device
public Volatile Image create Back Buffer ( W Component Peer peer ) { Component target = ( Component ) peer . get Target ( ) ; return new Sun Volatile Image ( target , target . get Width ( ) , target . get Height ( ) , Boolean . TRUE ) ; }
public VolatileImage createBackBuffer ( WComponentPeer peer ) { Component target = ( Component ) peer . getTarget ( ) ; return new SunVolatileImage ( target , target . getWidth ( ) , target . getHeight ( ) , Boolean . TRUE ) ; }
54
java-test-9666
java
When do the device restoration fail ?
when one device exits fs mode while others remain
public Volatile Image create Back Buffer ( W Component Peer peer ) { Component target = ( Component ) peer . get Target ( ) ; return new Sun Volatile Image ( target , target . get Width ( ) , target . get Height ( ) , Boolean . TRUE ) ; }
public VolatileImage createBackBuffer ( WComponentPeer peer ) { Component target = ( Component ) peer . getTarget ( ) ; return new SunVolatileImage ( target , target . getWidth ( ) , target . getHeight ( ) , Boolean . TRUE ) ; }
54
java-test-9668
java
What does the code add ?
data with a given weight
@ Override public void put ( double val , double weight ) { final double nn = weight + this . n ; final double delta = val - this . m1 ; final double otherm 2 = val * val ; final double otherm 3 = otherm 2 * val ; final double otherm 4 = otherm 3 * val ; final double delta nn = delta / nn ; final double delta nn 2 = de...
@ Override public void put ( double val , double weight ) { final double nn = weight + this . n ; final double delta = val - this . m1 ; final double otherm2 = val * val ; final double otherm3 = otherm2 * val ; final double otherm4 = otherm3 * val ; final double delta_nn = delta / nn ; final double delta_nn2 = delta_nn...
293
java-test-9669
java
What does the code update ?
a rule record with specific parameters
public boolean update ( Long rule ID , Long event ID , String rule Name , String rule Desc , Boolean enabled , Boolean notification ) { Simple Date Format date Format = new Simple Date Format ( STRING ) ; String insert Time = date Format . format ( new Timestamp ( System . current Time Millis ( ) ) ) ; if ( rule ID == ...
public boolean update ( Long ruleID , Long eventID , String ruleName , String ruleDesc , Boolean enabled , Boolean notification ) { SimpleDateFormat dateFormat = new SimpleDateFormat ( STRING ) ; String insertTime = dateFormat . format ( new Timestamp ( System . currentTimeMillis ( ) ) ) ; if ( ruleID == null ) { throw...
237
java-test-9670
java
What does this test use to check for non accents ?
the overload
public void test Get Colors By Name Without Accents ( ) { try { for ( String color Name : Material Palettes . ALL COLOR NAMES ) { List < Integer > colors = Material Palettes . get Colors By Name ( color Name , BOOL ) ; assert Equals ( Material Palettes . NON ACCENT COLOR LEVELS . length , colors . size ( ) ) ; } } catc...
public void testGetColorsByNameWithoutAccents ( ) { try { for ( String colorName : MaterialPalettes . ALL_COLOR_NAMES ) { List < Integer > colors = MaterialPalettes . getColorsByName ( colorName , _BOOL ) ; assertEquals ( MaterialPalettes . NON_ACCENT_COLOR_LEVELS . length , colors . size ( ) ) ; } } catch ( IllegalAcc...
182
java-test-9671
java
What does this test use the overload ?
to check for non accents
public void test Get Colors By Name Without Accents ( ) { try { for ( String color Name : Material Palettes . ALL COLOR NAMES ) { List < Integer > colors = Material Palettes . get Colors By Name ( color Name , BOOL ) ; assert Equals ( Material Palettes . NON ACCENT COLOR LEVELS . length , colors . size ( ) ) ; } } catc...
public void testGetColorsByNameWithoutAccents ( ) { try { for ( String colorName : MaterialPalettes . ALL_COLOR_NAMES ) { List < Integer > colors = MaterialPalettes . getColorsByName ( colorName , _BOOL ) ; assertEquals ( MaterialPalettes . NON_ACCENT_COLOR_LEVELS . length , colors . size ( ) ) ; } } catch ( IllegalAcc...
182
java-test-9672
java
What do class descriptor represent ?
a standard ( i . e . , not a dynamic proxy ) class
private void write Non Proxy Desc ( Object Stream Class desc , boolean unshared ) throws IO Exception { bout . write Byte ( TC CLASSDESC ) ; handles . assign ( unshared ? null : desc ) ; if ( protocol == PROTOCOL VERSION 1 ) { desc . write Non Proxy ( this ) ; } else { write Class Descriptor ( desc ) ; } Class < ? > cl...
private void writeNonProxyDesc ( ObjectStreamClass desc , boolean unshared ) throws IOException { bout . writeByte ( TC_CLASSDESC ) ; handles . assign ( unshared ? null : desc ) ; if ( protocol == PROTOCOL_VERSION_1 ) { desc . writeNonProxy ( this ) ; } else { writeClassDescriptor ( desc ) ; } Class < ? > cl = desc . f...
156
java-test-9676
java
When does the code run the specified runnable ?
when a ' rail ' receives a cancellation
public final Parallel Flux < T > do On Cancel ( Runnable on Cancel ) { Objects . require Non Null ( on Cancel , STRING ) ; return do On Signal ( this , null , null , null , null , null , null , null , on Cancel ) ; }
public final ParallelFlux < T > doOnCancel ( Runnable onCancel ) { Objects . requireNonNull ( onCancel , STRING ) ; return doOnSignal ( this , null , null , null , null , null , null , null , onCancel ) ; }
54
java-test-9677
java
What do a ' rail ' receive when ?
a cancellation
public final Parallel Flux < T > do On Cancel ( Runnable on Cancel ) { Objects . require Non Null ( on Cancel , STRING ) ; return do On Signal ( this , null , null , null , null , null , null , null , on Cancel ) ; }
public final ParallelFlux < T > doOnCancel ( Runnable onCancel ) { Objects . requireNonNull ( onCancel , STRING ) ; return doOnSignal ( this , null , null , null , null , null , null , null , onCancel ) ; }
54
java-test-9678
java
How do the preamble hold ?
capacity
static long check Preamble Size ( Memory mem ) { final long cap = mem . get Capacity ( ) ; if ( cap < NUM ) { throw Not Big Enough ( cap , NUM ) ; } final long pre 0 = mem . get Long ( NUM ) ; final int pre Longs = ( int ) ( pre 0 & NUM ) ; final int required = Math . max ( pre Longs << NUM , NUM ) ; if ( cap < require...
static long checkPreambleSize ( Memory mem ) { final long cap = mem . getCapacity ( ) ; if ( cap < _NUM ) { throwNotBigEnough ( cap , _NUM ) ; } final long pre0 = mem . getLong ( _NUM ) ; final int preLongs = ( int ) ( pre0 & _NUM ) ; final int required = Math . max ( preLongs << _NUM , _NUM ) ; if ( cap < required ) {...
106
java-test-9679
java
What does the code return ?
a subset which is constricted by a lower and an upper limit
private Sorted Map < Message Uid , Maildir Message Name > truncate Map ( Map < Message Uid , Maildir Message Name > map , Message Uid from , Message Uid to ) { Tree Map < Message Uid , Maildir Message Name > sorted Map ; if ( map instanceof Tree Map < ? , ? > ) sorted Map = ( Tree Map < Message Uid , Maildir Message Na...
private SortedMap < MessageUid , MaildirMessageName > truncateMap ( Map < MessageUid , MaildirMessageName > map , MessageUid from , MessageUid to ) { TreeMap < MessageUid , MaildirMessageName > sortedMap ; if ( map instanceof TreeMap < ? , ? > ) sortedMap = ( TreeMap < MessageUid , MaildirMessageName > ) map ; else sor...
128
java-test-9680
java
What does the code serialize into a flow of sax events ?
the java objects of the configured list
private void parse ( ) throws SAX Exception { X Stream xstream = ( X Stream ) properties . get ( CONFIGURED XSTREAM PROPERTY ) ; if ( xstream == null ) { xstream = new X Stream ( ) ; } final List < ? > source = ( List < ? > ) properties . get ( SOURCE OBJECT LIST PROPERTY ) ; if ( source == null || source . is Empty ( ...
private void parse ( ) throws SAXException { XStream xstream = ( XStream ) properties . get ( CONFIGURED_XSTREAM_PROPERTY ) ; if ( xstream == null ) { xstream = new XStream ( ) ; } final List < ? > source = ( List < ? > ) properties . get ( SOURCE_OBJECT_LIST_PROPERTY ) ; if ( source == null || source . isEmpty ( ) ) {...
176
java-test-9681
java
What does the code compare ?
the parameter from the api and the parameter from reflection
private static boolean compare Param ( String jdiff Param , Type reflection Param Type ) { if ( jdiff Param == null ) { return BOOL ; } String reflection Param = type To String ( reflection Param Type ) ; if ( jdiff Param . equals ( reflection Param ) ) { return BOOL ; } int jdiff Param End Offset = jdiff Param . index...
private static boolean compareParam ( String jdiffParam , Type reflectionParamType ) { if ( jdiffParam == null ) { return _BOOL ; } String reflectionParam = typeToString ( reflectionParamType ) ; if ( jdiffParam . equals ( reflectionParam ) ) { return _BOOL ; } int jdiffParamEndOffset = jdiffParam . indexOf ( STRING ) ...
153
java-test-9682
java
What does convenience method take ?
a screenshot of the device
public Buffered Image take Screenshot ( ) { Debug . set Debug Level ( NUM ) ; File scr File = driver . get Screenshot As ( Output Type . FILE ) ; Buffered Image buffered Image = null ; try { buffered Image = Image IO . read ( scr File ) ; } catch ( IO Exception e ) { e . print Stack Trace ( ) ; } return buffered Image ...
public BufferedImage takeScreenshot ( ) { Debug . setDebugLevel ( _NUM ) ; File scrFile = driver . getScreenshotAs ( OutputType . FILE ) ; BufferedImage bufferedImage = null ; try { bufferedImage = ImageIO . read ( scrFile ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return bufferedImage ; }
76
java-test-9683
java
What is the file pointer puts then ?
in the right place to start reading the header for the file
public int handle NITF Header ( Binary File bin File ) { try { byte [ ] nitf Array = bin File . read Bytes ( NUM , BOOL ) ; String nitf = new String ( nitf Array ) ; bin File . seek ( RPF DATE LOCATION ) ; nitf Array = bin File . read Bytes ( NUM , BOOL ) ; nitf = new String ( nitf Array ) ; if ( nitf . equals Ignore C...
public int handleNITFHeader ( BinaryFile binFile ) { try { byte [ ] nitfArray = binFile . readBytes ( _NUM , _BOOL ) ; String nitf = new String ( nitfArray ) ; binFile . seek ( RPF_DATE_LOCATION ) ; nitfArray = binFile . readBytes ( _NUM , _BOOL ) ; nitf = new String ( nitfArray ) ; if ( nitf . equalsIgnoreCase ( STRIN...
341
java-test-9684
java
What does it skip if the file is in nitf format ?
the nitf header
public int handle NITF Header ( Binary File bin File ) { try { byte [ ] nitf Array = bin File . read Bytes ( NUM , BOOL ) ; String nitf = new String ( nitf Array ) ; bin File . seek ( RPF DATE LOCATION ) ; nitf Array = bin File . read Bytes ( NUM , BOOL ) ; nitf = new String ( nitf Array ) ; if ( nitf . equals Ignore C...
public int handleNITFHeader ( BinaryFile binFile ) { try { byte [ ] nitfArray = binFile . readBytes ( _NUM , _BOOL ) ; String nitf = new String ( nitfArray ) ; binFile . seek ( RPF_DATE_LOCATION ) ; nitfArray = binFile . readBytes ( _NUM , _BOOL ) ; nitf = new String ( nitfArray ) ; if ( nitf . equalsIgnoreCase ( STRIN...
341