signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class MiniJPEContentHandler { /** * { @ inheritDoc } */ public Object addYToPoint ( double y , Object point ) { } }
( ( Point ) point ) . setY ( y ) ; return point ;
public class CompressedArray { /** * Compresses the specified byte range using the specified compressionLevel ( constants are * defined in java . util . zip . Deflater ) . */ public static byte [ ] compress ( byte [ ] value , int offset , int length , int compressionLevel ) { } }
/* Create an expandable byte array to hold the compressed data . * You cannot use an array that ' s the same size as the orginal because * there is no guarantee that the compressed data will be smaller than * the uncompressed data . */ ByteArrayOutputStream bos = new ByteArrayOutputStream ( length ) ; Deflater co...
public class DocEnv { /** * Create a MethodDoc for this MethodSymbol . * Should be called only on symbols representing methods . */ protected void makeMethodDoc ( MethodSymbol meth , TreePath treePath ) { } }
MethodDocImpl result = ( MethodDocImpl ) methodMap . get ( meth ) ; if ( result != null ) { if ( treePath != null ) result . setTreePath ( treePath ) ; } else { result = new MethodDocImpl ( this , meth , treePath ) ; methodMap . put ( meth , result ) ; }
public class PublicIPAddressesInner { /** * Creates or updates a static or dynamic public IP address . * @ param resourceGroupName The name of the resource group . * @ param publicIpAddressName The name of the public IP address . * @ param parameters Parameters supplied to the create or update public IP address o...
return beginCreateOrUpdateWithServiceResponseAsync ( resourceGroupName , publicIpAddressName , parameters ) . map ( new Func1 < ServiceResponse < PublicIPAddressInner > , PublicIPAddressInner > ( ) { @ Override public PublicIPAddressInner call ( ServiceResponse < PublicIPAddressInner > response ) { return response . bo...
public class ArtifactArchiver { /** * Backwards compatibility for older builds */ @ SuppressFBWarnings ( value = "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" , justification = "Null checks in readResolve are valid since we deserialize and upgrade objects" ) protected Object readResolve ( ) { } }
if ( allowEmptyArchive == null ) { this . allowEmptyArchive = SystemProperties . getBoolean ( ArtifactArchiver . class . getName ( ) + ".warnOnEmpty" ) ; } if ( defaultExcludes == null ) { defaultExcludes = true ; } if ( caseSensitive == null ) { caseSensitive = true ; } return this ;
public class TimeZoneNamesImpl { /** * Load all strings used by the specified time zone . * This is called from the initializer to load default zone ' s * strings . * @ param tzCanonicalID the canonical time zone ID */ private synchronized void loadStrings ( String tzCanonicalID ) { } }
if ( tzCanonicalID == null || tzCanonicalID . length ( ) == 0 ) { return ; } loadTimeZoneNames ( tzCanonicalID ) ; Set < String > mzIDs = getAvailableMetaZoneIDs ( tzCanonicalID ) ; for ( String mzID : mzIDs ) { loadMetaZoneNames ( mzID ) ; }
public class MainActivity { /** * Button onClick listener . * @ param v */ public void buttonClick ( View v ) { } }
switch ( v . getId ( ) ) { case R . id . show : showAppMsg ( ) ; break ; case R . id . cancel_all : AppMsg . cancelAll ( this ) ; break ; default : return ; }
public class SnapshotStore { /** * Loads all available snapshots from disk . * @ return A list of available snapshots . */ private Collection < Snapshot > loadSnapshots ( ) { } }
// Ensure log directories are created . storage . directory ( ) . mkdirs ( ) ; List < Snapshot > snapshots = new ArrayList < > ( ) ; // Iterate through all files in the log directory . for ( File file : storage . directory ( ) . listFiles ( File :: isFile ) ) { // If the file looks like a segment file , attempt to load...
public class FessMessages { /** * Add the created action message for the key ' success . upload _ elevate _ word ' with parameters . * < pre > * message : Uploaded Additional Word file . * < / pre > * @ param property The property name for the message . ( NotNull ) * @ return this . ( NotNull ) */ public Fess...
assertPropertyNotNull ( property ) ; add ( property , new UserMessage ( SUCCESS_upload_elevate_word ) ) ; return this ;
public class ElementMatchers { /** * Creates a matcher that matches none of the given methods as { @ link FieldDescription } s * by the { @ link java . lang . Object # equals ( Object ) } method . None of the values must be { @ code null } . * @ param value The input values to be compared against . * @ param < T ...
return definedField ( noneOf ( new FieldList . ForLoadedFields ( value ) ) ) ;
public class ParosTableSessionUrl { /** * / * ( non - Javadoc ) * @ see org . parosproxy . paros . db . paros . TableSessionUrl # deleteAllUrlsForType ( int ) */ @ Override public synchronized void deleteAllUrlsForType ( int type ) throws DatabaseException { } }
try { psDeleteAllUrlsForType . setInt ( 1 , type ) ; psDeleteAllUrlsForType . executeUpdate ( ) ; } catch ( SQLException e ) { throw new DatabaseException ( e ) ; }
public class StringUtility { /** * Method that attempts to break a string up into lines no longer than the * specified line length . * < p > The string is assumed to a large chunk of undifferentiated text such * as base 64 encoded binary data . * @ param str * The input string to be split into lines . * @ p...
final int inputLength = str . length ( ) ; // to prevent resizing , we can predict the size of the indented string // the formatting addition is the indent spaces plus a newline // this length is added once for each line boolean perfectFit = ( inputLength % numChars == 0 ) ; int fullLines = ( inputLength / numChars ) ;...
public class SHPRead { /** * Copy data from Shape File into a new table in specified connection . * @ param connection Active connection * @ param tableReference [ [ catalog . ] schema . ] table reference * @ param fileName File path of the SHP file or URI * @ throws java . io . IOException * @ throws java . ...
readShape ( connection , fileName , tableReference , null ) ;
public class BaseDatasourceFactory { /** * Set the params for this datasource . * @ param database * @ param dataSource */ public void setDatasourceParams ( JdbcDatabase database , ComboPooledDataSource dataSource ) { } }
if ( dataSource != null ) { // Try pooled connection first String strURL = database . getProperty ( SQLParams . JDBC_URL_PARAM ) ; if ( ( strURL == null ) || ( strURL . length ( ) == 0 ) ) strURL = database . getProperty ( SQLParams . DEFAULT_JDBC_URL_PARAM ) ; // Default String strServer = database . getProperty ( SQL...
public class NaiveBayesClassifier { /** * Naive Bayes Text Classification with Add - 1 Smoothing * @ param text Input text * @ return the best { @ link Category } */ public Category classify ( String text ) { } }
StringTokenizer itr = new StringTokenizer ( text ) ; Map < Category , Double > scorePerCategory = new HashMap < Category , Double > ( ) ; double bestScore = Double . NEGATIVE_INFINITY ; Category bestCategory = null ; while ( itr . hasMoreTokens ( ) ) { String token = NaiveBayesGenerate . normalizeWord ( itr . nextToken...
public class CookieExpiresData { /** * @ see * com . ibm . ws . http . channel . internal . values . CookieData # set ( com . ibm . websphere * . http . HttpCookie , byte [ ] ) */ @ Override public boolean set ( HttpCookie cookie , byte [ ] attribValue ) { } }
if ( null == cookie || null == attribValue || 0 == attribValue . length ) { return false ; } // Start parsing the byte array here to set the expiry date // For example : 24 - Jun - 03 16:01:45 GMT is a valid attrib value // Using the HttpDateFormat class try { Date expiryDate = HttpDispatcher . getDateFormatter ( ) . p...
public class ArrayList { /** * Inserts all of the elements in the specified collection into this * list , starting at the specified position . Shifts the element * currently at that position ( if any ) and any subsequent elements to * the right ( increases their indices ) . The new elements will appear * in the...
if ( index > size || index < 0 ) throw new IndexOutOfBoundsException ( outOfBoundsMsg ( index ) ) ; Object [ ] a = c . toArray ( ) ; int numNew = a . length ; ensureCapacityInternal ( size + numNew ) ; // Increments modCount int numMoved = size - index ; if ( numMoved > 0 ) System . arraycopy ( elementData , index , el...
public class JQMList { /** * Find the list item with the given tag . This method will search all the items and return * the first item found with the given tag . * @ return the list item with the given tag ( if found , or null otherwise ) . */ public JQMListItem findItemByTag ( Object tag ) { } }
if ( tag == null ) return null ; List < JQMListItem > lst = getItems ( ) ; for ( JQMListItem i : lst ) { if ( i == null ) continue ; if ( tag . equals ( i . getTag ( ) ) ) return i ; } return null ;
public class DeserializeJSON { /** * { " ROWCOUNT " : 2 , " COLUMNS " : [ " AAA " , " BBB " ] , " DATA " : { " aaa " : [ " a " , " c " ] , " bbb " : [ " b " , " d " ] } } */ private static Object toQuery ( Object obj ) throws PageException { } }
if ( obj instanceof Struct ) { Struct sct = ( Struct ) obj ; Key [ ] keys = CollectionUtil . keys ( sct ) ; // Columns Key [ ] columns = null ; if ( contains ( keys , KeyConstants . _COLUMNS ) ) columns = toColumns ( sct . get ( KeyConstants . _COLUMNS , null ) ) ; else if ( contains ( keys , KeyConstants . _COLUMNLIST...
public class IpChecker { /** * Check whether a given IP Adress falls within a subnet or is equal to * @ param pExpected either a simple IP adress ( without " / " ) or a net specification * including a netmask ( e . g " / 24 " or " / 255.255.255.0 " ) * @ param pToCheck the ip address to check * @ return true if...
String [ ] parts = pExpected . split ( "/" , 2 ) ; if ( parts . length == 1 ) { // No Net part given , check for equality . . . // Check for valid ips convertToIntTuple ( pExpected ) ; convertToIntTuple ( pToCheck ) ; return pExpected . equals ( pToCheck ) ; } else if ( parts . length == 2 ) { int ipToCheck [ ] = conve...
public class BaseRdbParser { /** * 1 . | 11xxxxx | xxxxx | remaining 6bit is 0 , then an 8 bit integer follows * 2 . | 11xxxxx | xxxxx | xxxxx | remaining 6bit is 1 , then an 16 bit integer follows * 3 . | 11xxxxx | xxxxx | xxxxx | xxxxx | xxxxx | remaining 6bit is 2 , then an 32 bit integer follows * 4 . | 11xxx...
boolean plain = ( flags & RDB_LOAD_PLAIN ) != 0 ; boolean encode = ( flags & RDB_LOAD_ENC ) != 0 ; Len lenObj = rdbLoadLen ( ) ; long len = ( int ) lenObj . len ; boolean isencoded = lenObj . encoded ; if ( isencoded ) { switch ( ( int ) len ) { case RDB_ENC_INT8 : case RDB_ENC_INT16 : case RDB_ENC_INT32 : return rdbLo...
public class MutableDateTime { /** * Set the milliseconds of the datetime . * All changes to the millisecond field occurs via this method . * @ param instant the milliseconds since 1970-01-01T00:00:00Z to set the * datetime to */ public void setMillis ( long instant ) { } }
switch ( iRoundingMode ) { case ROUND_NONE : break ; case ROUND_FLOOR : instant = iRoundingField . roundFloor ( instant ) ; break ; case ROUND_CEILING : instant = iRoundingField . roundCeiling ( instant ) ; break ; case ROUND_HALF_FLOOR : instant = iRoundingField . roundHalfFloor ( instant ) ; break ; case ROUND_HALF_C...
public class Swift2ThriftGenerator { /** * and does a topological sort of thriftTypes in dependency order */ private boolean verifyTypes ( ) { } }
SuccessAndResult < ThriftType > output = topologicalSort ( thriftTypes , new Predicate < ThriftType > ( ) { @ Override public boolean apply ( @ Nullable ThriftType t ) { ThriftProtocolType proto = checkNotNull ( t ) . getProtocolType ( ) ; if ( proto == ThriftProtocolType . ENUM || proto == ThriftProtocolType . STRUCT ...
public class RecurlyClient { /** * Lookup an account ' s transactions history given query params * Returns the account ' s transaction history * @ param accountCode recurly account id * @ param state { @ link TransactionState } * @ param type { @ link TransactionType } * @ param params { @ link QueryParams } ...
if ( state != null ) params . put ( "state" , state . getType ( ) ) ; if ( type != null ) params . put ( "type" , type . getType ( ) ) ; return doGET ( Accounts . ACCOUNTS_RESOURCE + "/" + accountCode + Transactions . TRANSACTIONS_RESOURCE , Transactions . class , params ) ;
public class MetricAlarm { /** * The actions to execute when this alarm transitions to the < code > OK < / code > state from any other state . Each action * is specified as an Amazon Resource Name ( ARN ) . * @ param oKActions * The actions to execute when this alarm transitions to the < code > OK < / code > stat...
if ( oKActions == null ) { this . oKActions = null ; return ; } this . oKActions = new com . amazonaws . internal . SdkInternalList < String > ( oKActions ) ;
public class Searcher { /** * Prepares an int for printing with leading zeros for the given size . * @ param i the int to prepare * @ param size max value for i * @ return printable string for i with leading zeros */ private static String getLeadingZeros ( int i , int size ) { } }
assert i <= size ; int w1 = ( int ) Math . floor ( Math . log10 ( size ) ) ; int w2 = ( int ) Math . floor ( Math . log10 ( i ) ) ; String s = "" ; for ( int j = w2 ; j < w1 ; j ++ ) { s += "0" ; } return s ;
public class JRubyProcessor { /** * Parses the given raw asciidoctor content , parses it and appends it as children to the given parent block . * < p > The following example will add two paragraphs with the role { @ code newcontent } to all top * level sections of a document : * < pre > * < verbatim > * Ascii...
Ruby runtime = JRubyRuntimeContext . get ( parent ) ; Parser parser = new Parser ( runtime , parent , ReaderImpl . createReader ( runtime , lines ) ) ; StructuralNode nextBlock = parser . nextBlock ( ) ; while ( nextBlock != null ) { parent . append ( nextBlock ) ; nextBlock = parser . nextBlock ( ) ; }
public class ProxiedFileSystemUtils { /** * Create a { @ link FileSystem } that can perform any operations allowed the by the specified userNameToProxyAs . The * method first proxies as userNameToProxyAs , and then adds the specified { @ link Token } to the given * { @ link UserGroupInformation } object . It then u...
UserGroupInformation ugi = UserGroupInformation . createProxyUser ( userNameToProxyAs , UserGroupInformation . getLoginUser ( ) ) ; ugi . addToken ( userNameToken ) ; return ugi . doAs ( new ProxiedFileSystem ( fsURI , conf ) ) ;
public class VisualizationUtils { /** * Plots the mean MSD curve over all trajectories in t . * @ param t List of trajectories * @ param lagMin Minimum timelag ( e . g . 1,2,3 . . ) lagMin * timelag = elapsed time in seconds * @ param lagMax Maximum timelag ( e . g . 1,2,3 . . ) lagMax * timelag = elapsed time in...
double [ ] xData = new double [ lagMax - lagMin + 1 ] ; double [ ] yData = new double [ lagMax - lagMin + 1 ] ; for ( int j = lagMin ; j < lagMax + 1 ; j ++ ) { double msd = 0 ; int N = 0 ; for ( int i = 0 ; i < t . size ( ) ; i ++ ) { if ( t . get ( i ) . size ( ) > lagMax ) { msdeval . setTrajectory ( t . get ( i ) )...
public class RuleMatchAsXmlSerializer { /** * Get the string to begin the XML . After this , use { @ link # ruleMatchesToXmlSnippet } and then { @ link # getXmlEnd ( ) } * or better , simply use { @ link # ruleMatchesToXml } . */ public String getXmlStart ( Language lang , Language motherTongue ) { } }
StringBuilder xml = new StringBuilder ( CAPACITY ) ; xml . append ( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ) . append ( "<!-- THIS OUTPUT IS DEPRECATED, PLEASE SEE http://wiki.languagetool.org/http-server FOR A BETTER APPROACH -->\n" ) . append ( "<matches software=\"LanguageTool\" version=\"" + JLanguageTool ....
public class InMemoryLinkedDataStore { /** * ( non - Javadoc ) * @ see net . timewalker . ffmq4 . utils . store . LinkedStore # delete ( int ) */ @ Override public int delete ( int handle ) throws DataStoreException { } }
if ( SAFE_MODE ) checkHandle ( handle ) ; int previousHandle = previousEntry [ handle ] ; int nextHandle = nextEntry [ handle ] ; // Reconnect list if ( previousHandle != - 1 ) nextEntry [ previousHandle ] = nextHandle ; if ( nextHandle != - 1 ) previousEntry [ nextHandle ] = previousHandle ; // Clear data previousEntr...
public class VarianceOfVolume { /** * Compute volumes * @ param knnq KNN query * @ param dim Data dimensionality * @ param ids IDs to process * @ param vols Volume storage */ private void computeVolumes ( KNNQuery < O > knnq , int dim , DBIDs ids , WritableDoubleDataStore vols ) { } }
FiniteProgress prog = LOG . isVerbose ( ) ? new FiniteProgress ( "Volume" , ids . size ( ) , LOG ) : null ; double scaleconst = MathUtil . SQRTPI * FastMath . pow ( GammaDistribution . gamma ( 1 + dim * .5 ) , - 1. / dim ) ; boolean warned = false ; double sum = 0. ; for ( DBIDIter iter = ids . iter ( ) ; iter . valid ...
public class HttpResponseDecoder { /** * Asynchronously decodes a { @ link HttpResponse } . * @ param response the publisher that emits response to be decoded * @ param decodeData the necessary data required to decode the response emitted by { @ code response } * @ return a publisher that emits decoded HttpRespon...
return response . map ( r -> new HttpDecodedResponse ( r , this . serializer , decodeData ) ) ;
public class InternalRequest { /** * Returns a content - type header value * @ return content - type header value in { @ link Optional } object */ public MediaType getContentType ( ) { } }
if ( isNull ( this . contentType ) ) { contentType = getHeader ( HeaderName . CONTENT_TYPE ) . map ( MediaType :: of ) . orElse ( WILDCARD ) ; } return contentType ;
public class Anima { /** * Create anima with url and db info * @ param url jdbc url * @ param user database username * @ param pass database password * @ return Anima */ public static Anima open ( String url , String user , String pass ) { } }
return open ( url , user , pass , QuirksDetector . forURL ( url ) ) ;
public class CommerceWishListUtil { /** * Returns a range of all the commerce wish lists where userId = & # 63 ; . * 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 re...
return getPersistence ( ) . findByUserId ( userId , start , end ) ;
public class IssuesTemplate { /** * TODO , pagination */ @ Override public List < Issue > listOrganizationIssues ( String organization ) { } }
Map < String , Object > uriVariables = new HashMap < > ( ) ; uriVariables . put ( "organization" , organization ) ; return getRestOperations ( ) . exchange ( buildUri ( "/orgs/{organization}/issues?per_page=25" , uriVariables ) , HttpMethod . GET , null , issueListTypeRef ) . getBody ( ) ;
public class ClientProxyImpl { /** * Updates the current state if Client method is invoked , otherwise * does the remote invocation or returns a new proxy if subresource * method is invoked . Can throw an expected exception if ResponseExceptionMapper * is registered */ @ Trivial @ Override public Object invoke ( ...
Class < ? > declaringClass = m . getDeclaringClass ( ) ; if ( Client . class == declaringClass || InvocationHandlerAware . class == declaringClass || Object . class == declaringClass ) { return m . invoke ( this , params ) ; } resetResponse ( ) ; OperationResourceInfo ori = cri . getMethodDispatcher ( ) . getOperationR...
public class HttpClientResponseBuilder { /** * Adds action which returns provided XML in UTF - 8 and status 200 . Additionally it sets " Content - type " header to " application / xml " . * @ param response JSON to return * @ return response builder */ public HttpClientResponseBuilder doReturnXML ( String response ...
return doReturn ( response , charset ) . withHeader ( "Content-type" , APPLICATION_XML . toString ( ) ) ;
public class ArgumentParser { /** * Handler - D argument */ private Map < String , Object > handleArgDefine ( final String arg , final Deque < String > args ) { } }
/* * Interestingly enough , we get to here when a user uses - Dname = value . * However , in some cases , the OS goes ahead and parses this out to args * { " - Dname " , " value " } so instead of parsing on " = " , we just make the * " - D " characters go away and skip one argument forward . * I don ' t know ho...
public class MimeMessageHelper { /** * Fills the { @ link Message } instance with the attachments from the { @ link Email } . * @ param email The message in which the attachments are defined . * @ param multipartRoot The branch in the email structure in which we ' ll stuff the attachments . * @ throws MessagingEx...
for ( final AttachmentResource resource : email . getAttachments ( ) ) { multipartRoot . addBodyPart ( getBodyPartFromDatasource ( resource , Part . ATTACHMENT ) ) ; }
public class WFieldSetRenderer { /** * Paints the given WFieldSet . * @ param component the WFieldSet to paint . * @ param renderContext the RenderContext to paint to . */ @ Override public void doRender ( final WComponent component , final WebXmlRenderContext renderContext ) { } }
WFieldSet fieldSet = ( WFieldSet ) component ; XmlStringBuilder xml = renderContext . getWriter ( ) ; xml . appendTagOpen ( "ui:fieldset" ) ; xml . appendAttribute ( "id" , component . getId ( ) ) ; xml . appendOptionalAttribute ( "class" , component . getHtmlClass ( ) ) ; xml . appendOptionalAttribute ( "track" , comp...
public class NodeInterval { /** * Return the first node satisfying the date and match callback . * @ param callback custom logic to decide if a given node is a match * @ return the found node or null if there is nothing . */ public NodeInterval findNode ( final SearchCallback callback ) { } }
Preconditions . checkNotNull ( callback ) ; if ( callback . isMatch ( this ) ) { return this ; } NodeInterval curChild = leftChild ; while ( curChild != null ) { final NodeInterval result = curChild . findNode ( callback ) ; if ( result != null ) { return result ; } curChild = curChild . getRightSibling ( ) ; } return ...
public class ReflectionUtils { /** * Returns a { @ link LinkedHashSet } of { @ link Class } objects containing all * classes of a specified package ( including subpackages ) which extend the * given class . * Example : * < pre > * String pack = & quot ; de . uni . freiburg . iig . telematik . sepia & quot ; ;...
Validate . notNull ( clazz ) ; if ( clazz . isInterface ( ) || clazz . isEnum ( ) ) { throw new ParameterException ( "Parameter is not a class" ) ; } LinkedHashSet < Class < ? > > classesInPackage = getClassesInPackage ( packageName , recursive ) ; try { LinkedHashSet < Class < ? > > subClassesInPackage = new LinkedHas...
public class DefaultExecutor { /** * Factory method to create a thread waiting for the result of an * asynchronous execution . * @ param runnable the runnable passed to the thread * @ param name the name of the thread * @ return the thread */ @ Override protected Thread createThread ( final Runnable runnable , ...
return new Thread ( runnable , Thread . currentThread ( ) . getName ( ) + "-exec" ) ;
public class QueryWithResultMessage { /** * / * XXX : Issues with async / future that are chained */ @ Override public boolean isFuture ( ) { } }
ResultChain < T > result = _result ; return result . isFuture ( ) && method ( ) . isDirect ( ) ;
public class DescribeSpotPriceHistoryRequest { /** * Filters the results by the specified basic product descriptions . * @ return Filters the results by the specified basic product descriptions . */ public java . util . List < String > getProductDescriptions ( ) { } }
if ( productDescriptions == null ) { productDescriptions = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return productDescriptions ;
public class SymmetricQrAlgorithm_DDRM { /** * First looks for zeros and then performs the implicit single step in the QR Algorithm . */ public void performStep ( ) { } }
// check for zeros for ( int i = helper . x2 - 1 ; i >= helper . x1 ; i -- ) { if ( helper . isZero ( i ) ) { helper . splits [ helper . numSplits ++ ] = i ; helper . x1 = i + 1 ; return ; } } double lambda ; if ( followingScript ) { if ( helper . steps > 10 ) { followingScript = false ; return ; } else { // Using the ...
public class AndroidUtils { /** * Execute an { @ link AsyncTask } on a thread pool . * @ param task Task to add . * @ param args Optional arguments to pass to { @ link AsyncTask # execute ( Object [ ] ) } . * @ param < T > Task argument type . */ @ SuppressWarnings ( "unchecked" ) @ TargetApi ( VERSION_CODES . HO...
if ( Build . VERSION . SDK_INT < VERSION_CODES . HONEYCOMB ) { task . execute ( args ) ; } else { task . executeOnExecutor ( AsyncTask . THREAD_POOL_EXECUTOR , args ) ; }
public class OpenLDAPModifyPasswordRequest { /** * Get the BER encoded value for this operation . * @ return a bytearray containing the BER sequence . */ public byte [ ] getEncodedValue ( ) { } }
final String characterEncoding = this . chaiConfiguration . getSetting ( ChaiSetting . LDAP_CHARACTER_ENCODING ) ; final byte [ ] password = modifyPassword . getBytes ( Charset . forName ( characterEncoding ) ) ; final byte [ ] dn = modifyDn . getBytes ( Charset . forName ( characterEncoding ) ) ; // Sequence tag ( 1 )...
public class BasicEventStream { /** * Returns the next Event object held in this EventStream . Each call to nextEvent advances the EventStream . * @ return the Event object which is next in this EventStream */ public Event nextEvent ( ) { } }
while ( _next == null && _ds . hasNext ( ) ) _next = createEvent ( ( String ) _ds . nextToken ( ) ) ; Event current = _next ; if ( _ds . hasNext ( ) ) { _next = createEvent ( ( String ) _ds . nextToken ( ) ) ; } else { _next = null ; } return current ;
public class JobListPreparationAndReleaseTaskStatusNextOptions { /** * Set the time the request was issued . Client libraries typically set this to the current system clock time ; set it explicitly if you are calling the REST API directly . * @ param ocpDate the ocpDate value to set * @ return the JobListPreparatio...
if ( ocpDate == null ) { this . ocpDate = null ; } else { this . ocpDate = new DateTimeRfc1123 ( ocpDate ) ; } return this ;
public class Matchers { /** * Match a method declaration with a specific enclosing class and method name . * @ param className The fully - qualified name of the enclosing class , e . g . * " com . google . common . base . Preconditions " * @ param methodName The name of the method to match , e . g . , " checkNotN...
return new Matcher < MethodTree > ( ) { @ Override public boolean matches ( MethodTree methodTree , VisitorState state ) { return ASTHelpers . getSymbol ( methodTree ) . getEnclosingElement ( ) . getQualifiedName ( ) . contentEquals ( className ) && methodTree . getName ( ) . contentEquals ( methodName ) ; } } ;
public class ReflectionUtilImpl { /** * This method gets the singleton instance of this { @ link ReflectionUtil } . < br > * < b > ATTENTION : < / b > < br > * Please prefer dependency - injection instead of using this method . * @ return the singleton instance . */ public static ReflectionUtil getInstance ( ) { ...
if ( instance == null ) { ReflectionUtilImpl impl = null ; synchronized ( ReflectionUtilImpl . class ) { if ( instance == null ) { impl = new ReflectionUtilImpl ( ) ; instance = impl ; } } if ( impl != null ) { // static access is generally discouraged , cyclic dependency forces this ugly initialization to // prevent d...
public class SameAsServiceImpl { /** * { @ inheritDoc } */ public EquivalenceList getDuplicates ( String keyword ) throws SameAsServiceException { } }
return invokeURL ( format ( SERVICE_KEYWORD , keyword ) , EquivalenceList . class ) ;
public class GrailsDomainBinder { /** * Override the default naming strategy for the default datasource given a Class or a full class name . * @ param strategy the class or name * @ throws ClassNotFoundException When the class was not found for specified strategy * @ throws InstantiationException When an error oc...
configureNamingStrategy ( ConnectionSource . DEFAULT , strategy ) ;
public class BytecodeUtils { /** * Returns an expression that does a numeric conversion cast from the given expression to the * given type . * @ throws IllegalArgumentException if either the expression or the target type is not a numeric * primitive */ public static Expression numericConversion ( final Expression...
if ( to . equals ( expr . resultType ( ) ) ) { return expr ; } if ( ! isNumericPrimitive ( to ) || ! isNumericPrimitive ( expr . resultType ( ) ) ) { throw new IllegalArgumentException ( "Cannot convert from " + expr . resultType ( ) + " to " + to ) ; } return new Expression ( to , expr . features ( ) ) { @ Override pr...
public class HttpServletResponseWrapper { /** * The default behaviour of this method is to call * { @ link HttpServletResponse # setTrailerFields } on the wrapped response * object . * @ param supplier of trailer headers * @ since Servlet 4.0 */ @ Override public void setTrailerFields ( Supplier < Map < String ...
_getHttpServletResponse ( ) . setTrailerFields ( supplier ) ;
public class ByteCodeParser { /** * Parses a method ref constant pool entry . */ private MethodRefConstant parseMethodRefConstant ( int index ) throws IOException { } }
int classIndex = readShort ( ) ; int nameAndTypeIndex = readShort ( ) ; return new MethodRefConstant ( _class . getConstantPool ( ) , index , classIndex , nameAndTypeIndex ) ;
public class AnimatorSet { /** * { @ inheritDoc } * < p > Starting this < code > AnimatorSet < / code > will , in turn , start the animations for which * it is responsible . The details of when exactly those animations are started depends on * the dependency relationships that have been set up between the animati...
mTerminated = false ; mStarted = true ; // First , sort the nodes ( if necessary ) . This will ensure that sortedNodes // contains the animation nodes in the correct order . sortNodes ( ) ; int numSortedNodes = mSortedNodes . size ( ) ; for ( int i = 0 ; i < numSortedNodes ; ++ i ) { Node node = mSortedNodes . get ( i ...
public class CleverTapAPI { /** * InApp */ @ Override public void notificationReady ( final CTInAppNotification inAppNotification ) { } }
if ( Looper . myLooper ( ) != Looper . getMainLooper ( ) ) { getHandlerUsingMainLooper ( ) . post ( new Runnable ( ) { @ Override public void run ( ) { notificationReady ( inAppNotification ) ; } } ) ; return ; } if ( inAppNotification . getError ( ) != null ) { getConfigLogger ( ) . debug ( getAccountId ( ) , "Unable ...
public class UpdateScriptRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( UpdateScriptRequest updateScriptRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( updateScriptRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateScriptRequest . getScriptId ( ) , SCRIPTID_BINDING ) ; protocolMarshaller . marshall ( updateScriptRequest . getName ( ) , NAME_BINDING ) ; protocolMarshaller ...
public class SessionBeanTypeImpl { /** * If not already created , a new < code > concurrent - method < / code > element will be created and returned . * Otherwise , the first existing < code > concurrent - method < / code > element will be returned . * @ return the instance defined for the element < code > concurre...
List < Node > nodeList = childNode . get ( "concurrent-method" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new ConcurrentMethodTypeImpl < SessionBeanType < T > > ( this , "concurrent-method" , childNode , nodeList . get ( 0 ) ) ; } return createConcurrentMethod ( ) ;
public class ImageIconCache { /** * Retourne une imageIcon à partir du cache , redimensionnée . * @ param fileName String * @ param targetWidth int * @ param targetHeight int * @ return ImageIcon */ public static ImageIcon getScaledImageIcon ( String fileName , int targetWidth , int targetHeight ) { } }
return MSwingUtilities . getScaledInstance ( getImageIcon ( fileName ) , targetWidth , targetHeight ) ;
public class LazyTreeReader { /** * Adjust all streams to the beginning of the row index entry specified , backwards means that * a previous value is being read and forces the index entry to be restarted , otherwise , has * no effect if we ' re already in the current index entry * @ param rowIndexEntry * @ para...
if ( backwards || rowIndexEntry != computeRowIndexEntry ( previousRow ) ) { // initialize the previousPositionProvider previousRowIndexEntry = rowIndexEntry ; // if the present stream exists and we are seeking backwards or to a new row Index entry // the present stream needs to seek if ( present != null && ( backwards ...
public class TimeAndDimsPointer { /** * Compares time column value and dimension column values , but not metric column values . */ @ Override public int compareTo ( @ Nonnull TimeAndDimsPointer rhs ) { } }
long timestamp = getTimestamp ( ) ; long rhsTimestamp = rhs . getTimestamp ( ) ; int timestampDiff = Long . compare ( timestamp , rhsTimestamp ) ; if ( timestampDiff != 0 ) { return timestampDiff ; } for ( int dimIndex = 0 ; dimIndex < dimensionSelectors . length ; dimIndex ++ ) { int dimDiff = dimensionSelectorCompara...
public class LongRangeValidator { /** * VALIDATE */ public void validate ( FacesContext facesContext , UIComponent uiComponent , Object value ) throws ValidatorException { } }
if ( facesContext == null ) { throw new NullPointerException ( "facesContext" ) ; } if ( uiComponent == null ) { throw new NullPointerException ( "uiComponent" ) ; } if ( value == null ) { return ; } double dvalue = parseLongValue ( facesContext , uiComponent , value ) ; if ( _minimum != null && _maximum != null ) { if...
public class CommerceTierPriceEntryPersistenceImpl { /** * Removes the commerce tier price entry where companyId = & # 63 ; and externalReferenceCode = & # 63 ; from the database . * @ param companyId the company ID * @ param externalReferenceCode the external reference code * @ return the commerce tier price ent...
CommerceTierPriceEntry commerceTierPriceEntry = findByC_ERC ( companyId , externalReferenceCode ) ; return remove ( commerceTierPriceEntry ) ;
public class AbstractCollection { /** * Read all fields related to this collection object . * @ throws CacheReloadException on error */ private void readFromDB4Fields ( ) throws CacheReloadException { } }
try { final QueryBuilder queryBldr = new QueryBuilder ( CIAdminUserInterface . Field ) ; queryBldr . addWhereAttrEqValue ( CIAdminUserInterface . Field . Collection , getId ( ) ) ; final MultiPrintQuery multi = queryBldr . getPrint ( ) ; multi . addAttribute ( CIAdminUserInterface . Field . Type , CIAdminUserInterface ...
public class Radar { /** * Updates the position of the given poi by it ' s name ( BLIP _ NAME ) on * the radar screen . This could be useful to visualize moving points . * Keep in mind that only the poi ' s are visible as blips that are * in the range of the radar . * @ param BLIP _ NAME * @ param LOCATION */...
if ( pois . keySet ( ) . contains ( BLIP_NAME ) ) { pois . get ( BLIP_NAME ) . setLocation ( LOCATION ) ; checkForBlips ( ) ; }
public class User { /** * Validates a token sent via email for password reset . * @ param token a token * @ return true if valid */ public final boolean isValidPasswordResetToken ( String token ) { } }
Sysprop s = CoreUtils . getInstance ( ) . getDao ( ) . read ( getAppid ( ) , identifier ) ; return isValidToken ( s , Config . _RESET_TOKEN , token ) ;
public class IamCredentialsClient { /** * Signs a JWT using a service account ' s system - managed private key . * < p > Sample code : * < pre > < code > * try ( IamCredentialsClient iamCredentialsClient = IamCredentialsClient . create ( ) ) { * ServiceAccountName name = ServiceAccountName . of ( " [ PROJECT ] ...
SignJwtRequest request = SignJwtRequest . newBuilder ( ) . setName ( name == null ? null : name . toString ( ) ) . addAllDelegates ( delegates ) . setPayload ( payload ) . build ( ) ; return signJwt ( request ) ;
public class EntityPropertyDescFactory { /** * 識別子を生成する方法を検証します 。 * @ param generationType 識別子を生成する方法 */ protected void validateGenerationType ( GenerationType generationType ) { } }
if ( generationType == null ) { return ; } if ( generationType == GenerationType . IDENTITY ) { if ( ! dialect . supportsIdentity ( ) ) { throw new GenException ( Message . DOMAGEN0003 , dialect . getName ( ) ) ; } } else if ( generationType == GenerationType . SEQUENCE ) { if ( ! dialect . supportsSequence ( ) ) { thr...
public class TableSawQuandlSession { /** * Create a Quandl session with detailed SessionOptions . No attempt will be made to read the java property < em > quandl . auth . token < / em > even * if available . Note creating this object does not make any actual API requests , the token is used in subsequent requests . ...
ArgumentChecker . notNull ( sessionOptions , "sessionOptions" ) ; return new TableSawQuandlSession ( sessionOptions , new JSONTableSawRESTDataProvider ( ) , new ClassicMetaDataPackager ( ) ) ;
public class ServiceUtil { /** * Build an object out of a given class and a map for field names to values . * @ param clazz The class to be created . * @ param params A map of the parameters . * @ return An instantiated object . * @ throws Exception when constructor fails . */ public static Object constructByNa...
Object obj = clazz . getConstructor ( ) . newInstance ( ) ; Method [ ] allMethods = clazz . getMethods ( ) ; for ( Method method : allMethods ) { if ( method . getName ( ) . startsWith ( "set" ) ) { Object [ ] o = new Object [ 1 ] ; String propertyName = Introspector . decapitalize ( method . getName ( ) . substring ( ...
public class SchemaHelper { /** * Maps simple types supported by RAML into primitives and other simple Java * types * @ param param * The Type to map * @ param format * Number format specified * @ param rawType * RAML type * @ return The Java Class which maps to this Simple RAML ParamType or string * ...
switch ( param ) { case BOOLEAN : return Boolean . class ; case DATE : return mapDateFormat ( rawType ) ; case INTEGER : { Class < ? > fromFormat = mapNumberFromFormat ( format ) ; if ( fromFormat == Double . class ) { throw new IllegalStateException ( ) ; } if ( fromFormat == null ) { return Long . class ; // retained...
public class Replace_First { /** * replace _ first ( input , string , replacement = ' ' ) * Replace the first occurrences of a string with another */ @ Override public Object apply ( Object value , Object ... params ) { } }
String original = super . asString ( value ) ; Object needle = super . get ( 0 , params ) ; String replacement = "" ; if ( needle == null ) { throw new RuntimeException ( "invalid pattern: " + needle ) ; } if ( params . length >= 2 ) { Object obj = super . get ( 1 , params ) ; if ( obj == null ) { throw new RuntimeExce...
public class Resolve { /** * Try to instantiate the type of a method so that it fits * given type arguments and argument types . If successful , return * the method ' s instantiated type , else return null . * The instantiation will take into account an additional leading * formal parameter if the method is an ...
Type mt = types . memberType ( site , m ) ; // tvars is the list of formal type variables for which type arguments // need to inferred . List < Type > tvars = List . nil ( ) ; if ( typeargtypes == null ) typeargtypes = List . nil ( ) ; if ( ! mt . hasTag ( FORALL ) && typeargtypes . nonEmpty ( ) ) { // This is not a po...
public class HmlUtils { /** * Convert the specified HML Sequence element into a DNA symbol list . * @ param sequence HML Sequence element , must not be null * @ return the specified HML Sequence element converted into a DNA symbol list * @ throws IllegalSymbolException if an illegal symbol is found */ public stat...
checkNotNull ( sequence ) ; return DNATools . createDNA ( sequence . getValue ( ) . replaceAll ( "\\s+" , "" ) ) ;
public class SuspensionRecord { /** * Sets the detailed infraction history . * @ param history The detailed infraction history . Cannot be null or empty . */ public void setInfractionHistory ( List < Long > history ) { } }
SystemAssert . requireArgument ( history != null && ! history . isEmpty ( ) , "Infraction History cannot be set to null or empty." ) ; this . infractionHistory = history ;
public class CPDefinitionOptionValueRelUtil { /** * Returns the cp definition option value rels before and after the current cp definition option value rel in the ordered set where CPDefinitionOptionRelId = & # 63 ; . * @ param CPDefinitionOptionValueRelId the primary key of the current cp definition option value rel...
return getPersistence ( ) . findByCPDefinitionOptionRelId_PrevAndNext ( CPDefinitionOptionValueRelId , CPDefinitionOptionRelId , orderByComparator ) ;
public class ConvertedObjectPool { /** * get the converted object corresponding to sourceObject as converted to * destination type by converter * @ param converter * @ param sourceObject * @ param destinationType * @ return */ public Object get ( IConverter converter , Object sourceObject , TypeReference < ? ...
return convertedObjects . get ( new ConvertedObjectsKey ( converter , sourceObject , destinationType ) ) ;
public class JSpinnerEditorValueProvider { /** * Retrieves the text currently in the text component of the spinner , if any . * Note that if editor of the spinner has been customized , this method may need to be adapted in a sub - class . * @ return Spinner text or null if not found . */ protected String getText ( ...
String text = null ; // Try to find a text component in the spinner JTextComponent textEditorComponent ; if ( spinner . getEditor ( ) instanceof JTextComponent ) { textEditorComponent = ( JTextComponent ) spinner . getEditor ( ) ; } else if ( spinner . getEditor ( ) instanceof JSpinner . DefaultEditor ) { textEditorCom...
public class CPDefinitionInventoryLocalServiceWrapper { /** * Returns the cp definition inventory matching the UUID and group . * @ param uuid the cp definition inventory ' s UUID * @ param groupId the primary key of the group * @ return the matching cp definition inventory * @ throws PortalException if a match...
return _cpDefinitionInventoryLocalService . getCPDefinitionInventoryByUuidAndGroupId ( uuid , groupId ) ;
public class ZipUtil { /** * 对流中的数据加入到压缩文件 , 使用默认UTF - 8编码 * @ param zipFile 生成的Zip文件 , 包括文件名 。 注意 : zipPath不能是srcPath路径下的子文件夹 * @ param path 流数据在压缩文件中的路径或文件名 * @ param data 要压缩的数据 * @ return 压缩文件 * @ throws UtilException IO异常 * @ since 3.0.6 */ public static File zip ( File zipFile , String path , String d...
return zip ( zipFile , path , data , DEFAULT_CHARSET ) ;
public class MapUtil { /** * 根据等号左边的类型 , 构造类型正确的HashMap . * 同时初始化元素 . */ public static < K , V > HashMap < K , V > newHashMap ( @ NotNull final List < K > keys , @ NotNull final List < V > values ) { } }
Validate . isTrue ( keys . size ( ) == values . size ( ) , "keys.length is %s but values.length is %s" , keys . size ( ) , values . size ( ) ) ; HashMap < K , V > map = new HashMap < K , V > ( keys . size ( ) * 2 ) ; Iterator < K > keyIt = keys . iterator ( ) ; Iterator < V > valueIt = values . iterator ( ) ; while ( ...
public class FileSystem { /** * Add the extension of to specified filename . * If the filename has already the given extension , the filename is not changed . * If the filename has no extension or an other extension , the specified one is added . * @ param filename is the filename to parse . * @ param extension...
if ( filename != null && ! hasExtension ( filename , extension ) ) { String extent = extension ; if ( ! "" . equals ( extent ) && ! extent . startsWith ( EXTENSION_SEPARATOR ) ) { // $ NON - NLS - 1 $ extent = EXTENSION_SEPARATOR + extent ; } return new File ( filename . getParentFile ( ) , filename . getName ( ) + ext...
public class DescribeFleetResult { /** * A list of robots . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setRobots ( java . util . Collection ) } or { @ link # withRobots ( java . util . Collection ) } if you want to override the * existing values . * ...
if ( this . robots == null ) { setRobots ( new java . util . ArrayList < Robot > ( robots . length ) ) ; } for ( Robot ele : robots ) { this . robots . add ( ele ) ; } return this ;
public class AbstractPlainDatagramSocketImpl { /** * Connects a datagram socket to a remote destination . This associates the remote * address with the local socket so that datagrams may only be sent to this destination * and received from this destination . * @ param address the remote InetAddress to connect to ...
BlockGuard . getThreadPolicy ( ) . onNetwork ( ) ; connect0 ( address , port ) ; connectedAddress = address ; connectedPort = port ; connected = true ;
public class KarafDistributionOption { /** * This option allows to configure each configuration file based on the karaf . home location . The * value is " put " . Which means it is either replaced or added . * If you like to extend an option ( e . g . make a = b to a = b , c ) please make use of the * { @ link Ka...
return new KarafDistributionConfigurationFilePutOption ( configurationFilePath , key , value ) ;
public class VdWRadiusDescriptor { /** * This method calculate the Van der Waals radius of an atom . * @ param container The { @ link IAtomContainer } for which the descriptor is to be calculated * @ return The Van der Waals radius of the atom */ @ Override public DescriptorValue calculate ( IAtom atom , IAtomConta...
String symbol = atom . getSymbol ( ) ; double vdwradius = PeriodicTable . getVdwRadius ( symbol ) ; return new DescriptorValue ( getSpecification ( ) , getParameterNames ( ) , getParameters ( ) , new DoubleResult ( vdwradius ) , NAMES ) ;
public class DockPaneModel { /** * { @ inheritDoc } */ @ Override protected void initModel ( ) { } }
final WaveChecker waveChecker = wave -> ObjectUtility . equalsOrBothNull ( wave . get ( DOCK_KEY ) , object ( ) . id ( ) ) ; listen ( waveChecker , ADD ) ; listen ( waveChecker , REMOVE ) ; if ( ObjectUtility . nullOrEmpty ( object ( ) . id ( ) ) ) { object ( ) . id ( DockPaneModel . class . getSimpleName ( ) + DOCK_CO...
public class FSDirectory { /** * Get the file info for a specific file . * @ param src The string representation of the path to the file * @ return object containing information regarding the file * or null if file not found */ FileStatus getFileInfo ( String src , INode targetNode ) { } }
String srcs = normalizePath ( src ) ; readLock ( ) ; try { if ( targetNode == null ) { return null ; } else { return createFileStatus ( srcs , targetNode ) ; } } finally { readUnlock ( ) ; }
public class JaxWsHttpServletRequestAdapter { /** * ( non - Javadoc ) * @ see javax . servlet . ServletRequest # getRemoteHost ( ) */ @ Override public String getRemoteHost ( ) { } }
try { collaborator . preInvoke ( componentMetaData ) ; return request . getRemoteHost ( ) ; } finally { collaborator . postInvoke ( ) ; }
public class AttachmentServlet { /** * Also audit logs create and delete . */ private void authorize ( HttpSession session , Action action , Entity entity , String location ) throws AuthorizationException , DataAccessException { } }
AuthenticatedUser user = ( AuthenticatedUser ) session . getAttribute ( "authenticatedUser" ) ; if ( user == null && ApplicationContext . getServiceUser ( ) != null ) { String cuid = ApplicationContext . getServiceUser ( ) ; user = new AuthenticatedUser ( UserGroupCache . getUser ( cuid ) ) ; } if ( user == null ) thro...
public class SoftwareModuleSpecification { /** * { @ link Specification } for retrieving { @ link SoftwareModule } s by " like * name or like version " . * @ param type * to be filtered on * @ return the { @ link SoftwareModule } { @ link Specification } */ public static Specification < JpaSoftwareModule > equa...
return ( targetRoot , query , cb ) -> cb . equal ( targetRoot . < JpaSoftwareModuleType > get ( JpaSoftwareModule_ . type ) . get ( JpaSoftwareModuleType_ . id ) , type ) ;
public class DatalogProgram2QueryConverterImpl { /** * TODO : explain */ private static Optional < ImmutableQueryModifiers > convertModifiers ( MutableQueryModifiers queryModifiers ) { } }
if ( queryModifiers . hasModifiers ( ) ) { ImmutableQueryModifiers immutableQueryModifiers = new ImmutableQueryModifiersImpl ( queryModifiers ) ; return Optional . of ( immutableQueryModifiers ) ; } else { return Optional . empty ( ) ; }
public class UpdateResourceRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( UpdateResourceRequest updateResourceRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( updateResourceRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateResourceRequest . getOrganizationId ( ) , ORGANIZATIONID_BINDING ) ; protocolMarshaller . marshall ( updateResourceRequest . getResourceId ( ) , RESOURCEID_B...
public class ClassLister { /** * Adds / appends a class hierarchy . * @ param superclassthe superclass * @ param packagesthe packages */ public void addHierarchy ( String superclass , String [ ] packages ) { } }
List < String > names ; List < Class > classes ; String [ ] patterns ; int i ; Pattern p ; ClassLocator locator ; locator = getClassLocator ( ) ; names = locator . findNames ( superclass , packages ) ; classes = locator . findClasses ( superclass , packages ) ; // remove blacklisted classes if ( m_Blacklist . containsK...
public class SARLPreferences { /** * Replies the preference store for the given project . * @ param project the project . * @ return the preference store or < code > null < / code > . */ public static IPreferenceStore getSARLPreferencesFor ( IProject project ) { } }
if ( project != null ) { final Injector injector = LangActivator . getInstance ( ) . getInjector ( LangActivator . IO_SARL_LANG_SARL ) ; final IPreferenceStoreAccess preferenceStoreAccess = injector . getInstance ( IPreferenceStoreAccess . class ) ; return preferenceStoreAccess . getWritablePreferenceStore ( project ) ...