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-7727 | java | What does the code create ? | a new output stream with the specified buffer size and flush mode | public G Zip Output Stream Random Access ( Output Stream out , int size ) throws IO Exception { super ( out , new Deflater ( Deflater . DEFAULT COMPRESSION , BOOL ) , size , BOOL ) ; write Header ( ) ; crc . reset ( ) ; } | public GZipOutputStreamRandomAccess ( OutputStream out , int size ) throws IOException { super ( out , new Deflater ( Deflater . DEFAULT_COMPRESSION , _BOOL ) , size , _BOOL ) ; writeHeader ( ) ; crc . reset ( ) ; } | 51 |
java-test-7728 | java | What will readline can block ? | no matter what | public void run ( ) { while ( m keyboard Stream != null ) { try { if ( m keyboard Read Request ) { String s = m keyboard Stream . read Line ( ) ; m keyboard Input . add ( s ) ; m keyboard Read Request = BOOL ; synchronized ( this ) { notify All ( ) ; } } else try { Thread . sleep ( NUM ) ; } catch ( Interrupted Excepti... | public void run ( ) { while ( m_keyboardStream != null ) { try { if ( m_keyboardReadRequest ) { String s = m_keyboardStream . readLine ( ) ; m_keyboardInput . add ( s ) ; m_keyboardReadRequest = _BOOL ; synchronized ( this ) { notifyAll ( ) ; } } else try { Thread . sleep ( _NUM ) ; } catch ( InterruptedException ie ) ... | 95 |
java-test-7729 | java | What does a seperate thread collect so that we can block in the docontinue on the main thread and then allow the user to interrupt us via keyboard input on this thread ? | our input | public void run ( ) { while ( m keyboard Stream != null ) { try { if ( m keyboard Read Request ) { String s = m keyboard Stream . read Line ( ) ; m keyboard Input . add ( s ) ; m keyboard Read Request = BOOL ; synchronized ( this ) { notify All ( ) ; } } else try { Thread . sleep ( NUM ) ; } catch ( Interrupted Excepti... | public void run ( ) { while ( m_keyboardStream != null ) { try { if ( m_keyboardReadRequest ) { String s = m_keyboardStream . readLine ( ) ; m_keyboardInput . add ( s ) ; m_keyboardReadRequest = _BOOL ; synchronized ( this ) { notifyAll ( ) ; } } else try { Thread . sleep ( _NUM ) ; } catch ( InterruptedException ie ) ... | 95 |
java-test-7730 | java | What did we take so that we only block when requested to do so ? | a request response approach | public void run ( ) { while ( m keyboard Stream != null ) { try { if ( m keyboard Read Request ) { String s = m keyboard Stream . read Line ( ) ; m keyboard Input . add ( s ) ; m keyboard Read Request = BOOL ; synchronized ( this ) { notify All ( ) ; } } else try { Thread . sleep ( NUM ) ; } catch ( Interrupted Excepti... | public void run ( ) { while ( m_keyboardStream != null ) { try { if ( m_keyboardReadRequest ) { String s = m_keyboardStream . readLine ( ) ; m_keyboardInput . add ( s ) ; m_keyboardReadRequest = _BOOL ; synchronized ( this ) { notifyAll ( ) ; } } else try { Thread . sleep ( _NUM ) ; } catch ( InterruptedException ie ) ... | 95 |
java-test-7731 | java | What do we allow then ? | the user to interrupt us via keyboard input on this thread | public void run ( ) { while ( m keyboard Stream != null ) { try { if ( m keyboard Read Request ) { String s = m keyboard Stream . read Line ( ) ; m keyboard Input . add ( s ) ; m keyboard Read Request = BOOL ; synchronized ( this ) { notify All ( ) ; } } else try { Thread . sleep ( NUM ) ; } catch ( Interrupted Excepti... | public void run ( ) { while ( m_keyboardStream != null ) { try { if ( m_keyboardReadRequest ) { String s = m_keyboardStream . readLine ( ) ; m_keyboardInput . add ( s ) ; m_keyboardReadRequest = _BOOL ; synchronized ( this ) { notifyAll ( ) ; } } else try { Thread . sleep ( _NUM ) ; } catch ( InterruptedException ie ) ... | 95 |
java-test-7732 | java | What do all fail ? | to do the job | public void run ( ) { while ( m keyboard Stream != null ) { try { if ( m keyboard Read Request ) { String s = m keyboard Stream . read Line ( ) ; m keyboard Input . add ( s ) ; m keyboard Read Request = BOOL ; synchronized ( this ) { notify All ( ) ; } } else try { Thread . sleep ( NUM ) ; } catch ( Interrupted Excepti... | public void run ( ) { while ( m_keyboardStream != null ) { try { if ( m_keyboardReadRequest ) { String s = m_keyboardStream . readLine ( ) ; m_keyboardInput . add ( s ) ; m_keyboardReadRequest = _BOOL ; synchronized ( this ) { notifyAll ( ) ; } } else try { Thread . sleep ( _NUM ) ; } catch ( InterruptedException ie ) ... | 95 |
java-test-7733 | java | What did we build since readline ( ) will block no matter what and if we ' quit ' we can ' t seem to kill this thread . . close ( ) doesn ' t work and thread . stop ( ) , etc . all fail to do the job in this manner ? | the stupid thing | public void run ( ) { while ( m keyboard Stream != null ) { try { if ( m keyboard Read Request ) { String s = m keyboard Stream . read Line ( ) ; m keyboard Input . add ( s ) ; m keyboard Read Request = BOOL ; synchronized ( this ) { notify All ( ) ; } } else try { Thread . sleep ( NUM ) ; } catch ( Interrupted Excepti... | public void run ( ) { while ( m_keyboardStream != null ) { try { if ( m_keyboardReadRequest ) { String s = m_keyboardStream . readLine ( ) ; m_keyboardInput . add ( s ) ; m_keyboardReadRequest = _BOOL ; synchronized ( this ) { notifyAll ( ) ; } } else try { Thread . sleep ( _NUM ) ; } catch ( InterruptedException ie ) ... | 95 |
java-test-7734 | java | What collects our input so that we can block in the docontinue on the main thread and then allow the user to interrupt us via keyboard input on this thread ? | a seperate thread | public void run ( ) { while ( m keyboard Stream != null ) { try { if ( m keyboard Read Request ) { String s = m keyboard Stream . read Line ( ) ; m keyboard Input . add ( s ) ; m keyboard Read Request = BOOL ; synchronized ( this ) { notify All ( ) ; } } else try { Thread . sleep ( NUM ) ; } catch ( Interrupted Excepti... | public void run ( ) { while ( m_keyboardStream != null ) { try { if ( m_keyboardReadRequest ) { String s = m_keyboardStream . readLine ( ) ; m_keyboardInput . add ( s ) ; m_keyboardReadRequest = _BOOL ; synchronized ( this ) { notifyAll ( ) ; } } else try { Thread . sleep ( _NUM ) ; } catch ( InterruptedException ie ) ... | 95 |
java-test-7735 | java | What did we need thus ? | to take a request response approach so that we only block when requested to do so | public void run ( ) { while ( m keyboard Stream != null ) { try { if ( m keyboard Read Request ) { String s = m keyboard Stream . read Line ( ) ; m keyboard Input . add ( s ) ; m keyboard Read Request = BOOL ; synchronized ( this ) { notify All ( ) ; } } else try { Thread . sleep ( NUM ) ; } catch ( Interrupted Excepti... | public void run ( ) { while ( m_keyboardStream != null ) { try { if ( m_keyboardReadRequest ) { String s = m_keyboardStream . readLine ( ) ; m_keyboardInput . add ( s ) ; m_keyboardReadRequest = _BOOL ; synchronized ( this ) { notifyAll ( ) ; } } else try { Thread . sleep ( _NUM ) ; } catch ( InterruptedException ie ) ... | 95 |
java-test-7736 | java | What will can block no matter what ? | readline | public void run ( ) { while ( m keyboard Stream != null ) { try { if ( m keyboard Read Request ) { String s = m keyboard Stream . read Line ( ) ; m keyboard Input . add ( s ) ; m keyboard Read Request = BOOL ; synchronized ( this ) { notify All ( ) ; } } else try { Thread . sleep ( NUM ) ; } catch ( Interrupted Excepti... | public void run ( ) { while ( m_keyboardStream != null ) { try { if ( m_keyboardReadRequest ) { String s = m_keyboardStream . readLine ( ) ; m_keyboardInput . add ( s ) ; m_keyboardReadRequest = _BOOL ; synchronized ( this ) { notifyAll ( ) ; } } else try { Thread . sleep ( _NUM ) ; } catch ( InterruptedException ie ) ... | 95 |
java-test-7738 | java | How does the test class element return ? | by looking at the method instrumentationtestcase invokes | static Stack Trace Element find Test Class Trace Element ( Stack Trace Element [ ] trace ) { for ( int i = trace . length - NUM ; i >= NUM ; i -- ) { Stack Trace Element element = trace [ i ] ; if ( TEST CASE CLASS . equals ( element . get Class Name ( ) ) && TEST CASE METHOD . equals ( element . get Method Name ( ) ) ... | static StackTraceElement findTestClassTraceElement ( StackTraceElement [ ] trace ) { for ( int i = trace . length - _NUM ; i >= _NUM ; i -- ) { StackTraceElement element = trace [ i ] ; if ( TEST_CASE_CLASS . equals ( element . getClassName ( ) ) && TEST_CASE_METHOD . equals ( element . getMethodName ( ) ) ) { return t... | 100 |
java-test-7739 | java | What does the code send ? | a http response with http_ok return code and response body | public static boolean send Http Response ( boolean is Success , Http Exchange exchange , byte [ ] response ) { int return Code = is Success ? Http URL Connection . HTTP OK : Http URL Connection . HTTP UNAVAILABLE ; try { exchange . send Response Headers ( return Code , response . length ) ; } catch ( IO Exception e ) {... | public static boolean sendHttpResponse ( boolean isSuccess , HttpExchange exchange , byte [ ] response ) { int returnCode = isSuccess ? HttpURLConnection . HTTP_OK : HttpURLConnection . HTTP_UNAVAILABLE ; try { exchange . sendResponseHeaders ( returnCode , response . length ) ; } catch ( IOException e ) { LOG . log ( L... | 169 |
java-test-7740 | java | What shows doc = 1 , 2 . in this logic ? | the first page | private boolean check Next Page Has Entry ( Score Doc after , Enum Set < Query Option > options , Index Searcher s , Query tq , Sort sort , int count , Query Specification qs , long query Start Time Micros ) throws Throwable { boolean has Valid Next Page Entry = BOOL ; while ( after != null ) { Top Docs next Page Resul... | private boolean checkNextPageHasEntry ( ScoreDoc after , EnumSet < QueryOption > options , IndexSearcher s , Query tq , Sort sort , int count , QuerySpecification qs , long queryStartTimeMicros ) throws Throwable { boolean hasValidNextPageEntry = _BOOL ; while ( after != null ) { TopDocs nextPageResults ; if ( sort == ... | 246 |
java-test-7741 | java | What will searchafter fetch in this logic first ? | doc = 3 , 4 | private boolean check Next Page Has Entry ( Score Doc after , Enum Set < Query Option > options , Index Searcher s , Query tq , Sort sort , int count , Query Specification qs , long query Start Time Micros ) throws Throwable { boolean has Valid Next Page Entry = BOOL ; while ( after != null ) { Top Docs next Page Resul... | private boolean checkNextPageHasEntry ( ScoreDoc after , EnumSet < QueryOption > options , IndexSearcher s , Query tq , Sort sort , int count , QuerySpecification qs , long queryStartTimeMicros ) throws Throwable { boolean hasValidNextPageEntry = _BOOL ; while ( after != null ) { TopDocs nextPageResults ; if ( sort == ... | 246 |
java-test-7742 | java | When does doc = 5 hit ? | next iteration | private boolean check Next Page Has Entry ( Score Doc after , Enum Set < Query Option > options , Index Searcher s , Query tq , Sort sort , int count , Query Specification qs , long query Start Time Micros ) throws Throwable { boolean has Valid Next Page Entry = BOOL ; while ( after != null ) { Top Docs next Page Resul... | private boolean checkNextPageHasEntry ( ScoreDoc after , EnumSet < QueryOption > options , IndexSearcher s , Query tq , Sort sort , int count , QuerySpecification qs , long queryStartTimeMicros ) throws Throwable { boolean hasValidNextPageEntry = _BOOL ; while ( after != null ) { TopDocs nextPageResults ; if ( sort == ... | 246 |
java-test-7743 | java | What are s say ? | there are 5 docs . doc = 1 , 2 , 5 are valid and doc = 3 , 4 are expired ( invalid ) . | private boolean check Next Page Has Entry ( Score Doc after , Enum Set < Query Option > options , Index Searcher s , Query tq , Sort sort , int count , Query Specification qs , long query Start Time Micros ) throws Throwable { boolean has Valid Next Page Entry = BOOL ; while ( after != null ) { Top Docs next Page Resul... | private boolean checkNextPageHasEntry ( ScoreDoc after , EnumSet < QueryOption > options , IndexSearcher s , Query tq , Sort sort , int count , QuerySpecification qs , long queryStartTimeMicros ) throws Throwable { boolean hasValidNextPageEntry = _BOOL ; while ( after != null ) { TopDocs nextPageResults ; if ( sort == ... | 246 |
java-test-7744 | java | When do the first page show doc = 1 , 2 . in this logic ? | when limit = 2 | private boolean check Next Page Has Entry ( Score Doc after , Enum Set < Query Option > options , Index Searcher s , Query tq , Sort sort , int count , Query Specification qs , long query Start Time Micros ) throws Throwable { boolean has Valid Next Page Entry = BOOL ; while ( after != null ) { Top Docs next Page Resul... | private boolean checkNextPageHasEntry ( ScoreDoc after , EnumSet < QueryOption > options , IndexSearcher s , Query tq , Sort sort , int count , QuerySpecification qs , long queryStartTimeMicros ) throws Throwable { boolean hasValidNextPageEntry = _BOOL ; while ( after != null ) { TopDocs nextPageResults ; if ( sort == ... | 246 |
java-test-7745 | java | What will searchafter hit then ? | doc = 3 , 4 and doc = 5 | private boolean check Next Page Has Entry ( Score Doc after , Enum Set < Query Option > options , Index Searcher s , Query tq , Sort sort , int count , Query Specification qs , long query Start Time Micros ) throws Throwable { boolean has Valid Next Page Entry = BOOL ; while ( after != null ) { Top Docs next Page Resul... | private boolean checkNextPageHasEntry ( ScoreDoc after , EnumSet < QueryOption > options , IndexSearcher s , Query tq , Sort sort , int count , QuerySpecification qs , long queryStartTimeMicros ) throws Throwable { boolean hasValidNextPageEntry = _BOOL ; while ( after != null ) { TopDocs nextPageResults ; if ( sort == ... | 246 |
java-test-7746 | java | What is false indicating ? | there is no next page | private boolean check Next Page Has Entry ( Score Doc after , Enum Set < Query Option > options , Index Searcher s , Query tq , Sort sort , int count , Query Specification qs , long query Start Time Micros ) throws Throwable { boolean has Valid Next Page Entry = BOOL ; while ( after != null ) { Top Docs next Page Resul... | private boolean checkNextPageHasEntry ( ScoreDoc after , EnumSet < QueryOption > options , IndexSearcher s , Query tq , Sort sort , int count , QuerySpecification qs , long queryStartTimeMicros ) throws Throwable { boolean hasValidNextPageEntry = _BOOL ; while ( after != null ) { TopDocs nextPageResults ; if ( sort == ... | 246 |
java-test-7747 | java | What does the code resolve ? | the order of the properties that appear in the csv file | public static String [ ] resolve Property Order ( String [ ] first Row , Map < String , Object > property Types ) { log . debug ( STRING + Arrays . as List ( first Row ) ) ; String [ ] result = null ; if ( is Valid Title Row ( first Row , property Types ) ) { result = first Row ; log . debug ( STRING + Arrays . as List... | public static String [ ] resolvePropertyOrder ( String [ ] firstRow , Map < String , Object > propertyTypes ) { log . debug ( STRING + Arrays . asList ( firstRow ) ) ; String [ ] result = null ; if ( isValidTitleRow ( firstRow , propertyTypes ) ) { result = firstRow ; log . debug ( STRING + Arrays . asList ( result ) )... | 99 |
java-test-7748 | java | What does the code create ? | a multitraversal that follows shortcut edges | private void make Multi Traversal ( ) { Optional < String > role A = roletypes . get ( NUM ) ; String player A = roleplayers . get ( NUM ) ; Optional < String > role B = roletypes . get ( NUM ) ; String player B = roleplayers . get ( NUM ) ; multi Traversal = Multi Traversal . create ( new Fragment Impl ( null , Fragme... | private void makeMultiTraversal ( ) { Optional < String > roleA = roletypes . get ( _NUM ) ; String playerA = roleplayers . get ( _NUM ) ; Optional < String > roleB = roletypes . get ( _NUM ) ; String playerB = roleplayers . get ( _NUM ) ; multiTraversal = MultiTraversal . create ( new FragmentImpl ( null , FragmentPri... | 106 |
java-test-7749 | java | What follows shortcut edges ? | a multitraversal | private void make Multi Traversal ( ) { Optional < String > role A = roletypes . get ( NUM ) ; String player A = roleplayers . get ( NUM ) ; Optional < String > role B = roletypes . get ( NUM ) ; String player B = roleplayers . get ( NUM ) ; multi Traversal = Multi Traversal . create ( new Fragment Impl ( null , Fragme... | private void makeMultiTraversal ( ) { Optional < String > roleA = roletypes . get ( _NUM ) ; String playerA = roleplayers . get ( _NUM ) ; Optional < String > roleB = roletypes . get ( _NUM ) ; String playerB = roleplayers . get ( _NUM ) ; multiTraversal = MultiTraversal . create ( new FragmentImpl ( null , FragmentPri... | 106 |
java-test-7750 | java | What does a multitraversal follow ? | shortcut edges | private void make Multi Traversal ( ) { Optional < String > role A = roletypes . get ( NUM ) ; String player A = roleplayers . get ( NUM ) ; Optional < String > role B = roletypes . get ( NUM ) ; String player B = roleplayers . get ( NUM ) ; multi Traversal = Multi Traversal . create ( new Fragment Impl ( null , Fragme... | private void makeMultiTraversal ( ) { Optional < String > roleA = roletypes . get ( _NUM ) ; String playerA = roleplayers . get ( _NUM ) ; Optional < String > roleB = roletypes . get ( _NUM ) ; String playerB = roleplayers . get ( _NUM ) ; multiTraversal = MultiTraversal . create ( new FragmentImpl ( null , FragmentPri... | 106 |
java-test-7751 | java | What must it not convert to a proper underscored name ? | improper camel case names | public static String camel Case To Underscored ( String camel Case Name ) { int i = NUM ; while ( i < camel Case Name . length ( ) && Character . is Lower Case ( camel Case Name . char At ( i ) ) ) { i ++ ; } if ( i == camel Case Name . length ( ) ) { return camel Case Name ; } String Builder sb = new String Builder ( ... | public static String camelCaseToUnderscored ( String camelCaseName ) { int i = _NUM ; while ( i < camelCaseName . length ( ) && Character . isLowerCase ( camelCaseName . charAt ( i ) ) ) { i ++ ; } if ( i == camelCaseName . length ( ) ) { return camelCaseName ; } StringBuilder sb = new StringBuilder ( ) ; sb . append (... | 180 |
java-test-7754 | java | How does a sql time convert to a calendar ? | independently of time zone | private Calendar as Calendar ( Calendar base , Time time ) { Calendar time Calendar = Calendar . get Instance ( ) ; time Calendar . set Time ( time ) ; base . set ( Calendar . HOUR OF DAY , time Calendar . get ( Calendar . HOUR OF DAY ) ) ; base . set ( Calendar . MINUTE , time Calendar . get ( Calendar . MINUTE ) ) ; ... | private Calendar asCalendar ( Calendar base , Time time ) { Calendar timeCalendar = Calendar . getInstance ( ) ; timeCalendar . setTime ( time ) ; base . set ( Calendar . HOUR_OF_DAY , timeCalendar . get ( Calendar . HOUR_OF_DAY ) ) ; base . set ( Calendar . MINUTE , timeCalendar . get ( Calendar . MINUTE ) ) ; base . ... | 116 |
java-test-7755 | java | What is leaving otherwise intact ? | the date and time zone components of the given calendar | private Calendar as Calendar ( Calendar base , Time time ) { Calendar time Calendar = Calendar . get Instance ( ) ; time Calendar . set Time ( time ) ; base . set ( Calendar . HOUR OF DAY , time Calendar . get ( Calendar . HOUR OF DAY ) ) ; base . set ( Calendar . MINUTE , time Calendar . get ( Calendar . MINUTE ) ) ; ... | private Calendar asCalendar ( Calendar base , Time time ) { Calendar timeCalendar = Calendar . getInstance ( ) ; timeCalendar . setTime ( time ) ; base . set ( Calendar . HOUR_OF_DAY , timeCalendar . get ( Calendar . HOUR_OF_DAY ) ) ; base . set ( Calendar . MINUTE , timeCalendar . get ( Calendar . MINUTE ) ) ; base . ... | 116 |
java-test-7756 | java | What did the date and time zone components of the given calendar leave ? | otherwise intact | private Calendar as Calendar ( Calendar base , Time time ) { Calendar time Calendar = Calendar . get Instance ( ) ; time Calendar . set Time ( time ) ; base . set ( Calendar . HOUR OF DAY , time Calendar . get ( Calendar . HOUR OF DAY ) ) ; base . set ( Calendar . MINUTE , time Calendar . get ( Calendar . MINUTE ) ) ; ... | private Calendar asCalendar ( Calendar base , Time time ) { Calendar timeCalendar = Calendar . getInstance ( ) ; timeCalendar . setTime ( time ) ; base . set ( Calendar . HOUR_OF_DAY , timeCalendar . get ( Calendar . HOUR_OF_DAY ) ) ; base . set ( Calendar . MINUTE , timeCalendar . get ( Calendar . MINUTE ) ) ; base . ... | 116 |
java-test-7757 | java | When do if the project has been modified check ? | before creating or opening another project | @ Override public boolean ensure Project Saved ( I Gantt Project project ) { if ( project . is Modified ( ) ) { UI Facade . Choice save Choice = my Workbench Facade . show Confirmation Dialog ( i18 n . get Text ( STRING ) , i18 n . get Text ( STRING ) ) ; if ( UI Facade . Choice . CANCEL == save Choice ) { return BOOL ... | @ Override public boolean ensureProjectSaved ( IGanttProject project ) { if ( project . isModified ( ) ) { UIFacade . Choice saveChoice = myWorkbenchFacade . showConfirmationDialog ( i18n . getText ( STRING ) , i18n . getText ( STRING ) ) ; if ( UIFacade . Choice . CANCEL == saveChoice ) { return _BOOL ; } if ( UIFacad... | 133 |
java-test-7758 | java | Where does search results show ? | within quotations | private void handle Html Search Quotations ( Page Wrapper page Wrapper , Request And Response request And Response , String query , String pane Id ) throws IO Exception , Servlet Exception { page Wrapper . add Page Intro Text ( servlet Text . intro Text Search Quotations ( BOOL ) , servlet Text . intro Text Search Quot... | private void handleHtmlSearchQuotations ( PageWrapper pageWrapper , RequestAndResponse requestAndResponse , String query , String paneId ) throws IOException , ServletException { pageWrapper . addPageIntroText ( servletText . introTextSearchQuotations ( _BOOL ) , servletText . introTextSearchQuotations ( _BOOL ) ) ; tr... | 275 |
java-test-7759 | java | How do styles apply on styleddocument ? | using regular expression | public static Collection < Message Fragment Style > colorize Regex ( Style style , String text , Pattern regex , int group ) { Array List < Message Fragment Style > list = new Array List < > ( ) ; Matcher matcher = regex . matcher ( text ) ; while ( matcher . find ( ) ) { int start = matcher . start ( group ) ; int end... | public static Collection < MessageFragmentStyle > colorizeRegex ( Style style , String text , Pattern regex , int group ) { ArrayList < MessageFragmentStyle > list = new ArrayList < > ( ) ; Matcher matcher = regex . matcher ( text ) ; while ( matcher . find ( ) ) { int start = matcher . start ( group ) ; int end = matc... | 127 |
java-test-7760 | java | What has the code ensure ? | the ties array has capacity for at least one more element | private final void add To Ties ( int id ) { if ( ties . length == numties ) { ties = Arrays . copy Of ( ties , ( ties . length << NUM ) + NUM ) ; } ties [ numties ] = id ; ++ numties ; } | private final void addToTies ( int id ) { if ( ties . length == numties ) { ties = Arrays . copyOf ( ties , ( ties . length << _NUM ) + _NUM ) ; } ties [ numties ] = id ; ++ numties ; } | 52 |
java-test-7761 | java | What do the ties array have ? | capacity for at least one more element | private final void add To Ties ( int id ) { if ( ties . length == numties ) { ties = Arrays . copy Of ( ties , ( ties . length << NUM ) + NUM ) ; } ties [ numties ] = id ; ++ numties ; } | private final void addToTies ( int id ) { if ( ties . length == numties ) { ties = Arrays . copyOf ( ties , ( ties . length << _NUM ) + _NUM ) ; } ties [ numties ] = id ; ++ numties ; } | 52 |
java-test-7762 | java | What has capacity for at least one more element ? | the ties array | private final void add To Ties ( int id ) { if ( ties . length == numties ) { ties = Arrays . copy Of ( ties , ( ties . length << NUM ) + NUM ) ; } ties [ numties ] = id ; ++ numties ; } | private final void addToTies ( int id ) { if ( ties . length == numties ) { ties = Arrays . copyOf ( ties , ( ties . length << _NUM ) + _NUM ) ; } ties [ numties ] = id ; ++ numties ; } | 52 |
java-test-7763 | java | What does the code create ? | a new random xid | public static Simple Xid create Random ( ) { int format Id = next . get And Increment ( ) ; byte [ ] bq = new byte [ MAXBQUALSIZE ] ; Math Utils . random Bytes ( bq ) ; byte [ ] gt = new byte [ MAXGTRIDSIZE ] ; Math Utils . random Bytes ( gt ) ; return new Simple Xid ( format Id , bq , gt ) ; } | public static SimpleXid createRandom ( ) { int formatId = next . getAndIncrement ( ) ; byte [ ] bq = new byte [ MAXBQUALSIZE ] ; MathUtils . randomBytes ( bq ) ; byte [ ] gt = new byte [ MAXGTRIDSIZE ] ; MathUtils . randomBytes ( gt ) ; return new SimpleXid ( formatId , bq , gt ) ; } | 75 |
java-test-7765 | java | What does the code delete ? | the database files | private void process ( String dir , String db , boolean quiet ) { Array List < String > files = File Lister . get Database Files ( dir , db , BOOL ) ; if ( files . size ( ) == NUM && ! quiet ) { print No Database Files Found ( dir , db ) ; } for ( String file Name : files ) { process ( file Name , quiet ) ; if ( ! quie... | private void process ( String dir , String db , boolean quiet ) { ArrayList < String > files = FileLister . getDatabaseFiles ( dir , db , _BOOL ) ; if ( files . size ( ) == _NUM && ! quiet ) { printNoDatabaseFilesFound ( dir , db ) ; } for ( String fileName : files ) { process ( fileName , quiet ) ; if ( ! quiet ) { ou... | 97 |
java-test-7766 | java | How does losses for the given credit portfolio calculate ? | using monte - carlo simulation | private double [ ] calculate Losses ( Credit [ ] portfolio , int horizon , int num ) { double [ ] losses = new double [ num ] ; for ( int i = NUM ; i < num ; i ++ ) for ( Credit crd : portfolio ) { int rem Days = Math . min ( crd . get Remaining Term ( ) , horizon ) ; if ( rnd Gen . next Double ( ) >= NUM - crd . get D... | private double [ ] calculateLosses ( Credit [ ] portfolio , int horizon , int num ) { double [ ] losses = new double [ num ] ; for ( int i = _NUM ; i < num ; i ++ ) for ( Credit crd : portfolio ) { int remDays = Math . min ( crd . getRemainingTerm ( ) , horizon ) ; if ( rndGen . nextDouble ( ) >= _NUM - crd . getDefaul... | 179 |
java-test-7769 | java | When is inactive considered ? | once written | private void write Attributes ( Output Node node ) throws Exception { Node Map < Output Node > map = node . get Attributes ( ) ; for ( String name : map ) { Output Node entry = map . get ( name ) ; String value = entry . get Value ( ) ; String prefix = entry . get Prefix ( verbose ) ; writer . write Attribute ( name , ... | private void writeAttributes ( OutputNode node ) throws Exception { NodeMap < OutputNode > map = node . getAttributes ( ) ; for ( String name : map ) { OutputNode entry = map . get ( name ) ; String value = entry . getValue ( ) ; String prefix = entry . getPrefix ( verbose ) ; writer . writeAttribute ( name , value , p... | 88 |
java-test-7770 | java | What is this used ? | to write the attributes of the specified node to the output | private void write Attributes ( Output Node node ) throws Exception { Node Map < Output Node > map = node . get Attributes ( ) ; for ( String name : map ) { Output Node entry = map . get ( name ) ; String value = entry . get Value ( ) ; String prefix = entry . get Prefix ( verbose ) ; writer . write Attribute ( name , ... | private void writeAttributes ( OutputNode node ) throws Exception { NodeMap < OutputNode > map = node . getAttributes ( ) ; for ( String name : map ) { OutputNode entry = map . get ( name ) ; String value = entry . getValue ( ) ; String prefix = entry . getPrefix ( verbose ) ; writer . writeAttribute ( name , value , p... | 88 |
java-test-7773 | java | What does the code return ? | a user - facing error page | private int process Error ( L10 N Message Impl e , String header Message Code , String debug Message , Object ... message Parameters ) throws Auth Login Exception { if ( null == e ) { return process Error ( header Message Code , debug Message , message Parameters ) ; } String header Message ; if ( null == header Messag... | private int processError ( L10NMessageImpl e , String headerMessageCode , String debugMessage , Object ... messageParameters ) throws AuthLoginException { if ( null == e ) { return processError ( headerMessageCode , debugMessage , messageParameters ) ; } String headerMessage ; if ( null == headerMessageCode ) { headerM... | 138 |
java-test-7774 | java | What does the code write if a throwable and debug message are provided ? | an error debug | private int process Error ( L10 N Message Impl e , String header Message Code , String debug Message , Object ... message Parameters ) throws Auth Login Exception { if ( null == e ) { return process Error ( header Message Code , debug Message , message Parameters ) ; } String header Message ; if ( null == header Messag... | private int processError ( L10NMessageImpl e , String headerMessageCode , String debugMessage , Object ... messageParameters ) throws AuthLoginException { if ( null == e ) { return processError ( headerMessageCode , debugMessage , messageParameters ) ; } String headerMessage ; if ( null == headerMessageCode ) { headerM... | 138 |
java-test-7775 | java | What is available locally ? | tesseract | public Extractor ( final Logger logger ) { this . logger = logger ; pdf Config . set Extract Inline Images ( BOOL ) ; pdf Config . set Extract Unique Inline Images Only ( BOOL ) ; ocr Config . set Timeout ( Math . to Int Exact ( DEFAULT OCR TIMEOUT . to ( Time Unit . SECONDS ) ) ) ; } | public Extractor ( final Logger logger ) { this . logger = logger ; pdfConfig . setExtractInlineImages ( _BOOL ) ; pdfConfig . setExtractUniqueInlineImagesOnly ( _BOOL ) ; ocrConfig . setTimeout ( Math . toIntExact ( DEFAULT_OCR_TIMEOUT . to ( TimeUnit . SECONDS ) ) ) ; } | 65 |
java-test-7776 | java | What does the code create ? | a new extractor , which will ocr images by default if tesseract is available locally , extract inline images from pdf files and ocr them and use pdfbox ' s non - sequential pdf parser | public Extractor ( final Logger logger ) { this . logger = logger ; pdf Config . set Extract Inline Images ( BOOL ) ; pdf Config . set Extract Unique Inline Images Only ( BOOL ) ; ocr Config . set Timeout ( Math . to Int Exact ( DEFAULT OCR TIMEOUT . to ( Time Unit . SECONDS ) ) ) ; } | public Extractor ( final Logger logger ) { this . logger = logger ; pdfConfig . setExtractInlineImages ( _BOOL ) ; pdfConfig . setExtractUniqueInlineImagesOnly ( _BOOL ) ; ocrConfig . setTimeout ( Math . toIntExact ( DEFAULT_OCR_TIMEOUT . to ( TimeUnit . SECONDS ) ) ) ; } | 65 |
java-test-7777 | java | What do a new extractor extract from pdf files ? | inline images | public Extractor ( final Logger logger ) { this . logger = logger ; pdf Config . set Extract Inline Images ( BOOL ) ; pdf Config . set Extract Unique Inline Images Only ( BOOL ) ; ocr Config . set Timeout ( Math . to Int Exact ( DEFAULT OCR TIMEOUT . to ( Time Unit . SECONDS ) ) ) ; } | public Extractor ( final Logger logger ) { this . logger = logger ; pdfConfig . setExtractInlineImages ( _BOOL ) ; pdfConfig . setExtractUniqueInlineImagesOnly ( _BOOL ) ; ocrConfig . setTimeout ( Math . toIntExact ( DEFAULT_OCR_TIMEOUT . to ( TimeUnit . SECONDS ) ) ) ; } | 65 |
java-test-7778 | java | What do a new extractor use ? | pdfbox ' s non - sequential pdf parser | public Extractor ( final Logger logger ) { this . logger = logger ; pdf Config . set Extract Inline Images ( BOOL ) ; pdf Config . set Extract Unique Inline Images Only ( BOOL ) ; ocr Config . set Timeout ( Math . to Int Exact ( DEFAULT OCR TIMEOUT . to ( Time Unit . SECONDS ) ) ) ; } | public Extractor ( final Logger logger ) { this . logger = logger ; pdfConfig . setExtractInlineImages ( _BOOL ) ; pdfConfig . setExtractUniqueInlineImagesOnly ( _BOOL ) ; ocrConfig . setTimeout ( Math . toIntExact ( DEFAULT_OCR_TIMEOUT . to ( TimeUnit . SECONDS ) ) ) ; } | 65 |
java-test-7782 | java | What does the code create ? | a sparseshortvector consisting of double values according to the specified mapping of indices and values | public Sparse Short Vector ( T Int Double Map values , int dimensionality ) throws Illegal Argument Exception { if ( values . size ( ) > dimensionality ) { throw new Illegal Argument Exception ( STRING ) ; } this . indexes = new int [ values . size ( ) ] ; this . values = new short [ values . size ( ) ] ; { T Int Doubl... | public SparseShortVector ( TIntDoubleMap values , int dimensionality ) throws IllegalArgumentException { if ( values . size ( ) > dimensionality ) { throw new IllegalArgumentException ( STRING ) ; } this . indexes = new int [ values . size ( ) ] ; this . values = new short [ values . size ( ) ] ; { TIntDoubleIterator i... | 215 |
java-test-7784 | java | What do a new keystore contain ? | the specified root certificate and private key | public static Key Store create Root Certificate Key Store ( String key Store Type , X509 Certificate certificate , String private Key Alias , Private Key private Key , String private Key Password , String provider ) { if ( private Key Password == null ) { throw new Illegal Argument Exception ( STRING ) ; } Key Store ne... | public static KeyStore createRootCertificateKeyStore ( String keyStoreType , X509Certificate certificate , String privateKeyAlias , PrivateKey privateKey , String privateKeyPassword , String provider ) { if ( privateKeyPassword == null ) { throw new IllegalArgumentException ( STRING ) ; } KeyStore newKeyStore = KeyStor... | 143 |
java-test-7785 | java | What does the code create ? | a new keystore containing the specified root certificate and private key | public static Key Store create Root Certificate Key Store ( String key Store Type , X509 Certificate certificate , String private Key Alias , Private Key private Key , String private Key Password , String provider ) { if ( private Key Password == null ) { throw new Illegal Argument Exception ( STRING ) ; } Key Store ne... | public static KeyStore createRootCertificateKeyStore ( String keyStoreType , X509Certificate certificate , String privateKeyAlias , PrivateKey privateKey , String privateKeyPassword , String provider ) { if ( privateKeyPassword == null ) { throw new IllegalArgumentException ( STRING ) ; } KeyStore newKeyStore = KeyStor... | 143 |
java-test-7786 | java | What is containing the specified root certificate and private key ? | a new keystore | public static Key Store create Root Certificate Key Store ( String key Store Type , X509 Certificate certificate , String private Key Alias , Private Key private Key , String private Key Password , String provider ) { if ( private Key Password == null ) { throw new Illegal Argument Exception ( STRING ) ; } Key Store ne... | public static KeyStore createRootCertificateKeyStore ( String keyStoreType , X509Certificate certificate , String privateKeyAlias , PrivateKey privateKey , String privateKeyPassword , String provider ) { if ( privateKeyPassword == null ) { throw new IllegalArgumentException ( STRING ) ; } KeyStore newKeyStore = KeyStor... | 143 |
java-test-7787 | java | Where does the code draw a cursor whenever the mouse is hovering over the panel ? | on the panel | private void draw Cursor ( Graphics 2 D graphics ) { if ( m Cursor Visible ) { draw Frequency Line ( graphics , m Cursor Location . x , m Color Spectrum Cursor ) ; String frequency = CURSOR FORMAT . format ( get Frequency From Axis ( m Cursor Location . get X ( ) ) / NUM ) ; graphics . draw String ( frequency , m Curso... | private void drawCursor ( Graphics2D graphics ) { if ( mCursorVisible ) { drawFrequencyLine ( graphics , mCursorLocation . x , mColorSpectrumCursor ) ; String frequency = CURSOR_FORMAT . format ( getFrequencyFromAxis ( mCursorLocation . getX ( ) ) / _NUM ) ; graphics . drawString ( frequency , mCursorLocation . x + _NU... | 134 |
java-test-7788 | java | When does the code draw a cursor on the panel ? | whenever the mouse is hovering over the panel | private void draw Cursor ( Graphics 2 D graphics ) { if ( m Cursor Visible ) { draw Frequency Line ( graphics , m Cursor Location . x , m Color Spectrum Cursor ) ; String frequency = CURSOR FORMAT . format ( get Frequency From Axis ( m Cursor Location . get X ( ) ) / NUM ) ; graphics . draw String ( frequency , m Curso... | private void drawCursor ( Graphics2D graphics ) { if ( mCursorVisible ) { drawFrequencyLine ( graphics , mCursorLocation . x , mColorSpectrumCursor ) ; String frequency = CURSOR_FORMAT . format ( getFrequencyFromAxis ( mCursorLocation . getX ( ) ) / _NUM ) ; graphics . drawString ( frequency , mCursorLocation . x + _NU... | 134 |
java-test-7789 | java | What does the code remove ? | all existing containers children of the given container | public void flatten Hierarchy ( Constraint Widget Container root ) { Array List < Constraint Widget Container > containers = gather Containers ( root ) ; while ( containers . size ( ) > NUM ) { for ( Constraint Widget Container container : containers ) { remove Container ( container ) ; } containers = gather Containers... | public void flattenHierarchy ( ConstraintWidgetContainer root ) { ArrayList < ConstraintWidgetContainer > containers = gatherContainers ( root ) ; while ( containers . size ( ) > _NUM ) { for ( ConstraintWidgetContainer container : containers ) { removeContainer ( container ) ; } containers = gatherContainers ( root ) ... | 64 |
java-test-7790 | java | What does the code flatten ? | the hierachy | public void flatten Hierarchy ( Constraint Widget Container root ) { Array List < Constraint Widget Container > containers = gather Containers ( root ) ; while ( containers . size ( ) > NUM ) { for ( Constraint Widget Container container : containers ) { remove Container ( container ) ; } containers = gather Containers... | public void flattenHierarchy ( ConstraintWidgetContainer root ) { ArrayList < ConstraintWidgetContainer > containers = gatherContainers ( root ) ; while ( containers . size ( ) > _NUM ) { for ( ConstraintWidgetContainer container : containers ) { removeContainer ( container ) ; } containers = gatherContainers ( root ) ... | 64 |
java-test-7791 | java | For what purpose did a new extractor that contain ? | as part of the request | public Access Token Header Extractor ( Container Request Context context , String header ) { this . sm = String Manager . get Manager ( Config . LOCALIZATION PACKAGE NAME ) ; String authorization Header = context . get Header String ( header ) ; if ( authorization Header != null && ! authorization Header . is Empty ( )... | public AccessTokenHeaderExtractor ( ContainerRequestContext context , String header ) { this . sm = StringManager . getManager ( Config . LOCALIZATION_PACKAGE_NAME ) ; String authorizationHeader = context . getHeaderString ( header ) ; if ( authorizationHeader != null && ! authorizationHeader . isEmpty ( ) ) { this . m... | 77 |
java-test-7792 | java | How is response - value calculated as above where ? | using the values sent in step two | private void validate Response Value ( byte [ ] from Server ) throws Sasl Exception { if ( from Server == null ) { throw new Sasl Exception ( STRING + STRING ) ; } try { byte [ ] expected = generate Response Value ( STRING , digest Uri , negotiated Qop , username , negotiated Realm , passwd , nonce , cnonce , nonce Cou... | private void validateResponseValue ( byte [ ] fromServer ) throws SaslException { if ( fromServer == null ) { throw new SaslException ( STRING + STRING ) ; } try { byte [ ] expected = generateResponseValue ( STRING , digestUri , negotiatedQop , username , negotiatedRealm , passwd , nonce , cnonce , nonceCount , authzid... | 135 |
java-test-7793 | java | What does step three [ server send ? | a message formatted as follows : response - auth = " rspauth " " = " response - value where response - value is calculated as above , using the values sent in step two , except that if qop is " auth " , then a2 is a2 = { " : " , digest - uri - value } and if qop is " auth - int " or " auth - conf " then a2 is a2 = { " ... | private void validate Response Value ( byte [ ] from Server ) throws Sasl Exception { if ( from Server == null ) { throw new Sasl Exception ( STRING + STRING ) ; } try { byte [ ] expected = generate Response Value ( STRING , digest Uri , negotiated Qop , username , negotiated Realm , passwd , nonce , cnonce , nonce Cou... | private void validateResponseValue ( byte [ ] fromServer ) throws SaslException { if ( fromServer == null ) { throw new SaslException ( STRING + STRING ) ; } try { byte [ ] expected = generateResponseValue ( STRING , digestUri , negotiatedQop , username , negotiatedRealm , passwd , nonce , cnonce , nonceCount , authzid... | 135 |
java-test-7794 | java | What is calculated as above where ? | response - value | private void validate Response Value ( byte [ ] from Server ) throws Sasl Exception { if ( from Server == null ) { throw new Sasl Exception ( STRING + STRING ) ; } try { byte [ ] expected = generate Response Value ( STRING , digest Uri , negotiated Qop , username , negotiated Realm , passwd , nonce , cnonce , nonce Cou... | private void validateResponseValue ( byte [ ] fromServer ) throws SaslException { if ( fromServer == null ) { throw new SaslException ( STRING + STRING ) ; } try { byte [ ] expected = generateResponseValue ( STRING , digestUri , negotiatedQop , username , negotiatedRealm , passwd , nonce , cnonce , nonceCount , authzid... | 135 |
java-test-7795 | java | What sends a message formatted as follows : response - auth = " rspauth " " = " response - value where response - value is calculated as above , using the values sent in step two , except that if qop is " auth " , then a2 is a2 = { " : " , digest - uri - value } and if qop is " auth - int " or " auth - conf " then a2 i... | step three [ server | private void validate Response Value ( byte [ ] from Server ) throws Sasl Exception { if ( from Server == null ) { throw new Sasl Exception ( STRING + STRING ) ; } try { byte [ ] expected = generate Response Value ( STRING , digest Uri , negotiated Qop , username , negotiated Realm , passwd , nonce , cnonce , nonce Cou... | private void validateResponseValue ( byte [ ] fromServer ) throws SaslException { if ( fromServer == null ) { throw new SaslException ( STRING + STRING ) ; } try { byte [ ] expected = generateResponseValue ( STRING , digestUri , negotiatedQop , username , negotiatedRealm , passwd , nonce , cnonce , nonceCount , authzid... | 135 |
java-test-7796 | java | What did the values send ? | in step two | private void validate Response Value ( byte [ ] from Server ) throws Sasl Exception { if ( from Server == null ) { throw new Sasl Exception ( STRING + STRING ) ; } try { byte [ ] expected = generate Response Value ( STRING , digest Uri , negotiated Qop , username , negotiated Realm , passwd , nonce , cnonce , nonce Cou... | private void validateResponseValue ( byte [ ] fromServer ) throws SaslException { if ( fromServer == null ) { throw new SaslException ( STRING + STRING ) ; } try { byte [ ] expected = generateResponseValue ( STRING , digestUri , negotiatedQop , username , negotiatedRealm , passwd , nonce , cnonce , nonceCount , authzid... | 135 |
java-test-7798 | java | How is a type derived from another ? | by any combination of restriction , list ir union | private boolean is Derived By Any ( String ancestor NS , String ancestor Name , int derivation Method , XS Type Definition type ) { XS Type Definition old Type = null ; boolean derived From = BOOL ; while ( type != null && type != old Type ) { if ( ( ancestor Name . equals ( type . get Name ( ) ) ) && ( ( ancestor NS =... | private boolean isDerivedByAny ( String ancestorNS , String ancestorName , int derivationMethod , XSTypeDefinition type ) { XSTypeDefinition oldType = null ; boolean derivedFrom = _BOOL ; while ( type != null && type != oldType ) { if ( ( ancestorName . equals ( type . getName ( ) ) ) && ( ( ancestorNS == null && type ... | 186 |
java-test-7799 | java | What is encoding in every row ? | computing checksum | void STAR encoding diag 1 ( ) { int i , j , stripe , k ; char [ ] [ ] tmp ; tmp = new char [ block nbr + NUM ] [ block size ] ; for ( stripe = NUM ; stripe < block nbr + NUM ; stripe ++ ) { for ( i = NUM ; i < data disk nbr ; i ++ ) { for ( j = NUM ; j < block size ; j ++ ) { k = ( stripe - i + p ) % p ; if ( k < block... | void STAR_encoding_diag1 ( ) { int i , j , stripe , k ; char [ ] [ ] tmp ; tmp = new char [ block_nbr + _NUM ] [ block_size ] ; for ( stripe = _NUM ; stripe < block_nbr + _NUM ; stripe ++ ) { for ( i = _NUM ; i < data_disk_nbr ; i ++ ) { for ( j = _NUM ; j < block_size ; j ++ ) { k = ( stripe - i + p ) % p ; if ( k < b... | 250 |
java-test-7800 | java | Where do computing checksum encode ? | in every row | void STAR encoding diag 1 ( ) { int i , j , stripe , k ; char [ ] [ ] tmp ; tmp = new char [ block nbr + NUM ] [ block size ] ; for ( stripe = NUM ; stripe < block nbr + NUM ; stripe ++ ) { for ( i = NUM ; i < data disk nbr ; i ++ ) { for ( j = NUM ; j < block size ; j ++ ) { k = ( stripe - i + p ) % p ; if ( k < block... | void STAR_encoding_diag1 ( ) { int i , j , stripe , k ; char [ ] [ ] tmp ; tmp = new char [ block_nbr + _NUM ] [ block_size ] ; for ( stripe = _NUM ; stripe < block_nbr + _NUM ; stripe ++ ) { for ( i = _NUM ; i < data_disk_nbr ; i ++ ) { for ( j = _NUM ; j < block_size ; j ++ ) { k = ( stripe - i + p ) % p ; if ( k < b... | 250 |
java-test-7803 | java | What exists in the \ \ software \ \ microsoft \ \ windows \ \ currentversion \ \ explorer \ \ fileexts in windows 2000 ? | the specified file extension | public static boolean is Win 2 k User Defined File Ext Exist ( String file Ext ) { boolean win 2 k File Defined By User = BOOL ; if ( os Name . equals Ignore Case ( WIN 2 KOS ) ) { String file Ext Key = USER FILE EXT KEY PREFIX + STRING + file Ext ; win 2 k File Defined By User = is Sub Key Exist ( file Ext Key , USER ... | public static boolean isWin2kUserDefinedFileExtExist ( String fileExt ) { boolean win2kFileDefinedByUser = _BOOL ; if ( osName . equalsIgnoreCase ( WIN2KOS ) ) { String fileExtKey = USER_FILE_EXT_KEY_PREFIX + STRING + fileExt ; win2kFileDefinedByUser = isSubKeyExist ( fileExtKey , USER_LEVEL ) ; } return win2kFileDefin... | 92 |
java-test-7804 | java | Where does the specified file extension exist ? | in the \ \ software \ \ microsoft \ \ windows \ \ currentversion \ \ explorer \ \ fileexts in windows 2000 | public static boolean is Win 2 k User Defined File Ext Exist ( String file Ext ) { boolean win 2 k File Defined By User = BOOL ; if ( os Name . equals Ignore Case ( WIN 2 KOS ) ) { String file Ext Key = USER FILE EXT KEY PREFIX + STRING + file Ext ; win 2 k File Defined By User = is Sub Key Exist ( file Ext Key , USER ... | public static boolean isWin2kUserDefinedFileExtExist ( String fileExt ) { boolean win2kFileDefinedByUser = _BOOL ; if ( osName . equalsIgnoreCase ( WIN2KOS ) ) { String fileExtKey = USER_FILE_EXT_KEY_PREFIX + STRING + fileExt ; win2kFileDefinedByUser = isSubKeyExist ( fileExtKey , USER_LEVEL ) ; } return win2kFileDefin... | 92 |
java-test-7813 | java | What does the code bind to the cloud object so its values automatically update in the cloud object ? | a ui tree | public void bind Tree ( Container ui , int defer , boolean object Lead ) { int component Count = ui . get Component Count ( ) ; for ( int iter = NUM ; iter < component Count ; iter ++ ) { Component c = ui . get Component At ( iter ) ; if ( c instanceof Container ) { bind Tree ( ( Container ) c , defer , object Lead ) ;... | public void bindTree ( Container ui , int defer , boolean objectLead ) { int componentCount = ui . getComponentCount ( ) ; for ( int iter = _NUM ; iter < componentCount ; iter ++ ) { Component c = ui . getComponentAt ( iter ) ; if ( c instanceof Container ) { bindTree ( ( Container ) c , defer , objectLead ) ; continue... | 148 |
java-test-7814 | java | For what purpose does the code bind a ui tree to the cloud object ? | so its values automatically update in the cloud object | public void bind Tree ( Container ui , int defer , boolean object Lead ) { int component Count = ui . get Component Count ( ) ; for ( int iter = NUM ; iter < component Count ; iter ++ ) { Component c = ui . get Component At ( iter ) ; if ( c instanceof Container ) { bind Tree ( ( Container ) c , defer , object Lead ) ;... | public void bindTree ( Container ui , int defer , boolean objectLead ) { int componentCount = ui . getComponentCount ( ) ; for ( int iter = _NUM ; iter < componentCount ; iter ++ ) { Component c = ui . getComponentAt ( iter ) ; if ( c instanceof Container ) { bindTree ( ( Container ) c , defer , objectLead ) ; continue... | 148 |
java-test-7815 | java | What update in the cloud object ? | its values | public void bind Tree ( Container ui , int defer , boolean object Lead ) { int component Count = ui . get Component Count ( ) ; for ( int iter = NUM ; iter < component Count ; iter ++ ) { Component c = ui . get Component At ( iter ) ; if ( c instanceof Container ) { bind Tree ( ( Container ) c , defer , object Lead ) ;... | public void bindTree ( Container ui , int defer , boolean objectLead ) { int componentCount = ui . getComponentCount ( ) ; for ( int iter = _NUM ; iter < componentCount ; iter ++ ) { Component c = ui . getComponentAt ( iter ) ; if ( c instanceof Container ) { bindTree ( ( Container ) c , defer , objectLead ) ; continue... | 148 |
java-test-7816 | java | Where does its values update automatically ? | in the cloud object | public void bind Tree ( Container ui , int defer , boolean object Lead ) { int component Count = ui . get Component Count ( ) ; for ( int iter = NUM ; iter < component Count ; iter ++ ) { Component c = ui . get Component At ( iter ) ; if ( c instanceof Container ) { bind Tree ( ( Container ) c , defer , object Lead ) ;... | public void bindTree ( Container ui , int defer , boolean objectLead ) { int componentCount = ui . getComponentCount ( ) ; for ( int iter = _NUM ; iter < componentCount ; iter ++ ) { Component c = ui . getComponentAt ( iter ) ; if ( c instanceof Container ) { bindTree ( ( Container ) c , defer , objectLead ) ; continue... | 148 |
java-test-7818 | java | What do an error indicate ? | a drawable that exceeds project specifications | private void show Drawable Error ( ) { Dialog dialog = new Dialog ( STRING , get Skin ( ) ) ; Label label = new Label ( STRING , get Skin ( ) ) ; label . set Alignment ( Align . center ) ; dialog . text ( label ) ; dialog . button ( STRING ) ; dialog . show ( get Stage ( ) ) ; } | private void showDrawableError ( ) { Dialog dialog = new Dialog ( STRING , getSkin ( ) ) ; Label label = new Label ( STRING , getSkin ( ) ) ; label . setAlignment ( Align . center ) ; dialog . text ( label ) ; dialog . button ( STRING ) ; dialog . show ( getStage ( ) ) ; } | 71 |
java-test-7819 | java | What does a drawable exceed ? | project specifications | private void show Drawable Error ( ) { Dialog dialog = new Dialog ( STRING , get Skin ( ) ) ; Label label = new Label ( STRING , get Skin ( ) ) ; label . set Alignment ( Align . center ) ; dialog . text ( label ) ; dialog . button ( STRING ) ; dialog . show ( get Stage ( ) ) ; } | private void showDrawableError ( ) { Dialog dialog = new Dialog ( STRING , getSkin ( ) ) ; Label label = new Label ( STRING , getSkin ( ) ) ; label . setAlignment ( Align . center ) ; dialog . text ( label ) ; dialog . button ( STRING ) ; dialog . show ( getStage ( ) ) ; } | 71 |
java-test-7820 | java | What does this function performs ? | variable - name substitutions | protected String process Substitution ( String substitution Rule , String description , int start Pos ) { String replace ; String replace With ; int equal Pos = substitution Rule . index Of ( STRING ) ; replace = substitution Rule . substring ( NUM , equal Pos ) ; replace With = substitution Rule . substring ( equal Po... | protected String processSubstitution ( String substitutionRule , String description , int startPos ) { String replace ; String replaceWith ; int equalPos = substitutionRule . indexOf ( STRING ) ; replace = substitutionRule . substring ( _NUM , equalPos ) ; replaceWith = substitutionRule . substring ( equalPos + _NUM ) ... | 402 |
java-test-7821 | java | What does it do first ? | syntax checking on the variable - name definition | protected String process Substitution ( String substitution Rule , String description , int start Pos ) { String replace ; String replace With ; int equal Pos = substitution Rule . index Of ( STRING ) ; replace = substitution Rule . substring ( NUM , equal Pos ) ; replace With = substitution Rule . substring ( equal Po... | protected String processSubstitution ( String substitutionRule , String description , int startPos ) { String replace ; String replaceWith ; int equalPos = substitutionRule . indexOf ( STRING ) ; replace = substitutionRule . substring ( _NUM , equalPos ) ; replaceWith = substitutionRule . substring ( equalPos + _NUM ) ... | 402 |
java-test-7828 | java | Where does tostring overid ? | in experiment | @ Override public String to String ( ) { String result = m base Experiment . to String ( ) ; result += STRING ; for ( int i = NUM ; i < m remote Hosts . size ( ) ; i ++ ) { result += ( ( String ) m remote Hosts . element At ( i ) ) + STRING ; } return result ; } | @ Override public String toString ( ) { String result = m_baseExperiment . toString ( ) ; result += STRING ; for ( int i = _NUM ; i < m_remoteHosts . size ( ) ; i ++ ) { result += ( ( String ) m_remoteHosts . elementAt ( i ) ) + STRING ; } return result ; } | 70 |
java-test-7830 | java | What does the code get ? | the character at the given position | public char char At ( int pos ) { if ( pos < get Leading Gaps ( ) || pos >= get Length ( ) - get Trailing Gaps ( ) ) return NUM ; else if ( alignment == null || ! alignment . is Translate ( ) ) return block . char At ( pos - get Leading Gaps ( ) ) ; else { int which = pos - get Leading Gaps ( ) ; if ( ( which % NUM ) =... | public char charAt ( int pos ) { if ( pos < getLeadingGaps ( ) || pos >= getLength ( ) - getTrailingGaps ( ) ) return _NUM ; else if ( alignment == null || ! alignment . isTranslate ( ) ) return block . charAt ( pos - getLeadingGaps ( ) ) ; else { int which = pos - getLeadingGaps ( ) ; if ( ( which % _NUM ) == _NUM ) {... | 160 |
java-test-7831 | java | What does the code resolve ? | the input from the given retrieval method | private static XML Signature Input resolve Input ( Retrieval Method rm , String base URI , boolean secure Validation ) throws XML Security Exception { Attr uri = rm . get URI Attr ( ) ; Transforms transforms = rm . get Transforms ( ) ; Resource Resolver res Res = Resource Resolver . get Instance ( uri , base URI , secu... | private static XMLSignatureInput resolveInput ( RetrievalMethod rm , String baseURI , boolean secureValidation ) throws XMLSecurityException { Attr uri = rm . getURIAttr ( ) ; Transforms transforms = rm . getTransforms ( ) ; ResourceResolver resRes = ResourceResolver . getInstance ( uri , baseURI , secureValidation ) ;... | 144 |
java-test-7832 | java | For what purpose does the code extend the basic set configured by the javamail library ? | to add mappings for atom , rss , and json application types | public static void load Mime Mappings ( ) { final String [ ] CONTENT TYPES = new String [ ] { STRING , STRING , STRING } ; final String CONTENT HANDLER = STRING + STRING ; Command Map command Map = Command Map . get Default Command Map ( ) ; if ( command Map instanceof Mailcap Command Map ) { Mailcap Command Map mailca... | public static void loadMimeMappings ( ) { final String [ ] CONTENT_TYPES = new String [ ] { STRING , STRING , STRING } ; final String CONTENT_HANDLER = STRING + STRING ; CommandMap commandMap = CommandMap . getDefaultCommandMap ( ) ; if ( commandMap instanceof MailcapCommandMap ) { MailcapCommandMap mailcapMap = ( Mail... | 157 |
java-test-7833 | java | What does the code extend to add mappings for atom , rss , and json application types ? | the basic set configured by the javamail library | public static void load Mime Mappings ( ) { final String [ ] CONTENT TYPES = new String [ ] { STRING , STRING , STRING } ; final String CONTENT HANDLER = STRING + STRING ; Command Map command Map = Command Map . get Default Command Map ( ) ; if ( command Map instanceof Mailcap Command Map ) { Mailcap Command Map mailca... | public static void loadMimeMappings ( ) { final String [ ] CONTENT_TYPES = new String [ ] { STRING , STRING , STRING } ; final String CONTENT_HANDLER = STRING + STRING ; CommandMap commandMap = CommandMap . getDefaultCommandMap ( ) ; if ( commandMap instanceof MailcapCommandMap ) { MailcapCommandMap mailcapMap = ( Mail... | 157 |
java-test-7834 | java | What does the code load ? | the default set of java activation mime mappings required by the gdata library | public static void load Mime Mappings ( ) { final String [ ] CONTENT TYPES = new String [ ] { STRING , STRING , STRING } ; final String CONTENT HANDLER = STRING + STRING ; Command Map command Map = Command Map . get Default Command Map ( ) ; if ( command Map instanceof Mailcap Command Map ) { Mailcap Command Map mailca... | public static void loadMimeMappings ( ) { final String [ ] CONTENT_TYPES = new String [ ] { STRING , STRING , STRING } ; final String CONTENT_HANDLER = STRING + STRING ; CommandMap commandMap = CommandMap . getDefaultCommandMap ( ) ; if ( commandMap instanceof MailcapCommandMap ) { MailcapCommandMap mailcapMap = ( Mail... | 157 |
java-test-7835 | java | What does this stop in the pool ? | all the threads , active and idle | public final void destroy ( ) { stop Idle Threads ( ) ; try { Thread . sleep ( NUM ) ; } catch ( Interrupted Exception e ) { } synchronized ( all Thread List ) { int num Threads = all Thread List . length ; int i = NUM ; while ( i < num Threads ) { IPS Thread ips Thread = all Thread List [ i ] ; all Thread List [ i ++ ... | public final void destroy ( ) { stopIdleThreads ( ) ; try { Thread . sleep ( _NUM ) ; } catch ( InterruptedException e ) { } synchronized ( allThreadList ) { int numThreads = allThreadList . length ; int i = _NUM ; while ( i < numThreads ) { IPSThread ipsThread = allThreadList [ i ] ; allThreadList [ i ++ ] = null ; if... | 105 |
java-test-7836 | java | How do the reference points sort ? | by distance to the query object | protected static < O > Double Int Pair [ ] rank Reference Points ( Distance Query < O > distance Query , O obj , Array DBI Ds referencepoints ) { Double Int Pair [ ] priority = new Double Int Pair [ referencepoints . size ( ) ] ; for ( DBID Array Iter iter = referencepoints . iter ( ) ; iter . valid ( ) ; iter . advanc... | protected static < O > DoubleIntPair [ ] rankReferencePoints ( DistanceQuery < O > distanceQuery , O obj , ArrayDBIDs referencepoints ) { DoubleIntPair [ ] priority = new DoubleIntPair [ referencepoints . size ( ) ] ; for ( DBIDArrayIter iter = referencepoints . iter ( ) ; iter . valid ( ) ; iter . advance ( ) ) { fina... | 128 |
java-test-7837 | java | What does the code add to the pending queue ? | a notification task | private void add Notify ( Array List notifies , Map groups Map , boolean discard ) { synchronized ( pending Notifies ) { pending Notifies . add Last ( new Notify Task ( notifies , groups Map , discard ) ) ; if ( notifier Thread == null ) { notifier Thread = new Notifier ( ) ; notifier Thread . start ( ) ; } } } | private void addNotify ( ArrayList notifies , Map groupsMap , boolean discard ) { synchronized ( pendingNotifies ) { pendingNotifies . addLast ( new NotifyTask ( notifies , groupsMap , discard ) ) ; if ( notifierThread == null ) { notifierThread = new Notifier ( ) ; notifierThread . start ( ) ; } } } | 68 |
java-test-7838 | java | What does the code start if one isn ' t already running ? | an instance of the notifier thread | private void add Notify ( Array List notifies , Map groups Map , boolean discard ) { synchronized ( pending Notifies ) { pending Notifies . add Last ( new Notify Task ( notifies , groups Map , discard ) ) ; if ( notifier Thread == null ) { notifier Thread = new Notifier ( ) ; notifier Thread . start ( ) ; } } } | private void addNotify ( ArrayList notifies , Map groupsMap , boolean discard ) { synchronized ( pendingNotifies ) { pendingNotifies . addLast ( new NotifyTask ( notifies , groupsMap , discard ) ) ; if ( notifierThread == null ) { notifierThread = new Notifier ( ) ; notifierThread . start ( ) ; } } } | 68 |
java-test-7840 | java | How does the code compress them ? | using ttt codes | public static void compress ( ) { String s = Binary Std In . read String ( ) ; char [ ] input = s . to Char Array ( ) ; int [ ] freq = new int [ R ] ; for ( int i = NUM ; i < input . length ; i ++ ) freq [ input [ i ] ] ++ ; Node root = build Trie ( freq ) ; String [ ] st = new String [ R ] ; build Code ( st , root , S... | public static void compress ( ) { String s = BinaryStdIn . readString ( ) ; char [ ] input = s . toCharArray ( ) ; int [ ] freq = new int [ R ] ; for ( int i = _NUM ; i < input . length ; i ++ ) freq [ input [ i ] ] ++ ; Node root = buildTrie ( freq ) ; String [ ] st = new String [ R ] ; buildCode ( st , root , STRING ... | 230 |
java-test-7842 | java | What does the code do ? | a subtree leap move | public double do Operation ( ) throws Operator Failed Exception { double logq ; final double delta = get Delta ( ) ; final Node Ref root = tree . get Root ( ) ; Node Ref node ; do { node = tree . get Node ( Math Utils . next Int ( tree . get Node Count ( ) ) ) ; } while ( node == root ) ; final Node Ref parent = tree .... | public double doOperation ( ) throws OperatorFailedException { double logq ; final double delta = getDelta ( ) ; final NodeRef root = tree . getRoot ( ) ; NodeRef node ; do { node = tree . getNode ( MathUtils . nextInt ( tree . getNodeCount ( ) ) ) ; } while ( node == root ) ; final NodeRef parent = tree . getParent ( ... | 620 |
java-test-7843 | java | How did the continued fraction way of computing base on the book " numerical recipes " ? | loosely | public static double regularized Gamma Q ( final double a , final double x ) { if ( Double . is Na N ( a ) || Double . is Na N ( x ) || ( a <= NUM ) || ( x < NUM ) ) { return Double . Na N ; } if ( x == NUM ) { return NUM ; } if ( x < a + NUM ) { return NUM - regularized Gamma P ( a , x ) ; } final double FPMIN = Doubl... | public static double regularizedGammaQ ( final double a , final double x ) { if ( Double . isNaN ( a ) || Double . isNaN ( x ) || ( a <= _NUM ) || ( x < _NUM ) ) { return Double . NaN ; } if ( x == _NUM ) { return _NUM ; } if ( x < a + _NUM ) { return _NUM - regularizedGammaP ( a , x ) ; } final double FPMIN = Double .... | 273 |
java-test-7844 | java | Why does the continued fraction way of computing , based loosely on the book " numerical recipes " include the regularized gamma function q ( a , x ) = 1 - p ( a , x ) . ? | since we reimplemented this in our coding style , not literally . todo : find " the " most accurate version of this | public static double regularized Gamma Q ( final double a , final double x ) { if ( Double . is Na N ( a ) || Double . is Na N ( x ) || ( a <= NUM ) || ( x < NUM ) ) { return Double . Na N ; } if ( x == NUM ) { return NUM ; } if ( x < a + NUM ) { return NUM - regularized Gamma P ( a , x ) ; } final double FPMIN = Doubl... | public static double regularizedGammaQ ( final double a , final double x ) { if ( Double . isNaN ( a ) || Double . isNaN ( x ) || ( a <= _NUM ) || ( x < _NUM ) ) { return Double . NaN ; } if ( x == _NUM ) { return _NUM ; } if ( x < a + _NUM ) { return _NUM - regularizedGammaP ( a , x ) ; } final double FPMIN = Double .... | 273 |
java-test-7845 | java | How does we reimplement this ? | in our coding style , not literally | public static double regularized Gamma Q ( final double a , final double x ) { if ( Double . is Na N ( a ) || Double . is Na N ( x ) || ( a <= NUM ) || ( x < NUM ) ) { return Double . Na N ; } if ( x == NUM ) { return NUM ; } if ( x < a + NUM ) { return NUM - regularized Gamma P ( a , x ) ; } final double FPMIN = Doubl... | public static double regularizedGammaQ ( final double a , final double x ) { if ( Double . isNaN ( a ) || Double . isNaN ( x ) || ( a <= _NUM ) || ( x < _NUM ) ) { return Double . NaN ; } if ( x == _NUM ) { return _NUM ; } if ( x < a + _NUM ) { return _NUM - regularizedGammaP ( a , x ) ; } final double FPMIN = Double .... | 273 |
java-test-7846 | java | What does the code add ? | an action that is also represented in the main menu | private void add Menu Action ( String id , String label , String menu Label , int mnemonic , Action action ) { action . put Value ( Action . NAME , menu Label ) ; action . put Value ( Action . MNEMONIC KEY , mnemonic ) ; menu . set Action ( id , action ) ; hotkey Manager . register Action ( id , label , action ) ; } | private void addMenuAction ( String id , String label , String menuLabel , int mnemonic , Action action ) { action . putValue ( Action . NAME , menuLabel ) ; action . putValue ( Action . MNEMONIC_KEY , mnemonic ) ; menu . setAction ( id , action ) ; hotkeyManager . registerAction ( id , label , action ) ; } | 73 |
java-test-7847 | java | Where is an action represented ? | in the main menu | private void add Menu Action ( String id , String label , String menu Label , int mnemonic , Action action ) { action . put Value ( Action . NAME , menu Label ) ; action . put Value ( Action . MNEMONIC KEY , mnemonic ) ; menu . set Action ( id , action ) ; hotkey Manager . register Action ( id , label , action ) ; } | private void addMenuAction ( String id , String label , String menuLabel , int mnemonic , Action action ) { action . putValue ( Action . NAME , menuLabel ) ; action . putValue ( Action . MNEMONIC_KEY , mnemonic ) ; menu . setAction ( id , action ) ; hotkeyManager . registerAction ( id , label , action ) ; } | 73 |
java-test-7848 | java | What did implementors need ? | to decide when they are ready to report the state change to interested objects | private void call State Listeners ( ) { State Type new State = state . get ( ) ; Array List < Activity State Listener > list = state Listeners . get ( new State ) ; if ( list != null ) { for ( Activity State Listener listener : list ) { listener . state Changed ( new State , this ) ; } } } | private void callStateListeners ( ) { StateType newState = state . get ( ) ; ArrayList < ActivityStateListener > list = stateListeners . get ( newState ) ; if ( list != null ) { for ( ActivityStateListener listener : list ) { listener . stateChanged ( newState , this ) ; } } } | 68 |
java-test-7849 | java | What does the code append ? | an undo log entry to the log | void add ( Undo Log Record entry ) { records . add ( entry ) ; if ( large Transactions ) { memory Undo ++ ; if ( memory Undo > database . get Max Memory Undo ( ) && database . is Persistent ( ) && ! database . is Multi Version ( ) ) { if ( file == null ) { String file Name = database . create Temp File ( ) ; file = dat... | void add ( UndoLogRecord entry ) { records . add ( entry ) ; if ( largeTransactions ) { memoryUndo ++ ; if ( memoryUndo > database . getMaxMemoryUndo ( ) && database . isPersistent ( ) && ! database . isMultiVersion ( ) ) { if ( file == null ) { String fileName = database . createTempFile ( ) ; file = database . openFi... | 470 |
java-test-7850 | java | How does the attribute set ? | with the given index to null | @ Override public synchronized void remove Attribute ( int index ) { Attribute a = attributes . get ( index ) ; if ( a == null ) { return ; } attributes . set ( index , null ) ; unused Column List . add ( index ) ; } | @ Override public synchronized void removeAttribute ( int index ) { Attribute a = attributes . get ( index ) ; if ( a == null ) { return ; } attributes . set ( index , null ) ; unusedColumnList . add ( index ) ; } | 51 |
java-test-7851 | java | What does an operator generate ? | intermediate attributes , like a validation chain or a feature generator | @ Override public synchronized void remove Attribute ( int index ) { Attribute a = attributes . get ( index ) ; if ( a == null ) { return ; } attributes . set ( index , null ) ; unused Column List . add ( index ) ; } | @ Override public synchronized void removeAttribute ( int index ) { Attribute a = attributes . get ( index ) ; if ( a == null ) { return ; } attributes . set ( index , null ) ; unusedColumnList . add ( index ) ; } | 51 |
java-test-7852 | java | What contains a reference to this column ? | no other example set | @ Override public synchronized void remove Attribute ( int index ) { Attribute a = attributes . get ( index ) ; if ( a == null ) { return ; } attributes . set ( index , null ) ; unused Column List . add ( index ) ; } | @ Override public synchronized void removeAttribute ( int index ) { Attribute a = attributes . get ( index ) ; if ( a == null ) { return ; } attributes . set ( index , null ) ; unusedColumnList . add ( index ) ; } | 51 |
java-test-7853 | java | What did no other example set contain ? | a reference to this column | @ Override public synchronized void remove Attribute ( int index ) { Attribute a = attributes . get ( index ) ; if ( a == null ) { return ; } attributes . set ( index , null ) ; unused Column List . add ( index ) ; } | @ Override public synchronized void removeAttribute ( int index ) { Attribute a = attributes . get ( index ) ; if ( a == null ) { return ; } attributes . set ( index , null ) ; unusedColumnList . add ( index ) ; } | 51 |
java-test-7854 | java | What can you find for testing ? | the corresponding clietn function in xmlcrm / auth / checklogindata | public int test Object ( Object my Object 2 ) { try { @ Suppress Warnings ( STRING ) Linked Hash Map my Object = ( Linked Hash Map ) my Object 2 ; log . debug ( STRING + my Object . size ( ) ) ; log . debug ( STRING + my Object . get ( NUM ) ) ; log . debug ( STRING + my Object . get ( STRING ) ) ; return my Object . s... | public int testObject ( Object myObject2 ) { try { @ SuppressWarnings ( STRING ) LinkedHashMap myObject = ( LinkedHashMap ) myObject2 ; log . debug ( STRING + myObject . size ( ) ) ; log . debug ( STRING + myObject . get ( _NUM ) ) ; log . debug ( STRING + myObject . get ( STRING ) ) ; return myObject . size ( ) ; } ca... | 108 |
java-test-7855 | java | What shows the wait cursor ? | the informationdelegator | public void request Cursor ( java . awt . Cursor cursor ) { if ( cursor == null ) { if ( show Wait Cursor && ! waiting For Layers ) reset Cursor ( ) ; current Map Bean Cursor = null ; } else if ( this . map != null ) { Cursor new Cursor ; if ( show Wait Cursor && waiting For Layers ) { new Cursor = Cursor . get Predefi... | public void requestCursor ( java . awt . Cursor cursor ) { if ( cursor == null ) { if ( showWaitCursor && ! waitingForLayers ) resetCursor ( ) ; currentMapBeanCursor = null ; } else if ( this . map != null ) { Cursor newCursor ; if ( showWaitCursor && waitingForLayers ) { newCursor = Cursor . getPredefinedCursor ( Curs... | 109 |
java-test-7876 | java | How did a cached image identify ? | by its size and a set of additional arguments | public boolean paint Cached Image ( Graphics g , int x , int y , int w , int h , Object ... args ) { if ( w <= NUM || h <= NUM ) { return BOOL ; } Image img = cache . get Image ( get Class ( ) , null , w , h , args ) ; if ( img != null ) { g . draw Image ( img , x , y , null ) ; return BOOL ; } return BOOL ; } | public boolean paintCachedImage ( Graphics g , int x , int y , int w , int h , Object ... args ) { if ( w <= _NUM || h <= _NUM ) { return _BOOL ; } Image img = cache . getImage ( getClass ( ) , null , w , h , args ) ; if ( img != null ) { g . drawImage ( img , x , y , null ) ; return _BOOL ; } return _BOOL ; } | 92 |
java-test-7878 | java | What does the code draw ? | a snap horizontal margin indicator | public static void draw Snap Horizontal Margin ( View Transform transform , Graphics 2 D g , int x1 , int x2 , int y1 , String text , boolean text Over ) { Canvas c = new Canvas ( ) ; Font Metrics fm = c . get Font Metrics ( s Font ) ; g . set Font ( s Font ) ; int padding = transform . get Swing Dimension ( NUM ) ; Re... | public static void drawSnapHorizontalMargin ( ViewTransform transform , Graphics2D g , int x1 , int x2 , int y1 , String text , boolean textOver ) { Canvas c = new Canvas ( ) ; FontMetrics fm = c . getFontMetrics ( sFont ) ; g . setFont ( sFont ) ; int padding = transform . getSwingDimension ( _NUM ) ; Rectangle2D boun... | 325 |
java-test-7879 | java | What does the code insert ? | an entry at this index | public Immutable Array 2 < K > insert ( int index , K obj ) { int len = length + NUM ; int new Len = len ; boolean extendable ; if ( index == len - NUM ) { Atomic Boolean x = can Extend ; if ( x != null ) { can Extend = null ; if ( array . length > index && x . get And Set ( BOOL ) ) { array [ index ] = obj ; return ne... | public ImmutableArray2 < K > insert ( int index , K obj ) { int len = length + _NUM ; int newLen = len ; boolean extendable ; if ( index == len - _NUM ) { AtomicBoolean x = canExtend ; if ( x != null ) { canExtend = null ; if ( array . length > index && x . getAndSet ( _BOOL ) ) { array [ index ] = obj ; return new Imm... | 185 |
java-test-7882 | java | What does the code obtain using ocsp using the most common defaults ? | the revocation status of a certificate | public static Revocation Status check ( X509 Certificate cert , X509 Certificate issuer Cert ) throws IO Exception , Cert Path Validator Exception { Cert Id cert Id = null ; URI responder URI = null ; try { X509 Cert Impl cert Impl = X509 Cert Impl . to Impl ( cert ) ; responder URI = get Responder URI ( cert Impl ) ; ... | public static RevocationStatus check ( X509Certificate cert , X509Certificate issuerCert ) throws IOException , CertPathValidatorException { CertId certId = null ; URI responderURI = null ; try { X509CertImpl certImpl = X509CertImpl . toImpl ( cert ) ; responderURI = getResponderURI ( certImpl ) ; if ( responderURI == ... | 184 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.