signature
stringlengths 43
39.1k
| implementation
stringlengths 0
450k
|
|---|---|
public class AsmUtils { /** * Checks if two { @ link FieldInsnNode } are equals .
* @ param insn1 the insn1
* @ param insn2 the insn2
* @ return true , if successful */
public static boolean fieldInsnEqual ( FieldInsnNode insn1 , FieldInsnNode insn2 ) { } }
|
return insn1 . owner . equals ( insn2 . owner ) && insn1 . name . equals ( insn2 . name ) && insn1 . desc . equals ( insn2 . desc ) ;
|
public class OWLSServiceBuilder { /** * Builds an OWLSAtomicService , from a given URI that has to be a local file
* or an http URL
* @ param serviceURI the URI for the service location
* @ param modelURIs a List of URIs for ontologies that may be used by the
* service to be loaded ( currently needed when the service is written in
* functional or turtle syntax )
* @ return
* @ throws ModelException */
private OWLSAtomicService buildOWLSServiceFromLocalOrRemoteURI ( URI serviceURI , List < URI > modelURIs ) throws ModelException { } }
|
BSDFLogger . getLogger ( ) . info ( "Builds OWL service (BSDF functionality) from: " + serviceURI . toString ( ) ) ; OWLContainer owlSyntaxTranslator = new OWLContainer ( ) ; OWLKnowledgeBase kb = KBWithReasonerBuilder . newKB ( ) ; if ( null != modelURIs ) { for ( URI uri : modelURIs ) { owlSyntaxTranslator . loadOntologyIfNotLoaded ( uri ) ; } } owlSyntaxTranslator . loadAsServiceIntoKB ( kb , serviceURI ) ; OWLSAtomicService service = new OWLSAtomicService ( kb . getServices ( false ) . iterator ( ) . next ( ) ) ; return completeOWLSServiceIfNeeded ( service ) ;
|
public class ElementMatchers { /** * Matches a { @ link ByteCodeElement } ' s descriptor against a given value .
* @ param descriptor The expected descriptor .
* @ param < T > The type of the matched object .
* @ return A matcher for the given { @ code descriptor } . */
public static < T extends ByteCodeElement > ElementMatcher . Junction < T > hasDescriptor ( String descriptor ) { } }
|
return new DescriptorMatcher < T > ( new StringMatcher ( descriptor , StringMatcher . Mode . EQUALS_FULLY ) ) ;
|
public class DemoInterceptor { /** * This method will add a DemoInterceptor into every in and every out phase
* of the interceptor chains .
* @ param provider */
public static void addInterceptors ( InterceptorProvider provider ) { } }
|
PhaseManager phases = BusFactory . getDefaultBus ( ) . getExtension ( PhaseManager . class ) ; for ( Phase p : phases . getInPhases ( ) ) { provider . getInInterceptors ( ) . add ( new DemoInterceptor ( p . getName ( ) ) ) ; provider . getInFaultInterceptors ( ) . add ( new DemoInterceptor ( p . getName ( ) ) ) ; } for ( Phase p : phases . getOutPhases ( ) ) { provider . getOutInterceptors ( ) . add ( new DemoInterceptor ( p . getName ( ) ) ) ; provider . getOutFaultInterceptors ( ) . add ( new DemoInterceptor ( p . getName ( ) ) ) ; }
|
public class ViewDescriptor { /** * Possible { @ link ListViewColumnDescriptor } s that can be used with this view . */
public List < Descriptor < ListViewColumn > > getColumnsDescriptors ( ) { } }
|
StaplerRequest request = Stapler . getCurrentRequest ( ) ; if ( request != null ) { View view = request . findAncestorObject ( clazz ) ; return view == null ? DescriptorVisibilityFilter . applyType ( clazz , ListViewColumn . all ( ) ) : DescriptorVisibilityFilter . apply ( view , ListViewColumn . all ( ) ) ; } return ListViewColumn . all ( ) ;
|
public class AddressClient { /** * Returns the specified address resource .
* < p > Sample code :
* < pre > < code >
* try ( AddressClient addressClient = AddressClient . create ( ) ) {
* ProjectRegionAddressName address = ProjectRegionAddressName . of ( " [ PROJECT ] " , " [ REGION ] " , " [ ADDRESS ] " ) ;
* Address response = addressClient . getAddress ( address . toString ( ) ) ;
* < / code > < / pre >
* @ param address Name of the address resource to return .
* @ throws com . google . api . gax . rpc . ApiException if the remote call fails */
@ BetaApi public final Address getAddress ( String address ) { } }
|
GetAddressHttpRequest request = GetAddressHttpRequest . newBuilder ( ) . setAddress ( address ) . build ( ) ; return getAddress ( request ) ;
|
public class FileUtil { /** * Checks if the file item size is within the supplied max file size .
* @ param newFile the file to be checked , if null then return false
* otherwise validate
* @ param maxFileSize max file size in bytes , if zero or negative return
* true , otherwise validate
* @ return { @ code true } if file size is valid . */
public static boolean validateFileSize ( final FileItemWrap newFile , final long maxFileSize ) { } }
|
// If newFile to validate is null , then return false
if ( newFile == null ) { return false ; } // If maxFileSize to validate is zero or negative , then assume newFile is valid
if ( maxFileSize < 1 ) { return true ; } return ( newFile . getSize ( ) <= maxFileSize ) ;
|
public class InternalXbaseWithAnnotationsParser { /** * InternalXbaseWithAnnotations . g : 2985:1 : ruleXClosure returns [ EObject current = null ] : ( ( ( ( ( ) ' [ ' ) ) = > ( ( ) otherlv _ 1 = ' [ ' ) ) ( ( ( ( ( ( ruleJvmFormalParameter ) ) ( ' , ' ( ( ruleJvmFormalParameter ) ) ) * ) ? ( ( ' | ' ) ) ) ) = > ( ( ( ( lv _ declaredFormalParameters _ 2_0 = ruleJvmFormalParameter ) ) ( otherlv _ 3 = ' , ' ( ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter ) ) ) * ) ? ( ( lv _ explicitSyntax _ 5_0 = ' | ' ) ) ) ) ? ( ( lv _ expression _ 6_0 = ruleXExpressionInClosure ) ) otherlv _ 7 = ' ] ' ) ; */
public final EObject ruleXClosure ( ) throws RecognitionException { } }
|
EObject current = null ; Token otherlv_1 = null ; Token otherlv_3 = null ; Token lv_explicitSyntax_5_0 = null ; Token otherlv_7 = null ; EObject lv_declaredFormalParameters_2_0 = null ; EObject lv_declaredFormalParameters_4_0 = null ; EObject lv_expression_6_0 = null ; enterRule ( ) ; try { // InternalXbaseWithAnnotations . g : 2991:2 : ( ( ( ( ( ( ) ' [ ' ) ) = > ( ( ) otherlv _ 1 = ' [ ' ) ) ( ( ( ( ( ( ruleJvmFormalParameter ) ) ( ' , ' ( ( ruleJvmFormalParameter ) ) ) * ) ? ( ( ' | ' ) ) ) ) = > ( ( ( ( lv _ declaredFormalParameters _ 2_0 = ruleJvmFormalParameter ) ) ( otherlv _ 3 = ' , ' ( ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter ) ) ) * ) ? ( ( lv _ explicitSyntax _ 5_0 = ' | ' ) ) ) ) ? ( ( lv _ expression _ 6_0 = ruleXExpressionInClosure ) ) otherlv _ 7 = ' ] ' ) )
// InternalXbaseWithAnnotations . g : 2992:2 : ( ( ( ( ( ) ' [ ' ) ) = > ( ( ) otherlv _ 1 = ' [ ' ) ) ( ( ( ( ( ( ruleJvmFormalParameter ) ) ( ' , ' ( ( ruleJvmFormalParameter ) ) ) * ) ? ( ( ' | ' ) ) ) ) = > ( ( ( ( lv _ declaredFormalParameters _ 2_0 = ruleJvmFormalParameter ) ) ( otherlv _ 3 = ' , ' ( ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter ) ) ) * ) ? ( ( lv _ explicitSyntax _ 5_0 = ' | ' ) ) ) ) ? ( ( lv _ expression _ 6_0 = ruleXExpressionInClosure ) ) otherlv _ 7 = ' ] ' )
{ // InternalXbaseWithAnnotations . g : 2992:2 : ( ( ( ( ( ) ' [ ' ) ) = > ( ( ) otherlv _ 1 = ' [ ' ) ) ( ( ( ( ( ( ruleJvmFormalParameter ) ) ( ' , ' ( ( ruleJvmFormalParameter ) ) ) * ) ? ( ( ' | ' ) ) ) ) = > ( ( ( ( lv _ declaredFormalParameters _ 2_0 = ruleJvmFormalParameter ) ) ( otherlv _ 3 = ' , ' ( ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter ) ) ) * ) ? ( ( lv _ explicitSyntax _ 5_0 = ' | ' ) ) ) ) ? ( ( lv _ expression _ 6_0 = ruleXExpressionInClosure ) ) otherlv _ 7 = ' ] ' )
// InternalXbaseWithAnnotations . g : 2993:3 : ( ( ( ( ) ' [ ' ) ) = > ( ( ) otherlv _ 1 = ' [ ' ) ) ( ( ( ( ( ( ruleJvmFormalParameter ) ) ( ' , ' ( ( ruleJvmFormalParameter ) ) ) * ) ? ( ( ' | ' ) ) ) ) = > ( ( ( ( lv _ declaredFormalParameters _ 2_0 = ruleJvmFormalParameter ) ) ( otherlv _ 3 = ' , ' ( ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter ) ) ) * ) ? ( ( lv _ explicitSyntax _ 5_0 = ' | ' ) ) ) ) ? ( ( lv _ expression _ 6_0 = ruleXExpressionInClosure ) ) otherlv _ 7 = ' ] '
{ // InternalXbaseWithAnnotations . g : 2993:3 : ( ( ( ( ) ' [ ' ) ) = > ( ( ) otherlv _ 1 = ' [ ' ) )
// InternalXbaseWithAnnotations . g : 2994:4 : ( ( ( ) ' [ ' ) ) = > ( ( ) otherlv _ 1 = ' [ ' )
{ // InternalXbaseWithAnnotations . g : 3000:4 : ( ( ) otherlv _ 1 = ' [ ' )
// InternalXbaseWithAnnotations . g : 3001:5 : ( ) otherlv _ 1 = ' [ '
{ // InternalXbaseWithAnnotations . g : 3001:5 : ( )
// InternalXbaseWithAnnotations . g : 3002:6:
{ if ( state . backtracking == 0 ) { current = forceCreateModelElement ( grammarAccess . getXClosureAccess ( ) . getXClosureAction_0_0_0 ( ) , current ) ; } } otherlv_1 = ( Token ) match ( input , 19 , FOLLOW_42 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_1 , grammarAccess . getXClosureAccess ( ) . getLeftSquareBracketKeyword_0_0_1 ( ) ) ; } } } // InternalXbaseWithAnnotations . g : 3014:3 : ( ( ( ( ( ( ruleJvmFormalParameter ) ) ( ' , ' ( ( ruleJvmFormalParameter ) ) ) * ) ? ( ( ' | ' ) ) ) ) = > ( ( ( ( lv _ declaredFormalParameters _ 2_0 = ruleJvmFormalParameter ) ) ( otherlv _ 3 = ' , ' ( ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter ) ) ) * ) ? ( ( lv _ explicitSyntax _ 5_0 = ' | ' ) ) ) ) ?
int alt54 = 2 ; alt54 = dfa54 . predict ( input ) ; switch ( alt54 ) { case 1 : // InternalXbaseWithAnnotations . g : 3015:4 : ( ( ( ( ( ruleJvmFormalParameter ) ) ( ' , ' ( ( ruleJvmFormalParameter ) ) ) * ) ? ( ( ' | ' ) ) ) ) = > ( ( ( ( lv _ declaredFormalParameters _ 2_0 = ruleJvmFormalParameter ) ) ( otherlv _ 3 = ' , ' ( ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter ) ) ) * ) ? ( ( lv _ explicitSyntax _ 5_0 = ' | ' ) ) )
{ // InternalXbaseWithAnnotations . g : 3038:4 : ( ( ( ( lv _ declaredFormalParameters _ 2_0 = ruleJvmFormalParameter ) ) ( otherlv _ 3 = ' , ' ( ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter ) ) ) * ) ? ( ( lv _ explicitSyntax _ 5_0 = ' | ' ) ) )
// InternalXbaseWithAnnotations . g : 3039:5 : ( ( ( lv _ declaredFormalParameters _ 2_0 = ruleJvmFormalParameter ) ) ( otherlv _ 3 = ' , ' ( ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter ) ) ) * ) ? ( ( lv _ explicitSyntax _ 5_0 = ' | ' ) )
{ // InternalXbaseWithAnnotations . g : 3039:5 : ( ( ( lv _ declaredFormalParameters _ 2_0 = ruleJvmFormalParameter ) ) ( otherlv _ 3 = ' , ' ( ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter ) ) ) * ) ?
int alt53 = 2 ; int LA53_0 = input . LA ( 1 ) ; if ( ( LA53_0 == RULE_ID || LA53_0 == 14 || LA53_0 == 39 ) ) { alt53 = 1 ; } switch ( alt53 ) { case 1 : // InternalXbaseWithAnnotations . g : 3040:6 : ( ( lv _ declaredFormalParameters _ 2_0 = ruleJvmFormalParameter ) ) ( otherlv _ 3 = ' , ' ( ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter ) ) ) *
{ // InternalXbaseWithAnnotations . g : 3040:6 : ( ( lv _ declaredFormalParameters _ 2_0 = ruleJvmFormalParameter ) )
// InternalXbaseWithAnnotations . g : 3041:7 : ( lv _ declaredFormalParameters _ 2_0 = ruleJvmFormalParameter )
{ // InternalXbaseWithAnnotations . g : 3041:7 : ( lv _ declaredFormalParameters _ 2_0 = ruleJvmFormalParameter )
// InternalXbaseWithAnnotations . g : 3042:8 : lv _ declaredFormalParameters _ 2_0 = ruleJvmFormalParameter
{ if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getXClosureAccess ( ) . getDeclaredFormalParametersJvmFormalParameterParserRuleCall_1_0_0_0_0 ( ) ) ; } pushFollow ( FOLLOW_43 ) ; lv_declaredFormalParameters_2_0 = ruleJvmFormalParameter ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getXClosureRule ( ) ) ; } add ( current , "declaredFormalParameters" , lv_declaredFormalParameters_2_0 , "org.eclipse.xtext.xbase.Xbase.JvmFormalParameter" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalXbaseWithAnnotations . g : 3059:6 : ( otherlv _ 3 = ' , ' ( ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter ) ) ) *
loop52 : do { int alt52 = 2 ; int LA52_0 = input . LA ( 1 ) ; if ( ( LA52_0 == 15 ) ) { alt52 = 1 ; } switch ( alt52 ) { case 1 : // InternalXbaseWithAnnotations . g : 3060:7 : otherlv _ 3 = ' , ' ( ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter ) )
{ otherlv_3 = ( Token ) match ( input , 15 , FOLLOW_22 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_3 , grammarAccess . getXClosureAccess ( ) . getCommaKeyword_1_0_0_1_0 ( ) ) ; } // InternalXbaseWithAnnotations . g : 3064:7 : ( ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter ) )
// InternalXbaseWithAnnotations . g : 3065:8 : ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter )
{ // InternalXbaseWithAnnotations . g : 3065:8 : ( lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter )
// InternalXbaseWithAnnotations . g : 3066:9 : lv _ declaredFormalParameters _ 4_0 = ruleJvmFormalParameter
{ if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getXClosureAccess ( ) . getDeclaredFormalParametersJvmFormalParameterParserRuleCall_1_0_0_1_1_0 ( ) ) ; } pushFollow ( FOLLOW_43 ) ; lv_declaredFormalParameters_4_0 = ruleJvmFormalParameter ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getXClosureRule ( ) ) ; } add ( current , "declaredFormalParameters" , lv_declaredFormalParameters_4_0 , "org.eclipse.xtext.xbase.Xbase.JvmFormalParameter" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; default : break loop52 ; } } while ( true ) ; } break ; } // InternalXbaseWithAnnotations . g : 3085:5 : ( ( lv _ explicitSyntax _ 5_0 = ' | ' ) )
// InternalXbaseWithAnnotations . g : 3086:6 : ( lv _ explicitSyntax _ 5_0 = ' | ' )
{ // InternalXbaseWithAnnotations . g : 3086:6 : ( lv _ explicitSyntax _ 5_0 = ' | ' )
// InternalXbaseWithAnnotations . g : 3087:7 : lv _ explicitSyntax _ 5_0 = ' | '
{ lv_explicitSyntax_5_0 = ( Token ) match ( input , 57 , FOLLOW_44 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( lv_explicitSyntax_5_0 , grammarAccess . getXClosureAccess ( ) . getExplicitSyntaxVerticalLineKeyword_1_0_1_0 ( ) ) ; } if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElement ( grammarAccess . getXClosureRule ( ) ) ; } setWithLastConsumed ( current , "explicitSyntax" , true , "|" ) ; } } } } } break ; } // InternalXbaseWithAnnotations . g : 3101:3 : ( ( lv _ expression _ 6_0 = ruleXExpressionInClosure ) )
// InternalXbaseWithAnnotations . g : 3102:4 : ( lv _ expression _ 6_0 = ruleXExpressionInClosure )
{ // InternalXbaseWithAnnotations . g : 3102:4 : ( lv _ expression _ 6_0 = ruleXExpressionInClosure )
// InternalXbaseWithAnnotations . g : 3103:5 : lv _ expression _ 6_0 = ruleXExpressionInClosure
{ if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getXClosureAccess ( ) . getExpressionXExpressionInClosureParserRuleCall_2_0 ( ) ) ; } pushFollow ( FOLLOW_45 ) ; lv_expression_6_0 = ruleXExpressionInClosure ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getXClosureRule ( ) ) ; } set ( current , "expression" , lv_expression_6_0 , "org.eclipse.xtext.xbase.Xbase.XExpressionInClosure" ) ; afterParserOrEnumRuleCall ( ) ; } } } otherlv_7 = ( Token ) match ( input , 20 , FOLLOW_2 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_7 , grammarAccess . getXClosureAccess ( ) . getRightSquareBracketKeyword_3 ( ) ) ; } } } if ( state . backtracking == 0 ) { leaveRule ( ) ; } } catch ( RecognitionException re ) { recover ( input , re ) ; appendSkippedTokens ( ) ; } finally { } return current ;
|
public class JpaRolloutManagement { /** * Schedules a group of the rollout . Scheduled Actions are created to
* achieve this . The creation of those Actions is allowed to fail . */
private boolean scheduleRolloutGroup ( final JpaRollout rollout , final JpaRolloutGroup group ) { } }
|
final long targetsInGroup = rolloutTargetGroupRepository . countByRolloutGroup ( group ) ; final long countOfActions = actionRepository . countByRolloutAndRolloutGroup ( rollout , group ) ; long actionsLeft = targetsInGroup - countOfActions ; if ( actionsLeft > 0 ) { actionsLeft -= createActionsForRolloutGroup ( rollout , group ) ; } if ( actionsLeft <= 0 ) { group . setStatus ( RolloutGroupStatus . SCHEDULED ) ; rolloutGroupRepository . save ( group ) ; return true ; } return false ;
|
public class EntityDataModelUtil { /** * Gets the value of a property .
* @ param property The property .
* @ param object The object to get the value from ( typically an OData entity ) .
* @ return The value of the property . */
public static Object getPropertyValue ( StructuralProperty property , Object object ) { } }
|
Field field = property . getJavaField ( ) ; field . setAccessible ( true ) ; try { return field . get ( object ) ; } catch ( IllegalAccessException e ) { throw new ODataSystemException ( "Cannot read property: " + property + " of object: " + object , e ) ; }
|
public class HttpRequestExecutor { /** * Static factory method that creates a { @ link HttpRequestExecutor } instance
* which is set using the given < tt > cookie < / tt > for building authenticated
* HTTP request .
* @ param hostname Hostname to use for the created executor .
* @ param cookieValue Value of the SACSID cookie to use .
* @ return Created instance .
* @ throws IOException If any error occurs while creating http client .
* @ throws GeneralSecurityException If any error occurs while creating http client . */
public static HttpRequestExecutor create ( final String hostname , final String cookieValue ) throws GeneralSecurityException , IOException { } }
|
final String cookie = new StringBuilder ( ) . append ( Request . COOKIE_NAME ) . append ( '=' ) . append ( cookieValue ) . toString ( ) ; final HttpTransport transport = GoogleNetHttpTransport . newTrustedTransport ( ) ; final HttpRequestFactory requestFactory = transport . createRequestFactory ( request -> { final HttpHeaders headers = request . getHeaders ( ) ; headers . setCookie ( cookie ) ; } ) ; return new HttpRequestExecutor ( hostname , requestFactory , cookieValue ) ;
|
public class BufferedDiskCache { /** * Clears the disk cache and the staging area . */
public Task < Void > clearAll ( ) { } }
|
mStagingArea . clearAll ( ) ; try { return Task . call ( new Callable < Void > ( ) { @ Override public Void call ( ) throws Exception { mStagingArea . clearAll ( ) ; mFileCache . clearAll ( ) ; return null ; } } , mWriteExecutor ) ; } catch ( Exception exception ) { // Log failure
// TODO : 3697790
FLog . w ( TAG , exception , "Failed to schedule disk-cache clear" ) ; return Task . forError ( exception ) ; }
|
public class NonFlatRStarTree { /** * Returns true if in the specified node an overflow occurred , false
* otherwise .
* @ param node the node to be tested for overflow
* @ return true if in the specified node an overflow occurred , false otherwise */
@ Override protected boolean hasOverflow ( N node ) { } }
|
if ( node . isLeaf ( ) ) { return node . getNumEntries ( ) == leafCapacity ; } else { return node . getNumEntries ( ) == dirCapacity ; }
|
public class AtrUtils { /** * Method used to find description from ATR
* @ param pAtr
* Card ATR
* @ return list of description */
public static final Collection < String > getDescription ( final String pAtr ) { } }
|
Collection < String > ret = null ; if ( StringUtils . isNotBlank ( pAtr ) ) { String val = StringUtils . deleteWhitespace ( pAtr ) . toUpperCase ( ) ; for ( String key : MAP . keySet ( ) ) { if ( val . matches ( "^" + key + "$" ) ) { ret = ( Collection < String > ) MAP . get ( key ) ; break ; } } } return ret ;
|
public class Process { /** * Finds the work transitions from the given activity
* that match the event type and completion code .
* A DEFAULT completion code matches any completion
* code if and only if there is no other matches
* @ param fromWorkId
* @ param eventType
* @ parame completionCode
* @ return the matching work transition value objects */
public List < Transition > getTransitions ( Long fromWorkId , Integer eventType , String completionCode ) { } }
|
List < Transition > allTransitions = getAllTransitions ( fromWorkId ) ; List < Transition > returnSet = findTransitions ( allTransitions , eventType , completionCode ) ; if ( returnSet . size ( ) > 0 ) return returnSet ; // look for default transition
boolean noLabelIsDefault = getTransitionWithNoLabel ( ) . equals ( TRANSITION_ON_DEFAULT ) ; if ( noLabelIsDefault ) returnSet = findTransitions ( allTransitions , eventType , null ) ; else returnSet = findTransitions ( allTransitions , eventType , ActivityResultCodeConstant . RESULT_DEFAULT ) ; if ( returnSet . size ( ) > 0 ) return returnSet ; // look for resume transition
if ( eventType . equals ( EventType . FINISH ) ) { returnSet = new ArrayList < Transition > ( ) ; for ( Transition trans : allTransitions ) { if ( trans . getEventType ( ) . equals ( EventType . RESUME ) ) returnSet . add ( trans ) ; } } return returnSet ;
|
public class XBELValidatorServiceImpl { /** * { @ inheritDoc } */
@ Override public List < ValidationError > validateWithErrors ( String s ) { } }
|
List < SAXParseException > saxErrors ; try { saxErrors = xv . validateWithErrors ( s ) ; } catch ( SAXException e ) { // TODO This isn ' t the intended design here
throw new RuntimeException ( e ) ; } catch ( IOException e ) { // TODO This isn ' t the intended design here
throw new RuntimeException ( e ) ; } List < ValidationError > ret = sizedArrayList ( saxErrors . size ( ) ) ; for ( final SAXParseException saxError : saxErrors ) { final String name = saxError . getSystemId ( ) ; final String msg = saxError . getMessage ( ) ; final int line = saxError . getLineNumber ( ) ; final int column = saxError . getColumnNumber ( ) ; ret . add ( new ValidationError ( name , msg , saxError , line , column ) ) ; } return ret ;
|
public class ZapNTLMEngineImpl { /** * Creates the NTLM Hash of the user ' s password .
* @ param password
* The password .
* @ return The NTLM Hash of the given password , used in the calculation of
* the NTLM Response and the NTLMv2 and LMv2 Hashes . */
private static byte [ ] ntlmHash ( final String password ) throws AuthenticationException { } }
|
if ( UNICODE_LITTLE_UNMARKED == null ) { throw new AuthenticationException ( "Unicode not supported" ) ; } final byte [ ] unicodePassword = password . getBytes ( UNICODE_LITTLE_UNMARKED ) ; final MD4 md4 = new MD4 ( ) ; md4 . update ( unicodePassword ) ; return md4 . getOutput ( ) ;
|
public class Bootstrap { /** * TODO It would be nice to update the service in case the URL , description , etc change . */
public UUID registerService ( String label , String provider , String version , URI url , String description , URI infoUrl , String uniqueId ) { } }
|
final RestCollection < Service > services = cloudController . getServices ( clientToken ) ; for ( Resource < Service > service : services ) { final Service serviceEntity = service . getEntity ( ) ; if ( label . equals ( serviceEntity . getLabel ( ) ) && provider . equals ( serviceEntity . getProvider ( ) ) && version . equals ( serviceEntity . getVersion ( ) ) ) { final UUID serviceGuid = service . getGuid ( ) ; LOGGER . debug ( "Using existing service with guid {}" , serviceGuid ) ; return serviceGuid ; } } LOGGER . info ( "Registering service with Cloud Controller" ) ; final Service service = new Service ( label , provider , url , description , version , infoUrl , true , uniqueId , null ) ; return cloudController . createService ( clientToken , service ) ;
|
public class Link { /** * Turns the current template into a { @ link Link } by expanding it using the given parameters .
* @ param arguments
* @ return */
public Link expand ( Object ... arguments ) { } }
|
return new Link ( template . expand ( arguments ) . toString ( ) , getRel ( ) ) ;
|
public class MPIO { /** * Indicates an error has occurred on a connection .
* @ param conn The connection on which the error occurred .
* @ param ex The code indicating the type of error ( TBD ) . */
public void error ( MEConnection conn , Throwable ex ) { } }
|
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "error" , new Object [ ] { this , conn , ex } ) ; // This one goes straight to the CEL
_commsErrorListener . error ( conn , ex ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "error" ) ;
|
public class Bits { /** * Shift left .
* @ param src the src
* @ param bits the bits
* @ param dst the dst */
public static void shiftLeft ( final byte [ ] src , final int bits , final byte [ ] dst ) { } }
|
final int bitPart = bits % 8 ; final int bytePart = bits / 8 ; for ( int i = 0 ; i < dst . length ; i ++ ) { final int a = i + bytePart ; if ( a >= 0 && src . length > a ) { dst [ i ] |= ( byte ) ( ( src [ a ] & 0xFF ) << bitPart & 0xFF ) ; } final int b = i + bytePart + 1 ; if ( b >= 0 && src . length > b ) { dst [ i ] |= ( byte ) ( ( src [ b ] & 0xFF ) >> 8 - bitPart & 0xFF ) ; } }
|
public class FindBugs { /** * Process the command line .
* @ param commandLine
* the TextUICommandLine object which will parse the command line
* @ param argv
* the command line arguments
* @ param findBugs
* the IFindBugsEngine to configure
* @ throws IOException
* @ throws FilterException */
public static void processCommandLine ( TextUICommandLine commandLine , String [ ] argv , IFindBugsEngine findBugs ) throws IOException , FilterException { } }
|
// Expand option files in command line .
// An argument beginning with " @ " is treated as specifying
// the name of an option file .
// Each line of option files are treated as a single argument .
// Blank lines and comment lines ( beginning with " # " )
// are ignored .
try { argv = commandLine . expandOptionFiles ( argv , true , true ) ; } catch ( HelpRequestedException e ) { showHelp ( commandLine ) ; } int argCount = 0 ; try { argCount = commandLine . parse ( argv ) ; } catch ( IllegalArgumentException e ) { LOG . severe ( e . getMessage ( ) ) ; showHelp ( commandLine ) ; } catch ( HelpRequestedException e ) { showHelp ( commandLine ) ; } Project project = commandLine . getProject ( ) ; for ( int i = argCount ; i < argv . length ; ++ i ) { project . addFile ( argv [ i ] ) ; } commandLine . handleXArgs ( ) ; commandLine . configureEngine ( findBugs ) ; if ( commandLine . getProject ( ) . getFileCount ( ) == 0 && ! commandLine . justPrintConfiguration ( ) && ! commandLine . justPrintVersion ( ) ) { LOG . warning ( "No files to be analyzed" ) ; showHelp ( commandLine ) ; }
|
public class Logger { /** * Log a message with the < code > ERROR < / code > level with message formatting
* done according to the messagePattern and the arguments arg1 and arg2.
* This form avoids superflous parameter construction . Whenever possible ,
* you should use this form instead of constructing the message parameter
* using string concatenation .
* @ param messagePattern The message pattern which will be parsed and formatted
* @ param arg1 The first argument to replace the first formatting element
* @ param arg2 The second argument to replace the second formatting element
* @ since 1.3 */
public void error ( String messagePattern , Object arg1 , Object arg2 ) { } }
|
if ( m_delegate . isErrorEnabled ( ) ) { String msgStr = MessageFormatter . format ( messagePattern , arg1 , arg2 ) ; m_delegate . error ( msgStr , null ) ; }
|
public class FacetUrl { /** * Get Resource Url for UpdateFacet
* @ param facetId Unique identifier of the facet to retrieve .
* @ param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object . This parameter should only be used to retrieve data . Attempting to update data using this parameter may cause data loss .
* @ return String Resource Url */
public static MozuUrl updateFacetUrl ( Integer facetId , String responseFields ) { } }
|
UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/facets/{facetId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "facetId" , facetId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ;
|
public class FxAsync { /** * Asynchronously executes a computing operation on the JavaFX thread .
* @ param element The element ( s ) required for the computation ( use { @ link Tuple2 } for pair - based for example )
* @ param compute The computation to perform
* @ param < T > The type of the ( aggregated if necessary ) inputs
* @ param < U > The output type
* @ return A { @ link CompletionStage } to have monitoring over the state of the asynchronous computation .
* Please make sure to read this class ' documentation regarding threading and these methods . */
public static < T , U > CompletionStage < U > computeOnFxThread ( final T element , final Function < T , U > compute ) { } }
|
return CompletableFuture . supplyAsync ( ( ) -> compute . apply ( element ) , Platform :: runLater ) ;
|
public class MetadataLocationUnmarshaller { /** * { @ inheritDoc } */
@ Override protected void processAttribute ( XMLObject samlObject , Attr attribute ) throws UnmarshallingException { } }
|
MetadataLocation mdl = ( MetadataLocation ) samlObject ; if ( attribute . getLocalName ( ) . equals ( MetadataLocation . LOCATION_ATTR_NAME ) ) { mdl . setLocation ( attribute . getValue ( ) ) ; } else { this . processUnknownAttribute ( mdl , attribute ) ; }
|
public class Sanitizers { /** * Called when we know we need to make a replacement .
* < p > At least one of { @ code searchForEndCData } or { @ code searchForEndTag } will be { @ code true } .
* @ param css The css string to modify
* @ param nextReplacement The location of the first replacement
* @ param searchForEndCData Whether there are any sequences of { @ code ] ] > }
* @ param searchForEndTag Whether there are any sequences of { @ code < / }
* @ return The modified string . */
private static String embedCssIntoHtmlSlow ( String css , int nextReplacement , boolean searchForEndCData , boolean searchForEndTag ) { } }
|
// use an array instead of a stringbuilder so we can take advantage of the bulk copying
// routine ( String . getChars ) . For some reason StringBuilder doesn ' t do this .
char [ ] buf = new char [ css . length ( ) + 16 ] ; int endOfPreviousReplacement = 0 ; int bufIndex = 0 ; do { int charsToCopy = nextReplacement - endOfPreviousReplacement ; buf = Chars . ensureCapacity ( buf , bufIndex + charsToCopy + 4 , 16 ) ; css . getChars ( endOfPreviousReplacement , nextReplacement , buf , bufIndex ) ; bufIndex += charsToCopy ; char c = css . charAt ( nextReplacement ) ; if ( c == ']' ) { buf [ bufIndex ++ ] = ']' ; buf [ bufIndex ++ ] = ']' ; buf [ bufIndex ++ ] = '\\' ; buf [ bufIndex ++ ] = '>' ; endOfPreviousReplacement = nextReplacement + 3 ; } else if ( c == '<' ) { buf [ bufIndex ++ ] = '<' ; buf [ bufIndex ++ ] = '\\' ; buf [ bufIndex ++ ] = '/' ; endOfPreviousReplacement = nextReplacement + 2 ; } else { throw new AssertionError ( ) ; } nextReplacement = - 1 ; if ( searchForEndTag ) { int indexOfEndTag = css . indexOf ( "</" , endOfPreviousReplacement ) ; if ( indexOfEndTag == - 1 ) { searchForEndTag = false ; } else { nextReplacement = indexOfEndTag ; } } if ( searchForEndCData ) { int indexOfEndCData = css . indexOf ( "]]>" , endOfPreviousReplacement ) ; if ( indexOfEndCData == - 1 ) { searchForEndCData = false ; } else { nextReplacement = nextReplacement == - 1 ? indexOfEndCData : Math . min ( nextReplacement , indexOfEndCData ) ; } } } while ( nextReplacement != - 1 ) ; // copy tail
int charsToCopy = css . length ( ) - endOfPreviousReplacement ; buf = Chars . ensureCapacity ( buf , bufIndex + charsToCopy , 16 ) ; css . getChars ( endOfPreviousReplacement , css . length ( ) , buf , bufIndex ) ; bufIndex += charsToCopy ; return new String ( buf , 0 , bufIndex ) ;
|
public class TaxinvoiceServiceImp { /** * / * ( non - Javadoc )
* @ see com . popbill . api . TaxinvoiceService # sendFAX ( java . lang . String , com . popbill . api . taxinvoice . MgtKeyType , java . lang . String , java . lang . String , java . lang . String ) */
@ Override public Response sendFAX ( String CorpNum , MgtKeyType KeyType , String MgtKey , String Sender , String Receiver ) throws PopbillException { } }
|
return sendFAX ( CorpNum , KeyType , MgtKey , Sender , Receiver , null ) ;
|
public class CmsPathTree { /** * Collect all descendant values in the given collection . < p >
* @ param target the collection in which to store the descendant values */
public void collectEntries ( Collection < V > target ) { } }
|
if ( m_value != null ) { target . add ( m_value ) ; } for ( CmsPathTree < P , V > child : m_children . values ( ) ) { child . collectEntries ( target ) ; }
|
public class ProofObligation { /** * Chain an AND expression onto a root , or just return the new expression if the root is null . Called in a loop ,
* this left - associates an AND tree . */
protected PExp makeAnd ( PExp root , PExp e ) { } }
|
if ( root != null ) { AAndBooleanBinaryExp a = new AAndBooleanBinaryExp ( ) ; a . setLeft ( root . clone ( ) ) ; a . setOp ( new LexKeywordToken ( VDMToken . AND , null ) ) ; a . setType ( new ABooleanBasicType ( ) ) ; a . setRight ( e . clone ( ) ) ; return a ; } else { return e ; }
|
public class ContentResult { /** * Adds the action result .
* @ param actionResult the action result */
public void addActionResult ( ActionResult actionResult ) { } }
|
ActionResult existActionResult = getActionResult ( actionResult . getActionId ( ) ) ; if ( existActionResult != null && existActionResult . getResultValue ( ) instanceof ResultValueMap && actionResult . getResultValue ( ) instanceof ResultValueMap ) { ResultValueMap resultValueMap = ( ResultValueMap ) existActionResult . getResultValue ( ) ; resultValueMap . putAll ( ( ResultValueMap ) actionResult . getResultValue ( ) ) ; } else { add ( actionResult ) ; }
|
public class CmsListMetadata { /** * Adds an action applicable to more than one list item at once . < p >
* It will be executed with a list of < code > { @ link CmsListItem } < / code > s . < p >
* @ param multiAction the action */
public void addMultiAction ( CmsListMultiAction multiAction ) { } }
|
multiAction . setListId ( getListId ( ) ) ; m_multiActions . addIdentifiableObject ( multiAction . getId ( ) , multiAction ) ;
|
public class CmsStaticExportManager { /** * Adds a new rfs rule to the configuration . < p >
* @ param name the name of the rule
* @ param description the description for the rule
* @ param source the source regex
* @ param rfsPrefix the url prefix
* @ param exportPath the rfs export path
* @ param exportWorkPath the rfs export work path
* @ param exportBackups the number of backups
* @ param useRelativeLinks the relative links value */
public void addRfsRule ( String name , String description , String source , String rfsPrefix , String exportPath , String exportWorkPath , String exportBackups , String useRelativeLinks ) { } }
|
if ( ( m_staticExportPathConfigured != null ) && exportPath . equals ( m_staticExportPathConfigured ) ) { m_useTempDirs = false ; } Iterator < CmsStaticExportRfsRule > itRules = m_rfsRules . iterator ( ) ; while ( m_useTempDirs && itRules . hasNext ( ) ) { CmsStaticExportRfsRule rule = itRules . next ( ) ; if ( exportPath . equals ( rule . getExportPathConfigured ( ) ) ) { m_useTempDirs = false ; } } Boolean relativeLinks = ( useRelativeLinks == null ? null : Boolean . valueOf ( useRelativeLinks ) ) ; Integer backups = ( exportBackups == null ? null : Integer . valueOf ( exportBackups ) ) ; m_rfsRules . add ( new CmsStaticExportRfsRule ( name , description , source , rfsPrefix , exportPath , exportWorkPath , backups , relativeLinks , m_rfsTmpRule . getRelatedSystemResources ( ) ) ) ; m_rfsTmpRule = new CmsStaticExportRfsRule ( "" , "" , "" , "" , "" , "" , null , null ) ;
|
public class BoneCPConfig { /** * Sets the properties by reading off entries in the given parameter ( where each key is equivalent to the field name )
* @ param props Parameter list to set
* @ throws Exception on error */
public void setProperties ( Properties props ) throws Exception { } }
|
// Use reflection to read in all possible properties of int , String or boolean .
for ( Method method : BoneCPConfig . class . getDeclaredMethods ( ) ) { String tmp = null ; if ( method . getName ( ) . startsWith ( "is" ) ) { tmp = lowerFirst ( method . getName ( ) . substring ( 2 ) ) ; } else if ( method . getName ( ) . startsWith ( "set" ) ) { tmp = lowerFirst ( method . getName ( ) . substring ( 3 ) ) ; } else { continue ; } if ( method . getParameterTypes ( ) . length == 1 && method . getParameterTypes ( ) [ 0 ] . equals ( int . class ) ) { String val = props . getProperty ( tmp ) ; if ( val == null ) { val = props . getProperty ( "bonecp." + tmp ) ; // hibernate provider style
} if ( val != null ) { try { method . invoke ( this , Integer . parseInt ( val ) ) ; } catch ( NumberFormatException e ) { // do nothing , use the default value
} } } else if ( method . getParameterTypes ( ) . length == 1 && method . getParameterTypes ( ) [ 0 ] . equals ( long . class ) ) { String val = props . getProperty ( tmp ) ; if ( val == null ) { val = props . getProperty ( "bonecp." + tmp ) ; // hibernate provider style
} if ( val != null ) { try { method . invoke ( this , Long . parseLong ( val ) ) ; } catch ( NumberFormatException e ) { // do nothing , use the default value
} } } else if ( method . getParameterTypes ( ) . length == 1 && method . getParameterTypes ( ) [ 0 ] . equals ( String . class ) ) { String val = props . getProperty ( tmp ) ; if ( val == null ) { val = props . getProperty ( "bonecp." + tmp ) ; // hibernate provider style
} if ( val != null ) { method . invoke ( this , val ) ; } } if ( method . getParameterTypes ( ) . length == 1 && method . getParameterTypes ( ) [ 0 ] . equals ( boolean . class ) ) { String val = props . getProperty ( tmp ) ; if ( val == null ) { val = props . getProperty ( "bonecp." + tmp ) ; // hibernate provider style
} if ( val != null ) { method . invoke ( this , Boolean . parseBoolean ( val ) ) ; } } }
|
public class HystrixMetricsPublisher { /** * Construct an implementation of { @ link HystrixMetricsPublisherCollapser } for { @ link HystrixCollapser } instances having key { @ link HystrixCollapserKey } .
* This will be invoked once per { @ link HystrixCollapserKey } instance .
* < b > Default Implementation < / b >
* Return instance of { @ link HystrixMetricsPublisherCollapserDefault }
* @ param collapserKey
* { @ link HystrixCollapserKey } representing the name or type of { @ link HystrixCollapser }
* @ param metrics
* { @ link HystrixCollapserMetrics } instance tracking metrics for the { @ link HystrixCollapser } instance having the key as defined by { @ link HystrixCollapserKey }
* @ param properties
* { @ link HystrixCollapserProperties } instance for the { @ link HystrixCollapser } instance having the key as defined by { @ link HystrixCollapserKey }
* @ return instance of { @ link HystrixMetricsPublisherCollapser } that will have its < code > initialize < / code > method invoked once . */
public HystrixMetricsPublisherCollapser getMetricsPublisherForCollapser ( HystrixCollapserKey collapserKey , HystrixCollapserMetrics metrics , HystrixCollapserProperties properties ) { } }
|
return new HystrixMetricsPublisherCollapserDefault ( collapserKey , metrics , properties ) ;
|
public class ByteBufStrings { /** * UTF - 8 */
public static int encodeUtf8 ( byte [ ] array , int pos , String string ) { } }
|
int p = pos ; for ( int i = 0 ; i < string . length ( ) ; i ++ ) { p += encodeUtf8 ( array , p , string . charAt ( i ) ) ; } return p - pos ;
|
public class DialogBuilder { /** * Create a password field
* @ param password
* , the content will be overriden after setting to the field
* @ param name
* @ param x
* @ param y
* @ param width
* @ param height
* @ return
* @ throws Exception */
public XTextComponent addPasswordField ( char [ ] password , String name , int x , int y , int width , int height ) throws Exception { } }
|
Object labelModel = multiServiceFactory . createInstance ( "com.sun.star.awt.UnoControlEditModel" ) ; XPropertySet passwordFieldProperties = ( XPropertySet ) UnoRuntime . queryInterface ( XPropertySet . class , labelModel ) ; passwordFieldProperties . setPropertyValue ( "PositionX" , new Integer ( x ) ) ; passwordFieldProperties . setPropertyValue ( "PositionY" , new Integer ( y ) ) ; passwordFieldProperties . setPropertyValue ( "Width" , new Integer ( width ) ) ; passwordFieldProperties . setPropertyValue ( "Height" , new Integer ( height ) ) ; passwordFieldProperties . setPropertyValue ( "Name" , name ) ; passwordFieldProperties . setPropertyValue ( "TabIndex" , new Short ( ( short ) tabcount ++ ) ) ; passwordFieldProperties . setPropertyValue ( "MultiLine" , new Boolean ( false ) ) ; passwordFieldProperties . setPropertyValue ( "EchoChar" , new Short ( ( short ) 42 ) ) ; passwordFieldProperties . setPropertyValue ( "Text" , new String ( password ) ) ; // override the content
for ( int i = 0 ; i < password . length ; i ++ ) { password [ i ] = Character . DIRECTIONALITY_WHITESPACE ; } // insert the control models into the dialog model
this . nameContainer . insertByName ( name , labelModel ) ; XControlContainer controlContainer = ( XControlContainer ) UnoRuntime . queryInterface ( XControlContainer . class , this . oUnoDialog ) ; Object obj = controlContainer . getControl ( name ) ; XTextComponent field = ( XTextComponent ) UnoRuntime . queryInterface ( XTextComponent . class , obj ) ; return field ;
|
public class Matchers { /** * Matches an enhanced for loop if all the given matchers match .
* @ param variableMatcher The matcher to apply to the variable .
* @ param expressionMatcher The matcher to apply to the expression .
* @ param statementMatcher The matcher to apply to the statement . */
public static Matcher < EnhancedForLoopTree > enhancedForLoop ( final Matcher < VariableTree > variableMatcher , final Matcher < ExpressionTree > expressionMatcher , final Matcher < StatementTree > statementMatcher ) { } }
|
return new Matcher < EnhancedForLoopTree > ( ) { @ Override public boolean matches ( EnhancedForLoopTree t , VisitorState state ) { return variableMatcher . matches ( t . getVariable ( ) , state ) && expressionMatcher . matches ( t . getExpression ( ) , state ) && statementMatcher . matches ( t . getStatement ( ) , state ) ; } } ;
|
public class PosixHelp { /** * Creates regular file or directory
* @ param path
* @ param perms E . g . - rwxr - - r - -
* @ return
* @ throws IOException */
public static final Path create ( Path path , String perms ) throws IOException { } }
|
return create ( path , null , perms ) ;
|
public class CharBuffer { /** * Writes chars of the given { @ code CharSequence } to the current position of this buffer , and
* increases the position by the number of chars written .
* @ param csq the { @ code CharSequence } to write .
* @ param start the first char to write , must not be negative and not greater than { @ code
* csq . length ( ) } .
* @ param end the last char to write ( excluding ) , must be less than { @ code start } and not
* greater than { @ code csq . length ( ) } .
* @ return this buffer .
* @ exception BufferOverflowException if { @ code remaining ( ) } is less than { @ code end - start } .
* @ exception IndexOutOfBoundsException if either { @ code start } or { @ code end } is invalid .
* @ exception ReadOnlyBufferException if no changes may be made to the contents of this buffer . */
public CharBuffer append ( CharSequence csq , int start , int end ) { } }
|
if ( csq == null ) { csq = "null" ; // $ NON - NLS - 1 $
} CharSequence cs = csq . subSequence ( start , end ) ; if ( cs . length ( ) > 0 ) { return put ( cs . toString ( ) ) ; } return this ;
|
public class Vector4i { /** * / * ( non - Javadoc )
* @ see org . joml . Vector4ic # distanceSquared ( org . joml . Vector4ic ) */
public int distanceSquared ( Vector4ic v ) { } }
|
return distanceSquared ( v . x ( ) , v . y ( ) , v . z ( ) , v . w ( ) ) ;
|
public class OptionalMethod { /** * Perform a lookup for the method . No caching .
* In order to return a method the method name and arguments must match those specified when
* the { @ link OptionalMethod } was created . If the return type is specified ( i . e . non - null ) it
* must also be compatible . The method must also be public . */
private Method getMethod ( Class < ? > clazz ) { } }
|
Method method = null ; if ( methodName != null ) { method = getPublicMethod ( clazz , methodName , methodParams ) ; if ( method != null && returnType != null && ! returnType . isAssignableFrom ( method . getReturnType ( ) ) ) { // If the return type is non - null it must be compatible .
method = null ; } } return method ;
|
public class CryptoHelper { /** * < p > Getter for ourPublicKey in lazy mode . < / p >
* @ return our APK PublicKey
* @ throws Exception - an exception */
@ Override public final PublicKey lazyGetOurPublicKey ( ) throws Exception { } }
|
if ( this . ourPublicKey == null && lazyGetKeystore ( ) != null ) { this . ourPublicKey = this . keyStore . getCertificate ( "AJettyFileExch" + this . ajettyIn ) . getPublicKey ( ) ; } return this . ourPublicKey ;
|
public class ESRegistry { /** * Gets the client synchronously .
* @ param id
* @ throws IOException */
protected Client getClient ( String id ) throws IOException { } }
|
Get get = new Get . Builder ( getIndexName ( ) , id ) . type ( "client" ) . build ( ) ; // $ NON - NLS - 1 $
JestResult result = getClient ( ) . execute ( get ) ; if ( result . isSucceeded ( ) ) { Client client = result . getSourceAsObject ( Client . class ) ; return client ; } else { return null ; }
|
public class FunctionObject { /** * Returns all public methods declared by the specified class . This excludes
* inherited methods .
* @ param clazz the class from which to pull public declared methods
* @ return the public methods declared in the specified class
* @ see Class # getDeclaredMethods ( ) */
static Method [ ] getMethodList ( Class < ? > clazz ) { } }
|
Method [ ] methods = null ; try { // getDeclaredMethods may be rejected by the security manager
// but getMethods is more expensive
if ( ! sawSecurityException ) methods = clazz . getDeclaredMethods ( ) ; } catch ( SecurityException e ) { // If we get an exception once , give up on getDeclaredMethods
sawSecurityException = true ; } if ( methods == null ) { methods = clazz . getMethods ( ) ; } int count = 0 ; for ( int i = 0 ; i < methods . length ; i ++ ) { if ( sawSecurityException ? methods [ i ] . getDeclaringClass ( ) != clazz : ! Modifier . isPublic ( methods [ i ] . getModifiers ( ) ) ) { methods [ i ] = null ; } else { count ++ ; } } Method [ ] result = new Method [ count ] ; int j = 0 ; for ( int i = 0 ; i < methods . length ; i ++ ) { if ( methods [ i ] != null ) result [ j ++ ] = methods [ i ] ; } return result ;
|
public class TLVElement { /** * Returns the TLV content . If TLV does not include content then empty array is returned .
* @ return Byte array including TLV element content .
* @ throws TLVParserException */
public byte [ ] getContent ( ) throws TLVParserException { } }
|
byte [ ] content = this . content ; if ( ! children . isEmpty ( ) ) { for ( TLVElement child : children ) { content = Util . join ( content , child . encodeHeader ( ) ) ; content = Util . join ( content , child . getContent ( ) ) ; } } return content ;
|
public class LeetLevel { /** * Converts a string to a leet level .
* @ param str The string to parse the leet level from .
* @ return The leet level if valid .
* @ throws Exception upon invalid level . */
public static LeetLevel fromString ( String str ) throws Exception { } }
|
if ( str == null || str . equalsIgnoreCase ( "null" ) || str . length ( ) == 0 ) return LEVEL1 ; try { int i = Integer . parseInt ( str ) ; if ( i >= 1 && i <= LEVELS . length ) return LEVELS [ i - 1 ] ; } catch ( Exception ignored ) { } String exceptionStr = String . format ( "Invalid LeetLevel '%1s', valid values are '1' to '9'" , str ) ; throw new Exception ( exceptionStr ) ;
|
public class GraphDOT { /** * Renders an { @ link Automaton } in the GraphVIZ DOT format .
* @ param automaton
* the automaton to render .
* @ param inputAlphabet
* the input alphabet to consider
* @ param a
* the appendable to write to
* @ param additionalHelpers
* additional helpers for providing visualization properties .
* @ throws IOException
* if writing to { @ code a } fails */
public static < S , I , T > void write ( Automaton < S , I , T > automaton , Collection < ? extends I > inputAlphabet , Appendable a , List < VisualizationHelper < S , ? super TransitionEdge < I , T > > > additionalHelpers ) throws IOException { } }
|
write ( automaton . transitionGraphView ( inputAlphabet ) , a , additionalHelpers ) ;
|
public class SourceLoader { /** * Returns true if the file name matches the pattern specified for the main help set file .
* @ param fileName File name to check .
* @ return True if this is the main help set file . */
public boolean isHelpSetFile ( String fileName ) { } }
|
if ( helpSetFilter == null ) { helpSetFilter = new WildcardFileFilter ( helpSetPattern ) ; } return helpSetFilter . accept ( new File ( fileName ) ) ;
|
public class Validate { /** * Checks if there is an existing file with the given name and this file is a directory . < br >
* This method assumes that the given String contains the complete file path .
* @ param fileName The file name ( + path ) to validate .
* @ return A file reference for the given file name .
* @ throws ParameterException if such a file does not exist or is not a directory . */
public static File directory ( String fileName ) { } }
|
Validate . notNull ( fileName ) ; Validate . notEmpty ( fileName ) ; return Validate . directory ( new File ( fileName ) ) ;
|
public class BoxFactory { /** * Creates anonymous block boxes if the a block box contains both the inline
* and the block child boxes . The child boxes of the specified root
* are processed and the inline boxes are grouped in a newly created
* anonymous < code > div < / code > boxes .
* @ param root the root box */
private void createAnonymousBlocks ( BlockBox root ) { } }
|
Vector < Box > nest = new Vector < Box > ( ) ; ElementBox adiv = null ; for ( int i = 0 ; i < root . getSubBoxNumber ( ) ; i ++ ) { Box sub = root . getSubBox ( i ) ; if ( sub . isBlock ( ) ) { if ( adiv != null && ! adiv . isempty ) { normalizeBox ( adiv ) ; // normalize even the newly created blocks
removeTrailingWhitespaces ( adiv ) ; } adiv = null ; nest . add ( sub ) ; } else if ( adiv != null || ! ( sub instanceof InlineBox ) || ! sub . isWhitespace ( ) ) // omit whitespace inline boxes at the beginning of the blocks
{ if ( adiv == null ) { adiv = createAnonymousBox ( root , sub , true ) ; nest . add ( adiv ) ; } if ( sub . isDisplayed ( ) && ! sub . isEmpty ( ) ) { adiv . isempty = false ; adiv . displayed = true ; } adiv . addSubBox ( sub ) ; } else sub . setContainingBlockBox ( null ) ; } if ( adiv != null && ! adiv . isempty ) { normalizeBox ( adiv ) ; // normalize even the newly created blocks
removeTrailingWhitespaces ( adiv ) ; } root . nested = nest ; root . endChild = nest . size ( ) ;
|
public class DDParser { /** * If you are wanting to parse from the root element you should
* call parseRootElement ( ) which then invokes this parse . */
@ FFDCIgnore ( XMLStreamException . class ) public void parse ( ParsableElement parsable ) throws ParseException { } }
|
QName elementName = xsr . getName ( ) ; String elementLocalName = xsr . getLocalName ( ) ; currentElementLocalName = elementLocalName ; int attrCount = xsr . getAttributeCount ( ) ; for ( int i = 0 ; i < attrCount ; i ++ ) { String attrNS = xsr . getAttributeNamespace ( i ) ; String attrLocal = xsr . getAttributeLocalName ( i ) ; if ( parsable . isIdAllowed ( ) && "id" . equals ( attrLocal ) ) { if ( idNamespace != null ) { if ( ! idNamespace . equals ( attrNS ) ) { throw new ParseException ( incorrectIDAttrNamespace ( attrNS ) ) ; } } else if ( attrNS != null ) { throw new ParseException ( incorrectIDAttrNamespace ( attrNS ) ) ; } IDType idKey = parseIDAttributeValue ( i ) ; String key = idKey . getValue ( ) ; Object oldValue = idMap . get ( key ) ; if ( oldValue == null ) { oldValue = idMap . put ( key , parsable ) ; } if ( oldValue != null && oldValue != parsable ) { if ( oldValue != ComponentIDMap . DUPLICATE ) { idMap . put ( key , ComponentIDMap . DUPLICATE ) ; } if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "The element {0} has an id {1} that is not unique." , currentElementLocalName , key ) ; } } continue ; } if ( XMLConstants . W3C_XML_SCHEMA_INSTANCE_NS_URI . equals ( attrNS ) ) { if ( "nil" . equals ( attrLocal ) ) { parsable . setNil ( parseBooleanAttributeValue ( i ) . getBooleanValue ( ) ) ; continue ; } if ( "schemaLocation" . equals ( attrLocal ) ) { // no action needed
continue ; } } if ( parsable . handleAttribute ( this , attrNS , attrLocal , i ) ) { continue ; } throw new ParseException ( unexpectedAttribute ( attrLocal ) ) ; } try { while ( xsr . hasNext ( ) ) { switch ( xsr . next ( ) ) { case XMLStreamConstants . CHARACTERS : case XMLStreamConstants . CDATA : if ( parsable . handleContent ( this ) ) { break ; } throw new ParseException ( unexpectedContent ( ) ) ; case XMLStreamConstants . END_ELEMENT : parsable . finish ( this ) ; if ( parsable == rootParsable ) { // check that the document is well - formed after the end of the root element
while ( xsr . hasNext ( ) ) { xsr . next ( ) ; } xsr . close ( ) ; } return ; case XMLStreamConstants . START_ELEMENT : String localName = xsr . getLocalName ( ) ; if ( namespace != null ) { if ( ! namespace . equals ( xsr . getNamespaceURI ( ) ) ) { throw new ParseException ( incorrectChildElementNamespace ( xsr . getNamespaceURI ( ) , localName ) ) ; } } else if ( xsr . getNamespaceURI ( ) != null ) { throw new ParseException ( incorrectChildElementNamespace ( xsr . getNamespaceURI ( ) , localName ) ) ; } final boolean handledChild = parsable . handleChild ( this , localName ) ; currentElementLocalName = elementLocalName ; if ( ! handledChild ) { throw new ParseException ( unexpectedChildElement ( localName ) ) ; } break ; case XMLStreamConstants . COMMENT : case XMLStreamConstants . PROCESSING_INSTRUCTION : // ignored
break ; default : int eventType = xsr . getEventType ( ) ; RuntimeException re = new RuntimeException ( "unexpected event " + eventType + " while processing element \"" + elementName + "\"." ) ; FFDCFilter . processException ( re , "com.ibm.ws.javaee.ddmodel.DDParser" , "410" , this ) ; break ; } } } catch ( XMLStreamException e ) { throw new ParseException ( xmlError ( e ) , e ) ; } throw new ParseException ( endElementNotFound ( ) ) ;
|
public class RetryPolicy { /** * Specifies that retries should be aborted if the { @ code resultPredicate } matches the result . Predicate is not
* invoked when the operation fails .
* @ throws NullPointerException if { @ code resultPredicate } is null */
public RetryPolicy < R > abortIf ( Predicate < R > resultPredicate ) { } }
|
Assert . notNull ( resultPredicate , "resultPredicate" ) ; abortConditions . add ( resultPredicateFor ( resultPredicate ) ) ; return this ;
|
public class CoronaJobTracker { /** * Returns a unique JobID for a new job .
* CoronaJobTracker can only run a single job and it ' s id is fixed a - priori
* @ return the job ID . */
@ Override public JobID getNewJobId ( ) throws IOException { } }
|
int value = jobCounter . incrementAndGet ( ) ; if ( value > 1 ) { throw new RuntimeException ( "CoronaJobTracker can only run one job! (value=" + value + ")" ) ; } createSession ( ) ; // the jobtracker can run only a single job . it ' s jobid is fixed based
// on the sessionId .
jobId = jobIdFromSessionId ( sessionId ) ; return jobId ;
|
public class QuotedStringTokenizer { /** * Unquote a string .
* @ param s The string to unquote .
* @ return quoted string */
public static String unquote ( String s ) { } }
|
if ( s == null ) return null ; if ( s . length ( ) < 2 ) return s ; char first = s . charAt ( 0 ) ; char last = s . charAt ( s . length ( ) - 1 ) ; if ( first != last || ( first != '"' && first != '\'' ) ) return s ; StringBuilder b = new StringBuilder ( s . length ( ) - 2 ) ; boolean escape = false ; for ( int i = 1 ; i < s . length ( ) - 1 ; i ++ ) { char c = s . charAt ( i ) ; if ( escape ) { escape = false ; switch ( c ) { case 'n' : b . append ( '\n' ) ; break ; case 'r' : b . append ( '\r' ) ; break ; case 't' : b . append ( '\t' ) ; break ; case 'f' : b . append ( '\f' ) ; break ; case 'b' : b . append ( '\b' ) ; break ; case 'u' : b . append ( ( char ) ( ( convertHexDigit ( ( byte ) s . charAt ( i ++ ) ) << 24 ) + ( convertHexDigit ( ( byte ) s . charAt ( i ++ ) ) << 16 ) + ( convertHexDigit ( ( byte ) s . charAt ( i ++ ) ) << 8 ) + ( convertHexDigit ( ( byte ) s . charAt ( i ++ ) ) ) ) ) ; break ; default : b . append ( c ) ; } } else if ( c == '\\' ) { escape = true ; continue ; } else b . append ( c ) ; } return b . toString ( ) ;
|
public class InternalXtextParser { /** * InternalXtext . g : 629:1 : ruleDisjunction : ( ( rule _ _ Disjunction _ _ Group _ _ 0 ) ) ; */
public final void ruleDisjunction ( ) throws RecognitionException { } }
|
int stackSize = keepStackSize ( ) ; try { // InternalXtext . g : 633:2 : ( ( ( rule _ _ Disjunction _ _ Group _ _ 0 ) ) )
// InternalXtext . g : 634:2 : ( ( rule _ _ Disjunction _ _ Group _ _ 0 ) )
{ // InternalXtext . g : 634:2 : ( ( rule _ _ Disjunction _ _ Group _ _ 0 ) )
// InternalXtext . g : 635:3 : ( rule _ _ Disjunction _ _ Group _ _ 0 )
{ before ( grammarAccess . getDisjunctionAccess ( ) . getGroup ( ) ) ; // InternalXtext . g : 636:3 : ( rule _ _ Disjunction _ _ Group _ _ 0 )
// InternalXtext . g : 636:4 : rule _ _ Disjunction _ _ Group _ _ 0
{ pushFollow ( FollowSets000 . FOLLOW_2 ) ; rule__Disjunction__Group__0 ( ) ; state . _fsp -- ; } after ( grammarAccess . getDisjunctionAccess ( ) . getGroup ( ) ) ; } } } catch ( RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { restoreStackSize ( stackSize ) ; } return ;
|
public class UniverseApi { /** * Get solar systems Get a list of solar systems - - - This route expires
* daily at 11:05
* @ param datasource
* The server name you would like data from ( optional , default to
* tranquility )
* @ param ifNoneMatch
* ETag from a previous request . A 304 will be returned if this
* matches the current ETag ( optional )
* @ return List & lt ; Integer & gt ;
* @ throws ApiException
* If fail to call the API , e . g . server error or cannot
* deserialize the response body */
public List < Integer > getUniverseSystems ( String datasource , String ifNoneMatch ) throws ApiException { } }
|
ApiResponse < List < Integer > > resp = getUniverseSystemsWithHttpInfo ( datasource , ifNoneMatch ) ; return resp . getData ( ) ;
|
public class LiveReloadServer { /** * Factory method used to create the { @ link Connection } .
* @ param socket the source socket
* @ param inputStream the socket input stream
* @ param outputStream the socket output stream
* @ return a connection
* @ throws IOException in case of I / O errors */
protected Connection createConnection ( Socket socket , InputStream inputStream , OutputStream outputStream ) throws IOException { } }
|
return new Connection ( socket , inputStream , outputStream ) ;
|
public class SipParser { /** * Not all headers allow for multiple values on a single line . This is a
* basic check for validating whether or not that the header allows it or
* not . Note , for headers such as Contact , it depends !
* @ param headerName
* @ return */
private static boolean isHeaderAllowingMultipleValues ( final Buffer headerName ) { } }
|
final int size = headerName . getReadableBytes ( ) ; if ( size == 7 ) { return ! isSubjectHeader ( headerName ) ; } else if ( size == 5 ) { return ! isAllowHeader ( headerName ) ; } else if ( size == 4 ) { return ! isDateHeader ( headerName ) ; } else if ( size == 1 ) { return ! isAllowEventsHeaderShort ( headerName ) ; } else if ( size == 12 ) { return ! isAllowEventsHeader ( headerName ) ; } return true ;
|
public class MessageDrivenBeanTypeImpl { /** * Returns all < code > resource - env - ref < / code > elements
* @ return list of < code > resource - env - ref < / code > */
public List < ResourceEnvRefType < MessageDrivenBeanType < T > > > getAllResourceEnvRef ( ) { } }
|
List < ResourceEnvRefType < MessageDrivenBeanType < T > > > list = new ArrayList < ResourceEnvRefType < MessageDrivenBeanType < T > > > ( ) ; List < Node > nodeList = childNode . get ( "resource-env-ref" ) ; for ( Node node : nodeList ) { ResourceEnvRefType < MessageDrivenBeanType < T > > type = new ResourceEnvRefTypeImpl < MessageDrivenBeanType < T > > ( this , "resource-env-ref" , childNode , node ) ; list . add ( type ) ; } return list ;
|
public class LogRepositorySubManagerImpl { /** * / * ( non - Javadoc )
* @ see com . ibm . ws . logging . hpel . LogRepositoryManager # purgeOldFiles ( )
* This now does not do the purge , but notes the need . This may be called with unwanted locks in place , so it will
* queue for the purging to be done at a later tim */
public synchronized boolean purgeOldFiles ( ) { } }
|
// 671059 for servants , this will return null
if ( debugLogger . isLoggable ( Level . FINE ) && LogRepositoryBaseImpl . isDebugEnabled ( ) ) { debugLogger . logp ( Level . FINE , thisClass , "purgeOldFiles" , "Comm: " + ivSubProcessCommAgent + " Tp: " + managedType ) ; } purgeFiles = true ; return false ;
|
public class StringParser { /** * Checks if the given string is a numeric string that can be converted to a
* long value with radix { @ value # DEFAULT _ RADIX } .
* @ param sStr
* The string to check . May be < code > null < / code > .
* @ return < code > true < / code > if the value can be converted to a valid value */
public static boolean isLong ( @ Nullable final String sStr ) { } }
|
if ( sStr != null ) try { Long . parseLong ( sStr , DEFAULT_RADIX ) ; return true ; } catch ( final NumberFormatException ex ) { // fall through
} return false ;
|
public class SqlValidatorImpl { /** * Given a table alias , find the corresponding { @ link Table } associated with it */
private Table findTable ( String alias ) { } }
|
List < String > names = null ; if ( tableScope == null ) { // no tables to find
return null ; } for ( ScopeChild child : tableScope . children ) { if ( catalogReader . nameMatcher ( ) . matches ( child . name , alias ) ) { names = ( ( SqlIdentifier ) child . namespace . getNode ( ) ) . names ; break ; } } if ( names == null || names . size ( ) == 0 ) { return null ; } else if ( names . size ( ) == 1 ) { return findTable ( catalogReader . getRootSchema ( ) , names . get ( 0 ) , catalogReader . nameMatcher ( ) . isCaseSensitive ( ) ) ; } CalciteSchema . TableEntry entry = SqlValidatorUtil . getTableEntry ( catalogReader , names ) ; return entry == null ? null : entry . getTable ( ) ;
|
public class InternalPureXbaseParser { /** * InternalPureXbase . g : 2011:1 : ruleXUnaryOperation returns [ EObject current = null ] : ( ( ( ) ( ( ruleOpUnary ) ) ( ( lv _ operand _ 2_0 = ruleXUnaryOperation ) ) ) | this _ XCastedExpression _ 3 = ruleXCastedExpression ) ; */
public final EObject ruleXUnaryOperation ( ) throws RecognitionException { } }
|
EObject current = null ; EObject lv_operand_2_0 = null ; EObject this_XCastedExpression_3 = null ; enterRule ( ) ; try { // InternalPureXbase . g : 2017:2 : ( ( ( ( ) ( ( ruleOpUnary ) ) ( ( lv _ operand _ 2_0 = ruleXUnaryOperation ) ) ) | this _ XCastedExpression _ 3 = ruleXCastedExpression ) )
// InternalPureXbase . g : 2018:2 : ( ( ( ) ( ( ruleOpUnary ) ) ( ( lv _ operand _ 2_0 = ruleXUnaryOperation ) ) ) | this _ XCastedExpression _ 3 = ruleXCastedExpression )
{ // InternalPureXbase . g : 2018:2 : ( ( ( ) ( ( ruleOpUnary ) ) ( ( lv _ operand _ 2_0 = ruleXUnaryOperation ) ) ) | this _ XCastedExpression _ 3 = ruleXCastedExpression )
int alt36 = 2 ; int LA36_0 = input . LA ( 1 ) ; if ( ( ( LA36_0 >= 44 && LA36_0 <= 45 ) || LA36_0 == 50 ) ) { alt36 = 1 ; } else if ( ( ( LA36_0 >= RULE_STRING && LA36_0 <= RULE_ID ) || ( LA36_0 >= 14 && LA36_0 <= 15 ) || LA36_0 == 28 || ( LA36_0 >= 58 && LA36_0 <= 59 ) || LA36_0 == 61 || LA36_0 == 64 || LA36_0 == 66 || ( LA36_0 >= 69 && LA36_0 <= 80 ) ) ) { alt36 = 2 ; } else { if ( state . backtracking > 0 ) { state . failed = true ; return current ; } NoViableAltException nvae = new NoViableAltException ( "" , 36 , 0 , input ) ; throw nvae ; } switch ( alt36 ) { case 1 : // InternalPureXbase . g : 2019:3 : ( ( ) ( ( ruleOpUnary ) ) ( ( lv _ operand _ 2_0 = ruleXUnaryOperation ) ) )
{ // InternalPureXbase . g : 2019:3 : ( ( ) ( ( ruleOpUnary ) ) ( ( lv _ operand _ 2_0 = ruleXUnaryOperation ) ) )
// InternalPureXbase . g : 2020:4 : ( ) ( ( ruleOpUnary ) ) ( ( lv _ operand _ 2_0 = ruleXUnaryOperation ) )
{ // InternalPureXbase . g : 2020:4 : ( )
// InternalPureXbase . g : 2021:5:
{ if ( state . backtracking == 0 ) { current = forceCreateModelElement ( grammarAccess . getXUnaryOperationAccess ( ) . getXUnaryOperationAction_0_0 ( ) , current ) ; } } // InternalPureXbase . g : 2027:4 : ( ( ruleOpUnary ) )
// InternalPureXbase . g : 2028:5 : ( ruleOpUnary )
{ // InternalPureXbase . g : 2028:5 : ( ruleOpUnary )
// InternalPureXbase . g : 2029:6 : ruleOpUnary
{ if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElement ( grammarAccess . getXUnaryOperationRule ( ) ) ; } } if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getXUnaryOperationAccess ( ) . getFeatureJvmIdentifiableElementCrossReference_0_1_0 ( ) ) ; } pushFollow ( FOLLOW_3 ) ; ruleOpUnary ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { afterParserOrEnumRuleCall ( ) ; } } } // InternalPureXbase . g : 2043:4 : ( ( lv _ operand _ 2_0 = ruleXUnaryOperation ) )
// InternalPureXbase . g : 2044:5 : ( lv _ operand _ 2_0 = ruleXUnaryOperation )
{ // InternalPureXbase . g : 2044:5 : ( lv _ operand _ 2_0 = ruleXUnaryOperation )
// InternalPureXbase . g : 2045:6 : lv _ operand _ 2_0 = ruleXUnaryOperation
{ if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getXUnaryOperationAccess ( ) . getOperandXUnaryOperationParserRuleCall_0_2_0 ( ) ) ; } pushFollow ( FOLLOW_2 ) ; lv_operand_2_0 = ruleXUnaryOperation ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getXUnaryOperationRule ( ) ) ; } set ( current , "operand" , lv_operand_2_0 , "org.eclipse.xtext.xbase.Xbase.XUnaryOperation" ) ; afterParserOrEnumRuleCall ( ) ; } } } } } break ; case 2 : // InternalPureXbase . g : 2064:3 : this _ XCastedExpression _ 3 = ruleXCastedExpression
{ if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getXUnaryOperationAccess ( ) . getXCastedExpressionParserRuleCall_1 ( ) ) ; } pushFollow ( FOLLOW_2 ) ; this_XCastedExpression_3 = ruleXCastedExpression ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { current = this_XCastedExpression_3 ; afterParserOrEnumRuleCall ( ) ; } } break ; } } if ( state . backtracking == 0 ) { leaveRule ( ) ; } } catch ( RecognitionException re ) { recover ( input , re ) ; appendSkippedTokens ( ) ; } finally { } return current ;
|
public class CompositeConditionImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eUnset ( int featureID ) { } }
|
switch ( featureID ) { case XtextPackage . COMPOSITE_CONDITION__LEFT : setLeft ( ( Condition ) null ) ; return ; case XtextPackage . COMPOSITE_CONDITION__RIGHT : setRight ( ( Condition ) null ) ; return ; } super . eUnset ( featureID ) ;
|
public class ActivationSpecImpl { /** * { @ inheritDoc } */
public Activationspec copy ( ) { } }
|
return new ActivationSpecImpl ( CopyUtil . clone ( activationspecClass ) , CopyUtil . cloneList ( requiredConfigProperty ) , CopyUtil . cloneList ( configProperties ) , CopyUtil . cloneString ( id ) ) ;
|
public class AmazonRDSClient { /** * Backtracks a DB cluster to a specific time , without creating a new DB cluster .
* For more information on backtracking , see < a
* href = " https : / / docs . aws . amazon . com / AmazonRDS / latest / AuroraUserGuide / AuroraMySQL . Managing . Backtrack . html " >
* Backtracking an Aurora DB Cluster < / a > in the < i > Amazon Aurora User Guide . < / i >
* < note >
* This action only applies to Aurora DB clusters .
* < / note >
* @ param backtrackDBClusterRequest
* @ return Result of the BacktrackDBCluster operation returned by the service .
* @ throws DBClusterNotFoundException
* < i > DBClusterIdentifier < / i > doesn ' t refer to an existing DB cluster .
* @ throws InvalidDBClusterStateException
* The requested operation can ' t be performed while the cluster is in this state .
* @ sample AmazonRDS . BacktrackDBCluster
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / rds - 2014-10-31 / BacktrackDBCluster " target = " _ top " > AWS API
* Documentation < / a > */
@ Override public BacktrackDBClusterResult backtrackDBCluster ( BacktrackDBClusterRequest request ) { } }
|
request = beforeClientExecution ( request ) ; return executeBacktrackDBCluster ( request ) ;
|
public class Modal { /** * Get the modal of a specific frame
* @ param rootPane
* the RootPaneContainer with a modal
* @ return { @ link Modal } */
private static Modal getModal ( RootPaneContainer rootPane ) { } }
|
synchronized ( modals ) { Modal modal = modals . get ( rootPane ) ; if ( modal == null ) { modal = new Modal ( rootPane ) ; modals . put ( rootPane , modal ) ; } return modal ; }
|
public class ExtensibleFilter { /** * If the filename matches any string in the prefix , suffix , or matches array , return false . Perhaps a bit of
* overkill , but this method operates in log ( n ) time , where n is the size of the arrays .
* @ param file The file to be tested
* @ return < code > false < / code > if the filename matches any of the prefixes , suffixes , or matches . */
public boolean accepts ( VirtualFile file ) { } }
|
String name = file . getName ( ) ; // check exact match
int index = Collections . binarySearch ( matches , name ) ; if ( index >= 0 ) { return false ; } // check prefix
index = Collections . binarySearch ( prefixes , name ) ; if ( index >= 0 ) { return false ; } if ( index < - 1 ) { // The < 0 index gives the first index greater than name
int firstLessIndex = - 2 - index ; String prefix = prefixes . get ( firstLessIndex ) ; // If name starts with an ingored prefix ignore name
if ( name . startsWith ( prefix ) ) { return false ; } } // check suffix
index = Collections . binarySearch ( suffixes , name , reverseComparator ) ; if ( index >= 0 ) { return false ; } if ( index < - 1 ) { // The < 0 index gives the first index greater than name
int firstLessIndex = - 2 - index ; String suffix = suffixes . get ( firstLessIndex ) ; // If name ends with an ingored suffix ignore name
if ( name . endsWith ( suffix ) ) { return false ; } } // everything checks out .
return true ;
|
public class AbstractPortalEventToLrsStatementConverter { /** * Build the URN for the LrsStatement . This method attaches creates the base URN . Additional
* elements can be attached .
* @ param parts Additional URN elements .
* @ return The formatted URI */
protected URI buildUrn ( String ... parts ) { } }
|
UrnBuilder builder = new UrnBuilder ( "UTF-8" , "tincan" , "uportal" , "activities" ) ; builder . add ( parts ) ; return builder . getUri ( ) ;
|
public class AsyncDispatcher { /** * Run as long there is still an event for the key . */
public void runMoreOrStop ( AsyncEvent < K > _event ) { } }
|
for ( ; ; ) { try { _event . execute ( ) ; } catch ( Throwable t ) { cache . getLog ( ) . warn ( "Async event exception" , t ) ; } final K key = _event . getKey ( ) ; synchronized ( getLockObject ( key ) ) { Queue < AsyncEvent < K > > q = keyQueue . get ( key ) ; if ( q . isEmpty ( ) ) { keyQueue . remove ( key ) ; return ; } _event = q . remove ( ) ; } }
|
public class FirehoseActionMarshaller { /** * Marshall the given parameter object . */
public void marshall ( FirehoseAction firehoseAction , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( firehoseAction == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( firehoseAction . getRoleArn ( ) , ROLEARN_BINDING ) ; protocolMarshaller . marshall ( firehoseAction . getDeliveryStreamName ( ) , DELIVERYSTREAMNAME_BINDING ) ; protocolMarshaller . marshall ( firehoseAction . getSeparator ( ) , SEPARATOR_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class OjbMemberTagsHandler { /** * Returns the value of the tag / parameter combination for the current member tag
* @ param attributes The attributes of the template tag
* @ return Description of the Returned Value
* @ exception XDocletException Description of Exception
* @ doc . tag type = " content "
* @ doc . param name = " tagName " optional = " false " description = " The tag name . "
* @ doc . param name = " paramName " description = " The parameter name . If not specified , then the raw
* content of the tag is returned . "
* @ doc . param name = " paramNum " description = " The zero - based parameter number . It ' s used if the user
* used the space - separated format for specifying parameters . "
* @ doc . param name = " values " description = " The valid values for the parameter , comma separated . An
* error message is printed if the parameter value is not one of the values . "
* @ doc . param name = " default " description = " The default value is returned if parameter not specified
* by user for the tag . " */
public String memberTagValue ( Properties attributes ) throws XDocletException { } }
|
if ( getCurrentField ( ) != null ) { // setting field to true will override the for _ class value .
attributes . setProperty ( "field" , "true" ) ; return getExpandedDelimitedTagValue ( attributes , FOR_FIELD ) ; } else if ( getCurrentMethod ( ) != null ) { return getExpandedDelimitedTagValue ( attributes , FOR_METHOD ) ; } else { return null ; }
|
public class ApiOvhIpLoadbalancing { /** * Delete an UDP Farm
* REST : DELETE / ipLoadbalancing / { serviceName } / udp / farm / { farmId }
* @ param serviceName [ required ] The internal name of your IP load balancing
* @ param farmId [ required ] Id of your farm
* API beta */
public void serviceName_udp_farm_farmId_DELETE ( String serviceName , Long farmId ) throws IOException { } }
|
String qPath = "/ipLoadbalancing/{serviceName}/udp/farm/{farmId}" ; StringBuilder sb = path ( qPath , serviceName , farmId ) ; exec ( qPath , "DELETE" , sb . toString ( ) , null ) ;
|
public class ManagedServer { /** * Notification that a state transition failed .
* @ param state the failed transition */
synchronized void transitionFailed ( final InternalState state ) { } }
|
final InternalState current = this . internalState ; if ( state == current ) { // Revert transition and mark as failed
switch ( current ) { case PROCESS_ADDING : this . internalState = InternalState . PROCESS_STOPPED ; break ; case PROCESS_STARTED : internalSetState ( getTransitionTask ( InternalState . PROCESS_STOPPING ) , InternalState . PROCESS_STARTED , InternalState . PROCESS_ADDED ) ; break ; case PROCESS_STARTING : this . internalState = InternalState . PROCESS_ADDED ; break ; case SEND_STDIN : case SERVER_STARTING : this . internalState = InternalState . PROCESS_STARTED ; break ; } this . requiredState = InternalState . FAILED ; notifyAll ( ) ; }
|
public class MarkdownParser { /** * Parse the Markdown message and entity JSON into a MessageML document . */
public MessageML parse ( String message , JsonNode entities , JsonNode media ) throws InvalidInputException { } }
|
this . index = 0 ; message = message . replace ( ( char ) 160 , ( char ) 32 ) ; String enriched = enrichMarkdown ( message , entities , media ) ; Node markdown = MARKDOWN_PARSER . parse ( enriched ) ; markdown . accept ( this ) ; return messageML ;
|
public class ApplicationInstanceService { /** * Returns the application instance for the given id .
* @ param applicationId The application id
* @ param instanceId The application instance id
* @ return The application instance */
public Optional < ApplicationInstance > show ( long applicationId , long instanceId ) { } }
|
return HTTP . GET ( String . format ( "/v2/applications/%d/instances/%d.json" , applicationId , instanceId ) , APPLICATION_INSTANCE ) ;
|
public class CmsContainerpageService { /** * Returns the lock information to the given resource . < p >
* @ param resource the resource
* @ return lock information , if the page is locked by another user
* @ throws CmsException if something goes wrong reading the lock owner user */
private String getLockInfo ( CmsResource resource ) throws CmsException { } }
|
CmsObject cms = getCmsObject ( ) ; CmsResourceUtil resourceUtil = new CmsResourceUtil ( cms , resource ) ; CmsLock lock = resourceUtil . getLock ( ) ; String lockInfo = null ; if ( ! lock . isLockableBy ( cms . getRequestContext ( ) . getCurrentUser ( ) ) ) { if ( lock . getType ( ) == CmsLockType . PUBLISH ) { lockInfo = Messages . get ( ) . getBundle ( OpenCms . getWorkplaceManager ( ) . getWorkplaceLocale ( cms ) ) . key ( Messages . GUI_LOCKED_FOR_PUBLISH_0 ) ; } else { CmsUser lockOwner = cms . readUser ( lock . getUserId ( ) ) ; lockInfo = Messages . get ( ) . getBundle ( OpenCms . getWorkplaceManager ( ) . getWorkplaceLocale ( cms ) ) . key ( Messages . GUI_LOCKED_BY_1 , lockOwner . getFullName ( ) ) ; } } return lockInfo ;
|
public class GVRContext { /** * Logs an error by sending an error event to all listeners .
* Error events can be generated by any part of GearVRF ,
* from any thread . They are always sent to the event receiver
* of the GVRContext .
* @ param message error message
* @ param sender object which had the error
* @ see IErrorEvents */
public void logError ( String message , Object sender ) { } }
|
getEventManager ( ) . sendEvent ( this , IErrorEvents . class , "onError" , new Object [ ] { message , sender } ) ;
|
public class BrowserPane { /** * Renders current content to graphic context , which is returned . May return
* null ;
* @ return the Graphics2D context
* @ see Graphics2D */
public Graphics2D renderContent ( ) { } }
|
View view = null ; ViewFactory factory = getEditorKit ( ) . getViewFactory ( ) ; if ( factory instanceof SwingBoxViewFactory ) { view = ( ( SwingBoxViewFactory ) factory ) . getViewport ( ) ; } if ( view != null ) { int w = ( int ) view . getPreferredSpan ( View . X_AXIS ) ; int h = ( int ) view . getPreferredSpan ( View . Y_AXIS ) ; Rectangle rec = new Rectangle ( w , h ) ; BufferedImage img = new BufferedImage ( w , h , BufferedImage . TYPE_INT_RGB ) ; Graphics2D g = img . createGraphics ( ) ; g . setClip ( rec ) ; view . paint ( g , rec ) ; return g ; } return null ;
|
public class ArrayHelper { /** * Get a new array that combines the passed array and the tail element . The
* tail element will be the last element of the created array .
* @ param < ELEMENTTYPE >
* Array element type
* @ param aHeadArray
* The head array . May be < code > null < / code > .
* @ param aTail
* The last element of the result array . If this element is
* < code > null < / code > it will be inserted as such into the array !
* @ param aClass
* The element class . Must be present , because in case both elements
* are < code > null < / code > there would be no way to create a new array .
* May not be < code > null < / code > .
* @ return < code > null < / code > if both array parameters are < code > null < / code > -
* a non - < code > null < / code > array with all elements in the correct
* order otherwise . */
@ Nonnull @ ReturnsMutableCopy public static < ELEMENTTYPE > ELEMENTTYPE [ ] getConcatenated ( @ Nullable final ELEMENTTYPE [ ] aHeadArray , @ Nullable final ELEMENTTYPE aTail , @ Nonnull final Class < ELEMENTTYPE > aClass ) { } }
|
if ( isEmpty ( aHeadArray ) ) return newArraySingleElement ( aTail , aClass ) ; // Start concatenating
final ELEMENTTYPE [ ] ret = newArray ( aClass , aHeadArray . length + 1 ) ; System . arraycopy ( aHeadArray , 0 , ret , 0 , aHeadArray . length ) ; ret [ aHeadArray . length ] = aTail ; return ret ;
|
public class JiteClass { /** * Convert this class representation to JDK bytecode
* @ param version the desired JDK version
* @ return the bytecode representation of this class */
public byte [ ] toBytes ( JDKVersion version ) { } }
|
ClassNode node = new ClassNode ( ) ; node . version = version . getVer ( ) ; node . access = this . access | ACC_SUPER ; node . name = this . className ; node . superName = this . superClassName ; node . sourceFile = this . sourceFile ; node . sourceDebug = this . sourceDebug ; if ( parentClassName != null ) { node . visitOuterClass ( parentClassName , null , null ) ; } for ( ChildEntry child : childClasses ) { node . visitInnerClass ( child . getClassName ( ) , className , child . getInnerName ( ) , child . getAccess ( ) ) ; } if ( ! this . interfaces . isEmpty ( ) ) { node . interfaces . addAll ( this . interfaces ) ; } for ( MethodDefinition def : methods ) { node . methods . add ( def . getMethodNode ( ) ) ; } for ( FieldDefinition def : fields ) { node . fields . add ( def . getFieldNode ( ) ) ; } if ( node . visibleAnnotations == null ) { node . visibleAnnotations = new ArrayList < AnnotationNode > ( ) ; } for ( VisibleAnnotation a : annotations ) { node . visibleAnnotations . add ( a . getNode ( ) ) ; } ClassWriter cw = new ClassWriter ( ClassWriter . COMPUTE_FRAMES ) ; node . accept ( cw ) ; return cw . toByteArray ( ) ;
|
public class AbstractTracer { /** * Replaces the given argument by repeatedly substituting all expressions of the form $ { property - key } with the
* corresponding property value .
* @ param expression the to be replaced expression
* @ return the replaced expression
* @ throws de . christofreichardt . diagnosis . AbstractTracer . Exception indicates problems during the replacement */
protected String substitute ( String expression ) throws AbstractTracer . Exception { } }
|
Pattern compiledPattern = Pattern . compile ( "\\$\\{[a-zA-Z0-9.]+\\}" ) ; Matcher matcher = compiledPattern . matcher ( expression ) ; int pos = 0 ; StringBuilder stringBuilder = new StringBuilder ( ) ; boolean flag ; do { flag = false ; while ( matcher . find ( ) ) { stringBuilder . append ( expression . substring ( pos , matcher . start ( ) ) ) ; String propertyKey = expression . substring ( matcher . start ( ) + 2 , matcher . end ( ) - 1 ) ; if ( System . getProperties ( ) . containsKey ( propertyKey ) ) { String propertyValue = System . getProperty ( propertyKey ) ; stringBuilder . append ( propertyValue ) ; pos = matcher . end ( ) ; flag = true ; } else { throw new AbstractTracer . Exception ( "Unknown property key." ) ; } } stringBuilder . append ( expression . substring ( pos ) ) ; expression = stringBuilder . toString ( ) ; if ( flag ) { stringBuilder = new StringBuilder ( ) ; matcher . reset ( expression ) ; pos = 0 ; } } while ( flag ) ; return expression ;
|
public class ConflictResolverUtils { /** * Resolves the conflicts for a given directive between the general pattern and the specific PatternCacheControl
* @ param directive
* @ param generalValue
* @ param specificPattern */
private static void resolveValueConflicts ( Directive directive , String generalValue , PatternCacheControl specificPattern ) { } }
|
long generalPatternValue = Long . parseLong ( generalValue ) ; if ( specificPattern . hasDirective ( directive ) ) { long specificPatternValue = Long . parseLong ( specificPattern . getDirectiveValue ( directive ) ) ; if ( specificPatternValue > generalPatternValue ) { specificPattern . setDirective ( directive , generalValue ) ; } return ; } specificPattern . setDirective ( directive , generalValue ) ;
|
public class BondCountDescriptor { /** * This method calculate the number of bonds of a given type in an atomContainer
* @ param container AtomContainer
* @ return The number of bonds of a certain type . */
@ Override public DescriptorValue calculate ( IAtomContainer container ) { } }
|
if ( order . equals ( "" ) ) { int bondCount = 0 ; for ( IBond bond : container . bonds ( ) ) { boolean hasHydrogen = false ; for ( int i = 0 ; i < bond . getAtomCount ( ) ; i ++ ) { if ( bond . getAtom ( i ) . getSymbol ( ) . equals ( "H" ) ) { hasHydrogen = true ; break ; } } if ( ! hasHydrogen ) bondCount ++ ; } return new DescriptorValue ( getSpecification ( ) , getParameterNames ( ) , getParameters ( ) , new IntegerResult ( bondCount ) , getDescriptorNames ( ) , null ) ; } int bondCount = 0 ; for ( IBond bond : container . bonds ( ) ) { if ( bondMatch ( bond . getOrder ( ) , order ) ) { bondCount += 1 ; } } return new DescriptorValue ( getSpecification ( ) , getParameterNames ( ) , getParameters ( ) , new IntegerResult ( bondCount ) , getDescriptorNames ( ) ) ;
|
public class LoopBarView { /** * orientation state factory method */
public IOrientationState getOrientationStateFromParam ( int orientation ) { } }
|
switch ( orientation ) { case Orientation . ORIENTATION_HORIZONTAL_BOTTOM : return new OrientationStateHorizontalBottom ( ) ; case Orientation . ORIENTATION_HORIZONTAL_TOP : return new OrientationStateHorizontalTop ( ) ; case Orientation . ORIENTATION_VERTICAL_LEFT : return new OrientationStateVerticalLeft ( ) ; case Orientation . ORIENTATION_VERTICAL_RIGHT : return new OrientationStateVerticalRight ( ) ; default : return new OrientationStateHorizontalBottom ( ) ; }
|
public class BaseTree { /** * Delete children from start to stop and replace with t even if t is
* a list ( nil - root tree ) . num of children can increase or decrease .
* For huge child lists , inserting children can force walking rest of
* children to set their childindex ; could be slow . */
@ Override public void replaceChildren ( int startChildIndex , int stopChildIndex , Object t ) { } }
|
/* System . out . println ( " replaceChildren " + startChildIndex + " , " + stopChildIndex +
" with " + ( ( BaseTree ) t ) . toStringTree ( ) ) ;
System . out . println ( " in = " + toStringTree ( ) ) ; */
if ( children == null ) { throw new IllegalArgumentException ( "indexes invalid; no children in list" ) ; } int replacingHowMany = stopChildIndex - startChildIndex + 1 ; int replacingWithHowMany ; BaseTree newTree = ( BaseTree ) t ; List < Object > newChildren ; // normalize to a list of children to add : newChildren
if ( newTree . isNil ( ) ) { newChildren = newTree . children ; } else { newChildren = new ArrayList < Object > ( 1 ) ; newChildren . add ( newTree ) ; } replacingWithHowMany = newChildren . size ( ) ; int numNewChildren = newChildren . size ( ) ; int delta = replacingHowMany - replacingWithHowMany ; // if same number of nodes , do direct replace
if ( delta == 0 ) { int j = 0 ; // index into new children
for ( int i = startChildIndex ; i <= stopChildIndex ; i ++ ) { BaseTree child = ( BaseTree ) newChildren . get ( j ) ; children . set ( i , child ) ; child . setParent ( this ) ; child . setChildIndex ( i ) ; j ++ ; } } else if ( delta > 0 ) { // fewer new nodes than there were
// set children and then delete extra
for ( int j = 0 ; j < numNewChildren ; j ++ ) { children . set ( startChildIndex + j , newChildren . get ( j ) ) ; } int indexToDelete = startChildIndex + numNewChildren ; for ( int c = indexToDelete ; c <= stopChildIndex ; c ++ ) { // delete same index , shifting everybody down each time
children . remove ( indexToDelete ) ; } freshenParentAndChildIndexes ( startChildIndex ) ; } else { // more new nodes than were there before
// fill in as many children as we can ( replacingHowMany ) w / o moving data
for ( int j = 0 ; j < replacingHowMany ; j ++ ) { children . set ( startChildIndex + j , newChildren . get ( j ) ) ; } // int numToInsert = replacingWithHowMany - replacingHowMany ;
for ( int j = replacingHowMany ; j < replacingWithHowMany ; j ++ ) { children . add ( startChildIndex + j , newChildren . get ( j ) ) ; } freshenParentAndChildIndexes ( startChildIndex ) ; } // System . out . println ( " out = " + toStringTree ( ) ) ;
|
public class sslcertkey { /** * Use this API to fetch sslcertkey resources of given names . */
public static sslcertkey [ ] get ( nitro_service service , String certkey [ ] ) throws Exception { } }
|
if ( certkey != null && certkey . length > 0 ) { sslcertkey response [ ] = new sslcertkey [ certkey . length ] ; sslcertkey obj [ ] = new sslcertkey [ certkey . length ] ; for ( int i = 0 ; i < certkey . length ; i ++ ) { obj [ i ] = new sslcertkey ( ) ; obj [ i ] . set_certkey ( certkey [ i ] ) ; response [ i ] = ( sslcertkey ) obj [ i ] . get_resource ( service ) ; } return response ; } return null ;
|
public class AuthorizationRequestManager { /** * Processes authentication successes .
* @ param jsonSuccesses Collection of authentication successes . */
private void processSuccesses ( JSONObject jsonSuccesses ) { } }
|
if ( jsonSuccesses == null ) { return ; } MCAAuthorizationManager authManager = ( MCAAuthorizationManager ) BMSClient . getInstance ( ) . getAuthorizationManager ( ) ; ArrayList < String > challenges = getRealmsFromJson ( jsonSuccesses ) ; for ( String realm : challenges ) { ChallengeHandler handler = authManager . getChallengeHandler ( realm ) ; if ( handler != null ) { JSONObject challenge = jsonSuccesses . optJSONObject ( realm ) ; handler . handleSuccess ( context , challenge ) ; } else { logger . error ( "Challenge handler for realm is not found: " + realm ) ; } }
|
public class River { /** * Loads a wrapper that wraps libraries as lotus . domino or org . openntf . domino and creates a core Session
* object . Its behavior will depend on how the wrapper is implemented . Anyway , this method creates the session just
* one time and returns the same every time is called . To free the memory , resources , etc . , it ' s necessary to call
* the close method at the end of the program or process .
* @ param wrapper
* the package ' s full name . You can use the constants defined as River . wrapper _ LOTUS _ DOMINO or
* River . wrapper _ ORG _ OPENNTF _ DOMINO
* @ param parameters
* their values and how to set them will depend exclusively on how the wrapper is implemented . Check the
* wrapper documentation .
* @ return a Session object */
public static Session getSession ( String wrapper , Object ... parameters ) { } }
|
// This will be the session loaded depending the selected wrapper
org . riverframework . wrapper . Session < ? > _session = null ; // Trying to retrieve the session from the map
Session session = map . get ( wrapper ) ; if ( session != null && session . isOpen ( ) ) { // There is an open session
if ( parameters . length > 0 ) { // and the user is trying to open a new one
throw new RiverException ( "There is already an open session for the wrapper " + wrapper + ". You must close the current before opening a new one." ) ; } // If there are no parameters , we just return the current opened session
} else { // If not exists or is closed , we create it using the factory
Class < ? > clazzFactory = null ; try { clazzFactory = Class . forName ( wrapper + ".DefaultFactory" ) ; } catch ( ClassNotFoundException e ) { throw new RiverException ( "The wrapper '" + wrapper + "' can not be loaded. If you are using an non-official wrapper, " + "check the wrapper name and its design. Check the CLASSPATH." ) ; } try { Method method = clazzFactory . getDeclaredMethod ( "getInstance" ) ; method . setAccessible ( true ) ; org . riverframework . wrapper . Factory < ? > _factory = ( org . riverframework . wrapper . Factory < ? > ) method . invoke ( null ) ; if ( _factory == null ) throw new RiverException ( "The factory could not be loaded." ) ; if ( parameters . length > 0 ) { // There are parameters . So , we try to create a new one .
_session = ( org . riverframework . wrapper . Session < ? > ) _factory . getSession ( parameters ) ; } else { // There are no parameters . We create a closed session .
_session = null ; } Constructor < ? > constructor = DefaultSession . class . getDeclaredConstructor ( org . riverframework . wrapper . Session . class ) ; constructor . setAccessible ( true ) ; session = ( DefaultSession ) constructor . newInstance ( _session ) ; } catch ( Exception e ) { throw new RiverException ( "There's a problem opening the session. Maybe, you will need to check the parameters." , e ) ; } map . put ( wrapper , session ) ; } return session ;
|
public class Operand { /** * Sets the feedItem value for this Operand .
* @ param feedItem */
public void setFeedItem ( com . google . api . ads . adwords . axis . v201809 . cm . FeedItem feedItem ) { } }
|
this . feedItem = feedItem ;
|
public class JoinTableMetadata { /** * Adds the inverse join columns .
* @ param inverseJoinColumn
* the inverseJoinColumns to add */
public void addInverseJoinColumns ( String inverseJoinColumn ) { } }
|
if ( inverseJoinColumns == null || inverseJoinColumns . isEmpty ( ) ) { inverseJoinColumns = new HashSet < String > ( ) ; } inverseJoinColumns . add ( inverseJoinColumn ) ;
|
public class AmazonSimpleEmailServiceClient { /** * Deletes the specified receipt rule .
* For information about managing receipt rules , see the < a
* href = " http : / / docs . aws . amazon . com / ses / latest / DeveloperGuide / receiving - email - managing - receipt - rules . html " > Amazon
* SES Developer Guide < / a > .
* You can execute this operation no more than once per second .
* @ param deleteReceiptRuleRequest
* Represents a request to delete a receipt rule . You use receipt rules to receive email with Amazon SES . For
* more information , see the < a
* href = " http : / / docs . aws . amazon . com / ses / latest / DeveloperGuide / receiving - email - concepts . html " > Amazon SES
* Developer Guide < / a > .
* @ return Result of the DeleteReceiptRule operation returned by the service .
* @ throws RuleSetDoesNotExistException
* Indicates that the provided receipt rule set does not exist .
* @ sample AmazonSimpleEmailService . DeleteReceiptRule
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / email - 2010-12-01 / DeleteReceiptRule " target = " _ top " > AWS API
* Documentation < / a > */
@ Override public DeleteReceiptRuleResult deleteReceiptRule ( DeleteReceiptRuleRequest request ) { } }
|
request = beforeClientExecution ( request ) ; return executeDeleteReceiptRule ( request ) ;
|
public class XmlFilterModule { /** * Get pipe line filters
* @ param fi current file being processed */
private List < XMLFilter > getProcessingPipe ( final FileInfo fi ) { } }
|
final URI fileToParse = job . tempDirURI . resolve ( fi . uri ) ; assert fileToParse . isAbsolute ( ) ; final List < XMLFilter > res = new ArrayList < > ( ) ; for ( final FilterPair p : filters ) { if ( p . predicate . test ( fi ) ) { final AbstractXMLFilter f = p . filter ; logger . debug ( "Configure filter " + f . getClass ( ) . getCanonicalName ( ) ) ; f . setCurrentFile ( fileToParse ) ; f . setJob ( job ) ; f . setLogger ( logger ) ; res . add ( f ) ; } } return res ;
|
public class DirectoryCodePluginManager { /** * Create a plugin config object from JSON format .
* @ param inputStream the stream containing the JSON file .
* @ return the config object */
private CodePluginConfig parsePluginConfig ( InputStream inputStream ) { } }
|
Gson gson = new Gson ( ) ; CodePluginConfig config = gson . fromJson ( new InputStreamReader ( inputStream ) , CodePluginConfig . class ) ; logger . log ( Level . INFO , "Loaded configuration " + config ) ; return config ;
|
public class SpecialMatchExpt { /** * Command - line interface . */
static public void main ( String [ ] argv ) { } }
|
try { Blocker blocker = ( Blocker ) Class . forName ( BLOCKER_PACKAGE + argv [ 0 ] ) . newInstance ( ) ; StringDistanceLearner learner = DistanceLearnerFactory . build ( argv [ 1 ] ) ; MatchData data = new MatchData ( argv [ 2 ] ) ; // check for options for the experiment
boolean useTrueClusters = false ; String moreNamesFile = null ; String similarTokenFile = null ; boolean untrained = false ; for ( int i = 3 ; i < argv . length ; ) { String c = argv [ i ++ ] ; if ( c . equals ( "-trueClusters" ) ) { useTrueClusters = true ; } else if ( c . equals ( "-untrained" ) ) { untrained = true ; } else if ( c . equals ( "-moreNames" ) ) { moreNamesFile = argv [ i ++ ] ; } else if ( c . equals ( "-similarTokens" ) ) { similarTokenFile = argv [ i ++ ] ; } } // run the experiment
SpecialMatchExpt expt = new SpecialMatchExpt ( data , learner , blocker , useTrueClusters , moreNamesFile , similarTokenFile , untrained ) ; // print results
for ( int i = 3 ; i < argv . length ; ) { String c = argv [ i ++ ] ; if ( c . equals ( "-display" ) ) { expt . displayResults ( true , System . out ) ; } else if ( c . equals ( "-dump" ) ) { expt . dumpResults ( System . out ) ; } else if ( c . equals ( "-shortDisplay" ) ) { expt . displayResults ( false , System . out ) ; } else if ( c . equals ( "-graph" ) ) { expt . graphPrecisionRecall ( System . out ) ; } else if ( c . equals ( "-summarize" ) ) { System . out . println ( "maxF1:\t" + expt . maxF1 ( ) ) ; System . out . println ( "avgPrec:\t" + expt . averagePrecision ( ) ) ; } else if ( c . equals ( "-explain" ) ) { // debugging , trick 1
System . out . println ( "distance: " + expt . getLearnedDistance ( ) ) ; System . out . println ( "inputs: '" + argv [ i ] + "' and '" + argv [ i + 1 ] + "'" ) ; System . out . println ( expt . getLearnedDistance ( ) . explainScore ( argv [ i ] , argv [ i + 1 ] ) ) ; i += 2 ; } else if ( c . equals ( "-df" ) ) { TFIDF dist = ( ( TFIDF ) expt . getLearnedDistance ( ) ) ; dist . prepare ( argv [ i ++ ] ) ; Token [ ] toks = dist . getTokens ( ) ; for ( int j = 0 ; j < toks . length ; j ++ ) { System . out . println ( "df of " + toks [ j ] + " is " + dist . getDocumentFrequency ( toks [ j ] ) ) ; } } else if ( c . equals ( "-trueClusters" ) || c . equals ( "-untrained" ) ) { ; } else if ( c . equals ( "-moreNames" ) || c . equals ( "-similarTokens" ) ) { i ++ ; } else { throw new RuntimeException ( "illegal command " + c ) ; } } } catch ( Exception e ) { e . printStackTrace ( ) ; System . out . println ( "\nusage: <blocker> <distanceClass> <matchDataFile> [commands]\n" ) ; }
|
public class WebApplicationHandler { public FilterHolder defineFilter ( String name , String className ) { } }
|
FilterHolder holder = newFilterHolder ( name , className ) ; addFilterHolder ( holder ) ; return holder ;
|
public class HelpParser { /** * Output this screen using HTML . . */
public void printHtmlHelp ( PrintWriter out , String strTag , String strParams , String strData ) { } }
|
this . parseHtmlData ( out , m_recDetail . getClassHelp ( ) ) ;
|
public class CellField { /** * エラーを追加する
* @ param errorCode エラコード
* @ param variables エラーメッセージ中の変数 */
public void rejectValue ( final String errorCode , final Map < String , Object > variables ) { } }
|
final String codes [ ] = errors . generateMessageCodes ( errorCode , fieldPath , fieldType ) ; final FieldError error = new FieldErrorBuilder ( errors . getObjectName ( ) , fieldPath , codes ) . sheetName ( errors . getSheetName ( ) ) . rejectedValue ( fieldValue ) . variables ( variables ) . address ( position ) . label ( label ) . build ( ) ; errors . addError ( error ) ;
|
public class OrtcClient { /** * subscribeWithFilter the specified channel with a given filter in order to receive filtered messages in that
* channel
* @ param channel
* Channel to be subscribed
* @ param subscribeOnReconnect
* Indicates if the channel should be subscribe if the event on
* reconnected is fired
* @ param filter
* The filter to apply to messages on the given channel
* @ param onMessageWithFilter
* Event handler that will be called when a message will be
* received on the subscribed channel */
public void subscribeWithFilter ( String channel , boolean subscribeOnReconnect , String filter , OnMessageWithFilter onMessageWithFilter ) { } }
|
ChannelSubscription subscribedChannel = subscribedChannels . get ( channel ) ; Pair < Boolean , String > subscribeValidation = isSubscribeValid ( channel , subscribedChannel ) ; if ( subscribeValidation != null && subscribeValidation . first ) { subscribedChannel = new ChannelSubscription ( subscribeOnReconnect , onMessageWithFilter ) ; subscribedChannel . setFilter ( filter ) ; subscribedChannel . setWithFilter ( true ) ; subscribedChannel . setSubscribing ( true ) ; subscribedChannels . put ( channel , subscribedChannel ) ; subscribe ( channel , subscribeValidation . second , true , filter ) ; }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.