signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class SimpleNsStreamWriter { /** * Element copier method implementation suitable to be used with * namespace - aware writers in non - repairing ( explicit namespaces ) mode . * The trickiest thing is having to properly * order calls to < code > setPrefix < / code > , < code > writeNamespace < / code > * ...
// Any namespace declarations / bindings ? int nsCount = elemStack . getCurrentNsCount ( ) ; if ( nsCount > 0 ) { // yup , got some . . . /* First , need to ( or at least , should ? ) add prefix bindings : * ( may not be 100 % required , but probably a good thing to do , * just so that app code has access to prefix...
public class TregexMatcher { /** * Find the next match of the pattern on the tree * @ return whether there is a match somewhere in the tree */ public boolean find ( ) { } }
if ( findIterator == null ) { findIterator = root . iterator ( ) ; } if ( findCurrent != null && matches ( ) ) { return true ; } while ( findIterator . hasNext ( ) ) { findCurrent = findIterator . next ( ) ; resetChildIter ( findCurrent ) ; if ( matches ( ) ) { return true ; } } return false ;
public class CmsChnav { /** * Performs the navigation change . < p > * @ throws JspException if including a JSP subelement is not successful */ public void actionChangeNav ( ) throws JspException { } }
// save initialized instance of this class in request attribute for included sub - elements getJsp ( ) . getRequest ( ) . setAttribute ( SESSION_WORKPLACE_CLASS , this ) ; // get request parameters String filename = getParamResource ( ) ; // do not use # getParamNavText since it is decoded , see CmsWorkplace # fillPara...
public class ServerImpl { /** * Removes a member from the server . * @ param user The user to remove . */ public void removeMember ( User user ) { } }
long userId = user . getId ( ) ; members . remove ( userId ) ; nicknames . remove ( userId ) ; selfMuted . remove ( userId ) ; selfDeafened . remove ( userId ) ; muted . remove ( userId ) ; deafened . remove ( userId ) ; getRoles ( ) . forEach ( role -> ( ( RoleImpl ) role ) . removeUserFromCache ( user ) ) ; joinedAtT...
public class TaskLogsMonitor { /** * Check if truncation of logs is needed for the given jvmInfo . If all the * tasks that ran in a JVM are within the log - limits , then truncation is not * needed . Otherwise it is needed . * @ param lInfo * @ param taskLogFileDetails * @ param logName * @ return true if t...
boolean truncationNeeded = false ; LogFileDetail logFileDetail = null ; for ( Task task : lInfo . allAttempts ) { long taskRetainSize = ( task . isMapTask ( ) ? mapRetainSize : reduceRetainSize ) ; Map < LogName , LogFileDetail > allLogsFileDetails = taskLogFileDetails . get ( task ) ; logFileDetail = allLogsFileDetail...
public class MtasCodecPostingsFormat { /** * Gets the token . * @ param inObject the in object * @ param inTerm the in term * @ param ref the ref * @ return the token * @ throws IOException Signals that an I / O exception has occurred . */ public static MtasTokenString getToken ( IndexInput inObject , IndexIn...
MtasTokenString token = null ; try { inObject . seek ( ref ) ; token = new MtasTokenString ( null , "" ) ; token . setId ( inObject . readVInt ( ) ) ; token . setTokenRef ( ref ) ; int objectFlags = inObject . readVInt ( ) ; int [ ] positions = null ; if ( ( objectFlags & MTAS_OBJECT_HAS_PARENT ) == MTAS_OBJECT_HAS_PAR...
public class UserBroker { /** * Reads and populate a collection of { @ link User } from excel file available at dataFilePath . * @ param dataFilePath * @ return collection of users . */ static Set < User > brokeUserList ( final String dataFilePath ) { } }
Set < User > users = new HashSet < User > ( ) ; Workbook workBook = null ; File file = new File ( dataFilePath ) ; InputStream excelDocumentStream = null ; try { excelDocumentStream = new FileInputStream ( file ) ; POIFSFileSystem fsPOI = new POIFSFileSystem ( new BufferedInputStream ( excelDocumentStream ) ) ; workBoo...
public class DefaultBootstrapFormGroupRenderer { /** * Retrieve an optional CSS class that is provided to the final node . This * method is only called if a non - < code > null < / code > and non - empty error list * is present . * @ param aErrorList * The error list . May be < code > null < / code > . * @ re...
if ( aErrorList != null && ! aErrorList . isEmpty ( ) ) { if ( aErrorList . containsAtLeastOneError ( ) ) return EBootstrapFormGroupState . ERROR ; if ( aErrorList . containsAtLeastOneFailure ( ) ) return EBootstrapFormGroupState . WARNING ; } return null ;
public class TcpPacketTransport { /** * ( non - Javadoc ) * @ see net . timewalker . ffmq4 . remote . transport . PacketTransport # start ( ) */ @ Override public void start ( ) throws PacketTransportException { } }
try { NetworkInputChannel inputChannel = new NetworkInputChannel ( initialPacketBufferSize , new TcpBufferedInputStream ( socket . getInputStream ( ) , streamRecvBufferSize ) ) ; NetworkOutputChannel outputChannel = new NetworkOutputChannel ( initialPacketBufferSize , new TcpBufferedOutputStream ( socket . getOutputStr...
public class Chunk { /** * Gets the text displacement relative to the baseline . * @ return a displacement in points */ public float getTextRise ( ) { } }
if ( attributes != null && attributes . containsKey ( SUBSUPSCRIPT ) ) { Float f = ( Float ) attributes . get ( SUBSUPSCRIPT ) ; return f . floatValue ( ) ; } return 0.0f ;
public class Descriptor { /** * Add the given manual ACLs . * If auto ACLs are configured , these will be added in addition to the auto ACLs . * @ param acls The ACLs to add . * @ return A copy of this descriptor . */ public Descriptor withServiceAcls ( ServiceAcl ... acls ) { } }
return replaceAllAcls ( this . acls . plusAll ( Arrays . asList ( acls ) ) ) ;
public class TrackedTorrent { /** * Load a tracked torrent from the given torrent file . * @ param torrent The abstract { @ link File } object representing the * < tt > . torrent < / tt > file to load . * @ throws IOException When the torrent file cannot be read . */ public static TrackedTorrent load ( File torre...
TorrentMetadata torrentMetadata = new TorrentParser ( ) . parseFromFile ( torrent ) ; return new TrackedTorrent ( torrentMetadata . getInfoHash ( ) ) ;
public class ScatterChartPanel { /** * Paints a tick with the specified length and value with respect to the given dimension . * @ param g Graphics context * @ param dim Reference dimension for tick painting * @ param tickValue Value for the tick * @ param tickLength Length of the tick */ protected void paintTi...
String str = String . format ( getTickInfo ( dim ) . getFormat ( ) , tickValue . doubleValue ( ) ) ; int xPosition ; int yPosition ; Point descPos ; switch ( dim ) { case X : xPosition = getXFor ( tickValue ) ; yPosition = getPaintingRegion ( ) . getBottomLeft ( ) . y ; g . drawLine ( xPosition , yPosition , xPosition ...
public class UpdateCertificateRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( UpdateCertificateRequest updateCertificateRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( updateCertificateRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateCertificateRequest . getCertificateId ( ) , CERTIFICATEID_BINDING ) ; protocolMarshaller . marshall ( updateCertificateRequest . getNewStatus ( ) , NEWSTA...
public class ConcurrentCache { /** * Removes the specified key only if the current value equals the specified value . * If the value does not match the current value , the removal will not occur . * @ param key the key to be removed * @ param val the value that must be matched by the current value for this key */...
String k = key . toString ( ) ; // synchronized ( this ) { V item ; if ( ! containsKey ( k ) ) { return false ; } item = get ( k ) ; if ( val == null && item == null ) { remove ( k ) ; return true ; } if ( val == null || item == null ) { return false ; } if ( val . equals ( item ) ) { remove ( k ) ; return true ; } ret...
public class AllureResultsUtils { /** * Generate attachment extension from mime type * @ param type valid mime - type * @ return extension if it ' s known for specified mime - type , or empty string * otherwise */ public static String getExtensionByMimeType ( String type ) { } }
MimeTypes types = getDefaultMimeTypes ( ) ; try { return types . forName ( type ) . getExtension ( ) ; } catch ( Exception e ) { LOGGER . warn ( "Can't detect extension for MIME-type " + type , e ) ; return "" ; }
public class Table { /** * Returns a new table containing the first { @ code nrows } of data in this table */ public Table first ( int nRows ) { } }
int newRowCount = Math . min ( nRows , rowCount ( ) ) ; return inRange ( 0 , newRowCount ) ;
public class DescribeCasesResult { /** * The details for the cases that match the request . * @ return The details for the cases that match the request . */ public java . util . List < CaseDetails > getCases ( ) { } }
if ( cases == null ) { cases = new com . amazonaws . internal . SdkInternalList < CaseDetails > ( ) ; } return cases ;
public class ELParser { /** * @ return The next token in the EL expression buffer . */ private Token nextToken ( ) { } }
skipSpaces ( ) ; if ( hasNextChar ( ) ) { char ch = nextChar ( ) ; if ( Character . isJavaIdentifierStart ( ch ) ) { StringBuffer buf = new StringBuffer ( ) ; buf . append ( ch ) ; while ( ( ch = peekChar ( ) ) != - 1 && Character . isJavaIdentifierPart ( ch ) ) { buf . append ( ch ) ; nextChar ( ) ; } return new Id ( ...
public class Cells { /** * Returns the { @ code InetAddress } value of the { @ link Cell } ( associated to { @ code table } ) whose name iscellName , or * null if this Cells object contains no cell whose name is cellName . * @ param nameSpace the name of the owning table * @ param cellName the name of the Cell we...
return getValue ( nameSpace , cellName , InetAddress . class ) ;
public class CommerceNotificationAttachmentPersistenceImpl { /** * Returns the first commerce notification attachment in the ordered set where uuid = & # 63 ; . * @ param uuid the uuid * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the first match...
List < CommerceNotificationAttachment > list = findByUuid ( uuid , 0 , 1 , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ;
public class AbstractCrawl { /** * Get hold of the default options . * @ return the options that needs to run a crawl */ @ Override protected Options getOptions ( ) { } }
final Options options = super . getOptions ( ) ; final Option urlOption = new Option ( "u" , "the page that is the startpoint of the crawl, examle http://mydomain.com/mypage" ) ; urlOption . setLongOpt ( URL ) ; urlOption . setArgName ( "URL" ) ; urlOption . setRequired ( true ) ; urlOption . setArgs ( 1 ) ; options . ...
public class AbstractSamlObjectBuilder { /** * Gets saml object QName . * @ param objectType the object type * @ return the saml object QName */ public QName getSamlObjectQName ( final Class objectType ) { } }
try { val f = objectType . getField ( DEFAULT_ELEMENT_NAME_FIELD ) ; return ( QName ) f . get ( null ) ; } catch ( final NoSuchFieldException e ) { throw new IllegalStateException ( "Cannot find field " + objectType . getName ( ) + '.' + DEFAULT_ELEMENT_NAME_FIELD , e ) ; } catch ( final IllegalAccessException e ) { th...
public class PojoSerializerSnapshotData { /** * Creates a { @ link PojoSerializerSnapshotData } from serialized data stream . * < p > This factory method is meant to be used in regular read paths , i . e . when reading back a snapshot * of the { @ link PojoSerializer } . POJO fields , registered subclass classes , ...
return PojoSerializerSnapshotData . readSnapshotData ( in , userCodeClassLoader ) ;
public class HelpCommand { /** * Returns the command and description of all supplied commands as a formatted String * @ param botCommands the Commands that should be included in the String * @ return a formatted String containing command and description for all supplied commands */ public static String getHelpText ...
StringBuilder reply = new StringBuilder ( ) ; for ( IBotCommand com : botCommands ) { reply . append ( com . toString ( ) ) . append ( System . lineSeparator ( ) ) . append ( System . lineSeparator ( ) ) ; } return reply . toString ( ) ;
public class DependencyVisitor { public void addNameSpace ( Set < String > names ) { } }
for ( String name : names ) { this . nameSpace . add ( name . replace ( '.' , '/' ) ) ; }
public class ExternalType { /** * { @ inheritDoc } */ @ Override public final void to ( ObjectOutput out , WriteCache cache ) throws IOException { } }
if ( cache == null ) { to ( out ) ; return ; } if ( out == null ) throw new NullPointerException ( ) ; // delegate to the equivalent internal method _to ( out , cache ) ;
public class CrsUtilities { /** * Get the code from a { @ link CoordinateReferenceSystem } . * @ param crs the crs to get the code from . * @ return the code , that can be used with { @ link CRS # decode ( String ) } to recreate the crs . * @ throws Exception */ public static String getCodeFromCrs ( CoordinateRef...
String code = null ; try { Integer epsg = CRS . lookupEpsgCode ( crs , true ) ; code = "EPSG:" + epsg ; // $ NON - NLS - 1 $ } catch ( Exception e ) { // try non epsg code = CRS . lookupIdentifier ( crs , true ) ; } return code ;
public class IntegrationAccountsInner { /** * Updates an integration account . * @ param resourceGroupName The resource group name . * @ param integrationAccountName The integration account name . * @ param integrationAccount The integration account . * @ throws IllegalArgumentException thrown if parameters fai...
return updateWithServiceResponseAsync ( resourceGroupName , integrationAccountName , integrationAccount ) . map ( new Func1 < ServiceResponse < IntegrationAccountInner > , IntegrationAccountInner > ( ) { @ Override public IntegrationAccountInner call ( ServiceResponse < IntegrationAccountInner > response ) { return res...
public class filterprebodyinjection { /** * Use this API to unset the properties of filterprebodyinjection resource . * Properties that need to be unset are specified in args array . */ public static base_response unset ( nitro_service client , filterprebodyinjection resource , String [ ] args ) throws Exception { } ...
filterprebodyinjection unsetresource = new filterprebodyinjection ( ) ; return unsetresource . unset_resource ( client , args ) ;
public class CassandraJavaPairRDD { /** * Forces the rows within a selected Cassandra partition to be returned in ascending order ( if * possible ) . */ @ SuppressWarnings ( "unchecked" ) public CassandraJavaPairRDD < K , V > withAscOrder ( ) { } }
CassandraRDD < Tuple2 < K , V > > newRDD = rdd ( ) . withAscOrder ( ) ; return wrap ( newRDD ) ;
public class Partition { /** * The values of the partition . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setValues ( java . util . Collection ) } or { @ link # withValues ( java . util . Collection ) } if you want to override the * existing values . *...
if ( this . values == null ) { setValues ( new java . util . ArrayList < String > ( values . length ) ) ; } for ( String ele : values ) { this . values . add ( ele ) ; } return this ;
public class Messages { /** * Retrieves a message which takes several arguments . * @ param msg * String the key to look up . * @ param args * Object [ ] the objects to insert in the formatted output . * @ return String the message for that key in the system message bundle . */ static public String getString ...
String format = msg ; if ( bundle != null ) { try { format = bundle . getString ( msg ) ; } catch ( MissingResourceException e ) { } } return format ( format , args ) ;
public class GangliaXmlConfigurationService { /** * UDPAddressingMode to use for reporting * @ return { @ link info . ganglia . gmetric4j . gmetric . UDPAddressingMode . UNICAST } * or * { @ link info . ganglia . gmetric4j . gmetric . UDPAddressingMode . MULTICAST } */ private UDPAddressingMode getAddressingMode ...
String mode = getGangliaConfig ( args . getMode ( ) , ganglia , "mode" , DEFAULT_MODE ) ; if ( mode . toLowerCase ( ) . equals ( "unicast" ) ) { return UDPAddressingMode . UNICAST ; } else { return UDPAddressingMode . MULTICAST ; }
public class hqlParser { /** * hql . g : 232:1 : queryRule : selectFrom ( whereClause ) ? ( groupByClause ) ? ( havingClause ) ? ( orderByClause ) ? ( skipClause ) ? ( takeClause ) ? ; */ public final hqlParser . queryRule_return queryRule ( ) throws RecognitionException { } }
hqlParser . queryRule_return retval = new hqlParser . queryRule_return ( ) ; retval . start = input . LT ( 1 ) ; CommonTree root_0 = null ; ParserRuleReturnScope selectFrom38 = null ; ParserRuleReturnScope whereClause39 = null ; ParserRuleReturnScope groupByClause40 = null ; ParserRuleReturnScope havingClause41 = null ...
public class UnprocessableEntityException { /** * A collection of validation error responses . * @ param validationErrors * A collection of validation error responses . */ @ com . fasterxml . jackson . annotation . JsonProperty ( "validationErrors" ) public void setValidationErrors ( java . util . Collection < Vali...
if ( validationErrors == null ) { this . validationErrors = null ; return ; } this . validationErrors = new java . util . ArrayList < ValidationError > ( validationErrors ) ;
public class AbstractExternalHighlightingFragment2 { /** * Concat the given iterables . * @ param iterables the iterables . * @ return the concat result . */ @ SafeVarargs protected static Set < String > sortedConcat ( Iterable < String > ... iterables ) { } }
final Set < String > set = new TreeSet < > ( ) ; for ( final Iterable < String > iterable : iterables ) { for ( final String obj : iterable ) { set . add ( obj ) ; } } return set ;
public class File { /** * TODO : is this really necessary , or can it be replaced with getAbsolutePath ? */ private String getAbsoluteName ( ) { } }
File f = getAbsoluteFile ( ) ; String name = f . getPath ( ) ; if ( f . isDirectory ( ) && name . charAt ( name . length ( ) - 1 ) != separatorChar ) { // Directories must end with a slash name = name + "/" ; } if ( separatorChar != '/' ) { // Must convert slashes . name = name . replace ( separatorChar , '/' ) ; } ret...
public class UpstreamComitterRecipientProvider { /** * Adds a user to the recipients list based on a specific SCM change set * @ param change The ChangeLogSet . Entry to get the user information from * @ param to The list of to addresses to add to * @ param cc The list of cc addresses to add to * @ param bcc Th...
User user = change . getAuthor ( ) ; RecipientProviderUtilities . addUsers ( Collections . singleton ( user ) , context , env , to , cc , bcc , debug ) ;
public class Transfers { /** * So far , only the route is supported . */ List < Transfer > getTransfersToStop ( String toStopId , String toRouteId ) { } }
final List < Transfer > allInboundTransfers = transfersToStop . getOrDefault ( toStopId , Collections . emptyList ( ) ) ; final Map < String , List < Transfer > > byFromStop = allInboundTransfers . stream ( ) . filter ( t -> t . transfer_type == 0 || t . transfer_type == 2 ) . filter ( t -> t . to_route_id == null || t...
public class ClassUtils { /** * Same as { @ link # javaTypeToClass ( String ) } , but throws a RuntimeException * ( FacesException ) instead of a ClassNotFoundException . * @ return the corresponding Class * @ throws NullPointerException if type is null * @ throws FacesException if class not found */ public sta...
try { return javaTypeToClass ( type ) ; } catch ( ClassNotFoundException e ) { log . log ( Level . SEVERE , "Class " + type + " not found" , e ) ; throw new FacesException ( e ) ; }
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link MatrixType } { @ code > } } */ @ XmlElementDecl ( namespace = "http://www.w3.org/1998/Math/MathML" , name = "matrix" ) public JAXBElement < MatrixType > createMatrix ( MatrixType value ) { } }
return new JAXBElement < MatrixType > ( _Matrix_QNAME , MatrixType . class , null , value ) ;
public class GLTextureView { /** * Install a config chooser which will choose a config * with at least the specified depthSize and stencilSize , * and exactly the specified redSize , greenSize , blueSize and alphaSize . * < p > If this method is * called , it must be called before { @ link # setRenderer ( Rende...
setEGLConfigChooser ( new ComponentSizeChooser ( redSize , greenSize , blueSize , alphaSize , depthSize , stencilSize ) ) ;
public class RefineDualQuadraticAlgebra { /** * Compuets the absolute dual quadratic from the first camera parameters and * plane at infinity * @ param p plane at infinity * @ param Q ( Output ) ABQ */ void recomputeQ ( DMatrixRMaj p , DMatrix4x4 Q ) { } }
Equation eq = new Equation ( ) ; DMatrix3x3 K = new DMatrix3x3 ( ) ; encodeK ( K , 0 , 3 , param . data ) ; eq . alias ( p , "p" , K , "K" ) ; eq . process ( "w=K*K'" ) ; eq . process ( "Q=[w , -w*p;-p'*w , p'*w*p]" ) ; DMatrixRMaj _Q = eq . lookupDDRM ( "Q" ) ; CommonOps_DDRM . divide ( _Q , NormOps_DDRM . normF ( _Q ...
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcTextFontName ( ) { } }
if ( ifcTextFontNameEClass == null ) { ifcTextFontNameEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 877 ) ; } return ifcTextFontNameEClass ;
public class Pubsub { /** * Create a Pub / Sub subscription . * @ param project The Google Cloud project . * @ param subscriptionName The name of the subscription to create . * @ param topic The name of the topic to subscribe to . * @ return A future that is completed when this request is completed . */ public ...
return createSubscription ( canonicalSubscription ( project , subscriptionName ) , canonicalTopic ( project , topic ) ) ;
public class NettyAssociationImpl { /** * ( non - Javadoc ) * @ see org . mobicents . protocols . api . Association # send ( org . mobicents . protocols . api . PayloadData ) */ @ Override public void send ( PayloadData payloadData ) throws Exception { } }
if ( logger . isDebugEnabled ( ) ) { logger . debug ( String . format ( "Tx : Ass=%s %s" , this . getName ( ) , payloadData ) ) ; } NettySctpChannelInboundHandlerAdapter handler = checkSocketIsOpen ( ) ; final ByteBuf byteBuf = payloadData . getByteBuf ( ) ; if ( this . ipChannelType == IpChannelType . SCTP ) { SctpMes...
public class JobCoordinator { /** * Updates the status of the job . When all the tasks are completed , run the join method in the * definition . */ private void updateStatus ( ) { } }
int completed = 0 ; List < TaskInfo > taskInfoList = mJobInfo . getTaskInfoList ( ) ; for ( TaskInfo info : taskInfoList ) { switch ( info . getStatus ( ) ) { case FAILED : mJobInfo . setStatus ( Status . FAILED ) ; if ( mJobInfo . getErrorMessage ( ) . isEmpty ( ) ) { mJobInfo . setErrorMessage ( "Task execution faile...
public class Util { /** * Compute the bitwise ANDNOT between two long arrays and write the set bits in the container . * @ param container where we write * @ param bitmap1 first bitmap * @ param bitmap2 second bitmap */ public static void fillArrayANDNOT ( final short [ ] container , final long [ ] bitmap1 , fina...
int pos = 0 ; if ( bitmap1 . length != bitmap2 . length ) { throw new IllegalArgumentException ( "not supported" ) ; } for ( int k = 0 ; k < bitmap1 . length ; ++ k ) { long bitset = bitmap1 [ k ] & ( ~ bitmap2 [ k ] ) ; while ( bitset != 0 ) { container [ pos ++ ] = ( short ) ( k * 64 + numberOfTrailingZeros ( bitset ...
public class sent_sms { /** * < pre > * Performs generic data validation for the operation to be performed * < / pre > */ protected void validate ( String operationType ) throws Exception { } }
super . validate ( operationType ) ; MPSString id_validator = new MPSString ( ) ; id_validator . setConstraintIsReq ( MPSConstants . DELETE_CONSTRAINT , true ) ; id_validator . setConstraintIsReq ( MPSConstants . MODIFY_CONSTRAINT , true ) ; id_validator . validate ( operationType , id , "\"id\"" ) ; MPSInternetHost se...
public class ClassServiceUtility { /** * Doesn ' t need to be static since this is only created once */ public org . jbundle . util . osgi . ClassFinder getClassFinder ( Object context ) { } }
if ( ! classServiceAvailable ) return null ; try { if ( classFinder == null ) { Class . forName ( "org.osgi.framework.BundleActivator" ) ; // This tests to see if osgi exists // classFinder = ( org . jbundle . util . osgi . ClassFinder ) org . jbundle . util . osgi . finder . ClassFinderActivator . getClassFinder ( con...
public class Job { /** * Check the state of this running job . The state may * remain the same , become SUCCESS or FAILED . */ private void checkRunningState ( ) { } }
RunningJob running = null ; try { running = jc . getJob ( this . mapredJobID ) ; if ( running . isComplete ( ) ) { if ( running . isSuccessful ( ) ) { this . state = Job . SUCCESS ; } else { this . state = Job . FAILED ; this . message = "Job failed!" ; try { running . killJob ( ) ; } catch ( IOException e1 ) { } try {...
public class ListT { /** * / * ( non - Javadoc ) * @ see cyclops2 . monads . transformers . values . ListT # scanRight ( cyclops2 . function . Monoid ) */ @ Override public ListT < W , T > scanRight ( final Monoid < T > monoid ) { } }
return ( ListT < W , T > ) FoldableTransformerSeq . super . scanRight ( monoid ) ;
public class FileDirObjectStore { /** * Capture the ManagedObjects to write and delete as part of the checkpoint . */ synchronized void captureCheckpointManagedObjects ( ) { } }
if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "captureCheckpointManagedObjectsremove" ) ; // Now that we are synchronized check that we have not captured the checkpoint sets already . if ( checkpointManagedObjectsToWrite == null ) { // Take the tokens to write fi...
public class SmsClient { /** * Get the statistics about receiving message * @ param request refer to < code > com . baidubce . services . sms . model . StatReceiverRequest < / code > * @ return refer to < code > com . baidubce . services . sms . model . StatReceiverResponse < / code > * @ see com . baidubce . ser...
checkNotNull ( request , "object request should not be null." ) ; assertStringNotNullOrEmpty ( request . getPhoneNumber ( ) , "object phoneNumber should not be null or empty." ) ; InternalRequest internalRequest = this . createRequest ( "receiver" , request , HttpMethodName . GET , request . getPhoneNumber ( ) ) ; retu...
public class MessageReaction { /** * Removes this Reaction from the Message . * < br > This will remove the reaction of the { @ link net . dv8tion . jda . core . entities . User User } * provided . * < p > If the provided User did not react with this Reaction this does nothing . * < p > Possible ErrorResponses ...
if ( user == null ) throw new IllegalArgumentException ( "Provided User was null!" ) ; if ( ! user . equals ( getJDA ( ) . getSelfUser ( ) ) ) { if ( channel . getType ( ) == ChannelType . TEXT ) { Channel channel = ( Channel ) this . channel ; if ( ! channel . getGuild ( ) . getSelfMember ( ) . hasPermission ( channel...
public class AssemblyDescriptorTypeImpl { /** * Returns all < code > method - permission < / code > elements * @ return list of < code > method - permission < / code > */ public List < MethodPermissionType < AssemblyDescriptorType < T > > > getAllMethodPermission ( ) { } }
List < MethodPermissionType < AssemblyDescriptorType < T > > > list = new ArrayList < MethodPermissionType < AssemblyDescriptorType < T > > > ( ) ; List < Node > nodeList = childNode . get ( "method-permission" ) ; for ( Node node : nodeList ) { MethodPermissionType < AssemblyDescriptorType < T > > type = new MethodPer...
public class Predicates { /** * Negate an existing predicate ' s test result . * @ param predicate An existing predicate . * @ param < T > type of the predicate . * @ return new predicate . * @ since 1.5 */ public static < T > Predicate < T > negate ( final Predicate < ? super T > predicate ) { } }
return new Predicate < T > ( ) { @ Override public boolean test ( final T testValue ) { return ! predicate . test ( testValue ) ; } } ;
public class Searcher { /** * Starts a search , with the given intent ' s query if it is a { @ link Intent # ACTION _ SEARCH search intent } . * @ param intent an Intent that could contain a { @ link SearchManager # QUERY QUERY } . * @ return this { @ link Searcher } for chaining . */ @ NonNull public Searcher sear...
String query = null ; Object origin = null ; if ( intent != null ) { if ( Intent . ACTION_SEARCH . equals ( intent . getAction ( ) ) ) { query = intent . hasExtra ( SearchManager . QUERY ) ? intent . getStringExtra ( SearchManager . QUERY ) : intent . getDataString ( ) ; origin = intent ; } } return search ( query , or...
public class EditDistance { /** * Berghel & Roach ' s extended Ukkonen ' s algorithm . */ private int br ( char [ ] x , char [ ] y ) { } }
if ( x . length > y . length ) { char [ ] swap = x ; x = y ; y = swap ; } final int m = x . length ; final int n = y . length ; int ZERO_K = n ; if ( n + 2 > FKP [ 0 ] . length ) FKP = new int [ 2 * n + 1 ] [ n + 2 ] ; for ( int k = - ZERO_K ; k < 0 ; k ++ ) { int p = - k - 1 ; FKP [ k + ZERO_K ] [ p + 1 ] = Math . abs...
public class IssueAssigner { /** * Author of the latest change on the lines involved by the issue . * If no authors are set on the lines , then the author of the latest change on the file * is returned . */ private Optional < String > guessScmAuthor ( DefaultIssue issue , Component component ) { } }
String author = null ; if ( scmChangesets != null ) { author = IssueLocations . allLinesFor ( issue , component . getUuid ( ) ) . filter ( scmChangesets :: hasChangesetForLine ) . mapToObj ( scmChangesets :: getChangesetForLine ) . filter ( c -> StringUtils . isNotEmpty ( c . getAuthor ( ) ) ) . max ( Comparator . comp...
public class CassandraClientBase { /** * Populate entities from key slices . * @ param m * the m * @ param isWrapReq * the is wrap req * @ param relations * the relations * @ param keys * the keys * @ param dataHandler * the data handler * @ return the list * @ throws Exception * the exception...
List results ; MetamodelImpl metaModel = ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . getMetamodel ( m . getPersistenceUnit ( ) ) ; Set < String > superColumnAttribs = metaModel . getEmbeddables ( m . getEntityClazz ( ) ) . keySet ( ) ; results = new ArrayList ( keys . size ( ) ) ; ThriftDataResultH...
public class GBOXImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case AfplibPackage . GBOX__RES : setRES ( ( Integer ) newValue ) ; return ; case AfplibPackage . GBOX__XPOS0 : setXPOS0 ( ( Integer ) newValue ) ; return ; case AfplibPackage . GBOX__YPOS0 : setYPOS0 ( ( Integer ) newValue ) ; return ; case AfplibPackage . GBOX__XPOS1 : setXPOS1 ( ( Integer ) new...
public class Global { /** * The sync function creates a synchronized function ( in the sense * of a Java synchronized method ) from an existing function . The * new function synchronizes on the the second argument if it is * defined , or otherwise the < code > this < / code > object of * its invocation . * js...
if ( args . length >= 1 && args . length <= 2 && args [ 0 ] instanceof Function ) { Object syncObject = null ; if ( args . length == 2 && args [ 1 ] != Undefined . instance ) { syncObject = args [ 1 ] ; } return new Synchronizer ( ( Function ) args [ 0 ] , syncObject ) ; } else { throw reportRuntimeError ( "msg.sync.ar...
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcReferencesValueDocument ( ) { } }
if ( ifcReferencesValueDocumentEClass == null ) { ifcReferencesValueDocumentEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 430 ) ; } return ifcReferencesValueDocumentEClass ;
public class FairScheduler { /** * reinsert a set of jobs into the sorted jobs for a given type ( MAP / REDUCE ) * the re - insertion happens in place . * we are exploiting the property that the jobs being inserted will most likely end * up at the head of the sorted list and not require a lot comparisons */ priva...
LinkedList < JobInProgress > sortedJobs = ( taskType == TaskType . MAP ) ? sortedJobsByMapNeed : sortedJobsByReduceNeed ; Comparator < JobInProgress > comparator = ( taskType == TaskType . MAP ) ? mapComparator : reduceComparator ; // for each job to be reinserted for ( JobInProgress jobToReinsert : jobsToReinsert ) { ...
public class DialogConverter { /** * Adds property mappings on a replacement node for Granite common attributes . * @ param root the root node * @ param node the replacement node * @ throws JSONException */ private void addCommonAttrMappings ( JSONObject root , JSONObject node ) throws JSONException { } }
for ( String property : GRANITE_COMMON_ATTR_PROPERTIES ) { String [ ] mapping = { "${./" + property + "}" , "${\'./granite:" + property + "\'}" } ; mapProperty ( root , node , "granite:" + property , mapping ) ; } if ( root . has ( NN_GRANITE_DATA ) ) { // the root has granite : data defined , copy it before applying d...
public class CmsJspTagContainer { /** * Prints the closing tag for an element wrapper if in online mode . < p > * @ param isGroupcontainer < code > true < / code > if element is a group - container * @ throws IOException if the output fails */ protected void printElementWrapperTagEnd ( boolean isGroupcontainer ) th...
if ( m_editableRequest ) { String result ; if ( isGroupcontainer ) { result = "</div>" ; } else { result = "<div class=\"" + CmsContainerElement . CLASS_CONTAINER_ELEMENT_END_MARKER + "\" style=\"display:none\"></div>" ; } pageContext . getOut ( ) . print ( result ) ; }
public class CmsWebdavServlet { /** * Copy the contents of the specified input stream to the specified * output stream , and ensure that both streams are closed before returning * ( even in the face of an exception ) . < p > * @ param item the RepositoryItem * @ param is the input stream to copy from * @ para...
IOException exception = null ; InputStream resourceInputStream = null ; if ( ! item . isCollection ( ) ) { resourceInputStream = new ByteArrayInputStream ( item . getContent ( ) ) ; } else { resourceInputStream = is ; } Reader reader = new InputStreamReader ( resourceInputStream ) ; // Copy the input stream to the outp...
public class XPathBuilder { /** * < p > < b > Used for finding element process ( to generate xpath address ) < / b > < / p > * < p > Result Example : < / p > * < pre > * / / * [ @ placeholder = ' Search ' ] * < / pre > * @ param attribute eg . placeholder * @ param value eg . Search * @ param searchTypes ...
if ( attribute != null ) { if ( value == null ) { this . attribute . remove ( attribute ) ; } else { this . attribute . put ( attribute , new SearchText ( value , searchTypes ) ) ; } } return ( T ) this ;
public class ServiceAccount { /** * Returns an instance of ServiceAccount from the environment variables - * GP _ URL , GP _ INSTANCE _ ID , GP _ USER _ ID and GP _ PASSWORD . * If any of these are not defined , this method returns null . * @ return An instance of ServiceAccount initialized by the environment *...
Map < String , String > env = System . getenv ( ) ; String url = env . get ( GP_URL ) ; String instanceId = env . get ( GP_INSTANCE_ID ) ; String userId = env . get ( GP_USER_ID ) ; String password = env . get ( GP_PASSWORD ) ; String apiKey = env . get ( GP_IAM_API_KEY ) ; String iamBearerToken = env . get ( GP_IAM_BE...
public class CFSA { /** * { @ inheritDoc } */ @ Override public byte getArcLabel ( int arc ) { } }
if ( isNextSet ( arc ) && isLabelCompressed ( arc ) ) { return this . labelMapping [ ( arcs [ arc ] >>> 3 ) & 0x1f ] ; } else { return arcs [ arc + 1 ] ; }
public class ContextManager { /** * Returns the next URL after the specified URL . * @ param currentURL Current URL * @ return Next URL */ @ Trivial private String getNextURL ( String currentURL ) { } }
List < String > urlList = getEnvURLList ( ) ; int urlIndex = getURLIndex ( currentURL , urlList ) ; return urlList . get ( ( urlIndex + 1 ) % urlList . size ( ) ) ;
public class Twilio { /** * Set the account sid . * @ param accountSid account sid to use * @ throws AuthenticationException if account sid is null */ public static void setAccountSid ( final String accountSid ) { } }
if ( accountSid == null ) { throw new AuthenticationException ( "AccountSid can not be null" ) ; } if ( ! accountSid . equals ( Twilio . accountSid ) ) { Twilio . invalidate ( ) ; } Twilio . accountSid = accountSid ;
public class ClientExtension { /** * Set the set of scopes that this client application can request when * < i > " Requestable Scopes per Client " < / i > is enabled ( = when { @ link * # isRequestableScopesEnabled ( ) } returns { @ code true } ) . * See the description of { @ link # isRequestableScopesEnabled ( ...
if ( scopes == null ) { this . requestableScopes = null ; return this ; } int size = scopes . size ( ) ; this . requestableScopes = new String [ size ] ; if ( size != 0 ) { scopes . toArray ( this . requestableScopes ) ; } return this ;
public class CDKAtomTypeMatcher { /** * Determines whether the bonds ( up to two spheres away ) are only to non * hetroatoms . Currently used in N . planar3 perception of ( e . g . pyrrole ) . * @ param atom an atom to test * @ param container container of the atom * @ return whether the atom ' s only bonds are...
List < IAtom > connected = container . getConnectedAtomsList ( atom ) ; for ( IAtom atom1 : connected ) { boolean aromatic = container . getBond ( atom , atom1 ) . isAromatic ( ) ; // ignoring non - aromatic bonds if ( ! aromatic ) continue ; // found a hetroatom - we ' re not a single hetroatom if ( ! "C" . equals ( a...
public class ImplementationFactory { /** * Creates an implementation of the interface . * @ param implPackageName * Name of the implementation package - Cannot be null . * @ param implClassName * Name of the implementation class - Cannot be null . * @ param superClass * Parent class or < code > null < / cod...
assureNotNull ( "implPackageName" , implPackageName ) ; assureNotNull ( "implClassName" , implClassName ) ; assureNotNull ( "listener" , listener ) ; assureNotNull ( "intf" , intf ) ; assureNotEmpty ( "intf" , intf ) ; assureAllInterfaces ( intf ) ; // Create class with all interfaces final SgClass clasz = new SgClass ...
public class MixinParentNode { /** * Adds the given child . * @ param child The child to add . */ public void addChild ( N child ) { } }
checkNotNull ( child ) ; tryRemoveFromOldParent ( child ) ; children . add ( child ) ; child . setParent ( master ) ;
public class JspCompilationContext { /** * = = = = = Manipulating the class = = = = = */ public Class < ? > load ( ) throws JasperException { } }
try { getJspLoader ( ) ; String name = getFQCN ( ) ; servletClass = jspLoader . loadClass ( name ) ; } catch ( ClassNotFoundException cex ) { throw new JasperException ( Localizer . getMessage ( "jsp.error.unable.load" ) , cex ) ; } catch ( Exception ex ) { throw new JasperException ( Localizer . getMessage ( "jsp.erro...
public class CollectionUtils { /** * 建立树形结构 * @ param list * @ param keyMapper * @ param parentKeyMapper * @ param childMapper * @ return */ public static < T , K > ArrayList < T > buildTree ( Collection < T > list , Function < T , K > keyMapper , Function < T , K > parentKeyMapper , Function < T , Collection...
HashMap < K , T > map = toHashMap ( list , keyMapper ) ; ArrayList < T > root = new ArrayList < T > ( ) ; for ( T t : list ) { K key = keyMapper . apply ( t ) ; K parentKey = parentKeyMapper . apply ( t ) ; if ( parentKey == null || key . equals ( parentKey ) ) root . add ( t ) ; else childMapper . apply ( map . get ( ...
public class StandardBullhornData { /** * { @ inheritDoc } */ @ Override public FileWrapper addFile ( Class < ? extends FileEntity > type , Integer entityId , FileMeta fileMeta ) { } }
Map < String , String > uriVariables = restUriVariablesFactory . getUriVariablesForAddFile ( BullhornEntityInfo . getTypesRestEntityName ( type ) , entityId , fileMeta ) ; String url = restUrlFactory . assemblePutFileUrl ( ) ; String jsonString = restJsonConverter . convertEntityToJsonString ( ( BullhornEntity ) fileMe...
public class ModelsImpl { /** * Get All Entity Roles for a given entity . * @ param appId The application ID . * @ param versionId The version ID . * @ param entityId entity Id * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the List & lt ; EntityRole ...
return getCustomPrebuiltEntityRolesWithServiceResponseAsync ( appId , versionId , entityId ) . map ( new Func1 < ServiceResponse < List < EntityRole > > , List < EntityRole > > ( ) { @ Override public List < EntityRole > call ( ServiceResponse < List < EntityRole > > response ) { return response . body ( ) ; } } ) ;
public class Jenkins { /** * Checks if a top - level view with the given name exists and * make sure that the name is good as a view name . */ public FormValidation doCheckViewName ( @ QueryParameter String value ) { } }
checkPermission ( View . CREATE ) ; String name = fixEmpty ( value ) ; if ( name == null ) return FormValidation . ok ( ) ; // already exists ? if ( getView ( name ) != null ) return FormValidation . error ( Messages . Hudson_ViewAlreadyExists ( name ) ) ; // good view name ? try { checkGoodName ( name ) ; } catch ( Fa...
public class AbstractTracer { /** * Prints the method signature on the { @ link de . christofreichardt . diagnosis . io . IndentablePrintStream } . * @ param methodSignature the method signature to be printed */ private void printMethodEntry ( String methodSignature ) { } }
synchronized ( this . syncObject ) { out ( ) . printIndentln ( "ENTRY--" + methodSignature + "--" + Thread . currentThread ( ) . getName ( ) + "[" + Thread . currentThread ( ) . getId ( ) + "]" ) ; }
public class CmsFloatDecoratedPanel { /** * Sets the left margin of the main panel to the width of the float panel . < p > */ public void updateLayout ( ) { } }
// TODO : we should not do this kind of things . . . if ( ! isAttached ( ) ) { return ; } int floatBoxWidth = getFloatBoxWidth ( ) ; m_primary . getElement ( ) . getStyle ( ) . setMarginLeft ( floatBoxWidth , Unit . PX ) ; updateVerticalMargin ( ) ;
public class AppServiceEnvironmentsInner { /** * Get metric definitions for a worker pool of an App Service Environment . * Get metric definitions for a worker pool of an App Service Environment . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param name Name of the App...
return listWebWorkerMetricDefinitionsWithServiceResponseAsync ( resourceGroupName , name , workerPoolName ) . map ( new Func1 < ServiceResponse < Page < ResourceMetricDefinitionInner > > , Page < ResourceMetricDefinitionInner > > ( ) { @ Override public Page < ResourceMetricDefinitionInner > call ( ServiceResponse < Pa...
public class ArtifactCoordinates { /** * Create a relative repository path for the given artifact coordinates . * @ param separator the separator character to use ( typically { @ code ' / ' } or { @ link File # separatorChar } ) * @ return the path string */ public String relativeArtifactPath ( char separator ) { }...
String artifactId1 = getArtifactId ( ) ; String version1 = getVersion ( ) ; StringBuilder builder = new StringBuilder ( getGroupId ( ) . replace ( '.' , separator ) ) ; builder . append ( separator ) . append ( artifactId1 ) . append ( separator ) ; String pathVersion ; final Matcher versionMatcher = snapshotPattern . ...
public class DBCleaningScriptsFactory { /** * Prepare SQL scripts for cleaning workspace data from database . * @ param wsEntry * workspace configuration * @ param dialect * database dialect which is used , since { @ link JDBCWorkspaceDataContainer # DB _ DIALECT } parameter * can contain { @ link DialectCons...
if ( dialect . startsWith ( DialectConstants . DB_DIALECT_MYSQL ) ) { return new MySQLCleaningScipts ( dialect , wsEntry ) ; } else if ( dialect . startsWith ( DialectConstants . DB_DIALECT_DB2 ) ) { return new DB2CleaningScipts ( dialect , wsEntry ) ; } else if ( dialect . startsWith ( DialectConstants . DB_DIALECT_MS...
public class BaseExpression { /** * Normalize an expression string , replace " nice names " with their coded values and spaces with " _ " . * @ param expression an expression * @ return a parsed expression */ public static String normalize ( Object expression ) { } }
if ( expression == null ) { return null ; } // If it ' s a number it ' s not an expression if ( expression instanceof Number ) { return String . valueOf ( expression ) ; } String replacement ; String conditionStr = StringUtils . mergeToSingleUnderscore ( String . valueOf ( expression ) ) ; Matcher matcher = PATTERN . m...
public class StateSaver { /** * Save the given { @ code target } in the passed in { @ link Bundle } . * @ param target The object containing fields annotated with { @ link State } . * @ param state The object is saved into this bundle . */ public static < T > void saveInstanceState ( @ NonNull T target , @ NonNull ...
IMPL . saveInstanceState ( target , state ) ;
public class AbstractAdminObject { /** * The method gets all events for the given event type and executes them in * the given order . If no events are defined , nothing is done . * @ param _ eventtype type of event to execute * @ param _ param Parameter to be passed to the esjp * @ return List with Returns * ...
final List < Return > ret = new ArrayList < > ( ) ; if ( hasEvents ( _eventtype ) ) { if ( this instanceof AbstractUserInterfaceObject ) { // add ui object to parameter _param . put ( ParameterValues . UIOBJECT , this ) ; } // execute all triggers for ( final EventDefinition evenDef : this . events . get ( _eventtype )...
public class ConcurrentHashSet { /** * ( non - Javadoc ) * @ see java . util . Collection # remove ( java . lang . Object ) */ public final boolean remove ( Object key ) { } }
java . util . Set subSet = getSubSet ( key ) ; synchronized ( subSet ) { return subSet . remove ( key ) ; } // synchronized ( subSet ) .
public class ApiOvhSms { /** * Get this object properties * REST : GET / sms / { serviceName } / virtualNumbers / { number } * @ param serviceName [ required ] The internal name of your SMS offer * @ param number [ required ] The virtual number */ public OvhVirtualNumber serviceName_virtualNumbers_number_GET ( St...
String qPath = "/sms/{serviceName}/virtualNumbers/{number}" ; StringBuilder sb = path ( qPath , serviceName , number ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhVirtualNumber . class ) ;
public class CacheControlBuilder { /** * Set the maximum age relative to the request time * @ param eTimeUnit * { @ link TimeUnit } to use * @ param nDuration * The duration in the passed unit * @ return this */ @ Nonnull public CacheControlBuilder setMaxAge ( @ Nonnull final TimeUnit eTimeUnit , final long n...
return setMaxAgeSeconds ( eTimeUnit . toSeconds ( nDuration ) ) ;
public class PageFlowInitialization { /** * This method will initialize all of the PrefixHandlers registered in the netui config . * The prefix handlers are registered with ProcessPopulate and are typically implemented as * public inner classes in the tags that require prefix handlers . */ private static void initP...
PrefixHandlerConfig [ ] prefixHandlers = ConfigUtil . getConfig ( ) . getPrefixHandlers ( ) ; if ( prefixHandlers == null ) { return ; } for ( int i = 0 ; i < prefixHandlers . length ; i ++ ) { try { Class prefixClass = Class . forName ( prefixHandlers [ i ] . getHandlerClass ( ) ) ; String name = prefixHandlers [ i ] ...
public class CustomerArtifactPaths { /** * Comma - separated list of paths on the iOS device where the artifacts generated by the customer ' s tests will be * pulled from . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setIosPaths ( java . util . Collecti...
if ( this . iosPaths == null ) { setIosPaths ( new java . util . ArrayList < String > ( iosPaths . length ) ) ; } for ( String ele : iosPaths ) { this . iosPaths . add ( ele ) ; } return this ;
public class DnsResponseCode { /** * Returns the { @ link DnsResponseCode } that corresponds with the given { @ code responseCode } . * @ param responseCode the DNS RCODE * @ return the corresponding { @ link DnsResponseCode } */ public static DnsResponseCode valueOf ( int responseCode ) { } }
switch ( responseCode ) { case 0 : return NOERROR ; case 1 : return FORMERR ; case 2 : return SERVFAIL ; case 3 : return NXDOMAIN ; case 4 : return NOTIMP ; case 5 : return REFUSED ; case 6 : return YXDOMAIN ; case 7 : return YXRRSET ; case 8 : return NXRRSET ; case 9 : return NOTAUTH ; case 10 : return NOTZONE ; case ...
public class TaskManagerServices { /** * Validates that all the directories denoted by the strings do actually exist or can be created , are proper * directories ( not files ) , and are writable . * @ param tmpDirs The array of directory paths to check . * @ throws IOException Thrown if any of the directories doe...
for ( String dir : tmpDirs ) { if ( dir != null && ! dir . equals ( "" ) ) { File file = new File ( dir ) ; if ( ! file . exists ( ) ) { if ( ! file . mkdirs ( ) ) { throw new IOException ( "Temporary file directory " + file . getAbsolutePath ( ) + " does not exist and could not be created." ) ; } } if ( ! file . isDir...
public class DefaultFormatter { /** * Format a logging message * @ param logRecord * @ return */ @ Override public String format ( LogRecord logRecord ) { } }
StringBuilder resultBuilder = new StringBuilder ( ) ; String prefix = logRecord . getLevel ( ) . getName ( ) + "\t" ; resultBuilder . append ( prefix ) ; resultBuilder . append ( Thread . currentThread ( ) . getName ( ) ) . append ( " " ) . append ( sdf . format ( new java . util . Date ( logRecord . getMillis ( ) ) ) ...
public class AmazonS3URI { /** * Decodes the percent - encoded character at the given index in the string * and appends the decoded value to the given { @ code StringBuilder } . * @ param builder the string builder to append to * @ param str the string being decoded * @ param index the index of the ' % ' charac...
if ( index > str . length ( ) - 3 ) { throw new IllegalStateException ( "Invalid percent-encoded string:" + "\"" + str + "\"." ) ; } char first = str . charAt ( index + 1 ) ; char second = str . charAt ( index + 2 ) ; char decoded = ( char ) ( ( fromHex ( first ) << 4 ) | fromHex ( second ) ) ; builder . append ( decod...