Code_Function
stringlengths
13
13.9k
Message
stringlengths
10
1.46k
@Throws(IOException::class, ClassNotFoundException::class) private fun readObject(`in`: ObjectInputStream) { val inName = `in`.readObject() as String val inDescription = `in`.readObject() as String val inValue = `in`.readObject() val inClass = `in`.readObject() as Class<*> val inUserModifiable = `in`.readBoolean() Asse...
Override readObject which is used in serialization . Customize serialization of this exception to avoid escape of InternalRole which is not Serializable .
private fun returnData(ret: Any) { if (myHost != null) { myHost.returnData(ret) } }
Used to communicate a return object from a plugin tool to the main Whitebox user-interface .
fun escape(s: String?): String? { if (s == null) return null val sb = StringBuffer() escape(s, sb) return sb.toString() }
Escape quotes , \ , / , \r , \n , \b , \f , \t and other control characters ( U+0000 through U+001F ) .
fun clone(): ArrayDeque<E>? { return try { val result: ArrayDeque<E> = super.clone() as ArrayDeque<E> result.elements = Arrays.copyOf(elements, elements.length) result } catch (e: CloneNotSupportedException) { throw AssertionError() } }
Returns a copy of this deque .
fun generateCode(currentScope: org.graalvm.compiler.lir.gen.LIRGeneratorTool.BlockScope?) { if (this.bits and IsReachable === 0) { return } generateInit@{ if (this.initialization == null) break@generateInit if (binding.resolvedPosition < 0) { if (this.initialization.constant !== Constant.NotAConstant) break@generateIni...
Code generation for a local declaration : i.e. & nbsp ; normal assignment to a local variable + unused variable handling
@Throws(IOException::class) fun isPotentialValidLink(file: File): Boolean { var isPotentiallyValid: Boolean FileInputStream(file).use { fis -> val minimumLength = 0x64 isPotentiallyValid = file.isFile() && file.getName().toLowerCase() .endsWith(".lnk") && fis.available() >= minimumLength && isMagicPresent( com.sun.org....
Provides a quick test to see if this could be a valid link ! If you try to instantiate a new WindowShortcut and the link is not valid , Exceptions may be thrown and Exceptions are extremely slow to generate , therefore any code needing to loop through several files should first check this .
fun decideMove(state: IGameState): IGameMove? { if (state.isDraw()) return null if (state.isWin()) return null val moves: Collection<IGameMove> = logic.validMoves(this, state) return if (moves.size == 0) { null } else { val mvs: Array<IGameMove> = moves.toArray(arrayOf<IGameMove>()) val idx = (Math.random() * moves.siz...
Randomly make a move based upon the available logic of the game . Make sure you check that the game is not already won , lost or drawn before calling this method , because you
fun nextPowerOf2(x: Int): Int { var i: Long = 1 while (i < x && i < Int.MAX_VALUE / 2) { i += i } return i.toInt() }
Get the value that is equal or higher than this value , and that is a power of two .
fun inverseTransform(viewPoint: java.awt.geom.Point2D): java.awt.geom.Point2D? { val viewCenter: java.awt.geom.Point2D = getViewCenter() val viewRadius: Double = getViewRadius() val ratio: Double = getRatio() var dx: Double = viewPoint.getX() - viewCenter.getX() val dy: Double = viewPoint.getY() - viewCenter.getY() dx ...
override base class to un-project the fisheye effect
private fun iconBoundsIntersectBar(barBounds: RectF, icon: Rect, scaleFactor: Double): Boolean { val iconL: Int = icon.left + javax.swing.Spring.scale(icon.width(), scaleFactor.toFloat()) val iconT: Int = icon.top + javax.swing.Spring.scale(icon.height(), scaleFactor.toFloat()) val iconR: Int = icon.right - javax.swing...
Helper method for calculating intersections for control icons and bars .
fun closeRegistration() { flushDeferrables() for ((_, value): Map.Entry<String?, ClassPlugins> in registrations.entrySet()) { value.initializeMap() } }
Disallows new registrations of new plugins , and creates the internal tables for method lookup .
fun toGml(graph: IDirectedGraph<*, out IGraphEdge<*>?>): String? { Preconditions.checkNotNull(graph, "Graph argument can not be null") val sb = StringBuilder() sb.append( """ graph [ """.trimIndent() ) var currentId = 0 val nodeMap: MutableMap<Any, Int> = HashMap() for (node in graph.getNodes()) {sb.append( """ node [ ...
Creates GML code that represents a given directed graph .
fun cachePage(pos: Long, page: Page?, memory: Int) { if (cache != null) { cache.put(pos, page, memory) } }
Put the page in the cache .
fun typeToClass(type: Int): Class<*>? { val result: Class<*>? result = when (type) { Types.BIGINT -> Long::class.javaTypes.BINARY -> String::class.java Types.BIT -> Boolean::class.java Types.CHAR -> Char::class.java Types.DATE -> Date::class.java Types.DECIMAL -> Double::class.java Types.DOUBLE -> Double::class.java Ty...
Returns the class associated with a SQL type .
@Throws(MissingObjectException::class, IOException::class, UnsupportedEncodingException::class) private fun noteToString(repo: Repository, note: Note): String? { val loader: ObjectLoader = repo.open(note.getData()) val baos = ByteArrayOutputStream() loader.copyTo(baos) return String(baos.toByteArray(), "UTF-8") }
Utility method that converts a note to a string ( assuming it 's UTF-8 ) .
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) @Throws(ValidationException::class) fun initTimers() { initAllTimers() }
Reads the configuration settings for the timer intervals to be used and creates the timers accordingly .
@Throws(IOException::class) fun tbiIndexToUniqueString(`is`: InputStream?): String? { val ret = StringBuilder() val buf = ByteArray(4096) readIOFully(`is`, buf, 4) val header = String(buf, 0, 4) ret.append("Header correct: ").append(header == "TBI") .append(com.sun.tools.javac.util.StringUtils.LS) readIOFully(`is`, bu...
Creates a string representation of the TABIX index
fun addFeatureChangeListener(l: FeatureChangeListener?) { featureListeners.add(l) }
Add a feature change listener .
protected fun UserPassword() { super() }
Dear JPA ...
fun firePropertyChange(propertyName: String?, oldValue: Float, newValue: Float) {}
Overridden for performance reasons . See the < a href= '' # override '' > Implementation Note < /a > for more information .
fun testUpdate5() { val factor = 3 val updateQuery = "UPDATE " + DatabaseCreator.TEST_TABLE1.toString() + " SET field2=field2 *" + factor try { val selectQuery = "SELECT field2 FROM " + DatabaseCreator.TEST_TABLE1 var result: ResultSet = statement.executeQuery(selectQuery) val values: HashSet<BigDecimal> = HashSet<BigD...
UpdateFunctionalityTest # testUpdate5 ( ) . Updates values in one columns in the table using condition
fun isCaretBlinkEnabled(): Boolean { return caretBlinks }
Returns true if the caret is blinking , false otherwise .
@Throws(Exception::class) fun testBug73663() { this.rs = this.stmt.executeQuery("show variables like 'collation_server'") this.rs.next() val collation: String = this.rs.getString(2) if (collation != null && collation.startsWith("utf8mb4") && "utf8mb4" == (this.conn as MySQLConnection).getServerVariable( "character_set_...
Tests fix for Bug # 73663 ( 19479242 ) , utf8mb4 does not work for connector/j > =5.1.13 This test is only run when character_set_server=utf8mb4 and collation-server set to one of utf8mb4 collations ( it 's better to test two configurations : with default utf8mb4_general_ci and one of non-default , say utf8mb4_bin )
fun removeEdge(edge: InstructionGraphEdge?) { super.removeEdge(edge) }
Removes an instruction edge from the instruction graph .
fun addApps(apps: List<AppInfo?>?) { mApps.addApps(apps) }
Adds new apps to the list .
fun stop() { val methodName = "stop" synchronized(lifecycle) { log.fine(CLASS_NAME, methodName, "850") if (running) { running = false receiving = false if (Thread.currentThread() != recThread) { try { recThread.join() } catch (ex: InterruptedException) { } } } } recThread = null log.fine(CLASS_NAME, methodName, "851") ...
Stops the Receiver 's thread . This call will block .
fun First() {}
CONSTRUCTOR < init >
override fun toString(): String? { var temp = "" for (i in 0 until variables.length) { temp += variables.get(i).toString() temp += "\n" } return structName.toString() + "\n" + temp }
Override ToString ( ) .
fun addActionListener(l: ActionListener?) { dispatcher.addListener(l) }
Adds a listener to the switch which will cause an event to dispatch on click
@Throws(org.apache.geode.admin.AdminException::class) protected fun createSystemMemberCache(vm: GemFireVM?): SystemMemberCache? { if (managedSystemMemberCache == null) { managedSystemMemberCache = SystemMemberCacheJmxImpl(vm) } return managedSystemMemberCache }
Override createSystemMemberCache by instantiating SystemMemberCacheJmxImpl if it was not created earlier .
fun run() { amIActive = true val inputFile: String = args.get(0) if (inputFile.lowercase(Locale.getDefault()).contains(".dep")) { calculateRaster() } else if (inputFile.lowercase(Locale.getDefault()).contains(".shp")) { calculateVector() } else { showFeedback("There was a problem reading the input file.") } }
Used to execute this plugin tool .
@Throws(Exception::class) fun test_compressed_timestamp_01b() { TestHelper( "compressed-timestamp-01b", "compressed-timestamp-01b.rq", "compressed-timestamp.ttl", "compressed-timestamp-01.srx" ).runTest() }
Simple SELECT query returning data typed with the given timestamp , where we have several FILTERs that should evaluate to true .
@Throws(javax.xml.stream.XMLStreamException::class) private fun writeAttribute( namespace: String, attName: String, attValue: String, xmlWriter: javax.xml.stream.XMLStreamWriter ) { if (namespace == "") { xmlWriter.writeAttribute(attName, attValue) } else { registerPrefix(xmlWriter, namespace) xmlWriter.writeAttribute(...
Util method to write an attribute without the ns prefix
private fun addTag(newTag: String) { if (com.sun.tools.javac.util.StringUtils.isBlank(newTag)) { return } synchronized(tagsObservable) { if (tagsObservable.contains(newTag)) { return } tagsObservable.add(newTag) } firePropertyChange("tag", null, tagsObservable) }
Adds the tag .
fun basicGetAstElement(): EObject? { return astElement }
< ! -- begin-user-doc -- > < ! -- end-user-doc -- >
public void detach ( ) { if ( systemOverlay ) { getWindowManager ( ) . removeView ( this ) ; } else { ( ( ViewGroup ) getActivityContentView ( ) ) . removeView ( this ) ; } }
Detaches it from the container view .
private fun patternCompile() { try { ptnNumber = Pattern.compile(strNumberPattern) ptnShortDate = Pattern.compile(strShortDatePattern) ptnLongDate = Pattern.compile(strLongDatePattern) ptnPercentage = Pattern.compile(strPercentagePattern) ptnCurrency = Pattern.compile(strCurrencyPattern) ptnViCurrency = Pattern.compile...
Pattern compile .
fun basicSetParams( newParams: jdk.nashorn.internal.ir.ExpressionList, msgs: NotificationChain? ): NotificationChain? { var msgs: NotificationChain? = msgs val oldParams: jdk.nashorn.internal.ir.ExpressionList = params params = newParams if (eNotificationRequired()) { val notification = ENotificationImpl( this, Notific...
< ! -- begin-user-doc -- > < ! -- end-user-doc -- >
@Throws(IOException::class) fun unpackInt(`is`: DataInput): Int { var ret = 0 var v: Byte do { v = `is`.readByte() ret = ret shl 7 or (v and 0x7F) } while (v and 0x80 == 0) return ret }
Unpack int value from the input stream .
fun loadWorkflowData(stepId: String, key: String?): Any? { var data: Any? = null val workflowUri: String = getMainWorkflowUri(stepId) try { if (workflowUri != null) { val dataPath: String = java.lang.String.format(_zkStepDataPath, workflowUri) + java.lang.String.format( _zkWorkflowData, key ) if (_dataManager.checkExis...
Gets the step workflow data stored under /workflow/stepdata/ { workflowURI } /data/ { key } where workflowURI is the URI of the main workflow regardless of whether the step belongs in the main workflow or one of its nested workflows .
fun fillByte(array: ByteArray, x: Byte) { for (i in array.indices) { array[i] = x } }
Fill an array with the given value .
fun addDictionaryChunk(dictionaryChunk: List<ByteArray?>) { dictionaryChunks.add(dictionaryChunk) if (null == dictionaryByteArrayToSurrogateKeyMap) { createDictionaryByteArrayToSurrogateKeyMap(dictionaryChunk.size) } addDataToDictionaryMap() }
This method will add a new dictionary chunk to existing list of dictionary chunks
fun OMWarpingImage(bi: java.awt.image.BufferedImage?) { setWarp(bi, LatLonGCT.INSTANCE, DataBounds(-180, -90, 180, 90)) }
Takes an image , assumed to be a world image in the LLXY projection ( equal arc ) covering -180 , 180 longitude to -90 , 90 latitude .
private void acquirePrecachingWakeLock ( ) { if ( mPrecachingWakeLock == null ) { PowerManager pm = ( PowerManager ) getSystemService ( Context . POWER_SERVICE ) ; mPrecachingWakeLock = pm . newWakeLock ( PowerManager . PARTIAL_WAKE_LOCK , TAG ) ; } mPrecachingWakeLock . acquire ( ) ; }
Acquire the precaching WakeLock .
@Throws(WarpScriptException::class){ fun entropyHybridTest( gts: GeoTimeSerie, buckets_per_period: Int, periods_per_piece: Int, k: Int, alpha: Double ): List<Long>? { doubleCheck(gts) val anomalous_ticks: MutableList<Long> = ArrayList() if (!GTSHelper.isBucketized(gts)) { throw WarpScriptException("GTS must be bucketiz...
Applying Seasonal Entropy Hybrid test This test is based on piecewise decomposition where trend components are approximated by median and seasonal components by entropy of the cycle sub-series . An ESD test is passed upon the residuals . It differs from hybridTest by approximating seasonal component instead of using ST...
fun collectAndFireTriggers( players: HashSet<PlayerID?>?, triggerMatch: Match<TriggerAttachment?>?, aBridge: IDelegateBridge?, beforeOrAfter: String?, stepName: String? ) { val toFirePossible: HashSet<TriggerAttachment> = collectForAllTriggersMatching(players, triggerMatch, aBridge) if (toFirePossible.isEmpty()) { retu...
This will collect all triggers for the desired players , based on a match provided , and then it will gather all the conditions necessary , then test all the conditions , and then it will fire all the conditions which are satisfied .
fun clone(array: LongArray?): LongArray? { return if (array == null) { null } else array.clone() }
< p > Clones an array returning a typecast result and handling < code > null < /code > . < /p > < p > This method returns < code > null < /code > for a < code > null < /code > input array. < /p >
@Throws(IllegalArgumentException::class) fun ColorPredicate(input: String) { var rest = input.trim { it <= ' ' }.lowercase(Locale.getDefault()) if (rest.startsWith("leaf")) { this.isLeaf = true rest = rest.substring(4).trim { it <= ' ' } } else { this.isLeaf = false } var endOfStartToken = 0 while (endOfStartToken < re...
Returns a ColorPredicate obtained by parsing its argument . See the beginning of ProofStatus.tla for the grammar of the input .
@Throws(IOException::class) protected fun transferFromFile(idFile: File?) { BufferedReader(FileReader(idFile)).use { br -> var line: String while (br.readLine().also { line = it } != null) { line = line.trim { it <= ' ' } if (line.length > 0) { transfer(line) } } } }
Transfer all the sequences listed in the supplied file , interpreting entries appropriately .
fun toNamespacedString(): String? { return if (_namespaceURI != null) "{" + _namespaceURI.toString() + "}" + _localName else _localName }
Return the string representation of the qualified name using the the ' { ns } foo ' notation . Performs string concatenation , so beware of performance issues .
fun configureManagers() { powerManager = NcePowerManager(this) InstanceManager.store(powerManager, PowerManager::class.java) turnoutManager = NceTurnoutManager(getNceTrafficController(), getSystemPrefix()) InstanceManager.setTurnoutManager(turnoutManager) lightManager = NceLightManager(getNceTrafficController(), getSys...
Configure the common managers for NCE connections . This puts the common manager config in one place .
@Throws(IOException::class) fun newLine() { out.append('\n') for (n in 0 until currentIndentLevel) out.append(indent) currentLine++ currentCol = currentIndentLevel * indent.length() }
Emits a < code > '\n ' < /code > plus required indentation characters for the current indentation level .
protected fun checkForDuplicatSnapshotName(name: String?, vplexVolume: Volume?) { val snapshotSourceVolume: Volume = getVPLEXSnapshotSourceVolume(vplexVolume) super.checkForDuplicatSnapshotName(name, snapshotSourceVolume) }
Check if a snapshot with the same name exists for the passed volume .
public boolean isOneAssetPerUOM ( ) { Object oo = get_Value ( COLUMNNAME_IsOneAssetPerUOM ) ; if ( oo != null ) { if ( oo instanceof Boolean ) return ( ( Boolean ) oo ) . booleanValue ( ) ; return "Y" . equals ( oo ) ; } return false ; }
Get One Asset Per UOM .
fun value(): Int { return this.value }
Retrieve value for node computed so far . < p > Primarily here for testing
fun isRemove(): Boolean { val `is`: Boolean `is` = if (m_editFlag === FolderEditFlag.REMOVE) true else false return `is` }
Devuelve < tt > true < /tt > si el campo est ? marcado como eliminado
fun encodeWebSafe(source: ByteArray, doPadding: Boolean): String? { return encode(source, 0, source.size, WEBSAFE_ALPHABET, doPadding) }
Encodes a byte array into web safe Base64 notation .
@Throws(IOException::class, ServletException::class) fun commence( request: HttpServletRequest?, response: HttpServletResponse, arg2: AuthenticationException? ) { log.debug("Pre-authenticated entry point called. Rejecting access") response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Access Denied") }
Always returns a 401 error code to the client .
fun size(): Int { return _size }
Returns the current number of entries in the map .
private fun createVolumeData(name: String, numVolumes: Int): List<Volume>? { val volumes: List<Volume> = ArrayList<Volume>()val cgUri: URI = createBlockConsistencyGroup("$name-cg") for (i in 1..numVolumes) { val volume = Volume() val volumeURI: URI = URIUtil.createId(Volume::class.java) testVolumeURIs.add(volumeURI) vo...
Creates the BlockObject Volume data .
private void showFeedback ( String message ) { if ( myHost != null ) { myHost . showFeedback ( message ) ; } else { System . out . println ( message ) ; } }
Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface .
fun closeStream(stream: Closeable?) { if (stream != null) { try { stream.close() } catch (e: IOException) { Log.e("IO", "Could not close stream", e) } } }
Closes the specified stream .
private fun updateProgress(progressLabel: String, progress: Int) { if (myHost != null && (progress != previousProgress || progressLabel != previousProgressLabel)) { myHost.updateProgress(progressLabel, progress) } previousProgress = progress previousProgressLabel = progressLabel }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface .
fun configure() { val memo: XpaSystemConnectionMemo = getSystemConnectionMemo() as XpaSystemConnectionMemo val tc: XpaTrafficController = memo.getXpaTrafficController() tc.connectPort(this) memo.setPowerManager(XpaPowerManager(tc)) jmri.InstanceManager.store(memo.getPowerManager(), PowerManager::class.java) memo.setTur...
set up all of the other objects to operate with an XPA+Modem Connected to an XPressNet based command station connected to this port
fun executeQuery(miniTable: IMiniTable) { log.info("") var sql = "" if (m_DD_Order_ID == null) return sql = getOrderSQL() log.fine(sql) var row = 0 miniTable.setRowCount(row) try { val pstmt: PreparedStatement = DB.prepareStatement(sql, null) pstmt.setInt(1, m_DD_Order_ID.toString().toInt()) val rs: ResultSet = pstmt.e...
Query Info
fun ParameterDatabase() { super() accessed = Hashtable() gotten = Hashtable() directory = File(File("").getAbsolutePath()) label = "Basic Database" parents = Vector() checked = false.toInt() }
Creates an empty parameter database .
private fun CTagHelpers() {}
You are not supposed to instantiate this class .
fun EventSourceImpl() { LOG.entering(CLASS_NAME, "<init>") }
EventSource provides a text-based stream abstraction for Java
@DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 13:01:25.281 -0500", hash_original_method = "8F9A0D25038BAA53AA87BFFA0D47316A", hash_generated_method = "D647B858B68B1333AC193E85FEBDEE73" ) fun registrationComplete() { synchronized(mHandlerMap) { mRegistrationComplete = true mH...
The application must call here after it finishes registering handlers .
operator fun next(): Long { return next(RecurrenceUtil.now()) }
Returns the next recurrence from now .
@Throws(IOException::class) fun writeExternal(out: ObjectOutput?) { super.writeExternal(out) mbr.writeExternal(out) }
Calls the super method and writes the MBR object of this entry to the specified output stream .
protected fun validate_return(param: Array<StorageCapability?>?) {}
validate the array for _return
fun jQuote(s: String?): String? { if (s == null) { return "null" } val ln = s.length val b = StringBuilder(ln + 4) b.append('"') for (i in 0 until ln) { val c = s[i] if (c == '"') { b.append("\\\"") } else if (c == '\\') { b.append("\\\\") } else if (c.code < 0x20) { if (c == '\n') { b.append("\\n") } else if (c == '\r...
Quotes string as Java Language string literal . Returns string < code > '' null '' < /code > if < code > s < /code > is < code > null < /code > .
fun partiallyApply(param1: T1?, param2: T2?): FluentFunction<T3?, R?>? { return FluentFunction(PartialApplicator.partial3(param1, param2, fn)) }
Partially apply the provided parameters to this BiFunction to generate a Function ( single input )
fun deleteFile(path: String?): Boolean { if (Handler_String.isBlank(path)) { return true } val file = File(path) if (!file.exists()) { return true } if (file.isFile()) { return file.delete() } if (!file.isDirectory()) { return false } for (f in file.listFiles()) { if (f.isFile()) { f.delete() } else if (f.isDirectory()...
delete file or directory < ul > < li > if path is null or empty , return true < /li > < li > if path not exist , return true < /li > < li > if path exist , delete recursion . return true < /li > < ul >
private fun createCompactionClients(jmxConfig: CassandraJmxCompactionConfig): ImmutableSet<CassandraJmxCompactionClient?>? { val clients: MutableSet<CassandraJmxCompactionClient> = Sets.newHashSet() val servers: Set<InetSocketAddress> = config.servers() val jmxPort: Int = jmxConfig.port() for (addr in servers) { val cl...
Return an empty set if no client can be created .
fun hashKeyForDisk(key: String): String? { var cacheKey: String? try { val mDigest: MessageDigest = MessageDigest.getInstance("MD5") mDigest.update(key.toByteArray()) cacheKey = bytesToHexString(mDigest.digest()) } catch (e: NoSuchAlgorithmException) { cacheKey = key.hashCode().toString() } return cacheKey }
A hashing method that changes a string ( like a URL ) into a hash suitable for using as a disk filename .
@Nullable fun space(): String? { return space }
Gets swap space name .
@Throws(Exception::class) fun runSafely(stack: Catbert.FastStack?): Any? { val si: SeriesInfo = getSeriesInfo(stack) return if (si == null) "" else si.getDescription() }
Returns the description for the specified SeriesInfo
@Throws(AppsForYourDomainException::class, ServiceException::class, IOException::class) fun restoreUser(username: String): UserEntry? { LOGGER.log(Level.INFO, "Restoring user '$username'.") val retrieveUrl = URL(domainUrlBase.toString() + "user/" + SERVICE_VERSION + "/" + username) val userEntry: UserEntry = userServic...
Restores a user . Note that executing this method for a user who is not suspended has no effect .
fun weightedFMeasure(): Double { val classCounts = DoubleArray(m_NumClasses) var classCountSum = 0.0 for (i in 0 until m_NumClasses) { for (j in 0 until m_NumClasses) { classCounts[i] += m_ConfusionMatrix.get(i).get(j) } classCountSum += classCounts[i] } var fMeasureTotal = 0.0 for (i in 0 until m_NumClasses) { val tem...
Prevents this class from being instantiated , except by the create method in this class .
@DSSafe(DSCat.DATA_STRUCTURE) @DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:55:08.711 -0500", hash_original_method = "05A7D65C6D911E0B1F3261A66888CB52", hash_generated_method = "3AFFFBA2DDE5D54646A6F203B3BBAF40" ) fun lastIndexOf(obj: Any?): Int { return this.hlist.lastIn...
Calculates the macro weighted ( by class size ) average F-Measure .
@DSSafe(DSCat.DATA_STRUCTURE) @DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:55:08.711 -0500", hash_original_method = "05A7D65C6D911E0B1F3261A66888CB52", hash_generated_method = "3AFFFBA2DDE5D54646A6F203B3BBAF40" ) fun lastIndexOf(obj: Any?): Int { return this.hlist.lastIn...
Get the last index of the given object .
fun showNextButton(showNextButton: Boolean): Builder? { showNextButton = showNextButton return this }
Set the visibility of the next button
fun createSmallLob(type: Int, small: ByteArray?, precision: Long): ValueLobDb? { return ValueLobDb(type, small, precision) }
Create a LOB object that fits in memory .
fun invDct8x8(input: Array<DoubleArray>, output: Array<IntArray>) { val temp = Array(NJPEG) { DoubleArray( NJPEG ) } var temp1 = 0.0 var i = 0 var j = 0 var k = 0 i = 0 while (i < NJPEG) { j = 0 while (j < NJPEG) { temp[i][j] = 0.0 k = 0 while (k < NJPEG) { temp[i][j] += input[i][k] * this.C.get(k).get(j) k++ } j++ } i...
Perform inverse DCT on the 8x8 matrix
fun openDataFile(): InputStream? { val stream: InputStream = SantaFeExample::class.java.getResourceAsStream("santafe.trail") if (stream == null) { System.err.println("Unable to find the file santafe.trail.") System.exit(-1) } return stream }
Returns an input stream that contains the ant trail data file .
fun ProductionRule( name: String?, data: GameData?, results: IntegerMap<NamedAttachable?>, costs: IntegerMap<jdk.internal.loader.Resource?> ) { super(name, data) m_results = results m_cost = costs }
Creates new ProductionRule
fun RootConfiguration(ai: ApplicationInformation?) { this(ai, getDefaultContexts(applicationClass(ai, CommonUtils.getCallingClass(2)))) }
Initializes the root configuration with default context relative to the calling ( instantiating class ) .
fun addString(word: String?, t: Tuple?) { val leaf = TrieLeaf(word, t) addLeaf(root, leaf, 0) }
Add a new word to the trie , associated with the given Tuple .
@Throws(InterruptedException::class) fun waitOnInitialization() { this.initializationLatch.await() }
Wait for the tracker to finishe being initialized
@Throws(ExecutionException::class) fun execute(event: ExecutionEvent): Any? { val viewPart: IWorkbenchPart = HandlerUtil.getActivePart(event) if (viewPart is DroidsafeInfoOutlineViewPart) { val command: Command = event.getCommand() val oldValue: Boolean = HandlerUtil.toggleCommandState(command) (viewPart as DroidsafeIn...
Command implementation . Retrieves the value of the parameter value , and delegates to the view to set the correct value for the methods labels .
protected fun eStaticClass(): EClass? { return UmplePackage.eINSTANCE.getCodeLang_() }
< ! -- begin-user-doc -- > < ! -- end-user-doc -- >
@Throws(IOException::class) private fun streamToBytes(`in`: InputStream, length: Int): ByteArray? { val bytes = ByteArray(length) var count: Int var pos = 0 while (pos < length && `in`.read(bytes, pos, length - pos).also { count = it } != -1) { pos += count } if (pos != length) { throw IOException("Expected $length byt...
Reads the contents of an InputStream into a byte [ ] .
@Throws(Exception::class) fun testUpdatePathDoesNotExist() { val props: Map<String, String> = properties("owner", "group", "0555") assert(igfs.update(SUBDIR, props) == null) checkNotExist(igfs, igfsSecondary, SUBDIR) }
Check that exception is thrown in case the path being updated does n't exist remotely .
@Throws(InterruptedException::class) fun stopProcess() { latch.await() if (this.process != null) { println("ProcessThread.stopProcess() will kill process") this.process.destroy() } }
Stops the process .
fun run() { amIActive = true var inputHeader: String? = null var outputHeader: String? = null var row: Int var col: Int var x: Int var y: Int var progress = 0 var z: Double var i: Int var c: Int val dX = intArrayOf(1, 1, 1, 0, -1, -1, -1, 0) val dY = intArrayOf(-1, 0, 1, 1, 1, 0, -1, -1) var zFactor = 0.0 var slopeThr...
Used to execute this plugin tool .
fun reduce(r1: R?, r2: R?): R? { return r1 }
Reduces two results into a combined result . The default implementation is to return the first parameter . The general contract of the method is that it may take any action whatsoever .
@Throws(IOException::class) fun numParameters(num: Int) { output.write(num) }
Writes < code > num_parameters < /code > in < code > Runtime ( In ) VisibleParameterAnnotations_attribute < /code > . This method must be followed by < code > num < /code > calls to < code > numAnnotations ( ) < /code > .
fun ResultFormatter(result: Any) { result = result printHeader = true }
Creates a new formatter for a particular object .