input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testConvertLocalDateToSQLDateAndBackWithCustomTimeZone ( ) { java . time . LocalDate date = java . time . LocalDate . of ( 2016 , Month . FEBRUARY , 25 ) ; java . sql . Date sqlDate = com . github . resource4j . converters . TypeConverter . convert ( date , java . util . Date . class , "America/Los_Angeles" ) ; java . time . LocalDate result = com . github . resource4j . converters . TypeConverter . convert ( sqlDate , java . time . LocalDate . class , "America/Los_Angeles" ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . Object , java . lang . Class , java . lang . String ) { return com . github . resource4j . converters . TypeConverter . converter ( ) . doConvert ( fromValue , toType , format ) ; }
org . junit . Assert . assertEquals ( date , result )
testSpaced ( ) { org . ds . chronos . util . Duration duration = new org . ds . chronos . util . Duration ( "10<sp>ms" ) ; "<AssertPlaceHolder>" ; } getMillis ( ) { return millis ; }
org . junit . Assert . assertEquals ( 10 , duration . getMillis ( ) )
testTestVectors ( ) { for ( int i = 1 ; i < 30 ; i ++ ) { mikera . util . Random r = new mikera . util . Random ( ) ; r . setSeed ( i ) ; mikera . vectorz . AVector v = mikera . vectorz . util . Testing . createTestVector ( i , r ) ; "<AssertPlaceHolder>" ; new mikera . vectorz . TestVectors ( ) . doGenericTests ( v ) ; } } length ( ) { return length ; }
org . junit . Assert . assertEquals ( i , v . length ( ) )
testIsPrivate ( ) { org . netbeans . modules . gradle . api . GradleTask instance = new org . netbeans . modules . gradle . api . GradleTask ( ":run" , null , "run" , "" ) ; "<AssertPlaceHolder>" ; } isPrivate ( ) { return ( group ) == null ; }
org . junit . Assert . assertTrue ( instance . isPrivate ( ) )
testRecordFromPreviousEpochIsDiscarded ( ) { session . setReadEpoch ( 1 ) ; "<AssertPlaceHolder>" ; } isRecordProcessable ( long , long ) { if ( epoch < ( getReadEpoch ( ) ) ) { return false ; } else if ( epoch > ( getReadEpoch ( ) ) ) { return false ; } else { synchronized ( this ) { if ( sequenceNo < ( receiveWindowLowerBoundary ) ) { return false ; } else { return ! ( isDuplicate ( sequenceNo ) ) ; } } } }
org . junit . Assert . assertFalse ( session . isRecordProcessable ( 0 , 15 ) )
testStdev1 ( ) { double [ ] [ ] ind = new double [ ] [ ] { new double [ ] { 5.1 , 3.5 , 1.4 } , new double [ ] { 4.9 , 3.0 , 1.4 } , new double [ ] { 4.7 , 3.2 , 1.3 } } ; org . nd4j . linalg . api . ndarray . INDArray in = org . nd4j . linalg . factory . Nd4j . create ( ind ) ; org . nd4j . linalg . api . ndarray . INDArray stdev = in . std ( 1 ) ; log . info ( "StdDev:<sp>{}" , stdev . toDoubleVector ( ) ) ; org . nd4j . linalg . api . ndarray . INDArray exp = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1.8556220879622372 , 1.7521415467935233 , 1.7039170558842744 } ) ; "<AssertPlaceHolder>" ; } create ( int [ ] , long [ ] , org . nd4j . linalg . api . buffer . DataType ) { lombok . val ret = org . nd4j . linalg . factory . Nd4j . INSTANCE . create ( data , shape , org . nd4j . linalg . factory . Nd4j . getStrides ( shape ) , type , org . nd4j . linalg . factory . Nd4j . getMemoryManager ( ) . getCurrentWorkspace ( ) ) ; org . nd4j . linalg . factory . Nd4j . logCreationIfNecessary ( ret ) ; return ret ; }
org . junit . Assert . assertEquals ( exp , stdev )
shouldRemoveFilledLineWhenSeveralFilled ( ) { com . codenjoy . dojo . tetris . model . Figure columnFigure = new com . codenjoy . dojo . tetris . model . FigureImpl ( 0 , 0 , "#" , "#" ) ; glass . drop ( line9Width , 0 , com . codenjoy . dojo . tetris . model . TestUtils . HEIGHT ) ; glass . drop ( line9Width , 0 , com . codenjoy . dojo . tetris . model . TestUtils . HEIGHT ) ; glass . drop ( columnFigure , ( ( com . codenjoy . dojo . tetris . model . TestUtils . WIDTH ) - 1 ) , com . codenjoy . dojo . tetris . model . TestUtils . HEIGHT ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { for ( int x = 0 ; x < ( size ) ; x ++ ) { for ( int y = 0 ; y < ( size ) ; y ++ ) { if ( ( isBusy ( x , y ) ) && ( ( data [ x ] [ y ] ) != ( com . codenjoy . dojo . a2048 . model . Numbers . BREAK ) ) ) return false ; } } return true ; }
org . junit . Assert . assertTrue ( glass . isEmpty ( ) )
canPopulateNaturalId ( ) { org . mongolink . domain . mapper . MapperContext mapperContext = contextWithNaturalId ( ) ; org . bson . Document dbo = new org . bson . Document ( ) ; dbo . put ( "_id" , "natural<sp>key" ) ; org . mongolink . domain . mapper . FakeAggregateWithNaturalId instance = mapperContext . mapperFor ( org . mongolink . domain . mapper . FakeAggregateWithNaturalId . class ) . toInstance ( dbo ) ; "<AssertPlaceHolder>" ; } getNaturalKey ( ) { return naturalKey ; }
org . junit . Assert . assertThat ( instance . getNaturalKey ( ) , org . hamcrest . Matchers . is ( ( ( java . lang . Object ) ( "natural<sp>key" ) ) ) )
testEvaluate ( ) { org . geolatte . common . expressions . NumberConstant numberConstant = new org . geolatte . common . expressions . NumberConstant ( 5 ) ; "<AssertPlaceHolder>" ; } evaluate ( java . lang . Object ) { return ( getLeft ( ) . compareTo ( o , getRight ( ) . evaluate ( o ) ) ) <= 0 ; }
org . junit . Assert . assertEquals ( 5 , numberConstant . evaluate ( null ) )
instanceStatusAll ( ) { populateInstance ( true ) ; java . lang . String statusRequest = "instance:stats,<sp>bulletins,<sp>health" ; org . apache . nifi . minifi . commons . status . FlowStatusReport actual = org . apache . nifi . minifi . status . StatusConfigReporter . getStatus ( mockFlowController , statusRequest , org . slf4j . LoggerFactory . getLogger ( org . apache . nifi . minifi . status . StatusConfigReporterTest . class ) ) ; org . apache . nifi . minifi . commons . status . FlowStatusReport expected = new org . apache . nifi . minifi . commons . status . FlowStatusReport ( ) ; expected . setErrorsGeneratingReport ( Collections . EMPTY_LIST ) ; addInstanceStatus ( expected , true , true , true , true ) ; "<AssertPlaceHolder>" ; } addInstanceStatus ( org . apache . nifi . minifi . commons . status . FlowStatusReport , boolean , boolean , boolean , boolean ) { org . apache . nifi . minifi . commons . status . instance . InstanceStatus instanceStatus = new org . apache . nifi . minifi . commons . status . instance . InstanceStatus ( ) ; if ( addHealth ) { org . apache . nifi . minifi . commons . status . instance . InstanceHealth instanceHealth = new org . apache . nifi . minifi . commons . status . instance . InstanceHealth ( ) ; instanceHealth . setQueuedContentSize ( 1L ) ; instanceHealth . setQueuedCount ( 2 ) ; instanceHealth . setActiveThreads ( 3 ) ; instanceHealth . setHasBulletins ( populateBulletins ) ; instanceStatus . setInstanceHealth ( instanceHealth ) ; } if ( addBulletins ) { if ( populateBulletins ) { org . apache . nifi . minifi . commons . status . common . BulletinStatus bulletinStatus = new org . apache . nifi . minifi . commons . status . common . BulletinStatus ( ) ; bulletinStatus . setMessage ( "Bulletin<sp>message" ) ; bulletinStatus . setTimestamp ( new java . util . Date ( 1464019245000L ) ) ; instanceStatus . setBulletinList ( java . util . Collections . singletonList ( bulletinStatus ) ) ; } else { instanceStatus . setBulletinList ( Collections . EMPTY_LIST ) ; } } if ( addStats ) { org . apache . nifi . minifi . commons . status . instance . InstanceStats instanceStats = new org . apache . nifi . minifi . commons . status . instance . InstanceStats ( ) ; instanceStats . setBytesRead ( 1L ) ; instanceStats . setBytesWritten ( 2L ) ; instanceStats . setBytesSent ( 3L ) ; instanceStats . setFlowfilesSent ( 4 ) ; instanceStats . setBytesTransferred ( 5L ) ; instanceStats . setFlowfilesTransferred ( 6 ) ; instanceStats . setBytesReceived ( 7L ) ; instanceStats . setFlowfilesReceived ( 8 ) ; instanceStatus . setInstanceStats ( instanceStats ) ; } flowStatusReport . setInstanceStatus ( instanceStatus ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; primaryKeys . add ( pk1 ) ; primaryKeys . add ( pk2 ) ; java . util . Map < java . io . Serializable , com . liferay . dynamic . data . lists . model . DDLRecord > ddlRecords = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( ddlRecords . isEmpty ( ) )
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . layout . page . template . model . LayoutPageTemplateEntry . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "layoutPageTemplateEntryId" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "layoutPageTemplateEntryId" , new java . lang . Object [ ] { com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) } ) ) ; java . util . List < java . lang . Object > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
getPath ( ) { java . lang . String expected = "path" ; when ( this . context . getPath ( ) ) . thenReturn ( expected ) ; java . lang . String result = this . catalinaContext . getPath ( ) ; "<AssertPlaceHolder>" ; } getPath ( ) { return this . context . getPath ( ) ; }
org . junit . Assert . assertSame ( expected , result )
testReadAsRenderedImageIndexNegative ( ) { com . twelvemonkeys . imageio . util . ImageReader reader = createReader ( ) ; com . twelvemonkeys . imageio . util . ImageReaderAbstractTest . TestData data = getTestData ( ) . get ( 0 ) ; reader . setInput ( data . getInputStream ( ) ) ; java . awt . image . RenderedImage image = null ; try { image = reader . readAsRenderedImage ( ( - 1 ) , reader . getDefaultReadParam ( ) ) ; org . junit . Assert . fail ( "Read<sp>image<sp>with<sp>illegal<sp>index" ) ; } catch ( java . lang . IndexOutOfBoundsException expected ) { } catch ( java . io . IOException e ) { com . twelvemonkeys . imageio . util . ImageReaderAbstractTest . failBecause ( "Image<sp>could<sp>not<sp>be<sp>read" , e ) ; } "<AssertPlaceHolder>" ; reader . dispose ( ) ; } getDefaultReadParam ( ) { return new com . twelvemonkeys . imageio . plugins . svg . SVGReadParam ( ) ; }
org . junit . Assert . assertNull ( image )
testParseEmpty ( ) { java . lang . String output = "" ; org . opengrok . indexer . history . History result = instance . parseContents ( new java . io . BufferedReader ( new java . io . StringReader ( output ) ) ) ; "<AssertPlaceHolder>" ; } getHistoryEntries ( ) { return entries ; }
org . junit . Assert . assertEquals ( 0 , result . getHistoryEntries ( ) . size ( ) )
testValid ( ) { validator . setDocument ( getClass ( ) . getResourceAsStream ( "/html5-valid.html" ) ) ; java . util . List < org . xwiki . validator . ValidationError > errors = validator . validate ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { if ( ( empty ) == ( - 1 ) ) { for ( org . openqa . selenium . WebElement row : table . findElements ( org . openqa . selenium . By . tagName ( "tr" ) ) ) { if ( ! ( row . findElements ( org . openqa . selenium . By . tagName ( "td" ) ) . isEmpty ( ) ) ) { empty = 0 ; return false ; } } empty = 1 ; } return ( empty ) == 1 ; }
org . junit . Assert . assertTrue ( errors . isEmpty ( ) )
test_tail ( ) { org . jerlang . type . List params = org . jerlang . type . List . of ( org . jerlang . type . List . of ( org . jerlang . type . Integer . of ( 1 ) , org . jerlang . type . Integer . of ( 2 ) ) ) ; org . jerlang . type . List expected = org . jerlang . type . List . of ( org . jerlang . type . Integer . of ( 2 ) ) ; org . jerlang . type . Term result = org . jerlang . erts . Erlang . apply ( org . jerlang . type . Atom . of ( "head_tail" ) , org . jerlang . type . Atom . of ( "t" ) , params ) ; "<AssertPlaceHolder>" ; } of ( byte [ ] ) { return org . jerlang . type . Atom . of ( new java . lang . String ( bytes , ISO_8859_1 ) ) ; }
org . junit . Assert . assertEquals ( expected , result )
plControleVolledigGelijkNok ( ) { final nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst dbPersoonslijst = new nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijstBuilder ( ) . build ( ) ; setup ( java . util . Collections . singletonList ( dbPersoonslijst ) , true , true , true , true , true , false ) ; "<AssertPlaceHolder>" ; } setup ( java . util . List , boolean , boolean , boolean , boolean , boolean , boolean ) { org . mockito . Mockito . when ( plZoekerOpAnummerEnNietFoutiefOpgeschortObvActueelAnummer . zoek ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) ) ) . thenReturn ( plZoekerOpAnummerEnNietFoutiefOpgeschortObvActueelAnummerResult ) ; org . mockito . Mockito . when ( verzoekControleBerichtVanSoortLg01 . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . bericht . model . sync . impl . SynchroniseerNaarBrpVerzoekBericht . class ) ) ) . thenReturn ( berichtVerzoekControleBerichtVanSoortLg01 ) ; org . mockito . Mockito . when ( plControleGevondenBlokkeringssituatieIsJuist . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( resultControleBijhoudingssituatie ) ; org . mockito . Mockito . when ( lijstControleEen . controleer ( org . mockito . Matchers . anyListOf ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( lijstControleEenResult ) ; org . mockito . Mockito . when ( plControleVersienummerGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleVersienummerGelijkResult ) ; org . mockito . Mockito . when ( plControleDatumtijdstempelGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleDatumtijdstempelGelijkResult ) ; org . mockito . Mockito . when ( plControleVolledigGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleVolledigGelijkResult ) ; }
org . junit . Assert . assertFalse ( subject . controleer ( new nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext ( null , null , null , null ) ) )
set ( ) { org . eclipse . emf . ecore . EObject obj0 = org . eclipse . emf . ecore . util . EcoreUtil . create ( eClass0 ) ; org . eclipse . emf . ecore . EObject obj1 = org . eclipse . emf . ecore . util . EcoreUtil . create ( eClass1 ) ; gov . nasa . ensemble . emf . util . EMFUtils . setOrAdd ( obj0 , singleRef , obj1 ) ; "<AssertPlaceHolder>" ; } eGet ( org . eclipse . emf . ecore . EStructuralFeature ) { java . lang . Object value = null ; for ( org . eclipse . emf . ecore . EObject eObject : eObjects ) { if ( value == null ) { value = eObject . eGet ( feature ) ; } else { if ( ! ( gov . nasa . ensemble . common . CommonUtils . equals ( value , eObject . eGet ( feature ) ) ) ) { return null ; } } } return value ; }
org . junit . Assert . assertEquals ( obj1 , obj0 . eGet ( singleRef ) )
testSetDbQuoteString ( ) { try { org . talend . dq . dbms . DbmsLanguage dbms = getMysqlDbmsLanguage ( ) ; dbms . setDbQuoteString ( org . talend . dq . dbms . DbmsLanguageTest . DB_QUOTE_STRING ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } } getDbQuoteString ( ) { return this . dbQuoteString ; }
org . junit . Assert . assertEquals ( dbms . getDbQuoteString ( ) , org . talend . dq . dbms . DbmsLanguageTest . DB_QUOTE_STRING )
testReadPolicies ( ) { java . io . InputStream is = getClass ( ) . getResourceAsStream ( "PoliciedCalculator.composite" ) ; javax . xml . stream . XMLStreamReader reader = org . apache . tuscany . sca . binding . ws . xml . ReadTestCase . inputFactory . createXMLStreamReader ( is ) ; org . apache . tuscany . sca . assembly . Composite composite = ( ( org . apache . tuscany . sca . assembly . Composite ) ( org . apache . tuscany . sca . binding . ws . xml . ReadTestCase . staxProcessor . read ( reader , org . apache . tuscany . sca . binding . ws . xml . ReadTestCase . context ) ) ) ; "<AssertPlaceHolder>" ; } read ( javax . xml . stream . XMLStreamReader , org . apache . tuscany . sca . contribution . processor . ProcessorContext ) { org . apache . tuscany . sca . monitor . Monitor monitor = context . getMonitor ( ) ; org . apache . tuscany . sca . binding . ws . WebServiceBinding wsBinding = wsFactory . createWebServiceBinding ( ) ; wsBinding . setUnresolved ( true ) ; policyProcessor . readPolicies ( wsBinding , reader ) ; java . lang . String name = reader . getAttributeValue ( null , org . apache . tuscany . sca . binding . ws . xml . NAME ) ; if ( name != null ) { wsBinding . setName ( name ) ; } java . util . List < java . lang . String > endpointSpecifications = new java . util . ArrayList < java . lang . String > ( ) ; java . lang . String uri = getURIString ( reader , java . net . URI ) ; if ( uri != null ) { wsBinding . setURI ( uri ) ; wsBinding . setUserSpecifiedURI ( uri ) ; if ( ( context . getParentModel ( ) ) instanceof org . apache . tuscany . sca . assembly . Reference ) { try { java . net . URI tmpURI = new java . net . URI ( uri ) ; if ( ! ( tmpURI . isAbsolute ( ) ) ) { error ( monitor , "URINotAbsolute" , reader , uri ) ; } } catch ( java . net . URISyntaxException ex ) { error ( monitor , "InvalidWsdlElementAttr" 0 , reader , ex . getMessage ( ) ) ; } endpointSpecifications . add ( "InvalidWsdlElementAttr" 9 ) ; } if ( ( ( context . getParentModel ( ) ) instanceof org . apache . tuscany . sca . assembly . Callback ) && ( ( ( ( org . apache . tuscany . sca . assembly . Callback ) ( context . getParentModel ( ) ) ) . getParentContract ( ) ) instanceof org . apache . tuscany . sca . assembly . Service ) ) { error ( monitor , "InvalidWsdlElementAttr" 8 , reader , uri ) ; } } java . lang . Boolean wsdlElementIsBinding = null ; java . lang . String wsdlElement = getURIString ( reader , org . apache . tuscany . sca . binding . ws . xml . WSDL_ELEMENT ) ; if ( wsdlElement != null ) { int index = wsdlElement . indexOf ( '#' ) ; if ( index == ( - 1 ) ) { error ( monitor , "InvalidWsdlElementAttr" , reader , wsdlElement ) ; return wsBinding ; } java . lang . String namespace = wsdlElement . substring ( 0 , index ) ; wsBinding . setNamespace ( namespace ) ; java . lang . String localName = wsdlElement . substring ( ( index + 1 ) ) ; if ( localName . startsWith ( "InvalidWsdlElementAttr" 6 ) ) { if ( ( context . getParentModel ( ) ) instanceof org . apache . tuscany . sca . assembly . Service ) { error ( monitor , "InvalidWsdlElementAttr" 4 , reader , wsdlElement ) ; } localName = localName . substring ( "wsdl.service(" . length ( ) , ( ( localName . length ( ) ) - 1 ) ) ; wsBinding . setServiceName ( new javax . xml . namespace . QName ( namespace , localName ) ) ; endpointSpecifications . add ( "#wsdl.service" ) ; } else if ( localName . startsWith ( "InvalidWsdlElementAttr" 3 ) ) { localName = localName . substring ( "wsdl.port(" . length ( ) , ( ( localName . length ( ) ) - 1 ) ) ; int s = localName . indexOf ( '/' ) ; if ( s == ( - 1 ) ) { error ( monitor , "InvalidWsdlElementAttr" , reader , wsdlElement ) ; } else { wsBinding . setServiceName ( new javax . xml . namespace . QName ( namespace , localName . substring ( 0 , s ) ) ) ; wsBinding . setPortName ( localName . substring ( ( s + 1 ) ) ) ; } endpointSpecifications . add ( "InvalidWsdlElementAttr" 7 ) ; } else if ( localName . startsWith ( "wsdl.endpoint" ) ) { localName = localName . substring ( "wsdl.endpoint(" . length ( ) , ( ( localName . length ( ) ) - 1 ) ) ; int s = localName . indexOf ( '/' ) ; if ( s == ( - 1 ) ) { error ( monitor , "InvalidWsdlElementAttr" , reader , wsdlElement ) ; } else { wsBinding . setServiceName ( new javax . xml . namespace . QName ( namespace , localName . substring ( 0 , s ) ) ) ; wsBinding . setEndpointName ( localName . substring ( ( s + 1 ) ) ) ; } } else if ( localName . startsWith ( "URINotAbsolute" 4 ) ) { localName = localName . substring ( "wsdl.binding(" . length ( ) , ( ( localName . length ( ) ) - 1 ) ) ; wsBinding
org . junit . Assert . assertNotNull ( composite )
validParameters ( ) { org . talend . dataprep . transformation . aggregation . api . AggregationParameters parameters = new org . talend . dataprep . transformation . aggregation . api . AggregationParameters ( ) ; parameters . setDatasetId ( "dataset#7568" ) ; parameters . addOperation ( new org . talend . dataprep . transformation . aggregation . api . AggregationOperation ( "0002" , Operator . SUM ) ) ; parameters . addGroupBy ( "0001" ) ; java . util . Set < javax . validation . ConstraintViolation < org . talend . dataprep . transformation . aggregation . api . AggregationParameters > > constraintViolations = validator . validate ( parameters ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( ( ( ( org . apache . commons . lang3 . StringUtils . isEmpty ( title ) ) && ( org . apache . commons . lang3 . StringUtils . isEmpty ( mail ) ) ) && ( org . apache . commons . lang3 . StringUtils . isEmpty ( severity ) ) ) && ( org . apache . commons . lang3 . StringUtils . isEmpty ( type ) ) ) && ( org . apache . commons . lang3 . StringUtils . isEmpty ( description ) ) ; }
org . junit . Assert . assertTrue ( constraintViolations . isEmpty ( ) )
testAcceptNull ( ) { "<AssertPlaceHolder>" ; } accept ( org . openspotlight . graph . query . console . ConsoleState ) { org . openspotlight . common . util . Assertions . checkNotNull ( "state" , state ) ; if ( ( ( state . getActiveCommand ( ) ) == null ) && ( state . getInput ( ) . trim ( ) . equals ( "display<sp>properties" ) ) ) { return true ; } return false ; }
org . junit . Assert . assertThat ( command . accept ( null ) , org . hamcrest . core . Is . is ( false ) )
shouldCreateStatementWithTableParameters ( ) { org . springframework . data . crate . core . mapping . schema . Column stringCol = createColumn ( "field" , java . lang . String . class , null , false ) ; org . springframework . data . crate . core . mapping . schema . TableParameters parameters = new org . springframework . data . crate . core . mapping . schema . TableParameters ( "2" , 1500 , STRICT ) ; org . springframework . data . crate . core . mapping . schema . TableDefinition tableDefinition = createTableDefinition ( "entity" , parameters , stringCol ) ; org . springframework . data . crate . core . sql . CrateSQLStatement statement = new org . springframework . data . crate . core . sql . CreateTable ( tableDefinition ) ; java . lang . StringBuilder sql = new java . lang . StringBuilder ( "CREATE<sp>TABLE<sp>entity<sp>(\"entity_class\"<sp>string,<sp>\"field\"<sp>string)<sp>" ) ; sql . append ( "WITH<sp>(number_of_replicas='2',<sp>refresh_interval='1500',<sp>column_policy='strict')" ) ; "<AssertPlaceHolder>" ; } createStatement ( ) { return org . springframework . data . crate . core . sql . DROP_TABLE . concat ( org . springframework . data . crate . core . sql . SPACE ) . concat ( tableName ) ; }
org . junit . Assert . assertThat ( statement . createStatement ( ) , org . hamcrest . Matchers . is ( sql . toString ( ) ) )
issue95 ( ) { com . github . jknack . handlebars . io . URLTemplateLoader loader = new com . github . jknack . handlebars . io . ClassPathTemplateLoader ( "/issue95" ) ; com . github . jknack . handlebars . Handlebars handlebars = new com . github . jknack . handlebars . Handlebars ( loader ) ; handlebars . setInfiniteLoops ( true ) ; com . github . jknack . handlebars . Template template = handlebars . compile ( "hbs/start" ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { return compile ( template , new com . github . jknack . handlebars . v4Test . Hash ( ) ) ; }
org . junit . Assert . assertNotNull ( template )
testSortByPropertyNamesValue2PropertyNamesIdDesc ( ) { com . feilong . store . member . User id12_age18 = new com . feilong . store . member . User ( 12L , 18 ) ; com . feilong . store . member . User id1_age8 = new com . feilong . store . member . User ( 1L , 8 ) ; com . feilong . store . member . User id2_age30 = new com . feilong . store . member . User ( 2L , 30 ) ; com . feilong . store . member . User id2_age2 = new com . feilong . store . member . User ( 2L , 2 ) ; com . feilong . store . member . User id2_age36 = new com . feilong . store . member . User ( 2L , 36 ) ; java . util . List < com . feilong . store . member . User > list = toList ( id12_age18 , id2_age36 , id2_age2 , id2_age30 , id1_age8 ) ; com . feilong . core . util . SortUtil . sortListByPropertyNamesValue ( list , "id<sp>desc" , "age" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( list , org . hamcrest . Matchers . contains ( id12_age18 , id2_age2 , id2_age30 , id2_age36 , id1_age8 ) )
testBuild ( ) { final com . allanbank . mongodb . builder . QueryBuilder builder = new com . allanbank . mongodb . builder . QueryBuilder ( ) ; builder . whereField ( "x" ) . equals ( 23 ) ; final com . allanbank . mongodb . bson . Document doc = builder . build ( ) ; final com . allanbank . mongodb . bson . builder . DocumentBuilder expected = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) ; expected . addInteger ( "x" , 23 ) ; "<AssertPlaceHolder>" ; } build ( ) { return new com . allanbank . mongodb . builder . Distinct ( this ) ; }
org . junit . Assert . assertEquals ( expected . build ( ) , doc )
getForm_shouldPassIfReturnValueIsNotNullWhenUuidOrIdIsNotNull ( ) { java . lang . String hl7String = "MSH|^~\\&|FORMENTRY|AMRS.ELD|HL7LISTENER|AMRS.ELD|20090728170332||ORU^R01|gu99yBh4loLX2mh9cHaV|P|2.5|1||||||||16^AMRS.ELD.FORMID\r" + ( ( ( ( ( ( ( "PID|||3^^^^||Beren^John^Bondo||\r" + "NK1|1|Jones^Jane^Lee^^RN|3A^Parent^99REL||||||||||||F|19751016|||||||||||||||||2^^^L^PI\r" ) + "PV1||O|1^Unknown||||1^Super<sp>User<sp>(admin)|||||||||||||||||||||||||||||||||||||20090714|||||||V\r" ) + "ORC|RE||||||||20090728165937|1^Super<sp>User\r" ) + "OBR|1|||1238^MEDICAL<sp>RECORD<sp>OBSERVATIONS^99DCT\r" ) + "OBX|2|NM|5497^CD4<sp>COUNT^99DCT||123|||||||||20090714\r" ) + "OBR|3|||23^FOOD<sp>CONSTRUCT^99DCT\r" ) + "OBX|1|CWE|21^FOOD<sp>ASSISTANCE<sp>FOR<sp>ENTIRE<sp>FAMILY^99DCT||22^UNKNOWN^99DCT^2471^UNKNOWN^99NAM|||||||||20090714" ) ; org . openmrs . hl7 . handler . ORUR01Handler oruHandler = new org . openmrs . hl7 . handler . ORUR01Handler ( ) ; ca . uhn . hl7v2 . model . Message hl7message = org . openmrs . hl7 . handler . ORUR01HandlerTest . parser . parse ( hl7String ) ; ca . uhn . hl7v2 . model . v25 . message . ORU_R01 oru = ( ( ca . uhn . hl7v2 . model . v25 . message . ORU_R01 ) ( hl7message ) ) ; ca . uhn . hl7v2 . model . v25 . segment . MSH msh = oru . getMSH ( ) ; org . openmrs . Form form = oruHandler . getForm ( msh ) ; "<AssertPlaceHolder>" ; } getForm ( ca . uhn . hl7v2 . model . v25 . segment . MSH ) { java . lang . String uuid = null ; java . lang . String id = null ; for ( ca . uhn . hl7v2 . model . v25 . datatype . EI identifier : msh . getMessageProfileIdentifier ( ) ) { if ( ( identifier != null ) && ( ( identifier . getNamespaceID ( ) ) != null ) ) { java . lang . String identifierType = identifier . getNamespaceID ( ) . getValue ( ) ; if ( org . openmrs . util . OpenmrsUtil . nullSafeEquals ( identifierType , HL7Constants . HL7_FORM_UUID ) ) { uuid = identifier . getEntityIdentifier ( ) . getValue ( ) ; } else if ( org . openmrs . util . OpenmrsUtil . nullSafeEquals ( identifierType , HL7Constants . HL7_FORM_ID ) ) { id = identifier . getEntityIdentifier ( ) . getValue ( ) ; } else { org . openmrs . hl7 . handler . ORUR01Handler . log . warn ( ( ( "Form<sp>identifier<sp>type<sp>of<sp>" + identifierType ) + "<sp>unknown<sp>to<sp>ORU<sp>R01<sp>processor." ) ) ; } } } org . openmrs . Form form = null ; if ( ( uuid == null ) && ( id == null ) ) { return form ; } if ( uuid != null ) { form = org . openmrs . api . context . Context . getFormService ( ) . getFormByUuid ( uuid ) ; } if ( id != null ) { try { java . lang . Integer formId = java . lang . Integer . parseInt ( id ) ; form = org . openmrs . api . context . Context . getFormService ( ) . getForm ( formId ) ; } catch ( java . lang . NumberFormatException e ) { throw new ca . uhn . hl7v2 . HL7Exception ( org . openmrs . api . context . Context . getMessageSourceService ( ) . getMessage ( "ORUR01.error.parseFormId" ) , e ) ; } } return form ; }
org . junit . Assert . assertNotNull ( form )
testBfsToTargetIn ( ) { final long source = org . neo4j . graphalgo . impl . BFSDFSTest . id ( "g" ) ; final long target = org . neo4j . graphalgo . impl . BFSDFSTest . id ( "a" ) ; final long [ ] nodes = new org . neo4j . graphalgo . impl . Traverse ( org . neo4j . graphalgo . impl . BFSDFSTest . graph ) . computeBfs ( source , Direction . INCOMING , ( s , t , w ) -> t == target ? Result . BREAK : Result . FOLLOW ) ; System . out . println ( java . util . Arrays . toString ( nodes ) ) ; "<AssertPlaceHolder>" ; } toString ( int ) { final java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; iterateBFS ( root , ( s , t , r ) -> { if ( ( builder . length ( ) ) > 0 ) { builder . append ( ",<sp>" ) ; } builder . append ( s ) . append ( "<sp>-><sp>" ) . append ( t ) ; return true ; } ) ; return builder . toString ( ) ; }
org . junit . Assert . assertEquals ( 7 , nodes . length )
testUpdateNodeWithSuccess ( ) { final org . apache . druid . java . util . http . client . response . HttpResponseHandler < java . io . InputStream , java . io . InputStream > responseHandler = org . easymock . EasyMock . createStrictMock ( org . apache . druid . java . util . http . client . response . HttpResponseHandler . class ) ; final com . google . common . util . concurrent . SettableFuture < java . io . InputStream > future = com . google . common . util . concurrent . SettableFuture . create ( ) ; future . set ( new java . io . ByteArrayInputStream ( org . apache . druid . java . util . common . StringUtils . toUtf8 ( mapper . writeValueAsString ( org . apache . druid . server . lookup . cache . LookupCoordinatorManagerTest . LOOKUPS_STATE ) ) ) ) ; org . easymock . EasyMock . expect ( client . go ( org . easymock . EasyMock . anyObject ( ) , org . easymock . EasyMock . < org . apache . druid . java . util . http . client . response . SequenceInputStreamResponseHandler > anyObject ( ) , org . easymock . EasyMock . anyObject ( ) ) ) . andReturn ( future ) . once ( ) ; org . easymock . EasyMock . replay ( client , responseHandler ) ; final org . apache . druid . server . lookup . cache . LookupCoordinatorManager . LookupsCommunicator lookupsCommunicator = new org . apache . druid . server . lookup . cache . LookupCoordinatorManager . LookupsCommunicator ( client , lookupCoordinatorManagerConfig , mapper ) { @ org . apache . druid . server . lookup . cache . Override org . apache . druid . java . util . http . client . response . HttpResponseHandler < java . io . InputStream , java . io . InputStream > makeResponseHandler ( final java . util . concurrent . atomic . AtomicInteger returnCode , final java . util . concurrent . atomic . AtomicReference < java . lang . String > reasonString ) { returnCode . set ( Response . Status . ACCEPTED . getStatusCode ( ) ) ; reasonString . set ( "" ) ; return responseHandler ; } } ; org . apache . druid . query . lookup . LookupsState < org . apache . druid . server . lookup . cache . LookupExtractorFactoryMapContainer > resp = lookupsCommunicator . updateNode ( org . apache . druid . server . http . HostAndPortWithScheme . fromString ( "localhost" ) , org . apache . druid . server . lookup . cache . LookupCoordinatorManagerTest . LOOKUPS_STATE ) ; org . easymock . EasyMock . verify ( client , responseHandler ) ; "<AssertPlaceHolder>" ; } verify ( java . lang . Iterable , java . lang . Iterable ) { java . util . Iterator < org . apache . druid . query . Result < org . apache . druid . query . select . SelectResultValue > > expectedIter = expectedResults . iterator ( ) ; java . util . Iterator < org . apache . druid . query . Result < org . apache . druid . query . select . SelectResultValue > > actualIter = actualResults . iterator ( ) ; while ( expectedIter . hasNext ( ) ) { org . apache . druid . query . Result < org . apache . druid . query . select . SelectResultValue > expected = expectedIter . next ( ) ; org . apache . druid . query . Result < org . apache . druid . query . select . SelectResultValue > actual = actualIter . next ( ) ; org . junit . Assert . assertEquals ( expected . getTimestamp ( ) , actual . getTimestamp ( ) ) ; for ( Map . Entry < java . lang . String , java . lang . Integer > entry : expected . getValue ( ) . getPagingIdentifiers ( ) . entrySet ( ) ) { org . junit . Assert . assertEquals ( entry . getValue ( ) , actual . getValue ( ) . getPagingIdentifiers ( ) . get ( entry . getKey ( ) ) ) ; } org . junit . Assert . assertEquals ( expected . getValue ( ) . getDimensions ( ) , actual . getValue ( ) . getDimensions ( ) ) ; org . junit . Assert . assertEquals ( expected . getValue ( ) . getMetrics ( ) , actual . getValue ( ) . getMetrics ( ) ) ; java . util . Iterator < org . apache . druid . query . select . EventHolder > expectedEvts = expected . getValue ( ) . getEvents ( ) . iterator ( ) ; java . util . Iterator < org . apache . druid . query . select . EventHolder > actualEvts = actual . getValue ( ) . getEvents ( ) . iterator ( ) ; while ( expectedEvts . hasNext ( ) ) { org . apache . druid . query . select . EventHolder exHolder = expectedEvts . next ( ) ; org . apache . druid . query . select . EventHolder acHolder = actualEvts . next ( ) ; org . junit . Assert . assertEquals ( exHolder . getTimestamp ( ) , acHolder . getTimestamp ( ) ) ; org . junit . Assert . assertEquals ( exHolder . getOffset ( ) , acHolder . getOffset ( ) ) ; for ( Map . Entry < java . lang . String , java . lang . Object > ex : exHolder . getEvent ( ) . entrySet ( ) ) { java . lang . Object actVal = acHolder . getEvent ( ) . get ( ex . getKey ( ) ) ; if ( ( acHolder . getEvent ( ) . get ( ex . getKey
org . junit . Assert . assertEquals ( resp , org . apache . druid . server . lookup . cache . LookupCoordinatorManagerTest . LOOKUPS_STATE )
testGetParentDataDomain ( ) { org . apache . cayenne . access . DataDomain dd = runtime . getDataDomain ( ) ; org . apache . cayenne . DataChannel decorator = new org . apache . cayenne . access . DataContextDecoratedStackIT . DataChannelDecorator ( dd ) ; org . apache . cayenne . access . DataContext context = ( ( org . apache . cayenne . access . DataContext ) ( runtime . newContext ( decorator ) ) ) ; "<AssertPlaceHolder>" ; } getParentDataDomain ( ) { attachToRuntimeIfNeeded ( ) ; if ( ( channel ) == null ) { return null ; } if ( ( channel ) instanceof org . apache . cayenne . access . DataDomain ) { return ( ( org . apache . cayenne . access . DataDomain ) ( channel ) ) ; } java . util . List response = channel . onQuery ( this , new org . apache . cayenne . access . DataDomainQuery ( ) ) . firstList ( ) ; if ( ( ( response != null ) && ( ( response . size ( ) ) > 0 ) ) && ( ( response . get ( 0 ) ) instanceof org . apache . cayenne . access . DataDomain ) ) { return ( ( org . apache . cayenne . access . DataDomain ) ( response . get ( 0 ) ) ) ; } return null ; }
org . junit . Assert . assertSame ( dd , context . getParentDataDomain ( ) )
testTake2 ( ) { com . geekhua . filequeue . Config config = new com . geekhua . filequeue . Config ( ) ; config . setMsgAvgLen ( 100 ) ; config . setBaseDir ( com . geekhua . filequeue . datastore . DataStoreImplTest . baseDir . getAbsolutePath ( ) ) ; config . setFileSiz ( 1024 ) ; com . geekhua . filequeue . datastore . DataStore < java . lang . Integer > ds = new com . geekhua . filequeue . datastore . DataStoreImpl < java . lang . Integer > ( config ) ; ds . init ( ) ; int times = 1000 ; for ( int i = 0 ; i < times ; i ++ ) { ds . put ( i ) ; } for ( int i = 0 ; i < times ; i ++ ) { "<AssertPlaceHolder>" ; } } take ( ) { com . geekhua . filequeue . datastore . BlockGroup blockGroup = null ; if ( ( readingFileNo . longValue ( ) ) >= 0 ) { if ( ( readingFile ) == null ) { openReadingFile ( ) ; } blockGroup = com . geekhua . filequeue . datastore . BlockGroup . read ( readingFile , blockSize ) ; if ( ( ( blockGroup != null ) && ( org . apache . commons . lang . ArrayUtils . isEquals ( blockGroup . array ( ) , DATAFILE_END ) ) ) || ( blockGroup == null ) ) { if ( ( readingFileNo . longValue ( ) ) < ( writingFileNo . longValue ( ) ) ) { if ( ( readingFile ) != null ) { readingFile . close ( ) ; readingFile = null ; if ( bakReadFile ) { try { org . apache . commons . io . FileUtils . moveFileToDirectory ( new java . io . File ( baseDir , getDataFileName ( readingFileNo . longValue ( ) ) ) , bakDir , true ) ; } catch ( java . io . IOException e ) { com . geekhua . filequeue . datastore . DataStoreImpl . log . warn ( "Move<sp>file({})<sp>to<sp>dir({})<sp>fail." , new java . io . File ( baseDir , getDataFileName ( readingFileNo . longValue ( ) ) ) , bakDir ) ; } } else { org . apache . commons . io . FileUtils . deleteQuietly ( new java . io . File ( baseDir , getDataFileName ( readingFileNo . longValue ( ) ) ) ) ; } } readingFileNo . incrementAndGet ( ) ; readingOffset . set ( 0L ) ; openReadingFile ( ) ; return take ( ) ; } } } if ( blockGroup == null ) { return null ; } else { readingOffset . set ( readingFile . getFilePointer ( ) ) ; return ( ( E ) ( codec . decode ( blockGroup . getContent ( ) ) ) ) ; } }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( i ) , ds . take ( ) )
getFilterDisabledSearchArgument ( ) { org . apache . hadoop . hive . serde2 . typeinfo . StructTypeInfo typeInfo = new com . hotels . corc . StructTypeInfoBuilder ( ) . add ( "a" , TypeInfoFactory . stringTypeInfo ) . build ( ) ; org . apache . hadoop . hive . ql . io . sarg . SearchArgument searchArgument = org . apache . hadoop . hive . ql . io . sarg . SearchArgumentFactory . newBuilder ( ) . startAnd ( ) . equals ( "a" , "b" ) . end ( ) . build ( ) ; conf . set ( CorcInputFormat . SEARCH_ARGUMENT , searchArgument . toKryo ( ) ) ; conf . setBoolean ( CorcInputFormat . ENABLE_ROW_LEVEL_SEARCH_ARGUMENT , false ) ; "<AssertPlaceHolder>" ; } getFilter ( org . apache . hadoop . conf . Configuration , org . apache . hadoop . hive . serde2 . typeinfo . StructTypeInfo ) { if ( conf . getBoolean ( com . hotels . corc . mapred . CorcInputFormat . ENABLE_ROW_LEVEL_SEARCH_ARGUMENT , true ) ) { org . apache . hadoop . hive . ql . io . sarg . SearchArgument searchArgument = com . hotels . corc . mapred . CorcInputFormat . getSearchArgument ( conf ) ; if ( searchArgument != null ) { return new com . hotels . corc . sarg . SearchArgumentFilter ( searchArgument , typeInfo ) ; } } return com . hotels . corc . Filter . ACCEPT ; }
org . junit . Assert . assertThat ( com . hotels . corc . mapred . CorcInputFormat . getFilter ( conf , typeInfo ) , org . hamcrest . CoreMatchers . is ( Filter . ACCEPT ) )
detectsEmbeddableProperty ( ) { org . springframework . data . jpa . mapping . JpaPersistentEntity < ? > persistentEntity = context . getPersistentEntity ( org . springframework . data . jpa . domain . sample . User . class ) ; org . springframework . data . jpa . mapping . JpaPersistentProperty property = persistentEntity . getPersistentProperty ( "address" ) ; "<AssertPlaceHolder>" . isTrue ( ) ; } isEmbeddable ( ) { return ( isAnnotationPresent ( org . springframework . data . jpa . mapping . Embedded . class ) ) || ( hasActualTypeAnnotation ( org . springframework . data . jpa . mapping . Embeddable . class ) ) ; }
org . junit . Assert . assertThat ( property . isEmbeddable ( ) )
testGetStoreUrl ( ) { aic . setStoreUrl ( "http://incubator.apache.org/cloudstack/" ) ; java . lang . String url = aic . getStoreUrl ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; rdpclient . clip . ClipboardDataFormat other = ( ( rdpclient . clip . ClipboardDataFormat ) ( obj ) ) ; if ( ( id ) != ( other . id ) ) return false ; if ( ( name ) == null ) { if ( ( other . name ) != null ) return false ; } else if ( ! ( name . equals ( other . name ) ) ) return false ; return true ; }
org . junit . Assert . assertTrue ( url . equals ( "http://incubator.apache.org/cloudstack/" ) )
testMergeMaxMixedOrder ( ) { lombok . val array0 = org . nd4j . linalg . factory . Nd4j . rand ( 'f' , 5 , 2 ) . addi ( 1 ) ; lombok . val array1 = array0 . dup ( 'c' ) . addi ( 5 ) ; array1 . put ( 0 , 0 , 0 ) ; lombok . val exp = array1 . dup ( ) ; exp . putScalar ( 0 , 0 , array0 . getDouble ( 0 , 0 ) ) ; lombok . val zF = org . nd4j . linalg . factory . Nd4j . zeros ( array0 . shape ( ) , 'f' ) ; org . nd4j . linalg . api . ops . CustomOp op = org . nd4j . linalg . api . ops . DynamicCustomOp . builder ( "mergemax" ) . addInputs ( array0 , array1 ) . addOutputs ( zF ) . callInplace ( false ) . build ( ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( op ) ; "<AssertPlaceHolder>" ; } exec ( java . lang . String ) { code = org . datavec . python . PythonExecutioner . getFunctionalCode ( ( "__f_" + ( java . lang . Thread . currentThread ( ) . getId ( ) ) ) , code ) ; org . datavec . python . PythonExecutioner . acquireGIL ( ) ; log . info ( "CPython:<sp>PyRun_SimpleStringFlag()" ) ; log . info ( code ) ; int result = PyRun_SimpleStringFlags ( code , null ) ; if ( result != 0 ) { PyErr_Print ( ) ; throw new java . lang . RuntimeException ( "exec<sp>failed" ) ; } log . info ( "Exec<sp>done" ) ; org . datavec . python . PythonExecutioner . releaseGIL ( ) ; }
org . junit . Assert . assertEquals ( exp , zF )
testFilterNietTeLeverenPersonenVoorAfnemerindicatieBuitenPopulatie ( ) { final nl . bzk . brp . domain . algemeen . Autorisatiebundel leveringAutorisatie = maakAutorisatiebudel ( SoortDienst . MUTATIELEVERING_OP_BASIS_VAN_AFNEMERINDICATIE ) ; final nl . bzk . brp . domain . algemeen . Populatie populatie = nl . bzk . brp . domain . algemeen . Populatie . BUITEN ; final boolean resultaat = populatieBepalingFilterImpl . magLeveren ( testPersoon , populatie , leveringAutorisatie ) ; "<AssertPlaceHolder>" ; } magLeveren ( nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst , nl . bzk . brp . domain . algemeen . Populatie , nl . bzk . brp . domain . algemeen . Autorisatiebundel ) { final nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortDienst soortDienst = autorisatiebundel . getDienst ( ) . getSoortDienst ( ) ; if ( ! ( ( ( soortDienst == ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortDienst . ATTENDERING ) ) || ( soortDienst == ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortDienst . SELECTIE ) ) ) || ( soortDienst == ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortDienst . MUTATIELEVERING_OP_BASIS_VAN_AFNEMERINDICATIE ) ) ) ) { return true ; } final nl . bzk . algemeenbrp . dal . domein . brp . entity . Partij partij = autorisatiebundel . getPartij ( ) ; final boolean leveringMagDoorgaan ; if ( soortDienst == ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortDienst . MUTATIELEVERING_OP_BASIS_VAN_AFNEMERINDICATIE ) ) { boolean heeftVerstrekkingsBeperkingVorigeHandeling = ( ( persoon . beeldVan ( ) . vorigeHandeling ( ) ) != null ) && ( verstrekkingsbeperkingService . heeftGeldigeVerstrekkingsbeperking ( persoon . beeldVan ( ) . vorigeHandeling ( ) , partij ) ) ; boolean heeftVertrekkingsbeperkingNu = verstrekkingsbeperkingService . heeftGeldigeVerstrekkingsbeperking ( persoon . getNuNuBeeld ( ) , partij ) ; leveringMagDoorgaan = ! ( heeftVerstrekkingsBeperkingVorigeHandeling && heeftVertrekkingsbeperkingNu ) ; if ( ! leveringMagDoorgaan ) { nl . bzk . brp . service . mutatielevering . leveringbepaling . filter . VerstrekkingsbeperkingfilterImpl . LOGGER . debug ( ( "Levering<sp>voor<sp>mutatielevering<sp>obv<sp>afnemerindicatie<sp>mag<sp>niet<sp>doorgaan,<sp>er<sp>geldt<sp>een<sp>" + "verstrekkingsbeperking<sp>voor<sp>persoon<sp>{}<sp>op<sp>partij<sp>{}" ) , persoon . getId ( ) , partij . getCode ( ) ) ; } } else { leveringMagDoorgaan = ! ( verstrekkingsbeperkingService . heeftGeldigeVerstrekkingsbeperking ( persoon . getNuNuBeeld ( ) , partij ) ) ; if ( ! leveringMagDoorgaan ) { nl . bzk . brp . service . mutatielevering . leveringbepaling . filter . VerstrekkingsbeperkingfilterImpl . LOGGER . debug ( ( "Levering<sp>mag<sp>niet<sp>doorgaan,<sp>er<sp>geldt<sp>een<sp>" + "verstrekkingsbeperking<sp>voor<sp>persoon<sp>{}<sp>op<sp>partij<sp>{}" ) , persoon . getId ( ) , partij . getCode ( ) ) ; } } return leveringMagDoorgaan ; }
org . junit . Assert . assertTrue ( resultaat )
testCheckDetector2 ( ) { barrysw19 . calculon . engine . BitBoard bitBoard = barrysw19 . calculon . notation . FENUtils . getBoard ( "rnbq1bnr/pppkpppp/8/3N4/8/8/PPPPPPPP/R1BQKBNR<sp>w<sp>KQ<sp>-<sp>1<sp>3" ) ; "<AssertPlaceHolder>" ; } isPlayerJustMovedInCheck ( barrysw19 . calculon . engine . BitBoard ) { byte color = ( ( bitBoard . getPlayer ( ) ) == ( barrysw19 . calculon . model . Piece . WHITE ) ) ? barrysw19 . calculon . model . Piece . BLACK : barrysw19 . calculon . model . Piece . WHITE ; return barrysw19 . calculon . engine . CheckDetector . inCheck ( bitBoard , color , false ) ; }
org . junit . Assert . assertFalse ( barrysw19 . calculon . engine . CheckDetector . isPlayerJustMovedInCheck ( bitBoard ) )
testSetSystemColor ( ) { org . eclipse . swt . graphics . Color blue = device . getSystemColor ( SWT . COLOR_BLUE ) ; "<AssertPlaceHolder>" ; } getSystemColor ( int ) { return getDisplay ( ) . getSystemColor ( code ) . getRGB ( ) ; }
org . junit . Assert . assertEquals ( new org . eclipse . swt . graphics . Color ( device , 0 , 0 , 255 ) , blue )
testInsertCompoundKeyExtraInfo ( ) { com . oberasoftware . jasdb . api . index . keys . KeyInfo keyInfo = new com . oberasoftware . jasdb . core . index . keys . keyinfo . KeyInfoImpl ( com . google . common . collect . Lists . newArrayList ( new com . oberasoftware . jasdb . core . index . query . SimpleIndexField ( "field" , new com . oberasoftware . jasdb . core . index . keys . types . StringKeyType ( 200 ) ) , new com . oberasoftware . jasdb . core . index . query . SimpleIndexField ( "age" , new com . oberasoftware . jasdb . core . index . keys . types . LongKeyType ( ) ) , new com . oberasoftware . jasdb . core . index . query . SimpleIndexField ( "RECORD_POINTER" , new com . oberasoftware . jasdb . core . index . keys . types . LongKeyType ( ) ) ) , new java . util . ArrayList < com . oberasoftware . jasdb . api . index . IndexField > ( ) ) ; java . io . File indexLocation = new java . io . File ( tmpDir , "inverted.idx" ) ; com . oberasoftware . jasdb . api . index . Index index = new com . oberasoftware . jasdb . core . index . btreeplus . BTreeIndex ( indexLocation , keyInfo ) ; com . oberasoftware . jasdb . api . index . keys . KeyNameMapper mapper = keyInfo . getKeyNameMapper ( ) ; try { com . oberasoftware . jasdb . core . index . keys . CompositeKey insertKey = new com . oberasoftware . jasdb . core . index . keys . CompositeKey ( ) ; insertKey . addKey ( mapper , "field" , new com . oberasoftware . jasdb . core . index . keys . StringKey ( "mykey" ) ) . addKey ( mapper , "age" , new com . oberasoftware . jasdb . core . index . keys . LongKey ( 29 ) ) . addKey ( mapper , "RECORD_POINTER" , new com . oberasoftware . jasdb . core . index . keys . LongKey ( 100 ) ) ; index . insertIntoIndex ( insertKey ) ; insertKey = new com . oberasoftware . jasdb . core . index . keys . CompositeKey ( ) ; insertKey . addKey ( mapper , "field" , new com . oberasoftware . jasdb . core . index . keys . StringKey ( "mykey" ) ) . addKey ( mapper , "age" , new com . oberasoftware . jasdb . core . index . keys . LongKey ( 29 ) ) . addKey ( mapper , "RECORD_POINTER" , new com . oberasoftware . jasdb . core . index . keys . LongKey ( 120 ) ) ; index . insertIntoIndex ( insertKey ) ; com . oberasoftware . jasdb . core . index . keys . CompositeKey searchKey = new com . oberasoftware . jasdb . core . index . keys . CompositeKey ( ) ; searchKey . addKey ( mapper , "field" , new com . oberasoftware . jasdb . core . index . keys . StringKey ( "mykey" ) ) . addKey ( mapper , "age" , new com . oberasoftware . jasdb . core . index . keys . LongKey ( 29 ) ) ; com . oberasoftware . jasdb . api . index . query . IndexSearchResultIterator result = index . searchIndex ( new com . oberasoftware . jasdb . core . index . query . EqualsCondition ( searchKey ) , Index . NO_SEARCH_LIMIT ) ; "<AssertPlaceHolder>" ; } finally { index . close ( ) ; } } size ( ) { return size ; }
org . junit . Assert . assertEquals ( 2 , result . size ( ) )
testMoveExistingSuperiorHasReferralAncestor ( ) { try { MNNCtx . rename ( "cn=Alex" , "cn=Alex,ou=apache,ou=Roles" ) ; org . junit . Assert . fail ( ) ; } catch ( javax . naming . NamingException ne ) { "<AssertPlaceHolder>" ; } } rename ( org . apache . directory . api . ldap . model . message . ModifyDnRequest , org . apache . directory . server . core . api . changelog . LogChange ) { org . apache . directory . server . core . api . interceptor . context . RenameOperationContext renameContext = new org . apache . directory . server . core . api . interceptor . context . RenameOperationContext ( this , modifyDnRequest ) ; renameContext . setLogChange ( log ) ; org . apache . directory . server . core . api . OperationManager operationManager = directoryService . getOperationManager ( ) ; try { operationManager . rename ( renameContext ) ; } catch ( org . apache . directory . api . ldap . model . exception . LdapException e ) { modifyDnRequest . getResultResponse ( ) . addAllControls ( renameContext . getResponseControls ( ) ) ; throw e ; } modifyDnRequest . getResultResponse ( ) . addAllControls ( renameContext . getResponseControls ( ) ) ; }
org . junit . Assert . assertTrue ( true )
testGetBean ( ) { com . jamindy . IOC . object . TestContextObject1 obj1 = ( ( com . jamindy . IOC . object . TestContextObject1 ) ( ctx . getBean ( "test1" ) ) ) ; "<AssertPlaceHolder>" ; } getBean ( java . lang . String ) { java . lang . Object bean = beanInstanceMap . get ( id ) ; if ( bean == null ) { bean = handleBean ( id ) ; } return bean ; }
org . junit . Assert . assertNotNull ( obj1 )
testGetBusinessObjectDefinitionColumnsLowerCaseParameters ( ) { businessObjectDefinitionColumnDaoTestHelper . createBusinessObjectDefinitionColumnEntity ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionColumnKey ( BDEF_NAMESPACE , BDEF_NAME , BDEF_COLUMN_NAME_2 ) , org . finra . herd . service . DESCRIPTION_2 ) ; businessObjectDefinitionColumnDaoTestHelper . createBusinessObjectDefinitionColumnEntity ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionColumnKey ( BDEF_NAMESPACE , BDEF_NAME , BDEF_COLUMN_NAME ) , org . finra . herd . service . DESCRIPTION ) ; org . finra . herd . model . api . xml . BusinessObjectDefinitionColumnKeys resultBusinessObjectDefinitionColumnKeys = businessObjectDefinitionColumnService . getBusinessObjectDefinitionColumns ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionKey ( org . finra . herd . service . BDEF_NAMESPACE . toLowerCase ( ) , org . finra . herd . service . BDEF_NAME . toLowerCase ( ) ) ) ; "<AssertPlaceHolder>" ; } getBusinessObjectDefinitionColumns ( java . lang . String , java . lang . String ) { return businessObjectDefinitionColumnService . getBusinessObjectDefinitionColumns ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionKey ( namespace , businessObjectDefinitionName ) ) ; }
org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionColumnKeys ( com . google . common . collect . Lists . newArrayList ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionColumnKey ( BDEF_NAMESPACE , BDEF_NAME , BDEF_COLUMN_NAME ) , new org . finra . herd . model . api . xml . BusinessObjectDefinitionColumnKey ( BDEF_NAMESPACE , BDEF_NAME , BDEF_COLUMN_NAME_2 ) ) ) , resultBusinessObjectDefinitionColumnKeys )
testConfig ( ) { java . lang . String rule = "package<sp>org.drools.compiler.integrationtests\n" + ( ( ( ( ( ( ( ( ( "declare<sp>A\n" + "<sp>i<sp>:<sp>int\n" ) + "<sp>modify($a)<sp>{<sp>setJ(2)<sp>};\n" 0 ) + "<sp>modify($a)<sp>{<sp>setJ(2)<sp>};\n" 2 ) + "rule<sp>R1\n" ) + "when\n" ) + "<sp>$a<sp>:<sp>A(i<sp>==<sp>1)\n" ) + "then\n" ) + "<sp>modify($a)<sp>{<sp>setJ(2)<sp>};\n" ) + "<sp>modify($a)<sp>{<sp>setJ(2)<sp>};\n" 2 ) ; org . kie . internal . builder . KnowledgeBuilderConfiguration config = org . kie . internal . builder . KnowledgeBuilderFactory . newKnowledgeBuilderConfiguration ( ) ; config . setOption ( PropertySpecificOption . ALWAYS ) ; org . kie . api . KieBase kbase = loadKnowledgeBaseFromString ( config , rule ) ; org . kie . api . runtime . KieSession ksession = kbase . newKieSession ( ) ; org . kie . api . definition . type . FactType typeA = kbase . getFactType ( "org.drools.compiler.integrationtests" , "A" ) ; java . lang . Object a = typeA . newInstance ( ) ; typeA . set ( a , "<sp>modify($a)<sp>{<sp>setJ(2)<sp>};\n" 1 , 1 ) ; ksession . insert ( a ) ; int rules = ksession . fireAllRules ( ) ; "<AssertPlaceHolder>" ; } fireAllRules ( ) { return 0 ; }
org . junit . Assert . assertEquals ( 1 , rules )
handle_shouldUnsetThePersonVoidReason ( ) { org . openmrs . api . handler . UnvoidHandler < org . openmrs . Person > handler = new org . openmrs . api . handler . PersonUnvoidHandler ( ) ; org . openmrs . Person person = new org . openmrs . Person ( ) ; person . setPersonVoided ( true ) ; person . setPersonVoidReason ( "SOME<sp>REASON" ) ; handler . handle ( person , null , null , null ) ; "<AssertPlaceHolder>" ; } getPersonVoidReason ( ) { return personVoidReason ; }
org . junit . Assert . assertNull ( person . getPersonVoidReason ( ) )
testDeleteEdgeBatch ( ) { for ( int i = 0 ; i < 100 ; i ++ ) { com . orientechnologies . orient . graph . sql . OCommandExecutorSQLDeleteEdgeTest . db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( ( ( "create<sp>vertex<sp>User<sp>set<sp>name<sp>=<sp>'foo" + i ) + "'" ) ) ) . execute ( ) ; com . orientechnologies . orient . graph . sql . OCommandExecutorSQLDeleteEdgeTest . db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( ( ( ( "create<sp>edge<sp>CanAccess<sp>from<sp>(select<sp>from<sp>User<sp>where<sp>name<sp>=<sp>'foo" + i ) + "')<sp>to<sp>" ) + ( com . orientechnologies . orient . graph . sql . OCommandExecutorSQLDeleteEdgeTest . folderId1 ) ) ) ) . execute ( ) ; } final int res = ( ( java . lang . Integer ) ( com . orientechnologies . orient . graph . sql . OCommandExecutorSQLDeleteEdgeTest . db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "delete<sp>edge<sp>CanAccess<sp>batch<sp>5" ) ) . execute ( ) ) ) ; java . util . List < ? > result = com . orientechnologies . orient . graph . sql . OCommandExecutorSQLDeleteEdgeTest . db . query ( new com . orientechnologies . orient . core . sql . query . OSQLSynchQuery ( ( "select<sp>expand(<sp>in('CanAccess')<sp>)<sp>from<sp>" + ( com . orientechnologies . orient . graph . sql . OCommandExecutorSQLDeleteEdgeTest . folderId1 ) ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>implemented<sp>yet" ) ; }
org . junit . Assert . assertEquals ( result . size ( ) , 0 )
copyCollection_noDescendants_toExistingDest_canWriteDest ( ) { final org . exist . xmldb . XmldbURI src = org . exist . xmldb . XmldbURI . create ( "/db/test/source" ) ; final org . exist . xmldb . XmldbURI dest = org . exist . xmldb . XmldbURI . create ( "/db/test" ) ; final org . exist . xmldb . XmldbURI newName = org . exist . xmldb . XmldbURI . create ( "dest" ) ; final org . exist . collections . Collection srcCollection = org . easymock . EasyMock . createStrictMock ( org . exist . collections . Collection . class ) ; final org . exist . security . Permission srcPermissions = org . easymock . EasyMock . createStrictMock ( org . exist . security . Permission . class ) ; final org . exist . collections . Collection destCollection = org . easymock . EasyMock . createStrictMock ( org . exist . collections . Collection . class ) ; final org . exist . security . Permission destPermissions = org . easymock . EasyMock . createStrictMock ( org . exist . security . Permission . class ) ; final org . exist . collections . Collection newDestCollection = org . easymock . EasyMock . createStrictMock ( org . exist . collections . Collection . class ) ; final org . exist . security . Permission newDestPermissions = org . easymock . EasyMock . createStrictMock ( org . exist . security . Permission . class ) ; final org . exist . storage . NativeBroker broker = org . easymock . EasyMock . createMockBuilder ( org . exist . storage . NativeBroker . class ) . addMockedMethod ( "getCollection" ) . addMockedMethod ( "getCurrentSubject" ) . createStrictMock ( ) ; final org . exist . security . Subject subject = org . easymock . EasyMock . createStrictMock ( org . exist . security . Subject . class ) ; expect ( srcCollection . getPermissionsNoLock ( ) ) . andReturn ( srcPermissions ) ; expect ( broker . getCurrentSubject ( ) ) . andReturn ( subject ) ; expect ( srcPermissions . validate ( subject , ( ( org . exist . security . Permission . EXECUTE ) | ( org . exist . security . Permission . READ ) ) ) ) . andReturn ( true ) ; expect ( destCollection . getURI ( ) ) . andReturn ( dest ) ; final org . easymock . Capture < org . exist . xmldb . XmldbURI > newDestURICapture = newCapture ( ) ; expect ( broker . getCollection ( capture ( newDestURICapture ) ) ) . andReturn ( newDestCollection ) ; expect ( destCollection . getPermissionsNoLock ( ) ) . andReturn ( destPermissions ) ; expect ( broker . getCurrentSubject ( ) ) . andReturn ( subject ) ; expect ( destPermissions . validate ( subject , ( ( org . exist . security . Permission . EXECUTE ) | ( org . exist . security . Permission . WRITE ) ) ) ) . andReturn ( true ) ; expect ( newDestCollection . getPermissionsNoLock ( ) ) . andReturn ( newDestPermissions ) ; expect ( broker . getCurrentSubject ( ) ) . andReturn ( subject ) ; expect ( newDestPermissions . validate ( subject , ( ( org . exist . security . Permission . EXECUTE ) | ( org . exist . security . Permission . WRITE ) ) ) ) . andReturn ( true ) ; expect ( srcCollection . iteratorNoLock ( broker ) ) . andReturn ( org . exist . storage . Collections . emptyIterator ( ) ) ; expect ( srcCollection . collectionIteratorNoLock ( broker ) ) . andReturn ( org . exist . storage . Collections . emptyIterator ( ) ) ; replay ( newDestPermissions , newDestCollection , destCollection , destPermissions , srcCollection , srcPermissions , subject , broker ) ; broker . checkPermissionsForCopy ( srcCollection , destCollection , newName ) ; verify ( newDestPermissions , newDestCollection , destCollection , destPermissions , srcCollection , srcPermissions , subject , broker ) ; "<AssertPlaceHolder>" ; } append ( java . lang . String ) { int startOffset = 0 ; if ( ( segment . charAt ( 0 ) ) == ( org . exist . collections . CollectionURI . FRAGMENT_SEPARATOR ) ) { startOffset = 1 ; } if ( ( uri ) == null ) { uri = new char [ ( ( segment . length ( ) ) + 1 ) - startOffset ] ; uri [ 0 ] = org . exist . collections . CollectionURI . FRAGMENT_SEPARATOR ; segment . getChars ( startOffset , segment . length ( ) , uri , 1 ) ; } else { char [ ] newURI = new char [ ( ( ( length ) + 1 ) + ( segment . length ( ) ) ) - startOffset ] ; java . lang . System . arraycopy ( uri , 0 , newURI , 0 , length ) ; newURI [ length ] = org . exist . collections . CollectionURI . FRAGMENT_SEPARATOR ; segment . getChars ( startOffset , segment . length ( ) , newURI , ( ( length ) + 1 ) ) ; uri = newURI ; } length += ( ( segment . length ( ) ) + 1 ) - startOffset ; hash = 0 ; }
org . junit . Assert . assertEquals ( dest . append ( newName ) , newDestURICapture . getValue ( ) )
testClosing ( ) { ij . process . ImageProcessor image = createImage_Square10x10 ( ) ; inra . ijpb . morphology . Strel strel = new inra . ijpb . morphology . strel . LinearVerticalStrel ( 5 ) ; ij . process . ImageProcessor result = strel . closing ( image ) ; for ( int y = 0 ; y < ( image . getHeight ( ) ) ; y ++ ) { for ( int x = 0 ; x < ( image . getWidth ( ) ) ; x ++ ) { "<AssertPlaceHolder>" ; } } } get ( int , int ) { if ( x < 0 ) return ( ( int ) ( this . value ) ) ; if ( y < 0 ) return ( ( int ) ( this . value ) ) ; if ( x >= ( this . image . getWidth ( ) ) ) return ( ( int ) ( this . value ) ) ; if ( y >= ( this . image . getHeight ( ) ) ) return ( ( int ) ( this . value ) ) ; return this . image . get ( x , y ) ; }
org . junit . Assert . assertEquals ( image . get ( x , y ) , result . get ( x , y ) )
testInterrupt ( ) { System . out . println ( "interrupt" ) ; boolean expResult = true ; boolean result = instance . interrupt ( ) ; "<AssertPlaceHolder>" ; } interrupt ( ) { if ( ( ( channel ) != null ) && ( channel . isOpen ( ) ) ) { try { channel . close ( ) ; } catch ( java . io . IOException ex ) { kg . apc . jmeter . samplers . UDPSampler . log . warn ( "Exception<sp>while<sp>interrupting<sp>channel:<sp>" , ex ) ; return false ; } } return true ; }
org . junit . Assert . assertEquals ( expResult , result )
testManageWebAppWithTrafficManager ( ) { "<AssertPlaceHolder>" ; } runSample ( com . microsoft . azure . management . Azure ) { if ( ( com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . azure ) == null ) { com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . azure = azure ; } final java . lang . String app1Name = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "98052" 0 , 20 ) ; final java . lang . String app2Name = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "4258828080" 4 , 20 ) ; final java . lang . String app3Name = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "4258828080" 2 , 20 ) ; final java . lang . String app4Name = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "98052" 7 , 20 ) ; final java . lang . String app5Name = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "98052" 2 , 20 ) ; final java . lang . String plan1Name = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "Jon" 3 , 15 ) ; final java . lang . String plan2Name = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "4258828080" 6 , 15 ) ; final java . lang . String plan3Name = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "jplan3_" , 15 ) ; final java . lang . String domainName = ( com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "jsdkdemo-" , 20 ) ) + "98052" 1 ; final java . lang . String tmName = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "4258828080" 8 , 20 ) ; try { System . out . println ( ( ( "4258828080" 0 + domainName ) + "jondoe@contoso.com" 6 ) ) ; azure . resourceGroups ( ) . define ( com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . RG_NAME ) . withRegion ( Region . US_WEST ) . create ( ) ; com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . domain = azure . appServices ( ) . domains ( ) . define ( domainName ) . withExistingResourceGroup ( com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . RG_NAME ) . defineRegistrantContact ( ) . withFirstName ( "Jon" ) . withLastName ( "Jon" 0 ) . withEmail ( "jondoe@contoso.com" ) . withAddressLine1 ( "jondoe@contoso.com" 1 ) . withCity ( "Redmond" ) . withStateOrProvince ( "98052" 3 ) . withCountry ( CountryIsoCode . UNITED_STATES ) . withPostalCode ( "98052" ) . withPhoneCountryCode ( CountryPhoneCode . UNITED_STATES ) . withPhoneNumber ( "4258828080" ) . attach ( ) . withDomainPrivacyEnabled ( true ) . withAutoRenewEnabled ( false ) . create ( ) ; System . out . println ( ( "98052" 6 + ( com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . domain . name ( ) ) ) ) ; com . microsoft . azure . management . samples . Utils . print ( com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . domain ) ; com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . pfxPath = ( ( ( ( com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . class . getResource ( "jondoe@contoso.com" 4 ) . getPath ( ) ) + app2Name ) + "." ) + domainName ) + "4258828080" 3 ; java . lang . String cerPath = ( ( ( ( com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . class . getResource ( "jondoe@contoso.com" 4 ) . getPath ( ) ) + app2Name ) + "." ) + domainName ) + "4258828080" 9 ; System . out . println ( ( ( "Jon" 2 + ( com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . pfxPath ) ) + "jondoe@contoso.com" 6 ) ) ; com . microsoft . azure . management . samples . Utils . createCertificate ( cerPath , com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . pfxPath , domainName , com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . CERT_PASSWORD , ( "98052" 9 + domainName ) ) ; System . out . println ( ( ( "98052" 8 + plan1Name ) + "98052" 5 ) ) ; com . microsoft . azure . management . appservice . AppServicePlan plan1 = com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . createAppServicePlan ( plan1Name , Region . US_WEST ) ; System . out . println ( ( "jondoe@contoso.com" 5 + ( plan1 . name ( ) ) ) ) ; com . microsoft . azure . management . samples . Utils . print ( plan1 ) ; System . out . println ( ( ( "98052" 8 + plan2Name ) + "4258828080" 1 ) ) ; com . microsoft . azure . management . appservice . AppServicePlan plan2 = com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . createAppServicePlan ( plan2Name , Region . EUROPE_WEST ) ; System . out . println ( ( "jondoe@contoso.com" 5 + ( plan2 . name (
org . junit . Assert . assertTrue ( com . microsoft . azure . management . appservice . samples . ManageWebAppWithTrafficManager . runSample ( azure ) )
validateSpecialCharactersLessThanStart ( ) { java . lang . String fileName = "<test.txt" ; "<AssertPlaceHolder>" ; } hasSpecialCharacters ( java . lang . String ) { java . util . regex . Pattern special = java . util . regex . Pattern . compile ( org . digidoc4j . utils . Helper . SPECIAL_CHARACTERS ) ; java . util . regex . Matcher hasSpecial = special . matcher ( fileName ) ; return hasSpecial . find ( ) ; }
org . junit . Assert . assertTrue ( org . digidoc4j . utils . Helper . hasSpecialCharacters ( fileName ) )
testCommonPrefixWithExactMatch ( ) { java . lang . String [ ] entries = new java . lang . String [ ] { "a" , "archipel" , "aardappel" , "aardbei" , "aardvark" , "zoroaster" } ; org . springframework . ide . vscode . commons . util . FuzzyMapTest . TestMap map = new org . springframework . ide . vscode . commons . util . FuzzyMapTest . TestMap ( entries ) ; for ( java . lang . String find : entries ) { java . lang . String found = map . findLongestCommonPrefixEntry ( find ) ; "<AssertPlaceHolder>" ; } }
org . junit . Assert . assertEquals ( find , found )
testDelClusterConfig ( ) { org . smartdata . model . ClusterConfig clusterConfig = new org . smartdata . model . ClusterConfig ( 1 , "test" , "test1" ) ; metaStore . setClusterConfig ( clusterConfig ) ; metaStore . delClusterConfig ( clusterConfig ) ; "<AssertPlaceHolder>" ; } listClusterConfig ( ) { try { return clusterConfigDao . getAll ( ) ; } catch ( java . lang . Exception e ) { throw new org . smartdata . metastore . MetaStoreException ( e ) ; } }
org . junit . Assert . assertTrue ( ( ( metaStore . listClusterConfig ( ) . size ( ) ) == 0 ) )
testClear_removesCustomHandler ( ) { serviceManager . registerServiceHandler ( "id" , mock ( org . eclipse . rap . rwt . service . ServiceHandler . class ) ) ; serviceManager . clear ( ) ; "<AssertPlaceHolder>" ; } getServiceHandler ( java . lang . String ) { return customHandlers . get ( customId ) ; }
org . junit . Assert . assertNull ( serviceManager . getServiceHandler ( "id" ) )
testConnack ( ) { byte [ ] rawConnack = new byte [ ] { 32 , 2 , 0 , 3 } ; org . kaaproject . kaa . common . channels . protocols . kaatcp . messages . ConnAck message = new org . kaaproject . kaa . common . channels . protocols . kaatcp . messages . ConnAck ( org . kaaproject . kaa . common . channels . protocols . kaatcp . messages . ConnAck . ReturnCode . REFUSE_ID_REJECT ) ; "<AssertPlaceHolder>" ; } getFrame ( ) { if ( ( buffer ) == null ) { int remainingLegth = getRemainingLegth ( ) ; byte [ ] kaaTcpHeader = new byte [ 6 ] ; int headerSize = fillFixedHeader ( remainingLegth , kaaTcpHeader ) ; int remainingSize = remainingLegth + headerSize ; org . kaaproject . kaa . common . channels . protocols . kaatcp . messages . MqttFrame . LOG . trace ( "Allocating<sp>buffer<sp>size<sp>=<sp>{}" , remainingSize ) ; buffer = java . nio . ByteBuffer . allocate ( remainingSize ) ; buffer . put ( kaaTcpHeader , 0 , headerSize ) ; pack ( ) ; buffer . position ( 0 ) ; } return buffer ; }
org . junit . Assert . assertArrayEquals ( rawConnack , message . getFrame ( ) . array ( ) )
testDelegateInvocation ( ) { com . picocontainer . MutablePicoContainer pico = new com . picocontainer . PicoBuilder ( ) . withCaching ( ) . withLifecycle ( ) . build ( ) ; java . util . Map < java . lang . String , java . lang . String > testMap = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; testMap . put ( "A" , "A<sp>Value" ) ; testMap . put ( "B" , "B<sp>Value" ) ; com . picocontainer . gems . util . DelegateMethod method = new com . picocontainer . gems . util . DelegateMethod ( java . util . Map . class , "get" , "A" ) ; com . picocontainer . gems . adapters . DelegateMethodAdapter adapter = new com . picocontainer . gems . adapters . DelegateMethodAdapter ( java . lang . String . class , testMap , method ) ; pico . addAdapter ( adapter ) ; java . lang . String result = pico . getComponent ( java . lang . String . class ) ; "<AssertPlaceHolder>" ; } getComponent ( java . lang . Class ) { checkReadPermission ( ) ; return pico . getComponent ( componentType ) ; }
org . junit . Assert . assertEquals ( "A<sp>Value" , result )
testMapUserFromContext ( ) { org . pentaho . platform . plugin . services . security . userrole . ldap . RolePreprocessingMapper mapper = new org . pentaho . platform . plugin . services . security . userrole . ldap . RolePreprocessingMapper ( ) ; mapper . setTokenName ( "cn" ) ; mapper . setRolePrefix ( "" ) ; mapper . setRoleAttributes ( new java . lang . String [ ] { "uniqueMember" } ) ; org . springframework . ldap . core . DirContextOperations ctx = new org . springframework . security . ldap . SpringSecurityLdapTemplate ( getContextSource ( ) ) . retrieveEntry ( "uid=suzy,ou=users" , null ) ; java . util . Set < java . lang . String > extraRoles = new org . springframework . security . ldap . SpringSecurityLdapTemplate ( getContextSource ( ) ) . searchForSingleAttributeValues ( "ou=roles" , "uid=suzy,ou=users,dc=pentaho,dc=org" 1 , new java . lang . String [ ] { "uid=suzy,ou=users,dc=pentaho,dc=org" , "suzy" } , "cn" ) ; java . util . List < org . springframework . security . core . GrantedAuthority > authorities = new java . util . ArrayList ( ) ; for ( java . lang . String extraRole : extraRoles ) { authorities . add ( new org . springframework . security . core . authority . SimpleGrantedAuthority ( extraRole ) ) ; } org . springframework . security . core . userdetails . UserDetails userDetails = mapper . mapUserFromContext ( ctx , "suzy" , authorities ) ; System . out . println ( userDetails ) ; java . util . Collection < ? extends org . springframework . security . core . GrantedAuthority > expectedAuthorities = new java . util . ArrayList < org . springframework . security . core . GrantedAuthority > ( ) { { add ( new org . springframework . security . core . authority . SimpleGrantedAuthority ( "uid=suzy,ou=users,dc=pentaho,dc=org" 0 ) ) ; add ( new org . springframework . security . core . authority . SimpleGrantedAuthority ( "Authenticated" ) ) ; add ( new org . springframework . security . core . authority . SimpleGrantedAuthority ( "is" ) ) ; add ( new org . springframework . security . core . authority . SimpleGrantedAuthority ( "cto" ) ) ; } } ; java . util . Collection < ? extends org . springframework . security . core . GrantedAuthority > unexpectedAuthorities = userDetails . getAuthorities ( ) ; "<AssertPlaceHolder>" ; } getAuthorities ( ) { throw new java . lang . IllegalStateException ( org . pentaho . platform . plugin . services . security . userrole . NotFoundUserDetails . ERROR_MSG ) ; }
org . junit . Assert . assertEquals ( expectedAuthorities , unexpectedAuthorities )
testGetId_WhenHashKeyTypeSameAsIdType_InvokesHashKeyMethod_AndReturnedIdIsAssignableToIdType_AndIsValueExpected ( ) { org . socialsignin . spring . data . dynamodb . domain . sample . User user = new org . socialsignin . spring . data . dynamodb . domain . sample . User ( ) ; user . setId ( "someUserId" ) ; java . lang . String id = dynamoDBUserEntityInformation . getId ( user ) ; "<AssertPlaceHolder>" ; } getId ( T ) { if ( ( method ) != null ) { return entity == null ? null : ( ( ID ) ( org . springframework . util . ReflectionUtils . invokeMethod ( method , entity ) ) ) ; } else { return entity == null ? null : ( ( ID ) ( org . springframework . util . ReflectionUtils . getField ( field , entity ) ) ) ; } }
org . junit . Assert . assertEquals ( "someUserId" , id )
testCloseAfterAbort ( ) { org . apache . hadoop . hdfs . HdfsConfiguration conf = new org . apache . hadoop . hdfs . HdfsConfiguration ( ) ; conf . setLong ( DFSConfigKeys . DFS_BLOCK_SIZE_KEY , blockSize ) ; try { setup ( conf ) ; final org . apache . hadoop . fs . Path dirFile = new org . apache . hadoop . fs . Path ( dir , "ecfile" ) ; org . apache . hadoop . fs . FSDataOutputStream out = dfs . create ( dirFile , true ) ; "<AssertPlaceHolder>" ; org . apache . hadoop . hdfs . DFSStripedOutputStream stripedOut = ( ( org . apache . hadoop . hdfs . DFSStripedOutputStream ) ( out . getWrappedStream ( ) ) ) ; stripedOut . abort ( ) ; org . apache . hadoop . test . LambdaTestUtils . intercept ( java . io . IOException . class , "Lease<sp>timeout" , stripedOut :: close ) ; } finally { tearDown ( ) ; } } getWrappedStream ( ) { return in ; }
org . junit . Assert . assertTrue ( ( ( out . getWrappedStream ( ) ) instanceof org . apache . hadoop . hdfs . DFSStripedOutputStream ) )
testProcess ( ) { pl . jgwozdz . brickcommand . brick . ev3 . MailboxEV3Command m1 = new pl . jgwozdz . brickcommand . brick . ev3 . TextEV3Command ( "a" , "b" ) ; pl . jgwozdz . brickcommand . brick . ev3 . MailboxEV3Command m2 = new pl . jgwozdz . brickcommand . brick . ev3 . NumericEV3Command ( "a" , 0.1F ) ; when ( translator . convertEventToMessages ( any ( pl . jgwozdz . brickcommand . brick . ev3 . TestEvent . class ) ) ) . thenReturn ( new pl . jgwozdz . brickcommand . brick . ev3 . MailboxEV3Command [ ] { m1 , m2 } ) ; pl . jgwozdz . brickcommand . brick . ev3 . TestResult mr = new pl . jgwozdz . brickcommand . brick . ev3 . TestResult ( ) ; when ( translator . convertMessageToResult ( any ( pl . jgwozdz . brickcommand . brick . ev3 . IncomingEV3Command . class ) , any ( pl . jgwozdz . brickcommand . brick . ev3 . TestEvent . class ) ) ) . thenReturn ( mr ) ; pl . jgwozdz . brickcommand . brick . ev3 . EV3 < pl . jgwozdz . brickcommand . brick . ev3 . TestEvent , pl . jgwozdz . brickcommand . brick . ev3 . TestResult , pl . jgwozdz . brickcommand . brick . ev3 . MailboxEV3Command , pl . jgwozdz . brickcommand . brick . ev3 . IncomingEV3Command > ev3 = new pl . jgwozdz . brickcommand . brick . ev3 . EV3 ( device , translator ) ; pl . jgwozdz . brickcommand . brick . ev3 . TestResult result = ev3 . process ( new pl . jgwozdz . brickcommand . brick . ev3 . TestEvent ( ) ) ; "<AssertPlaceHolder>" ; } process ( T extends pl . jgwozdz . brickcommand . brick . BrickEvent ) { T3 [ ] messages = translator . convertEventToMessages ( event ) ; S3 resultMessage = sendCommand ( messages ) ; S result = translator . convertMessageToResult ( resultMessage , event ) ; return result ; }
org . junit . Assert . assertSame ( mr , result )
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . portal . kernel . model . LayoutRevision missingLayoutRevision = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . media . image . service . persistence . AMImageEntryUtil . getPersistence ( ) . fetchByPrimaryKey ( amImageEntryId ) ; }
org . junit . Assert . assertNull ( missingLayoutRevision )
testCreateType ( ) { final org . codefamily . crabs . core . TypeDefinition typeDefinition = new org . codefamily . crabs . core . TypeDefinition ( new org . codefamily . crabs . core . IndexDefinition ( new org . codefamily . crabs . core . Identifier ( "storm_log" ) ) , new org . codefamily . crabs . core . Identifier ( "BJHC_16779" ) , true , false ) ; typeDefinition . defineStringField ( new org . codefamily . crabs . core . Identifier ( "_string" ) ) ; typeDefinition . defineIntegerField ( new org . codefamily . crabs . core . Identifier ( "_integer" ) ) . asPrimaryField ( ) ; typeDefinition . defineLongField ( new org . codefamily . crabs . core . Identifier ( "_long" ) ) ; typeDefinition . defineFloatField ( new org . codefamily . crabs . core . Identifier ( "_float" ) ) ; typeDefinition . defineDoubleField ( new org . codefamily . crabs . core . Identifier ( "_double" ) ) ; typeDefinition . defineBooleanField ( new org . codefamily . crabs . core . Identifier ( "_boolean" ) ) ; typeDefinition . defineDateField ( new org . codefamily . crabs . core . Identifier ( "_date" ) , org . codefamily . crabs . Constants . PATTERN_YYYY_MM_DD_HH_MM_SS ) ; typeDefinition . publish ( ) ; if ( this . typeDefinitionManager . exists ( typeDefinition ) ) { this . typeDefinitionManager . dropType ( typeDefinition ) ; } this . typeDefinitionManager . createType ( typeDefinition ) ; "<AssertPlaceHolder>" ; } exists ( org . codefamily . crabs . core . Identifier ) { final class IndexExists implements org . codefamily . crabs . core . client . AdvancedClient . InternalIndicesRequestBuilder < org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsRequest , org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsResponse , org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsRequestBuilder , org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsAction , org . codefamily . crabs . core . Identifier > { @ org . codefamily . crabs . core . client . Override public final org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsAction buildAction ( ) { return org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsAction . INSTANCE ; } @ org . codefamily . crabs . core . client . Override public final org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsRequest buildRequest ( final org . elasticsearch . client . IndicesAdminClient adminClient , final org . codefamily . crabs . core . Identifier value ) throws org . codefamily . crabs . exception . CrabsException { org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsRequestBuilder builder = new org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsRequestBuilder ( adminClient , value . toString ( ) ) ; return builder . request ( ) ; } } final class Result { private boolean isExists ; } final Result result = new Result ( ) ; this . advancedClient . execute ( new IndexExists ( ) , new org . codefamily . crabs . core . client . AdvancedClient . ResponseCallback < org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsResponse > ( ) { @ java . lang . Override public final void callback ( final org . elasticsearch . action . admin . indices . exists . indices . IndicesExistsResponse response ) throws org . codefamily . crabs . exception . CrabsException { result . isExists = response . isExists ( ) ; } } , indexIdentifier ) ; return result . isExists ; }
org . junit . Assert . assertTrue ( this . typeDefinitionManager . exists ( typeDefinition ) )
basicToArrayWithModel ( ) { cowaList . add ( 1 ) ; java . lang . Integer [ ] result = cowaList . toArray ( model ) ; "<AssertPlaceHolder>" ; } toArray ( T [ ] ) { refreshCopyIfNecessary ( ) ; return ( ( T [ ] ) ( ourCopy ) ) ; }
org . junit . Assert . assertArrayEquals ( new java . lang . Integer [ ] { 1 } , result )
testFXMLIntegrity ( ) { com . bitplan . obdii . TestAppGUI . FXMLSampleApp sampleApp = new com . bitplan . obdii . TestAppGUI . FXMLSampleApp ( "FXMLIntegrity" ) ; sampleApp . showAndOpen ( ) ; com . bitplan . obdii . TestAppGUI . Entity [ ] entities = new com . bitplan . obdii . TestAppGUI . Entity [ ] { new com . bitplan . obdii . TestAppGUI . Entity ( "vehicle" , com . bitplan . can4eve . Vehicle . class , "preferencesGroup" , "vehicleForm" ) , new com . bitplan . obdii . TestAppGUI . Entity ( "owner" , com . bitplan . can4eve . Owner . class , "preferencesGroup" , "ownerForm" ) , new com . bitplan . obdii . TestAppGUI . Entity ( "preferences" , com . bitplan . appconfig . Preferences . class , "preferencesGroup" , "preferencesForm" ) } ; for ( com . bitplan . obdii . TestAppGUI . Entity entity : entities ) { com . bitplan . javafx . BasePresenter < ? > presenter = sampleApp . fxml . loadPresenter ( entity . name , entity . clazz , exceptionHandler ) ; "<AssertPlaceHolder>" ; } sampleApp . close ( ) ; } showAndOpen ( ) { sampleApp . show ( ) ; sampleApp . waitOpen ( ) ; app = com . bitplan . gui . App . getInstance ( OBDMain . APP_PATH ) ; fxml = new com . bitplan . javafx . JFXML ( com . bitplan . obdii . javafx . JavaFXDisplay . RESOURCE_PATH , sampleApp . getStage ( ) , app ) ; }
org . junit . Assert . assertNotNull ( presenter )
check_db_and_jars_with_same_maintenance_version_is_accepted ( ) { given_DB_Jar_Home_Versions ( "6.1.1" , "6.1.1-SNAPSHOT" ) ; java . lang . Boolean sameVersion = checkPlatformVersion . call ( ) ; "<AssertPlaceHolder>" ; } call ( ) { try { org . bonitasoft . engine . commons . JavaMethodInvoker jmi = new org . bonitasoft . engine . commons . JavaMethodInvoker ( ) ; jmi . invokeJavaMethod ( "au.edu.sydney.faas.applicationstudent.StudentInformation" , valueToSetObjectWith , objectToInvokeJavaMethodOn , "setStudentInformation" , "au.edu.sydney.faas.applicationstudent.StudentInformation" ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( e ) ; } return null ; }
org . junit . Assert . assertTrue ( sameVersion )
testNullTargetExtraction ( ) { com . seovic . core . Extractor ext = createExtractor ( "name" ) ; "<AssertPlaceHolder>" ; } extract ( java . lang . Object ) { if ( target == null ) { return null ; } if ( ! ( target instanceof java . util . Map ) ) { throw new java . lang . IllegalArgumentException ( "Extraction<sp>target<sp>is<sp>not<sp>a<sp>Map" ) ; } return ( ( T ) ( ( ( java . util . Map ) ( target ) ) . get ( key ) ) ) ; }
org . junit . Assert . assertNull ( ext . extract ( null ) )
findMainClassByStackTrace_invalidClass ( ) { java . lang . RuntimeException re = org . powermock . api . mockito . PowerMockito . mock ( org . apache . servicecomb . foundation . common . utils . RuntimeException . class ) ; org . powermock . api . mockito . PowerMockito . when ( re . getStackTrace ( ) ) . thenReturn ( new java . lang . StackTraceElement [ ] { new java . lang . StackTraceElement ( "declaring.class.fileName" , "methodName" , "fileName" , 100 ) , new java . lang . StackTraceElement ( "InvalidClass" , "main" , "fileName" , 120 ) } ) ; org . powermock . api . mockito . PowerMockito . whenNew ( org . apache . servicecomb . foundation . common . utils . RuntimeException . class ) . withNoArguments ( ) . thenReturn ( re ) ; "<AssertPlaceHolder>" ; } findMainClassByStackTrace ( ) { java . lang . String mainClass = null ; java . lang . StackTraceElement [ ] stackTrace = new java . lang . RuntimeException ( ) . getStackTrace ( ) ; if ( ( stackTrace != null ) && ( ( stackTrace . length ) > 0 ) ) { for ( java . lang . StackTraceElement stackTraceElement : stackTrace ) { if ( "main" . equals ( stackTraceElement . getMethodName ( ) ) ) { mainClass = stackTraceElement . getClassName ( ) ; break ; } } } if ( org . apache . commons . lang3 . StringUtils . isEmpty ( mainClass ) ) { org . apache . servicecomb . foundation . common . utils . JvmUtils . LOGGER . info ( "Can't<sp>found<sp>main<sp>class<sp>by<sp>stackTrace." ) ; return null ; } try { java . lang . Class < ? > cls = java . lang . Class . forName ( mainClass ) ; org . apache . servicecomb . foundation . common . utils . JvmUtils . LOGGER . info ( "Found<sp>main<sp>class<sp>\"{}\"<sp>by<sp>stackTrace." , mainClass ) ; return cls ; } catch ( java . lang . Throwable e ) { org . apache . servicecomb . foundation . common . utils . JvmUtils . LOGGER . warn ( "\"{}\"<sp>is<sp>not<sp>a<sp>valid<sp>class." , mainClass , e ) ; return null ; } }
org . junit . Assert . assertNull ( org . apache . servicecomb . foundation . common . utils . JvmUtils . findMainClassByStackTrace ( ) )
returnNullWhenRootDoesNotContainChildren ( ) { org . w3c . dom . Document document = org . apache . camel . idea . service . XmlUtils . loadDocument ( readTestXmlFileWithoutChildren ( ) , true ) ; org . w3c . dom . Element root = document . getDocumentElement ( ) ; org . w3c . dom . Node nothing = org . apache . camel . idea . service . XmlUtils . getChildNodeByTagName ( document , "description" ) ; "<AssertPlaceHolder>" ; } getChildNodeByTagName ( org . w3c . dom . Node , java . lang . String ) { org . w3c . dom . NodeList children = node . getChildNodes ( ) ; if ( ( children != null ) && ( ( children . getLength ( ) ) > 0 ) ) { for ( int i = 0 ; i < ( children . getLength ( ) ) ; i ++ ) { org . w3c . dom . Node child = children . item ( i ) ; if ( child instanceof org . w3c . dom . Element ) { org . w3c . dom . Element element = ( ( org . w3c . dom . Element ) ( child ) ) ; if ( name . equals ( element . getTagName ( ) ) ) { return element ; } } } } return null ; }
org . junit . Assert . assertNull ( nothing )
testSetGetName ( ) { final java . lang . String name = "a_name" ; config . setName ( name ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( name , config . getName ( ) )
bulkContainsAddedSourceItem ( ) { org . appenders . log4j2 . elasticsearch . BatchOperations < io . searchbox . core . Bulk > bulkOperations = org . appenders . log4j2 . elasticsearch . jest . JestHttpObjectFactoryTest . createTestObjectFactoryBuilder ( ) . build ( ) . createBatchOperations ( ) ; org . appenders . log4j2 . elasticsearch . BatchBuilder < io . searchbox . core . Bulk > batchBuilder = bulkOperations . createBatchBuilder ( ) ; java . lang . String testPayload = "{<sp>\"testfield\":<sp>\"testvalue\"<sp>}" ; org . appenders . log4j2 . elasticsearch . StringItemSource itemSource = spy ( new org . appenders . log4j2 . elasticsearch . StringItemSource ( testPayload ) ) ; io . searchbox . core . Index item = ( ( io . searchbox . core . Index ) ( bulkOperations . createBatchItem ( "testIndex" , itemSource ) ) ) ; batchBuilder . add ( item ) ; io . searchbox . core . Bulk bulk = batchBuilder . build ( ) ; verify ( itemSource ) . getSource ( ) ; io . searchbox . core . JestBatchIntrospector introspector = new io . searchbox . core . JestBatchIntrospector ( ) ; "<AssertPlaceHolder>" ; } items ( io . searchbox . core . Bulk ) { return introspected . bulkableActions . stream ( ) . map ( ( item ) -> itemIntrospector ( ) . getPayload ( ( ( AbstractDocumentTargetedAction < io . searchbox . core . DocumentResult > ) ( item ) ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; }
org . junit . Assert . assertEquals ( testPayload , introspector . items ( bulk ) . get ( 0 ) )
testGetGenericArgumentTypeDirect ( ) { java . lang . Class < ? > clazz = alien4cloud . utils . ReflectionUtil . getGenericArgumentType ( alien4cloud . utils . TestDirectPluginLinker . class , alien4cloud . plugin . IPluginLinker . class , 0 ) ; "<AssertPlaceHolder>" ; } getGenericArgumentType ( java . lang . Class , java . lang . Class , int ) { if ( implementationClass . isAssignableFrom ( genericClass ) ) { return null ; } java . lang . reflect . Type [ ] types = alien4cloud . utils . ReflectionUtil . getGenericArgumentTypes ( implementationClass , genericClass , implementationClass . getTypeParameters ( ) ) ; if ( types != null ) { return ( ( java . lang . Class < ? > ) ( types [ index ] ) ) ; } return null ; }
org . junit . Assert . assertEquals ( java . lang . String . class , clazz )
testReadFromWithIllegalMap ( ) { target = new org . o3project . odenos . remoteobject . event . BaseObjectChangedTest . TestClass ( action , prev , curr ) ; org . msgpack . MessagePack msg = new org . msgpack . MessagePack ( ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; org . msgpack . packer . Packer pk = msg . createPacker ( out ) ; byte [ ] bytes ; java . io . ByteArrayInputStream in ; org . msgpack . unpacker . Unpacker upk = null ; try { pk . writeMapBegin ( 2 ) ; pk . write ( "action" ) ; pk . write ( target . action ( ) ) ; pk . write ( "prev" ) ; pk . write ( target . prev ( ) ) ; pk . write ( "curr" ) ; pk . write ( target . curr ( ) ) ; pk . writeMapEnd ( ) ; bytes = out . toByteArray ( ) ; in = new java . io . ByteArrayInputStream ( bytes ) ; upk = msg . createUnpacker ( in ) ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( "Exception<sp>in<sp>test<sp>setup" ) ; } target = new org . o3project . odenos . remoteobject . event . BaseObjectChangedTest . TestClass ( java . lang . String . class ) ; try { target . readFrom ( upk ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; return ; } org . junit . Assert . fail ( "could<sp>not<sp>catch<sp>an<sp>exception" ) ; } readFrom ( org . msgpack . unpacker . Unpacker ) { int size = upk . readMapBegin ( ) ; if ( size != ( org . o3project . odenos . remoteobject . event . BaseObjectChanged . MSG_NUM ) ) { throw new java . io . IOException ( ) ; } while ( ( size -- ) > 0 ) { java . lang . String field = upk . readString ( ) ; switch ( field ) { case "action" : action = upk . readString ( ) ; break ; case "prev" : if ( ! ( upk . trySkipNil ( ) ) ) { prev = upk . read ( this . msgClass ) ; } break ; case "curr" : if ( ! ( upk . trySkipNil ( ) ) ) { curr = upk . read ( this . msgClass ) ; } break ; default : throw new java . io . IOException ( ) ; } } upk . readMapEnd ( ) ; }
org . junit . Assert . assertTrue ( ( e instanceof java . io . IOException ) )
toUrlConvertsEmptyStringToNull ( ) { java . net . URL emptyString = hudson . plugins . jira . JiraSite . toURL ( "" ) ; "<AssertPlaceHolder>" ; } toURL ( java . lang . String ) { url = hudson . Util . fixEmptyAndTrim ( url ) ; if ( url == null ) return null ; if ( ! ( url . endsWith ( "/" ) ) ) url = url + "/" ; try { return new java . net . URL ( url ) ; } catch ( java . net . MalformedURLException e ) { throw new java . lang . AssertionError ( e ) ; } }
org . junit . Assert . assertNull ( emptyString )
getMeetingsForWorkWeekOf ( ) { bnymellon . codekatas . calendarkata10 . var workWeek = this . calendar . getMeetingsForWorkWeekOf ( java . time . LocalDate . of ( 2017 , 7 , 6 ) ) ; "<AssertPlaceHolder>" ; System . out . println ( workWeek ) ; } getNumberOfMeetings ( ) { return this . meetings . size ( ) ; }
org . junit . Assert . assertEquals ( 4 , workWeek . getNumberOfMeetings ( ) )
testCreateSettingsPanel ( ) { System . out . println ( "createSettingsPanel" ) ; kg . apc . jmeter . vizualizers . HitsPerSecondGui instance = new kg . apc . jmeter . vizualizers . HitsPerSecondGui ( ) ; kg . apc . jmeter . vizualizers . JSettingsPanel result = instance . createSettingsPanel ( ) ; "<AssertPlaceHolder>" ; } createSettingsPanel ( ) { return new kg . apc . jmeter . vizualizers . JSettingsPanel ( this , ( ( ( ( ( ( ( JSettingsPanel . TIMELINE_OPTION ) | ( JSettingsPanel . GRADIENT_OPTION ) ) | ( JSettingsPanel . FINAL_ZEROING_OPTION ) ) | ( JSettingsPanel . LIMIT_POINT_OPTION ) ) | ( JSettingsPanel . MAXY_OPTION ) ) | ( JSettingsPanel . RELATIVE_TIME_OPTION ) ) | ( JSettingsPanel . MARKERS_OPTION ) ) ) ; }
org . junit . Assert . assertNotNull ( result )
testGetOffspringsSearchUrl ( ) { long parentId = 1212 ; java . lang . String url = pawpedsUrlService . getOffspringsSearchUrl ( parentId ) ; java . lang . String expectedUrl = ( "https://www.pawpeds.com/db/?a=o&id=" + parentId ) + "&g=2&p=nfo&date=iso&o=ajgrep" ; "<AssertPlaceHolder>" ; } getOffspringsSearchUrl ( long ) { com . catpeds . crawler . pawpeds . PawpedsUrlService . LOGGER . info ( "getOffspringsSearchUrl<sp>with<sp>id<sp>{}" , id ) ; return encodeUrl ( java . lang . String . format ( com . catpeds . crawler . pawpeds . PawpedsUrlService . URL_OFFSPRING_SEARCH , id ) ) ; }
org . junit . Assert . assertEquals ( expectedUrl , url )
testFindAll ( ) { "<AssertPlaceHolder>" ; } findAll ( ) { javax . persistence . Query query = entityManager . createQuery ( "select<sp>x<sp>from<sp>DefaultIssue<sp>x<sp>order<sp>by<sp>x.assignedtime<sp>desc" ) ; return query . getResultList ( ) ; }
org . junit . Assert . assertNotNull ( dao . findAll ( ) )
testXwPlusB ( ) { org . nd4j . autodiff . samediff . SameDiff sameDiff = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . linalg . api . ndarray . INDArray input = org . nd4j . linalg . factory . Nd4j . create ( new long [ ] { 2 , 2 } ) ; org . nd4j . linalg . api . ndarray . INDArray weights = org . nd4j . linalg . factory . Nd4j . create ( new long [ ] { 2 , 2 } ) ; org . nd4j . linalg . api . ndarray . INDArray b = org . nd4j . linalg . factory . Nd4j . create ( new long [ ] { 1 , 2 } ) ; org . nd4j . autodiff . samediff . SDVariable sdInput = sameDiff . var ( "input" , input ) ; org . nd4j . autodiff . samediff . SDVariable sdWeights = sameDiff . var ( "weights" , weights ) ; org . nd4j . autodiff . samediff . SDVariable sdBias = sameDiff . var ( "bias" , b ) ; org . nd4j . autodiff . samediff . SDVariable res = sameDiff . xwPlusB ( sdInput , sdWeights , sdBias ) ; sameDiff . exec ( ) ; org . nd4j . linalg . api . ndarray . INDArray out = res . getArr ( ) ; "<AssertPlaceHolder>" ; } getShape ( ) { long [ ] initialShape = sameDiff . getShapeForVarName ( getVarName ( ) ) ; if ( initialShape == null ) { org . nd4j . autodiff . samediff . val arr = getArr ( ) ; if ( arr != null ) return arr . shape ( ) ; } return initialShape ; }
org . junit . Assert . assertArrayEquals ( new long [ ] { 2 , 2 } , res . getShape ( ) )
testAtomTypeNameAndIDBug ( ) { org . openscience . cdk . interfaces . IAtomType a = ( ( org . openscience . cdk . interfaces . IAtomType ) ( newChemObject ( ) ) ) ; a . setID ( "carbon1" ) ; a . setAtomTypeName ( "C.sp3" ) ; "<AssertPlaceHolder>" ; } getID ( ) { return null ; }
org . junit . Assert . assertEquals ( "carbon1" , a . getID ( ) )
testGetPermissionProviderNoSupportedPaths ( ) { org . apache . jackrabbit . oak . spi . security . authorization . cug . impl . CugConfiguration cc = org . apache . jackrabbit . oak . spi . security . authorization . cug . impl . CugConfigurationTest . createConfiguration ( org . apache . jackrabbit . oak . spi . security . ConfigurationParameters . of ( CugConstants . PARAM_CUG_ENABLED , true ) ) ; org . apache . jackrabbit . oak . spi . security . authorization . permission . PermissionProvider pp = cc . getPermissionProvider ( root , "default" , com . google . common . collect . ImmutableSet . < java . security . Principal > of ( org . apache . jackrabbit . oak . spi . security . principal . EveryonePrincipal . getInstance ( ) ) ) ; "<AssertPlaceHolder>" ; } getInstance ( ) { return org . apache . jackrabbit . oak . spi . security . authorization . permission . EmptyPermissionProvider . INSTANCE ; }
org . junit . Assert . assertSame ( org . apache . jackrabbit . oak . spi . security . authorization . permission . EmptyPermissionProvider . getInstance ( ) , pp )
testFindInvalidFeatureDescriptor ( ) { props . setProperty ( XmlPropertyReader . CONFIG_PROPERTY , com . tacitknowledge . flip . properties . XmlPropertyReaderTest . CONFIG_FILE1 ) ; propertyReader . initialize ( props ) ; com . tacitknowledge . flip . model . FeatureDescriptor featureDescriptor = propertyReader . getFeatureDescriptor ( "test1" ) ; "<AssertPlaceHolder>" ; } getFeatureDescriptor ( java . lang . String ) { for ( final com . tacitknowledge . flip . properties . PropertyReader reader : propertyReaders ) { final com . tacitknowledge . flip . model . FeatureDescriptor descriptor = reader . getFeatureDescriptor ( name ) ; if ( descriptor != null ) { return descriptor ; } } throw new com . tacitknowledge . flip . exceptions . MissingFeatureDescriptorException ( java . lang . String . format ( "Couldn't<sp>find<sp>a<sp>feature<sp>descriptor<sp>for<sp>feature<sp>named<sp>[%s]." , name ) ) ; }
org . junit . Assert . assertNull ( featureDescriptor )
loginError ( ) { when ( authenticationException . getMessage ( ) ) . thenReturn ( "message" ) ; when ( session . getAttribute ( WebAttributes . AUTHENTICATION_EXCEPTION ) ) . thenReturn ( authenticationException ) ; java . lang . String view = new de . blizzy . documentr . web . access . AccessController ( ) . loginError ( session , model ) ; "<AssertPlaceHolder>" ; verify ( model ) . addAttribute ( "errorMessage" , "message" ) ; } loginError ( javax . servlet . http . HttpSession , org . springframework . ui . Model ) { org . springframework . security . core . AuthenticationException exception = ( ( org . springframework . security . core . AuthenticationException ) ( session . getAttribute ( WebAttributes . AUTHENTICATION_EXCEPTION ) ) ) ; java . lang . String msg = getMessage ( exception ) ; if ( org . apache . commons . lang3 . StringUtils . isNotBlank ( msg ) ) { model . addAttribute ( "errorMessage" , msg ) ; } return "/login" ; }
org . junit . Assert . assertEquals ( "/login" , view )
cantGenerateStepLeft ( ) { com . google . hashcode . entity . Slice slice = new com . google . hashcode . entity . Slice ( java . util . Arrays . asList ( new com . google . hashcode . entity . Cell ( 0 , 0 , Ingredient . MUSHROOM ) , new com . google . hashcode . entity . Cell ( 0 , 1 , Ingredient . TOMATO ) ) ) ; "<AssertPlaceHolder>" ; } generateStepLeft ( com . google . hashcode . entity . Pizza ) { com . google . hashcode . entity . Slice delta = new com . google . hashcode . entity . Slice ( ) ; for ( int y = this . minY ( ) ; y <= ( this . maxY ( ) ) ; y ++ ) { com . google . hashcode . entity . Optional < com . google . hashcode . entity . Cell > cell = pizza . getCell ( y , ( ( minX ( ) ) - 1 ) ) ; if ( cell . isPresent ( ) ) { delta . cells . add ( cell . get ( ) ) ; } else { com . google . hashcode . entity . Slice . LOGGER . debug ( "cant<sp>perform<sp>step<sp>left<sp>!" ) ; return null ; } } com . google . hashcode . entity . Slice . LOGGER . debug ( ( ( "generateStepLeft" + "\nstep<sp>left<sp>delta:<sp>" ) + ( delta . toString ( ) ) ) ) ; com . google . hashcode . entity . Step step = new com . google . hashcode . entity . Step ( this , delta ) ; if ( step . isValid ( pizza ) ) { return step ; } else { com . google . hashcode . entity . Slice . LOGGER . debug ( "step<sp>is<sp>invalid<sp>!" ) ; return null ; } }
org . junit . Assert . assertEquals ( null , slice . generateStepLeft ( pizza ) )
testIteratorMissingElement ( ) { it . unimi . dsi . fastutil . ints . IntLinkedOpenHashSet s = new it . unimi . dsi . fastutil . ints . IntLinkedOpenHashSet ( it . unimi . dsi . fastutil . Hash . DEFAULT_INITIAL_SIZE ) ; for ( int i = 0 ; i < 100 ; i ++ ) "<AssertPlaceHolder>" ; s . iterator ( 1000 ) ; }
org . junit . Assert . assertTrue ( s . add ( i ) )
testGetFormat4 ( ) { server . setHandler ( new org . eclipse . jetty . server . handler . DefaultHandler ( ) { @ edu . illinois . library . cantaloupe . source . Override public void handle ( java . lang . String target , org . eclipse . jetty . server . Request baseRequest , javax . servlet . http . HttpServletRequest request , javax . servlet . http . HttpServletResponse response ) { response . setHeader ( "Content-Type" , "application/octet-stream" ) ; baseRequest . setHandled ( true ) ; } } ) ; server . start ( ) ; instance . setIdentifier ( new edu . illinois . library . cantaloupe . image . Identifier ( "jpg" ) ) ; "<AssertPlaceHolder>" ; } getFormat ( ) { if ( ( format ) == null ) { format = edu . illinois . library . cantaloupe . image . Format . UNKNOWN ; final edu . illinois . library . cantaloupe . source . S3ObjectInfo info = getObjectInfo ( ) ; edu . illinois . library . cantaloupe . source . S3Source . LOGGER . debug ( "Inferring<sp>format<sp>from<sp>object<sp>key<sp>for<sp>{}" , info ) ; format = edu . illinois . library . cantaloupe . image . Format . inferFormat ( info . getKey ( ) ) ; if ( Format . UNKNOWN . equals ( format ) ) { edu . illinois . library . cantaloupe . source . S3Source . LOGGER . debug ( "Inferring<sp>format<sp>from<sp>identifier<sp>for<sp>{}" , info ) ; format = edu . illinois . library . cantaloupe . image . Format . inferFormat ( identifier ) ; } if ( Format . UNKNOWN . equals ( format ) ) { edu . illinois . library . cantaloupe . source . S3Source . LOGGER . debug ( "Inferring<sp>format<sp>from<sp>Content-Type<sp>header<sp>for<sp>{}" , info ) ; java . lang . String contentType = getObjectAttributes ( ) . contentType ; if ( ( contentType != null ) && ( ! ( contentType . isEmpty ( ) ) ) ) { format = new edu . illinois . library . cantaloupe . image . MediaType ( contentType ) . toFormat ( ) ; } if ( Format . UNKNOWN . equals ( format ) ) { edu . illinois . library . cantaloupe . source . S3Source . LOGGER . debug ( "Inferring<sp>format<sp>from<sp>magic<sp>bytes<sp>for<sp>{}" , info ) ; try ( java . io . InputStream is = new java . io . BufferedInputStream ( edu . illinois . library . cantaloupe . source . S3Source . newObjectInputStream ( info , edu . illinois . library . cantaloupe . source . S3Source . FORMAT_INFERENCE_RANGE ) ) ) { java . util . List < edu . illinois . library . cantaloupe . image . MediaType > types = edu . illinois . library . cantaloupe . image . MediaType . detectMediaTypes ( is ) ; if ( ! ( types . isEmpty ( ) ) ) { format = types . get ( 0 ) . toFormat ( ) ; } } } } } return format ; }
org . junit . Assert . assertEquals ( Format . UNKNOWN , instance . getFormat ( ) )
testSelectFromWhereDecimalNumber ( ) { createFourArtistsTwoPaintings ( ) ; java . lang . String ejbql = "select<sp>P<sp>from<sp>Painting<sp>P<sp>WHERE<sp>p.estimatedPrice<sp><=<sp>5000.00" ; org . apache . cayenne . query . EJBQLQuery query = new org . apache . cayenne . query . EJBQLQuery ( ejbql ) ; java . util . List < ? > ps = context . performQuery ( query ) ; "<AssertPlaceHolder>" ; } size ( ) { return neighbors . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , ps . size ( ) )
testPutKeysReverseOrdering ( ) { edu . ucla . sspace . util . TrieMap < java . lang . String > m = new edu . ucla . sspace . util . TrieMap < java . lang . String > ( ) ; m . put ( "coconut" , "2" ) ; m . put ( "banana" , "1" ) ; m . put ( "apple" , "0" ) ; "<AssertPlaceHolder>" ; } size ( ) { int size = 0 ; for ( T t : this ) size ++ ; return size ; }
org . junit . Assert . assertEquals ( 3 , m . size ( ) )
g_VX2X_hasXname_markoX ( ) { final org . apache . tinkerpop . gremlin . process . traversal . Traversal < org . apache . tinkerpop . gremlin . structure . Vertex , org . apache . tinkerpop . gremlin . structure . Vertex > traversal = get_g_VX1X_hasXname_markoX ( convertToVertexId ( "vadas" ) ) ; printTraversalForm ( traversal ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { if ( ! ( this . locked ) ) this . applyStrategies ( ) ; return ( ( this . lastTraverser . bulk ( ) ) > 0L ) || ( this . finalEndStep . hasNext ( ) ) ; }
org . junit . Assert . assertFalse ( traversal . hasNext ( ) )
getUsageTextTest ( ) { java . lang . String expectedUsageText = "Usage:<sp>dummy-admin<sp>--foo=foo<sp>[--bar=false]<sp>--hello=there<sp>world<sp>" ; com . sun . enterprise . v3 . admin . CommandRunnerTest . DummyAdminCommand dac = new com . sun . enterprise . v3 . admin . CommandRunnerTest . DummyAdminCommand ( ) ; org . glassfish . api . admin . CommandModel model = new org . glassfish . common . util . admin . CommandModelImpl ( com . sun . enterprise . v3 . admin . CommandRunnerTest . DummyAdminCommand . class ) ; java . lang . String actualUsageText = cr . getUsageText ( model ) ; "<AssertPlaceHolder>" ; } getUsageText ( com . sun . enterprise . v3 . admin . CommandModel ) { java . lang . StringBuilder usageText = new java . lang . StringBuilder ( ) ; java . lang . String usage ; if ( com . sun . enterprise . v3 . admin . CommandRunnerImpl . ok ( ( usage = model . getUsageText ( ) ) ) ) { usageText . append ( com . sun . enterprise . v3 . admin . CommandRunnerImpl . adminStrings . getLocalString ( "adapter.usage" , "Usage:<sp>" ) ) ; usageText . append ( usage ) ; return usageText . toString ( ) ; } else { return com . sun . enterprise . v3 . admin . CommandRunnerImpl . generateUsageText ( model ) ; } }
org . junit . Assert . assertEquals ( expectedUsageText , actualUsageText )
testWeekFloorTimestampInWhere ( ) { java . sql . Connection conn = java . sql . DriverManager . getConnection ( getUrl ( ) ) ; java . sql . ResultSet rs = conn . createStatement ( ) . executeQuery ( ( ( "SELECT<sp>*<sp>FROM<sp>" + ( tableName ) ) + "<sp>WHERE<sp>FLOOR(ts,<sp>'week')<sp>=<sp>to_date('2011-12-26<sp>00:00:00')" ) ) ; "<AssertPlaceHolder>" ; } next ( ) { if ( ! ( org . apache . phoenix . util . CursorUtil . moreValues ( cursorName ) ) ) { return null ; } else if ( ( fetchSize ) == ( rowsRead ) ) { return null ; } org . apache . phoenix . schema . tuple . Tuple next = delegate . next ( ) ; org . apache . phoenix . util . CursorUtil . updateCursor ( cursorName , next , delegate . peek ( ) ) ; ( rowsRead ) ++ ; return next ; }
org . junit . Assert . assertTrue ( rs . next ( ) )
testArrayIndex4 ( ) { com . jmethods . catatumbo . entities . ParentEntity parentEntity = new com . jmethods . catatumbo . entities . ParentEntity ( ) ; parentEntity . setField1 ( "ArrayIndexTest" ) ; parentEntity = com . jmethods . catatumbo . EntityManagerTest . em . insert ( parentEntity ) ; com . jmethods . catatumbo . entities . ArrayIndex entity = com . jmethods . catatumbo . entities . ArrayIndex . getSampleEntity ( ) ; entity . setParentKey ( parentEntity . getKey ( ) ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . insert ( entity ) ; java . lang . String gql = "SELECT<sp>*<sp>FROM<sp>ArrayIndex<sp>WHERE<sp>unindexedStringSet=@1<sp>AND<sp>__key__<sp>HAS<sp>ANCESTOR<sp>@2" ; com . jmethods . catatumbo . EntityQueryRequest request = com . jmethods . catatumbo . EntityManagerTest . em . createEntityQueryRequest ( gql ) ; request . addPositionalBinding ( "Two" ) ; request . addPositionalBinding ( parentEntity . getKey ( ) ) ; com . jmethods . catatumbo . QueryResponse < com . jmethods . catatumbo . entities . ArrayIndex > response = com . jmethods . catatumbo . EntityManagerTest . em . executeEntityQueryRequest ( com . jmethods . catatumbo . entities . ArrayIndex . class , request ) ; java . util . List < com . jmethods . catatumbo . entities . ArrayIndex > results = response . getResults ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , results . size ( ) )
validateNull ( ) { "<AssertPlaceHolder>" ; } validator ( ) { return null ; }
org . junit . Assert . assertFalse ( mapping . validator ( ) . validate ( null ) )
testWriteLinesEncoding_WithAppendOptionFalse_ShouldDeletePreviousFileLines ( ) { final java . io . File file = org . apache . commons . io . testtools . TestUtils . newFile ( getTestDirectory ( ) , "lines.txt" ) ; org . apache . commons . io . FileUtils . writeStringToFile ( file , "This<sp>line<sp>was<sp>there<sp>before<sp>you..." ) ; final java . util . List < java . lang . String > linesToAppend = java . util . Arrays . asList ( "my<sp>first<sp>line" , "The<sp>second<sp>Line" ) ; org . apache . commons . io . FileUtils . writeLines ( file , null , linesToAppend , false ) ; final java . lang . String expected = ( ( "my<sp>first<sp>line" + ( org . apache . commons . io . IOUtils . LINE_SEPARATOR ) ) + "The<sp>second<sp>Line" ) + ( org . apache . commons . io . IOUtils . LINE_SEPARATOR ) ; final java . lang . String actual = org . apache . commons . io . FileUtils . readFileToString ( file ) ; "<AssertPlaceHolder>" ; } readFileToString ( java . io . File ) { return org . apache . commons . io . FileUtils . readFileToString ( file , java . nio . charset . Charset . defaultCharset ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
providerFilterBeforeQueryFilter ( ) { dataProvider . setFilter ( ( item ) -> false ) ; int size = dataProvider . size ( new com . vaadin . flow . data . provider . Query ( ( item ) -> { org . junit . Assert . fail ( "This<sp>filter<sp>should<sp>never<sp>be<sp>invoked" ) ; return true ; } ) ) ; "<AssertPlaceHolder>" ; } size ( com . vaadin . flow . data . provider . Query ) { return sizeInBackEnd ( mixInSortOrders ( query ) ) ; }
org . junit . Assert . assertEquals ( 0 , size )
plaintextReplace ( ) { java . lang . Boolean prettyPrint = true ; gov . uspto . patent . doc . xml . FormattedText format = new gov . uspto . patent . doc . xml . FormattedText ( ) ; java . lang . StringBuilder stb = new java . lang . StringBuilder ( ) ; stb . append ( "<p>" ) ; stb . append ( "<a<sp>class=\"figref\">1232<a>" ) ; stb . append ( "</p>" ) ; java . lang . String expect = "\nFIG-REF\n" ; gov . uspto . patent . doc . simplehtml . FreetextConfig textConfig = new gov . uspto . patent . doc . simplehtml . FreetextConfig ( prettyPrint , false ) ; textConfig . replace ( HtmlFieldType . FIGREF , "FIG-REF" ) ; java . lang . String actual = format . getPlainText ( stb . toString ( ) , textConfig ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "NameDateRangeFileFilter<sp>[dateRange=" + ( dateRange ) ) + ",<sp>nameDateRegexs=" ) + ( nameDateRegexs ) ) + "]" ; }
org . junit . Assert . assertEquals ( expect , actual )
testValidateInvalidOperand ( ) { net . objecthunter . exp4j . Expression exp = new net . objecthunter . exp4j . ExpressionBuilder ( "1<sp>+<sp>" ) . build ( ) ; net . objecthunter . exp4j . ValidationResult result = exp . validate ( false ) ; "<AssertPlaceHolder>" ; } isValid ( ) { return valid ; }
org . junit . Assert . assertFalse ( result . isValid ( ) )
testCollect ( ) { byte [ ] a = new byte [ ] { 1 , 2 , 3 } ; byte [ ] b = new byte [ ] { 4 , 5 , 6 } ; byte [ ] result = io . reactivex . Flowable . just ( a , b ) . to ( com . github . davidmoten . rx2 . Bytes . collect ( ) ) . blockingGet ( ) ; "<AssertPlaceHolder>" ; } collect ( ) { return new io . reactivex . functions . Function < io . reactivex . Flowable < byte [ ] > , io . reactivex . Single < byte [ ] > > ( ) { @ com . github . davidmoten . rx2 . Override public io . reactivex . Single < byte [ ] > apply ( io . reactivex . Flowable < byte [ ] > source ) throws com . github . davidmoten . rx2 . Exception { return com . github . davidmoten . rx2 . Bytes . collect ( source ) ; } } ; }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( new byte [ ] { 1 , 2 , 3 , 4 , 5 , 6 } , result ) )
testBevatVerwerkingStoppendeMelding ( ) { final nl . bzk . brp . bijhouding . business . stappen . resultaat . Resultaat resultaat = nl . bzk . brp . bijhouding . business . stappen . resultaat . Resultaat . builder ( ) . withMeldingen ( singleton ( nl . bzk . brp . bijhouding . business . stappen . resultaat . ResultaatMelding . builder ( ) . withRegel ( Regel . AUTH0001 ) . build ( ) ) ) . build ( ) ; "<AssertPlaceHolder>" ; } bevatVerwerkingStoppendeMelding ( ) { for ( nl . bzk . brp . bijhouding . business . stappen . resultaat . ResultaatMelding melding : getMeldingen ( ) ) { if ( melding . isVerwerkingStoppend ( ) ) { return true ; } } return false ; }
org . junit . Assert . assertThat ( resultaat . bevatVerwerkingStoppendeMelding ( ) , org . hamcrest . core . Is . is ( true ) )
moveDirectory_theSourceDirectoryShouldNotExist ( ) { initRepository ( ) ; writeToCache ( "/source/file.txt" ) ; commitToMaster ( ) ; initGitFileSystem ( ) ; com . beijunyi . parallelgit . filesystem . GitPath source = gfs . getPath ( "/source" ) ; com . beijunyi . parallelgit . filesystem . GitPath target = gfs . getPath ( "/target" ) ; com . beijunyi . parallelgit . filesystem . Files . move ( source , target ) ; "<AssertPlaceHolder>" ; } getPath ( java . net . URI ) { com . beijunyi . parallelgit . filesystem . GitFileSystem gfs = getFileSystem ( uri ) ; java . lang . String file = com . beijunyi . parallelgit . filesystem . utils . GfsUriUtils . getFile ( uri ) ; return gfs . getPath ( file ) . toRealPath ( ) ; }
org . junit . Assert . assertFalse ( com . beijunyi . parallelgit . filesystem . Files . exists ( source ) )
testSerialization ( ) { org . jfree . data . KeyedObjects ko1 = new org . jfree . data . KeyedObjects ( ) ; ko1 . addObject ( "Key<sp>1" , "Object<sp>1" ) ; ko1 . addObject ( "Key<sp>2" , null ) ; ko1 . addObject ( "Key<sp>3" , "Object<sp>2" ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( ko1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . data . KeyedObjects ko2 = ( ( org . jfree . data . KeyedObjects ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
org . junit . Assert . assertEquals ( ko1 , ko2 )