Code_Function
stringlengths
13
13.9k
Message
stringlengths
10
1.46k
fun toType(value: String?, pattern: String?, locale: Locale?): Any? { val calendar: Calendar = toCalendar(value, pattern, locale) return toType(calendar) }
Parse a String value to the required type
fun toggleSong(songId: Long?, songName: String?, albumName: String?, artistName: String?) { if (getSongId(songId) == null) { addSongId(songId, songName, albumName, artistName) } else { removeItem(songId) } }
Toggle the current song as favorite
@DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:55:07.260 -0500", hash_original_method = "03611E3BB30258B8EC4FDC9F783CBCCF", hash_generated_method = "75EED4D564C6A1FA0F492FBBD941CE61" ) fun createRouteHeader(address: Address?): RouteHeader? { if (address == null) throw Null...
Creates a new RouteHeader based on the newly supplied address value .
@Throws(Exception::class) fun NominalItem(att: Attribute, valueIndex: Int) { super(att) if (att.isNumeric()) { throw Exception("NominalItem must be constructed using a nominal attribute") } m_attribute = att if (m_attribute.numValues() === 1) { m_valueIndex = 0 } else { m_valueIndex = valueIndex } }
Constructs a new NominalItem .
fun inferType(tuples: TupleSet, field: String): Class<*>? { return if (tuples is Table) { (tuples as Table).getColumnType(field) } else { var type: Class<*>? = null var type2: Class<*>? = null val iter: Iterator<*> = tuples.tuples() while (iter.hasNext()) { val t: Tuple = iter.next() as Tuple if (type == null) { type =...
Infer the data field type across all tuples in a TupleSet .
private fun exactMinMax(relation: Relation<O>, distFunc: DistanceQuery<O>): DoubleMinMax? { val progress: FiniteProgress? = if (LOG.isVerbose()) FiniteProgress( "Exact fitting distance computations", relation.size(), LOG ) else null val minmax = DoubleMinMax() val iditer: DBIDIter = relation.iterDBIDs() while (iditer.v...
Compute the exact maximum and minimum .
fun testDoubleValueMinusZero() { val a = "-123809648392384754573567356745735.63567890295784902768787678287E-400" val aNumber = BigDecimal(a) val minusZero = (-9223372036854775808L).toLong() val result: Double = aNumber.doubleValue() assertTrue("incorrect value", java.lang.Double.doubleToLongBits(result) == minusZero) }
Double value of a small negative BigDecimal
fun SeaGlassContext(component: JComponent?, region: Region?, style: SynthStyle?, state: Int) { super(component, region, style, state) if (component === fakeComponent) { this.component = null this.region = null this.style = null return } if (component == null || region == null || style == null) { throw NullPointerExcept...
Creates a SeaGlassContext with the specified values . This is meant for subclasses and custom UI implementors . You very rarely need to construct a SeaGlassContext , though some methods will take one .
fun same( tags1: ArrayList<LinkedHashMap<String?, String?>>, tags2: ArrayList<LinkedHashMap<String?, String?>?> ): Boolean { if (tags1.size() !== tags2.size()) { return false } for (i in 0 until tags1.size()) { if (!tags1[i].equals(tags2[i])) { return false } } return true }
Check if two lists of tags are the same Note : this considers order relevant
fun copy(): TemplateEffect? { return TemplateEffect(labelTemplate, valueTemplate, attr.priority, exclusive, negated) }
Returns a copy of the effect .
fun RegionMBeanBridge(cachePerfStats: CachePerfStats) { this.regionStats = cachePerfStats this.regionMonitor = MBeanStatsMonitor(ManagementStrings.REGION_MONITOR.toLocalizedString()) regionMonitor.addStatisticsToMonitor(cachePerfStats.getStats()) configureRegionMetrics() }
Statistic related Methods
fun Set(cl: Class<*>) { OptionInstance = false PlugInObject = cl ObjectName = (PlugInObject as Class<*>).simpleName ObjectName = Convert(ObjectName) }
Defines the stored object as a class .
@Throws(IOException::class) fun include(ctx: DefaultFaceletContext, parent: UIComponent?, url: URL?) { val f: DefaultFacelet = this.factory.getFacelet(ctx.getFacesContext(), url) as DefaultFacelet f.include(ctx, parent) }
Grabs a DefaultFacelet from referenced DefaultFaceletFacotry
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:56:30.241 -0500", hash_original_method = "6B85F90491881D2C299E5BF02CCF5806", hash_generated_method = "82489B93E2C39EE14F117933CF49B12C" ) fun toHexString(v: Long): St...
Converts the specified long value into its hexadecimal string representation . The returned string is a concatenation of characters from ' 0 ' to ' 9 ' and ' a ' to ' f ' .
private fun initializeProgressView(inflater: LayoutInflater, actionArea: ViewGroup) { if (mCard.mCardProgress != null) { val progressView: View = inflater.inflate(R.layout.card_progress, actionArea, false) val progressBar = progressView.findViewById(R.id.card_progress) as ProgressBar (progressView.findViewById(R.id.car...
Build the progress view into the given ViewGroup .
@Synchronized fun resetReaders() { readers = null }
Resets a to-many relationship , making the next get call to query for a fresh result .
fun register(containerFactory: ContainerFactory) { containerFactory.registerContainer( "wildfly8x", ContainerType.INSTALLED, WildFly8xInstalledLocalContainer::class.java ) containerFactory.registerContainer( "wildfly8x", ContainerType.REMOTE, WildFly8xRemoteContainer::class.java ) containerFactory.registerContainer( "w...
Register container .
public static byte [ ] decode ( String encoded ) { if ( encoded == null ) { return null ; } char [ ] base64Data = encoded . toCharArray ( ) ; int len = removeWhiteSpace ( base64Data ) ; if ( len % FOURBYTE != 0 ) { return null ; } int numberQuadruple = ( len / FOURBYTE ) ; if ( numberQuadruple == 0 ) { return new byte ...
Decodes Base64 data into octects
@DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:55:34.017 -0500", hash_original_method = "647E85AB615972325C277E376A221EF0", hash_generated_method = "9835D90D4E0E7CCFFD07C436051E80EB" ) fun hasIsdnSubaddress(): Boolean { return hasParm(ISUB) }
return true if the isdn subaddress exists .
private fun tryScrollBackToTopWhileLoading() { tryScrollBackToTop() }
just make easier to understand
private fun extractVariables(variablesBody: String): Map<String, String?>? { val map: Map<String, String> = HashMap() val m: Matcher = PATTERN_VARIABLES_BODY.matcher(variablesBody) LOG.debug("parsing variables body") while (m.find()) { val key: String = m.group(1) val value: String = m.group(2) if (map.containsKey(key)...
Extract variables map from variables body .
fun hashCode(): Int { val fh = if (first == null) 0 else first.hashCode() val sh = if (second == null) 0 else second.hashCode() return fh shl 16 or (sh and 0xFFFF) }
Returns this Pair 's hash code , of which the 16 high bits are the 16 low bits of < tt > getFirst ( ) .hashCode ( ) < /tt > are identical to the 16 low bits and the 16 low bits of < tt > getSecond ( ) .hashCode ( ) < /tt >
@Throws(Exception::class) private fun CallStaticVoidMethod(env: JNIEnvironment, classJREF: Int, methodID: Int) { if (VM.VerifyAssertions) { VM._assert(VM.BuildForPowerPC, ERROR_MSG_WRONG_IMPLEMENTATION) } if (traceJNI) VM.sysWrite("JNI called: CallStaticVoidMethod \n") RuntimeEntrypoints.checkJNICountDownToGC() try { J...
CallStaticVoidMethod : invoke a static method that returns void arguments passed using the vararg ... style NOTE : the vararg 's are not visible in the method signature here ; they are saved in the caller frame and the glue frame < p > < strong > NOTE : This implementation is NOT used for IA32 . On IA32 , it is overwri...
fun visitInterface(): jdk.internal.org.objectweb.asm.signature.SignatureVisitor? { return this }
Visits the type of an interface implemented by the class .
fun intersect(line: javax.sound.sampled.Line?): Vec4? { val intersection: Intersection? = intersect(line, this.a, this.b, this.c) return if (intersection != null) intersection.getIntersectionPoint() else null }
Determine the intersection of the triangle with a specified line .
fun lostOwnership( clipboard: java.awt.datatransfer.Clipboard?, contents: java.awt.datatransfer.Transferable? ) { }
Notifies this object that it is no longer the owner of the contents of the clipboard .
fun testExample() { Locale.setDefault(Locale("en", "UK")) doTestExample("fr", "CH", arrayOf("_fr_CH.class", "_fr.properties", ".class")) doTestExample("fr", "FR", arrayOf("_fr.properties", ".class")) doTestExample("de", "DE", arrayOf("_en.properties", ".class")) doTestExample("en", "US", arrayOf("_en.properties", ".cla...
Verifies the example from the getBundle specification .
fun PubSubManager(connection: Connection, toAddress: String) { con = connection to = toAddress }
Create a pubsub manager associated to the specified connection where the pubsub requests require a specific to address for packets .
fun discoverOnAllPorts() { log.info("Sending LLDP packets out of all the enabled ports") for (sw in switchService.getAllSwitchDpids()) { val iofSwitch: IOFSwitch = switchService.getSwitch(sw) ?: continue if (!iofSwitch.isActive()) continue val c: Collection<OFPort> = iofSwitch.getEnabledPortNumbers() if (c != null) { f...
Send LLDPs to all switch-ports
fun parseQuerystring(queryString: String?): Map<String, String>? { val map: MutableMap<String, String> = HashMap() if (queryString == null || queryString == "") { return map } val params = queryString.split("&".toRegex()).dropLastWhile { it.isEmpty() } .toTypedArray() for (param in params) { try { val keyValuePair = pa...
Parse a querystring into a map of key/value pairs .
fun isDiscardVisible(): Boolean { return m_ButtonDiscard.isVisible() }
Returns the visibility of the discard button .
private fun editNote(noteId: Int) { hideSoftKeyboard() val intent = Intent(this@MainActivity, NoteActivity::class.java) intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK intent.putExtra("id", noteId.toString()) startActivity(intent) }
Method used to enter note edition mode
private fun createLeftSide(): javax.swing.JPanel? { val leftPanel: javax.swing.JPanel = javax.swing.JPanel() listModel = CustomListModel() leftPanel.setLayout(java.awt.BorderLayout()) listBox = javax.swing.JList<String>(listModel) listBox.setCellRenderer(JlistRenderer()) listBox.setSelectionMode(javax.swing.ListSelecti...
Creates the panel on the left side of the window
fun insertAt(dest: FloatArray, src: FloatArray, offset: Int): FloatArray? { val temp = FloatArray(dest.size + src.size - 1) System.arraycopy(dest, 0, temp, 0, offset) System.arraycopy(src, 0, temp, offset, src.size) System.arraycopy(dest, offset + 1, temp, src.size + offset, dest.size - offset - 1) return temp }
Inserts one array into another by replacing specified offset .
fun removeFailListener() { this.failedListener = null }
Unregister fail listener , initialised by Builder # failListener
private fun fieldsForOtherResourceSpecified( includedFields: TypedParams<IncludedFieldsParams>?, typeIncludedFields: IncludedFieldsParams ): Boolean { return includedFields != null && !includedFields.getParams() .isEmpty() && noResourceIncludedFieldsSpecified(typeIncludedFields) }
Checks if fields for other resource has been specified but not for the processed one
fun resolveReference(ref: MemberRef?): IBinding? { return null }
Resolves the given reference and returns the binding for it . < p > The implementation of < code > MemberRef.resolveBinding < /code > forwards to this method . How the name resolves is often a function of the context in which the name node is embedded as well as the name itself . < /p > < p > The default implementation...
@Scheduled(fixedRate = FIXED_RATE) fun logStatistics() { if (beansAvailable) { if (log.isInfoEnabled()) { logOperatingSystemStatistics() logRuntimeStatistics() logMemoryStatistics() logThreadStatistics() log.info("\n") } } if (log.isInfoEnabled()) { logDroppedData() logBufferStatistics() logStorageStatistics() } }
Log all the statistics .
@HLEFunction(nid = -0x6cbbf4ef, version = 150) fun sceWlanDevIsPowerOn(): Int { return Wlan.getSwitchState() }
Determine if the wlan device is currently powered on
@Throws(IOException::class) fun readTransformMetaDataFromFile(spec: String?, metapath: String?): FrameBlock? { return readTransformMetaDataFromFile(spec, metapath, TfUtils.TXMTD_SEP) }
Reads transform meta data from an HDFS file path and converts it into an in-memory FrameBlock object . The column names in the meta data file 'column.names ' is processed with default separator ' , ' .
fun toString(codeset: String?): String { val retVal = StringBuffer() for (i in 0 until prolog.size()) { val e: ConcreteElement = prolog.elementAt(i) as ConcreteElement retVal.append(e.toString(getCodeset()) + "\n") } if (content != null) retVal.append(content.toString(getCodeset()) + "\n") return versionDecl + retVal.t...
Override toString so it prints something useful
fun isCompound(): Boolean { return splits.size() !== 1 }
Checks if this instance is a compounding word .
fun hasAnnotation(annotation: Annotation?): Boolean { return annotationAccessor.typeHas(annotation) }
Determines whether T has a particular annotation .
fun create(): Builder? { return Builder(false) }
Constructs an asynchronous query task .
@Throws(IOException::class) fun MP4Reader(fis: FileInputStream?) { if (null == fis) { log.warn("Reader was passed a null file") log.debug("{}", ToStringBuilder.reflectionToString(this)) } this.fis = MP4DataStream(fis) channel = fis.getChannel() decodeHeader() analyzeFrames() firstTags.add(createFileMeta()) createPreStr...
Creates MP4 reader from file input stream , sets up metadata generation flag .
@Strictfp fun plusPIO2_strict(angRad: Double): Double { return if (angRad > -Math.PI / 4) { angRad + PIO2_LO + PIO2_HI } else { angRad + PIO2_HI + PIO2_LO } }
Strict version .
@Synchronized private fun isSelectedTrackRecording(): Boolean { return trackDataHub != null && trackDataHub.isSelectedTrackRecording() }
Returns true if the selected track is recording . Needs to be synchronized because trackDataHub can be accessed by multiple threads .
fun loadIcon(suggestion: ApplicationSuggestion): Drawable? { return try { val `is`: InputStream = mContext.getContentResolver().openInputStream(suggestion.getThumbailUri()) Drawable.createFromStream(`is`, null) } catch (e: FileNotFoundException) { null } }
Loads the icon for the given suggestion .
fun isHead(): Boolean { return if (parent == null) true else false }
Returns true if this node is the head of its DominatorTree .
fun ofMethod(returnType: CtClass?, paramTypes: Array<CtClass?>?): String? { val desc = StringBuffer() desc.append('(') if (paramTypes != null) { val n = paramTypes.size for (i in 0 until n) toDescriptor(desc, paramTypes[i]) } desc.append(')') if (returnType != null) toDescriptor(desc, returnType) return desc.toString()...
Returns the descriptor representing a method that receives the given parameter types and returns the given type .
fun eGet(featureID: Int, resolve: Boolean, coreType: Boolean): Any? { when (featureID) { UmplePackage.GEN_EXPR___NAME_1 -> return getName_1() UmplePackage.GEN_EXPR___ANONYMOUS_GEN_EXPR_11 -> return getAnonymous_genExpr_1_1() UmplePackage.GEN_EXPR___EQUALITY_OP_1 -> return getEqualityOp_1() UmplePackage.GEN_EXPR___NAME_...
< ! -- begin-user-doc -- > < ! -- end-user-doc -- >
fun Main() {}
Creates a new instance of Main
fun serializeFile(path: String?, o: Any) { try { val context: JAXBContext = JAXBContext.newInstance(o.javaClass) val m: Marshaller = context.createMarshaller() m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE) val stream = FileOutputStream(path) m.marshal(o, stream) } catch (e: JAXBException) { e.printStack...
Serializes an object and saves it to a file , located at given path .
fun min(expression: Expression?): MinProjectionExpression? { return MinProjectionExpression(expression, false) }
Minimum aggregation function .
fun onUIReset(frame: PtrFrameLayout?) { mScale = 1f mDrawable.stop() }
When the content view has reached top and refresh has been completed , view will be reset .
fun forgetInstruction(ins: BytecodeInstruction): Boolean { if (!instructionMap.containsKey(ins.getClassName())) return false return if (!instructionMap.get(ins.getClassName()) .containsKey(ins.getMethodName()) ) false else instructionMap.get(ins.getClassName()).get(ins.getMethodName()).remove(ins) }
< p > forgetInstruction < /p >
@Throws(IOException::class) fun watchRecursive(path: Path?): Observable<WatchEvent<*>?>? { val recursive = true return ObservableFactory(path, recursive).create() }
Creates an observable that watches the given directory and all its subdirectories . Directories that are created after subscription are watched , too .
fun invertMatrix(matrix: Matrix3?): Matrix3? { if (matrix == null) { throw IllegalArgumentException( Logger.logMessage( Logger.ERROR, "Matrix3", "invertMatrix", "missingMatrix" ) ) } throw UnsupportedOperationException("Matrix3.invertMatrix is not implemented") }
Inverts the specified matrix and stores the result in this matrix . < p/ > This throws an exception if the matrix is singular . < p/ > The result of this method is undefined if this matrix is passed in as the matrix to invert .
fun sync(context: Context) { val cr: ContentResolver = cr() val proj = arrayOf<String>(_ID, Syncs.TYPE_ID, Syncs.OBJECT_ID, millis(Syncs.ACTION_ON)) val sel: String = Syncs.STATUS_ID + " = ?" val args = arrayOf<String>(java.lang.String.valueOf(ACTIVE.id)) val order: String = Syncs.ACTION_ON + " DESC" val c = EasyCursor...
Post a notification for any unread server changes .
fun serializableInstance(): LogisticRegressionRunner? { val variables: MutableList<Node> = LinkedList() val var1 = ContinuousVariable("X") val var2 = ContinuousVariable("Y") variables.add(var1) variables.add(var2) val dataSet: DataSet = ColtDataSet(3, variables) val col1data = doubleArrayOf(0.0, 1.0, 2.0) val col2data ...
Generates a simple exemplar of this class to test serialization .
fun ESHistory(documentId: String, events: Collection<HistoryEvent?>) { this.documentId = documentId this.events = events }
New instance with the specified content .
fun executeDelayedExpensiveWrite(task: Runnable?): Boolean { val f: Future<*> = executeDiskStoreTask(task, this.delayedWritePool) lastDelayedWrite = f return f != null }
Execute a task asynchronously , or in the calling thread if the bound is reached . This pool is used for write operations which can be delayed , but we have a limit on how many write operations we delay so that we do n't run out of disk space . Used for deletes , unpreblow , RAF close , etc .
private fun resetMnemonics() { if (mnemonicToIndexMap != null) { mnemonicToIndexMap.clear() mnemonicInputMap.clear() } }
Resets the mnemonics bindings to an empty state .
fun textureMode(mode: Int) { g.textureMode(mode) }
Set texture mode to either to use coordinates based on the IMAGE ( more intuitive for new users ) or NORMALIZED ( better for advanced chaps )
fun execute(params: Array<String?>?): GetETLDriverInfo? { return try { val commandLine: CommandLine = getCommandLine(params, PARAMS_STRUCTURE) val minBId: String = commandLine.getOptionValue("min-batch-id") LOGGER.debug("minimum-batch-id is $minBId") val maxBId: String = commandLine.getOptionValue("max-batch-id") LOGGE...
This method runs GetETLInfo proc and retrieves information regarding files available for batches mentioned .
fun FunctionblockFactoryImpl() { super() }
Creates an instance of the factory . < ! -- begin-user-doc -- > < ! -- end-user-doc -- >
fun writePopulation(outputfolder: String) { var outputfolder = outputfolder outputfolder = outputfolder + if (outputfolder.endsWith("/")) "" else "/" if (sc.getPopulation().getPersons().size() === 0 || sc.getPopulation() .getPersonAttributes() == null ) { throw RuntimeException("Either no persons or person attributes t...
Writes the population and their attributes to file .
@Throws(LocalRepositoryException::class) fun restart(serviceName: String) { val prefix = "restart(): serviceName=$serviceName " _log.debug(prefix) val cmd = arrayOf(_SYSTOOL_CMD, _SYSTOOL_RESTART, serviceName) val result: Exec.Result = org.gradle.api.tasks.Exec.sudo(_SYSTOOL_TIMEOUT, cmd) checkFailure(result, prefix) }
Restart a service
public void receiveResultqueryStorageProcessors ( com . emc . storageos . vasa . VasaServiceStub . QueryStorageProcessorsResponse result ) { }
auto generated Axis2 call back method for queryStorageProcessors method override this method for handling normal response from queryStorageProcessors operation
public final void testNextBytesbyteArray02 ( ) { byte [ ] myBytes ; byte [ ] myBytes1 ; byte [ ] myBytes2 ; for ( int i = 1 ; i < LENGTH ; i += INCR ) { myBytes = new byte [ i ] ; for ( int j = 1 ; j < i ; j ++ ) { myBytes [ j ] = ( byte ) ( j & 0xFF ) ; } sr . setSeed ( myBytes ) ; sr2 . setSeed ( myBytes ) ; for ( in...
test against the `` void nextBytes ( byte [ ] ) '' method ; it checks out that different SecureRandom objects being supplied with the same seed return the same sequencies of bytes as results of their `` nextBytes ( byte [ ] ) '' methods
@DSSafe(DSCat.SAFE_LIST) @DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:29:27.931 -0500", hash_original_method = "92BE44E9F6280B7AE0D2A8904499350A", hash_generated_method = "5A68C897F2049F6754C8DA6E4CBD57CE" ) fun translationXBy(value: Float): ViewPropertyAnimator? { anima...
This method will cause the View 's < code > translationX < /code > property to be animated by the specified value . Animations already running on the property will be canceled .
private fun loadServerDetailsActivity() { Preference.putString(context, Constants.PreferenceFlag.IP, null) val intent = Intent(this@AlreadyRegisteredActivity, ServerDetails::class.java) intent.putExtra(getResources().getString(R.string.intent_extra_regid), regId) intent.putExtra( getResources().getString(R.string.inten...
Load server details activity .
fun createNamedGraph(model: Model, graphNameNode: Resource?, elements: RDFList?): NamedGraph? { val result: NamedGraph = model.createResource(SP.NamedGraph).`as`(NamedGraph::class.java) result.addProperty(SP.graphNameNode, graphNameNode) result.addProperty(SP.elements, elements) return result }
Creates a new NamedGraph element as a blank node in a given Model .
fun SQLWarning(reason: String?, SQLState: String?, vendorCode: Int, cause: Throwable?) { super(reason, SQLState, vendorCode, cause) }
Creates an SQLWarning object . The Reason string is set to reason , the SQLState string is set to given SQLState and the Error Code is set to vendorCode , cause is set to the given cause
@POST @Path("downloads") @ApiOperation(value = "Starts downloading artifacts", response = DownloadToken::class) @ApiResponses( value = [ApiResponse(code = 202, message = "OK"), ApiResponse( code = 400, message = "Illegal version format or artifact name" ), ApiResponse(code = 409, message = "Downloading already in progr...
Starts downloading artifacts .
fun release() { this@PathLockFactory.release(path, permits) }
Release file permit .
fun BuddyPanel(model: BuddyListModel?) { super(model) setCellRenderer(BuddyLabel()) setOpaque(false) this.setFocusable(false) this.addMouseListener(BuddyPanelMouseListener()) }
Create a new BuddyList .
fun createComponent(owner: Component?): Component? { return if (java.awt.GraphicsEnvironment.isHeadless()) { null } else HeavyWeightWindow(getParentWindow(owner)) }
Creates the Component to use as the parent of the < code > Popup < /code > . The default implementation creates a < code > Window < /code > , subclasses should override .
fun UnknownResolverVariableException(i18n: String?, vararg arguments: Any?) { super(i18n, arguments) }
Creates a parsing exception with message associated to the i18n and the arguments .
fun isEndNode(node: Node?): Boolean { return getDelegator().getCurrentStorage().isEndNode(node) }
Test if the given Node is an end node of a Way . Isolated nodes not part of a way are not considered an end node .
fun hasDefClearPathToMethodExit(duVertex: Definition): Boolean { require(graph.containsVertex(duVertex)) { "vertex not in graph" } return if (duVertex.isLocalDU()) false else hasDefClearPathToMethodExit( duVertex, duVertex, HashSet<BytecodeInstruction>() ) }
< p > hasDefClearPathToMethodExit < /p >
private fun resetAndGetFollowElements( tokens: ObservableXtextTokenStream, strict: Boolean ): Collection<FollowElement?>? { val parser: CustomInternalN4JSParser = createParser() parser.setStrict(strict) tokens.reset() return doGetFollowElements(parser, tokens) }
Create a fresh parser instance and process the tokens for a second pass .
@Throws(IgniteException::class) private fun printInfo(fs: IgniteFileSystem, path: IgfsPath) { println() println("Information for " + path + ": " + fs.info(path)) }
Prints information for file or directory .
fun makeHashValue(currentMaxListSize: Int): List<BindingSet?>? { return ArrayList<BindingSet>(currentMaxListSize / 2 + 1) }
Utility methods to make it easier to inserted custom store dependent list
fun cdf(`val`: Double, loc: Double, scale: Double): Double { var `val` = `val` `val` = (`val` - loc) / scale return 1.0 / (1.0 + Math.exp(-`val`)) }
Cumulative density function .
fun taskStateChanged(@TASK_STATE taskState: Int, tag: Serializable?) { when (taskState) { TASK_STATE_PREPARE -> { iView.layoutLoadingVisibility(isContentEmpty()) iView.layoutContentVisibility(!isContentEmpty()) iView.layoutEmptyVisibility(false) iView.layoutLoadFailedVisibility(false) } TASK_STATE_SUCCESS -> { iView.la...
According to the task execution state to update the page display state .
@Throws(javax.swing.text.BadLocationException::class) fun addLineTrackingIcon(line: Int, icon: Icon?): GutterIconInfo? { val offs: Int = textArea.getLineStartOffset(line) return addOffsetTrackingIcon(offs, icon) }
Adds an icon that tracks an offset in the document , and is displayed adjacent to the line numbers . This is useful for marking things such as source code errors .
fun createVertex(point: Point?): SpatialSparseVertex? { if (point != null) point.setSRID(SRID) return SpatialSparseVertex(point) }
Creates a new vertex located at < tt > point < /tt > . The spatial reference id is the to the one of the factory 's coordinate reference system .
private fun indentString(): String? { val sb = StringBuffer() for (i in 0 until indent) { sb.append(" ") } return sb.toString() }
Indent child nodes to help visually identify the structure of the AST .
fun isProcessing(): Boolean { return isProcessing }
Returns whether XBL processing is currently enabled .
@Throws(IOException::class) fun computeCodebase( name: String?, jarFile: String?, port: String, srcRoot: String?, mdAlgorithm: String? ): String? { return computeCodebase(name, jarFile, port.toInt(), srcRoot, mdAlgorithm) }
Convenience method that ultimately calls the primary 5-argument version of this method . This method allows one to input a < code > String < /code > value for the port to use when constructing the codebase ; which can be useful when invoking this method from a Jini configuration file .
private fun purgeRelayLogs(wait: Boolean) { if (relayLogRetention > 1) { logger.info("Checking for old relay log files...") val logDir = File(binlogDir) val filesToPurge: Array<File> = FileCommands.filesOverRetentionAndInactive( logDir, binlogFilePattern, relayLogRetention, this.binlogPosition.getFileName() ) if (this....
Purge old relay logs that have aged out past the number of retained files .
fun fromInteger(address: Int): Inet4Address? { return getInet4Address(Ints.toByteArray(address)) }
Returns an Inet4Address having the integer value specified by the argument .
fun isOverwriteUser1(): Boolean { val oo: Any = get_Value(COLUMNNAME_OverwriteUser1) return if (oo != null) { if (oo is Boolean) oo.toBoolean() else "Y" == oo } else false }
Get Overwrite User1 .
private fun valEquals(o1: Any?, o2: Any?): Boolean { return if (o1 == null) o2 == null else o1 == o2 }
Test two values for equality . Differs from o1.equals ( o2 ) only in that it copes with with < tt > null < /tt > o1 properly .
fun hasAttribute(name: String?): Boolean { return DTM.NULL !== dtm.getAttributeNode(node, null, name) }
Method hasAttribute
fun init() { Environment.init(this) Debug.init( this, arrayOf("debug.basic", "debug.cspec", "debug.layer", "debug.mapbean", "debug.plugin") ) val propValue: String = getParameter(PropertiesProperty) var propHandler: PropertyHandler? = null try { if (propValue != null) { val builder: PropertyHandler.Builder = Builder()....
Called by the browser or applet viewer to inform this applet that it has been loaded into the system . It is always called before the first time that the < code > start < /code > method is called . < p > The implementation of this method provided by the < code > Applet < /code > class does nothing .
@Throws(IOException::class) fun process(rb: ResponseBuilder) { val req: SolrQueryRequest = rb.req val rsp: SolrQueryResponse = rb.rsp val params: SolrParams = req.getParams() if (!params.getBool(COMPONENT_NAME, true)) { return } val searcher: SolrIndexSearcher = req.getSearcher() if (rb.getQueryCommand().getOffset() < ...
Actually run the query
fun addUser(user: IUser?) { if (!this.users.contains(user) && user != null) this.users.add(user) }
CACHES a user to the guild .
fun create(prefix: String?, doc: Document?): Element? { return SVGOMForeignObjectElement(prefix, doc as javax.swing.text.AbstractDocument?) }
Creates an instance of the associated element type .