signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ExamplePickerTree { /** * Add a set of examples to the WTree . * @ param groupName The name of the example group . * @ param entries An array of examples in this group . */ public void addExamples ( final String groupName , final ExampleData [ ] entries ) { } }
data . add ( new ExampleMenuList ( groupName , entries ) ) ;
public class GameLoginSignUtil { /** * 验签 * @ param appId 应用程序id , 来源于华为开发者联盟上参数 * @ param cpId 开发者id , 来源于开发者联盟 * @ param privateKey 私钥 , 来源于开发者联盟 , 非常重要的信息 , 注意保存避免泄露 * @ param publicKey 公钥 , 用来验签服务端返回的结果 * @ param userData 用户的登录结果数据 * @ param callback 验签结果回调 */ private static void doCheck ( String appId ...
// 创建body参数 byte [ ] body = getRequestBody ( appId , cpId , privateKey , userData ) ; // 发送请求 sendRequest ( URL , body , publicKey , callback ) ;
public class WDataTableRenderer { /** * Paints the column headings for the given table . * @ param table the table to paint the headings for . * @ param renderContext the RenderContext to paint to . */ private void paintColumnHeadings ( final WDataTable table , final WebXmlRenderContext renderContext ) { } }
XmlStringBuilder xml = renderContext . getWriter ( ) ; int [ ] columnOrder = table . getColumnOrder ( ) ; TableDataModel model = table . getDataModel ( ) ; final int columnCount = table . getColumnCount ( ) ; xml . appendTagOpen ( "ui:thead" ) ; xml . appendOptionalAttribute ( "hidden" , ! table . isShowColumnHeaders (...
public class LocalSocketUtil { /** * Check whether we can connect to a local Unix socket */ public static boolean canConnectUnixSocket ( File path ) { } }
try ( UnixSocketChannel channel = UnixSocketChannel . open ( ) ) { return channel . connect ( new UnixSocketAddress ( path ) ) ; } catch ( IOException e ) { return false ; }
public class CudaZeroHandler { /** * This method gets called from Allocator , during Allocator / MemoryHandler initialization * @ param configuration * @ param allocator */ @ Override public void init ( @ NonNull Configuration configuration , @ NonNull Allocator allocator ) { } }
this . configuration = configuration ; this . deviceMemoryTracker = new DeviceAllocationsTracker ( this . configuration ) ; this . flowController . init ( allocator ) ;
public class HttpResponseMessageImpl { /** * Set the " ownership " of this message to either a new servicecontext , i . e . * a message is being transfered from an inbound SC to and outbound SC , or * a channel wants to cache this message and would pass in null to this * method . * @ param hsc */ public void se...
// if we have an SC owner , set it ' s flag to false if ( null != getServiceContext ( ) ) { getServiceContext ( ) . setResponseOwner ( false ) ; } // if the owner is a new HSC , then init the flags if ( null != hsc ) { super . init ( hsc ) ; getServiceContext ( ) . setResponseOwner ( true ) ; setIncoming ( ! getService...
public class CommerceShipmentItemUtil { /** * Returns the first commerce shipment item in the ordered set where groupId = & # 63 ; . * @ param groupId the group ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the first matching commerce shipment...
return getPersistence ( ) . fetchByGroupId_First ( groupId , orderByComparator ) ;
public class CLI { /** * Connect to the server using a specified host and port . * @ param protocol The protocol * @ param controllerHost The host name . * @ param controllerPort The port . * @ param username The user name for logging in . * @ param password The password for logging in . */ public void connec...
doConnect ( ( ) -> { return CommandContextFactory . getInstance ( ) . newCommandContext ( new CommandContextConfiguration . Builder ( ) . setController ( constructUri ( protocol , controllerHost , controllerPort ) ) . setUsername ( username ) . setPassword ( password ) . setErrorOnInteract ( false ) . setClientBindAddr...
public class Iteration { /** * Return the current { @ link Iteration } payload variable name . * @ throws IllegalStateException if there is more than one variable in the { @ link Variables } stack , and the payload name cannot be determined . */ public static String getPayloadVariableName ( GraphRewrite event , Evalu...
Variables variables = Variables . instance ( event ) ; Map < String , Iterable < ? extends WindupVertexFrame > > topLayer = variables . peek ( ) ; if ( topLayer . keySet ( ) . size ( ) != 1 ) { throw new IllegalStateException ( "Cannot determine Iteration payload variable name because the top " + "layer of " + Variable...
public class JsonResponse { /** * Switch standard JSON engine to your new - ruled JSON engine . < br > * You can use this when the JSON response of different rule exists . < br > * The specified engine instance should be cached in your application . * @ param noArgLambda The callback for engine of JSON , which is...
assertArgumentNotNull ( "noArgLambda" , noArgLambda ) ; jsonEngineSwitcher = noArgLambda ; return this ;
public class Crawler { /** * Try to fire a given event on the Browser . * @ param eventable the eventable to fire * @ return true iff the event is fired */ private boolean fireEvent ( Eventable eventable ) { } }
Eventable eventToFire = eventable ; if ( eventable . getIdentification ( ) . getHow ( ) . toString ( ) . equals ( "xpath" ) && eventable . getRelatedFrame ( ) . equals ( "" ) ) { eventToFire = resolveByXpath ( eventable , eventToFire ) ; } boolean isFired = false ; try { isFired = browser . fireEventAndWait ( eventToFi...
public class ResourceLoader { /** * Get the contents of a URL as an XML Document * @ param requestingClass the java . lang . Class object of the class that is attempting to load the * resource * @ param resource a String describing the full or partial URL of the resource whose contents to * load * @ param val...
Document document = null ; InputStream inputStream = null ; try { DocumentBuilderFactory factoryToUse = null ; if ( validate ) { factoryToUse = ResourceLoader . validatingDocumentBuilderFactory ; } else { factoryToUse = ResourceLoader . nonValidatingDocumentBuilderFactory ; } inputStream = getResourceAsStream ( request...
public class XsdAsmUtils { /** * Writes a given class to a . class file . * @ param className The class name , needed to name the file . * @ param classWriter The classWriter , which contains all the class information . */ static void writeClassToFile ( String className , ClassWriter classWriter , String apiName ) ...
classWriter . visitEnd ( ) ; byte [ ] constructedClass = classWriter . toByteArray ( ) ; try ( FileOutputStream os = new FileOutputStream ( new File ( getFinalPathPart ( className , apiName ) ) ) ) { os . write ( constructedClass ) ; } catch ( IOException e ) { throw new AsmException ( "Exception while writing generate...
public class MapBasedXPathFunctionResolver { /** * Add a new function . * @ param aName * The qualified name of the function * @ param nArity * The number of parameters of the function * @ param aFunction * The function to be used . May not be < code > null < / code > . * @ return { @ link EChange } */ @ ...
ValueEnforcer . notNull ( aFunction , "Function" ) ; final XPathFunctionKey aFunctionKey = new XPathFunctionKey ( aName , nArity ) ; if ( m_aMap . containsKey ( aFunctionKey ) ) return EChange . UNCHANGED ; m_aMap . put ( aFunctionKey , aFunction ) ; return EChange . CHANGED ;
public class ThriftCLIService { /** * If the proxy user name is provided then check privileges to substitute the user . * @ param realUser * @ param sessionConf * @ param ipAddress * @ return * @ throws HiveSQLException */ private String getProxyUser ( String realUser , Map < String , String > sessionConf , S...
String proxyUser = null ; // Http transport mode . // We set the thread local proxy username , in ThriftHttpServlet . if ( cliService . getHiveConf ( ) . getVar ( ConfVars . HIVE_SERVER2_TRANSPORT_MODE ) . equalsIgnoreCase ( "http" ) ) { proxyUser = SessionManager . getProxyUserName ( ) ; LOG . debug ( "Proxy user from...
public class Preconditions { /** * Ensures that a string reference passed as a parameter to the calling method is not null . * nor empty . * @ param reference a string reference * @ param errorMessage the exception message to use if the check fails ; will be converted to a * string using { @ link String # value...
if ( reference == null ) { throw new NullPointerException ( String . valueOf ( errorMessage ) ) ; } if ( reference . isEmpty ( ) ) { throw new IllegalArgumentException ( String . valueOf ( errorMessage ) ) ; } return reference ;
public class SHA1 { /** * 用SHA1算法生成安全签名 * @ param array 字符串 * @ return 安全签名 * @ throws AesException */ public static String getSHA1 ( String ... array ) throws AesException { } }
StringBuffer sb = new StringBuffer ( ) ; // 字符串排序 Arrays . sort ( array ) ; for ( String item : array ) { sb . append ( item ) ; } return getSHA1 ( sb . toString ( ) ) ;
public class ConnectionDAODefaultImpl { private long doPing ( final Connection connection ) throws DevFailed { } }
checkIfTango ( connection , "ping" ) ; build_connection ( connection ) ; final long t0 = System . currentTimeMillis ( ) ; try { connection . device . ping ( ) ; } catch ( final DevFailed e ) { final String reason = "TangoApi_CANNOT_PING_DEVICE" ; final String desc = "Cannot ping " + connection . devname ; final String ...
public class FTPClient { /** * Changes the default client timeout parameters . * In the beginning of the transfer , the critical moment is the wait * for the initial server reply . If it does not arrive after timeout , * client assumes that the transfer could not start for some reason and * aborts the operation...
if ( maxWait <= 0 || waitDelay <= 0 ) { throw new IllegalArgumentException ( "Parameter is less than 0" ) ; } this . session . maxWait = maxWait ; this . session . waitDelay = waitDelay ;
public class CommerceTierPriceEntryPersistenceImpl { /** * Returns the last commerce tier price entry 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 last matching commerce tier...
CommerceTierPriceEntry commerceTierPriceEntry = fetchByUuid_Last ( uuid , orderByComparator ) ; if ( commerceTierPriceEntry != null ) { return commerceTierPriceEntry ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "uuid=" ) ; msg . append ( uuid ) ; msg . app...
public class ApiOvhIp { /** * Alter this object properties * REST : PUT / ip / { ip } / mitigation / { ipOnMitigation } * @ param body [ required ] New object properties * @ param ip [ required ] * @ param ipOnMitigation [ required ] */ public void ip_mitigation_ipOnMitigation_PUT ( String ip , String ipOnMitig...
String qPath = "/ip/{ip}/mitigation/{ipOnMitigation}" ; StringBuilder sb = path ( qPath , ip , ipOnMitigation ) ; exec ( qPath , "PUT" , sb . toString ( ) , body ) ;
public class CellConstraints { /** * Sets the column , row , width , and height ; uses a height ( row span ) of 1 and the horizontal and * vertical default alignments . < p > * < strong > Examples : < / strong > < pre > * cc . xyw ( 1 , 3 , 7 ) ; * cc . xyw ( 1 , 3 , 2 ) ; * < / pre > * @ param col the new ...
return xywh ( col , row , colSpan , 1 , DEFAULT , DEFAULT ) ;
public class SwimMembershipProtocol { /** * Gossips this node ' s pending updates with a random set of peers . * @ param updates a collection of updated to gossip */ private void gossip ( Collection < ImmutableMember > updates ) { } }
// Get a list of available peers . If peers are available , randomize the peer list and select a subset of // peers with which to gossip updates . List < SwimMember > members = Lists . newArrayList ( randomMembers ) ; if ( ! members . isEmpty ( ) ) { Collections . shuffle ( members ) ; for ( int i = 0 ; i < Math . min ...
public class CmsResourceUtil { /** * Returns the id of the project in which the given resource is locked . < p > * @ return the id of the project in which the given resource is locked */ public CmsUUID getLockedInProjectId ( ) { } }
CmsUUID lockedInProject = null ; if ( getLock ( ) . isNullLock ( ) && ! getResource ( ) . getState ( ) . isUnchanged ( ) ) { // resource is unlocked and modified lockedInProject = getResource ( ) . getProjectLastModified ( ) ; } else if ( ! getResource ( ) . getState ( ) . isUnchanged ( ) ) { // resource is locked and ...
public class ServerImpl { /** * Send the id and the name to the client . * @ param client The client to send to . * @ param id The id to send . * @ param name The name to send . * @ throws IOException In case of error . */ private static void writeIdAndName ( ClientSocket client , int id , String name ) throws ...
// New client id client . getOut ( ) . writeByte ( id ) ; // New client name final byte [ ] data = name . getBytes ( NetworkMessage . CHARSET ) ; client . getOut ( ) . writeByte ( data . length ) ; client . getOut ( ) . write ( data ) ;
public class Retryer { /** * Sets the wait strategy which sleeps for an exponential amount of time after the first failed attempt * @ see Retryer # exponentialWait ( long , long ) * @ param multiplier * @ param maximumTime * @ param maximumUnit * @ return */ public Retryer < R > exponentialWait ( long multipl...
return exponentialWait ( multiplier , checkNotNull ( maximumUnit ) . toMillis ( maximumTime ) ) ;
public class CommerceRegionLocalServiceBaseImpl { /** * Returns a range of all the commerce regions . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in the result set . Th...
return commerceRegionPersistence . findAll ( start , end ) ;
public class Client { /** * Revokes an access token and refresh token pair . * @ throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnection * @ throws OAuthProblemException - if there are errors validating the OneloginOAuthJSONAccessTokenResponse and throwOAuthProblemExcepti...
cleanError ( ) ; if ( accessToken == null ) { throw new OAuthRuntimeException ( "Access token not provided" ) ; } OneloginURLConnectionClient httpClient = new OneloginURLConnectionClient ( ) ; OAuthClientRequest request = OAuthClientRequest . tokenLocation ( settings . getURL ( Constants . TOKEN_REVOKE_URL ) ) . buildB...
public class Config { /** * Determines if the given propery is in the map * @ param property The property to search for * @ return True if the property exists and has a value , not an empty string */ public final boolean hasProperty ( final String property ) { } }
final String val = properties . get ( property ) ; if ( val == null ) return false ; if ( val . isEmpty ( ) ) return false ; return true ;
public class BatchScheduleActionDeleteRequest { /** * A list of schedule actions to delete . * @ param actionNames * A list of schedule actions to delete . */ public void setActionNames ( java . util . Collection < String > actionNames ) { } }
if ( actionNames == null ) { this . actionNames = null ; return ; } this . actionNames = new java . util . ArrayList < String > ( actionNames ) ;
public class InternalSARLLexer { /** * $ ANTLR start " T _ _ 130" */ public final void mT__130 ( ) throws RecognitionException { } }
try { int _type = T__130 ; int _channel = DEFAULT_TOKEN_CHANNEL ; // InternalSARL . g : 116:8 : ( ' while ' ) // InternalSARL . g : 116:10 : ' while ' { match ( "while" ) ; } state . type = _type ; state . channel = _channel ; } finally { }
public class StorableIndex { /** * Returns a StorableIndex instance which is unique or not . */ public StorableIndex < S > unique ( boolean unique ) { } }
if ( unique == mUnique ) { return this ; } return new StorableIndex < S > ( mProperties , mDirections , unique , mClustered , false ) ;
public class ZoneRules { /** * Gets the standard offset for the specified instant in this zone . * This provides access to historic information on how the standard offset * has changed over time . * The standard offset is the offset before any daylight saving time is applied . * This is typically the offset app...
if ( savingsInstantTransitions . length == 0 ) { return standardOffsets [ 0 ] ; } long epochSec = instant . getEpochSecond ( ) ; int index = Arrays . binarySearch ( standardTransitions , epochSec ) ; if ( index < 0 ) { // switch negative insert position to start of matched range index = - index - 2 ; } return standardO...
public class GameContainer { /** * Get the build number of slick * @ return The build number of slick */ public static int getBuildVersion ( ) { } }
try { Properties props = new Properties ( ) ; props . load ( ResourceLoader . getResourceAsStream ( "version" ) ) ; int build = Integer . parseInt ( props . getProperty ( "build" ) ) ; Log . info ( "Slick Build #" + build ) ; return build ; } catch ( Exception e ) { Log . error ( "Unable to determine Slick build number...
public class LangType { /** * Sets the value of the provided property to the provided value . * @ param propName * allowed object is { @ link String } * @ param value * allowed object is { @ link Object } */ public void set ( String propName , Object value ) { } }
if ( propName . equals ( "value" ) ) { setValue ( ( ( String ) value ) ) ; } if ( propName . equals ( "lang" ) ) { setLang ( ( ( String ) value ) ) ; }
public class SourceSnippets { /** * [ START get _ source ] */ static Source getSource ( SourceName sourceName ) { } }
try ( SecurityCenterClient client = SecurityCenterClient . create ( ) ) { // Start setting up a request to get a source . // SourceName sourceName = SourceName . of ( / * organization = * / " 123234324 " , / * source = * / // "423432321 " ) ; GetSourceRequest . Builder request = GetSourceRequest . newBuilder ( ) . setN...
public class VLDockingBeanPostProcessor { /** * { @ inheritDoc } * Replaces those view descriptors not implementing { @ link VLDockingViewDescriptor } . */ @ Override public Object postProcessAfterInitialization ( Object bean , String beanName ) { } }
// throws BeansException { if ( bean instanceof VLDockingViewDescriptor ) { return bean ; } else if ( bean instanceof ViewDescriptor ) { final ViewDescriptor sourceViewDescriptor = ( ViewDescriptor ) bean ; final ViewDescriptor targetViewDescriptor = this . getTemplate ( sourceViewDescriptor ) ; // Copy source state Ob...
public class CmsWorkplaceAppManager { /** * Returns the quick launch apps set for the current user . < p > * @ param cms the cms context * @ return the quick launch app configurations */ protected List < I_CmsWorkplaceAppConfiguration > getUserQuickLauchConfigurations ( CmsObject cms ) { } }
String apps_info = ( String ) cms . getRequestContext ( ) . getCurrentUser ( ) . getAdditionalInfo ( QUICK_LAUCH_APPS_KEY ) ; String [ ] appIds = null ; if ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( apps_info ) ) { try { JSONArray ids = new JSONArray ( apps_info ) ; appIds = new String [ ids . length ( ) ] ; for ( ...
public class OrderUtils { /** * Return the order on the specified { @ code type } , or the specified * default value if none can be found . * < p > Take care of { @ link Order @ Order } and { @ code @ javax . annotation . Priority } . * @ param type the type to handle * @ return the priority value , or the spec...
Order order = AnnotationUtils . findAnnotation ( type , Order . class ) ; if ( order != null ) { return order . value ( ) ; } Integer priorityOrder = getPriority ( type ) ; if ( priorityOrder != null ) { return priorityOrder ; } return defaultOrder ;
public class TableReader { /** * Read the table from an input stream and populate the supplied Table instance . * @ param is input stream from table file * @ param table Table instance */ private void read ( InputStream is , Table table ) throws IOException { } }
byte [ ] buffer = new byte [ m_definition . getPageSize ( ) ] ; while ( true ) { int bytesRead = is . read ( buffer ) ; if ( bytesRead == - 1 ) { break ; } if ( bytesRead != buffer . length ) { throw new IOException ( "Unexpected end of file" ) ; } readPage ( buffer , table ) ; }
public class PropertyUtil { /** * Returns the requested getter method from an object instance . * @ param methodName Name of the getter method . * @ param instance Object instance to search . * @ param valueClass The return value type ( null if don ' t care ) . * @ return The getter method . * @ throws NoSuch...
return findMethod ( methodName , instance , valueClass , false ) ;
public class JsonReader { /** * Returns the { @ link com . google . gson . stream . JsonToken # STRING string } value of the next token , * consuming it . If the next token is a number , this method will return its * string form . * @ throws IllegalStateException if the next token is not a string or if * this r...
int p = peeked ; if ( p == PEEKED_NONE ) { p = doPeek ( ) ; } String result ; if ( p == PEEKED_UNQUOTED ) { result = nextUnquotedValue ( ) ; } else if ( p == PEEKED_SINGLE_QUOTED ) { result = nextQuotedValue ( '\'' ) ; } else if ( p == PEEKED_DOUBLE_QUOTED ) { result = nextQuotedValue ( '"' ) ; } else if ( p == PEEKED_...
public class ArrayUtil { /** * 去除 { @ code null } 或者 " " 元素 * @ param array 数组 * @ return 处理后的数组 * @ since 3.2.2 */ public static < T extends CharSequence > T [ ] removeEmpty ( T [ ] array ) { } }
return filter ( array , new Filter < T > ( ) { @ Override public boolean accept ( T t ) { return false == StrUtil . isEmpty ( t ) ; } } ) ;
public class CreateHITWithHITTypeRequest { /** * If the HITLayoutId is provided , any placeholder values must be filled in with values using the HITLayoutParameter * structure . For more information , see HITLayout . * @ param hITLayoutParameters * If the HITLayoutId is provided , any placeholder values must be f...
if ( hITLayoutParameters == null ) { this . hITLayoutParameters = null ; return ; } this . hITLayoutParameters = new java . util . ArrayList < HITLayoutParameter > ( hITLayoutParameters ) ;
public class OjbTagsHandler { /** * Generates a torque schema for the model . * @ param attributes The attributes of the tag * @ return The property value * @ exception XDocletException If an error occurs * @ doc . tag type = " content " */ public String createTorqueSchema ( Properties attributes ) throws XDocl...
String dbName = ( String ) getDocletContext ( ) . getConfigParam ( CONFIG_PARAM_DATABASENAME ) ; _torqueModel = new TorqueModelDef ( dbName , _model ) ; return "" ;
public class CarrierRefresher { /** * Helper method to fetch a config from a specific node of the cluster . * @ param bucketName the name of the bucket . * @ param hostname the hostname of the node to fetch from . * @ return a raw configuration or an error . */ private Observable < ProposedBucketConfigContext > r...
return Buffers . wrapColdWithAutoRelease ( Observable . defer ( new Func0 < Observable < GetBucketConfigResponse > > ( ) { @ Override public Observable < GetBucketConfigResponse > call ( ) { return cluster ( ) . send ( new GetBucketConfigRequest ( bucketName , hostname ) ) ; } } ) ) . doOnNext ( new Action1 < GetBucket...
public class NetworkConfig { /** * Reconstructs an existing channel */ private Channel reconstructChannel ( HFClient client , String channelName , JsonObject jsonChannel , NetworkConfigAddPeerHandler networkConfigAddPeerHandler , NetworkConfigAddOrdererHandler networkConfigAddOrdererHandler ) throws NetworkConfiguratio...
Channel channel = null ; try { channel = client . newChannel ( channelName ) ; // orderers is an array of orderer name strings JsonArray ordererNames = getJsonValueAsArray ( jsonChannel . get ( "orderers" ) ) ; // out ( " Orderer names : " + ( ordererNames = = null ? " null " : ordererNames . toString ( ) ) ) ; if ( or...
public class BlockdevRef { @ Nonnull public static BlockdevRef definition ( @ Nonnull BlockdevOptions definition ) { } }
BlockdevRef self = new BlockdevRef ( ) ; self . definition = definition ; return self ;
public class DataSet { /** * Output this data set as an angle code XML data file * @ param out The output stream to write to * @ param imageName The name of the image * @ throws IOException Indicates a failure to build the XML */ public void toAngelCodeXML ( PrintStream out , String imageName ) throws IOException...
try { DocumentBuilder builder = DocumentBuilderFactory . newInstance ( ) . newDocumentBuilder ( ) ; Document document = builder . newDocument ( ) ; Element root = document . createElement ( "font" ) ; document . appendChild ( root ) ; Element info = document . createElement ( "info" ) ; info . setAttribute ( "face" , f...
public class Record { /** * Accessor method used to retrieve an Integer object representing the * contents of an individual field . If the field does not exist in the * record , null is returned . * @ param field the index number of the field to be retrieved * @ return the value of the required field */ public ...
ProjectTimeFormat result ; if ( ( field < m_fields . length ) && ( m_fields [ field ] . length ( ) != 0 ) ) { result = ProjectTimeFormat . getInstance ( Integer . parseInt ( m_fields [ field ] ) ) ; } else { result = ProjectTimeFormat . TWELVE_HOUR ; } return ( result ) ;
public class MemberFilterActionGroup { /** * Restores the state of the filter actions from a memento . * Note : This method does not refresh the viewer . * @ param memento the memento from which the state is restored */ public void restoreState ( IMemento memento ) { } }
setMemberFilters ( new int [ ] { FILTER_FIELDS , FILTER_STATIC , FILTER_NONPUBLIC , FILTER_LOCALTYPES } , new boolean [ ] { Boolean . valueOf ( memento . getString ( TAG_HIDEFIELDS ) ) . booleanValue ( ) , Boolean . valueOf ( memento . getString ( TAG_HIDESTATIC ) ) . booleanValue ( ) , Boolean . valueOf ( memento . ge...
public class Utils { /** * Breaks up the string , if wider than " columns " characters . * @ param sthe string to process * @ param columnsthe width in columns * @ returnthe processed string */ public static String [ ] breakUp ( String s , int columns ) { } }
Vector < String > result ; String line ; BreakIterator boundary ; int boundaryStart ; int boundaryEnd ; String word ; String punctuation ; int i ; String [ ] lines ; result = new Vector < String > ( ) ; punctuation = " .,;:!?'\"" ; lines = s . split ( "\n" ) ; for ( i = 0 ; i < lines . length ; i ++ ) { boundary = Brea...
public class MFVec2f { /** * Write out the current value of this field into the external valueDestination array . * @ param valueDestination - where all the SFVec2f object values are returned * in a single - dimentional array */ public void getValue ( float [ ] valueDestination ) { } }
valueDestination = new float [ size ( ) * 2 ] ; for ( int i = 0 ; i < size ( ) ; i ++ ) { SFVec2f sfVec2f = value . get ( i ) ; valueDestination [ i * 3 ] = sfVec2f . x ; valueDestination [ i * 3 + 1 ] = sfVec2f . y ; }
public class AESUtil { /** * Generate key . * @ return the byte [ ] * @ throws GeneralSecurityException the general security exception */ public static byte [ ] generateKey ( ) throws GeneralSecurityException { } }
KeyGenerator keyGenerator = KeyGenerator . getInstance ( KEY_ALGORITHM ) ; // java max 128 keyGenerator . init ( 128 ) ; SecretKey secretKey = keyGenerator . generateKey ( ) ; return secretKey . getEncoded ( ) ;
public class TextLoader { /** * Load a text from the specified file and put it in the provided StringBuffer . * @ param source source file . * @ param buffer buffer to load text into . * @ return the buffer . * @ throws IOException if there is a problem to deal with . */ public StringBuffer append ( File source...
return append ( new FileInputStream ( source ) , buffer ) ;
public class LightWeightLinkedSet { /** * Remove all elements from the set and return them in order . Traverse the * link list , don ' t worry about hashtable - faster version of the parent * method . * @ param retList put elements into the given list */ public void pollAllToList ( List < T > retList ) { } }
while ( head != null ) { retList . add ( head . element ) ; head = head . after ; } this . clear ( ) ;
public class AbstractModuleStarter { /** * Define a new component interface definition . * @ param interfaceClass the interface class implemented * @ param exclusive the exclusive flag * @ param reverse the reverse flag */ protected void define ( final Class < ? extends Component < ? > > interfaceClass , final bo...
preloadClass ( interfaceClass ) ; getFacade ( ) . componentFactory ( ) . define ( RegistrationPointItemBase . create ( ) . interfaceClass ( interfaceClass ) . exclusive ( exclusive ) . reverse ( reverse ) ) ;
public class Base64 { /** * Encodes a raw byte array into a BASE64 < code > char [ ] < / code > representation in accordance with RFC 2045. * @ param sArr The bytes to convert . If < code > null < / code > or length 0 an empty array will be returned . * @ param lineSep Optional " \ r \ n " after 76 characters , unl...
// Check special case int sLen = sArr != null ? sArr . length : 0 ; if ( sLen == 0 ) { return new char [ 0 ] ; } int eLen = ( sLen / 3 ) * 3 ; // # of bytes that can encode evenly into 24 - bit chunks int left = sLen - eLen ; // # of bytes that remain after 24 - bit chunking . Always 0 , 1 or 2 int cCnt = ( ( ( sLen - ...
public class RealVoltDB { /** * ZK . Otherwise , try to do the write / read race to ZK on startup . */ private AbstractTopology getTopology ( StartAction startAction , Map < Integer , HostInfo > hostInfos , JoinCoordinator joinCoordinator ) { } }
AbstractTopology topology = null ; if ( startAction == StartAction . JOIN ) { assert ( joinCoordinator != null ) ; topology = joinCoordinator . getTopology ( ) ; } else if ( startAction . doesRejoin ( ) ) { topology = TopologyZKUtils . readTopologyFromZK ( m_messenger . getZK ( ) ) ; } else { try { return TopologyZKUti...
public class LifecycleHooks { /** * Get the specified field of the supplied object . * @ param target target object * @ param name field name * @ return { @ link Field } object for the requested field * @ throws NoSuchFieldException if a field with the specified name is not found * @ throws SecurityException ...
Throwable thrown = null ; for ( Class < ? > current = target . getClass ( ) ; current != null ; current = current . getSuperclass ( ) ) { try { return current . getDeclaredField ( name ) ; } catch ( NoSuchFieldException e ) { thrown = e ; } catch ( SecurityException e ) { thrown = e ; break ; } } throw UncheckedThrow ....
public class MultiPolygon { /** * Return the total length . */ public double getLength ( ) { } }
double len = 0 ; if ( ! isEmpty ( ) ) { for ( Polygon polygon : polygons ) { len += polygon . getLength ( ) ; } } return len ;
public class CPOptionPersistenceImpl { /** * Returns all the cp options where groupId = & # 63 ; . * @ param groupId the group ID * @ return the matching cp options */ @ Override public List < CPOption > findByGroupId ( long groupId ) { } }
return findByGroupId ( groupId , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ;
public class ImageDescriptorRegistry { /** * Disposes all images managed by this registry . */ public void dispose ( ) { } }
for ( Iterator < Image > iter = fRegistry . values ( ) . iterator ( ) ; iter . hasNext ( ) ; ) { Image image = ( Image ) iter . next ( ) ; image . dispose ( ) ; } fRegistry . clear ( ) ;
public class ConfigUpdateController { /** * 配置项的更新 * @ param configId * @ param value * @ return */ @ RequestMapping ( value = "/item/{configId}" , method = RequestMethod . PUT ) @ ResponseBody public JsonObjectBase updateItem ( @ PathVariable long configId , String value ) { } }
// 业务校验 configValidator . validateUpdateItem ( configId , value ) ; LOG . info ( "start to update config: " + configId ) ; // 更新 , 并写入数据库 String emailNotification = "" ; emailNotification = configMgr . updateItemValue ( configId , value ) ; // 通知ZK configMgr . notifyZookeeper ( configId ) ; return buildSuccess ( emailN...
public class ClassDocImpl { /** * Return methods in class . * This method is overridden by AnnotationTypeDocImpl . * @ param filter include only the included methods if filter = = true * @ return an array of MethodDocImpl for representing the visible * methods in this class . Does not include constructors . */ ...
Names names = tsym . name . table . names ; List < MethodDocImpl > methods = List . nil ( ) ; for ( Symbol sym : tsym . members ( ) . getSymbols ( NON_RECURSIVE ) ) { if ( sym != null && sym . kind == MTH && sym . name != names . init && sym . name != names . clinit ) { MethodSymbol s = ( MethodSymbol ) sym ; if ( ! fi...
public class AmpSkin { /** * * * * * * Methods * * * * * */ protected void handleEvents ( final String EVENT_TYPE ) { } }
super . handleEvents ( EVENT_TYPE ) ; if ( "FINISHED" . equals ( EVENT_TYPE ) ) { if ( gauge . isHighlightSections ( ) ) { redraw ( ) ; } } else if ( "ANGLE" . equals ( EVENT_TYPE ) ) { double currentValue = ( needleRotate . getAngle ( ) + START_ANGLE - 180 ) / angleStep + gauge . getMinValue ( ) ; lcdText . setText ( ...
public class OboFileParser { /** * parse the Synonym String from the Term . * value can be : * < pre > " ca _ bind " RELATED [ uniprot : curation ] < / pre > * @ param value * @ return the synonym text */ private Synonym parseSynonym ( String key , String value ) throws IOException { } }
// logger . info ( " PARSE SYNONYM " + key + " " + value ) ; int startIndex = findUnescaped ( value , '"' , 0 , value . length ( ) ) ; if ( startIndex == - 1 ) throw new IOException ( "Expected \"" + line + " " + linenum ) ; SOPair p = unescape ( value , '"' , startIndex + 1 , value . length ( ) , true ) ; int defIndex...
public class BeatGridFinder { /** * We have obtained a beat grid for a device , so store it and alert any listeners . * @ param update the update which caused us to retrieve this beat grid * @ param beatGrid the beat grid which we retrieved */ private void updateBeatGrid ( TrackMetadataUpdate update , BeatGrid beat...
hotCache . put ( DeckReference . getDeckReference ( update . player , 0 ) , beatGrid ) ; // Main deck if ( update . metadata . getCueList ( ) != null ) { // Update the cache with any hot cues in this track as well for ( CueList . Entry entry : update . metadata . getCueList ( ) . entries ) { if ( entry . hotCueNumber !...
public class ReflectionUtils { /** * Make a copy of the writable object using serialization to a buffer * @ param dst the object to copy from * @ param src the object to copy into , which is destroyed * @ throws IOException */ @ SuppressWarnings ( "unchecked" ) public static < T > T copy ( Configuration conf , T ...
CopyInCopyOutBuffer buffer = cloneBuffers . get ( ) ; buffer . outBuffer . reset ( ) ; SerializationFactory factory = getFactory ( conf ) ; Class < T > cls = ( Class < T > ) src . getClass ( ) ; Serializer < T > serializer = factory . getSerializer ( cls ) ; serializer . open ( buffer . outBuffer ) ; serializer . seria...
public class SessionContext { /** * Makes a copy of the SessionContext . This is used for debugging . * @ return */ public SessionContext copy ( ) { } }
SessionContext copy = new SessionContext ( ) ; copy . brownoutMode = brownoutMode ; copy . cancelled = cancelled ; copy . shouldStopFilterProcessing = shouldStopFilterProcessing ; copy . shouldSendErrorResponse = shouldSendErrorResponse ; copy . errorResponseSent = errorResponseSent ; copy . debugRouting = debugRouting...
public class Parameters { /** * Throws a ParameterException if none of the supplied parameters are defined . */ public void assertAtLeastOneDefined ( final String param1 , final String ... moreParams ) { } }
if ( ! isPresent ( param1 ) ) { for ( final String moreParam : moreParams ) { if ( isPresent ( moreParam ) ) { return ; } } final List < String > paramsForError = Lists . newArrayList ( ) ; paramsForError . add ( param1 ) ; paramsForError . addAll ( Arrays . asList ( moreParams ) ) ; throw new ParameterException ( Stri...
public class CoordinatorAdminUtils { /** * Adds OPT _ U | OPT _ URL option to OptionParser , with multiple arguments . * @ param parser OptionParser to be modified * @ param required Tells if this option is required or optional */ public static void acceptsUrlMultiple ( OptionParser parser ) { } }
parser . acceptsAll ( Arrays . asList ( OPT_U , OPT_URL ) , "coordinator bootstrap urls" ) . withRequiredArg ( ) . describedAs ( "url-list" ) . withValuesSeparatedBy ( ',' ) . ofType ( String . class ) ;
public class AtomTetrahedralLigandPlacer3D { /** * Gets the angleKey attribute of the AtomPlacer3D object . * @ param id1 Description of the Parameter * @ param id2 Description of the Parameter * @ param id3 Description of the Parameter * @ return The angleKey value */ public double getAngleValue ( String id1 ,...
String akey = "" ; if ( pSet . containsKey ( ( "angle" + id1 + ";" + id2 + ";" + id3 ) ) ) { akey = "angle" + id1 + ";" + id2 + ";" + id3 ; } else if ( pSet . containsKey ( ( "angle" + id3 + ";" + id2 + ";" + id1 ) ) ) { akey = "angle" + id3 + ";" + id2 + ";" + id1 ; } else if ( pSet . containsKey ( ( "angle" + id2 + "...
public class AuditActionContextCouchDbRepository { /** * Find audit records for authentication throttling . * @ param remoteAddress remote IP address * @ param username username * @ param failureCode failure code * @ param applicationCode application code * @ param cutoffTime cut off time * @ return records...
val view = createQuery ( "by_throttle_params" ) . startKey ( ComplexKey . of ( remoteAddress , username , failureCode , applicationCode , cutoffTime ) ) . endKey ( ComplexKey . of ( remoteAddress , username , failureCode , applicationCode , "999999" ) ) ; return db . queryView ( view , CouchDbAuditActionContext . class...
public class AWSBudgetsClient { /** * Lists the subscribers that are associated with a notification . * @ param describeSubscribersForNotificationRequest * Request of DescribeSubscribersForNotification * @ return Result of the DescribeSubscribersForNotification operation returned by the service . * @ throws Int...
request = beforeClientExecution ( request ) ; return executeDescribeSubscribersForNotification ( request ) ;
public class PasswordHashCreatorManager { /** * Register a new password hash creator . No other password hash creator with * the same algorithm name may be registered . * @ param aPasswordHashCreator * The password hash creator to be registered . May not be * < code > null < / code > . */ public void registerPa...
ValueEnforcer . notNull ( aPasswordHashCreator , "PasswordHashCreator" ) ; final String sAlgorithmName = aPasswordHashCreator . getAlgorithmName ( ) ; if ( StringHelper . hasNoText ( sAlgorithmName ) ) throw new IllegalArgumentException ( "PasswordHashCreator algorithm '" + aPasswordHashCreator + "' is empty!" ) ; m_aR...
public class LBoolSupplierBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */ @ Nonnull public static LBoolSupplier boolSupplierFrom ( Consumer < LBoolSupplierBuilder > buildingFunction ) { } }
LBoolSupplierBuilder builder = new LBoolSupplierBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ;
public class CoreUserApiKeyAuthProviderClient { /** * Fetches the user API keys associated with the current user . * @ return the user API keys associated with the current user . */ protected List < UserApiKey > fetchApiKeysInternal ( ) { } }
final StitchAuthRequest . Builder reqBuilder = new StitchAuthRequest . Builder ( ) ; reqBuilder . withMethod ( Method . GET ) . withPath ( this . getBaseRoute ( ) ) . withRefreshToken ( ) ; return ( List < UserApiKey > ) getRequestClient ( ) . doAuthenticatedRequest ( reqBuilder . build ( ) , new CollectionDecoder < > ...
public class YamlDataProviderImpl { /** * Gets yaml data for requested indexes . * @ param indexes * the input string represent the indexes to be parse * @ return Object [ ] [ ] Two dimensional object to be used with TestNG DataProvider * @ throws IOException */ @ Override public Object [ ] [ ] getDataByIndex (...
logger . entering ( indexes ) ; int [ ] arrayIndex = DataProviderHelper . parseIndexString ( indexes ) ; Object [ ] [ ] yamlObjRequested = getDataByIndex ( arrayIndex ) ; logger . exiting ( ( Object [ ] ) yamlObjRequested ) ; return yamlObjRequested ;
public class AbstractNotificationBuilder { /** * Sets the notification batching interval , indicating when the notification * should be delivered to the device * @ param delivery batching interval * @ return this */ public A notificationClass ( DeliveryClass delivery ) { } }
this . headers . add ( Pair . of ( "X-NotificationClass" , String . valueOf ( deliveryValueOf ( delivery ) ) ) ) ; return ( A ) this ;
public class InsertAllRequest { /** * Returns a builder for an { @ code InsertAllRequest } object given the destination table . */ public static Builder newBuilder ( String datasetId , String tableId ) { } }
return new Builder ( ) . setTable ( TableId . of ( datasetId , tableId ) ) ;
public class PartitionImpl { /** * If not already created , a new < code > reducer < / code > element with the given value will be created . * Otherwise , the existing < code > reducer < / code > element will be returned . * @ return a new or existing instance of < code > PartitionReducer < Partition < T > > < / co...
Node node = childNode . getOrCreate ( "reducer" ) ; PartitionReducer < Partition < T > > reducer = new PartitionReducerImpl < Partition < T > > ( this , "reducer" , childNode , node ) ; return reducer ;
public class ImageMarshaller { /** * Marshall the given parameter object . */ public void marshall ( Image image , ProtocolMarshaller protocolMarshaller ) { } }
if ( image == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( image . getBytes ( ) , BYTES_BINDING ) ; protocolMarshaller . marshall ( image . getS3Object ( ) , S3OBJECT_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "U...
public class Accordion { /** * Icons to use for headers . * @ param header * @ param headerSelected * @ return instance of the current component */ public Accordion setIcons ( UiIcon header , UiIcon headerSelected ) { } }
setIcons ( new AccordionIcon ( header , headerSelected ) ) ; return this ;
public class FacebookEndpoint { /** * Asynchronously requests the Page accounts associated with the linked account . Requires an opened active { @ link Session } . * @ param callback a { @ link Callback } when the request completes . * @ return true if the request is made ; false if no opened { @ link Session } is ...
boolean isSuccessful = false ; Session session = Session . getActiveSession ( ) ; if ( session != null && session . isOpened ( ) ) { // Construct fields to request . Bundle params = new Bundle ( ) ; params . putString ( ACCOUNTS_LISTING_FEILDS_KEY , ACCOUNTS_LISTING_FIELDS_VALUE ) ; // Construct and execute albums list...
public class UtilWavelet { /** * Adjusts the values inside a wavelet transform to make it easier to view . * @ param transform * @ param numLevels Number of levels in the transform */ public static void adjustForDisplay ( ImageGray transform , int numLevels , double valueRange ) { } }
if ( transform instanceof GrayF32 ) adjustForDisplay ( ( GrayF32 ) transform , numLevels , ( float ) valueRange ) ; else adjustForDisplay ( ( GrayI ) transform , numLevels , ( int ) valueRange ) ;
public class PoolsImpl { /** * Updates the properties of the specified pool . * This only replaces the pool properties specified in the request . For example , if the pool has a start task associated with it , and a request does not specify a start task element , then the pool keeps the existing start task . * @ pa...
return patchWithServiceResponseAsync ( poolId , poolPatchParameter , poolPatchOptions ) . map ( new Func1 < ServiceResponseWithHeaders < Void , PoolPatchHeaders > , Void > ( ) { @ Override public Void call ( ServiceResponseWithHeaders < Void , PoolPatchHeaders > response ) { return response . body ( ) ; } } ) ;
public class MetadataToH2 { /** * - - TABLES - - - - - */ private void createTablesAndPkAndIndexes ( ) { } }
for ( Table t : metadata . getTables ( ) ) { comment ( " == TABLES [ " + t . getName ( ) + " ] =======================" ) ; createTable ( t ) ; createIndexes ( t ) ; if ( t . hasH2IdentityPk ( ) ) { line ( "ALTER TABLE " , t . getName ( ) , " ALTER COLUMN " , t . getPrimaryKey ( ) , " IDENTITY;" ) ; } else if ( t . has...
public class host_interface { /** * Use this operation to reset interface settings . */ public static host_interface reset ( nitro_service client , host_interface resource ) throws Exception { } }
return ( ( host_interface [ ] ) resource . perform_operation ( client , "reset" ) ) [ 0 ] ;
public class PaymentActivity { /** * The name of the function has to be * onPaymentError * Wrap your code in try catch , as shown , to ensure that this method runs correctly */ @ SuppressWarnings ( "unused" ) @ Override public void onPaymentError ( int code , String response ) { } }
try { Toast . makeText ( this , "Payment failed: " + code + " " + response , Toast . LENGTH_SHORT ) . show ( ) ; } catch ( Exception e ) { Log . e ( TAG , "Exception in onPaymentError" , e ) ; }
public class SharedTreeMojoModel { /** * Returns staged predictions of tree algorithms ( prediction probabilities of trees per iteration ) . * The output structure is for tree Tt and class Cc : * Binomial models : [ probability T1 . C1 , probability T2 . C1 , . . . , Tt . C1 ] where Tt . C1 correspond to the the pr...
int contribOffset = nclasses ( ) == 1 ? 0 : 1 ; double [ ] trees_result = new double [ _ntree_groups * _ntrees_per_group ] ; for ( int groupIndex = 0 ; groupIndex < _ntree_groups ; groupIndex ++ ) { double [ ] tmpPreds = new double [ predsLength ] ; scoreTreeRange ( row , 0 , groupIndex + 1 , tmpPreds ) ; unifyPreds ( ...
public class CallbacksDispatcher { /** * Only weak references are stored for weak listeners . They will be removed from the dispatcher * automatically , once the listener objects are GCed . Note that weak listeners cannot be removed * explicitly . */ public synchronized void addWeakListener ( L listener ) { } }
Preconditions . checkNotNull ( listener ) ; _log . info ( "Adding a weak listener " + listener ) ; _autoListeners . put ( listener , null ) ;
public class IndexNode { /** * Called on the most bottom node */ private IndexNode copyWith ( byte [ ] key , int file , int offset , int size , OverwriteHook overwriteHook , RecordChange recordChange ) throws IOException { } }
if ( leafNodes == null ) throw new IllegalArgumentException ( ) ; byte [ ] newPrefix ; byte [ ] [ ] newKeyParts ; LeafNode [ ] newLeafNodes ; if ( leafNodes . length == 0 ) { overwriteHook . setOverwritten ( false , - 1 , - 1 ) ; if ( overwriteHook . check ( - 1 , - 1 ) ) { return new IndexNode ( segment , prefix , key...
public class DescribeEmergencyContactSettingsResult { /** * A list of email addresses that the DRT can use to contact you during a suspected attack . * @ param emergencyContactList * A list of email addresses that the DRT can use to contact you during a suspected attack . */ public void setEmergencyContactList ( ja...
if ( emergencyContactList == null ) { this . emergencyContactList = null ; return ; } this . emergencyContactList = new java . util . ArrayList < EmergencyContact > ( emergencyContactList ) ;
public class OrientModule { /** * Binds registered custom types as guice singletons and register them with multibinder . */ private void configureCustomTypes ( ) { } }
// empty binding is required in any case final Multibinder < OObjectSerializer > typesBinder = Multibinder . newSetBinder ( binder ( ) , OObjectSerializer . class ) ; if ( ! customTypes . isEmpty ( ) ) { for ( Class < ? extends OObjectSerializer > type : customTypes ) { bind ( type ) . in ( Singleton . class ) ; typesB...
public class ParticleEditor { /** * Save a complete particle system XML description */ public void saveSystem ( ) { } }
int resp = chooser . showSaveDialog ( this ) ; if ( resp == JFileChooser . APPROVE_OPTION ) { File file = chooser . getSelectedFile ( ) ; if ( ! file . getName ( ) . endsWith ( ".xml" ) ) { file = new File ( file . getAbsolutePath ( ) + ".xml" ) ; } try { ParticleIO . saveConfiguredSystem ( file , game . getSystem ( ) ...
public class TraceInterceptor { /** * Logs an error to the span . * @ param span The span * @ param e The error */ public static void logError ( Span span , Throwable e ) { } }
HashMap < String , Object > fields = new HashMap < > ( ) ; fields . put ( Fields . ERROR_OBJECT , e ) ; String message = e . getMessage ( ) ; if ( message != null ) { fields . put ( Fields . MESSAGE , message ) ; } span . log ( fields ) ;
public class LogLogisticDistribution { /** * Probability density function . * @ param val Value * @ param shape Shape * @ param location Location * @ param scale Scale * @ return logPDF */ public static double logpdf ( double val , double shape , double location , double scale ) { } }
if ( val < location ) { return Double . NEGATIVE_INFINITY ; } val = ( val - location ) / scale ; final double lval = FastMath . log ( val ) ; if ( lval == Double . POSITIVE_INFINITY ) { return Double . NEGATIVE_INFINITY ; } return FastMath . log ( shape / scale ) + ( shape - 1. ) * lval - 2. * FastMath . log1p ( FastMa...
public class HashUtil { /** * DJB算法 * @ param str 字符串 * @ return hash值 */ public static int djbHash ( String str ) { } }
int hash = 5381 ; for ( int i = 0 ; i < str . length ( ) ; i ++ ) { hash = ( ( hash << 5 ) + hash ) + str . charAt ( i ) ; } return hash & 0x7FFFFFFF ;
public class Pages { /** * Adds a page at the end */ private void grow ( ) { } }
char [ ] [ ] newPages ; if ( lastFilled != pageSize ) { throw new IllegalStateException ( ) ; } lastNo ++ ; if ( lastNo >= pages . length ) { newPages = new char [ lastNo * 5 / 2 ] [ ] ; System . arraycopy ( pages , 0 , newPages , 0 , lastNo ) ; pages = newPages ; } if ( pages [ lastNo ] == null ) { pages [ lastNo ] = ...