signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class MBeanExporter { /** * Unexports all MBeans that have been exported through this MBeanExporter .
* @ return a map of object names that could not be exported and the corresponding exception . */
public Map < String , Exception > unexportAllAndReportMissing ( ) { } } | Map < String , Exception > errors = new HashMap < > ( ) ; synchronized ( exportedObjects ) { List < ObjectName > toRemove = new ArrayList < > ( exportedObjects . size ( ) ) ; for ( ObjectName objectName : exportedObjects . keySet ( ) ) { try { server . unregisterMBean ( objectName ) ; toRemove . add ( objectName ) ; } catch ( InstanceNotFoundException e ) { // ignore . . . mbean has already been unregistered elsewhere
toRemove . add ( objectName ) ; } catch ( MBeanRegistrationException e ) { // noinspection ThrowableResultOfMethodCallIgnored
errors . put ( objectName . toString ( ) , e ) ; } } exportedObjects . keySet ( ) . removeAll ( toRemove ) ; } return errors ; |
public class Integrator { /** * Read plug - in feature .
* @ param featureName plug - in feature name
* @ return combined list of values */
private String readExtensions ( final String featureName ) { } } | final Set < String > exts = new HashSet < > ( ) ; if ( featureTable . containsKey ( featureName ) ) { for ( final Value ext : featureTable . get ( featureName ) ) { final String e = ext . value . trim ( ) ; if ( e . length ( ) != 0 ) { exts . add ( e ) ; } } } return StringUtils . join ( exts , CONF_LIST_SEPARATOR ) ; |
public class BucketSplitter { /** * Determines the number of elements when the partitions must have equal sizes
* @ param numberOfPartitions
* @ return int */
protected int determineElementsPerPart ( int numberOfPartitions ) { } } | double numberOfElementsWithinFile = sourceFile . getFilledUpFromContentStart ( ) / sourceFile . getElementSize ( ) ; double elementsPerPart = numberOfElementsWithinFile / numberOfPartitions ; int roundNumber = ( int ) Math . ceil ( elementsPerPart ) ; return roundNumber ; |
public class OptionValueImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setValue ( String newValue ) { } } | String oldValue = value ; value = newValue ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , SimpleAntlrPackage . OPTION_VALUE__VALUE , oldValue , value ) ) ; |
public class AbstractFileInfo { /** * Try to locate a file in the file system .
* @ param directory a directory to locate the file in
* @ param fileName a file name with optional path information
* @ return true if the file was found , false otherwise */
protected final boolean tryFS ( String directory , String fileName ) { } } | String path = directory + "/" + fileName ; if ( directory == null ) { path = fileName ; } File file = new File ( path ) ; if ( this . testFile ( file ) == true ) { // found in file system
try { this . url = file . toURI ( ) . toURL ( ) ; this . file = file ; this . fullFileName = FilenameUtils . getName ( file . getAbsolutePath ( ) ) ; if ( directory != null ) { this . setRootPath = directory ; } return true ; } catch ( MalformedURLException e ) { this . errors . addError ( "init() - malformed URL for file with name " + this . file . getAbsolutePath ( ) + " and message: " + e . getMessage ( ) ) ; } } return false ; |
public class PaxWicketBundleListener { /** * { @ inheritDoc } */
@ Override public void removedBundle ( Bundle bundle , BundleEvent event , ExtendedBundle object ) { } } | removeRelevantBundle ( object ) ; LOGGER . debug ( "{} is removed as a relevant bundle for pax wicket" , bundle . getSymbolicName ( ) ) ; |
public class TorqueModelDef { /** * Adds a table to this model .
* @ param table The table */
private void addTable ( TableDef table ) { } } | table . setOwner ( this ) ; _tableDefs . put ( table . getName ( ) , table ) ; |
public class CommentImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eUnset ( int featureID ) { } } | switch ( featureID ) { case AfplibPackage . COMMENT__COMMENT : setComment ( COMMENT_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ; |
public class Parser { /** * { @ code a . otherwise ( fallback ) } runs { @ code fallback } when { @ code a } matches zero input . This is different
* from { @ code a . or ( alternative ) } where { @ code alternative } is run whenever { @ code a } fails to match .
* < p > One should usually use { @ link # or } .
* @ param fallback the parser to run if { @ code this } matches no input .
* @ since 3.1 */
public final Parser < T > otherwise ( Parser < ? extends T > fallback ) { } } | return new Parser < T > ( ) { @ Override boolean apply ( ParseContext ctxt ) { final Object result = ctxt . result ; final int at = ctxt . at ; final int step = ctxt . step ; final int errorIndex = ctxt . errorIndex ( ) ; if ( Parser . this . apply ( ctxt ) ) return true ; if ( ctxt . errorIndex ( ) != errorIndex ) return false ; ctxt . set ( step , at , result ) ; return fallback . apply ( ctxt ) ; } @ Override public String toString ( ) { return "otherwise" ; } } ; |
public class CmsDecoratorConfiguration { /** * Adds decorations defined in a < code > { @ link CmsDecorationDefintion } < / code > object to the map of all decorations . < p >
* @ param decorationDefinition the < code > { @ link CmsDecorationDefintion } < / code > the decorations to be added
* @ throws CmsException if something goes wrong */
public void addDecorations ( CmsDecorationDefintion decorationDefinition ) throws CmsException { } } | m_decorations . putAll ( decorationDefinition . createDecorationBundle ( m_cms , m_configurationLocale ) . getAll ( ) ) ; |
public class AmpSkin { /** * * * * * * Initialization * * * * * */
private void initGraphics ( ) { } } | // Set initial size
if ( Double . compare ( gauge . getPrefWidth ( ) , 0.0 ) <= 0 || Double . compare ( gauge . getPrefHeight ( ) , 0.0 ) <= 0 || Double . compare ( gauge . getWidth ( ) , 0.0 ) <= 0 || Double . compare ( gauge . getHeight ( ) , 0.0 ) <= 0 ) { if ( gauge . getPrefWidth ( ) > 0 && gauge . getPrefHeight ( ) > 0 ) { gauge . setPrefSize ( gauge . getPrefWidth ( ) , gauge . getPrefHeight ( ) ) ; } else { gauge . setPrefSize ( PREFERRED_WIDTH , PREFERRED_HEIGHT ) ; } } ticksAndSectionsCanvas = new Canvas ( PREFERRED_WIDTH , PREFERRED_HEIGHT ) ; ticksAndSections = ticksAndSectionsCanvas . getGraphicsContext2D ( ) ; ledCanvas = new Canvas ( ) ; led = ledCanvas . getGraphicsContext2D ( ) ; thresholdTooltip = new Tooltip ( "Threshold\n(" + String . format ( locale , formatString , gauge . getThreshold ( ) ) + ")" ) ; thresholdTooltip . setTextAlignment ( TextAlignment . CENTER ) ; threshold = new Path ( ) ; Helper . enableNode ( threshold , gauge . isThresholdVisible ( ) ) ; Tooltip . install ( threshold , thresholdTooltip ) ; average = new Path ( ) ; Helper . enableNode ( average , gauge . isAverageVisible ( ) ) ; markerPane = new Pane ( ) ; needleRotate = new Rotate ( 180 - START_ANGLE ) ; needleRotate . setAngle ( needleRotate . getAngle ( ) + ( gauge . getValue ( ) - oldValue - gauge . getMinValue ( ) ) * angleStep ) ; needleMoveTo1 = new MoveTo ( ) ; needleCubicCurveTo2 = new CubicCurveTo ( ) ; needleCubicCurveTo3 = new CubicCurveTo ( ) ; needleCubicCurveTo4 = new CubicCurveTo ( ) ; needleLineTo5 = new LineTo ( ) ; needleCubicCurveTo6 = new CubicCurveTo ( ) ; needleClosePath7 = new ClosePath ( ) ; needle = new Path ( needleMoveTo1 , needleCubicCurveTo2 , needleCubicCurveTo3 , needleCubicCurveTo4 , needleLineTo5 , needleCubicCurveTo6 , needleClosePath7 ) ; needle . setFillRule ( FillRule . EVEN_ODD ) ; needle . getTransforms ( ) . setAll ( needleRotate ) ; dropShadow = new DropShadow ( ) ; dropShadow . setColor ( Color . rgb ( 0 , 0 , 0 , 0.25 ) ) ; dropShadow . setBlurType ( BlurType . TWO_PASS_BOX ) ; dropShadow . setRadius ( 0.015 * PREFERRED_WIDTH ) ; dropShadow . setOffsetY ( 0.015 * PREFERRED_WIDTH ) ; shadowGroup = new Group ( needle ) ; shadowGroup . setEffect ( gauge . isShadowsEnabled ( ) ? dropShadow : null ) ; titleText = new Text ( gauge . getTitle ( ) ) ; titleText . setTextOrigin ( VPos . CENTER ) ; titleText . setFill ( gauge . getTitleColor ( ) ) ; Helper . enableNode ( titleText , ! gauge . getTitle ( ) . isEmpty ( ) ) ; unitText = new Text ( gauge . getUnit ( ) ) ; unitText . setMouseTransparent ( true ) ; unitText . setTextOrigin ( VPos . CENTER ) ; lcd = new Rectangle ( 0.3 * PREFERRED_WIDTH , 0.1 * PREFERRED_HEIGHT ) ; lcd . setArcWidth ( 0.0125 * PREFERRED_HEIGHT ) ; lcd . setArcHeight ( 0.0125 * PREFERRED_HEIGHT ) ; lcd . relocate ( ( PREFERRED_WIDTH - lcd . getWidth ( ) ) * 0.5 , 0.44 * PREFERRED_HEIGHT ) ; Helper . enableNode ( lcd , gauge . isLcdVisible ( ) && gauge . isValueVisible ( ) ) ; lcdText = new Label ( String . format ( locale , "%." + gauge . getDecimals ( ) + "f" , gauge . getValue ( ) ) ) ; lcdText . setAlignment ( Pos . CENTER_RIGHT ) ; lcdText . setVisible ( gauge . isValueVisible ( ) ) ; // Set initial value
angleStep = ANGLE_RANGE / gauge . getRange ( ) ; double targetAngle = 180 - START_ANGLE + ( gauge . getValue ( ) - gauge . getMinValue ( ) ) * angleStep ; targetAngle = clamp ( 180 - START_ANGLE , 180 - START_ANGLE + ANGLE_RANGE , targetAngle ) ; needleRotate . setAngle ( targetAngle ) ; lightEffect = new InnerShadow ( BlurType . TWO_PASS_BOX , Color . rgb ( 255 , 255 , 255 , 0.65 ) , 2 , 0.0 , 0.0 , 2.0 ) ; foreground = new SVGPath ( ) ; foreground . setContent ( "M 26 26.5 C 26 20.2432 26.2432 20 32.5 20 L 277.5 20 C 283.7568 20 284 20.2432 284 26.5 L 284 143.5 C 284 149.7568 283.7568 150 277.5 150 L 32.5 150 C 26.2432 150 26 149.7568 26 143.5 L 26 26.5 ZM 0 6.7241 L 0 253.2758 C 0 260 0 260 6.75 260 L 303.25 260 C 310 260 310 260 310 253.2758 L 310 6.7241 C 310 0 310 0 303.25 0 L 6.75 0 C 0 0 0 0 0 6.7241 Z" ) ; foreground . setEffect ( lightEffect ) ; // Add all nodes
pane = new Pane ( ) ; pane . getChildren ( ) . setAll ( ticksAndSectionsCanvas , markerPane , ledCanvas , unitText , lcd , lcdText , shadowGroup , foreground , titleText ) ; getChildren ( ) . setAll ( pane ) ; |
public class FctBnAccEntitiesProcessors { /** * < p > Get PrcPrepaymentToGfr ( create and put into map ) . < / p >
* @ param pAddParam additional param
* @ return requested PrcPrepaymentToGfr
* @ throws Exception - an exception */
protected final PrcPrepaymentToGfr < RS > createPutPrcPrepaymentToGfr ( final Map < String , Object > pAddParam ) throws Exception { } } | PrcPrepaymentToGfr < RS > proc = new PrcPrepaymentToGfr < RS > ( ) ; @ SuppressWarnings ( "unchecked" ) IEntityProcessor < PrepaymentTo , Long > procDlg = ( IEntityProcessor < PrepaymentTo , Long > ) lazyGetPrcAccDocGetForReverse ( pAddParam ) ; proc . setPrcAccDocGetForReverse ( procDlg ) ; proc . setSrvTypeCode ( getSrvTypeCode ( ) ) ; // assigning fully initialized object :
this . processorsMap . put ( PrcPrepaymentToGfr . class . getSimpleName ( ) , proc ) ; return proc ; |
public class StringEditor { /** * Finds the next appearance of the String .
* @ param str */
@ Override public synchronized void findNext ( String str ) { } } | boolean found = false ; int startLine = line ; int startColumn = column + 1 ; // We always start one char after the cursor position .
while ( ! found && startLine <= lines . size ( ) ) { String currentLine = getContent ( startLine ) ; String linePart = currentLine . length ( ) > startColumn ? currentLine . substring ( startColumn - 1 ) : "" ; if ( linePart . contains ( str ) ) { column = startColumn + linePart . indexOf ( str ) ; line = startLine ; found = true ; } else { startLine ++ ; startColumn = 1 ; } } |
public class Profiler { /** * This method is used in tests . */
void sanityCheck ( ) throws IllegalStateException { } } | if ( getStatus ( ) != TimeInstrumentStatus . STOPPED ) { throw new IllegalStateException ( "time instrument [" + getName ( ) + " is not stopped" ) ; } long totalElapsed = globalStopWatch . elapsedTime ( ) ; long childTotal = 0 ; for ( TimeInstrument ti : childTimeInstrumentList ) { childTotal += ti . elapsedTime ( ) ; if ( ti . getStatus ( ) != TimeInstrumentStatus . STOPPED ) { throw new IllegalStateException ( "time instrument [" + ti . getName ( ) + " is not stopped" ) ; } if ( ti instanceof Profiler ) { Profiler nestedProfiler = ( Profiler ) ti ; nestedProfiler . sanityCheck ( ) ; } } if ( totalElapsed < childTotal ) { throw new IllegalStateException ( "children have a higher accumulated elapsed time" ) ; } |
public class ResourceManager { /** * Fetches and decodes the specified resource into a { @ link BufferedImage } .
* @ exception FileNotFoundException thrown if the resource could not be located in any of the
* bundles in the specified set , or if the specified set does not exist .
* @ exception IOException thrown if a problem occurs locating or reading the resource . */
public BufferedImage getImageResource ( String rset , String path ) throws IOException { } } | // grab the resource bundles in the specified resource set
ResourceBundle [ ] bundles = getResourceSet ( rset ) ; if ( bundles == null ) { throw new FileNotFoundException ( "Unable to locate image resource [set=" + rset + ", path=" + path + "]" ) ; } String localePath = getLocalePath ( path ) ; // look for the resource in any of the bundles
for ( ResourceBundle bundle : bundles ) { BufferedImage image ; // try a localized version first
if ( localePath != null ) { image = bundle . getImageResource ( localePath , false ) ; if ( image != null ) { return image ; } } // if we didn ' t find that , try generic
image = bundle . getImageResource ( path , false ) ; if ( image != null ) { return image ; } } throw new FileNotFoundException ( "Unable to locate image resource [set=" + rset + ", path=" + path + "]" ) ; |
public class Fallback { /** * Configures the { @ code fallback } to be executed asynchronously if execution fails . The { @ code fallback } applies an
* { @ link ExecutionAttemptedEvent } .
* @ throws NullPointerException if { @ code fallback } is null */
@ SuppressWarnings ( "unchecked" ) public static < R > Fallback < R > ofAsync ( CheckedFunction < ExecutionAttemptedEvent < ? extends R > , ? extends R > fallback ) { } } | return new Fallback < > ( Assert . notNull ( ( CheckedFunction ) fallback , "fallback" ) , true ) ; |
public class KeyboardManager { /** * documentation inherited from interface AncestorListener */
public void ancestorAdded ( AncestorEvent e ) { } } | gainedFocus ( ) ; if ( _window == null ) { _window = SwingUtilities . getWindowAncestor ( _target ) ; _window . addWindowFocusListener ( this ) ; } |
public class Mp2SettingsMarshaller { /** * Marshall the given parameter object . */
public void marshall ( Mp2Settings mp2Settings , ProtocolMarshaller protocolMarshaller ) { } } | if ( mp2Settings == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( mp2Settings . getBitrate ( ) , BITRATE_BINDING ) ; protocolMarshaller . marshall ( mp2Settings . getChannels ( ) , CHANNELS_BINDING ) ; protocolMarshaller . marshall ( mp2Settings . getSampleRate ( ) , SAMPLERATE_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; } |
public class CxxIssuesReportSensor { /** * Saves a code violation which is detected in the given file / line and has given ruleId and message . Saves it to the
* given project and context . Project or file - level violations can be saved by passing null for the according
* parameters ( ' file ' = null for project level , ' line ' = null for file - level ) */
private void saveViolation ( SensorContext sensorContext , CxxReportIssue issue ) { } } | NewIssue newIssue = sensorContext . newIssue ( ) . forRule ( RuleKey . of ( getRuleRepositoryKey ( ) , issue . getRuleId ( ) ) ) ; Set < InputFile > affectedFiles = new HashSet < > ( ) ; List < NewIssueLocation > newIssueLocations = new ArrayList < > ( ) ; List < NewIssueLocation > newIssueFlow = new ArrayList < > ( ) ; for ( CxxReportLocation location : issue . getLocations ( ) ) { if ( location . getFile ( ) != null && ! location . getFile ( ) . isEmpty ( ) ) { NewIssueLocation newIssueLocation = createNewIssueLocationFile ( sensorContext , newIssue , location , affectedFiles ) ; if ( newIssueLocation != null ) { newIssueLocations . add ( newIssueLocation ) ; } } else { NewIssueLocation newIssueLocation = createNewIssueLocationModule ( sensorContext , newIssue , location ) ; newIssueLocations . add ( newIssueLocation ) ; } } for ( CxxReportLocation location : issue . getFlow ( ) ) { NewIssueLocation newIssueLocation = createNewIssueLocationFile ( sensorContext , newIssue , location , affectedFiles ) ; if ( newIssueLocation != null ) { newIssueFlow . add ( newIssueLocation ) ; } else { LOG . debug ( "Failed to create new issue location from flow location {}" , location ) ; newIssueFlow . clear ( ) ; break ; } } if ( ! newIssueLocations . isEmpty ( ) ) { try { newIssue . at ( newIssueLocations . get ( 0 ) ) ; for ( int i = 1 ; i < newIssueLocations . size ( ) ; i ++ ) { newIssue . addLocation ( newIssueLocations . get ( i ) ) ; } // paths with just one element are not reported as flows to avoid
// presenting 1 - element flows in SonarQube UI
if ( newIssueFlow . size ( ) > 1 ) { newIssue . addFlow ( newIssueFlow ) ; } newIssue . save ( ) ; for ( InputFile affectedFile : affectedFiles ) { violationsPerFileCount . merge ( affectedFile , 1 , Integer :: sum ) ; } violationsPerModuleCount ++ ; } catch ( RuntimeException ex ) { LOG . error ( "Could not add the issue '{}':{}', skipping issue" , issue . toString ( ) , CxxUtils . getStackTrace ( ex ) ) ; CxxUtils . validateRecovery ( ex , getLanguage ( ) ) ; } } |
public class PolylineEncoding { /** * Decodes an encoded path string into a sequence of LatLngs . */
public static List < LatLng > decode ( final String encodedPath ) { } } | int len = encodedPath . length ( ) ; final List < LatLng > path = new ArrayList < > ( len / 2 ) ; int index = 0 ; int lat = 0 ; int lng = 0 ; while ( index < len ) { int result = 1 ; int shift = 0 ; int b ; do { b = encodedPath . charAt ( index ++ ) - 63 - 1 ; result += b << shift ; shift += 5 ; } while ( b >= 0x1f ) ; lat += ( result & 1 ) != 0 ? ~ ( result >> 1 ) : ( result >> 1 ) ; result = 1 ; shift = 0 ; do { b = encodedPath . charAt ( index ++ ) - 63 - 1 ; result += b << shift ; shift += 5 ; } while ( b >= 0x1f ) ; lng += ( result & 1 ) != 0 ? ~ ( result >> 1 ) : ( result >> 1 ) ; path . add ( new LatLng ( lat * 1e-5 , lng * 1e-5 ) ) ; } return path ; |
public class FileMgr { /** * Returns the file channel for the specified filename . The file channel is
* stored in a map keyed on the filename . If the file is not open , then it
* is opened and the file channel is added to the map .
* @ param fileName
* the specified filename
* @ return the file channel associated with the open file .
* @ throws IOException */
private IoChannel getFileChannel ( String fileName ) throws IOException { } } | synchronized ( prepareAnchor ( fileName ) ) { IoChannel fileChannel = openFiles . get ( fileName ) ; if ( fileChannel == null ) { File dbFile = fileName . equals ( DEFAULT_LOG_FILE ) ? new File ( logDirectory , fileName ) : new File ( dbDirectory , fileName ) ; fileChannel = IoAllocator . newIoChannel ( dbFile ) ; openFiles . put ( fileName , fileChannel ) ; } return fileChannel ; } |
public class TriplestoreResource { /** * Fetch data for this resource .
* < p > This is equivalent to the following SPARQL query :
* < pre > < code >
* SELECT ? predicate ? object ? binarySubject ? binaryPredicate ? binaryObject
* WHERE {
* GRAPH trellis : PreferServerManaged {
* IDENTIFIER ? predicate ? object
* OPTIONAL {
* IDENTIFIER dc : hasPart ? binarySubject .
* ? binarySubject ? binaryPredicate ? binaryObject
* < / code > < / pre > */
protected void fetchData ( ) { } } | LOGGER . debug ( "Fetching data from RDF datastore for: {}" , identifier ) ; final Var binarySubject = Var . alloc ( "binarySubject" ) ; final Var binaryPredicate = Var . alloc ( "binaryPredicate" ) ; final Var binaryObject = Var . alloc ( "binaryObject" ) ; final Query q = new Query ( ) ; q . setQuerySelectType ( ) ; q . addResultVar ( PREDICATE ) ; q . addResultVar ( OBJECT ) ; q . addResultVar ( binarySubject ) ; q . addResultVar ( binaryPredicate ) ; q . addResultVar ( binaryObject ) ; final ElementPathBlock epb1 = new ElementPathBlock ( ) ; epb1 . addTriple ( create ( rdf . asJenaNode ( identifier ) , PREDICATE , OBJECT ) ) ; final ElementPathBlock epb2 = new ElementPathBlock ( ) ; epb2 . addTriple ( create ( rdf . asJenaNode ( identifier ) , rdf . asJenaNode ( DC . hasPart ) , binarySubject ) ) ; epb2 . addTriple ( create ( rdf . asJenaNode ( identifier ) , rdf . asJenaNode ( RDF . type ) , rdf . asJenaNode ( LDP . NonRDFSource ) ) ) ; epb2 . addTriple ( create ( binarySubject , binaryPredicate , binaryObject ) ) ; final ElementGroup elg = new ElementGroup ( ) ; elg . addElement ( epb1 ) ; elg . addElement ( new ElementOptional ( epb2 ) ) ; q . setQueryPattern ( new ElementNamedGraph ( rdf . asJenaNode ( Trellis . PreferServerManaged ) , elg ) ) ; rdfConnection . querySelect ( q , qs -> { final RDFNode s = qs . get ( "binarySubject" ) ; final RDFNode p = qs . get ( "binaryPredicate" ) ; final RDFNode o = qs . get ( "binaryObject" ) ; nodesToTriple ( s , p , o ) . ifPresent ( t -> data . put ( t . getPredicate ( ) , t . getObject ( ) ) ) ; data . put ( getPredicate ( qs ) , getObject ( qs ) ) ; } ) ; |
public class PtrCLog { /** * Send a VERBOSE log message .
* @ param tag
* @ param msg */
public static void v ( String tag , String msg ) { } } | if ( sLevel > LEVEL_VERBOSE ) { return ; } Log . v ( tag , msg ) ; |
public class GetSecurityConfigurationRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GetSecurityConfigurationRequest getSecurityConfigurationRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( getSecurityConfigurationRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getSecurityConfigurationRequest . getName ( ) , NAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; } |
public class PolicyAssignmentsInner { /** * Creates a policy assignment .
* Policy assignments are inherited by child resources . For example , when you apply a policy to a resource group that policy is assigned to all resources in the group .
* @ param scope The scope of the policy assignment .
* @ param policyAssignmentName The name of the policy assignment .
* @ param parameters Parameters for the policy assignment .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ throws CloudException thrown if the request is rejected by server
* @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @ return the PolicyAssignmentInner object if successful . */
public PolicyAssignmentInner create ( String scope , String policyAssignmentName , PolicyAssignmentInner parameters ) { } } | return createWithServiceResponseAsync ( scope , policyAssignmentName , parameters ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class AkkaRpcServiceUtils { /** * Utility method to create RPC service from configuration and hostname , port .
* @ param hostname The hostname / address that describes the TaskManager ' s data location .
* @ param portRangeDefinition The port range to start TaskManager on .
* @ param configuration The configuration for the TaskManager .
* @ return The rpc service which is used to start and connect to the TaskManager RpcEndpoint .
* @ throws IOException Thrown , if the actor system can not bind to the address
* @ throws Exception Thrown is some other error occurs while creating akka actor system */
public static RpcService createRpcService ( String hostname , String portRangeDefinition , Configuration configuration ) throws Exception { } } | final ActorSystem actorSystem = BootstrapTools . startActorSystem ( configuration , hostname , portRangeDefinition , LOG ) ; return instantiateAkkaRpcService ( configuration , actorSystem ) ; |
public class Jenkins { /** * Gets the item by its path name from the given context
* < h2 > Path Names < / h2 >
* If the name starts from ' / ' , like " / foo / bar / zot " , then it ' s interpreted as absolute .
* Otherwise , the name should be something like " foo / bar " and it ' s interpreted like
* relative path name in the file system is , against the given context .
* < p > For compatibility , as a fallback when nothing else matches , a simple path
* like { @ code foo / bar } can also be treated with { @ link # getItemByFullName } .
* @ param context
* null is interpreted as { @ link Jenkins } . Base ' directory ' of the interpretation .
* @ since 1.406 */
public Item getItem ( String pathName , ItemGroup context ) { } } | if ( context == null ) context = this ; if ( pathName == null ) return null ; if ( pathName . startsWith ( "/" ) ) // absolute
return getItemByFullName ( pathName ) ; Object /* Item | ItemGroup */
ctx = context ; StringTokenizer tokens = new StringTokenizer ( pathName , "/" ) ; while ( tokens . hasMoreTokens ( ) ) { String s = tokens . nextToken ( ) ; if ( s . equals ( ".." ) ) { if ( ctx instanceof Item ) { ctx = ( ( Item ) ctx ) . getParent ( ) ; continue ; } ctx = null ; // can ' t go up further
break ; } if ( s . equals ( "." ) ) { continue ; } if ( ctx instanceof ItemGroup ) { ItemGroup g = ( ItemGroup ) ctx ; Item i = g . getItem ( s ) ; if ( i == null || ! i . hasPermission ( Item . READ ) ) { // TODO consider DISCOVER
ctx = null ; // can ' t go up further
break ; } ctx = i ; } else { return null ; } } if ( ctx instanceof Item ) return ( Item ) ctx ; // fall back to the classic interpretation
return getItemByFullName ( pathName ) ; |
public class ScalingQueue { /** * Inserts the specified element at the tail of this queue if there is at least one available thread to run the
* current task . If all pool threads are actively busy , it rejects the offer .
* @ param runnable the element to add .
* @ return true if it was possible to add the element to this queue , else false
* @ see ThreadPoolExecutor # execute ( Runnable ) */
@ Override public synchronized boolean offer ( Runnable runnable ) { } } | int allWorkingThreads = this . executor . getActiveCount ( ) + super . size ( ) ; return allWorkingThreads < this . executor . getPoolSize ( ) && super . offer ( runnable ) ; |
public class ViewServer { /** * Invoke this method to register a new view hierarchy .
* @ param view A view that belongs to the view hierarchy / window to register
* @ name name The name of the view hierarchy / window to register
* @ see # removeWindow ( View ) */
public void addWindow ( View view , String name ) { } } | mWindowsLock . writeLock ( ) . lock ( ) ; try { mWindows . put ( view . getRootView ( ) , name ) ; } finally { mWindowsLock . writeLock ( ) . unlock ( ) ; } fireWindowsChangedEvent ( ) ; |
public class H2O { /** * Return an error message with an accompanying list of URLs to help the user get more detailed information .
* @ param numbers H2O tech note numbers .
* @ param message Message to present to the user .
* @ return A longer message including a list of URLs . */
public static String technote ( int [ ] numbers , String message ) { } } | StringBuilder sb = new StringBuilder ( ) . append ( message ) . append ( "\n" ) . append ( "\n" ) . append ( "For more information visit:\n" ) ; for ( int number : numbers ) { sb . append ( " http://jira.h2o.ai/browse/TN-" ) . append ( Integer . toString ( number ) ) . append ( "\n" ) ; } return sb . toString ( ) ; |
public class ProxyThread { /** * Tells whether or not the given { @ code header } has a request to the ( parent ) proxy itself .
* The request is to the proxy itself if the following conditions are met :
* < ol >
* < li > The requested port is the one that the proxy is bound to ; < / li >
* < li > The requested domain is { @ link API # API _ DOMAIN } or , the requested address is one of the addresses the proxy is
* listening to . < / li >
* < / ol >
* @ param header the request that will be checked
* @ return { @ code true } if it is a request to the proxy itself , { @ code false } otherwise .
* @ see # isProxyAddress ( InetAddress ) */
private boolean isRecursive ( HttpRequestHeader header ) { } } | try { if ( header . getHostPort ( ) == inSocket . getLocalPort ( ) ) { String targetDomain = header . getHostName ( ) ; if ( API . API_DOMAIN . equals ( targetDomain ) ) { return true ; } if ( isProxyAddress ( InetAddress . getByName ( targetDomain ) ) ) { return true ; } } } catch ( Exception e ) { // ZAP : Log exceptions
log . warn ( e . getMessage ( ) , e ) ; } return false ; |
public class AWSServiceCatalogClient { /** * Disassociates the specified product from the specified portfolio .
* @ param disassociateProductFromPortfolioRequest
* @ return Result of the DisassociateProductFromPortfolio operation returned by the service .
* @ throws ResourceNotFoundException
* The specified resource was not found .
* @ throws ResourceInUseException
* A resource that is currently in use . Ensure that the resource is not in use and retry the operation .
* @ throws InvalidParametersException
* One or more parameters provided to the operation are not valid .
* @ sample AWSServiceCatalog . DisassociateProductFromPortfolio
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / servicecatalog - 2015-12-10 / DisassociateProductFromPortfolio "
* target = " _ top " > AWS API Documentation < / a > */
@ Override public DisassociateProductFromPortfolioResult disassociateProductFromPortfolio ( DisassociateProductFromPortfolioRequest request ) { } } | request = beforeClientExecution ( request ) ; return executeDisassociateProductFromPortfolio ( request ) ; |
public class LittleEndianRandomAccessFile { /** * Writes an eight - byte { @ code long } to the underlying output stream
* in little endian order , low byte first , high byte last
* @ param pLong the { @ code long } to be written .
* @ throws IOException if the underlying stream throws an IOException . */
public void writeLong ( long pLong ) throws IOException { } } | file . write ( ( int ) pLong & 0xFF ) ; file . write ( ( int ) ( pLong >>> 8 ) & 0xFF ) ; file . write ( ( int ) ( pLong >>> 16 ) & 0xFF ) ; file . write ( ( int ) ( pLong >>> 24 ) & 0xFF ) ; file . write ( ( int ) ( pLong >>> 32 ) & 0xFF ) ; file . write ( ( int ) ( pLong >>> 40 ) & 0xFF ) ; file . write ( ( int ) ( pLong >>> 48 ) & 0xFF ) ; file . write ( ( int ) ( pLong >>> 56 ) & 0xFF ) ; |
public class AbstractMojo { /** * Add rules from the given directory to the list of sources .
* @ param sources The sources .
* @ param directory The directory .
* @ throws MojoExecutionException On error . */
private void addRuleFiles ( List < RuleSource > sources , File directory ) throws MojoExecutionException { } } | List < RuleSource > ruleSources = readRulesDirectory ( directory ) ; for ( RuleSource ruleSource : ruleSources ) { getLog ( ) . debug ( "Adding rules from file " + ruleSource ) ; sources . add ( ruleSource ) ; } |
public class CommerceShippingFixedOptionPersistenceImpl { /** * Removes all the commerce shipping fixed options where commerceShippingMethodId = & # 63 ; from the database .
* @ param commerceShippingMethodId the commerce shipping method ID */
@ Override public void removeByCommerceShippingMethodId ( long commerceShippingMethodId ) { } } | for ( CommerceShippingFixedOption commerceShippingFixedOption : findByCommerceShippingMethodId ( commerceShippingMethodId , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( commerceShippingFixedOption ) ; } |
public class AopFactory { /** * 获取父类到子类的映射值 , 或者接口到实现类的映射值
* @ param from 父类或者接口
* @ return 如果映射存在则返回映射值 , 否则返回参数 from 的值 */
public Class < ? > getMappingClass ( Class < ? > from ) { } } | if ( mapping != null ) { Class < ? > ret = mapping . get ( from ) ; return ret != null ? ret : from ; } else { return from ; } |
public class DaoTemplate { /** * 更新
* @ param entity 实体对象 , 必须包含主键
* @ return 更新行数
* @ throws SQLException SQL执行异常 */
public int update ( Entity entity ) throws SQLException { } } | if ( CollectionUtil . isEmpty ( entity ) ) { return 0 ; } entity = fixEntity ( entity ) ; Object pk = entity . get ( primaryKeyField ) ; if ( null == pk ) { throw new SQLException ( StrUtil . format ( "Please determine `{}` for update" , primaryKeyField ) ) ; } final Entity where = Entity . create ( tableName ) . set ( primaryKeyField , pk ) ; final Entity record = ( Entity ) entity . clone ( ) ; record . remove ( primaryKeyField ) ; return db . update ( record , where ) ; |
public class Criteria { /** * Parse the provided criteria
* Deprecated use { @ link Filter # parse ( String ) }
* @ param criteria
* @ return a criteria */
@ Deprecated public static Criteria parse ( String criteria ) { } } | if ( criteria == null ) { throw new InvalidPathException ( "Criteria can not be null" ) ; } String [ ] split = criteria . trim ( ) . split ( " " ) ; if ( split . length == 3 ) { return create ( split [ 0 ] , split [ 1 ] , split [ 2 ] ) ; } else if ( split . length == 1 ) { return create ( split [ 0 ] , "EXISTS" , "true" ) ; } else { throw new InvalidPathException ( "Could not parse criteria" ) ; } |
public class BermudanSwaption { /** * This method returns the value random variable of the product within the specified model , evaluated at a given evalutationTime .
* Note : For a lattice this is often the value conditional to evalutationTime , for a Monte - Carlo simulation this is the ( sum of ) value discounted to evaluation time .
* Cashflows prior evaluationTime are not considered .
* @ param evaluationTime The time on which this products value should be observed .
* @ param model The model used to price the product .
* @ return The random variable representing the value of the product discounted to evaluation time
* @ throws net . finmath . exception . CalculationException Thrown if the valuation fails , specific cause may be available via the < code > cause ( ) < / code > method . */
@ Override public RandomVariableInterface getValue ( double evaluationTime , LIBORModelMonteCarloSimulationInterface model ) throws CalculationException { } } | return ( RandomVariableInterface ) getValues ( evaluationTime , model ) . get ( "value" ) ; |
public class StringUtils { /** * e . g . str1 = " aaaa / " , str2 = " / bbb " , separator = " / " will return " aaaa / bbb "
* @ param str1
* @ param str2
* @ param separator
* @ return */
public static String combine ( String str1 , String str2 , String separator ) { } } | if ( separator == null || separator . isEmpty ( ) ) { return str1 == null ? str2 : str1 . concat ( str2 ) ; } if ( str1 == null ) str1 = "" ; if ( str2 == null ) str2 = "" ; StringBuilder builder = new StringBuilder ( ) ; if ( str1 . endsWith ( separator ) ) { builder . append ( str1 . substring ( 0 , str1 . length ( ) - separator . length ( ) ) ) ; } else { builder . append ( str1 ) ; } builder . append ( separator ) ; if ( str2 . startsWith ( separator ) ) { builder . append ( str2 . substring ( separator . length ( ) ) ) ; } else { builder . append ( str2 ) ; } return builder . toString ( ) ; |
public class BZip2CompressorInputStream { /** * { @ inheritDoc } */
@ Override public int read ( ) throws IOException { } } | if ( this . in != null ) { int r = read0 ( ) ; count ( r < 0 ? - 1 : 1 ) ; return r ; } else { throw new IOException ( "stream closed" ) ; } |
public class GISTreeSetUtil { /** * Normalize the given rectangle < var > n < / var > to be sure that
* it has the same coordinates as < var > b < / var > when they are closed .
* This function permits to obtain a bounding rectangle which may
* be properly used for classification against the given bounds .
* @ param rect rectangle to be normalized .
* @ param reference the reference shape . */
public static void normalize ( Rectangle2d rect , Rectangle2afp < ? , ? , ? , ? , ? , ? > reference ) { } } | double x1 = rect . getMinX ( ) ; if ( reference . getMinX ( ) < x1 && MathUtil . isEpsilonEqual ( reference . getMinX ( ) , x1 , MapElementConstants . POINT_FUSION_DISTANCE ) ) { x1 = reference . getMinX ( ) ; } double y1 = rect . getMinY ( ) ; if ( reference . getMinY ( ) < y1 && MathUtil . isEpsilonEqual ( reference . getMinY ( ) , y1 , MapElementConstants . POINT_FUSION_DISTANCE ) ) { y1 = reference . getMinY ( ) ; } double x2 = rect . getMaxX ( ) ; if ( reference . getMaxX ( ) > x2 && MathUtil . isEpsilonEqual ( reference . getMaxX ( ) , x2 , MapElementConstants . POINT_FUSION_DISTANCE ) ) { x2 = reference . getMaxX ( ) ; } double y2 = rect . getMaxY ( ) ; if ( reference . getMaxY ( ) > y2 && MathUtil . isEpsilonEqual ( reference . getMaxY ( ) , y2 , MapElementConstants . POINT_FUSION_DISTANCE ) ) { y2 = reference . getMaxY ( ) ; } rect . setFromCorners ( x1 , y1 , x2 , y2 ) ; |
public class ServerConfigurationChecker { /** * Fills the configuration map .
* @ param targetMap the map to fill
* @ param recordMap the map to get data from */
private void fillConfMap ( Map < PropertyKey , Map < Optional < String > , List < String > > > targetMap , Map < Address , List < ConfigRecord > > recordMap ) { } } | for ( Map . Entry < Address , List < ConfigRecord > > record : recordMap . entrySet ( ) ) { Address address = record . getKey ( ) ; String addressStr = String . format ( "%s:%s" , address . getHost ( ) , address . getRpcPort ( ) ) ; for ( ConfigRecord conf : record . getValue ( ) ) { PropertyKey key = conf . getKey ( ) ; if ( key . getConsistencyLevel ( ) == ConsistencyCheckLevel . IGNORE ) { continue ; } Optional < String > value = conf . getValue ( ) ; targetMap . putIfAbsent ( key , new HashMap < > ( ) ) ; Map < Optional < String > , List < String > > values = targetMap . get ( key ) ; values . putIfAbsent ( value , new ArrayList < > ( ) ) ; values . get ( value ) . add ( addressStr ) ; } } |
public class JsonWriter { /** * remap field name in custom classes
* @ param fromJava
* field name in java
* @ param toJson
* field name in json
* @ since 2.1.1 */
@ SuppressWarnings ( { } } | "rawtypes" , "unchecked" } ) public < T > void remapField ( Class < T > type , String fromJava , String toJson ) { JsonWriterI map = this . getWrite ( type ) ; if ( ! ( map instanceof BeansWriterASMRemap ) ) { map = new BeansWriterASMRemap ( ) ; registerWriter ( map , type ) ; } ( ( BeansWriterASMRemap ) map ) . renameField ( fromJava , toJson ) ; |
public class DeploymentDeserializer { /** * Gson invokes this call - back method during deserialization when it encounters a field of the specified type .
* @ param element The Json data being deserialized
* @ param type The type of the Object to deserialize to
* @ param context The JSON deserialization context
* @ return The deployment */
@ Override public Deployment deserialize ( JsonElement element , Type type , JsonDeserializationContext context ) throws JsonParseException { } } | JsonObject obj = element . getAsJsonObject ( ) ; JsonElement deployment = obj . get ( "deployment" ) ; if ( deployment != null && deployment . isJsonObject ( ) ) return gson . fromJson ( deployment , Deployment . class ) ; return gson . fromJson ( element , Deployment . class ) ; |
public class LongStream { /** * Takes elements while the predicate returns { @ code false } .
* Once predicate condition is satisfied by an element , the stream
* finishes with this element .
* < p > This is an intermediate operation .
* < p > Example :
* < pre >
* stopPredicate : ( a ) - & gt ; a & gt ; 2
* stream : [ 1 , 2 , 3 , 4 , 1 , 2 , 3 , 4]
* result : [ 1 , 2 , 3]
* < / pre >
* @ param stopPredicate the predicate used to take elements
* @ return the new { @ code LongStream }
* @ since 1.1.6 */
@ NotNull public LongStream takeUntil ( @ NotNull final LongPredicate stopPredicate ) { } } | return new LongStream ( params , new LongTakeUntil ( iterator , stopPredicate ) ) ; |
public class PlainChangesLogImpl { /** * Collect last in ChangesLog order item child changes .
* @ param rootData
* - a item root of the changes scan
* @ param forNodes
* retrieves nodes ' ItemStates is true , or properties ' otherwise
* @ return child items states */
public Collection < ItemState > getLastChildrenStates ( ItemData rootData , boolean forNodes ) { } } | Map < String , ItemState > children = forNodes ? lastChildNodeStates . get ( rootData . getIdentifier ( ) ) : lastChildPropertyStates . get ( rootData . getIdentifier ( ) ) ; return children == null ? new ArrayList < ItemState > ( ) : children . values ( ) ; |
public class PrcPurchaseInvoiceSave { /** * < p > Make other entries include reversing if it ' s need when save . < / p >
* @ param pReqVars additional param
* @ param pEntity entity
* @ param pRequestData Request Data
* @ param pIsNew if entity was new
* @ throws Exception - an exception */
@ Override public final void makeOtherEntries ( final Map < String , Object > pReqVars , final PurchaseInvoice pEntity , final IRequestData pRequestData , final boolean pIsNew ) throws Exception { } } | String actionAdd = pRequestData . getParameter ( "actionAdd" ) ; if ( "makeAccEntries" . equals ( actionAdd ) ) { if ( pEntity . getReversedId ( ) != null ) { // reverse none - reversed lines :
PurchaseInvoiceLine pil = new PurchaseInvoiceLine ( ) ; PurchaseInvoice reversed = new PurchaseInvoice ( ) ; reversed . setItsId ( pEntity . getReversedId ( ) ) ; pil . setItsOwner ( reversed ) ; List < PurchaseInvoiceLine > reversedLines = getSrvOrm ( ) . retrieveListForField ( pReqVars , pil , "itsOwner" ) ; String langDef = ( String ) pReqVars . get ( "langDef" ) ; for ( PurchaseInvoiceLine reversedLine : reversedLines ) { if ( reversedLine . getReversedId ( ) == null ) { if ( ! reversedLine . getItsQuantity ( ) . equals ( reversedLine . getTheRest ( ) ) ) { throw new ExceptionWithCode ( ExceptionWithCode . WRONG_PARAMETER , "where_is_withdrawals_from_this_source" ) ; } PurchaseInvoiceLine reversingLine = new PurchaseInvoiceLine ( ) ; reversingLine . setIdDatabaseBirth ( getSrvOrm ( ) . getIdDatabase ( ) ) ; reversingLine . setReversedId ( reversedLine . getItsId ( ) ) ; reversingLine . setWarehouseSite ( reversedLine . getWarehouseSite ( ) ) ; reversingLine . setInvItem ( reversedLine . getInvItem ( ) ) ; reversingLine . setUnitOfMeasure ( reversedLine . getUnitOfMeasure ( ) ) ; reversingLine . setItsCost ( reversedLine . getItsCost ( ) ) ; reversingLine . setItsQuantity ( reversedLine . getItsQuantity ( ) . negate ( ) ) ; reversingLine . setItsTotal ( reversedLine . getItsTotal ( ) . negate ( ) ) ; reversingLine . setSubtotal ( reversedLine . getSubtotal ( ) . negate ( ) ) ; reversingLine . setTotalTaxes ( reversedLine . getTotalTaxes ( ) . negate ( ) ) ; reversingLine . setTaxesDescription ( reversedLine . getTaxesDescription ( ) ) ; reversingLine . setForeignPrice ( reversedLine . getForeignPrice ( ) ) ; reversingLine . setForeignSubtotal ( reversedLine . getForeignSubtotal ( ) . negate ( ) ) ; reversingLine . setForeignTotalTaxes ( reversedLine . getForeignTotalTaxes ( ) . negate ( ) ) ; reversingLine . setForeignTotal ( reversedLine . getForeignTotal ( ) . negate ( ) ) ; reversingLine . setIsNew ( true ) ; reversingLine . setItsOwner ( pEntity ) ; reversingLine . setDescription ( getSrvI18n ( ) . getMsg ( "reversed_entry_n" , langDef ) + reversedLine . getIdDatabaseBirth ( ) + "-" + reversedLine . getItsId ( ) ) ; // local
getSrvOrm ( ) . insertEntity ( pReqVars , reversingLine ) ; reversingLine . setIsNew ( false ) ; getSrvWarehouseEntry ( ) . load ( pReqVars , reversingLine , reversingLine . getWarehouseSite ( ) ) ; String descr ; if ( reversedLine . getDescription ( ) == null ) { descr = "" ; } else { descr = reversedLine . getDescription ( ) ; } reversedLine . setDescription ( descr + " " + getSrvI18n ( ) . getMsg ( "reversing_entry_n" , langDef ) + reversingLine . getIdDatabaseBirth ( ) + "-" + reversingLine . getItsId ( ) ) ; // only local
reversedLine . setReversedId ( reversingLine . getItsId ( ) ) ; reversedLine . setTheRest ( BigDecimal . ZERO ) ; getSrvOrm ( ) . updateEntity ( pReqVars , reversedLine ) ; PurchaseInvoiceGoodsTaxLine pigtlt = new PurchaseInvoiceGoodsTaxLine ( ) ; pigtlt . setItsOwner ( reversedLine ) ; List < PurchaseInvoiceGoodsTaxLine > tls = getSrvOrm ( ) . retrieveListForField ( pReqVars , pigtlt , "itsOwner" ) ; for ( PurchaseInvoiceGoodsTaxLine pigtl : tls ) { getSrvOrm ( ) . deleteEntity ( pReqVars , pigtl ) ; } } } PurchaseInvoiceServiceLine pisl = new PurchaseInvoiceServiceLine ( ) ; pisl . setItsOwner ( reversed ) ; List < PurchaseInvoiceServiceLine > revServLines = getSrvOrm ( ) . retrieveListForField ( pReqVars , pisl , "itsOwner" ) ; for ( PurchaseInvoiceServiceLine reversedLine : revServLines ) { if ( reversedLine . getReversedId ( ) == null ) { PurchaseInvoiceServiceLine reversingLine = new PurchaseInvoiceServiceLine ( ) ; reversingLine . setIdDatabaseBirth ( getSrvOrm ( ) . getIdDatabase ( ) ) ; reversingLine . setReversedId ( reversedLine . getItsId ( ) ) ; reversingLine . setService ( reversedLine . getService ( ) ) ; reversingLine . setAccExpense ( reversedLine . getAccExpense ( ) ) ; reversingLine . setItsCost ( reversedLine . getItsCost ( ) . negate ( ) ) ; reversingLine . setUnitOfMeasure ( reversedLine . getUnitOfMeasure ( ) ) ; reversingLine . setItsCost ( reversedLine . getItsCost ( ) ) ; reversingLine . setItsQuantity ( reversedLine . getItsQuantity ( ) . negate ( ) ) ; reversingLine . setItsTotal ( reversedLine . getItsTotal ( ) . negate ( ) ) ; reversingLine . setSubtotal ( reversedLine . getSubtotal ( ) . negate ( ) ) ; reversingLine . setTotalTaxes ( reversedLine . getTotalTaxes ( ) . negate ( ) ) ; reversingLine . setTaxesDescription ( reversedLine . getTaxesDescription ( ) ) ; reversingLine . setForeignPrice ( reversedLine . getForeignPrice ( ) ) ; reversingLine . setForeignSubtotal ( reversedLine . getForeignSubtotal ( ) . negate ( ) ) ; reversingLine . setForeignTotalTaxes ( reversedLine . getForeignTotalTaxes ( ) . negate ( ) ) ; reversingLine . setForeignTotal ( reversedLine . getForeignTotal ( ) . negate ( ) ) ; reversingLine . setIsNew ( true ) ; reversingLine . setItsOwner ( pEntity ) ; getSrvOrm ( ) . insertEntity ( pReqVars , reversingLine ) ; reversingLine . setIsNew ( false ) ; reversedLine . setReversedId ( reversingLine . getItsId ( ) ) ; getSrvOrm ( ) . updateEntity ( pReqVars , reversedLine ) ; PurchaseInvoiceServiceTaxLine pigtlt = new PurchaseInvoiceServiceTaxLine ( ) ; pigtlt . setItsOwner ( reversedLine ) ; List < PurchaseInvoiceServiceTaxLine > tls = getSrvOrm ( ) . retrieveListForField ( pReqVars , pigtlt , "itsOwner" ) ; for ( PurchaseInvoiceServiceTaxLine pigtl : tls ) { getSrvOrm ( ) . deleteEntity ( pReqVars , pigtl ) ; } } } PurchaseInvoiceTaxLine pitl = new PurchaseInvoiceTaxLine ( ) ; pitl . setItsOwner ( reversed ) ; List < PurchaseInvoiceTaxLine > reversedTaxLines = getSrvOrm ( ) . retrieveListForField ( pReqVars , pitl , "itsOwner" ) ; for ( PurchaseInvoiceTaxLine reversedLine : reversedTaxLines ) { if ( reversedLine . getReversedId ( ) == null ) { PurchaseInvoiceTaxLine reversingLine = new PurchaseInvoiceTaxLine ( ) ; reversingLine . setIdDatabaseBirth ( getSrvOrm ( ) . getIdDatabase ( ) ) ; reversingLine . setReversedId ( reversedLine . getItsId ( ) ) ; reversingLine . setItsTotal ( reversedLine . getItsTotal ( ) . negate ( ) ) ; reversingLine . setForeignTotalTaxes ( reversedLine . getForeignTotalTaxes ( ) . negate ( ) ) ; reversingLine . setTax ( reversedLine . getTax ( ) ) ; reversingLine . setIsNew ( true ) ; reversingLine . setItsOwner ( pEntity ) ; getSrvOrm ( ) . insertEntity ( pReqVars , reversingLine ) ; reversingLine . setIsNew ( false ) ; reversedLine . setReversedId ( reversingLine . getItsId ( ) ) ; getSrvOrm ( ) . updateEntity ( pReqVars , reversedLine ) ; } } } if ( pEntity . getPrepaymentTo ( ) != null ) { if ( pEntity . getReversedId ( ) != null ) { pEntity . getPrepaymentTo ( ) . setPurchaseInvoiceId ( null ) ; } else { pEntity . getPrepaymentTo ( ) . setPurchaseInvoiceId ( pEntity . getItsId ( ) ) ; } getSrvOrm ( ) . updateEntity ( pReqVars , pEntity . getPrepaymentTo ( ) ) ; } } |
public class AbstractDockerMojo { /** * Resolve and customize image configuration */
private String initImageConfiguration ( Date buildTimeStamp ) { } } | // Resolve images
resolvedImages = ConfigHelper . resolveImages ( log , images , // Unresolved images
new ConfigHelper . Resolver ( ) { @ Override public List < ImageConfiguration > resolve ( ImageConfiguration image ) { return imageConfigResolver . resolve ( image , project , session ) ; } } , filter , // A filter which image to process
this ) ; // customizer ( can be overwritten by a subclass )
// Check for simple Dockerfile mode
File topDockerfile = new File ( project . getBasedir ( ) , "Dockerfile" ) ; if ( topDockerfile . exists ( ) ) { if ( resolvedImages . isEmpty ( ) ) { resolvedImages . add ( createSimpleDockerfileConfig ( topDockerfile ) ) ; } else if ( resolvedImages . size ( ) == 1 && resolvedImages . get ( 0 ) . getBuildConfiguration ( ) == null ) { resolvedImages . set ( 0 , addSimpleDockerfileConfig ( resolvedImages . get ( 0 ) , topDockerfile ) ) ; } } // Initialize configuration and detect minimal API version
return ConfigHelper . initAndValidate ( resolvedImages , apiVersion , new ImageNameFormatter ( project , buildTimeStamp ) , log ) ; |
public class StartAndStopSQL { /** * / * ( non - Javadoc )
* @ see org . springframework . context . Lifecycle # stop ( ) */
public void stop ( ) { } } | if ( state . compareAndSet ( RUNNING , STOPPING ) ) { log . debug ( "Stopping..." ) ; if ( ( StringUtils . isBlank ( stopSqlCondition ) || isInCondition ( stopSqlCondition ) ) && ( StringUtils . isBlank ( stopSqlConditionResource ) || isInConditionResource ( stopSqlConditionResource ) ) ) { if ( StringUtils . isNotBlank ( stopSQL ) ) { executeSQL ( stopSQL ) ; } else if ( StringUtils . isNotBlank ( stopSqlResource ) ) { executeSqlResource ( stopSqlResource ) ; } } state . set ( UNKNOWN ) ; } else { log . warn ( "Stop request ignored. Current state is: " + stateNames [ state . get ( ) ] ) ; } |
public class Configurations { /** * Get the property object as float , or return defaultVal if property is not defined .
* @ param name
* property name .
* @ param defaultVal
* default property value .
* @ return
* property value as float , return defaultVal if property is undefined . */
public static float getFloat ( String name , float defaultVal ) { } } | if ( getConfiguration ( ) . containsKey ( name ) ) { return getConfiguration ( ) . getFloat ( name ) ; } else { return defaultVal ; } |
public class Base64 { /** * syck _ base64dec */
public static byte [ ] dec ( Pointer _s , final int _len ) { } } | int len = _len ; byte [ ] sb = _s . buffer ; int s = _s . start ; int a = - 1 , b = - 1 , c = 0 , d ; byte [ ] ptrb = new byte [ len ] ; System . arraycopy ( sb , s , ptrb , 0 , len ) ; int ptr = 0 ; int end = 0 ; int send = s + len ; while ( s < send ) { while ( sb [ s ] == '\r' || sb [ s ] == '\n' ) { s ++ ; } if ( ( a = b64_xtable [ ( int ) sb [ s + 0 ] ] ) == - 1 ) break ; if ( ( b = b64_xtable [ ( int ) sb [ s + 1 ] ] ) == - 1 ) break ; if ( ( c = b64_xtable [ ( int ) sb [ s + 2 ] ] ) == - 1 ) break ; if ( ( d = b64_xtable [ ( int ) sb [ s + 3 ] ] ) == - 1 ) break ; ptrb [ end ++ ] = ( byte ) ( ( a << 2 ) | ( b >> 4 ) ) ; ptrb [ end ++ ] = ( byte ) ( ( b << 4 ) | ( c >> 2 ) ) ; ptrb [ end ++ ] = ( byte ) ( ( c << 6 ) | d ) ; s += 4 ; } if ( a != - 1 && b != - 1 ) { if ( s + 2 < send && sb [ s + 2 ] == '=' ) ptrb [ end ++ ] = ( byte ) ( ( a << 2 ) | ( b >> 4 ) ) ; if ( c != - 1 && s + 3 < send && sb [ s + 3 ] == '=' ) { ptrb [ end ++ ] = ( byte ) ( ( a << 2 ) | ( b >> 4 ) ) ; ptrb [ end ++ ] = ( byte ) ( ( b << 4 ) | ( c >> 2 ) ) ; } } ptrb [ end ] = '\0' ; return ptrb ; |
public class FairScheduler { /** * Obtain the how many more slots can be scheduled on this tasktracker
* @ param tts The status of the tasktracker
* @ param type The type of the task to be scheduled
* @ return the number of tasks can be scheduled */
private int getAvailableSlots ( TaskTrackerStatus tts , TaskType type ) { } } | return getMaxSlots ( tts , type ) - occupiedSlotsAfterHeartbeat ( tts , type ) ; |
public class ChunkCollision { /** * Checks whether the block can be placed at the position . < br >
* Called via ASM from { @ link ItemBlock # onItemUse ( EntityPlayer , World , BlockPos , EnumHand , EnumFacing , float , float , float ) } at the
* beginning . < br >
* Tests the block bounding box ( boxes if { @ link IChunkCollidable } ) against the occupied blocks position , then against all the bounding
* boxes of the { @ link IChunkCollidable } available for those chunks .
* @ param player the player
* @ param world the world
* @ param pos the pos
* @ param hand the hand
* @ param side the side
* @ return true , if can be placed */
public boolean canPlaceBlockAt ( EntityPlayer player , World world , BlockPos pos , EnumHand hand , EnumFacing side ) { } } | ItemStack itemStack = player . getHeldItem ( hand ) ; Block block = world . getBlockState ( pos ) . getBlock ( ) ; AxisAlignedBB [ ] aabbs ; if ( block instanceof IChunkCollidable ) { IBlockState state = DirectionalComponent . getPlacedState ( ItemUtils . getStateFromItemStack ( itemStack ) , side , player ) ; aabbs = ( ( IChunkCollidable ) block ) . getPlacedBoundingBox ( world , pos , state , hand , side , player , itemStack ) ; } else aabbs = AABBUtils . getCollisionBoundingBoxes ( world , block , pos ) ; if ( ArrayUtils . isEmpty ( aabbs ) ) return true ; AABBUtils . offset ( pos , aabbs ) ; // check against each block position occupied by the AABBs
if ( block instanceof IChunkCollidable ) { for ( AxisAlignedBB aabb : aabbs ) { if ( aabb == null ) continue ; for ( BlockPos p : BlockPosUtils . getAllInBox ( aabb ) ) { boolean b = false ; b |= ! world . getBlockState ( p ) . getBlock ( ) . isReplaceable ( world , p ) ; b &= AABBUtils . isColliding ( aabb , AABBUtils . getCollisionBoundingBoxes ( world , new MBlockState ( world , p ) , true ) ) ; if ( b ) return false ; } } } for ( Chunk chunk : ChunkBlockHandler . getAffectedChunks ( world , aabbs ) ) { CallbackResult < Boolean > result = placeAtRegistry . processCallbacks ( chunk , ( Object [ ] ) aabbs ) ; if ( result . getValue ( ) != null && ! result . getValue ( ) ) return false ; } return true ; |
public class DescribeVpnGatewaysResult { /** * Information about one or more virtual private gateways .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setVpnGateways ( java . util . Collection ) } or { @ link # withVpnGateways ( java . util . Collection ) } if you want to
* override the existing values .
* @ param vpnGateways
* Information about one or more virtual private gateways .
* @ return Returns a reference to this object so that method calls can be chained together . */
public DescribeVpnGatewaysResult withVpnGateways ( VpnGateway ... vpnGateways ) { } } | if ( this . vpnGateways == null ) { setVpnGateways ( new com . amazonaws . internal . SdkInternalList < VpnGateway > ( vpnGateways . length ) ) ; } for ( VpnGateway ele : vpnGateways ) { this . vpnGateways . add ( ele ) ; } return this ; |
public class CmsDefaultAppButtonProvider { /** * Creates a properly styled button for the given app . < p >
* @ param cms the cms context
* @ param appConfig the app configuration
* @ param locale the locale
* @ return the button component */
public static Component createAppButton ( CmsObject cms , final I_CmsWorkplaceAppConfiguration appConfig , Locale locale ) { } } | Button button = createAppIconButton ( appConfig , locale ) ; button . addClickListener ( new ClickListener ( ) { private static final long serialVersionUID = 1L ; public void buttonClick ( ClickEvent event ) { if ( ( appConfig instanceof I_CmsHasAppLaunchCommand ) && ( ( ( I_CmsHasAppLaunchCommand ) appConfig ) . getAppLaunchCommand ( ) != null ) ) { ( ( I_CmsHasAppLaunchCommand ) appConfig ) . getAppLaunchCommand ( ) . run ( ) ; } else { CmsAppWorkplaceUi ui = ( CmsAppWorkplaceUi ) A_CmsUI . get ( ) ; ui . showApp ( appConfig ) ; } } } ) ; CmsAppVisibilityStatus status = appConfig . getVisibility ( cms ) ; if ( ! status . isActive ( ) ) { button . setEnabled ( false ) ; button . setDescription ( status . getHelpText ( ) ) ; } else { String helpText = appConfig . getHelpText ( locale ) ; button . setDescription ( helpText ) ; } return button ; |
public class MicroServiceTemplateSupport { /** * � � � ģ � ͅ � � ύ � � � � update - set � ַ �
* @ param dbColMap � ύ � � � �
* @ param modelEntryMap � � � ģ � �
* @ param placeList ռλ � � � 滻ֵ
* @ return
* @ throws Exception */
public String createUpdateInStr ( Map dbColMap0 , Map modelEntryMap ) { } } | if ( dbColMap0 == null ) { return null ; } // add 201902 ning
Map dbColMap = new CaseInsensitiveKeyMap ( ) ; if ( dbColMap0 != null ) { dbColMap . putAll ( dbColMap0 ) ; } List realValueList = new ArrayList ( ) ; List extValueList = new ArrayList ( ) ; Boolean metaFlag = false ; Map < String , Cobj > metaFlagMap = new LinkedHashMap ( ) ; Cobj crealValues = Cutil . createCobj ( ) ; String tempDbType = calcuDbType ( ) ; Iterator it = modelEntryMap . keySet ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { String key = ( String ) it . next ( ) ; MicroDbModelEntry modelEntry = ( MicroDbModelEntry ) modelEntryMap . get ( key ) ; if ( CheckModelTypeUtil . isDynamicCol ( modelEntry ) ) { String value = ( String ) dbColMap . get ( key ) ; String metaName = modelEntry . getMetaContentId ( ) ; Cobj cobjValues = metaFlagMap . get ( metaName ) ; if ( cobjValues == null ) { cobjValues = Cutil . createCobj ( ) ; metaFlagMap . put ( metaName , cobjValues ) ; } String realKey = CheckModelTypeUtil . getRealColName ( key ) ; cobjValues . append ( Cutil . rep ( "'$.<REPLACE>'" , realKey ) , value != null ) ; if ( CheckModelTypeUtil . isNumber ( modelEntry ) ) { cobjValues . append ( Cutil . rep ( "<REPLACE>" , value ) , value != null ) ; } else if ( CheckModelTypeUtil . isDate ( modelEntry ) ) { if ( value != null ) { if ( value . toLowerCase ( ) . equals ( "now()" ) ) { // for oracle
String tmpValue = "now()" ; if ( tempDbType != null && "oracle" . equals ( tempDbType ) ) { tmpValue = "SYSDATE" ; } cobjValues . append ( Cutil . rep ( "<REPLACE>" , tmpValue ) , value != null ) ; } else { cobjValues . append ( Cutil . rep ( "'<REPLACE>'" , value ) , value != null ) ; } } } else if ( realKey . endsWith ( "_json" ) ) { cobjValues . append ( Cutil . rep ( "<REPLACE>" , value ) , value != null && ! "" . equals ( value ) ) ; } else { cobjValues . append ( Cutil . rep ( "'<REPLACE>'" , value ) , value != null ) ; } if ( value != null ) { extValueList . add ( value ) ; } } else if ( CheckModelTypeUtil . isRealCol ( modelEntry ) ) { // add 20170830 by ninghao
Object vobj = dbColMap . get ( key ) ; if ( vobj instanceof MicroColObj ) { String colInfoStr = ( ( MicroColObj ) vobj ) . getColInfo ( ) ; crealValues . append ( key + "=" + colInfoStr ) ; continue ; } // end
String value = ( String ) dbColMap . get ( key ) ; String whereValue = "" ; // add 201807 ning
if ( value != null && MICRO_DB_NULL . equals ( value ) ) { if ( tempDbType != null && "oracle" . equals ( tempDbType ) ) { whereValue = "NULL" ; } else { whereValue = "null" ; } // end
} else if ( CheckModelTypeUtil . isNumber ( modelEntry ) ) { whereValue = Cutil . rep ( "<REPLACE>" , value ) ; } else if ( CheckModelTypeUtil . isDate ( modelEntry ) ) { if ( value != null ) { if ( value . toLowerCase ( ) . equals ( "now()" ) ) { // for oracle
String tmpValue = "now()" ; if ( tempDbType != null && "oracle" . equals ( tempDbType ) ) { tmpValue = "SYSDATE" ; } whereValue = tmpValue ; } else { // for oracle
String temp = "str_to_date('<REPLACE>','%Y-%m-%d %H:%i:%s')" ; if ( tempDbType != null && "oracle" . equals ( tempDbType ) ) { temp = "to_date('<REPLACE>','" + ORCL_DATE_FORMAT + "')" ; } whereValue = Cutil . rep ( temp , value ) ; } } } else { whereValue = Cutil . rep ( "'<REPLACE>'" , value ) ; } if ( value != null ) { crealValues . append ( Cutil . rep ( "<REPLACE>=" , key ) + whereValue , value != null ) ; } } } Set < String > metaKeySet = metaFlagMap . keySet ( ) ; for ( String key : metaKeySet ) { Cobj cobj = metaFlagMap . get ( key ) ; String dynamic = cobj . getStr ( ) ; crealValues . append ( Cutil . rep ( key + "=JSON_SET(ifnull(" + key + ",'{}'),<REPLACE>)" , dynamic ) , dynamic != null ) ; } return crealValues . getStr ( ) ; |
public class CopyProductRequest { /** * The copy options . If the value is < code > CopyTags < / code > , the tags from the source product are copied to the
* target product .
* @ param copyOptions
* The copy options . If the value is < code > CopyTags < / code > , the tags from the source product are copied to
* the target product .
* @ return Returns a reference to this object so that method calls can be chained together .
* @ see CopyOption */
public CopyProductRequest withCopyOptions ( CopyOption ... copyOptions ) { } } | java . util . ArrayList < String > copyOptionsCopy = new java . util . ArrayList < String > ( copyOptions . length ) ; for ( CopyOption value : copyOptions ) { copyOptionsCopy . add ( value . toString ( ) ) ; } if ( getCopyOptions ( ) == null ) { setCopyOptions ( copyOptionsCopy ) ; } else { getCopyOptions ( ) . addAll ( copyOptionsCopy ) ; } return this ; |
public class MsgpackIOUtil { /** * Merges the { @ code message } with the byte array using the given { @ code schema } . */
public static < T > void mergeFrom ( byte [ ] data , int offset , int length , T message , Schema < T > schema , boolean numeric ) throws IOException { } } | ArrayBufferInput bios = new ArrayBufferInput ( data , offset , length ) ; MessageUnpacker unpacker = MessagePack . newDefaultUnpacker ( bios ) ; try { mergeFrom ( unpacker , message , schema , numeric ) ; } finally { unpacker . close ( ) ; } |
public class Gather { /** * Like { @ link # take ( int ) } but returns { @ link Gather } that provides elements as long
* as a predicate returns true . */
public Gather < T > takeWhile ( final Predicate < T > predicate ) { } } | final Iterator < T > it = each ( ) . iterator ( ) ; return from ( new AbstractIterator < T > ( ) { protected T computeNext ( ) { if ( ! it . hasNext ( ) ) { return endOfData ( ) ; } T t = it . next ( ) ; return predicate . apply ( t ) ? t : endOfData ( ) ; } } ) ; |
public class CmsCategoriesTab { /** * Adds children item to the category tree and select the categories . < p >
* @ param parent the parent item
* @ param children the list of children
* @ param selectedCategories the list of categories to select */
private void addChildren ( CmsTreeItem parent , List < CmsCategoryTreeEntry > children , List < String > selectedCategories ) { } } | if ( children != null ) { for ( CmsCategoryTreeEntry child : children ) { // set the category tree item and add to parent tree item
CmsTreeItem treeItem = buildTreeItem ( child , selectedCategories ) ; if ( ( selectedCategories != null ) && selectedCategories . contains ( child . getPath ( ) ) ) { parent . setOpen ( true ) ; openParents ( parent ) ; } parent . addChild ( treeItem ) ; addChildren ( treeItem , child . getChildren ( ) , selectedCategories ) ; } } |
public class gslbldnsentry { /** * Use this API to delete gslbldnsentry . */
public static base_response delete ( nitro_service client , gslbldnsentry resource ) throws Exception { } } | gslbldnsentry deleteresource = new gslbldnsentry ( ) ; deleteresource . ipaddress = resource . ipaddress ; return deleteresource . delete_resource ( client ) ; |
public class PDPageContentStreamExt { /** * Set the non - stroking color in the DeviceCMYK color space . Range is 0 . . 255.
* @ param c
* The cyan value .
* @ param m
* The magenta value .
* @ param y
* The yellow value .
* @ param k
* The black value .
* @ throws IOException
* If an IO error occurs while writing to the stream .
* @ throws IllegalArgumentException
* If the parameters are invalid . */
public void setNonStrokingColor ( final int c , final int m , final int y , final int k ) throws IOException { } } | if ( _isOutside255Interval ( c ) || _isOutside255Interval ( m ) || _isOutside255Interval ( y ) || _isOutside255Interval ( k ) ) { throw new IllegalArgumentException ( "Parameters must be within 0..255, but are (" + c + "," + m + "," + y + "," + k + ")" ) ; } setNonStrokingColor ( c / 255f , m / 255f , y / 255f , k / 255f ) ; |
public class XEventConverter { /** * ( non - Javadoc )
* @ see
* com . thoughtworks . xstream . converters . Converter # marshal ( java . lang . Object ,
* com . thoughtworks . xstream . io . HierarchicalStreamWriter ,
* com . thoughtworks . xstream . converters . MarshallingContext ) */
public void marshal ( Object obj , HierarchicalStreamWriter writer , MarshallingContext context ) { } } | XEvent event = ( XEvent ) obj ; writer . addAttribute ( "xid" , event . getID ( ) . toString ( ) ) ; if ( event . getAttributes ( ) . size ( ) > 0 ) { writer . startNode ( "XAttributeMap" ) ; context . convertAnother ( event . getAttributes ( ) , XesXStreamPersistency . attributeMapConverter ) ; writer . endNode ( ) ; } |
public class ApiGeneratorUtils { /** * Return all of the available ApiImplementors .
* If you implement a new ApiImplementor then you must add it to this class .
* @ return all of the available ApiImplementors . */
public static List < ApiImplementor > getAllImplementors ( ) { } } | List < ApiImplementor > imps = new ArrayList < > ( ) ; ApiImplementor api ; imps . add ( new AlertAPI ( null ) ) ; api = new AntiCsrfAPI ( null ) ; api . addApiOptions ( new AntiCsrfParam ( ) ) ; imps . add ( api ) ; imps . add ( new PassiveScanAPI ( null ) ) ; imps . add ( new SearchAPI ( null ) ) ; api = new AutoUpdateAPI ( null ) ; api . addApiOptions ( new OptionsParamCheckForUpdates ( ) ) ; imps . add ( api ) ; api = new SpiderAPI ( null ) ; api . addApiOptions ( new SpiderParam ( ) ) ; imps . add ( api ) ; api = new CoreAPI ( new ConnectionParam ( ) ) ; imps . add ( api ) ; imps . add ( new ParamsAPI ( null ) ) ; api = new ActiveScanAPI ( null ) ; api . addApiOptions ( new ScannerParam ( ) ) ; imps . add ( api ) ; imps . add ( new ContextAPI ( ) ) ; imps . add ( new HttpSessionsAPI ( null ) ) ; imps . add ( new BreakAPI ( null ) ) ; imps . add ( new AuthenticationAPI ( null ) ) ; imps . add ( new AuthorizationAPI ( ) ) ; imps . add ( new SessionManagementAPI ( null ) ) ; imps . add ( new UsersAPI ( null ) ) ; imps . add ( new ForcedUserAPI ( null ) ) ; imps . add ( new ScriptAPI ( null ) ) ; api = new StatsAPI ( null ) ; api . addApiOptions ( new StatsParam ( ) ) ; imps . add ( api ) ; return imps ; |
public class ModelConstraints { /** * Tests whether the two field descriptors are equal , i . e . have same name , same column
* and same jdbc - type .
* @ param first The first field
* @ param second The second field
* @ return < code > true < / code > if they are equal */
private boolean isEqual ( FieldDescriptorDef first , FieldDescriptorDef second ) { } } | return first . getName ( ) . equals ( second . getName ( ) ) && first . getProperty ( PropertyHelper . OJB_PROPERTY_COLUMN ) . equals ( second . getProperty ( PropertyHelper . OJB_PROPERTY_COLUMN ) ) && first . getProperty ( PropertyHelper . OJB_PROPERTY_JDBC_TYPE ) . equals ( second . getProperty ( PropertyHelper . OJB_PROPERTY_JDBC_TYPE ) ) ; |
public class SamlProfileSamlNameIdBuilder { /** * Gets supported name id formats .
* @ param service the service
* @ param adaptor the adaptor
* @ return the supported name id formats */
protected static List < String > getSupportedNameIdFormats ( final SamlRegisteredService service , final SamlRegisteredServiceServiceProviderMetadataFacade adaptor ) { } } | val supportedNameFormats = adaptor . getSupportedNameIdFormats ( ) ; LOGGER . debug ( "Metadata for [{}] declares the following NameIDs [{}]" , adaptor . getEntityId ( ) , supportedNameFormats ) ; if ( supportedNameFormats . isEmpty ( ) ) { supportedNameFormats . add ( NameIDType . TRANSIENT ) ; LOGGER . debug ( "No supported nameId formats could be determined from metadata. Added default [{}]" , NameIDType . TRANSIENT ) ; } if ( StringUtils . isNotBlank ( service . getRequiredNameIdFormat ( ) ) ) { val fmt = parseAndBuildRequiredNameIdFormat ( service ) ; supportedNameFormats . add ( 0 , fmt ) ; LOGGER . debug ( "Added required nameId format [{}] based on saml service configuration for [{}]" , fmt , service . getServiceId ( ) ) ; } return supportedNameFormats ; |
public class RestRepository { /** * Returns a pageable ( scan based ) result to the given query .
* @ param query scan query
* @ param reader scroll reader
* @ return a scroll query */
ScrollQuery scanLimit ( String query , BytesArray body , long limit , ScrollReader reader ) { } } | return new ScrollQuery ( this , query , body , limit , reader ) ; |
public class OkapiUI { /** * GEN - LAST : event _ aztecUserSizeActionPerformed */
private void aztecAutoSizeActionPerformed ( java . awt . event . ActionEvent evt ) { } } | // GEN - FIRST : event _ aztecAutoSizeActionPerformed
// TODO add your handling code here :
aztecUserSizeCombo . setEnabled ( false ) ; aztecUserEccCombo . setEnabled ( false ) ; encodeData ( ) ; |
public class Servlet { /** * Processes all application requests , delegating them to their corresponding page , binary and JSON controllers . */
@ Override protected void service ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , java . io . IOException { } } | if ( sessionSynchronization ) { String syncKey = getSyncKey ( request ) ; synchronized ( getSyncObject ( syncKey ) ) { try { doService ( request , response ) ; } finally { removeSyncObject ( syncKey ) ; } } } else { doService ( request , response ) ; } |
public class AbcGrammar { /** * field - meter : : = % x4D . 3A * WSP time - signature header - eol < p >
* < tt > M : < / tt > */
Rule FieldMeter ( ) { } } | return Sequence ( String ( "M:" ) , ZeroOrMore ( WSP ( ) ) . suppressNode ( ) , OptionalS ( TimeSignature ( ) ) , HeaderEol ( ) ) . label ( FieldMeter ) ; |
public class AzureClient { /** * Given a polling state representing state of an LRO operation , this method returns { @ link Observable } object ,
* when subscribed to it , a series of polling will be performed and emits each polling state to downstream .
* Polling will completes when the operation finish with success , failure or exception .
* @ param pollingState the current polling state
* @ param resourceType the java . lang . reflect . Type of the resource .
* @ param < T > the type of the resource
* @ return the observable of which a subscription will lead multiple polling action . */
public < T > Observable < PollingState < T > > pollAsync ( final PollingState < T > pollingState , final Type resourceType ) { } } | if ( pollingState . initialHttpMethod ( ) . equalsIgnoreCase ( "PUT" ) || pollingState . initialHttpMethod ( ) . equalsIgnoreCase ( "PATCH" ) ) { return this . pollPutOrPatchAsync ( pollingState , resourceType ) ; } if ( pollingState . initialHttpMethod ( ) . equalsIgnoreCase ( "POST" ) || pollingState . initialHttpMethod ( ) . equalsIgnoreCase ( "DELETE" ) ) { return this . pollPostOrDeleteAsync ( pollingState , resourceType ) ; } throw new IllegalArgumentException ( "PollingState contains unsupported http method:" + pollingState . initialHttpMethod ( ) ) ; |
public class SingletonContext { /** * Get singleton context
* The singleton context will use system properties for configuration as well as values specified in a file
* specified through this < tt > jcifs . properties < / tt > system property .
* @ return a global context , initialized on first call */
public static synchronized final SingletonContext getInstance ( ) { } } | if ( INSTANCE == null ) { try { log . debug ( "Initializing singleton context" ) ; init ( null ) ; } catch ( CIFSException e ) { log . error ( "Failed to create singleton JCIFS context" , e ) ; } } return INSTANCE ; |
public class StringBindings { /** * Creates a string binding that contains the value of the given observable string converted to uppercase with the
* given locale . See { @ link String # toUpperCase ( Locale ) } .
* If the given observable string has a value of ` null ` the created binding will contain an empty string .
* If the given observable locale has a value of ` null ` { @ link Locale # getDefault ( ) } will be used instead .
* @ param text
* the source string that will used for the conversion .
* @ param locale
* an observable containing the locale that will be used for conversion .
* @ return a binding containing the uppercase string . */
public static StringBinding toUpperCase ( ObservableValue < String > text , ObservableValue < Locale > locale ) { } } | return Bindings . createStringBinding ( ( ) -> { final Locale localeValue = locale . getValue ( ) == null ? Locale . getDefault ( ) : locale . getValue ( ) ; return text . getValue ( ) == null ? "" : text . getValue ( ) . toUpperCase ( localeValue ) ; } , text , locale ) ; |
public class CassandraSpanStore { /** * This makes it possible to safely drop the annotations _ query SASI .
* < p > If dropped , trying to search by annotation in the UI will throw an IllegalStateException . */
static SelectTraceIdsFromSpan . Factory initialiseSelectTraceIdsFromSpan ( Session session ) { } } | try { return new SelectTraceIdsFromSpan . Factory ( session ) ; } catch ( DriverException ex ) { LOG . warn ( "failed to prepare annotation_query index statements: " + ex . getMessage ( ) ) ; return null ; } |
public class RunUtil { /** * Creates a new run with the specified text and inherits the style of the parent paragraph .
* @ param text the initial text of the run .
* @ param parentParagraph the parent paragraph whose style to inherit .
* @ return the newly created run . */
public static R create ( String text , P parentParagraph ) { } } | R run = create ( text ) ; applyParagraphStyle ( parentParagraph , run ) ; return run ; |
public class IsEmptyBuilder { /** * リフレクションを使用しフィールドの値を取得し判定する 。
* < p > static修飾子を付与しているフィールドは 、 除外されます 。
* < p > transient修飾子を付与しているフィールドは 、 除外されます 。
* @ param obj 判定対象のオブジェクト 。
* @ param excludedFields 除外対処のフィールド名 。
* @ return 引数で指定したobjがnullの場合 、 trueを返す 。 */
public static boolean reflectionIsEmpty ( final Object obj , final String ... excludedFields ) { } } | return reflectionIsEmpty ( obj , IsEmptyConfig . create ( ) , Arrays . asList ( excludedFields ) ) ; |
public class SourceFinder { /** * Open a source file in given package .
* @ param packageName
* the name of the package containing the class whose source file
* is given
* @ param fileName
* the unqualified name of the source file
* @ return the source file
* @ throws IOException
* if a matching source file cannot be found */
public SourceFile findSourceFile ( String packageName , String fileName ) throws IOException { } } | // On windows the fileName specification is different between a file in
// a directory tree , and a
// file in a zip file . In a directory tree the separator used is ' \ ' ,
// while in a zip it ' s ' / '
// Therefore for each repository figure out what kind it is and use the
// appropriate separator .
// In all practicality , this code could just use the hardcoded ' / ' char ,
// as windows can open
// files with this separator , but to allow for the mythical ' other '
// platform that uses an
// alternate separator , make a distinction
String platformName = getPlatformName ( packageName , fileName ) ; String canonicalName = getCanonicalName ( packageName , fileName ) ; // Is the file in the cache already ? Always cache it with the canonical
// name
SourceFile sourceFile = cache . get ( canonicalName ) ; if ( sourceFile != null ) { return sourceFile ; } // Find this source file , add its data to the cache
if ( DEBUG ) { System . out . println ( "Trying " + fileName + " in package " + packageName + "..." ) ; } // Query each element of the source path to find the requested source
// file
for ( SourceRepository repos : repositoryList ) { if ( repos instanceof BlockingSourceRepository && ! ( ( BlockingSourceRepository ) repos ) . isReady ( ) ) { continue ; } fileName = repos . isPlatformDependent ( ) ? platformName : canonicalName ; if ( DEBUG ) { System . out . println ( "Looking in " + repos + " for " + fileName ) ; } if ( repos . contains ( fileName ) ) { // Found it
sourceFile = new SourceFile ( repos . getDataSource ( fileName ) ) ; cache . put ( canonicalName , sourceFile ) ; // always cache with
// canonicalName
return sourceFile ; } } throw new FileNotFoundException ( "Can't find source file " + fileName ) ; |
public class AbstractGroupsPayload { /** * Used because ObjectMapper does not always read in doubles as doubles
* When it is a Map < String , Object > */
private Double [ ] convertObjectArrToDoubleArr ( final Object [ ] list ) { } } | final Double [ ] toReturn = new Double [ list . length ] ; for ( int i = 0 ; i < list . length ; i ++ ) { toReturn [ i ] = ( ( Number ) list [ i ] ) . doubleValue ( ) ; } return toReturn ; |
public class SupportedLCSCapabilitySetsImpl { /** * ( non - Javadoc )
* @ see
* org . restcomm . protocols . ss7 . map . api . primitives . MAPAsnPrimitive # encodeAll ( org . mobicents . protocols . asn . AsnOutputStream ) */
public void encodeAll ( AsnOutputStream asnOs ) throws MAPException { } } | this . encodeAll ( asnOs , Tag . CLASS_UNIVERSAL , Tag . STRING_BIT ) ; |
public class DocumentFactory { /** * Creates a document from the given tokens . The language parameter controls how the content of the documents is
* created . If the language has whitespace tokens are joined with a single space between them , otherwise no space is
* inserted between tokens .
* @ param tokens the tokens making up the document
* @ param language the language of the document
* @ return the document with tokens provided . */
public Document fromTokens ( @ NonNull Language language , @ NonNull String ... tokens ) { } } | return fromTokens ( Arrays . asList ( tokens ) , language ) ; |
public class OWLDataFactoryImpl { /** * SWRL */
@ Nonnull @ Override public SWRLRule getSWRLRule ( @ Nonnull Set < ? extends SWRLAtom > body , @ Nonnull Set < ? extends SWRLAtom > head , @ Nonnull Set < OWLAnnotation > annotations ) { } } | checkNull ( body , "body" , true ) ; checkNull ( head , "head" , true ) ; checkAnnotations ( annotations ) ; return new SWRLRuleImpl ( body , head , annotations ) ; |
public class DBTablePropertySheet { /** * GEN - LAST : event _ tfPackageNameActionPerformed */
private void tfClassNameKeyTyped ( java . awt . event . KeyEvent evt ) // GEN - FIRST : event _ tfClassNameKeyTyped
{ } } | // GEN - HEADEREND : event _ tfClassNameKeyTyped
// Revert on ESC
if ( evt . getKeyChar ( ) == KeyEvent . VK_ESCAPE ) { this . tfClassName . setText ( aTable . getClassName ( ) ) ; } |
public class Process { /** * checks if the passed in workId is
* Activity
* @ return boolean status */
public boolean isWorkActivity ( Long pWorkId ) { } } | if ( this . activities == null ) { return false ; } for ( int i = 0 ; i < activities . size ( ) ; i ++ ) { if ( pWorkId . longValue ( ) == activities . get ( i ) . getId ( ) . longValue ( ) ) { return true ; } } return false ; |
public class JQMListItem { /** * Set the count bubble value . If null this will throw a runtime
* exception . To remove a count bubble call removeCount ( ) */
public void setCount ( Integer count ) { } } | if ( count == null ) throw new RuntimeException ( "Cannot set count to null. Call removeCount() if you wanted to remove the bubble" ) ; if ( countElem == null ) createAndAttachCountElement ( ) ; countElem . setInnerText ( count . toString ( ) ) ; |
public class Resource { /** * This method allows a pre - existing resource calendar to be attached to a
* resource .
* @ param calendar resource calendar */
public void setResourceCalendar ( ProjectCalendar calendar ) { } } | set ( ResourceField . CALENDAR , calendar ) ; if ( calendar == null ) { setResourceCalendarUniqueID ( null ) ; } else { calendar . setResource ( this ) ; setResourceCalendarUniqueID ( calendar . getUniqueID ( ) ) ; } |
public class CheckBoxPainter { /** * Create the check mark shape .
* @ param x the x coordinate of the upper - left corner of the check mark .
* @ param y the y coordinate of the upper - left corner of the check mark .
* @ param size the check mark size in pixels .
* @ return the check mark shape . */
private Shape createCheckMark ( int x , int y , int size ) { } } | int markSize = ( int ) ( size * SIZE_MULTIPLIER + 0.5 ) ; int markX = x + ( int ) ( size * X_MULTIPLIER + 0.5 ) ; int markY = y + ( int ) ( size * Y_MULTIPLIER + 0.5 ) ; return shapeGenerator . createCheckMark ( markX , markY , markSize , markSize ) ; |
public class Allele { /** * A method to simulate merging of two alleles strictly , meaning the sequence in the overlapping regions must be equal .
* @ param right allele
* @ param minimumOverlap for the merge to occur
* @ return new merged allele .
* @ throws IllegalSymbolException
* @ throws IndexOutOfBoundsException
* @ throws IllegalAlphabetException
* @ throws AlleleException */
public Allele merge ( final Allele right , final long minimumOverlap ) throws IllegalSymbolException , IndexOutOfBoundsException , IllegalAlphabetException , AlleleException { } } | Allele . Builder builder = Allele . builder ( ) ; Locus overlap = intersection ( right ) ; // System . out . println ( " overlap = " + overlap ) ;
// System . out . println ( " overlap . length ( ) " + overlap . length ( ) + " < " + startimumOverlap + " ? ? " ) ;
if ( overlap . length ( ) < minimumOverlap ) { return builder . reset ( ) . build ( ) ; } Allele bit = builder . withContig ( overlap . getContig ( ) ) . withStart ( overlap . getStart ( ) ) . withEnd ( overlap . getEnd ( ) ) . withSequence ( SymbolList . EMPTY_LIST ) . withLesion ( Lesion . UNKNOWN ) . build ( ) ; // System . out . println ( " bit = " + bit + " " + bit . sequence . seqString ( ) ) ;
Allele a = bit . doubleCrossover ( right ) ; // System . out . println ( " a = " + a + " " + a . sequence . seqString ( ) ) ;
Allele b = bit . doubleCrossover ( this ) ; // System . out . println ( " b = " + b + " " + b . sequence . seqString ( ) ) ;
if ( a . sequence . seqString ( ) . equals ( b . sequence . seqString ( ) ) ) { Locus union = union ( right ) ; return builder . withName ( right . getName ( ) ) . withContig ( union . getContig ( ) ) . withStart ( union . getStart ( ) ) . withEnd ( union . getEnd ( ) ) . withSequence ( SymbolList . EMPTY_LIST ) . withLesion ( Lesion . UNKNOWN ) . build ( ) . doubleCrossover ( right ) . doubleCrossover ( this ) ; } return builder . reset ( ) . build ( ) ; |
public class TaskQueue { /** * Wait that every pending task are processed .
* This method will return once it has no pending task or once it has been closed */
public void waitAllTasks ( ) { } } | synchronized ( this . tasks ) { while ( this . hasTaskPending ( ) ) { try { this . tasks . wait ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } synchronized ( this . tasksReachesZero ) { if ( this . runningTasks > 0 ) { try { this . tasksReachesZero . wait ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } } } |
public class VdmDebugModelPresentation { /** * ( non - Javadoc )
* @ see org . eclipse . debug . ui . IDebugModelPresentation # computeDetail ( org . eclipse . debug . core . model . IValue ,
* org . eclipse . debug . ui . IValueDetailListener ) */
public void computeDetail ( IValue value , IValueDetailListener listener ) { } } | String detail = "" ; try { if ( value instanceof VdmValue ) { VdmValue vdmValue = ( VdmValue ) value ; vdmValue . getVariables ( ) ; detail = vdmValue . getRawValue ( ) ; } else { detail = value . getValueString ( ) ; } } catch ( DebugException e ) { } listener . detailComputed ( value , detail ) ; |
public class BundleDelegatingComponentInstanciationListener { /** * { @ inheritDoc } */
public void addBundle ( ExtendedBundle bundle ) { } } | if ( serviceRegistration == null ) { throw new IllegalStateException ( "Cannot add any bundle to listener while not started." ) ; } synchronized ( listeners ) { listeners . put ( bundle . getBundle ( ) . getSymbolicName ( ) , new BundleAnalysingComponentInstantiationListener ( bundle . getBundle ( ) . getBundleContext ( ) , PaxWicketBeanInjectionSource . INJECTION_SOURCE_SCAN , factoryTracker ) ) ; } |
public class TrainingsImpl { /** * Get untagged images for a given project iteration .
* This API supports batching and range selection . By default it will only return first 50 images matching images .
* Use the { take } and { skip } parameters to control how many images to return in a given batch .
* @ param projectId The project id
* @ param getUntaggedImagesOptionalParameter the object representing the optional parameters to be set before calling this API
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ throws CloudException thrown if the request is rejected by server
* @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @ return the List & lt ; Image & gt ; object if successful . */
public List < Image > getUntaggedImages ( UUID projectId , GetUntaggedImagesOptionalParameter getUntaggedImagesOptionalParameter ) { } } | return getUntaggedImagesWithServiceResponseAsync ( projectId , getUntaggedImagesOptionalParameter ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class StringUtils { /** * Reads the contents of a file using the supplied { @ link Charset } ; the default system charset may vary across
* systems so can ' t be trusted .
* @ param aFile The file from which to read
* @ param aCharset The character set of the file to be read
* @ return The information read from the file
* @ throws IOException If the supplied file could not be read */
public static String read ( final File aFile , final Charset aCharset ) throws IOException { } } | String string = new String ( readBytes ( aFile ) , aCharset ) ; if ( string . endsWith ( EOL ) ) { string = string . substring ( 0 , string . length ( ) - 1 ) ; } return string ; |
public class AppServiceEnvironmentsInner { /** * Create or update a worker pool .
* Create or update a worker pool .
* @ param resourceGroupName Name of the resource group to which the resource belongs .
* @ param name Name of the App Service Environment .
* @ param workerPoolName Name of the worker pool .
* @ param workerPoolEnvelope Properties of the worker pool .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable for the request */
public Observable < ServiceResponse < WorkerPoolResourceInner > > createOrUpdateWorkerPoolWithServiceResponseAsync ( String resourceGroupName , String name , String workerPoolName , WorkerPoolResourceInner workerPoolEnvelope ) { } } | if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( name == null ) { throw new IllegalArgumentException ( "Parameter name is required and cannot be null." ) ; } if ( workerPoolName == null ) { throw new IllegalArgumentException ( "Parameter workerPoolName is required and cannot be null." ) ; } if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( workerPoolEnvelope == null ) { throw new IllegalArgumentException ( "Parameter workerPoolEnvelope is required and cannot be null." ) ; } if ( this . client . apiVersion ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.apiVersion() is required and cannot be null." ) ; } Validator . validate ( workerPoolEnvelope ) ; Observable < Response < ResponseBody > > observable = service . createOrUpdateWorkerPool ( resourceGroupName , name , workerPoolName , this . client . subscriptionId ( ) , workerPoolEnvelope , this . client . apiVersion ( ) , this . client . acceptLanguage ( ) , this . client . userAgent ( ) ) ; return client . getAzureClient ( ) . getPutOrPatchResultAsync ( observable , new TypeToken < WorkerPoolResourceInner > ( ) { } . getType ( ) ) ; |
public class SimpleExpression { /** * Create a case expression builder
* @ param other
* @ return case expression builder */
public CaseForEqBuilder < T > when ( T other ) { } } | return new CaseForEqBuilder < T > ( mixin , ConstantImpl . create ( other ) ) ; |
public class LogicSchemas { /** * Initialize proxy context .
* @ param localSchemaNames local schema names
* @ param schemaDataSources data source map
* @ param schemaRules schema rule map
* @ param isUsingRegistry is using registry or not */
public void init ( final Collection < String > localSchemaNames , final Map < String , Map < String , YamlDataSourceParameter > > schemaDataSources , final Map < String , RuleConfiguration > schemaRules , final boolean isUsingRegistry ) { } } | databaseType = JDBCDriverURLRecognizerEngine . getDatabaseType ( schemaDataSources . values ( ) . iterator ( ) . next ( ) . values ( ) . iterator ( ) . next ( ) . getUrl ( ) ) ; initSchemas ( localSchemaNames , schemaDataSources , schemaRules , isUsingRegistry ) ; |
public class HistoricExternalTaskLogManager { /** * delete / / / / / */
public void deleteHistoricExternalTaskLogsByProcessInstanceIds ( List < String > processInstanceIds ) { } } | deleteExceptionByteArrayByParameterMap ( "processInstanceIdIn" , processInstanceIds . toArray ( ) ) ; getDbEntityManager ( ) . deletePreserveOrder ( HistoricExternalTaskLogEntity . class , "deleteHistoricExternalTaskLogByProcessInstanceIds" , processInstanceIds ) ; |
public class FontSpec { /** * Return a clone of this object but with a different font .
* @ param aNewFont
* The new font to use . Must not be < code > null < / code > .
* @ return this if the fonts are equal - a new object otherwise . */
@ Nonnull public FontSpec getCloneWithDifferentFont ( @ Nonnull final PreloadFont aNewFont ) { } } | ValueEnforcer . notNull ( aNewFont , "NewFont" ) ; if ( aNewFont . equals ( m_aPreloadFont ) ) return this ; // Don ' t copy loaded font !
return new FontSpec ( aNewFont , m_fFontSize , m_aColor ) ; |
public class DataSet { /** * Add a row to the data set .
* @ param columnValues Column values forming a row .
* @ return The data set instance ( for chained calls ) .
* @ throws InvalidOperationException if this data set is read - only .
* @ see # rows ( Object [ ] [ ] )
* @ see # add ( DataSet )
* @ see # isReadOnly ( ) */
@ SafeVarargs public final DataSet row ( Object ... columnValues ) { } } | checkIfNotReadOnly ( ) ; if ( columnValues . length != source . getColumnCount ( ) ) { throw new InvalidOperationException ( source . getColumnCount ( ) + " columns expected, not " + columnValues . length + "." ) ; } addRow ( new Row ( columnValues ) ) ; return this ; |
public class Version { /** * Returns true if iphone / ipad and version is 3.2 + */
public static final boolean iOs3_2Plus ( ) { } } | if ( cachediOs3_2Plus == null ) { cachediOs3_2Plus = false ; if ( Platform . getName ( ) . equals ( PLATFORM_IPHONE_OS ) ) { String [ ] version = Javascript . stringSplit ( Platform . getVersion ( ) , "." ) ; int major = Integer . parseInt ( version [ 0 ] ) ; int minor = Integer . parseInt ( version [ 1 ] ) ; if ( ( major > 3 ) || ( ( major == 3 ) && ( minor > 1 ) ) ) { cachediOs3_2Plus = true ; } } } return cachediOs3_2Plus ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.