signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class LayoutRefiner { /** * Attempt to reduce congestion through rotation of flippable bonds between * congest pairs . * @ param pairs congested pairs of atoms */ void rotate ( Collection < AtomPair > pairs ) { } }
// bond has already been tried in this phase so // don ' t need to test again Set < IBond > tried = new HashSet < > ( ) ; Pair : for ( AtomPair pair : pairs ) { for ( IBond bond : pair . bndAt ) { // only try each bond once per phase and skip if ( ! tried . add ( bond ) ) continue ; if ( bfix . contains ( bond ) ) continue ; // those we have found to probably be symmetric if ( probablySymmetric . contains ( bond ) ) continue ; // can ' t rotate these if ( bond . getOrder ( ) != IBond . Order . SINGLE || bond . isInRing ( ) ) continue ; final IAtom beg = bond . getBegin ( ) ; final IAtom end = bond . getEnd ( ) ; final int begIdx = idxs . get ( beg ) ; final int endIdx = idxs . get ( end ) ; // terminal if ( adjList [ begIdx ] . length == 1 || adjList [ endIdx ] . length == 1 ) continue ; int begPriority = beg . getProperty ( AtomPlacer . PRIORITY ) ; int endPriority = end . getProperty ( AtomPlacer . PRIORITY ) ; Arrays . fill ( visited , false ) ; if ( begPriority < endPriority ) { stackBackup . len = visitAdj ( visited , stackBackup . xs , begIdx , endIdx ) ; // avoid moving fixed atoms if ( ! afix . isEmpty ( ) ) { final int begCnt = numFixedMoved ( stackBackup . xs , stackBackup . len ) ; if ( begCnt > 0 ) { Arrays . fill ( visited , false ) ; stackBackup . len = visitAdj ( visited , stackBackup . xs , endIdx , begIdx ) ; final int endCnt = numFixedMoved ( stackBackup . xs , stackBackup . len ) ; if ( endCnt > 0 ) continue ; } } } else { stackBackup . len = visitAdj ( visited , stackBackup . xs , endIdx , begIdx ) ; // avoid moving fixed atoms if ( ! afix . isEmpty ( ) ) { final int endCnt = numFixedMoved ( stackBackup . xs , stackBackup . len ) ; if ( endCnt > 0 ) { Arrays . fill ( visited , false ) ; stackBackup . len = visitAdj ( visited , stackBackup . xs , begIdx , endIdx ) ; final int begCnt = numFixedMoved ( stackBackup . xs , stackBackup . len ) ; if ( begCnt > 0 ) continue ; } } } double min = congestion . score ( ) ; backupCoords ( backup , stackBackup ) ; reflect ( stackBackup , beg , end ) ; congestion . update ( visited , stackBackup . xs , stackBackup . len ) ; double delta = min - congestion . score ( ) ; // keep if decent improvement or improvement and resolves this overlap if ( delta > ROTATE_DELTA_THRESHOLD || ( delta > 1 && congestion . contribution ( pair . fst , pair . snd ) < MIN_SCORE ) ) { continue Pair ; } else { // almost no difference from flipping . . . bond is probably symmetric // mark to avoid in future iterations if ( Math . abs ( delta ) < 0.1 ) probablySymmetric . add ( bond ) ; // restore restoreCoords ( stackBackup , backup ) ; congestion . update ( visited , stackBackup . xs , stackBackup . len ) ; congestion . score = min ; } } }
public class ExpressionToTypeInfo { /** * Entry method : get expression info * @ param code the expression as a string * @ param state a JShell instance * @ return type information */ public static ExpressionInfo expressionInfo ( String code , JShell state ) { } }
if ( code == null || code . isEmpty ( ) ) { return null ; } try { OuterWrap codeWrap = state . outerMap . wrapInTrialClass ( Wrap . methodReturnWrap ( code ) ) ; AnalyzeTask at = state . taskFactory . new AnalyzeTask ( codeWrap ) ; CompilationUnitTree cu = at . firstCuTree ( ) ; if ( at . hasErrors ( ) || cu == null ) { return null ; } return new ExpressionToTypeInfo ( at , cu , state ) . typeOfExpression ( ) ; } catch ( Exception ex ) { return null ; }
public class UserLoginPasswordOperation { /** * Gets authentication data storage * @ return */ public synchronized AuthStorage getStorage ( ) { } }
if ( storage == null ) { String cls = Objects . get ( config , "storageClass" , LogStorage . class . getName ( ) ) ; try { storage = ( AuthStorage ) Class . forName ( cls ) . newInstance ( ) ; } catch ( Exception e ) { throw S1SystemError . wrap ( e ) ; } } return storage ;
public class CommitRequestHandler { /** * This method attempts to collect all transactions in the epoch that are marked for commit and decides if they can be * committed in active epoch or if it needs to roll the transactions . * @ param event event to process * @ return Completable future which indicates completion of processing of commit event . */ @ Override public CompletableFuture < Void > execute ( CommitEvent event ) { } }
String scope = event . getScope ( ) ; String stream = event . getStream ( ) ; OperationContext context = streamMetadataStore . createContext ( scope , stream ) ; log . debug ( "Attempting to commit available transactions on stream {}/{}" , event . getScope ( ) , event . getStream ( ) ) ; CompletableFuture < Void > future = new CompletableFuture < > ( ) ; // Note : we will ignore the epoch in the event . It has been deprecated . // The logic now finds the smallest epoch with transactions and commits them . tryCommitTransactions ( scope , stream , context ) . whenComplete ( ( r , e ) -> { if ( e != null ) { Throwable cause = Exceptions . unwrap ( e ) ; // for operation not allowed , we will report the event if ( cause instanceof StoreException . OperationNotAllowedException ) { log . debug ( "Cannot commit transaction on stream {}/{}. Postponing" , scope , stream ) ; } else { log . error ( "Exception while attempting to commit transaction on stream {}/{}" , scope , stream , e ) ; } future . completeExceptionally ( cause ) ; } else { if ( r >= 0 ) { log . debug ( "Successfully committed transactions on epoch {} on stream {}/{}" , r , scope , stream ) ; } else { log . debug ( "No transactions found in committing state on stream {}/{}" , r , scope , stream ) ; } if ( processedEvents != null ) { try { processedEvents . offer ( event ) ; } catch ( Exception ex ) { // ignore , this processed events is only added for enabling unit testing this class } } future . complete ( null ) ; } } ) ; return future ;
public class AttributeConfiguration { /** * Set the attribute type with Tango type . * @ param tangoType * @ throws DevFailed * @ see TangoConst for possible values */ public void setTangoType ( final int tangoType , final AttrDataFormat format ) throws DevFailed { } }
setFormat ( format ) ; this . tangoType = tangoType ; enumType = AttributeTangoType . getTypeFromTango ( tangoType ) ; if ( format . equals ( AttrDataFormat . SCALAR ) ) { type = enumType . getType ( ) ; } else if ( format . equals ( AttrDataFormat . SPECTRUM ) ) { type = Array . newInstance ( enumType . getType ( ) , 0 ) . getClass ( ) ; } else { type = Array . newInstance ( enumType . getType ( ) , 0 , 0 ) . getClass ( ) ; }
public class Task { /** * Internal method used to locate an remove an item from a list Relations . * @ param relationList list of Relation instances * @ param targetTask target relationship task * @ param type target relationship type * @ param lag target relationship lag * @ return true if a relationship was removed */ private boolean removeRelation ( List < Relation > relationList , Task targetTask , RelationType type , Duration lag ) { } }
boolean matchFound = false ; for ( Relation relation : relationList ) { if ( relation . getTargetTask ( ) == targetTask ) { if ( relation . getType ( ) == type && relation . getLag ( ) . compareTo ( lag ) == 0 ) { matchFound = relationList . remove ( relation ) ; break ; } } } return matchFound ;
public class DateParser { /** * Truncate the input string after the first occurrence of the * searchString . * @ param input the source string * @ param searchString the string to look for in the source * @ return the truncated string */ private String truncateAt ( final String input , final String searchString ) { } }
final int i = input . indexOf ( searchString ) ; if ( i != - 1 ) { return input . substring ( 0 , i ) ; } return input ;
public class SeaGlassTitlePane { /** * Add a property change listener to the root pane . * @ param listener the propertiy change listener to add . */ private void addParentPropertyChangeListener ( PropertyChangeListener listener ) { } }
if ( rootParent instanceof JFrame ) { ( ( JFrame ) rootParent ) . addPropertyChangeListener ( listener ) ; } else if ( rootParent instanceof JDialog ) { ( ( JDialog ) rootParent ) . addPropertyChangeListener ( listener ) ; } rootPane . addPropertyChangeListener ( listener ) ;
public class ConvertImage { /** * Converts a { @ link Planar } into the equivalent { @ link InterleavedU8} * @ param input ( Input ) Planar image that is being converted . Not modified . * @ param output ( Optional ) The output image . If null a new image is created . Modified . * @ return Converted image . */ public static InterleavedU8 convertF32U8 ( Planar < GrayF32 > input , InterleavedU8 output ) { } }
if ( output == null ) { output = new InterleavedU8 ( input . width , input . height , input . getNumBands ( ) ) ; } else { output . reshape ( input . width , input . height , input . getNumBands ( ) ) ; } if ( BoofConcurrency . USE_CONCURRENT ) { ImplConvertImage_MT . convertF32U8 ( input , output ) ; } else { ImplConvertImage . convertF32U8 ( input , output ) ; } return output ;
public class ArchiveFormatProcessor { /** * { @ inheritDoc } * @ see org . jboss . shrinkwrap . resolver . spi . format . FormatProcessor # process ( ResolvedArtifact , Class ) */ @ Override public ARCHIVETYPE process ( final MavenResolvedArtifact artifact , final Class < ARCHIVETYPE > returnType ) throws IllegalArgumentException { } }
if ( artifact == null ) { throw new IllegalArgumentException ( "Resolution artifact must be specified" ) ; } File file = artifact . asFile ( ) ; if ( file == null ) { throw new IllegalArgumentException ( "Artifact was not resolved" ) ; } return ShrinkWrap . create ( ZipImporter . class , file . getName ( ) ) . importFrom ( file ) . as ( returnType ) ;
public class CouchDbClient { /** * Get replication document state for a given replication document ID . * @ param docId The replication document ID * @ return Replication document for { @ code docId } */ public SchedulerDocsResponse . Doc schedulerDoc ( String docId ) { } }
assertNotEmpty ( docId , "docId" ) ; return this . get ( new DatabaseURIHelper ( getBaseUri ( ) ) . path ( "_scheduler" ) . path ( "docs" ) . path ( "_replicator" ) . path ( docId ) . build ( ) , SchedulerDocsResponse . Doc . class ) ;
public class CommercePaymentMethodGroupRelPersistenceImpl { /** * Returns the first commerce payment method group rel in the ordered set where groupId = & # 63 ; and active = & # 63 ; . * @ param groupId the group ID * @ param active the active * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the first matching commerce payment method group rel * @ throws NoSuchPaymentMethodGroupRelException if a matching commerce payment method group rel could not be found */ @ Override public CommercePaymentMethodGroupRel findByG_A_First ( long groupId , boolean active , OrderByComparator < CommercePaymentMethodGroupRel > orderByComparator ) throws NoSuchPaymentMethodGroupRelException { } }
CommercePaymentMethodGroupRel commercePaymentMethodGroupRel = fetchByG_A_First ( groupId , active , orderByComparator ) ; if ( commercePaymentMethodGroupRel != null ) { return commercePaymentMethodGroupRel ; } StringBundler msg = new StringBundler ( 6 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "groupId=" ) ; msg . append ( groupId ) ; msg . append ( ", active=" ) ; msg . append ( active ) ; msg . append ( "}" ) ; throw new NoSuchPaymentMethodGroupRelException ( msg . toString ( ) ) ;
public class MtasDataLongBasic { /** * ( non - Javadoc ) * @ see * mtas . codec . util . DataCollector . MtasDataCollector # add ( java . lang . String [ ] , * double , long ) */ @ Override public MtasDataCollector < ? , ? > add ( String key , double valueSum , long valueN ) throws IOException { } }
if ( key != null ) { MtasDataCollector < ? , ? > subCollector = add ( key , false ) ; setValue ( newCurrentPosition , Double . valueOf ( valueSum ) . longValue ( ) , valueN , newCurrentExisting ) ; return subCollector ; } else { return null ; }
public class TreeNode { /** * A helper function for the { @ link IntervalTree # remove ( Interval ) } method . * It searches recursively for the base node of a target interval and * removes the interval from the base node , if it is stored there . This is * a more efficient way to remove an interval from the tree , since it * doesn ' t iterate through all intervals , but performs a binary search in * O ( logn ) . * @ param tree The { @ link IntervalTree } containing the subtree . Used primarily for * housekeeping , such as adjusting the size of the tree , if needed . * @ param root The root of the currently traversed subtree . May be { @ code null } . * @ param interval The target interval to be removed . * @ param < T > The type of the start and end points of the intervals , as well as * the query point . * @ return The new root of the subtree , rooted at the current node , after the * interval has been removed . This could be { @ code null } if the interval * was the last one stored at the subtree . */ public static < T extends Comparable < ? super T > > TreeNode < T > removeInterval ( IntervalTree < T > tree , TreeNode < T > root , Interval < T > interval ) { } }
if ( root == null ) return null ; if ( interval . contains ( root . midpoint ) ) { if ( root . decreasing . remove ( interval ) ) tree . size -- ; root . increasing . remove ( interval ) ; if ( root . increasing . size ( ) == 0 ) { return deleteNode ( root ) ; } } else if ( interval . isLeftOf ( root . midpoint ) ) { root . left = removeInterval ( tree , root . left , interval ) ; } else { root . right = removeInterval ( tree , root . right , interval ) ; } return root . balanceOut ( ) ;
public class Model { /** * Sets the minimum and maximum values and the number of minor and major tickmarks of the gauge dial * @ param MIN _ VALUE * @ param MAX _ VALUE * @ param NO _ OF _ MINOR _ TICKS * @ param NO _ OF _ MAJOR _ TICKS */ public void setMinMaxAndNoOfTicks ( final double MIN_VALUE , final double MAX_VALUE , final int NO_OF_MINOR_TICKS , final int NO_OF_MAJOR_TICKS ) { } }
this . maxNoOfMinorTicks = NO_OF_MINOR_TICKS ; this . maxNoOfMajorTicks = NO_OF_MAJOR_TICKS ; this . minValue = MIN_VALUE ; this . maxValue = MAX_VALUE ; calculate ( ) ;
public class Utility { /** * Replace every occurrence of this string with the new data . * @ param sb The original string . * @ param strOldParam The string to find . * @ param strNewData The data to replace the string with . * @ return The new string . */ public static StringBuilder replace ( StringBuilder sb , String strOldParam , String strNewData ) { } }
int iIndex = 0 ; if ( strNewData == null ) strNewData = Constants . BLANK ; while ( ( iIndex = sb . indexOf ( strOldParam , iIndex ) ) != - 1 ) { sb . replace ( iIndex , iIndex + strOldParam . length ( ) , strNewData ) ; iIndex = iIndex + strNewData . length ( ) ; } return sb ;
public class ExampleMain { /** * The Retinas API usage . * @ throws ApiException */ private void retinasApiUsage ( ) throws ApiException { } }
LOG . info ( "The Retinas API usage." ) ; Retinas api = getInfo ( "api.cortical.io" , API_KEY ) ; LOG . info ( "Retinas API: getRetinas" ) ; List < Retina > retinas = api . getAllRetinas ( ) ; for ( Retina retina : retinas ) { LOG . info ( "Retina: Name: " + retina . getRetinaName ( ) + " Description: " + retina . getRetinaDescription ( ) + " Terms in the retina: " + retina . getNumberOfTermsInRetina ( ) ) ; } Retina retina = api . retinaByName ( RETINA_NAME ) ; LOG . info ( "Retina: Name: " + retina . getRetinaName ( ) + " Description: " + retina . getRetinaDescription ( ) + " Terms in the retina: " + retina . getNumberOfTermsInRetina ( ) ) ;
public class Emitter { /** * syck _ emit _ indent */ public void emitIndent ( ) { } }
Level lvl = currentLevel ( ) ; if ( bufpos == 0 && marker == 0 ) { return ; } if ( lvl . spaces >= 0 ) { byte [ ] spcs = new byte [ lvl . spaces + 2 ] ; spcs [ 0 ] = '\n' ; spcs [ lvl . spaces + 1 ] = 0 ; for ( int i = 0 ; i < lvl . spaces ; i ++ ) { spcs [ i + 1 ] = ' ' ; } write ( Pointer . create ( spcs , 0 ) , lvl . spaces + 1 ) ; }
public class AbstractJobLauncher { /** * Unlock a completed or failed job . */ private void unlockJob ( ) { } }
if ( this . jobLockOptional . isPresent ( ) ) { try { // Unlock so the next run of the same job can proceed this . jobLockOptional . get ( ) . unlock ( ) ; } catch ( JobLockException ioe ) { LOG . error ( String . format ( "Failed to unlock for job %s: %s" , this . jobContext . getJobId ( ) , ioe ) , ioe ) ; } finally { try { this . jobLockOptional . get ( ) . close ( ) ; } catch ( IOException e ) { LOG . error ( String . format ( "Failed to close job lock for job %s: %s" , this . jobContext . getJobId ( ) , e ) , e ) ; } finally { this . jobLockOptional = Optional . absent ( ) ; } } }
public class GridTable { /** * Reposition to this record Using this bookmark . * @ param Object bookmark Bookmark . * @ param int iHandleType Type of handle ( see getHandle ) . * @ exception FILE _ NOT _ OPEN . * @ return record if found / null - record not found . */ public FieldList setHandle ( Object bookmark , int iHandleType ) throws DBException { } }
m_objectID = null ; // No current record m_dataSource = null ; FieldList fieldList = this . getNextTable ( ) . setHandle ( bookmark , iHandleType ) ; if ( fieldList != null ) m_iRecordStatus = DBConstants . RECORD_NORMAL ; else m_iRecordStatus = DBConstants . RECORD_INVALID | DBConstants . RECORD_AT_BOF | DBConstants . RECORD_AT_EOF ; return fieldList ;
public class EkstaziAgent { /** * Instrument Surefire classes if they are loaded . This may be * needed if class has been loaded before a surefire is started * ( e . g . , used by another module that does not use Ekstazi ) . * This code should be in another class / place . */ private static void instrumentMaven ( Instrumentation instrumentation ) { } }
try { for ( Class < ? > clz : instrumentation . getAllLoadedClasses ( ) ) { String name = clz . getName ( ) ; if ( name . equals ( Names . ABSTRACT_SUREFIRE_MOJO_CLASS_VM ) || name . equals ( Names . SUREFIRE_PLUGIN_VM ) || name . equals ( Names . FAILSAFE_PLUGIN_VM ) || name . equals ( Names . TESTMOJO_VM ) ) { instrumentation . retransformClasses ( clz ) ; } } } catch ( UnmodifiableClassException ex ) { // Consider something better than doing nothing . }
public class Optional { /** * Invokes action function if value is absent . * @ param action action that invokes if value absent * @ return this { @ code Optional } * @ since 1.1.2 */ @ NotNull public Optional < T > executeIfAbsent ( @ NotNull Runnable action ) { } }
if ( value == null ) action . run ( ) ; return this ;
public class NodeTraverser { /** * depthFirst traversal with a enter / leave phase . * @ param nodeVisitor the visitor of the nodes * @ param root the root node * @ return the accumulation result of this traversal */ public Object depthFirst ( NodeVisitor nodeVisitor , Node root ) { } }
return depthFirst ( nodeVisitor , Collections . singleton ( root ) ) ;
public class Property { /** * set the value type A string ; a property type name ; data type . * @ param type value to set */ public void setType ( String type ) { } }
property . setType ( type ) ; setDynamicAttribute ( null , KeyConstants . _type , type ) ;
public class TopicAccessManager { /** * Check if specific access control is allowed from controller * @ param ctx * @ param topic * @ param controllers * @ return true if at least one specific topicAccessControl exist * @ throws IllegalAccessException */ boolean checkAccessTopicFromController ( UserContext ctx , String topic , JsTopicAccessController jsTopicAccessController ) throws IllegalAccessException { } }
logger . debug ( "Looking for accessController for topic '{}' from JsTopicAccessController {}" , topic , jsTopicAccessController ) ; JsTopicControls jsTopicControls = jsTopicControlsTools . getJsTopicControlsFromProxyClass ( jsTopicAccessController . getClass ( ) ) ; logger . debug ( "Looking for accessController for topic '{}' from jsTopicControls {}" , topic , jsTopicControls ) ; if ( null != jsTopicControls ) { logger . debug ( "Looking for accessController for topic '{}' from jsTopicControls {}, {}" , topic , jsTopicControls , jsTopicControls . value ( ) ) ; for ( JsTopicControl jsTopicControl : jsTopicControls . value ( ) ) { if ( topic . equals ( jsTopicControl . value ( ) ) ) { logger . debug ( "Found accessController for topic '{}' from JsTopicControls annotation" , topic ) ; checkAccessTopicFromControllers ( ctx , topic , Arrays . asList ( jsTopicAccessController ) ) ; return true ; } } } return false ;
public class Logger { /** * Issue a formatted log message with a level of FATAL . * @ param t the throwable * @ param format the format string , as per { @ link String # format ( String , Object . . . ) } * @ param params the parameters */ public void fatalf ( Throwable t , String format , Object ... params ) { } }
doLogf ( Level . FATAL , FQCN , format , params , t ) ;
public class HttpPostMultipartRequestDecoder { /** * Skip control Characters * @ throws NotEnoughDataDecoderException */ private static void skipControlCharacters ( ByteBuf undecodedChunk ) { } }
if ( ! undecodedChunk . hasArray ( ) ) { try { skipControlCharactersStandard ( undecodedChunk ) ; } catch ( IndexOutOfBoundsException e1 ) { throw new NotEnoughDataDecoderException ( e1 ) ; } return ; } SeekAheadOptimize sao = new SeekAheadOptimize ( undecodedChunk ) ; while ( sao . pos < sao . limit ) { char c = ( char ) ( sao . bytes [ sao . pos ++ ] & 0xFF ) ; if ( ! Character . isISOControl ( c ) && ! Character . isWhitespace ( c ) ) { sao . setReadPosition ( 1 ) ; return ; } } throw new NotEnoughDataDecoderException ( "Access out of bounds" ) ;
public class DynamicByteBuffer { /** * Creates dynamically growing ByteBuffer upto maxSize for named file . * @ param path * @ param maxSize * @ return * @ throws IOException */ public static ByteBuffer create ( Path path , int maxSize ) throws IOException { } }
try ( FileChannel fc = FileChannel . open ( path , READ , WRITE , CREATE ) ) { return fc . map ( FileChannel . MapMode . READ_WRITE , 0 , maxSize ) ; }
public class PrintfMessageParser { /** * VisibleForTesting */ static void unescapePrintf ( StringBuilder out , String message , int start , int end ) { } }
int pos = start ; while ( pos < end ) { if ( message . charAt ( pos ++ ) != '%' ) { continue ; } if ( pos == end ) { // Ignore unexpected trailing ' % ' . break ; } char chr = message . charAt ( pos ) ; if ( chr == '%' ) { // Append the section up to and including the first ' % ' . out . append ( message , start , pos ) ; } else if ( chr == 'n' ) { // % n encountered , rewind one position to not emit leading ' % ' and emit newline . out . append ( message , start , pos - 1 ) ; out . append ( SYSTEM_NEWLINE ) ; } else { // A single unescaped ' % ' is ignored and left in the output as - is . continue ; } // Increment the position and reset the start point after the last processed character . start = ++ pos ; } // Append the last section ( if it ' s non empty ) . if ( start < end ) { out . append ( message , start , end ) ; }
public class CmsLoginHelper { /** * Gets the copyright information HTML . < p > * @ param locale the locale for which to get the copyright info * @ return the copyright info HTML */ public static String getCopyrightHtml ( Locale locale ) { } }
StringBuffer html = new StringBuffer ( ) ; html . append ( "<div style=\"text-align: center; font-size: 10px; white-space: nowrap;\">" ) ; html . append ( "<a href=\"http://www.opencms.org\" target=\"_blank\">OpenCms</a> " ) ; html . append ( Messages . get ( ) . getBundle ( locale ) . key ( Messages . GUI_LOGIN_OPENCMS_IS_FREE_SOFTWARE_0 ) ) ; html . append ( "</div>\n" ) ; html . append ( "<div style=\"text-align: center; font-size: 10px; white-space: nowrap;\">" ) ; html . append ( Messages . get ( ) . getBundle ( locale ) . key ( Messages . GUI_LOGIN_TRADEMARKS_0 ) ) ; html . append ( "</div>\n" ) ; html . append ( "<div style=\"text-align: center; font-size: 10px; white-space: nowrap;\">" ) ; html . append ( "&copy; 2002 - 2019 Alkacon Software GmbH &amp; Co. KG. " ) ; html . append ( Messages . get ( ) . getBundle ( locale ) . key ( Messages . GUI_LOGIN_RIGHTS_RESERVED_0 ) ) ; html . append ( "</div>\n" ) ; return html . toString ( ) ;
public class SimpleNameTokeniser { /** * Tokenises the given name . * @ param name a name * @ return a list of tokens found in the name */ public static List < String > split ( String name ) { } }
List < String > firstPassTokens = tokeniseOnSeparators ( name ) ; List < String > tokens = tokeniseOnLowercaseToUppercase ( firstPassTokens ) ; return tokens ;
public class InventoryResultItem { /** * Contains all the inventory data of the item type . Results include attribute names and values . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setContent ( java . util . Collection ) } or { @ link # withContent ( java . util . Collection ) } if you want to override * the existing values . * @ param content * Contains all the inventory data of the item type . Results include attribute names and values . * @ return Returns a reference to this object so that method calls can be chained together . */ public InventoryResultItem withContent ( java . util . Map < String , String > ... content ) { } }
if ( this . content == null ) { setContent ( new com . amazonaws . internal . SdkInternalList < java . util . Map < String , String > > ( content . length ) ) ; } for ( java . util . Map < String , String > ele : content ) { this . content . add ( ele ) ; } return this ;
public class UntagResourceRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( UntagResourceRequest untagResourceRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( untagResourceRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( untagResourceRequest . getResource ( ) , RESOURCE_BINDING ) ; protocolMarshaller . marshall ( untagResourceRequest . getTagKeys ( ) , TAGKEYS_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class ClusteredDataGenerator { /** * generates randomly N distinct integers from 0 to Max . * @ param N * number of integers to generate * @ param Max * maximal value of the integers * @ return array containing the integers */ public int [ ] generateClustered ( int N , int Max ) { } }
int [ ] array = new int [ N ] ; fillClustered ( array , 0 , N , 0 , Max ) ; return array ;
public class FileUtil { /** * Android libraries are packaged in AAR files , which is a zip file with a " . aar " * suffix that contains a classes . jar with the classfiles , as well as any Android * resources associated with this library . This method extracts the classes . jar * entry from the AAR file , so it can be used as a classpath entry . * If there is an error extracting the classes . jar entry , a warning is logged * and the original path is returned . */ public File extractClassesJarFromAarFile ( File aarFile ) { } }
try ( ZipFile zfile = new ZipFile ( aarFile ) ) { File tempDir = FileUtil . createTempDir ( aarFile . getName ( ) ) ; ZipEntry entry = zfile . getEntry ( "classes.jar" ) ; if ( entry == null ) { ErrorUtil . warning ( aarFile . getPath ( ) + " does not have a classes.jar entry" ) ; return aarFile ; } File tmpFile = extractZipEntry ( tempDir , zfile , entry ) ; tmpFile . deleteOnExit ( ) ; return tmpFile ; } catch ( IOException e ) { ErrorUtil . warning ( "unable to access " + aarFile . getPath ( ) + ": " + e ) ; return aarFile ; }
public class DefaultGroovyMethods { /** * Finds the first element in the array that matches the given closure condition . * Example : * < pre class = " groovyTestCase " > * def list = [ 1,2,3 ] as Integer [ ] * assert 2 = = list . find { it { @ code > } 1 } * assert null = = list . find { it { @ code > } 5 } * < / pre > * @ param self an Array * @ param condition a closure condition * @ return the first element from the array that matches the condition or null if no element matches * @ since 2.0 */ public static < T > T find ( T [ ] self , @ ClosureParams ( FirstParam . Component . class ) Closure condition ) { } }
BooleanClosureWrapper bcw = new BooleanClosureWrapper ( condition ) ; for ( T element : self ) { if ( bcw . call ( element ) ) { return element ; } } return null ;
public class ExcelExecutor { /** * 构建单元格数据 * @ param data 要写入单元格的数据 * @ return 返回不为空表示能写入 , 并返回单元格数据 , 返回空表示无法写入 */ private Writer < ? > build ( Object data ) { } }
Optional < ExcelDataWriter < ? > > dataBuilder = writers . values ( ) . parallelStream ( ) . filter ( excelData -> excelData . writeable ( data ) ) . limit ( 1 ) . findFirst ( ) ; ExcelDataWriter < ? > writer = dataBuilder . orElseThrow ( ( ) -> new UtilsException ( "数据[" + data + "]没有对应的ExcelDataWriter" ) ) ; return new Writer ( writer , data ) ;
public class LifeCycleHelper { /** * Assigns / injects { @ link Provided } property values to a component . * @ param descriptor * @ param component */ public void assignProvidedProperties ( final ComponentDescriptor < ? > descriptor , final Object component ) { } }
final Set < ProvidedPropertyDescriptor > providedDescriptors = descriptor . getProvidedProperties ( ) ; for ( final ProvidedPropertyDescriptor providedDescriptor : providedDescriptors ) { final InjectionPoint < Object > injectionPoint = new PropertyInjectionPoint ( providedDescriptor , component ) ; final Object value = _injectionManager . getInstance ( injectionPoint ) ; providedDescriptor . setValue ( component , value ) ; }
public class MethodUtils { /** * Sets the value of a bean property to an Object . * @ param object the bean to change * @ param setterName the property name or setter method name * @ param args use this arguments * @ throws NoSuchMethodException the no such method exception * @ throws IllegalAccessException the illegal access exception * @ throws InvocationTargetException the invocation target exception */ public static void invokeSetter ( Object object , String setterName , Object [ ] args ) throws NoSuchMethodException , IllegalAccessException , InvocationTargetException { } }
int index = setterName . indexOf ( '.' ) ; if ( index > 0 ) { String getterName = setterName . substring ( 0 , index ) ; Object o = invokeGetter ( object , getterName ) ; invokeSetter ( o , setterName . substring ( index + 1 ) , args ) ; } else { if ( ! setterName . startsWith ( "set" ) ) { setterName = "set" + setterName . substring ( 0 , 1 ) . toUpperCase ( Locale . US ) + setterName . substring ( 1 ) ; } invokeMethod ( object , setterName , args ) ; }
public class DefaultKunderaEntity { /** * Bind . * @ param propertiesPath * the properties path * @ param clazz * the clazz * @ throws BindingException * the binding exception */ public static synchronized void bind ( String propertiesPath , Class clazz ) throws BindingException { } }
if ( em == null ) { em = PersistenceService . getEM ( emf , propertiesPath , clazz . getName ( ) ) ; } onBind ( clazz ) ;
public class MapboxOfflineRouter { /** * Removes tiles within / intersected by a bounding box * Note that calling { @ link MapboxOfflineRouter # findRoute ( OfflineRoute , OnOfflineRouteFoundCallback ) } while * { @ link MapboxOfflineRouter # removeTiles ( String , BoundingBox , OnOfflineTilesRemovedCallback ) } could lead * to undefine behavior * @ param version version of offline tiles to use * @ param boundingBox bounding box within which routing tiles should be removed * @ param callback a callback that will be fired when the routing tiles have been removed completely */ public void removeTiles ( String version , BoundingBox boundingBox , OnOfflineTilesRemovedCallback callback ) { } }
offlineNavigator . removeTiles ( new File ( tilePath , version ) . getAbsolutePath ( ) , boundingBox . southwest ( ) , boundingBox . northeast ( ) , callback ) ;
public class ListManagementImageListsImpl { /** * Deletes image list with the list Id equal to list Id passed . * @ param listId List Id of the image list . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the { @ link ServiceFuture } object */ public ServiceFuture < String > deleteAsync ( String listId , final ServiceCallback < String > serviceCallback ) { } }
return ServiceFuture . fromResponse ( deleteWithServiceResponseAsync ( listId ) , serviceCallback ) ;
public class ItemRef { /** * Attach a listener to run the callback every time the event type occurs for this item . * < pre > * StorageRef storage = new StorageRef ( " your _ app _ key " , " your _ token " ) ; * TableRef tableRef = storage . table ( " your _ table " ) ; * ItemRef itemRef = tableRef . item ( new ItemAttribute ( " your _ primary _ key _ value " ) , * new ItemAttribute ( " your _ secondary _ key _ value " ) ) ; * itemRef . on ( StorageRef . StorageEvent . UPDATE , new OnItemSnapshot ( ) { * & # 064 ; Override * public void run ( ItemSnapshot itemSnapshot ) { * if ( itemSnapshot ! = null ) { * Log . d ( " ItemRef " , " Item updated : " + itemSnapshot . val ( ) ) ; * < / pre > * @ param eventType * The type of the event to listen . Possible values : put , update , delete . * @ param onItemSnapshot * The callback to run when the event occurs . The function is called with the snapshot of affected item as argument . If the event type is " put " , it will immediately trigger a " get " to retrieve the initial state and run the callback with the item snapshot as argument . Note : If you are using GCM the value of received ItemSnapshot can be null . * @ return * Current item reference */ public ItemRef on ( StorageEvent eventType , final OnItemSnapshot onItemSnapshot ) { } }
return on ( eventType , onItemSnapshot , null ) ;
public class ExtendedSwidProcessor { /** * Defines product release identifier ( tag : release _ id ) . * @ param releaseId * product release identifier * @ return a reference to this object . */ public ExtendedSwidProcessor setReleaseId ( final String releaseId ) { } }
swidTag . setReleaseId ( new Token ( releaseId , idGenerator . nextId ( ) ) ) ; return this ;
public class CompressionStage { /** * Compress and replace the { @ link Data } content . Note : this stage will return * the same { @ link Data } instance and will modify only its content . * @ param context the { @ link Data } packet * @ return the same packet but with GZIP - compressed content * @ throws ProcessingStageException if compression fails */ @ Override public Data process ( Data context ) throws ProcessingStageException { } }
ByteArrayOutputStream buffer = new ByteArrayOutputStream ( ) ; try ( GZIPOutputStream stream = new GZIPOutputStream ( buffer ) ) { stream . write ( context . getContent ( ) . getImmutableArray ( ) , 0 , context . getContent ( ) . size ( ) ) ; stream . close ( ) ; } catch ( IOException e ) { throw new ProcessingStageException ( e ) ; } context . setContent ( new Blob ( buffer . toByteArray ( ) ) ) ; return context ;
public class Vector { /** * Returns a new vector with the selected elements . * @ param indices the array of indices * @ return the new vector with the selected elements */ public Vector select ( int [ ] indices ) { } }
int newLength = indices . length ; if ( newLength == 0 ) { fail ( "No elements selected." ) ; } Vector result = blankOfLength ( newLength ) ; for ( int i = 0 ; i < newLength ; i ++ ) { result . set ( i , get ( indices [ i ] ) ) ; } return result ;
public class TemplateVariableAwareLinkBuilderSupport { /** * ( non - Javadoc ) * @ see org . springframework . hateoas . core . LinkBuilderSupport # createNewInstance ( org . springframework . web . util . UriComponentsBuilder , java . util . List ) */ @ Override protected final T createNewInstance ( UriComponentsBuilder builder , List < Affordance > affordances ) { } }
return createNewInstance ( builder , affordances , variables ) ;
public class VaadinExtensionsConfiguration { /** * Vaadin Http Service * Allow access to HttpRequest / HttpResponse */ @ Bean @ Scope ( value = org . springframework . web . context . WebApplicationContext . SCOPE_REQUEST , proxyMode = ScopedProxyMode . INTERFACES ) HttpService httpService ( ) { } }
return new VaadinHttpService ( ) ;
public class AbstractAdminController { /** * manually resolve of locale . . . to request . useful for path variables * @ param language locale representation as string * @ param request * @ param response */ protected void resolveLocale ( String language , HttpServletRequest request , HttpServletResponse response ) { } }
final LocaleEditor localeEditor = new LocaleEditor ( ) ; localeEditor . setAsText ( language ) ; resolveLocale ( ( Locale ) localeEditor . getValue ( ) , request , response ) ;
public class Normalizer { /** * Convenience method . * @ param source Array of characters for determining if it is in a * normalized format * @ param mode normalization format ( Normalizer . NFC , Normalizer . NFD , * Normalizer . NFKC , Normalizer . NFKD ) * @ param options Options for use with exclusion set and tailored Normalization * The only option that is currently recognized is UNICODE _ 3_2 * @ return Return code to specify if the text is normalized or not * ( Normalizer . YES , Normalizer . NO or Normalizer . MAYBE ) * @ deprecated ICU 56 Use { @ link Normalizer2 } instead . * @ hide original deprecated declaration */ @ Deprecated public static QuickCheckResult quickCheck ( char [ ] source , Mode mode , int options ) { } }
return quickCheck ( source , 0 , source . length , mode , options ) ;
public class AmazonMachineLearningWaiters { /** * Builds a EvaluationAvailable waiter by using custom parameters waiterParameters and other parameters defined in * the waiters specification , and then polls until it determines whether the resource entered the desired state or * not , where polling criteria is bound by either default polling strategy or custom polling strategy . */ public Waiter < DescribeEvaluationsRequest > evaluationAvailable ( ) { } }
return new WaiterBuilder < DescribeEvaluationsRequest , DescribeEvaluationsResult > ( ) . withSdkFunction ( new DescribeEvaluationsFunction ( client ) ) . withAcceptors ( new EvaluationAvailable . IsCOMPLETEDMatcher ( ) , new EvaluationAvailable . IsFAILEDMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 60 ) , new FixedDelayStrategy ( 30 ) ) ) . withExecutorService ( executorService ) . build ( ) ;
public class DateUtils { /** * 添加小时 * @ param date 日期 * @ param amount 数量 * @ return 添加后的日期 */ public static Date addHour ( Date date , int amount ) { } }
return add ( date , Calendar . HOUR , amount ) ;
public class DAGraph { /** * Copies entries in the source map to target map . * @ param source source map * @ param target target map */ private void merge ( Map < String , NodeT > source , Map < String , NodeT > target ) { } }
for ( Map . Entry < String , NodeT > entry : source . entrySet ( ) ) { String key = entry . getKey ( ) ; if ( ! target . containsKey ( key ) ) { target . put ( key , entry . getValue ( ) ) ; } }
public class DocumentTreeResource { /** * Returns a document path for the given path params . */ private DocumentPath getDocumentPath ( List < PathSegment > params ) { } }
if ( params . isEmpty ( ) ) { return DocumentPath . ROOT ; } else { return DocumentPath . from ( params . stream ( ) . map ( PathSegment :: getPath ) . collect ( Collectors . toList ( ) ) ) ; }
public class ComputeExecutor { /** * Helper method to check whether implicit or attribute types are included in the query scope * @ return true if they exist , false if they don ' t */ private boolean scopeIncludesImplicitOrAttributeTypes ( GraqlCompute query ) { } }
if ( query . in ( ) . isEmpty ( ) ) return false ; return query . in ( ) . stream ( ) . anyMatch ( t -> { Label label = Label . of ( t ) ; SchemaConcept type = tx . getSchemaConcept ( label ) ; return ( type != null && ( type . isAttributeType ( ) || type . isImplicit ( ) ) ) ; } ) ;
public class WxPayApiConfig { /** * 构建查询订单参数 * @ return < Map < String , String > > */ public Map < String , String > orderQueryBuild ( ) { } }
Map < String , String > map = new HashMap < String , String > ( ) ; if ( getPayModel ( ) . equals ( PayModel . SERVICEMODE ) ) { map . put ( "sub_mch_id" , getSubMchId ( ) ) ; map . put ( "sub_appid" , getSubAppId ( ) ) ; } map . put ( "appid" , getAppId ( ) ) ; map . put ( "mch_id" , getMchId ( ) ) ; if ( StrKit . notBlank ( getTransactionId ( ) ) ) { map . put ( "transaction_id" , getTransactionId ( ) ) ; } else { if ( StrKit . isBlank ( getOutTradeNo ( ) ) ) { throw new IllegalArgumentException ( "out_trade_no,transaction_id 不能同时为空" ) ; } map . put ( "out_trade_no" , getOutTradeNo ( ) ) ; } map . put ( "nonce_str" , String . valueOf ( System . currentTimeMillis ( ) ) ) ; map . put ( "sign" , PaymentKit . createSign ( map , getPaternerKey ( ) ) ) ; return map ;
public class XSLTElementDef { /** * Construct an instance of XSLTElementDef . * @ param namespace The Namespace URI , " * " , or null . * @ param name The local name ( without prefix ) , " * " , or null . * @ param nameAlias A potential alias for the name , or null . * @ param elements An array of allowed child element defs , or null . * @ param attributes An array of allowed attribute defs , or null . * @ param contentHandler The element processor for this element . * @ param classObject The class of the object that this element def should produce . */ void build ( String namespace , String name , String nameAlias , XSLTElementDef [ ] elements , XSLTAttributeDef [ ] attributes , XSLTElementProcessor contentHandler , Class classObject ) { } }
this . m_namespace = namespace ; this . m_name = name ; this . m_nameAlias = nameAlias ; this . m_elements = elements ; this . m_attributes = attributes ; setElementProcessor ( contentHandler ) ; this . m_classObject = classObject ; if ( hasRequired ( ) && m_elements != null ) { int n = m_elements . length ; for ( int i = 0 ; i < n ; i ++ ) { XSLTElementDef def = m_elements [ i ] ; if ( def != null && def . getRequired ( ) ) { if ( m_requiredFound == null ) m_requiredFound = new Hashtable ( ) ; m_requiredFound . put ( def . getName ( ) , "xsl:" + def . getName ( ) ) ; } } }
public class Seconds { /** * Obtains a { @ code Seconds } from a text string such as { @ code PTnS } . * This will parse the string produced by { @ code toString ( ) } and other * related formats based on ISO - 8601 { @ code PnDTnHnMnS } . * The string starts with an optional sign , denoted by the ASCII negative * or positive symbol . If negative , the whole amount is negated . * The ASCII letter " P " is next in upper or lower case . * There are four sections consisting of a number and a suffix . * There is one section for days suffixed by " D " , * followed by one section for hours suffixed by " H " , * followed by one section for minutes suffixed by " M " , * followed by one section for seconds suffixed by " S " . * At least one section must be present . * If the hours , minutes or seconds section is present it must be prefixed by " T " . * If the hours , minutes or seconds section is omitted the " T " must be omitted . * Letters must be in ASCII upper or lower case . * The number part of each section must consist of ASCII digits . * The number may be prefixed by the ASCII negative or positive symbol . * The number must parse to an { @ code int } . * The leading plus / minus sign , and negative values for days , hours , minutes * and seconds are not part of the ISO - 8601 standard . * For example , the following are valid inputs : * < pre > * " PT2S " - - Seconds . of ( 2) * " PT - 2S " - - Seconds . of ( - 2) * " - PT2S " - - Seconds . of ( - 2) * " - PT - 2S " - - Seconds . of ( 2) * " PT3S " - - Seconds . of ( 3 * 60) * " PT3H - 2M7S " - - Seconds . of ( 3 * 3600 - 2 * 60 + 7) * " P2D " - - Seconds . of ( 2 * 86400) * " P2DT3H " - - Seconds . of ( 2 * 86400 + 3 * 3600) * < / pre > * @ param text the text to parse , not null * @ return the parsed period , not null * @ throws DateTimeParseException if the text cannot be parsed to a period */ @ FromString public static Seconds parse ( CharSequence text ) { } }
Objects . requireNonNull ( text , "text" ) ; Matcher matcher = PATTERN . matcher ( text ) ; if ( matcher . matches ( ) ) { int negate = "-" . equals ( matcher . group ( 1 ) ) ? - 1 : 1 ; String daysStr = matcher . group ( 2 ) ; String hoursStr = matcher . group ( 3 ) ; String minutesStr = matcher . group ( 4 ) ; String secondsStr = matcher . group ( 5 ) ; if ( daysStr != null || hoursStr != null || minutesStr != null || secondsStr != null ) { int seconds = 0 ; if ( secondsStr != null ) { try { seconds = Integer . parseInt ( secondsStr ) ; } catch ( NumberFormatException ex ) { throw new DateTimeParseException ( "Text cannot be parsed to Seconds, non-numeric seconds" , text , 0 , ex ) ; } } if ( minutesStr != null ) { try { int minutesAsSecs = Math . multiplyExact ( Integer . parseInt ( minutesStr ) , SECONDS_PER_MINUTE ) ; seconds = Math . addExact ( seconds , minutesAsSecs ) ; } catch ( NumberFormatException ex ) { throw new DateTimeParseException ( "Text cannot be parsed to Seconds, non-numeric minutes" , text , 0 , ex ) ; } } if ( hoursStr != null ) { try { int hoursAsSecs = Math . multiplyExact ( Integer . parseInt ( hoursStr ) , SECONDS_PER_HOUR ) ; seconds = Math . addExact ( seconds , hoursAsSecs ) ; } catch ( NumberFormatException ex ) { throw new DateTimeParseException ( "Text cannot be parsed to Seconds, non-numeric hours" , text , 0 , ex ) ; } } if ( daysStr != null ) { try { int daysAsSecs = Math . multiplyExact ( Integer . parseInt ( daysStr ) , SECONDS_PER_DAY ) ; seconds = Math . addExact ( seconds , daysAsSecs ) ; } catch ( NumberFormatException ex ) { throw new DateTimeParseException ( "Text cannot be parsed to Seconds, non-numeric days" , text , 0 , ex ) ; } } return of ( Math . multiplyExact ( seconds , negate ) ) ; } } throw new DateTimeParseException ( "Text cannot be parsed to Seconds" , text , 0 ) ;
public class WriteFieldClass { /** * Write the field initialize code */ public void writeFieldInit ( ) { } }
String strClassName ; Record recClassInfo = this . getMainRecord ( ) ; strClassName = recClassInfo . getField ( ClassInfo . CLASS_NAME ) . getString ( ) ; if ( this . readThisMethod ( strClassName ) ) this . writeThisMethod ( CodeType . THICK ) ; else this . writeThisMethod ( CodeType . THICK ) ;
public class ByteArraySerializer { /** * ( non - Javadoc ) * @ see Serializer # deserialize ( byte [ ] , * java . lang . Class ) */ @ SuppressWarnings ( "unchecked" ) @ Override public final < T > T deserialize ( byte [ ] content , Class < T > clazz ) throws SerializerException { } }
if ( byte [ ] . class . equals ( clazz ) ) { return ( T ) content ; } throw new SerializerException ( "Unable to deserialize to type '" + clazz . getName ( ) + "'" ) ;
public class WaitFor { /** * Waits up to the provided wait time for a confirmation present on the page has content equal to the * expected text . This information will be logged and recorded , with a * screenshot for traceability and added debugging support . * @ param expectedConfirmationText the expected text of the confirmation * @ param seconds the number of seconds to wait */ public void confirmationEquals ( double seconds , String expectedConfirmationText ) { } }
try { double timeTook = popup ( seconds ) ; timeTook = popupEquals ( seconds - timeTook , expectedConfirmationText ) ; checkConfirmationEquals ( expectedConfirmationText , seconds , timeTook ) ; } catch ( TimeoutException e ) { checkConfirmationEquals ( expectedConfirmationText , seconds , seconds ) ; }
public class PhoneIntents { /** * Creates an intent that will open the phone app and enter the given number . Unlike * { @ link # newCallNumberIntent ( String ) } , this does not actually dispatch the call , so it gives the user a chance to * review and edit the number . * @ param phoneNumber the number to dial * @ return the intent */ public static Intent newDialNumberIntent ( String phoneNumber ) { } }
final Intent intent ; if ( phoneNumber == null || phoneNumber . trim ( ) . length ( ) <= 0 ) { intent = new Intent ( Intent . ACTION_DIAL , Uri . parse ( "tel:" ) ) ; } else { intent = new Intent ( Intent . ACTION_DIAL , Uri . parse ( "tel:" + phoneNumber . replace ( " " , "" ) ) ) ; } return intent ;
public class SyncMembersInner { /** * Creates or updates a sync member . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . * @ param databaseName The name of the database on which the sync group is hosted . * @ param syncGroupName The name of the sync group on which the sync member is hosted . * @ param syncMemberName The name of the sync member . * @ param parameters The requested sync member resource state . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudException thrown if the request is rejected by server * @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @ return the SyncMemberInner object if successful . */ public SyncMemberInner beginCreateOrUpdate ( String resourceGroupName , String serverName , String databaseName , String syncGroupName , String syncMemberName , SyncMemberInner parameters ) { } }
return beginCreateOrUpdateWithServiceResponseAsync ( resourceGroupName , serverName , databaseName , syncGroupName , syncMemberName , parameters ) . toBlocking ( ) . single ( ) . body ( ) ;
public class ConvertDateExtensions { /** * Converts a Date to a Timestamp - object . * @ param date * The date to convert . * @ return The Timestamp from the date . */ public static Timestamp toTimestamp ( final Date date ) { } }
final Calendar cal = new GregorianCalendar ( ) ; cal . setTime ( date ) ; cal . set ( Calendar . HOUR_OF_DAY , 0 ) ; cal . set ( Calendar . MINUTE , 0 ) ; cal . set ( Calendar . SECOND , 0 ) ; cal . set ( Calendar . MILLISECOND , 0 ) ; return new Timestamp ( cal . getTime ( ) . getTime ( ) ) ;
public class S3StorageProvider { /** * Creates a " hidden " space . This space will not be returned by the StorageProvider . getSpaces ( ) method . * It can be accessed using the getSpace * methods . You must know the name of the space in order to * access it . * @ param spaceId The spaceId * @ param expirationInDays The number of days before content in the space is automatically deleted . * @ return */ public String createHiddenSpace ( String spaceId , int expirationInDays ) { } }
String bucketName = getHiddenBucketName ( spaceId ) ; try { Bucket bucket = s3Client . createBucket ( bucketName ) ; // Apply lifecycle config to bucket BucketLifecycleConfiguration . Rule expiresRule = new BucketLifecycleConfiguration . Rule ( ) . withId ( "ExpirationRule" ) . withExpirationInDays ( expirationInDays ) . withStatus ( BucketLifecycleConfiguration . ENABLED ) ; // Add the rules to a new BucketLifecycleConfiguration . BucketLifecycleConfiguration configuration = new BucketLifecycleConfiguration ( ) . withRules ( expiresRule ) ; s3Client . setBucketLifecycleConfiguration ( bucketName , configuration ) ; return spaceId ; } catch ( AmazonClientException e ) { String err = "Could not create S3 bucket with name " + bucketName + " due to error: " + e . getMessage ( ) ; throw new StorageException ( err , e , RETRY ) ; }
public class CPDisplayLayoutPersistenceImpl { /** * Clears the cache for all cp display layouts . * The { @ link EntityCache } and { @ link FinderCache } are both cleared by this method . */ @ Override public void clearCache ( ) { } }
entityCache . clearCache ( CPDisplayLayoutImpl . class ) ; finderCache . clearCache ( FINDER_CLASS_NAME_ENTITY ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITH_PAGINATION ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION ) ;
public class ParameterTool { /** * Merges two { @ link ParameterTool } . * @ param other Other { @ link ParameterTool } object * @ return The Merged { @ link ParameterTool } */ public ParameterTool mergeWith ( ParameterTool other ) { } }
final Map < String , String > resultData = new HashMap < > ( data . size ( ) + other . data . size ( ) ) ; resultData . putAll ( data ) ; resultData . putAll ( other . data ) ; final ParameterTool ret = new ParameterTool ( resultData ) ; final HashSet < String > requestedParametersLeft = new HashSet < > ( data . keySet ( ) ) ; requestedParametersLeft . removeAll ( unrequestedParameters ) ; final HashSet < String > requestedParametersRight = new HashSet < > ( other . data . keySet ( ) ) ; requestedParametersRight . removeAll ( other . unrequestedParameters ) ; ret . unrequestedParameters . removeAll ( requestedParametersLeft ) ; ret . unrequestedParameters . removeAll ( requestedParametersRight ) ; return ret ;
public class EntityGroupImpl { /** * Returns the < code > Set < / code > of < code > IGroupMembers < / code > in our member < code > Collection * < / code > and , recursively , in the < code > Collections < / code > of our members . * @ param rslt Set - a Set that members are added to . * @ return Set */ private Set < IGroupMember > primGetAllMembers ( Set < IGroupMember > rslt ) throws GroupsException { } }
for ( IGroupMember gm : getChildren ( ) ) { rslt . add ( gm ) ; if ( gm . isGroup ( ) ) { ( ( EntityGroupImpl ) gm ) . primGetAllMembers ( rslt ) ; } } return rslt ;
public class ConnectionManager { /** * not associated with a connection to get reassociated with a valid connection . */ private void associateConnection ( ManagedConnectionFactory mcf , Subject subject , ConnectionRequestInfo cri , Object connection ) throws ResourceException { } }
final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "associateConnection" ) ; UOWCurrent uowCurrent = ( UOWCurrent ) _pm . connectorSvc . transactionManager ; UOWCoordinator uowCoord = uowCurrent == null ? null : uowCurrent . getUOWCoord ( ) ; MCWrapper mcWrapper = null ; Object credTokenObj = null ; try { // Begin processing to get connection // Perform any security setup that may be needed // before we proceed to get a connection . credTokenObj = securityHelper . beforeGettingConnection ( subject , cri ) ; // Get an appropriate wrappered ManangedConnection . mcWrapper = allocateMCWrapper ( mcf , cri , subject , uowCoord ) ; } // end try block finally { // A " finally " clause is implemented to ensure // any thread identity pushed to the OS // thread is removed and the original identity // is restored . if ( credTokenObj != null ) { securityHelper . afterGettingConnection ( subject , cri , credTokenObj ) ; } } involveMCInTran ( mcWrapper , uowCoord , this ) ; // Reassociate the handle which was passed in with the ManagedConnection ( via MCWrapper ) . // Note : since associateConnection is called to reassociate a smart handle which is // currently not associated to any MC , the fromMCWrapper parm in the call below will // be null . reassociateConnectionHandle ( connection , null , mcWrapper , uowCoord ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "associateConnection" ) ;
public class ExprMacroTable { /** * Returns an expr corresponding to a function call if this table has an entry for { @ code functionName } . * Otherwise , returns null . * @ param functionName function name * @ param args function arguments * @ return expr for this function call , or null */ @ Nullable public Expr get ( final String functionName , final List < Expr > args ) { } }
final ExprMacro exprMacro = macroMap . get ( StringUtils . toLowerCase ( functionName ) ) ; if ( exprMacro == null ) { return null ; } return exprMacro . apply ( args ) ;
public class BeanQuery { /** * Specify the property of the beans to be compared by the * propertyValueComparator when sorting the result . If there is not a * accessible public read method of the property , the value of the property * passed to the propertyValueComparator will be null . */ public BeanQuery < T > orderBy ( String orderByProperty , Comparator propertyValueComparator ) { } }
this . comparator = new DelegatedSortOrderableComparator ( new PropertyComparator ( orderByProperty , propertyValueComparator ) ) ; return this ;
public class StorePackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getRenderEnginePluginConfiguration ( ) { } }
if ( renderEnginePluginConfigurationEClass == null ) { renderEnginePluginConfigurationEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( StorePackage . eNS_URI ) . getEClassifiers ( ) . get ( 14 ) ; } return renderEnginePluginConfigurationEClass ;
public class Connection { /** * Set the connection status . * @ param workInProgress the connection work status . */ public void setJobInProgress ( Boolean workInProgress ) { } }
lastDateInfo = new SimpleDateFormat ( FILENAME_DATE_PATTERN ) . format ( new Date ( ) ) ; this . jobInProgress = workInProgress ;
public class UnProxyClassServices { /** * Get class without proxy CDI based on $ separator * @ param proxyname * @ return * @ throws java . lang . ClassNotFoundException */ String getRealClassname ( String proxyname ) throws ClassNotFoundException { } }
int index = proxyname . indexOf ( '$' ) ; if ( index != - 1 ) { return proxyname . substring ( 0 , index ) ; } else { throw new ClassNotFoundException ( ) ; }
public class CmsColor { /** * Converts the RGB into the HSV . < p > * @ param red value * @ param green value * @ param blue value */ private void RGBtoHSV ( float red , float green , float blue ) { } }
float min = 0 ; float max = 0 ; float delta = 0 ; min = MIN ( red , green , blue ) ; max = MAX ( red , green , blue ) ; m_bri = max ; delta = max - min ; if ( max != 0 ) { m_sat = delta / max ; } else { m_sat = 0 ; m_hue = 0 ; return ; } if ( delta == 0 ) { m_hue = 0 ; return ; } if ( red == max ) { m_hue = ( green - blue ) / delta ; } else if ( green == max ) { m_hue = 2 + ( ( blue - red ) / delta ) ; } else { m_hue = 4 + ( ( red - green ) / delta ) ; } m_hue *= 60 ; if ( m_hue < 0 ) { m_hue += 360 ; }
public class RfSessionFactoryImpl { /** * ( non - Javadoc ) * @ see * org . jdiameter . api . app . StateChangeListener # stateChanged ( java . lang . Object , * java . lang . Enum , java . lang . Enum ) */ @ Override @ SuppressWarnings ( "unchecked" ) public void stateChanged ( AppSession source , Enum oldState , Enum newState ) { } }
logger . info ( "Diameter Rf SessionFactory :: stateChanged :: source[{}], oldState[{}], newState[{}]" , new Object [ ] { source , oldState , newState } ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link BridgePartType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link BridgePartType } { @ code > } */ @ XmlElementDecl ( namespace = "http://www.opengis.net/citygml/bridge/2.0" , name = "BridgePart" , substitutionHeadNamespace = "http://www.opengis.net/citygml/bridge/2.0" , substitutionHeadName = "_AbstractBridge" ) public JAXBElement < BridgePartType > createBridgePart ( BridgePartType value ) { } }
return new JAXBElement < BridgePartType > ( _BridgePart_QNAME , BridgePartType . class , null , value ) ;
public class PactDslRootValue { /** * Value that must be a decimal value */ public static PactDslRootValue decimalType ( ) { } }
PactDslRootValue value = new PactDslRootValue ( ) ; value . generators . addGenerator ( Category . BODY , "" , new RandomDecimalGenerator ( 10 ) ) ; value . setValue ( 100 ) ; value . setMatcher ( new NumberTypeMatcher ( NumberTypeMatcher . NumberType . DECIMAL ) ) ; return value ;
public class RegistrationManagerImpl { /** * { @ inheritDoc } */ @ Override public void unregisterService ( String serviceName , String providerId ) throws ServiceException { } }
ServiceInstanceUtils . validateManagerIsStarted ( isStarted ) ; ServiceInstanceUtils . validateServiceName ( serviceName ) ; ServiceInstanceUtils . validateServiceInstanceID ( providerId ) ; getRegistrationService ( ) . unregisterService ( serviceName , providerId ) ;
public class CodedInput { /** * Read a 32 - bit little - endian integer from the stream . */ public int readRawLittleEndian32 ( ) throws IOException { } }
final byte b1 = readRawByte ( ) ; final byte b2 = readRawByte ( ) ; final byte b3 = readRawByte ( ) ; final byte b4 = readRawByte ( ) ; return ( ( ( int ) b1 & 0xff ) ) | ( ( ( int ) b2 & 0xff ) << 8 ) | ( ( ( int ) b3 & 0xff ) << 16 ) | ( ( ( int ) b4 & 0xff ) << 24 ) ;
public class CmsStaticExportManager { /** * Sets the static export handler class . < p > * @ param handlerClassName the static export handler class name */ public void setLinkSubstitutionHandler ( String handlerClassName ) { } }
try { m_linkSubstitutionHandler = ( I_CmsLinkSubstitutionHandler ) Class . forName ( handlerClassName ) . newInstance ( ) ; } catch ( Exception e ) { // should never happen LOG . error ( e . getLocalizedMessage ( ) , e ) ; }
public class CalendarUtil { /** * Create a XMLGregorianCalendar Without Time Component . * @ param cal The initial Calendar * @ return An XMLGregorianCalendar */ public XMLGregorianCalendar buildXMLGregorianCalendarDate ( Calendar cal ) { } }
XMLGregorianCalendar result = null ; if ( cal != null ) { result = newXMLGregorianCalendar ( cal . get ( Calendar . DAY_OF_MONTH ) , cal . get ( Calendar . MONTH ) + 1 , cal . get ( Calendar . YEAR ) ) ; } return result ;
public class CmsPropertyCustom { /** * Initializes the explorer type settings for the current resource type . < p > */ protected void initExplorerTypeSettings ( ) { } }
try { CmsResource res = getCms ( ) . readResource ( getParamResource ( ) , CmsResourceFilter . ALL ) ; if ( res . isFolder ( ) ) { if ( ! getParamResource ( ) . endsWith ( "/" ) ) { // append folder separator to resource name setParamResource ( getParamResource ( ) + "/" ) ; } } String resTypeName = OpenCms . getResourceManager ( ) . getResourceType ( res . getTypeId ( ) ) . getTypeName ( ) ; // get settings for resource type setExplorerTypeSettings ( getSettingsForType ( resTypeName ) ) ; setShowNavigation ( getExplorerTypeSettings ( ) . isShowNavigation ( ) ) ; } catch ( Throwable e ) { // error reading file , show error dialog try { includeErrorpage ( this , e ) ; } catch ( JspException exc ) { LOG . error ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_ERROR_INCLUDE_FAILED_1 , FILE_DIALOG_SCREEN_ERRORPAGE ) ) ; } }
public class SchemaCache { /** * Utility method to get the validator for a given schema using the error * handler provided in the constructor . * @ param aSchema * The schema for which the validator is to be retrieved . May not be * < code > null < / code > . * @ return The validator and never < code > null < / code > . */ @ Nonnull public final Validator getValidatorFromSchema ( @ Nonnull final Schema aSchema ) { } }
ValueEnforcer . notNull ( aSchema , "Schema" ) ; final Validator aValidator = aSchema . newValidator ( ) ; aValidator . setErrorHandler ( m_aSchemaFactory . getErrorHandler ( ) ) ; return aValidator ;
public class AbstractElementFactory { /** * This method serializaes object into JSON string * @ param element * @ return */ @ Override public String serialize ( T element ) { } }
String json = null ; try { json = element . toJSON ( ) ; } catch ( Exception e ) { log . error ( "Direct serialization failed, falling back to jackson" ) ; } if ( json == null || json . isEmpty ( ) ) { ObjectMapper mapper = SequenceElement . mapper ( ) ; try { json = mapper . writeValueAsString ( element ) ; } catch ( org . nd4j . shade . jackson . core . JsonProcessingException e ) { throw new RuntimeException ( e ) ; } } return json ;
public class SamlUtil { /** * Returns a { @ link NameID } which is matched to the specified { @ code filter } from the { @ link Response } . */ public static Optional < NameID > getNameId ( Response response , Predicate < NameID > filter ) { } }
return response . getAssertions ( ) . stream ( ) . map ( s -> s . getSubject ( ) . getNameID ( ) ) . filter ( filter ) . findFirst ( ) ;
public class CalendarPath { /** * Method to construct the between expression for date * @ param startValue the start value * @ param endValue the end value * @ return Expression */ public Expression < java . util . Date > between ( java . util . Date startValue , java . util . Date endValue ) { } }
SimpleDateFormat formatter = getDateTimeFormatter ( ) ; String valueString = "'" + formatter . format ( startValue ) . concat ( "Z" ) + "' AND '" + formatter . format ( endValue ) + "'" ; return new Expression < java . util . Date > ( this , Operation . between , valueString ) ;
public class SharedSlot { /** * Removes the given slot from this shared slot . This method Should only be called * through this shared slot ' s { @ link SlotSharingGroupAssignment } * @ param slot slot to be removed from the set of sub slots . * @ return Number of remaining sub slots */ int removeDisposedChildSlot ( Slot slot ) { } }
if ( ! slot . isReleased ( ) || ! subSlots . remove ( slot ) ) { throw new IllegalArgumentException ( ) ; } return subSlots . size ( ) ;
public class FlowTypeCheck { /** * Type check a sequence of zero or more conditions , such as the requires clause * of a function or method . The environment from each condition is fed into the * following . This means that , in principle , type tests influence both * subsequent conditions and the remainder . The following illustrates : * < pre > * function f ( int | null x ) - > ( int r ) * requires x is int * requires x > = 0: * return x * < / pre > * This type checks because of the initial type test < code > x is int < / code > . * Observe that , if the order of < code > requires < / code > clauses was reversed , * this would not type check . Finally , it is an interesting question as to why * the above ever make sense . In general , it ' s better to simply declare * < code > x < / code > as type < code > int < / code > . However , in some cases we may be * unable to do this ( for example , to preserve binary compatibility with a * previous interface ) . * @ param conditions * @ param sign * @ param environment * @ return */ public Environment checkConditions ( Tuple < Expr > conditions , boolean sign , Environment environment ) { } }
for ( Expr e : conditions ) { // Thread environment through from before environment = checkCondition ( e , sign , environment ) ; } return environment ;
public class SubmitterDocumentRepositoryMongoImpl { /** * { @ inheritDoc } */ @ Override public final SubmitterDocument findByFileAndString ( final String filename , final String string ) { } }
final Query searchQuery = new Query ( Criteria . where ( "string" ) . is ( string ) . and ( "filename" ) . is ( filename ) ) ; final SubmitterDocument submitterDocument = mongoTemplate . findOne ( searchQuery , SubmitterDocumentMongo . class ) ; if ( submitterDocument == null ) { return null ; } final Submitter submitter = ( Submitter ) toObjConverter . createGedObject ( null , submitterDocument ) ; submitterDocument . setGedObject ( submitter ) ; return submitterDocument ;
public class InvoiceCalculatorUtils { /** * Item adjustments */ public static boolean isInvoiceItemAdjustmentItem ( final InvoiceItem invoiceItem ) { } }
return InvoiceItemType . ITEM_ADJ . equals ( invoiceItem . getInvoiceItemType ( ) ) || InvoiceItemType . REPAIR_ADJ . equals ( invoiceItem . getInvoiceItemType ( ) ) ;
public class AbstractRedisClient { /** * - - - DISCONNECT - - - */ protected Promise disconnect ( ) { } }
if ( group != null ) { try { group . shutdownGracefully ( 1 , 1 , TimeUnit . SECONDS ) . await ( 1 , TimeUnit . SECONDS ) ; } catch ( InterruptedException ignored ) { } finally { group = null ; } } if ( resources != null ) { try { resources . shutdown ( 1 , 1 , TimeUnit . SECONDS ) . await ( 1 , TimeUnit . SECONDS ) ; } catch ( InterruptedException ignored ) { } finally { resources = null ; } } if ( acceptor != null ) { try { acceptor . shutdownNow ( ) ; } catch ( Exception ignored ) { } finally { acceptor = null ; } } return Promise . resolve ( ) ;
public class Matrix3x2d { /** * / * ( non - Javadoc ) * @ see org . joml . Matrix3x2dc # get ( com . google . gwt . typedarrays . shared . Float64Array ) */ public Float64Array get ( Float64Array buffer ) { } }
buffer . set ( 0 , m00 ) ; buffer . set ( 1 , m01 ) ; buffer . set ( 2 , m10 ) ; buffer . set ( 3 , m11 ) ; buffer . set ( 4 , m20 ) ; buffer . set ( 5 , m21 ) ; return buffer ;
public class AbstractLIBORCovarianceModel { /** * / * ( non - Javadoc ) * @ see net . finmath . montecarlo . interestrate . models . covariance . LIBORCovarianceModel # getFactorLoading ( double , int , net . finmath . stochastic . RandomVariable [ ] ) */ @ Override public RandomVariable [ ] getFactorLoading ( double time , int component , RandomVariable [ ] realizationAtTimeIndex ) { } }
int timeIndex = timeDiscretization . getTimeIndex ( time ) ; if ( timeIndex < 0 ) { timeIndex = - timeIndex - 2 ; } return getFactorLoading ( timeIndex , component , realizationAtTimeIndex ) ;
public class RESTRegistryService { /** * Returns the registry node which wraps a node of type " exo : registry " ( the whole registry tree ) * @ response * { code } * " entryStream " : the output stream corresponding registry node which wraps a node of type " exo : registry " ( the whole registry tree ) * { code } * Example : * { @ code * < registry xlinks : href = " http : / / localhost : 8080 / portal / rest / registry / " > * < GroovyScript2RestLoader xlinks : href = " http : / / localhost : 8080 / portal / rest / registry / exo : services / GroovyScript2RestLoader " / > * < Audit xlinks : href = " http : / / localhost : 8080 / portal / rest / registry / exo : services / Audit " / > * < / registry > * @ LevelAPI Experimental */ @ GET @ Produces ( MediaType . APPLICATION_XML ) public Response getRegistry ( @ Context UriInfo uriInfo ) { } }
SessionProvider sessionProvider = sessionProviderService . getSessionProvider ( null ) ; try { RegistryNode registryEntry = regService . getRegistry ( sessionProvider ) ; if ( registryEntry != null ) { Node registryNode = registryEntry . getNode ( ) ; NodeIterator registryIterator = registryNode . getNodes ( ) ; Document entry = SecurityHelper . doPrivilegedExceptionAction ( new PrivilegedExceptionAction < Document > ( ) { public Document run ( ) throws Exception { return DocumentBuilderFactory . newInstance ( ) . newDocumentBuilder ( ) . newDocument ( ) ; } } ) ; String fullURI = uriInfo . getRequestUri ( ) . toString ( ) ; XlinkHref xlinkHref = new XlinkHref ( fullURI ) ; Element root = entry . createElement ( REGISTRY ) ; xlinkHref . putToElement ( root ) ; while ( registryIterator . hasNext ( ) ) { NodeIterator entryIterator = registryIterator . nextNode ( ) . getNodes ( ) ; while ( entryIterator . hasNext ( ) ) { Node node = entryIterator . nextNode ( ) ; Element xmlNode = entry . createElement ( node . getName ( ) ) ; xlinkHref . putToElement ( xmlNode , node . getPath ( ) . substring ( EXO_REGISTRY . length ( ) ) ) ; root . appendChild ( xmlNode ) ; } } entry . appendChild ( root ) ; return Response . ok ( new DOMSource ( entry ) , "text/xml" ) . build ( ) ; } return Response . status ( Response . Status . NOT_FOUND ) . build ( ) ; } catch ( Exception e ) { LOG . error ( "Get registry failed" , e ) ; throw new WebApplicationException ( e ) ; }
public class DateField { /** * Set up the default screen control for this field ( Default using a DateConverter ) . * @ param itsLocation Location of this component on screen ( ie . , GridBagConstraint ) . * @ param targetScreen Where to place this component ( ie . , Parent screen or GridBagLayout ) . * @ param converter The converter to set the screenfield to . * @ param iDisplayFieldDesc Display the label ? ( optional ) . * @ return Return the component or ScreenField that is created for this field . * For a Date field , use DateConverter . */ public ScreenComponent setupDefaultView ( ScreenLoc itsLocation , ComponentParent targetScreen , Convert converter , int iDisplayFieldDesc , Map < String , Object > properties ) { } }
converter = new DateConverter ( ( Converter ) converter , DBConstants . DATE_FORMAT ) ; return super . setupDefaultView ( itsLocation , targetScreen , converter , iDisplayFieldDesc , properties ) ;
public class ListWidget { /** * Remove a previously added @ linkplain # addOnItemTouchListener ( OnItemTouchListener ) } * registered } touch notification { @ linkplain OnItemTouchListener listener } . * @ param listener * An implementation of { @ link OnItemTouchListener } * @ return { @ code true } if the listener was successfully unregistered , * { @ code false } if the specified listener was not previously * registered with this object . */ public boolean removeOnItemTouchListener ( final OnItemTouchListener listener ) { } }
boolean removed = mItemTouchListeners . remove ( listener ) ; Log . d ( Log . SUBSYSTEM . LAYOUT , TAG , "removeOnItemTouchListener listener %s added = %b" , listener , removed ) ; return removed ;
public class NullResourceLocksHolder { /** * Checks if the node can be unlocked using current tokens . * @ param session current session * @ param path node path * @ param tokens tokens * @ throws LockException { @ link LockException } */ public void checkLock ( Session session , String path , List < String > tokens ) throws LockException { } }
String repoPath = session . getRepository ( ) . hashCode ( ) + "/" + session . getWorkspace ( ) . getName ( ) + "/" + path ; String currentToken = nullResourceLocks . get ( repoPath ) ; if ( currentToken == null ) { return ; } if ( tokens != null ) { for ( String token : tokens ) { if ( token . equals ( currentToken ) ) { return ; } } } throw new LockException ( "Resource already locked " + repoPath ) ;
public class PlanNode { /** * Remove the node ' s value for this supplied property . * @ param propertyId the property identifier * @ return the value that was removed , or null if there was no property on this node */ public Object removeProperty ( Object propertyId ) { } }
return nodeProperties != null ? nodeProperties . remove ( propertyId ) : null ;
public class RestorePointsInner { /** * Creates a restore point for a data warehouse . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . * @ param databaseName The name of the database . * @ param restorePointLabel The restore point label to apply * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudException thrown if the request is rejected by server * @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @ return the RestorePointInner object if successful . */ public RestorePointInner create ( String resourceGroupName , String serverName , String databaseName , String restorePointLabel ) { } }
return createWithServiceResponseAsync ( resourceGroupName , serverName , databaseName , restorePointLabel ) . toBlocking ( ) . last ( ) . body ( ) ;