signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class PkRSS { /** * Handles the specified { @ link Request } . May throw an { @ link IOException } for
* mishandled URLs or timeouts .
* @ param request Request to execute .
* @ throws IOException */
protected void load ( final Request request ) throws IOException { } } | log ( "load(" + request + ')' ) ; final CallbackHandler handler = request . handler != null ? request . handler : this . handler ; final boolean safe = request . safe != null ? request . safe : this . safe ; Callback callback = request . callback != null ? request . callback . get ( ) : null ; // Don ' t load if URL is... |
public class UrlUtils { /** * Download data from an URL and return the raw bytes .
* @ param sUrl The full URL used to download the content .
* @ param timeout The timeout in milliseconds that is used for both
* connection timeout and read timeout .
* @ param sslFactory The SSLFactory to use for the connection ... | URL url = new URL ( sUrl ) ; LOGGER . fine ( "Using the following URL for retrieving the data: " + url . toString ( ) ) ; HttpURLConnection conn = ( HttpURLConnection ) url . openConnection ( ) ; // set specified timeout if non - zero
if ( timeout != 0 ) { conn . setConnectTimeout ( timeout ) ; conn . setReadTimeout ( ... |
public class OtpInputStream { /** * Read an integer from the stream .
* @ return the integer value .
* @ exception OtpErlangDecodeException
* if the next term in the stream cannot be represented as
* an integer . */
public int read_int ( ) throws OtpErlangDecodeException { } } | final long l = this . read_long ( false ) ; final int i = ( int ) l ; if ( l != i ) { throw new OtpErlangDecodeException ( "Value does not fit in int: " + l ) ; } return i ; |
public class HiCS { /** * Calculates the actual contrast of a given subspace .
* @ param relation Relation to process
* @ param subspace Subspace
* @ param subspaceIndex Subspace indexes */
private void calculateContrast ( Relation < ? extends NumberVector > relation , HiCSSubspace subspace , ArrayList < ArrayDBI... | final int card = subspace . cardinality ( ) ; final double alpha1 = FastMath . pow ( alpha , ( 1.0 / card ) ) ; final int windowsize = ( int ) ( relation . size ( ) * alpha1 ) ; final FiniteProgress prog = LOG . isDebugging ( ) ? new FiniteProgress ( "Monte-Carlo iterations" , m , LOG ) : null ; int retries = 0 ; doubl... |
public class ZoneExtension { /** * Add server event handlers */
protected void addServerEventHandlers ( ) { } } | Map < Object , Class < ? > > handlers = getServerEventHandlers ( ) ; Set < Entry < Object , Class < ? > > > entries = handlers . entrySet ( ) ; for ( Entry < Object , Class < ? > > entry : entries ) { SFSEventType type = SFSEventType . valueOf ( entry . getKey ( ) . toString ( ) ) ; ServerEventHandler handler = createS... |
public class AbstractEXIBodyEncoder { /** * Event - Codes */
protected void encode1stLevelEventCode ( int pos ) throws IOException { } } | int codeLength = fidelityOptions . get1stLevelEventCodeLength ( getCurrentGrammar ( ) ) ; if ( codeLength > 0 ) { channel . encodeNBitUnsignedInteger ( pos , codeLength ) ; } |
public class LogRepositoryListener { /** * ( non - Javadoc )
* @ see org . eclipse . aether . util . listener . AbstractRepositoryListener # artifactDeployed
* ( org . eclipse . aether . RepositoryEvent ) */
@ Override public void artifactDeployed ( RepositoryEvent event ) { } } | log . fine ( "Deployed " + event . getArtifact ( ) + " to " + event . getRepository ( ) ) ; |
public class TileSetColorImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setCVAL2 ( Integer newCVAL2 ) { } } | Integer oldCVAL2 = cval2 ; cval2 = newCVAL2 ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . TILE_SET_COLOR__CVAL2 , oldCVAL2 , cval2 ) ) ; |
public class ScribbleShrinkwrapHelper { /** * Creates an enterprise archive for the module in whose working directory the method is invoked , including all
* compile - scoped jar archives .
* @ return an enterprise containgin all dependency of the current module */
public static EnterpriseArchive createEARDeploymen... | final EnterpriseArchive ear = ShrinkWrap . create ( EnterpriseArchive . class , "scribble-test.ear" ) ; // use local maven repository mirror only
final PomEquippedResolveStage pom = Maven . configureResolver ( ) . workOffline ( ) . loadPomFromFile ( "pom.xml" ) ; final File [ ] files = pom . importDependencies ( ScopeT... |
public class GreenPepperXmlRpcServer { /** * { @ inheritDoc } */
public String removeSpecification ( Vector < Object > specificationParams ) { } } | try { Specification specification = XmlRpcDataMarshaller . toSpecification ( specificationParams ) ; service . removeSpecification ( specification ) ; log . debug ( "Removed specification: " + specification . getName ( ) ) ; return SUCCESS ; } catch ( Exception e ) { return errorAsString ( e , SPECIFICATION_REMOVE_FAIL... |
public class StringUtility { /** * Counts how many times a word appears in a line . Case insensitive matching .
* @ deprecated Corrected spelling */
@ Deprecated public static int countOccurances ( byte [ ] buff , int len , String word ) { } } | return countOccurrences ( buff , len , word ) ; |
public class DateIntervalFormat { /** * Set the TimeZone for the calendar used by this DateIntervalFormat object .
* @ param zone The new TimeZone , will be cloned for use by this DateIntervalFormat . */
public void setTimeZone ( TimeZone zone ) { } } | // zone is cloned once for all three usages below :
TimeZone zoneToSet = ( TimeZone ) zone . clone ( ) ; if ( fDateFormat != null ) { fDateFormat . setTimeZone ( zoneToSet ) ; } // fDateFormat has the master calendar for the DateIntervalFormat ;
// fFromCalendar and fToCalendar are internal work clones of that calendar... |
public class ApiOvhMe { /** * Get this object properties
* REST : GET / me / order / { orderId } / debt
* @ param orderId [ required ] */
public OvhDebt order_orderId_debt_GET ( Long orderId ) throws IOException { } } | String qPath = "/me/order/{orderId}/debt" ; StringBuilder sb = path ( qPath , orderId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhDebt . class ) ; |
public class LevenbergMarquardt { /** * A simple test */
public static void main ( String [ ] args ) throws SolverException , CloneNotSupportedException { } } | LevenbergMarquardt optimizer = new LevenbergMarquardt ( ) { private static final long serialVersionUID = - 282626938650139518L ; // Override your objective function here
@ Override public void setValues ( double [ ] parameters , double [ ] values ) { values [ 0 ] = parameters [ 0 ] * 0.0 + parameters [ 1 ] ; values [ 1... |
public class IfcStructuralLoadGroupImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ SuppressWarnings ( "unchecked" ) public EList < IfcStructuralResultGroup > getSourceOfResultGroup ( ) { } } | return ( EList < IfcStructuralResultGroup > ) eGet ( Ifc2x3tc1Package . Literals . IFC_STRUCTURAL_LOAD_GROUP__SOURCE_OF_RESULT_GROUP , true ) ; |
public class FastByteArrayOutputStream { /** * Writes < code > len < / code > bytes from the specified byte array
* starting at offset < code > off < / code > to this stream .
* @ param bytes byte [ ] the data to write to this stream .
* @ param offset the start offset in the data .
* @ param len the number of ... | if ( bytes == null ) { return ; } if ( ( offset < 0 ) || ( offset > bytes . length ) || ( len < 0 ) || ( ( offset + len ) - bytes . length > 0 ) ) { throw new IndexOutOfBoundsException ( "offset=" + offset + ", len=" + len + ", bytes.length=" + bytes . length ) ; } ensureCapacity ( size + len ) ; System . arraycopy ( b... |
public class ORecordLazySet { /** * Adds the item in the underlying List preserving the order of the collection . */
public boolean add ( final OIdentifiable e ) { } } | if ( e . getIdentity ( ) . isNew ( ) ) { final ORecord < ? > record = e . getRecord ( ) ; // ADD IN TEMP LIST
if ( newItems == null ) newItems = new IdentityHashMap < ORecord < ? > , Object > ( ) ; else if ( newItems . containsKey ( record ) ) return false ; newItems . put ( record , NEWMAP_VALUE ) ; setDirty ( ) ; ret... |
public class ThreadPoolStage { /** * Closes resources . */
@ Override public void close ( ) { } } | if ( closed . compareAndSet ( false , true ) && numThreads > 0 ) { LOG . log ( Level . FINEST , "Closing ThreadPoolStage {0}: begin" , this . name ) ; executor . shutdown ( ) ; boolean isTerminated = false ; try { isTerminated = executor . awaitTermination ( SHUTDOWN_TIMEOUT , TimeUnit . MILLISECONDS ) ; } catch ( fina... |
public class PipeDataElement { public short [ ] extractUCharArray ( ) { } } | final byte [ ] argOut = element . value . uchar_att_value ( ) ; final short [ ] val = new short [ argOut . length ] ; final short mask = 0xFF ; for ( int i = 0 ; i < argOut . length ; i ++ ) { val [ i ] = ( short ) ( mask & argOut [ i ] ) ; } return val ; |
public class HudsonPrivateSecurityRealm { /** * All users who can login to the system . */
public List < User > getAllUsers ( ) { } } | List < User > r = new ArrayList < User > ( ) ; for ( User u : User . getAll ( ) ) { if ( u . getProperty ( Details . class ) != null ) r . add ( u ) ; } Collections . sort ( r ) ; return r ; |
public class Reflections { /** * 通过反射 , 获得 Class 定义中声明的父类的泛型参数的类型 。
* 如无法找到 , 返回 Object . class 。
* < pre >
* public UserDao extends HibernateDao & lt ; User , Long & gt ;
* < / pre >
* @ param clazz
* clazz The class to introspect
* @ param index
* the Index of the generic ddeclaration , start from 0. ... | Type genType = clazz . getGenericSuperclass ( ) ; if ( ! ( genType instanceof ParameterizedType ) ) { LOG . warn ( "{}'s superclass not ParameterizedType" , clazz . getSimpleName ( ) ) ; return Object . class ; } Type [ ] params = ( ( ParameterizedType ) genType ) . getActualTypeArguments ( ) ; if ( index >= params . l... |
public class UserPasswordHandler { /** * Called when a change is the record status is about to happen / has happened .
* @ param field If this file change is due to a field , this is the field .
* @ param iChangeType The type of change that occurred .
* @ param bDisplayOption If true , display any changes .
* @... | if ( ( iChangeType == DBConstants . ADD_TYPE ) || ( iChangeType == DBConstants . UPDATE_TYPE ) ) { Record recUserInfo = this . getOwner ( ) ; RecordOwner recordOwner = recUserInfo . getRecordOwner ( ) ; Record recUserScreenRecord = ( Record ) recordOwner . getScreenRecord ( ) ; Task task = recordOwner . getTask ( ) ; i... |
public class SuiteRunner { /** * { @ inheritDoc } */
public void run ( String source , String destination ) { } } | List < String > names = listDocumentsAt ( source ) ; if ( names . isEmpty ( ) ) { monitor . testRunning ( source ) ; monitor . testDone ( 0 , 0 , 0 , 0 ) ; return ; } for ( String name : names ) { runner . run ( name , flatten ( name ) ) ; } |
public class OntopRepositoryConfig { /** * Checks that the fields are not missing , and that files exist and are accessible . */
private void validateFields ( ) throws RepositoryConfigException { } } | try { /* * Ontology file */
if ( owlFile . filter ( f -> ! f . exists ( ) ) . isPresent ( ) ) { throw new RepositoryConfigException ( String . format ( "The OWL file %s does not exist!" , owlFile . get ( ) . getAbsolutePath ( ) ) ) ; } if ( owlFile . filter ( f -> ! f . canRead ( ) ) . isPresent ( ) ) { throw new Repos... |
public class UndirectedMultigraph { /** * { @ inheritDoc } */
public IntSet getNeighbors ( int vertex ) { } } | SparseTypedEdgeSet < T > edges = vertexToEdges . get ( vertex ) ; return ( edges == null ) ? PrimitiveCollections . emptyIntSet ( ) : PrimitiveCollections . unmodifiableSet ( edges . connected ( ) ) ; |
public class CmsXmlPageConverter { /** * Converts the contents of a page into an xml page . < p >
* @ param cms the cms object
* @ param content the content used with xml templates
* @ param locale the locale of the body element ( s )
* @ param encoding the encoding to the xml page
* @ return the xml page con... | CmsXmlPage xmlPage = null ; Document page = CmsXmlUtils . unmarshalHelper ( content , null ) ; Element xmltemplate = page . getRootElement ( ) ; if ( ( xmltemplate == null ) || ! "XMLTEMPLATE" . equals ( xmltemplate . getName ( ) ) ) { throw new CmsImportExportException ( Messages . get ( ) . container ( Messages . ERR... |
public class ConfigOptionParser { /** * Compares the argument with the { @ link CommandLineOption } flags and inserts an object into the parsedOptions map
* Terminates with a sane help message if a parse is unsuccessful
* @ param arg the current word from the command line argument list
* @ param co the config opt... | if ( arg . startsWith ( co . getCommandLineOption ( ) . getLongFlag ( ) ) || ( co . getCommandLineOption ( ) . hasShortFlag ( ) && arg . startsWith ( co . getCommandLineOption ( ) . getShortFlag ( ) ) ) ) { if ( co . getCommandLineOption ( ) . hasArgument ( ) ) { String [ ] formatArgs = arg . split ( co . getCommandLin... |
public class WHandlerAndJsp { /** * < p > Generic request handler . < / p >
* @ param pReq Http Servlet Request
* @ param pResp Http Servlet Response
* @ throws ServletException ServletException
* @ throws IOException IOException */
public final void doWork ( final HttpServletRequest pReq , final HttpServletRes... | pReq . setCharacterEncoding ( "UTF-8" ) ; pResp . setCharacterEncoding ( "UTF-8" ) ; try { HashMap < String , Object > reqVars = new HashMap < String , Object > ( ) ; HttpRequestData requestData = new HttpRequestData ( pReq , pResp ) ; requestData . setAttribute ( "reqVars" , reqVars ) ; IHandlerRequest hndlI18nRequest... |
public class CxxLanguage { /** * Get language specific metric
* @ throws IllegalStateException if metric was not registered */
public < G extends Serializable > Metric < G > getMetric ( CxxMetricsFactory . Key metricKey ) { } } | Metric < G > metric = ( Metric < G > ) this . langSpecificMetrics . get ( metricKey ) ; if ( metric == null ) { throw new IllegalStateException ( "Requested metric " + metricKey + " couldn't be found" ) ; } return metric ; |
public class GroovyShell { /** * Parses the given script and returns it ready to be run . When running in a secure environment
* ( - Djava . security . manager ) codeSource . getCodeSource ( ) determines what policy grants should be
* given to the script .
* @ param codeSource
* @ return ready to run script */
... | return InvokerHelper . createScript ( parseClass ( codeSource ) , context ) ; |
public class Closure { /** * Support for Closure " right " currying .
* Parameters are supplied on the right rather than left as per the normal curry ( ) method .
* Typical usage :
* < pre class = " groovyTestCase " >
* def divide = { a , b { @ code - > } a / b }
* def halver = divide . rcurry ( 2)
* assert... | return new CurriedClosure < V > ( - arguments . length , this , arguments ) ; |
public class ApplicationDecorator { /** * < p > start . < / p >
* @ throws java . lang . Exception if any . */
@ SuppressWarnings ( { } } | "rawtypes" , "unchecked" } ) public void start ( ) throws Exception { factory = new DefaultWebApplicationFactory ( bundleContext , applicationClass , applicationName , mountPoint , contextParams ) ; factory . register ( ) ; LOGGER . info ( "Successfully registered application factory" ) ; |
public class OneShotSQLGeneratorEngine { /** * Generates the full SQL query .
* An important part of this program is { @ link # generateQueryFromRules }
* that will create a view for every ans predicate in the input Datalog program .
* @ param signature is the list of main columns in the ResultSet
* @ param rul... | final TypeExtractor . TypeResults typeResults ; try { typeResults = typeExtractor . extractTypes ( ruleIndex , predicatesInBottomUp , metadata ) ; /* * Currently , incompatible terms are treated as a reformulation error */
} catch ( IncompatibleTermException e ) { throw new OntopTypingException ( e . getMessage ( ) ) ;... |
public class Person { /** * The depending roles for the user are set for the given JAAS system . All
* roles are added to the loaded roles in the cache of this person .
* @ param _ jaasSystem JAAS system for which the roles are set
* @ param _ roles set of roles to set for the JAAS system
* @ see # assignRoleIn... | if ( _jaasSystem == null ) { throw new EFapsException ( getClass ( ) , "setRoles.nojaasSystem" , getName ( ) ) ; } if ( _roles == null ) { throw new EFapsException ( getClass ( ) , "setRoles.noRoles" , getName ( ) ) ; } for ( final Role role : _roles ) { add ( role ) ; } // current roles
final Set < Role > rolesInDb = ... |
public class HttpUtil { /** * Converts an { @ link InputStream } to a byte array
* @ param in input stream to convert
* @ return byte array */
public static byte [ ] getBytes ( InputStream in ) { } } | ByteArrayOutputStream os = new ByteArrayOutputStream ( ) ; WritableByteChannel wbc = Channels . newChannel ( os ) ; ReadableByteChannel rbc = Channels . newChannel ( in ) ; ByteBuffer byteBuffer = ByteBuffer . allocate ( 1024 ) ; try { while ( rbc . read ( byteBuffer ) != - 1 ) { byteBuffer . flip ( ) ; wbc . write ( b... |
public class AlignmentPredictionModel { /** * Trains on full corpus */
public boolean trainOnAll ( ) { } } | List < Map < String , String > > trueLabels = loadLabels ( _trueLabelsFile ) ; List < String > corpus = loadTrainingCorpus ( _trainingCorpusFile ) ; List < List < Acronym > > trainingExtractedCandidates = new ArrayList < List < Acronym > > ( ) ; List < Map < String , String > > trueLabelsForTraining = new ArrayList < M... |
public class AbstractIoBuffer { /** * { @ inheritDoc } */
@ Override public final IoBuffer capacity ( int newCapacity ) { } } | if ( ! recapacityAllowed ) { throw new IllegalStateException ( "Derived buffers and their parent can't be expanded." ) ; } // Allocate a new buffer and transfer all settings to it .
if ( newCapacity > capacity ( ) ) { // Expand :
// / / Save the state .
int pos = position ( ) ; int limit = limit ( ) ; ByteOrder bo = or... |
public class Cluster { /** * Set a gain when the cluster sectioned . */
void set_sectioned_gain ( ) { } } | double gain = 0.0f ; if ( sectioned_gain_ == 0 && sectioned_clusters_ . size ( ) > 1 ) { for ( Cluster < K > cluster : sectioned_clusters_ ) { gain += cluster . composite_vector ( ) . norm ( ) ; } gain -= composite_ . norm ( ) ; } sectioned_gain_ = gain ; |
public class DisassociatePhoneNumbersFromVoiceConnectorResult { /** * If the action fails for one or more of the phone numbers in the request , a list of the phone numbers is returned ,
* along with error codes and error messages .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ... | if ( this . phoneNumberErrors == null ) { setPhoneNumberErrors ( new java . util . ArrayList < PhoneNumberError > ( phoneNumberErrors . length ) ) ; } for ( PhoneNumberError ele : phoneNumberErrors ) { this . phoneNumberErrors . add ( ele ) ; } return this ; |
public class LockdownManager { /** * Enable lockdown if it ' s not already enabled , using the recommended time
* from the provided { @ link ConnectionException } , if any .
* @ param connectionException ConnectionException to check for a recommended
* lockdown time , may be null
* @ return whether or not this ... | // If we are already in a lockdown state , don ' t change anything
if ( isLockedDown ( ) ) { return false ; } if ( connectionException != null && connectionException . getRecommendedLockdownTime ( ) != null ) { lockdownTime = connectionException . getRecommendedLockdownTime ( ) ; } else if ( lockdownTime != 0 ) { lockd... |
public class SequenceLabelerME { /** * Gets the name type from the outcome
* @ param outcome
* the outcome
* @ return the name type , or null if not set */
static final String extractNameType ( final String outcome ) { } } | final Matcher matcher = typedOutcomePattern . matcher ( outcome ) ; if ( matcher . matches ( ) ) { final String nameType = matcher . group ( 1 ) ; return nameType ; } return null ; |
public class StringUtils { /** * Writes a String to the given output .
* The written string can be read with { @ link # readString ( DataInputView ) } .
* @ param str The string to write
* @ param out The output to write to
* @ throws IOException Thrown , if the writing or the serialization fails . */
public st... | checkNotNull ( str ) ; StringValue . writeString ( str , out ) ; |
public class Configuration { /** * this hoop is needed so that we can type - check the " T " through the stream manipulations */
private < T extends Property > Map < String , String > getOverriddenImplementationConfiguration ( Collection < T > overridableProperties ) { } } | Map < String , String > ret = new HashMap < > ( ) ; overridableProperties . forEach ( p -> { String val = getProperty ( p , null ) ; if ( val != null ) { ret . put ( p . getPropertyName ( ) , val ) ; } } ) ; implementationConfiguration . forEach ( ret :: putIfAbsent ) ; return ret ; |
public class FeatureUtilities { /** * Calculate the avg of a value in a list of { @ link SimpleFeature } s .
* < p > Empty records are ignored .
* @ param features the features .
* @ param field the field to consider .
* @ return the avg . */
public static double avg ( List < SimpleFeature > features , String f... | double sum = 0 ; int count = 0 ; for ( SimpleFeature feature : features ) { Object attribute = feature . getAttribute ( field ) ; if ( attribute instanceof Number ) { sum = sum + ( ( Number ) attribute ) . doubleValue ( ) ; count ++ ; } } double avg = sum / count ; return avg ; |
public class PermissionEvaluator { /** * Grants access by permission . If the effective account has a role that resolves
* to the specified permission ( accoording to mappings of restcomm . xml ) access is granted .
* Administrator is granted access regardless of permissions .
* @ param permission - e . g . ' Res... | // checkAuthenticatedAccount ( ) ; / / ok there is a valid authenticated account
if ( checkPermission ( permission , userIdentityContext . getEffectiveAccountRoles ( ) ) != AuthOutcome . OK ) throw new InsufficientPermission ( ) ; |
public class AmazonEKSClient { /** * Lists the Amazon EKS clusters in your AWS account in the specified Region .
* @ param listClustersRequest
* @ return Result of the ListClusters operation returned by the service .
* @ throws InvalidParameterException
* The specified parameter is invalid . Review the availabl... | request = beforeClientExecution ( request ) ; return executeListClusters ( request ) ; |
public class DatabaseAccountsInner { /** * Lists the read - only access keys for the specified Azure Cosmos DB database account .
* @ param resourceGroupName Name of an Azure resource group .
* @ param accountName Cosmos DB database account name .
* @ throws IllegalArgumentException thrown if parameters fail the ... | return listReadOnlyKeysWithServiceResponseAsync ( resourceGroupName , accountName ) . map ( new Func1 < ServiceResponse < DatabaseAccountListReadOnlyKeysResultInner > , DatabaseAccountListReadOnlyKeysResultInner > ( ) { @ Override public DatabaseAccountListReadOnlyKeysResultInner call ( ServiceResponse < DatabaseAccoun... |
public class ProtobufIDLProxy { /** * Check class .
* @ param packageName the package name
* @ param type the type
* @ param mappedUniName the mapped uni name
* @ param isUniName the is uni name
* @ return the class */
private static Class checkClass ( String packageName , TypeElement type , Map < String , St... | String simpleName = getProxyClassName ( type . name ( ) , mappedUniName , isUniName ) ; String className = packageName + PACKAGE_SPLIT_CHAR + simpleName ; Class < ? > c = null ; try { c = Class . forName ( className ) ; } catch ( ClassNotFoundException e1 ) { // if class not found so should generate a new java source c... |
public class SpringExceptionHandler { /** * Vendor specific translation . Reads returned errorcode / sqlstate and converts it into Spring SQL exception
* based on existing lists .
* @ param reason a description of the exception
* @ param SQLState an XOPEN or SQL : 2003 code identifying the exception
* @ param v... | MjdbcSQLException result = null ; String sqlState = getSqlState ( cause ) ; String errorCode = getErrorCode ( cause ) ; if ( dbName . startsWith ( "DB2" ) == true ) { // using error code to translate vendor specific exception into Spring SQL exception
if ( SpringExceptionHandlerConstants . DB2_ERROR_CODE_BAD_SQL_GRAMMA... |
public class EnvelopesApi { /** * Returns document page image ( s ) based on input .
* @ param accountId The external account number ( int ) or account ID Guid . ( required )
* @ param envelopeId The envelopeId Guid of the envelope being accessed . ( required )
* @ param documentId The ID of the document being ac... | return getPages ( accountId , envelopeId , documentId , null ) ; |
public class ExcelUtils { /** * 无模板 、 基于注解 、 多sheet数据
* @ param sheets 待导出sheet数据
* @ param os 生成的Excel输出文件流
* @ throws Excel4JException 异常
* @ throws IOException 异常 */
public void noTemplateSheet2Excel ( List < NoTemplateSheetWrapper > sheets , OutputStream os ) throws Excel4JException , IOException { } } | try ( Workbook workbook = exportExcelNoTemplateHandler ( sheets , true ) ) { workbook . write ( os ) ; } |
public class FctBnPublicTradeProcessors { /** * < p > Get bean in lazy mode ( if bean is null then initialize it ) . < / p >
* @ param pAddParam additional param
* @ param pBeanName - bean name
* @ return requested bean
* @ throws Exception - an exception */
@ Override public final IProcessor lazyGet ( // NOPMD... | IProcessor proc = this . processorsMap . get ( pBeanName ) ; if ( proc == null ) { // locking :
synchronized ( this . processorsMap ) { // make sure again whether it ' s null after locking :
proc = this . processorsMap . get ( pBeanName ) ; if ( proc == null ) { if ( pBeanName . equals ( PrcDelItemFromCart . class . ge... |
public class SeekableStreamIndexTaskRunner { /** * Authorizes action to be performed on this task ' s datasource
* @ return authorization result */
private Access authorizationCheck ( final HttpServletRequest req , Action action ) { } } | return IndexTaskUtils . datasourceAuthorizationCheck ( req , action , task . getDataSource ( ) , authorizerMapper ) ; |
public class FactoryMultiViewRobust { /** * Robust solution to PnP problem using { @ link LeastMedianOfSquares LMedS } . Input observations are
* in normalized image coordinates .
* < ul >
* < li > Input observations are in normalized image coordinates NOT pixels < / li >
* < li > Error units are pixels squared... | if ( configPnP == null ) configPnP = new ConfigPnP ( ) ; configPnP . checkValidity ( ) ; configLMedS . checkValidity ( ) ; Estimate1ofPnP estimatorPnP = FactoryMultiView . pnp_1 ( configPnP . which , configPnP . epnpIterations , configPnP . numResolve ) ; DistanceFromModelMultiView < Se3_F64 , Point2D3D > distance = ne... |
public class AbstractOpenPgpStore { /** * OpenPgpTrustStore */
@ Override public Trust getTrust ( BareJid owner , OpenPgpV4Fingerprint fingerprint ) throws IOException { } } | return trustStore . getTrust ( owner , fingerprint ) ; |
public class Destination { /** * The To : field ( s ) of the message .
* @ param toAddresses
* The To : field ( s ) of the message . */
public void setToAddresses ( java . util . Collection < String > toAddresses ) { } } | if ( toAddresses == null ) { this . toAddresses = null ; return ; } this . toAddresses = new com . amazonaws . internal . SdkInternalList < String > ( toAddresses ) ; |
public class HtmlEscape { /** * Perform an HTML5 level 2 ( result is ASCII ) < strong > escape < / strong > operation on a < tt > char [ ] < / tt > input .
* < em > Level 2 < / em > means this method will escape :
* < ul >
* < li > The five markup - significant characters : < tt > & lt ; < / tt > , < tt > & gt ; ... | escapeHtml ( text , offset , len , writer , HtmlEscapeType . HTML5_NAMED_REFERENCES_DEFAULT_TO_DECIMAL , HtmlEscapeLevel . LEVEL_2_ALL_NON_ASCII_PLUS_MARKUP_SIGNIFICANT ) ; |
public class CmsColor { /** * Calculates the largest value between the three inputs . < p >
* @ param first value
* @ param second value
* @ param third value
* @ return the largest value between the three inputs */
private float MAX ( float first , float second , float third ) { } } | float max = Integer . MIN_VALUE ; if ( first > max ) { max = first ; } if ( second > max ) { max = second ; } if ( third > max ) { max = third ; } return max ; |
public class AbstractHealthAggregator { /** * Return the map of ' aggregate ' details that should be used from the specified
* healths .
* @ param healths the health instances to aggregate
* @ return a map of details
* @ since 1.3.1 */
protected Map < String , Object > aggregateDetails ( Map < String , Health >... | return new LinkedHashMap < > ( healths ) ; |
public class ConstraintViolationException_CustomFieldSerializer { /** * instantiate constraint violation exception .
* @ param streamReader serialization stream reader to read data from
* @ return ConstraintViolationException
* @ throws SerializationException if deserialization fails */
public static ConstraintVi... | final String message = streamReader . readString ( ) ; @ SuppressWarnings ( "unchecked" ) final Set < ConstraintViolation < ? > > set = ( Set < ConstraintViolation < ? > > ) streamReader . readObject ( ) ; return new ConstraintViolationException ( message , set ) ; |
public class Residue0 { /** * re - using partword */
synchronized static int _01inverse ( Block vb , Object vl , float [ ] [ ] in , int ch , int decodepart ) { } } | int i , j , k , l , s ; LookResidue0 look = ( LookResidue0 ) vl ; InfoResidue0 info = look . info ; // move all this setup out later
int samples_per_partition = info . grouping ; int partitions_per_word = look . phrasebook . dim ; int n = info . end - info . begin ; int partvals = n / samples_per_partition ; int partwo... |
public class ComputerVisionImpl { /** * This operation generates a description of an image in human readable language with complete sentences . The description is based on a collection of content tags , which are also returned by the operation . More than one description can be generated for each image . Descriptions a... | return describeImageWithServiceResponseAsync ( url , describeImageOptionalParameter ) . map ( new Func1 < ServiceResponse < ImageDescription > , ImageDescription > ( ) { @ Override public ImageDescription call ( ServiceResponse < ImageDescription > response ) { return response . body ( ) ; } } ) ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link VendorCredit } { @ code > } } */
@ XmlElementDecl ( namespace = "http://schema.intuit.com/finance/v3" , name = "VendorCredit" , substitutionHeadNamespace = "http://schema.intuit.com/finance/v3" , substitutionHeadName =... | return new JAXBElement < VendorCredit > ( _VendorCredit_QNAME , VendorCredit . class , null , value ) ; |
public class YedGmlWriter { /** * Exports a directed graph into a PLAIN text file in GML format .
* @ param output the writer to which the graph to be exported
* @ param g the directed graph to be exported */
public void export ( Writer output , DirectedGraph < V , E > g ) { } } | export ( output , g , true ) ; |
public class ArrayBlockingQueue { /** * Inserts the specified element at the tail of this queue if it is
* possible to do so immediately without exceeding the queue ' s capacity ,
* returning { @ code true } upon success and { @ code false } if this queue
* is full . This method is generally preferable to method ... | Objects . requireNonNull ( e ) ; final ReentrantLock lock = this . lock ; lock . lock ( ) ; try { if ( count == items . length ) return false ; else { enqueue ( e ) ; return true ; } } finally { lock . unlock ( ) ; } |
public class MountTable { /** * Mounts the given UFS path at the given Alluxio path . The Alluxio path should not be nested
* under an existing mount point .
* @ param journalContext the journal context
* @ param alluxioUri an Alluxio path URI
* @ param ufsUri a UFS path URI
* @ param mountId the mount id
*... | String alluxioPath = alluxioUri . getPath ( ) . isEmpty ( ) ? "/" : alluxioUri . getPath ( ) ; LOG . info ( "Mounting {} at {}" , ufsUri , alluxioPath ) ; try ( LockResource r = new LockResource ( mWriteLock ) ) { if ( mState . getMountTable ( ) . containsKey ( alluxioPath ) ) { throw new FileAlreadyExistsException ( E... |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < }
* { @ link CmisAccessControlListType } { @ code > } */
@ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "addACEs" , scope = CreateRelationship . class ) public JAXBElement < CmisA... | return new JAXBElement < CmisAccessControlListType > ( _CreateDocumentAddACEs_QNAME , CmisAccessControlListType . class , CreateRelationship . class , value ) ; |
public class Lookup { /** * / * interpolated lookup based cos function , domain 0 to PI only */
static float coslook ( float a ) { } } | double d = a * ( .31830989 * ( float ) COS_LOOKUP_SZ ) ; int i = ( int ) d ; return COS_LOOKUP [ i ] + ( ( float ) ( d - i ) ) * ( COS_LOOKUP [ i + 1 ] - COS_LOOKUP [ i ] ) ; |
public class DefaultEntityHandler { /** * INSERT SQL生成
* @ param metadata エンティティメタ情報
* @ param type エイティティタイプ
* @ param sqlConfig SQLコンフィグ
* @ param ignoreWhenEmpty 空白パラメータをSQLに含めない条件文を設定する
* @ return INSERT SQL */
protected String buildInsertSQL ( final TableMetadata metadata , final Class < ? extends Obj... | Map < String , MappingColumn > mappingColumns = MappingUtils . getMappingColumnMap ( type , SqlKind . INSERT ) ; StringBuilder sql = buildInsertTargetBlock ( metadata , mappingColumns , sqlConfig , ignoreWhenEmpty ) ; sql . append ( " VALUES " ) ; sql . append ( buildInsertRowBlock ( metadata , mappingColumns , sqlConf... |
public class DateIntervalInfo { /** * Initialize the DateIntervalInfo from locale
* @ param locale the given locale . */
private void initializeData ( ULocale locale ) { } } | String key = locale . toString ( ) ; DateIntervalInfo dii = DIICACHE . get ( key ) ; if ( dii == null ) { // initialize data from scratch
setup ( locale ) ; // Marking fIntervalPatterns read - only makes cloning cheaper .
fIntervalPatternsReadOnly = true ; // We freeze what goes in the cache without freezing this objec... |
public class SolutionListUtils { /** * This method receives a normalized list of non - dominated solutions and return the inverted one .
* This operation is needed for minimization problem
* @ param solutionSet The front to invert
* @ return The inverted front */
@ SuppressWarnings ( "unchecked" ) public static <... | List < S > invertedFront = new ArrayList < > ( solutionSet . size ( ) ) ; int numberOfObjectives = solutionSet . get ( 0 ) . getNumberOfObjectives ( ) ; for ( int i = 0 ; i < solutionSet . size ( ) ; i ++ ) { invertedFront . add ( i , ( S ) solutionSet . get ( i ) . copy ( ) ) ; for ( int j = 0 ; j < numberOfObjectives... |
public class JsonDBTemplate { /** * / * ( non - Javadoc )
* @ see org . jsondb . JsonDBOperations # findAllAndRemove ( java . lang . String , java . lang . String ) */
@ Override public < T > List < T > findAllAndRemove ( String jxQuery , String collectionName ) { } } | CollectionMetaData cmd = cmdMap . get ( collectionName ) ; @ SuppressWarnings ( "unchecked" ) Map < Object , T > collection = ( Map < Object , T > ) collectionsRef . get ( ) . get ( collectionName ) ; if ( ( null == cmd ) || ( null == collection ) ) { throw new InvalidJsonDbApiUsageException ( "Collection by name '" + ... |
public class XMLFormatter { /** * Return the header string for a set of XML formatted records .
* @ param h The target handler ( can be null )
* @ return a valid XML string */
public String getHead ( Handler h ) { } } | StringBuilder sb = new StringBuilder ( ) ; String encoding ; sb . append ( "<?xml version=\"1.0\"" ) ; if ( h != null ) { encoding = h . getEncoding ( ) ; } else { encoding = null ; } if ( encoding == null ) { // Figure out the default encoding .
encoding = java . nio . charset . Charset . defaultCharset ( ) . name ( )... |
public class StreamEx { /** * Returns a stream consisting of the results of applying the given function
* to the the first element and every other element of this stream .
* This is a < a href = " package - summary . html # StreamOps " > quasi - intermediate
* operation < / a > .
* The size of the resulting str... | WithFirstSpliterator < T , R > spliterator = new WithFirstSpliterator < > ( spliterator ( ) , mapper ) ; return new StreamEx < > ( spliterator , context ) ; |
public class ManagementPoliciesInner { /** * Gets the managementpolicy associated with the specified storage account .
* @ param resourceGroupName The name of the resource group within the user ' s subscription . The name is case insensitive .
* @ param accountName The name of the storage account within the specifi... | return getWithServiceResponseAsync ( resourceGroupName , accountName ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class User { /** * Gets the list of { @ link Build } s that include changes by this user ,
* by the timestamp order . */
@ SuppressWarnings ( "unchecked" ) @ WithBridgeMethods ( List . class ) public @ Nonnull RunList getBuilds ( ) { } } | return RunList . fromJobs ( ( Iterable ) Jenkins . get ( ) . allItems ( Job . class ) ) . filter ( ( Predicate < Run < ? , ? > > ) r -> r instanceof AbstractBuild && relatedTo ( ( AbstractBuild < ? , ? > ) r ) ) ; |
public class ApiOvhIp { /** * Park this IP
* REST : POST / ip / { ip } / park
* @ param ip [ required ] */
public OvhIpTask ip_park_POST ( String ip ) throws IOException { } } | String qPath = "/ip/{ip}/park" ; StringBuilder sb = path ( qPath , ip ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhIpTask . class ) ; |
public class CmsSetupBean { /** * Returns a sorted list with they keys ( e . g . " mysql " , " generic " or " oracle " ) of all available
* database server setups found in " / setup / database / " sorted by their ranking property . < p >
* @ return a sorted list with they keys ( e . g . " mysql " , " generic " or "... | if ( m_sortedDatabaseKeys == null ) { List < String > databases = m_databaseKeys ; List < String > sortedDatabases = new ArrayList < String > ( databases . size ( ) ) ; SortedMap < Integer , String > mappedDatabases = new TreeMap < Integer , String > ( ) ; for ( int i = 0 ; i < databases . size ( ) ; i ++ ) { String ke... |
public class InternalXtypeParser { /** * InternalXtype . g : 878:1 : ruleXImportDeclaration returns [ EObject current = null ] : ( otherlv _ 0 = ' import ' ( ( ( ( lv _ static _ 1_0 = ' static ' ) ) ( ( lv _ extension _ 2_0 = ' extension ' ) ) ? ( ( ruleQualifiedNameInStaticImport ) ) ( ( ( lv _ wildcard _ 4_0 = ' * ' ... | EObject current = null ; Token otherlv_0 = null ; Token lv_static_1_0 = null ; Token lv_extension_2_0 = null ; Token lv_wildcard_4_0 = null ; Token otherlv_8 = null ; AntlrDatatypeRuleToken lv_memberName_5_0 = null ; AntlrDatatypeRuleToken lv_importedNamespace_7_0 = null ; enterRule ( ) ; try { // InternalXtype . g : 8... |
public class Settings { /** * Sets a property value only if the value is not null .
* @ param key the key for the property
* @ param value the value for the property */
public void setIntIfNotNull ( @ NotNull final String key , @ Nullable final Integer value ) { } } | if ( null != value ) { setInt ( key , value ) ; } |
public class TinkerforgeEndpoint { /** * Get Header - Parameter or alternative Configured URI Parameter Value */
public < T > T getValue ( Class < T > type , String parameter , Message message , T uriParameterValue ) { } } | if ( message == null && uriParameterValue != null ) { return uriParameterValue ; } T value = message . getHeader ( parameter , type ) ; if ( value == null ) { value = uriParameterValue ; } return value ; |
public class ThemeSwitcher { /** * Looks are current theme and retrieves the style
* for the given resId set in the theme .
* @ param context to retrieve the resolved attribute
* @ param styleResId for the given style
* @ return resolved style resource Id */
public static int retrieveNavigationViewStyle ( Conte... | TypedValue outValue = resolveAttributeFromId ( context , styleResId ) ; return outValue . resourceId ; |
public class ReplaceInListRepairer { /** * Repairs a local { @ link ReplaceInList } in relation to a remote { @ link ReplaceInList } command .
* @ param toRepair
* The local command to repair .
* @ param repairAgainst
* The remote command to repair against .
* @ return The repaired command or an empty optiona... | if ( toRepair . getPosition ( ) == repairAgainst . getPosition ( ) ) { return Optional . empty ( ) ; } return Optional . of ( toRepair ) ; |
public class XPathBuilder { /** * < p > < b > Used for finding element process ( to generate xpath address ) < / b > < / p >
* @ param style of element
* @ param < T > the element which calls this method
* @ return this element */
@ SuppressWarnings ( "unchecked" ) public < T extends XPathBuilder > T setStyle ( f... | this . style = style ; return ( T ) this ; |
public class ImageSizeImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setHRESOL ( Integer newHRESOL ) { } } | Integer oldHRESOL = hresol ; hresol = newHRESOL ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . IMAGE_SIZE__HRESOL , oldHRESOL , hresol ) ) ; |
public class ImageDrawing { /** * Drawing src bitmap to dest bitmap with applied mask .
* @ param src source bitmap
* @ param mask bitmap mask
* @ param dest destination bitmap */
public static void drawMasked ( Bitmap src , Drawable mask , Bitmap dest ) { } } | drawMasked ( src , mask , dest , CLEAR_COLOR ) ; |
public class MolecularFormula { /** * Adds an Isotope to this MolecularFormula in a number of occurrences .
* @ param isotope The isotope to be added to this MolecularFormula
* @ param count The number of occurrences to add
* @ see # addIsotope ( IIsotope ) */
@ Override public IMolecularFormula addIsotope ( IIso... | if ( count == 0 ) return this ; boolean flag = false ; for ( IIsotope thisIsotope : isotopes ( ) ) { if ( isTheSame ( thisIsotope , isotope ) ) { isotopes . put ( thisIsotope , isotopes . get ( thisIsotope ) + count ) ; flag = true ; break ; } } if ( ! flag ) { isotopes . put ( isotope , count ) ; } return this ; |
public class Yank { /** * Executes a given INSERT SQL prepared statement matching the sqlKey String in a properties file
* loaded via Yank . addSQLStatements ( . . . ) using the default connection pool . Returns the
* auto - increment id of the inserted row .
* @ param sqlKey The SQL Key found in a properties fil... | return insertSQLKey ( YankPoolManager . DEFAULT_POOL_NAME , sqlKey , params ) ; |
public class JnlpSlaveAgentProtocol4 { /** * Inject the { @ link IOHubProvider }
* @ param hub the hub provider . */
@ Inject public void setHub ( IOHubProvider hub ) { } } | this . hub = hub ; handler = new JnlpProtocol4Handler ( JnlpAgentReceiver . DATABASE , Computer . threadPoolForRemoting , hub . getHub ( ) , sslContext , false , true ) ; |
public class TimerGroup { /** * Stop the named timer if the condition is true . */
private long stop ( long time , String name ) { } } | m_total . stop ( time ) ; TimerGroupItem timer = m_timers . get ( getName ( name ) ) ; long elapsedTime = 0 ; if ( timer != null ) { elapsedTime = timer . stop ( time ) ; } checkLog ( time ) ; return elapsedTime ; |
public class PushService { /** * https : / / groups . google . com / forum / # ! topic / android - developers / H - DSQ4 - tiac
* @ see android . app . Service # onTaskRemoved ( android . content . Intent ) */
@ TargetApi ( Build . VERSION_CODES . ICE_CREAM_SANDWICH ) @ Override public void onTaskRemoved ( Intent roo... | LOGGER . d ( "try to restart service on task Removed" ) ; if ( isAutoWakeUp ) { Intent restartServiceIntent = new Intent ( getApplicationContext ( ) , this . getClass ( ) ) ; restartServiceIntent . setPackage ( getPackageName ( ) ) ; PendingIntent restartServicePendingIntent = PendingIntent . getService ( getApplicatio... |
public class Humanize { /** * Sort of poor man ' s transliteration , i . e . normalizes and strips
* diacritical marks .
* < table border = " 0 " cellspacing = " 0 " cellpadding = " 3 " width = " 100 % " >
* < tr >
* < th class = " colFirst " > Input < / th >
* < th class = " colLast " > Output < / th >
* <... | String normalized = java . text . Normalizer . normalize ( text , java . text . Normalizer . Form . NFD ) ; return COMB_DIACRITICAL . matcher ( normalized ) . replaceAll ( "" ) ; |
public class DelayedExecutor { /** * Executes delayed invocations
* @ param target
* @ throws Throwable From one of the called methods . */
public void execute ( T target ) throws Throwable { } } | try { for ( Invokation invokation : queue ) { invokation . invoke ( target ) ; } } catch ( InvocationTargetException ex ) { throw ex . getCause ( ) ; } catch ( ReflectiveOperationException ex ) { throw new RuntimeException ( ex ) ; } |
public class UsersApi { /** * Log out the agent specified by the dbid .
* Log out the agent specified by the dbid .
* @ param dbid The dbid of the agent . ( required )
* @ param supervisorPlaceData Request parameters . ( optional )
* @ return ApiSuccessResponse
* @ throws ApiException If fail to call the API ... | ApiResponse < ApiSuccessResponse > resp = supervisorRemotePlaceOperationWithHttpInfo ( dbid , supervisorPlaceData ) ; return resp . getData ( ) ; |
public class WinletDefaultFormattingConversionService { /** * 如果有格式可应用则应用
* @ param bw
* @ param obj
* @ param prop
* @ return */
public static String format ( ConfigurablePropertyAccessor bw , Object obj , String prop ) { } } | String key = obj . getClass ( ) . getName ( ) + "_" + prop ; if ( ! cache . containsKey ( key ) ) canFormat ( bw , obj , prop ) ; Object val = bw . getPropertyValue ( prop ) ; if ( val == null ) return null ; if ( val . getClass ( ) . isArray ( ) ) return null ; if ( ! cache . get ( key ) ) return val . toString ( ) ; ... |
public class CommandLineParserUtilities { /** * Return a list of all { @ link Field } in the class { @ code clazz } and its base classes .
* @ param clazz class to interrogate for { @ link Field }
* @ return list of all { @ link Field } in the class { @ code clazz } and its base classes */
public static List < Fiel... | final List < Field > ret = new ArrayList < > ( ) ; do { ret . addAll ( Arrays . asList ( clazz . getDeclaredFields ( ) ) ) ; clazz = clazz . getSuperclass ( ) ; } while ( clazz != null ) ; return ret ; |
public class Instructions { /** * Utility method to merge instructions from { @ code props2 } into the { @ code props1 } . The instructions
* from { @ code props2 } override the instructions from { @ code props1 } ( when both contain the same instruction )
* @ param props1 the first set of instructions
* @ param ... | Properties properties = new Properties ( ) ; properties . putAll ( props1 ) ; properties . putAll ( props2 ) ; return properties ; |
public class ClientSessionManager { /** * Expires the manager .
* @ return A completable future to be completed once the session has been expired . */
public CompletableFuture < Void > expire ( ) { } } | CompletableFuture < Void > future = new CompletableFuture < > ( ) ; context . executor ( ) . execute ( ( ) -> { if ( keepAlive != null ) keepAlive . cancel ( ) ; state . setState ( Session . State . EXPIRED ) ; future . complete ( null ) ; } ) ; return future ; |
public class GroupMemberImpl { /** * Returns an < code > Iterator < / code > over this < code > IGroupMember ' s < / code > parent groups .
* Synchronize the collection of keys with adds and removes .
* @ return Iterator */
@ Override public Set < IEntityGroup > getParentGroups ( ) throws GroupsException { } } | final EntityIdentifier cacheKey = getUnderlyingEntityIdentifier ( ) ; Element element = parentGroupsCache . get ( cacheKey ) ; if ( element == null ) { final Set < IEntityGroup > groups = buildParentGroupsSet ( ) ; element = new Element ( cacheKey , groups ) ; parentGroupsCache . put ( element ) ; } @ SuppressWarnings ... |
public class ClutoSparseFileIterator { /** * Reads a line and splits it into [ col value ] pairs .
* @ throws IllegalArgumentException If there are no more lines to read . */
private String [ ] readLine ( ) throws IOException { } } | // Read the next number of non zeros .
String line = reader . readLine ( ) ; if ( line == null ) throw new IllegalArgumentException ( "The matrix file is improperly formatted" ) ; return line . split ( "\\s+" ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.