content
stringlengths
40
137k
"public void run() {\n if (stateMachine.getRaftNode().getSnapshot().getIsInstallSnapshot().get()) {\n LOG.info(\"String_Node_Str\");\n return;\n }\n if (!stateMachine.getRaftNode().getSnapshot().getIsTakeSnapshot().compareAndSet(false, true)) {\n LOG.info(\"String_Node_Str\");\n return;\n }\n LOG.info(\"String_Node_Str\");\n try {\n GlobalConf conf = GlobalConf.getInstance();\n Set<String> topicSet = topicLogMap.keySet();\n for (String topic : topicSet) {\n ConcurrentMap<Integer, SegmentedLog> queueLogMap = topicLogMap.get(topic);\n if (queueLogMap != null) {\n Set<Integer> queueSet = queueLogMap.keySet();\n for (Integer queue : queueSet) {\n try {\n SegmentedLog log = topicLogMap.get(topic).get(queue);\n log.getLock().lock();\n try {\n Segment lastSegment = null;\n Iterator<Map.Entry<Long, Segment>> iterator = log.getStartOffsetSegmentMap().entrySet().iterator();\n while (iterator.hasNext()) {\n Segment segment = iterator.next().getValue();\n if (lastSegment == null) {\n lastSegment = segment;\n continue;\n }\n BrokerMessage.MessageContent message = segment.read(segment.getStartOffset());\n if (System.currentTimeMillis() / 1000 - message.getCreateTime() / 1000 > conf.getExpiredLogDuration()) {\n lastSegment.delete();\n deletedKeyList.add(lastSegment.getStartOffset());\n } else {\n break;\n }\n lastSegment = segment;\n }\n } finally {\n log.getLock().unlock();\n }\n } catch (Exception ex) {\n LOG.warn(\"String_Node_Str\");\n }\n }\n }\n }\n } finally {\n stateMachine.getRaftNode().getSnapshot().getIsTakeSnapshot().compareAndSet(true, false);\n }\n LOG.info(\"String_Node_Str\");\n stateMachine.getRaftNode().takeSnapshot();\n}\n"
"public JSType apply(TypeRestriction p) {\n Visitor<JSType> visitor = p.outcome ? restrictToObjectVisitor : restrictToNotObjectVisitor;\n return p.type.visit(visitor);\n}\n"
"public int getBaseChunkY() {\n return baseY >> Chunk.BLOCKS.BITS;\n}\n"
"public static void main(String[] args) throws Exception {\n histogramNBTest(100);\n}\n"
"public void appendFolder(DefaultMutableTreeNode treenode, MyFolder parent) {\n String resp = CustomDialog.showInputDialog(JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, panel, \"String_Node_Str\", \"String_Node_Str\");\n if (resp != null) {\n if (resp.equals(\"String_Node_Str\")) {\n CustomDialog.showInfo(JOptionPane.WARNING_MESSAGE, main, \"String_Node_Str\", \"String_Node_Str\");\n return;\n }\n for (int i = 0; i < treenode.getChildCount(); i++) {\n Object node = ((DefaultMutableTreeNode) treenode.getChildAt(i)).getUserObject();\n if (node.getClass() == MyFolder.class) {\n if (((MyFolder) node).toString().equals(resp)) {\n CustomDialog.showInfo(JOptionPane.WARNING_MESSAGE, main, \"String_Node_Str\", \"String_Node_Str\");\n return;\n }\n }\n }\n Element rootElement = doc.createElement(\"String_Node_Str\");\n parent.getNode().getParentNode().getParentNode().appendChild(rootElement);\n Element fname = doc.createElement(\"String_Node_Str\");\n rootElement.appendChild(fname);\n Node node = doc.createTextNode(resp);\n fname.appendChild(node);\n MyFolder folder = new MyFolder(node);\n DefaultMutableTreeNode temp = new DefaultMutableTreeNode(folder, true);\n ((DefaultTreeModel) tree.getModel()).insertNodeInto(temp, treenode, treenode.getChildCount());\n writeXML();\n uploadFile();\n }\n}\n"
"public void testCheckedPow() {\n for (long b : ALL_LONG_CANDIDATES) {\n for (int exp : EXPONENTS) {\n BigInteger expectedResult = valueOf(b).pow(exp);\n boolean expectedSuccess = fitsInLong(expectedResult);\n try {\n assertEquals(expectedResult.longValue(), LongMath.checkedPow(b, exp));\n assertTrue(expectedSuccess);\n } catch (ArithmeticException e) {\n assertFalse(expectedSuccess);\n }\n }\n }\n}\n"
"private void handlePacket() throws IOException {\n Byte packetId = in.readByte();\n int x;\n byte y;\n int z;\n byte dimension;\n Coordinate coordinate;\n switch(packetId) {\n case 0x00:\n write(packetId);\n write(in.readInt());\n break;\n case 0x01:\n write(packetId);\n if (!isServerTunnel) {\n write(in.readInt());\n write(readUTF16());\n copyNBytes(5);\n break;\n }\n player.setEntityId(write(in.readInt()));\n write(readUTF16());\n write(in.readByte());\n dimension = in.readByte();\n if (isServerTunnel) {\n player.setDimension(Dimension.get(dimension));\n }\n write(dimension);\n write(in.readByte());\n write(in.readByte());\n if (isServerTunnel) {\n in.readByte();\n write((byte) server.config.properties.getInt(\"String_Node_Str\"));\n } else {\n write(in.readByte());\n }\n break;\n case 0x02:\n byte version = in.readByte();\n String name = readUTF16();\n boolean nameSet = false;\n if (name.contains(\"String_Node_Str\")) {\n name = name.substring(0, name.indexOf(\"String_Node_Str\"));\n }\n if (name.equals(\"String_Node_Str\") || !server.authenticator.isMinecraftUp) {\n AuthRequest req = server.authenticator.getAuthRequest(player.getIPAddress());\n if (req != null) {\n name = req.playerName;\n nameSet = server.authenticator.completeLogin(req, player);\n }\n if (req == null || !nameSet) {\n if (!name.equals(\"String_Node_Str\")) {\n player.addTMessage(Color.RED, \"String_Node_Str\");\n player.addTMessage(Color.RED, \"String_Node_Str\");\n }\n name = server.authenticator.getFreeGuestName();\n player.setGuest(true);\n nameSet = player.setName(name);\n }\n } else {\n nameSet = player.setName(name);\n if (nameSet) {\n player.updateRealName(name);\n }\n }\n if (player.isGuest() && !server.authenticator.allowGuestJoin()) {\n player.kick(t(\"String_Node_Str\"));\n nameSet = false;\n }\n tunneler.setName(streamType + \"String_Node_Str\" + player.getName());\n write(packetId);\n write(version);\n write(player.getName());\n write(readUTF16());\n write(in.readInt());\n break;\n case 0x03:\n String message = readUTF16();\n Matcher joinMatcher = JOIN_PATTERN.matcher(message);\n if (isServerTunnel && joinMatcher.find()) {\n if (server.bots.ninja(joinMatcher.group(1))) {\n break;\n }\n if (message.contains(\"String_Node_Str\")) {\n player.addTMessage(Color.YELLOW, \"String_Node_Str\", joinMatcher.group(1));\n } else {\n player.addTMessage(Color.YELLOW, \"String_Node_Str\", joinMatcher.group(1));\n }\n break;\n }\n if (isServerTunnel && server.config.properties.getBoolean(\"String_Node_Str\")) {\n if (server.config.properties.getBoolean(\"String_Node_Str\") && server.getMessager().wasForwarded(message)) {\n break;\n }\n Matcher colorMatcher = COLOR_PATTERN.matcher(message);\n String cleanMessage = colorMatcher.replaceAll(\"String_Node_Str\");\n Matcher messageMatcher = MESSAGE_PATTERN.matcher(cleanMessage);\n if (messageMatcher.find()) {\n } else if (cleanMessage.matches(CONSOLE_CHAT_PATTERN) && !server.config.properties.getBoolean(\"String_Node_Str\")) {\n break;\n }\n if (server.config.properties.getBoolean(\"String_Node_Str\")) {\n sendMessage(message);\n } else {\n if (message.length() > MAXIMUM_MESSAGE_SIZE) {\n message = message.substring(0, MAXIMUM_MESSAGE_SIZE);\n }\n write(packetId);\n write(message);\n }\n } else if (!isServerTunnel) {\n if (player.isMuted() && !message.startsWith(\"String_Node_Str\") && !message.startsWith(\"String_Node_Str\")) {\n player.addTMessage(Color.RED, \"String_Node_Str\");\n break;\n }\n if (message.charAt(0) == commandPrefix) {\n message = player.parseCommand(message, false);\n if (message == null) {\n break;\n }\n write(packetId);\n write(message);\n return;\n }\n player.sendMessage(message);\n }\n break;\n case 0x04:\n write(packetId);\n write(in.readLong());\n long time = in.readLong();\n server.setTime(time);\n write(time);\n break;\n case 0x05:\n write(packetId);\n write(in.readInt());\n write(in.readShort());\n copyItem();\n break;\n case 0x06:\n write(packetId);\n copyNBytes(12);\n if (server.options.getBoolean(\"String_Node_Str\")) {\n server.eventhost.execute(server.eventhost.findEvent(\"String_Node_Str\"), player, true, null);\n }\n break;\n case 0x07:\n int user = in.readInt();\n int target = in.readInt();\n Player targetPlayer = server.playerList.findPlayer(target);\n if (targetPlayer != null) {\n if (targetPlayer.godModeEnabled()) {\n in.readBoolean();\n break;\n }\n }\n write(packetId);\n write(user);\n write(target);\n copyNBytes(1);\n break;\n case 0x08:\n write(packetId);\n player.updateHealth(write(in.readShort()));\n player.getHealth();\n write(in.readShort());\n write(in.readFloat());\n break;\n case 0x09:\n write(packetId);\n if (!isServerTunnel) {\n break;\n }\n player.setDimension(Dimension.get(write(in.readInt())));\n write(in.readByte());\n write(in.readByte());\n write(in.readShort());\n write(readUTF16());\n if (server.options.getBoolean(\"String_Node_Str\") && isServerTunnel) {\n server.eventhost.execute(server.eventhost.findEvent(\"String_Node_Str\"), player, true, null);\n }\n break;\n case 0x0a:\n write(packetId);\n copyNBytes(1);\n if (!inGame && !isServerTunnel) {\n player.sendMOTD();\n if (server.config.properties.getBoolean(\"String_Node_Str\")) {\n player.execute(PlayerListCommand.class);\n }\n inGame = true;\n }\n break;\n case 0x0b:\n write(packetId);\n copyPlayerLocation();\n copyNBytes(1);\n break;\n case 0x0c:\n write(packetId);\n copyPlayerLook();\n copyNBytes(1);\n break;\n case 0x0d:\n write(packetId);\n copyPlayerLocation();\n copyPlayerLook();\n copyNBytes(1);\n break;\n case 0x0e:\n if (!isServerTunnel) {\n byte status = in.readByte();\n x = in.readInt();\n y = in.readByte();\n z = in.readInt();\n byte face = in.readByte();\n coordinate = new Coordinate(x, y, z, player);\n if (!player.getGroup().ignoreAreas) {\n BlockPermission perm = server.config.blockPermission(player, coordinate);\n if (!perm.use && status == 0) {\n player.addTMessage(Color.RED, \"String_Node_Str\");\n break;\n }\n if (!perm.destroy && status == BLOCK_DESTROYED_STATUS) {\n player.addTMessage(Color.RED, \"String_Node_Str\");\n break;\n }\n }\n boolean locked = server.data.chests.isLocked(coordinate);\n if (!locked || player.ignoresChestLocks() || server.data.chests.canOpen(player, coordinate)) {\n if (locked && status == BLOCK_DESTROYED_STATUS) {\n server.data.chests.releaseLock(coordinate);\n server.data.save();\n }\n write(packetId);\n write(status);\n write(x);\n write(y);\n write(z);\n write(face);\n if (player.instantDestroyEnabled()) {\n packetFinished();\n write(packetId);\n write(BLOCK_DESTROYED_STATUS);\n write(x);\n write(y);\n write(z);\n write(face);\n }\n if (status == BLOCK_DESTROYED_STATUS) {\n player.destroyedBlock();\n }\n }\n } else {\n write(packetId);\n copyNBytes(11);\n }\n break;\n case 0x0f:\n x = in.readInt();\n y = in.readByte();\n z = in.readInt();\n coordinate = new Coordinate(x, y, z, player);\n final byte direction = in.readByte();\n final short dropItem = in.readShort();\n byte itemCount = 0;\n short uses = 0;\n byte[] data = null;\n if (dropItem != -1) {\n itemCount = in.readByte();\n uses = in.readShort();\n short dataLength = in.readShort();\n if (dataLength != -1) {\n data = new byte[dataLength];\n in.readFully(data);\n }\n }\n byte blockX = in.readByte();\n byte blockY = in.readByte();\n byte blockZ = in.readByte();\n boolean writePacket = true;\n boolean drop = false;\n BlockPermission perm = server.config.blockPermission(player, coordinate, dropItem);\n if (server.options.getBoolean(\"String_Node_Str\")) {\n player.checkButtonEvents(new Coordinate(x + (x < 0 ? 1 : 0), y + 1, z + (z < 0 ? 1 : 0)));\n }\n if (isServerTunnel || server.data.chests.isChest(coordinate)) {\n } else if (!player.getGroup().ignoreAreas && ((dropItem != -1 && !perm.place) || !perm.use)) {\n if (!perm.use) {\n player.addTMessage(Color.RED, \"String_Node_Str\");\n } else {\n player.addTMessage(Color.RED, \"String_Node_Str\");\n }\n writePacket = false;\n drop = true;\n } else if (dropItem == 54) {\n int xPosition = x;\n byte yPosition = y;\n int zPosition = z;\n switch(direction) {\n case 0:\n --yPosition;\n break;\n case 1:\n ++yPosition;\n break;\n case 2:\n --zPosition;\n break;\n case 3:\n ++zPosition;\n break;\n case 4:\n --xPosition;\n break;\n case 5:\n ++xPosition;\n break;\n }\n Coordinate targetBlock = new Coordinate(xPosition, yPosition, zPosition, player);\n Chest adjacentChest = server.data.chests.adjacentChest(targetBlock);\n if (adjacentChest != null && !adjacentChest.isOpen() && !adjacentChest.ownedBy(player)) {\n player.addTMessage(Color.RED, \"String_Node_Str\");\n writePacket = false;\n drop = true;\n } else {\n player.placingChest(targetBlock);\n }\n }\n if (writePacket) {\n write(packetId);\n write(x);\n write(y);\n write(z);\n write(direction);\n write(dropItem);\n if (dropItem != -1) {\n write(itemCount);\n write(uses);\n if (data != null) {\n write((short) data.length);\n out.write(data);\n } else {\n write((short) -1);\n }\n if (dropItem <= 94 && direction >= 0) {\n player.placedBlock();\n }\n }\n write(blockX);\n write(blockY);\n write(blockZ);\n player.openingChest(coordinate);\n } else if (drop) {\n write((byte) 0x0e);\n write((byte) 0x04);\n write(x);\n write(y);\n write(z);\n write(direction);\n }\n break;\n case 0x10:\n write(packetId);\n copyNBytes(2);\n break;\n case 0x11:\n write(packetId);\n copyNBytes(14);\n break;\n case 0x12:\n write(packetId);\n copyNBytes(5);\n break;\n case 0x13:\n write(packetId);\n write(in.readInt());\n write(in.readByte());\n break;\n case 0x14:\n int eid = in.readInt();\n name = readUTF16();\n if (!server.bots.ninja(name)) {\n write(packetId);\n write(eid);\n write(name);\n copyNBytes(16);\n copyUnknownBlob();\n } else {\n skipNBytes(16);\n skipUnknownBlob();\n }\n break;\n case 0x15:\n write(packetId);\n copyNBytes(4);\n copyItem();\n copyNBytes(15);\n break;\n case 0x16:\n write(packetId);\n copyNBytes(8);\n break;\n case 0x17:\n write(packetId);\n write(in.readInt());\n write(in.readByte());\n write(in.readInt());\n write(in.readInt());\n write(in.readInt());\n int flag = in.readInt();\n write(flag);\n if (flag > 0) {\n write(in.readShort());\n write(in.readShort());\n write(in.readShort());\n }\n break;\n case 0x18:\n write(packetId);\n write(in.readInt());\n write(in.readByte());\n write(in.readInt());\n write(in.readInt());\n write(in.readInt());\n write(in.readByte());\n write(in.readByte());\n write(in.readByte());\n write(in.readShort());\n write(in.readShort());\n write(in.readShort());\n copyUnknownBlob();\n break;\n case 0x19:\n write(packetId);\n write(in.readInt());\n write(readUTF16());\n write(in.readInt());\n write(in.readInt());\n write(in.readInt());\n write(in.readInt());\n break;\n case 0x1a:\n write(packetId);\n write(in.readInt());\n write(in.readInt());\n write(in.readInt());\n write(in.readInt());\n write(in.readShort());\n break;\n case 0x1c:\n write(packetId);\n copyNBytes(10);\n break;\n case 0x1d:\n write(packetId);\n byte destoryCount = write(in.readByte());\n if (destoryCount > 0) {\n copyNBytes(destoryCount * 4);\n }\n break;\n case 0x1e:\n write(packetId);\n copyNBytes(4);\n break;\n case 0x1f:\n write(packetId);\n copyNBytes(7);\n break;\n case 0x20:\n write(packetId);\n copyNBytes(6);\n break;\n case 0x21:\n write(packetId);\n copyNBytes(9);\n break;\n case 0x22:\n write(packetId);\n copyNBytes(18);\n break;\n case 0x23:\n write(packetId);\n write(in.readInt());\n write(in.readByte());\n break;\n case 0x26:\n write(packetId);\n copyNBytes(5);\n break;\n case 0x27:\n write(packetId);\n copyNBytes(8);\n break;\n case 0x28:\n write(packetId);\n write(in.readInt());\n copyUnknownBlob();\n break;\n case 0x29:\n write(packetId);\n write(in.readInt());\n write(in.readByte());\n write(in.readByte());\n write(in.readShort());\n break;\n case 0x2a:\n write(packetId);\n write(in.readInt());\n write(in.readByte());\n break;\n case 0x2b:\n write(packetId);\n player.updateExperience(write(in.readFloat()), write(in.readShort()), write(in.readShort()));\n break;\n case 0x33:\n write(packetId);\n write(in.readInt());\n write(in.readInt());\n write(in.readBoolean());\n write(in.readShort());\n write(in.readShort());\n copyNBytes(write(in.readInt()));\n break;\n case 0x34:\n write(packetId);\n write(in.readInt());\n write(in.readInt());\n write(in.readShort());\n copyNBytes(write(in.readInt()));\n break;\n case 0x35:\n write(packetId);\n x = in.readInt();\n y = in.readByte();\n z = in.readInt();\n short blockType = in.readShort();\n byte metadata = in.readByte();\n coordinate = new Coordinate(x, y, z, player);\n if (blockType == 54 && player.placedChest(coordinate)) {\n lockChest(coordinate);\n player.placingChest(null);\n }\n write(x);\n write(y);\n write(z);\n write(blockType);\n write(metadata);\n break;\n case 0x36:\n write(packetId);\n copyNBytes(14);\n break;\n case 0x37:\n write(packetId);\n write(in.readInt());\n write(in.readInt());\n write(in.readInt());\n write(in.readInt());\n write(in.readByte());\n break;\n case 0x38:\n write(packetId);\n copyNBytes(write(in.readShort()) * 12 + write(in.readInt()));\n break;\n case 0x3c:\n write(packetId);\n copyNBytes(28);\n int recordCount = in.readInt();\n write(recordCount);\n copyNBytes(recordCount * 3);\n write(in.readFloat());\n write(in.readFloat());\n write(in.readFloat());\n break;\n case 0x3d:\n write(packetId);\n write(in.readInt());\n write(in.readInt());\n write(in.readByte());\n write(in.readInt());\n write(in.readInt());\n write(in.readByte());\n break;\n case 0x3e:\n write(packetId);\n write(readUTF16());\n write(in.readInt());\n write(in.readInt());\n write(in.readInt());\n write(in.readFloat());\n write(in.readByte());\n break;\n case 0x46:\n write(packetId);\n write(in.readByte());\n write(in.readByte());\n break;\n case 0x47:\n write(packetId);\n copyNBytes(17);\n break;\n case 0x64:\n boolean allow = true;\n byte id = in.readByte();\n byte invtype = in.readByte();\n String typeString = readUTF16();\n byte unknownByte = in.readByte();\n if (invtype == 0) {\n Chest adjacent = server.data.chests.adjacentChest(player.openedChest());\n if (!server.data.chests.isChest(player.openedChest())) {\n if (adjacent == null) {\n server.data.chests.addOpenChest(player.openedChest());\n } else {\n server.data.chests.giveLock(adjacent.owner, player.openedChest(), adjacent.name);\n }\n server.data.save();\n }\n if (!player.getGroup().ignoreAreas && (!server.config.blockPermission(player, player.openedChest()).chest || (adjacent != null && !server.config.blockPermission(player, adjacent.coordinate).chest))) {\n player.addTMessage(Color.RED, \"String_Node_Str\");\n allow = false;\n } else if (server.data.chests.canOpen(player, player.openedChest()) || player.ignoresChestLocks()) {\n if (server.data.chests.isLocked(player.openedChest())) {\n if (player.isAttemptingUnlock()) {\n server.data.chests.unlock(player.openedChest());\n server.data.save();\n player.setAttemptedAction(null);\n player.addTMessage(Color.RED, \"String_Node_Str\");\n typeString = t(\"String_Node_Str\");\n } else {\n typeString = server.data.chests.chestName(player.openedChest());\n }\n } else {\n typeString = t(\"String_Node_Str\");\n if (player.isAttemptLock()) {\n lockChest(player.openedChest());\n typeString = (player.nextChestName() == null) ? t(\"String_Node_Str\") : player.nextChestName();\n }\n }\n } else {\n player.addTMessage(Color.RED, \"String_Node_Str\");\n allow = false;\n }\n }\n if (!allow) {\n write((byte) 0x65);\n write(id);\n } else {\n write(packetId);\n write(id);\n write(invtype);\n write(typeString);\n write(unknownByte);\n }\n break;\n case 0x65:\n write(packetId);\n write(in.readByte());\n break;\n case 0x66:\n write(packetId);\n write(in.readByte());\n write(in.readShort());\n write(in.readByte());\n write(in.readShort());\n write(in.readByte());\n copyItem();\n break;\n case 0x67:\n write(packetId);\n write(in.readByte());\n write(in.readShort());\n copyItem();\n break;\n case 0x68:\n write(packetId);\n write(in.readByte());\n short count = write(in.readShort());\n for (int c = 0; c < count; ++c) {\n copyItem();\n }\n break;\n case 0x69:\n write(packetId);\n write(in.readByte());\n write(in.readShort());\n write(in.readShort());\n break;\n case 0x6a:\n write(packetId);\n write(in.readByte());\n write(in.readShort());\n write(in.readByte());\n break;\n case 0x6b:\n write(packetId);\n write(in.readShort());\n copyItem();\n break;\n case 0x6c:\n write(packetId);\n write(in.readByte());\n write(in.readByte());\n break;\n case (byte) 0x82:\n write(packetId);\n write(in.readInt());\n write(in.readShort());\n write(in.readInt());\n write(readUTF16());\n write(readUTF16());\n write(readUTF16());\n write(readUTF16());\n break;\n case (byte) 0x83:\n write(packetId);\n write(in.readShort());\n write(in.readShort());\n short length = in.readShort();\n write(length);\n copyNBytes(length);\n break;\n case (byte) 0x84:\n write(packetId);\n write(in.readInt());\n write(in.readShort());\n write(in.readInt());\n write(in.readByte());\n short nbtLength = write(in.readShort());\n if (nbtLength > 0) {\n copyNBytes(nbtLength);\n }\n break;\n case (byte) 0xc3:\n write(packetId);\n write(in.readInt());\n copyNBytes(write(in.readInt()));\n break;\n case (byte) 0xc8:\n write(packetId);\n copyNBytes(5);\n break;\n case (byte) 0xc9:\n write(packetId);\n write(readUTF16());\n write(in.readByte());\n write(in.readShort());\n break;\n case (byte) 0xca:\n write(packetId);\n write(in.readByte());\n write(in.readByte());\n write(in.readByte());\n break;\n case (byte) 0xcb:\n write(packetId);\n write(readUTF16());\n break;\n case (byte) 0xcc:\n write(packetId);\n write(readUTF16());\n write(in.readByte());\n write(in.readByte());\n write(in.readByte());\n write(in.readBoolean());\n break;\n case (byte) 0xcd:\n write(packetId);\n write(in.readByte());\n break;\n case (byte) 0xd3:\n write(packetId);\n copyNBytes(1);\n copyVLC();\n copyVLC();\n copyVLC();\n copyNBytes((int) copyVLC());\n break;\n case (byte) 0xe6:\n write(packetId);\n write(in.readInt());\n write(in.readInt());\n copyNBytes(write(in.readInt()) * 4);\n copyNBytes(write(in.readInt()) * 4);\n copyNBytes(write(in.readInt()) * 8);\n int sizeString = write(in.readInt());\n for (int i = 0; i < sizeString; i++) {\n copyNBytes(write(in.readInt()));\n }\n break;\n case (byte) 0xfa:\n write(packetId);\n write(readUTF16());\n copyNBytes(write(in.readShort()));\n break;\n case (byte) 0xfc:\n byte[] sharedKey = new byte[in.readShort()];\n in.readFully(sharedKey);\n byte[] challengeTokenResponse = new byte[in.readShort()];\n in.readFully(challengeTokenResponse);\n if (!isServerTunnel) {\n if (!player.clientEncryption.checkChallengeToken(challengeTokenResponse)) {\n player.kick(\"String_Node_Str\");\n break;\n }\n player.clientEncryption.setEncryptedSharedKey(sharedKey);\n sharedKey = player.serverEncryption.getEncryptedSharedKey();\n }\n if (!isServerTunnel && server.authenticator.useCustAuth(player) && !server.authenticator.onlineAuthenticate(player)) {\n player.kick(t(\"String_Node_Str\", \"String_Node_Str\"));\n break;\n }\n write(packetId);\n write((short) sharedKey.length);\n write(sharedKey);\n challengeTokenResponse = player.serverEncryption.encryptChallengeToken();\n write((short) challengeTokenResponse.length);\n write(challengeTokenResponse);\n if (isServerTunnel) {\n in = new DataInputStream(new BufferedInputStream(player.serverEncryption.encryptedInputStream(inputStream)));\n out = new DataOutputStream(new BufferedOutputStream(player.clientEncryption.encryptedOutputStream(outputStream)));\n } else {\n in = new DataInputStream(new BufferedInputStream(player.clientEncryption.encryptedInputStream(inputStream)));\n out = new DataOutputStream(new BufferedOutputStream(player.serverEncryption.encryptedOutputStream(outputStream)));\n }\n break;\n case (byte) 0xfd:\n tunneler.setName(streamType + \"String_Node_Str\" + player.getName());\n write(packetId);\n String serverId = readUTF16();\n if (!server.authenticator.useCustAuth(player)) {\n serverId = \"String_Node_Str\";\n } else {\n serverId = player.getConnectionHash();\n }\n write(serverId);\n byte[] keyBytes = new byte[in.readShort()];\n in.readFully(keyBytes);\n byte[] challengeToken = new byte[in.readShort()];\n in.readFully(challengeToken);\n player.serverEncryption.setPublicKey(keyBytes);\n byte[] key = player.clientEncryption.getPublicKey();\n write((short) key.length);\n write(key);\n write((short) challengeToken.length);\n write(challengeToken);\n player.serverEncryption.setChallengeToken(challengeToken);\n player.clientEncryption.setChallengeToken(challengeToken);\n break;\n case (byte) 0xfe:\n write(packetId);\n write(in.readByte());\n break;\n case (byte) 0xff:\n write(packetId);\n String reason = readUTF16();\n if (reason.startsWith(\"String_Node_Str\")) {\n reason = String.format(\"String_Node_Str\", Main.protocolVersion, Main.minecraftVersion, server.config.properties.get(\"String_Node_Str\"), server.playerList.size(), server.config.properties.getInt(\"String_Node_Str\"));\n }\n write(reason);\n if (reason.startsWith(\"String_Node_Str\")) {\n server.addRobot(player);\n }\n player.close();\n break;\n default:\n if (EXPENSIVE_DEBUG_LOGGING) {\n while (true) {\n skipNBytes(1);\n flushAll();\n }\n } else {\n if (lastPacket != null) {\n throw new IOException(\"String_Node_Str\" + streamType + \"String_Node_Str\" + Integer.toHexString(packetId) + \"String_Node_Str\" + player.getName() + \"String_Node_Str\" + Integer.toHexString(lastPacket));\n } else {\n throw new IOException(\"String_Node_Str\" + streamType + \"String_Node_Str\" + Integer.toHexString(packetId) + \"String_Node_Str\" + player.getName());\n }\n }\n }\n packetFinished();\n lastPacket = (packetId == 0x00) ? lastPacket : packetId;\n}\n"
"public boolean isCompressed() {\n return path.endsWith(MapLoader.MAP_EXTENSION_COMPRESSED);\n}\n"
"public Insets getPadding(Insets retValue) {\n return DEUtil.getPadding(getHandle(), retValue);\n}\n"
"protected void updateValue() {\n String string = fTextValue.getText();\n long value = 0;\n try {\n value = TmfTimestampFormat.getDefaulTimeFormat().parseValue(string, fTraceStartTime);\n } catch (ParseException e) {\n }\n if (getValue() != value) {\n ITmfTrace trace = fParentView.getTrace();\n if (trace != null) {\n TmfTimeRange range = trace.getTimeRange();\n long startTime = range.getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();\n long endTime = range.getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();\n if (value < startTime) {\n value = startTime;\n } else if (value > endTime) {\n value = endTime;\n }\n }\n setValue(value);\n fParentView.updateCurrentEventTime(value);\n }\n}\n"
"public void sendQueryOfType(String scheme, String type, String magic_column, String table, String keyspace, DataTable modifications) throws Exception {\n commonspec.getCassandraClient().useKeyspace(keyspace);\n commonspec.getLogger().info(\"String_Node_Str\", \"String_Node_Str\");\n String retrievedData = commonspec.retrieveData(scheme, type);\n String modifiedData = commonspec.modifyData(retrievedData, type, modifications).toString();\n String query = \"String_Node_Str\" + table + \"String_Node_Str\" + magic_column + \"String_Node_Str\" + modifiedData + \"String_Node_Str\";\n System.out.println(\"String_Node_Str\" + query);\n commonspec.setResults(commonspec.getCassandraClient().executeQuery(query));\n}\n"
"private void chooseUniqueNames(Program prog, Function f, Block inlineBlock, Map<String, Arg> replacements) {\n Set<String> excludedNames = new HashSet<String>();\n excludedNames.addAll(prog.getGlobalConsts().keySet());\n Deque<Block> blocks = new ArrayDeque<Block>();\n blocks.add(inlineBlock);\n while (!blocks.isEmpty()) {\n Block block = blocks.pop();\n for (Var v : block.getVariables()) {\n if (v.defType() != DefType.GLOBAL_CONST) {\n updateName(targetFunction, replacements, excludedNames, v);\n }\n }\n for (Continuation c : block.getContinuations()) {\n List<Var> constructVars = c.constructDefinedVars();\n if (constructVars != null) {\n for (Var cv : constructVars) {\n updateName(f, replacements, excludedNames, cv);\n }\n }\n for (Block inner : c.getBlocks()) {\n blocks.push(inner);\n }\n }\n }\n}\n"
"protected Element setRegionSettings(Element e) {\n Set<Flag> fset = getFlags();\n if (!fset.isEmpty()) {\n Element eFlags;\n e.addContent(eFlags = new Element(\"String_Node_Str\"));\n for (Flag f : fset) eFlags.addContent(new Element(f.name.toLowerCase()));\n }\n if (getOwners() != null)\n for (AutoRefTeam team : getOwners()) e.addContent(new Element(\"String_Node_Str\").setText(team.getName()));\n if (yaw != null)\n e.setAttribute(\"String_Node_Str\", Integer.toString(Math.round((float) yaw / ANGLE_RND) * ANGLE_RND));\n if (pitch != null)\n e.setAttribute(\"String_Node_Str\", Integer.toString(Math.round((float) pitch / ANGLE_RND) * ANGLE_RND));\n if (regionName != null)\n e.setAttribute(\"String_Node_Str\", this.getName());\n return e;\n}\n"
"public boolean getSelected() {\n return checkBox.getValue();\n}\n"
"public void setChangePwdDate(final Date changePwdDate) {\n this.changePwdDate = changePwdDate == null ? null : new Date(changePwdDate.getTime());\n}\n"
"public int hashCode() {\n HashCodeBuilder b = new HashCodeBuilder();\n b.append(getParamName());\n b.append(getResource());\n b.append(getTimeFromDate(getValueHigh()));\n b.append(getTimeFromDate(getValueLow()));\n return b.toHashCode();\n}\n"
"public void deactivateChat(String remoteUser) {\n synchronized (textChatHUDRefMap) {\n WeakReference<HUDComponent> ref = textChatHUDRefMap.get(remoteUser);\n if (ref == null) {\n return;\n }\n });\n}\n"
"private void resizeColumn(int value, int start, int end) {\n TableEditPart part = (TableEditPart) getSourceEditPart();\n if (start != end) {\n value = getTrueValue(value, start, end);\n part.resizeColumn(start, end, value, !isCtrlDown());\n } else {\n Dimension dimension = getDragWidth(start, end);\n if (value < dimension.width) {\n value = dimension.width;\n }\n TableHandleAdapter adp = HandleAdapterFactory.getInstance().getTableHandleAdapter(part.getModel());\n Dimension dm = adp.calculateSize();\n dm.width += value;\n dm.height = -1;\n try {\n adp.ajustSize(dm);\n } catch (SemanticException e) {\n ExceptionHandler.handle(e);\n }\n }\n}\n"
"public void renderFacade(LoopL<Point3d> list, AtomicInteger count, BufferedWriter description) {\n double[] minMax = Loopz.minMax(list);\n Loopz.expand(minMax, 30);\n Map<Point2d, Pano> panos = new HashMap<>();\n for (Gen gen : tweed.frame.gens(PanoGen.class)) for (Pano pg : ((PanoGen) gen).getPanos()) {\n Point2d pt = new Point2d(pg.location.x, pg.location.z);\n if (pt.x > minMax[0] && pt.x < minMax[1] && pt.y > minMax[4] && pt.y < minMax[5])\n panos.put(pt, pg);\n }\n FacadeFinder ff = new FacadeFinder(Loopz.toXZLoop(list), panos, tweed.frame.getGenOf(PlanesGen.class));\n Point2d cen = Loopz.average(Loopz.to2dLoop(list, 1, null));\n renderFacades(cen.x + \"String_Node_Str\" + cen.y, ff, count, description, feedback);\n}\n"
"private ClientResponse getResponse(String url) {\n return followClient.resource(url).accept(MediaType.WILDCARD_TYPE).header(HttpHeaders.ACCEPT_ENCODING, \"String_Node_Str\").get(ClientResponse.class);\n}\n"
"public static NSArray<SKTexture> loadFramesFromAtlas(String atlasName, String baseFileName, int numberOfFrames) {\n NSArray<SKTexture> frames = new NSMutableArray<>(numberOfFrames);\n SKTextureAtlas atlas = new SKTextureAtlas(atlasName);\n for (int i = 1; i <= numberOfFrames; i++) {\n String fileName = String.format(\"String_Node_Str\", baseFileName, i);\n SKTexture texture = atlas.getTexture(fileName);\n frames.add(texture);\n }\n return frames;\n}\n"
"public String getLeftPartNameType(Integer aSqlType) {\n String partName = jdbcTypesLeftPartName.get(aSqlType);\n if (partName == null) {\n partName = jdbcTypes2RdbmsTypes.get(aSqlType);\n return partName;\n}\n"
"private void _handleEventListSelectionChange() {\n int index = _eventList.getList().getSelectionIndex();\n if (index != -1) {\n OpEvent event = (OpEvent) _eventList.getElementAt(index);\n _counter.setEvent(event);\n _eventDescText.setText(event.getTextDescription());\n _unitMaskViewer.displayEvent(event);\n int min = _counter.getEvent().getMinCount();\n if (_counter.getCount() < min) {\n setErrorMessage(getMinCountErrorMessage(min));\n }\n }\n updateLaunchConfigurationDialog();\n}\n"
"public void testSendingEventAfterReplay() {\n assertEquals(0, handler.receivedAttackButtonList.size());\n long startTime = System.currentTimeMillis();\n while ((System.currentTimeMillis() - startTime) < 10) {\n eventSystem.process();\n }\n eventSystem.send(entity, new AttackButton());\n assertEquals(4, handler.receivedAttackButtonList.size());\n}\n"
"public Boolean call(SavingsAccount savingsAccount) {\n return (savingsAccount.getStatus().getActive() && !savingsAccount.isRecurring());\n}\n"
"public List<JAXBElement> createShellJAXBElementList(List<ReportItem> reportItems, Object record) {\n if (reportItems == null || reportItems.size() == 0) {\n return Collections.emptyList();\n }\n List<JAXBElement> jaxbElements = new ArrayList<>(reportItems.size());\n for (int index = 0; index < reportItems.size(); index++) {\n ReportItem reportItem = reportItems.get(index);\n Object reportItemValue = record;\n if (record instanceof Object[]) {\n reportItemValue = ((Object[]) record)[index];\n }\n if (reportItemValue != null) {\n JAXBElement element = new JAXBElement(new QName(reportItem.getName()), reportItemValue.getClass(), reportItemValue);\n jaxbElements.add(reportItem.getResultIndex(), element);\n }\n }\n return jaxbElements;\n}\n"
"private boolean checkClaimConfidence(Transaction transaction, TransactionConfidence conf, Project project) {\n switch(conf.getConfidenceType()) {\n case PENDING:\n int seenBy = conf.numBroadcastPeers();\n log.info(\"String_Node_Str\", seenBy);\n if (seenBy < peerGroup.getMinBroadcastConnections())\n break;\n case BUILDING:\n if (conf.getDepthInBlocks() > 3)\n return true;\n if (diskManager.getProjectState(project).state != ProjectState.CLAIMED) {\n log.info(\"String_Node_Str\");\n diskManager.setProjectState(project, new ProjectStateInfo(ProjectState.CLAIMED, transaction.getHash()));\n if (project.getPaymentURL() == null || mode == Mode.SERVER) {\n movePledgesFromOpenToClaimed(transaction, project);\n } else {\n jitteredServerRequery(project);\n }\n }\n break;\n case DEAD:\n log.warn(\"String_Node_Str\", conf.getOverridingTransaction());\n diskManager.setProjectState(project, new ProjectStateInfo(ProjectState.ERROR, null));\n break;\n case UNKNOWN:\n break;\n }\n return false;\n}\n"
"public void addResults(List<EvaluatedDescriptionClass> resultList) {\n this.resultList.clear();\n this.selectionList.clear();\n this.resultList.addAll(resultList);\n for (int i = 0; i < resultList.size(); i++) {\n selectionList.add(i, Boolean.FALSE);\n }\n fireTableDataChanged();\n}\n"
"public boolean replaceEvent(GameEvent event, Ability source, Game game) {\n boolean retValue = false;\n GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, source.getFirstTarget(), source.getId(), source.getControllerId(), event.getAmount(), false);\n int damage = event.getAmount();\n if (!game.replaceEvent(preventEvent)) {\n event.setAmount(0);\n game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, source.getFirstTarget(), source.getId(), source.getControllerId(), damage));\n retValue = true;\n }\n Permanent permanent = game.getPermanent(source.getSourceId());\n if (permanent != null) {\n permanent.removeCounters(CounterType.P1P1.createInstance(), game);\n }\n return retValue;\n}\n"
"public ArrayOfString contactClient(String identifiantClient, String nomContact, String prenomContact, String fonctionContact, String telephone, String email, String numEtVoie, String codePostal, String ville, String pays) {\n ArrayOfString arrayOfString = new ArrayOfString();\n ContactClient contactClient = clientService.createContactClient(identifiantClient, nomContact, prenomContact, fonctionContact, telephone, email, numEtVoie, codePostal, ville, pays);\n arrayOfString.getString().add(contactClient.getIdentifiantClient());\n return arrayOfString;\n}\n"
"public RrRectangle getBox() {\n return new RrRectangle(bBox);\n}\n"
"private void embeddedCollections(final List<DBObject> embeddedData, final RequestContext context, final String requestPath, final Representation rep) {\n embeddedData.stream().forEach((d) -> {\n Object _id = d.get(\"String_Node_Str\");\n if (_id != null && _id instanceof String) {\n String id = (String) _id;\n String rp = URLUtils.removeTrailingSlashes(requestPath);\n rp = \"String_Node_Str\".equals(rp) ? \"String_Node_Str\" : rp;\n Representation nrep = new Representation(rp + \"String_Node_Str\" + id);\n nrep.addProperties(d);\n if (id.endsWith(RequestContext.FS_FILES_SUFFIX)) {\n if (context.isFullHalMode()) {\n CollectionRepresentationFactory.addSpecialProperties(nrep, TYPE.FILES_BUCKET, d);\n }\n rep.addRepresentation(\"String_Node_Str\", nrep);\n } else {\n if (context.isFullHalMode()) {\n CollectionRepresentationFactory.addSpecialProperties(nrep, TYPE.COLLECTION, d);\n }\n rep.addRepresentation(\"String_Node_Str\", nrep);\n }\n } else {\n LOGGER.error(\"String_Node_Str\", _id);\n }\n });\n}\n"
"private void clickOnParticularSortAnchorCheckFirstRow(JQueryLocator sortBy, StateWithCapitalAndTimeZone ascendingState, StateWithCapitalAndTimeZone descendingState, String ascendingError, String descendingError) {\n guardXhr(selenium).click(sortBy);\n StateWithCapitalAndTimeZone actualState = initializeStateDataFromRow();\n assertEquals(actualState, ascendingState, ascendingError);\n Graphene.guardXhr(sortBy).click();\n actualState = initializeStateDataFromRow();\n assertEquals(actualState, descendingState, descendingError);\n}\n"
"private static String resolveContactSource(String peerAddress) {\n String displayName = null;\n if (!StringUtils.isNullOrEmpty(peerAddress)) {\n Vector<ResolveAddressToDisplayNameContactQueryListener> resolvers = new Vector<ResolveAddressToDisplayNameContactQueryListener>(1, 1);\n int index = peerAddress.indexOf(\"String_Node_Str\");\n String peerUserID = (index > -1) ? peerAddress.substring(0, index) : peerAddress;\n peerUserID = Pattern.quote(peerUserID);\n Pattern pattern = Pattern.compile(\"String_Node_Str\" + peerUserID + \"String_Node_Str\" + peerUserID + \"String_Node_Str\");\n for (ContactSourceService contactSourceService : GuiActivator.getContactSources()) {\n if (!(contactSourceService instanceof ExtendedContactSourceService))\n continue;\n ContactQuery query = ((ExtendedContactSourceService) contactSourceService).createContactQuery(pattern);\n resolvers.add(new ResolveAddressToDisplayNameContactQueryListener(query));\n }\n long startTime = System.currentTimeMillis();\n long currentTime = startTime;\n long timeout = 500;\n while (displayName == null && currentTime - startTime < timeout) {\n for (int i = 0; i < resolvers.size() && displayName == null; ++i) {\n ResolveAddressToDisplayNameContactQueryListener resolver = resolvers.get(i);\n if (!resolver.isRunning()) {\n if (resolver.isFound()) {\n displayName = resolver.getResolvedName();\n if (displayName.equals(peerAddress)) {\n displayName = null;\n }\n }\n }\n }\n Thread.yield();\n currentTime = System.currentTimeMillis();\n }\n for (int i = 0; i < resolvers.size(); ++i) {\n ResolveAddressToDisplayNameContactQueryListener resolver = resolvers.get(i);\n if (resolver.isRunning()) {\n resolver.stop();\n }\n }\n }\n return displayName;\n}\n"
"public void visit(ASTNode[] nodes, SourceUnit source) {\n checkNodesForAnnotationAndType(nodes[0], nodes[1]);\n ClassNode classNode = (ClassNode) nodes[1];\n if (!classNode.implementsInterface(THREADING_HANDLER_TYPE)) {\n apply(classNode);\n }\n}\n"
"public static List<BlockType> getLiquidBlockTypes() {\n List<BlockType> liquids = new ArrayList<>();\n Collection<BlockType> types = Prism.getGame().getRegistry().getAllOf(BlockType.class);\n for (BlockType type : types) {\n Optional<MatterProperty> property = type.getProperty(MatterProperty.class);\n if (property.isPresent() && Objects.equals(property.get().getValue(), Matter.LIQUID)) {\n liquids.add(type);\n }\n }\n liquids.add(BlockTypes.LAVA);\n liquids.add(BlockTypes.FLOWING_LAVA);\n liquids.add(BlockTypes.WATER);\n liquids.add(BlockTypes.FLOWING_WATER);\n return liquids;\n}\n"
"private void notifyListeners(String packageName, int userId) {\n final long token = injectClearCallingIdentity();\n try {\n if (!mUserManager.isUserRunning(userId)) {\n return;\n }\n } finally {\n injectRestoreCallingIdentity(token);\n }\n postToHandler(() -> {\n final ArrayList<ShortcutChangeListener> copy;\n synchronized (mLock) {\n copy = new ArrayList<>(mListeners);\n }\n for (int i = copy.size() - 1; i >= 0; i--) {\n copy.get(i).onShortcutChanged(packageName, userId);\n }\n });\n}\n"
"private ReaderTag getReaderTagFromBundleParams(PersistableBundle bundle) {\n String slug = bundle.getString(ARG_TAG_PARAM_SLUG);\n String displayName = bundle.getString(ARG_TAG_PARAM_DISPLAY_NAME);\n String title = bundle.getString(ARG_TAG_PARAM_TITLE);\n String endpoint = bundle.getString(ARG_TAG_PARAM_ENDPOINT);\n int tagType = bundle.getInt(ARG_TAG_PARAM_TAGTYPE);\n ReaderTag tag = new ReaderTag(slug, displayName, title, endpoint, ReaderTagType.fromInt(tagType));\n return tag;\n}\n"
"protected int runDistributedTrain() throws IOException, InterruptedException, ClassNotFoundException {\n LOG.info(\"String_Node_Str\", isDryTrain ? \"String_Node_Str\" : \"String_Node_Str\");\n int status = 0;\n Configuration conf = new Configuration();\n SourceType sourceType = super.getModelConfig().getDataSet().getSource();\n final List<String> args = new ArrayList<String>();\n GridSearch gs = new GridSearch(modelConfig.getTrain().getParams());\n prepareCommonParams(gs.hasHyperParam(), args, sourceType);\n String alg = super.getModelConfig().getTrain().getAlgorithm();\n FileSystem fileSystem = ShifuFileUtils.getFileSystemBySourceType(sourceType);\n Path tmpModelsPath = fileSystem.makeQualified(new Path(super.getPathFinder().getPathBySourceType(new Path(Constants.TMP, Constants.DEFAULT_MODELS_TMP_FOLDER), sourceType)));\n args.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, CommonConstants.SHIFU_TMP_MODELS_FOLDER, tmpModelsPath.toString()));\n int baggingNum = isForVarSelect ? 1 : super.getModelConfig().getBaggingNum();\n if (modelConfig.isClassification() && modelConfig.getTrain().isOneVsAll()) {\n baggingNum = modelConfig.getTags().size();\n if (baggingNum != super.getModelConfig().getBaggingNum()) {\n LOG.warn(\"String_Node_Str\", baggingNum);\n }\n }\n boolean isKFoldCV = false;\n Integer kCrossValidation = this.modelConfig.getTrain().getNumKFold();\n if (kCrossValidation != null && kCrossValidation > 0) {\n isKFoldCV = true;\n baggingNum = modelConfig.getTrain().getNumKFold();\n if (baggingNum != super.getModelConfig().getBaggingNum()) {\n LOG.warn(\"String_Node_Str\", baggingNum);\n }\n }\n long start = System.currentTimeMillis();\n LOG.info(\"String_Node_Str\", baggingNum);\n boolean isParallel = Boolean.valueOf(Environment.getProperty(Constants.SHIFU_DTRAIN_PARALLEL, SHIFU_DEFAULT_DTRAIN_PARALLEL)).booleanValue();\n GuaguaMapReduceClient guaguaClient;\n int[] inputOutputIndex = DTrainUtils.getInputOutputCandidateCounts(this.columnConfigList);\n int inputNodeCount = inputOutputIndex[0] == 0 ? inputOutputIndex[2] : inputOutputIndex[0];\n int candidateCount = inputOutputIndex[2];\n boolean isAfterVarSelect = (inputOutputIndex[0] != 0);\n List<Integer> allFeatures = CommonUtils.getAllFeatureList(this.columnConfigList, isAfterVarSelect);\n if (modelConfig.getNormalize().getIsParquet()) {\n guaguaClient = new GuaguaParquetMapReduceClient();\n RequiredFieldList requiredFieldList = new RequiredFieldList();\n for (ColumnConfig columnConfig : super.columnConfigList) {\n if (columnConfig.isTarget()) {\n requiredFieldList.add(new RequiredField(columnConfig.getColumnName(), columnConfig.getColumnNum(), null, DataType.FLOAT));\n } else {\n if (inputNodeCount == candidateCount) {\n if (!columnConfig.isMeta() && !columnConfig.isTarget() && CommonUtils.isGoodCandidate(columnConfig)) {\n requiredFieldList.add(new RequiredField(columnConfig.getColumnName(), columnConfig.getColumnNum(), null, DataType.FLOAT));\n }\n } else {\n if (!columnConfig.isMeta() && !columnConfig.isTarget() && columnConfig.isFinalSelect()) {\n requiredFieldList.add(new RequiredField(columnConfig.getColumnName(), columnConfig.getColumnNum(), null, DataType.FLOAT));\n }\n }\n }\n }\n requiredFieldList.add(new RequiredField(\"String_Node_Str\", columnConfigList.size(), null, DataType.DOUBLE));\n args.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, \"String_Node_Str\", serializeRequiredFieldList(requiredFieldList)));\n args.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, \"String_Node_Str\", \"String_Node_Str\"));\n } else {\n guaguaClient = new GuaguaMapReduceClient();\n }\n int parallelNum = Integer.parseInt(Environment.getProperty(CommonConstants.SHIFU_TRAIN_BAGGING_INPARALLEL, \"String_Node_Str\"));\n int parallelGroups = 1;\n if (gs.hasHyperParam()) {\n parallelGroups = (gs.getFlattenParams().size() % parallelNum == 0 ? gs.getFlattenParams().size() / parallelNum : gs.getFlattenParams().size() / parallelNum + 1);\n } else {\n parallelGroups = baggingNum % parallelNum == 0 ? baggingNum / parallelNum : baggingNum / parallelNum + 1;\n }\n List<String> progressLogList = new ArrayList<String>(baggingNum);\n boolean isOneJobNotContinuous = false;\n for (int j = 0; j < parallelGroups; j++) {\n int currBags = baggingNum;\n if (gs.hasHyperParam()) {\n if (j == parallelGroups - 1) {\n currBags = gs.getFlattenParams().size() % parallelNum == 0 ? parallelNum : gs.getFlattenParams().size() % parallelNum;\n } else {\n currBags = parallelNum;\n }\n } else {\n if (j == parallelGroups - 1) {\n currBags = baggingNum % parallelNum == 0 ? parallelNum : baggingNum % parallelNum;\n } else {\n currBags = parallelNum;\n }\n }\n for (int k = 0; k < currBags; k++) {\n int i = j * parallelNum + k;\n if (gs.hasHyperParam()) {\n LOG.info(\"String_Node_Str\", i, gs.getParams(i));\n } else if (isKFoldCV) {\n LOG.info(\"String_Node_Str\", i);\n }\n List<String> localArgs = new ArrayList<String>(args);\n localArgs.add(\"String_Node_Str\");\n localArgs.add(String.format(\"String_Node_Str\", alg, super.getModelConfig().getModelSetName(), i));\n LOG.info(\"String_Node_Str\", i);\n String modelName = getModelName(i);\n Path modelPath = fileSystem.makeQualified(new Path(super.getPathFinder().getModelsPath(sourceType), modelName));\n Path bModelPath = fileSystem.makeQualified(new Path(super.getPathFinder().getNNBinaryModelsPath(sourceType), modelName));\n boolean isContinous = false;\n if (gs.hasHyperParam()) {\n isContinous = false;\n } else {\n int intContinuous = checkContinuousTraining(fileSystem, localArgs, modelPath, modelConfig.getTrain().getParams());\n if (intContinuous == -1) {\n LOG.warn(\"String_Node_Str\", i);\n continue;\n } else {\n isContinous = (intContinuous == 1);\n }\n }\n if (gs.hasHyperParam() || isKFoldCV) {\n isContinous = false;\n }\n if (!isContinous && !isOneJobNotContinuous) {\n isOneJobNotContinuous = true;\n String srcModelPath = super.getPathFinder().getModelsPath(sourceType);\n String mvModelPath = srcModelPath + \"String_Node_Str\" + System.currentTimeMillis();\n LOG.info(\"String_Node_Str\", mvModelPath);\n fileSystem.rename(new Path(srcModelPath), new Path(mvModelPath));\n fileSystem.mkdirs(new Path(srcModelPath));\n FileSystem.getLocal(conf).delete(new Path(super.getPathFinder().getModelsPath(SourceType.LOCAL)), true);\n }\n if (NNConstants.NN_ALG_NAME.equalsIgnoreCase(alg)) {\n Map<String, Object> params = gs.hasHyperParam() ? gs.getParams(i) : this.modelConfig.getTrain().getParams();\n Object fssObj = params.get(\"String_Node_Str\");\n FeatureSubsetStrategy featureSubsetStrategy = null;\n double featureSubsetRate = 0d;\n if (fssObj != null) {\n try {\n featureSubsetRate = Double.parseDouble(fssObj.toString());\n featureSubsetStrategy = null;\n } catch (NumberFormatException ee) {\n featureSubsetStrategy = FeatureSubsetStrategy.of(fssObj.toString());\n }\n } else {\n LOG.warn(\"String_Node_Str\");\n featureSubsetStrategy = FeatureSubsetStrategy.ALL;\n featureSubsetRate = 0;\n }\n Set<Integer> subFeatures = null;\n if (isContinous) {\n BasicFloatNetwork existingModel = (BasicFloatNetwork) CommonUtils.getBasicNetwork(CommonUtils.loadModel(modelConfig, modelPath, ShifuFileUtils.getFileSystemBySourceType(this.modelConfig.getDataSet().getSource())));\n if (existingModel == null) {\n subFeatures = new HashSet<Integer>(getSubsamplingFeatures(allFeatures, featureSubsetStrategy, featureSubsetRate, inputNodeCount));\n } else {\n subFeatures = existingModel.getFeatureSet();\n }\n } else {\n subFeatures = new HashSet<Integer>(getSubsamplingFeatures(allFeatures, featureSubsetStrategy, featureSubsetRate, inputNodeCount));\n }\n if (subFeatures == null || subFeatures.size() == 0) {\n localArgs.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, CommonConstants.SHIFU_NN_FEATURE_SUBSET, \"String_Node_Str\"));\n } else {\n localArgs.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, CommonConstants.SHIFU_NN_FEATURE_SUBSET, StringUtils.join(subFeatures, ',')));\n LOG.debug(\"String_Node_Str\", subFeatures.size(), StringUtils.join(subFeatures, ','));\n }\n }\n localArgs.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, CommonConstants.GUAGUA_OUTPUT, modelPath.toString()));\n localArgs.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, Constants.SHIFU_NN_BINARY_MODEL_PATH, bModelPath.toString()));\n if (gs.hasHyperParam() || isKFoldCV) {\n Path valErrPath = fileSystem.makeQualified(new Path(super.getPathFinder().getValErrorPath(sourceType), \"String_Node_Str\" + i));\n localArgs.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, CommonConstants.GS_VALIDATION_ERROR, valErrPath.toString()));\n }\n localArgs.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, CommonConstants.SHIFU_TRAINER_ID, String.valueOf(i)));\n final String progressLogFile = getProgressLogFile(i);\n progressLogList.add(progressLogFile);\n localArgs.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, CommonConstants.SHIFU_DTRAIN_PROGRESS_FILE, progressLogFile));\n String hdpVersion = HDPUtils.getHdpVersionForHDP224();\n if (StringUtils.isNotBlank(hdpVersion)) {\n localArgs.add(String.format(CommonConstants.MAPREDUCE_PARAM_FORMAT, \"String_Node_Str\", hdpVersion));\n HDPUtils.addFileToClassPath(HDPUtils.findContainingFile(\"String_Node_Str\"), conf);\n HDPUtils.addFileToClassPath(HDPUtils.findContainingFile(\"String_Node_Str\"), conf);\n HDPUtils.addFileToClassPath(HDPUtils.findContainingFile(\"String_Node_Str\"), conf);\n HDPUtils.addFileToClassPath(HDPUtils.findContainingFile(\"String_Node_Str\"), conf);\n }\n if (isParallel) {\n guaguaClient.addJob(localArgs.toArray(new String[0]));\n } else {\n TailThread tailThread = startTailThread(new String[] { progressLogFile });\n guaguaClient.createJob(localArgs.toArray(new String[0])).waitForCompletion(true);\n stopTailThread(tailThread);\n }\n }\n if (isParallel) {\n TailThread tailThread = startTailThread(progressLogList.toArray(new String[0]));\n guaguaClient.run();\n stopTailThread(tailThread);\n }\n }\n if (isKFoldCV) {\n List<Double> valErrs = readAllValidationErrors(sourceType, fileSystem, kCrossValidation);\n double sum = 0d;\n for (Double err : valErrs) {\n sum += err;\n }\n LOG.info(\"String_Node_Str\", sum / valErrs.size());\n LOG.info(\"String_Node_Str\", System.currentTimeMillis() - start);\n } else if (gs.hasHyperParam()) {\n LOG.info(\"String_Node_Str\", modelConfig.getParams());\n Map<String, Object> params = findBestParams(sourceType, fileSystem, gs);\n for (Entry<String, Object> entry : params.entrySet()) {\n modelConfig.getParams().put(entry.getKey(), entry.getValue());\n }\n super.pathFinder.getModelConfigPath(SourceType.LOCAL);\n JSONUtils.writeValue(new File(super.pathFinder.getModelConfigPath(SourceType.LOCAL)), modelConfig);\n LOG.info(\"String_Node_Str\", System.currentTimeMillis() - start);\n } else {\n if (!gs.hasHyperParam()) {\n for (int i = 0; i < baggingNum; i++) {\n String modelName = getModelName(i);\n Path modelPath = fileSystem.makeQualified(new Path(super.getPathFinder().getModelsPath(sourceType), modelName));\n if (ShifuFileUtils.getFileSystemBySourceType(sourceType).exists(modelPath)) {\n copyModelToLocal(modelName, modelPath, sourceType);\n } else {\n LOG.warn(\"String_Node_Str\", modelPath.toString());\n status = 1;\n }\n }\n boolean copyTmpModelsToLocal = Boolean.TRUE.toString().equalsIgnoreCase(Environment.getProperty(Constants.SHIFU_TMPMODEL_COPYTOLOCAL, \"String_Node_Str\"));\n if (CommonUtils.isTreeModel(modelConfig.getAlgorithm())) {\n copyTmpModelsToLocal = Boolean.TRUE.toString().equalsIgnoreCase(Environment.getProperty(Constants.SHIFU_TMPMODEL_COPYTOLOCAL, \"String_Node_Str\"));\n List<BasicML> models = CommonUtils.loadBasicModels(this.modelConfig, this.columnConfigList, null);\n Map<Integer, MutablePair<String, Double>> featureImportances = CommonUtils.computeTreeModelFeatureImportance(models);\n String localFsFolder = pathFinder.getLocalFeatureImportanceFolder();\n String localFIPath = pathFinder.getLocalFeatureImportancePath();\n processRollupForFIFiles(localFsFolder, localFIPath);\n CommonUtils.writeFeatureImportance(localFIPath, featureImportances);\n }\n if (copyTmpModelsToLocal) {\n copyTmpModelsToLocal(tmpModelsPath, sourceType);\n } else {\n LOG.info(\"String_Node_Str\", tmpModelsPath);\n }\n LOG.info(\"String_Node_Str\", System.currentTimeMillis() - start);\n }\n }\n if (status != 0) {\n LOG.error(\"String_Node_Str\");\n }\n return status;\n}\n"
"protected String _generateTypeConvertStatement(ProgramCodeGeneratorAdapter.Channel source, ProgramCodeGeneratorAdapter.Channel sink, int offset) throws IllegalActionException {\n Type sourceType = ((TypedIOPort) source.port).getType();\n Type sinkType = ((TypedIOPort) sink.port).getType();\n if (sourceType == BaseType.UNKNOWN) {\n return \"String_Node_Str\";\n }\n String sourcePortChannel = NamedProgramCodeGeneratorAdapter.generateName(source.port) + \"String_Node_Str\" + source.channelNumber + \"String_Node_Str\" + offset;\n String sourceRef = ((NamedProgramCodeGeneratorAdapter) (getCodeGenerator().getAdapter(source.port.getContainer()))).getReference(sourcePortChannel, false);\n String sinkPortChannel = NamedProgramCodeGeneratorAdapter.generateName(sink.port) + \"String_Node_Str\" + sink.channelNumber + \"String_Node_Str\" + offset;\n if (sink.port.getContainer() instanceof CompositeActor && sink.port.isOutput()) {\n sinkPortChannel = \"String_Node_Str\" + sinkPortChannel;\n }\n String sinkRef = ((NamedProgramCodeGeneratorAdapter) (getCodeGenerator().getAdapter(sink.port.getContainer()))).getReference(sinkPortChannel, true);\n if (sink.port.getContainer() instanceof ModalController) {\n sinkRef = NamedProgramCodeGeneratorAdapter.generateName(sink.port);\n if (sink.port.isMultiport()) {\n sinkRef = sinkRef + \"String_Node_Str\" + sink.channelNumber + \"String_Node_Str\";\n }\n }\n String result = sourceRef;\n String sourceCodeGenType = getCodeGenerator().codeGenType(sourceType);\n String sinkCodeGenType = getCodeGenerator().codeGenType(sinkType);\n if (!sinkCodeGenType.equals(sourceCodeGenType)) {\n result = \"String_Node_Str\" + sourceCodeGenType + \"String_Node_Str\" + sinkCodeGenType + \"String_Node_Str\" + result + \"String_Node_Str\";\n }\n return sinkRef + \"String_Node_Str\" + result + \"String_Node_Str\" + _eol;\n}\n"
"public void done(List<AVIMMessage> messages, AVIMException e) {\n if (e != null) {\n callback.internalDone(e);\n } else {\n List<AVIMMessage> cachedMsgs = new LinkedList<AVIMMessage>();\n if (indicatorMessage != null) {\n cachedMsgs.add(indicatorMessage);\n }\n processContinuousMessages(messages);\n queryMessagesFromCache(msgId, timestamp, limit, callback);\n }\n}\n"
"private void startVideoCapture() {\n if (videoCapturer != null) {\n Resources r = getResources();\n int px = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 120, r.getDisplayMetrics());\n videoCapturerAndroid.startCapture(px, px, 30);\n }\n}\n"
"public void run(IAction action) {\n store = getIPreferenceStore();\n Configuration config = getConfiguration(store, selection);\n PropertiesLoader props = getPropertiesLoader(store.getString(Preference.lang));\n StructuredSelection structuredSelection = null;\n try {\n if (selection instanceof StructuredSelection) {\n structuredSelection = (StructuredSelection) selection;\n }\n if (isNotSelected(structuredSelection)) {\n openWarningForRequired(props);\n return;\n } else if (isSelectedSeveral(structuredSelection)) {\n openWarningForSelectOneOnly(props);\n return;\n }\n String resourcePathForTargetClassFile = getResourcePathForTargetClassFile(structuredSelection).replaceFirst(config.directoryPathOfTestSourceCode, config.directoryPathOfProductSourceCode);\n String resourcePathForTestCaseFile = resourcePathForTargetClassFile.replaceFirst(config.directoryPathOfProductSourceCode, config.directoryPathOfTestSourceCode).replaceFirst(\"String_Node_Str\", StringValue.JUnit.TestClassNameSuffix + StringValue.FileExtension.JavaFile);\n String projectName = getProjectName(structuredSelection);\n String projectRootAbsolutePath = getWorkspaceRootAbsolutePath(getIWorkspaceRoot()) + StringValue.DirectorySeparator.General + projectName + StringValue.DirectorySeparator.General;\n if (!resourcePathForTestCaseFile.matches(\"String_Node_Str\" + RegExp.FileExtension.JavaFile)) {\n openWarningForSelectJavaFile(props);\n return;\n }\n String targetClassName = getClassNameFromResourcePathForTargetClassFile(resourcePathForTargetClassFile);\n String testCaseFilename = getTestClassNameFromClassName(targetClassName);\n String msg = props.get(Dialog.Common.confirmToChangeToJUnitVersion3) + \"String_Node_Str\" + testCaseFilename + \"String_Node_Str\";\n if (testCaseFilename == null || !openConfirm(props, msg)) {\n return;\n }\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n ForceJUnitVersion3Command.main(new String[] { projectRootAbsolutePath + resourcePathForTargetClassFile });\n ThreadUtil.sleep(200);\n int retryCount = 0;\n while (true) {\n try {\n if (!ResourceRefreshUtil.refreshLocal(null, projectName + StringValue.DirectorySeparator.General + resourcePathForTestCaseFile + \"String_Node_Str\")) {\n openWarningForResourceRefreshError(props);\n System.err.println(\"String_Node_Str\");\n return;\n }\n retryCount = 0;\n ThreadUtil.sleep(1500);\n } catch (Exception e) {\n retryCount++;\n if (retryCount > 10) {\n break;\n }\n e.printStackTrace();\n ThreadUtil.sleep(1500);\n }\n break;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n}\n"
"public boolean equals(Object object) {\n return object instanceof PairLogoRelativeRectangle && ((PairLogoRelativeRectangle) object).getId() == this.getId();\n}\n"
"public static void setValue(Connection connection, INode node, String repositoryValue) {\n if (connection == null || node == null || repositoryValue == null) {\n return;\n } else if (connection instanceof XmlFileConnection) {\n setXmlFileValue((XmlFileConnection) connection, node, param);\n } else if (connection instanceof DatabaseConnection) {\n setDatabaseValue((DatabaseConnection) connection, node, repositoryValue);\n } else if (connection instanceof EbcdicConnection) {\n setEbcdicValue((EbcdicConnection) connection, node, repositoryValue);\n } else if (connection instanceof DelimitedFileConnection) {\n setDelimitedFileValue((DelimitedFileConnection) connection, node, repositoryValue);\n } else if (connection instanceof LDAPSchemaConnection) {\n setLDAPSchemaValue((LDAPSchemaConnection) connection, node, repositoryValue);\n } else if (connection instanceof WSDLSchemaConnection) {\n setWSDLSchemaValue((WSDLSchemaConnection) connection, node, repositoryValue);\n } else if (connection instanceof LdifFileConnection) {\n setLdifFileValue((LdifFileConnection) connection, node, repositoryValue);\n } else if (connection instanceof RegexpFileConnection) {\n setRegexpFileValue((RegexpFileConnection) connection, node, repositoryValue);\n } else if (connection instanceof PositionalFileConnection) {\n setPositionalFileValue((PositionalFileConnection) connection, node, repositoryValue);\n } else if (connection instanceof FileExcelConnection) {\n setFileExcelValue((FileExcelConnection) connection, node, repositoryValue);\n } else if (connection instanceof SAPConnection) {\n setSAPValue((SAPConnection) connection, node, repositoryValue);\n } else if (connection instanceof SalesforceSchemaConnection) {\n setSalesforceSchema((SalesforceSchemaConnection) connection, node, repositoryValue);\n } else if (connection instanceof MDMConnection) {\n setMDMValue((MDMConnection) connection, node, repositoryValue);\n } else if (connection instanceof BRMSConnection) {\n setBRMSValue((BRMSConnection) connection, node, repositoryValue);\n } else if (connection instanceof HL7Connection) {\n setHL7Value((HL7Connection) connection, node, repositoryValue);\n }\n for (IDragAndDropServiceHandler handler : DragAndDropManager.getHandlers()) {\n if (handler.canHandle(connection)) {\n handler.setComponentValue(connection, node, repositoryValue);\n }\n }\n}\n"
"private void processField(IJstProperty jsPropertyMeta, boolean isProps, boolean isGlobal) {\n IJSSourceElementRequestor.JSFieldInfo fieldInfo = new IJSSourceElementRequestor.JSFieldInfo();\n fieldInfo.name = jsPropertyMeta.getName().getName();\n final IJstType propertyType = jsPropertyMeta.getType();\n if (propertyType != null) {\n String fieldType = null;\n if (propertyType instanceof JstFuncType) {\n fieldType = getFullMethodString(fieldInfo.name, ((JstFuncType) propertyType).getFunction(), jsPropertyMeta.getOwnerType(), false);\n } else {\n fieldType = jsPropertyMeta.getType().getName();\n }\n fieldInfo.m_type = fieldType;\n } else {\n fieldInfo.m_type = \"String_Node_Str\";\n }\n JstSource nameSource = jsPropertyMeta.getName().getSource();\n JstSource source = jsPropertyMeta.getSource();\n fieldInfo.declarationStart = source != null ? source.getStartOffSet() : ZERO_OFFSET;\n JstModifiers jstModifiers = jsPropertyMeta.getModifiers();\n fieldInfo.modifiers = isGlobal ? Modifiers.AccGlobal : Util.getModifiers(jstModifiers);\n if (isProps) {\n fieldInfo.m_initializationSource = getSourceWithoutQuates(jsPropertyMeta.getValue());\n }\n int start = nameSource != null ? nameSource.getStartOffSet() : ZERO_OFFSET;\n int end = getEndOffset(nameSource);\n fieldInfo.nameSourceStart = start;\n fieldInfo.nameSourceEnd = end;\n if (jsPropertyMeta instanceof JstProxyProperty) {\n IJstType actualOwnerType = jsPropertyMeta.getOwnerType();\n String groupName = actualOwnerType.getPackage().getGroupName();\n URI uri = typeSpaceMgr.getTypeToFileMap().get(groupName + \"String_Node_Str\" + actualOwnerType.getName());\n if (uri != null) {\n IFile actualResource = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(uri.toString()));\n if (actualResource.exists())\n fieldInfo.resource = actualResource;\n }\n }\n fRequestor.enterField(fieldInfo);\n if (jsPropertyMeta instanceof JstProperty && jsPropertyMeta.getType() instanceof JstObjectLiteralType && jsPropertyMeta.getType().getRootType().isOType()) {\n List<IJstProperty> properties = jsPropertyMeta.getType().getProperties();\n for (IJstProperty iJstProperty : properties) {\n processField(iJstProperty, false, false);\n }\n }\n fRequestor.exitField(getEndOffset(source));\n}\n"
"public Control createContents(Composite parent) {\n initPropertyBinding();\n int size = bindingName.size();\n Composite composite = new Composite(parent, SWT.NONE);\n composite.setLayout(new GridLayout(3, false));\n GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);\n composite.setLayoutData(gridData);\n Label nameLabel;\n Text propertyText = null;\n for (int i = 0; i < size; i++) {\n nameLabel = new Label(composite, SWT.NONE);\n nameLabel.setText((String) displayName.get(i) + \"String_Node_Str\");\n nameLabelList.add(nameLabel);\n GridData data = new GridData(GridData.FILL_HORIZONTAL);\n if (((String) bindingName.get(i)).equals(QUERYTEXT)) {\n propertyText = new Text(composite, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);\n data.heightHint = 100;\n } else if (((String) bindingName.get(i)).equals(PASSWORD)) {\n propertyText = new Text(composite, SWT.BORDER | SWT.PASSWORD);\n } else\n propertyText = new Text(composite, SWT.BORDER);\n propertyText.setLayoutData(data);\n propertyText.setText((String) bindingValue.get(i) == null ? \"String_Node_Str\" : (String) bindingValue.get(i));\n propertyTextList.add(propertyText);\n buildButton = new Button(composite, SWT.NONE);\n UIUtil.setExpressionButtonImage(buildButton);\n buttonList.add(buildButton);\n }\n addListener();\n if (size <= 0)\n setEmptyPropertyMessages(composite);\n if (ds instanceof OdaDataSourceHandle) {\n OdaDataSourceHandle odsh = (OdaDataSourceHandle) ds;\n Utility.setSystemHelp(composite, IHelpConstants.PREFIX + \"String_Node_Str\" + \"String_Node_Str\" + odsh.getExtensionID().replace('.', '_') + \"String_Node_Str\" + \"String_Node_Str\");\n } else if (ds instanceof OdaDataSetHandle) {\n OdaDataSourceHandle odsh = (OdaDataSourceHandle) (((OdaDataSetHandle) ds).getDataSource());\n Utility.setSystemHelp(composite, IHelpConstants.PREFIX + \"String_Node_Str\" + \"String_Node_Str\" + odsh.getExtensionID().replace('.', '_') + \"String_Node_Str\" + \"String_Node_Str\");\n }\n return composite;\n}\n"
"public void initialise(ConanProcessService conanProcessService, ExecutionContext executionContext) {\n super.initialise(conanProcessService, executionContext);\n this.jobIds.clear();\n this.statsExecutor.initialise(conanProcessService, executionContext);\n}\n"
"public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n ResourceToken other = (ResourceToken) obj;\n if (this.instanceId == null) {\n if (other.instanceId != null) {\n return false;\n }\n } else if (!this.instanceUuid.equals(other.instanceUuid)) {\n return false;\n }\n return true;\n}\n"
"public void perform(GraphRewrite event, EvaluationContext context, ArchiveModel payload) {\n List<FileModel> licenseFiles = findLicense(payload);\n if (licenseFiles.size() == 0) {\n return;\n }\n TechnologyTagService technologyTagService = new TechnologyTagService(event.getGraphContext());\n ClassificationService classificationService = new ClassificationService(event.getGraphContext());\n GraphService<LicenseModel> licenseService = new GraphService<>(event.getGraphContext(), LicenseModel.class);\n for (FileModel license : licenseFiles) {\n LOG.info(\"String_Node_Str\" + license.getFileName() + \"String_Node_Str\" + payload.getArchiveName());\n classificationService.attachClassification(license, \"String_Node_Str\", \"String_Node_Str\");\n try (InputStream stream = license.asInputStream()) {\n String content = IOUtils.toString(stream);\n if (StringUtils.containsIgnoreCase(content, \"String_Node_Str\")) {\n tagLicense(licenseService, technologyTagService, license, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n } else if (StringUtils.containsIgnoreCase(content, \"String_Node_Str\")) {\n tagLicense(licenseService, technologyTagService, license, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n } else if (StringUtils.containsIgnoreCase(content, \"String_Node_Str\")) {\n tagLicense(licenseService, technologyTagService, license, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n } else if (StringUtils.containsIgnoreCase(content, \"String_Node_Str\")) {\n tagLicense(licenseService, technologyTagService, license, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n } else if (StringUtils.containsIgnoreCase(content, \"String_Node_Str\")) {\n tagLicense(licenseService, technologyTagService, license, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n } else if (StringUtils.containsIgnoreCase(content, \"String_Node_Str\")) {\n tagLicense(licenseService, technologyTagService, license, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n } else if (StringUtils.containsIgnoreCase(content, \"String_Node_Str\")) {\n tagLicense(licenseService, technologyTagService, license, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n } else {\n LOG.warning(\"String_Node_Str\" + license.getFileName());\n tagLicense(licenseService, technologyTagService, license, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n }\n } catch (IOException e) {\n }\n }\n}\n"
"public static void create(String json) {\n String body = json != null ? json : params.get(\"String_Node_Str\");\n Logger.debug(\"String_Node_Str\" + body);\n if (body != null) {\n BookingDTO bookingDto;\n try {\n bookingDto = new Gson().fromJson(body, BookingDTO.class);\n validateAndSave(bookingDto.toBooking());\n } catch (JsonParseException e) {\n Logger.error(\"String_Node_Str\", e);\n String messageJson = JsonHelper.jsonExcludeFieldsWithoutExposeAnnotation(new BookingStatusMessage(Http.StatusCode.INTERNAL_ERROR, \"String_Node_Str\", Messages.get(\"String_Node_Str\"), null));\n renderJSON(messageJson);\n }\n }\n}\n"
"public void testBundler() throws Exception {\n Manifest manifest = new Manifest();\n manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, \"String_Node_Str\");\n manifest.getMainAttributes().put(Attributes.Name.MAIN_CLASS, \"String_Node_Str\");\n manifest.getMainAttributes().put(new Attributes.Name(\"String_Node_Str\"), \"String_Node_Str\");\n manifest.getMainAttributes().put(new Attributes.Name(\"String_Node_Str\"), \"String_Node_Str\");\n LocationFactory lf = new LocalLocationFactory();\n ArchiveBundler bundler = new ArchiveBundler(lf.create(\"String_Node_Str\"));\n bundler.clone(lf.create(\"String_Node_Str\"), manifest, new Location[] { lf.create(\"String_Node_Str\") });\n}\n"
"public void shouldBuildGSONObject() {\n final String jsonValue = getJsonSample();\n final Object json = JSon.withHandler(new GSonBuilder()).match(JSon.stream(jsonValue));\n TestCase.assertNotNull(json);\n TestCase.assertEquals(JsonObject.class, json.getClass());\n}\n"
"public boolean onMessage(int source, int path, int target, int flags, Object object) {\n boolean canAdd = true;\n Queue<Object> m = messages.get(target).get(source);\n Integer c = counts.get(target).get(source);\n if (m.size() > sendPendingMax * 4) {\n canAdd = false;\n onMessageAttempts++;\n } else {\n onMessageAttempts = 0;\n m.add(object);\n counts.get(target).put(source, c + 1);\n Integer tc = totalCounts.get(target).get(source);\n totalCounts.get(target).put(source, tc + 1);\n }\n return canAdd;\n}\n"
"protected Injector createFinalInjector(BackendBundle backendBundle) {\n ToroDbRuntimeModule runtimeModule = new ToroDbRuntimeModule(backendBundle, this);\n return bootstrapInjector.createChildInjector(runtimeModule, new MongoDbWpModule(port));\n}\n"
"public IStatus doAction() {\n try {\n IStructuredSelection selection = (IStructuredSelection) page.getTreeViewer().getSelection();\n isConcept = false;\n TreePath tPath = null;\n if (((TreeSelection) selection).getPaths().length > 0)\n tPath = ((TreeSelection) selection).getPaths()[0];\n if (declNew != null)\n decl = declNew;\n else if (selection.getFirstElement() instanceof XSDModelGroup) {\n for (int i = 0; i < tPath.getSegmentCount(); i++) {\n if (tPath.getSegment(i) instanceof XSDElementDeclaration)\n decl = (XSDElementDeclaration) tPath.getSegment(i);\n else if (tPath.getSegment(i) instanceof XSDParticle)\n decl = (XSDElementDeclaration) ((XSDParticle) tPath.getSegment(i)).getTerm();\n }\n checkConcept();\n } else if (selection.getFirstElement() instanceof XSDElementDeclaration || declNew != null) {\n decl = (XSDElementDeclaration) selection.getFirstElement();\n if (declNew != null) {\n decl = declNew;\n }\n checkConcept();\n } else if (selection.getFirstElement() instanceof XSDParticle) {\n decl = (XSDElementDeclaration) ((XSDParticle) selection.getFirstElement()).getContent();\n } else {\n if (selection.getFirstElement() != null) {\n decl = (XSDElementDeclaration) ((XSDParticle) selection.getFirstElement()).getTerm();\n }\n }\n if (showDlg) {\n List<XSDComplexTypeDefinition> types = Util.getComplexTypes(decl.getSchema());\n if (tPath != null)\n for (int i = 0; i < tPath.getSegmentCount(); i++) {\n if (tPath.getSegment(i) instanceof XSDElementDeclaration) {\n XSDTypeDefinition type = (((XSDElementDeclaration) tPath.getSegment(i)).getTypeDefinition());\n if (!type.equals(decl.getTypeDefinition()))\n types.remove(type);\n }\n if (tPath.getSegment(i) instanceof XSDParticle) {\n XSDTypeDefinition type = ((XSDElementDeclaration) (((XSDParticle) tPath.getSegment(i)).getTerm())).getTypeDefinition();\n if (!type.equals(decl.getTypeDefinition()))\n types.remove(type);\n }\n }\n dialog = new ComplexTypeInputDialog(this, page.getSite().getShell(), schema, decl.getTypeDefinition(), types, isXSDModelGroup);\n dialog.setBlockOnOpen(true);\n int ret = dialog.open();\n if (ret == Dialog.CANCEL) {\n return Status.CANCEL_STATUS;\n }\n }\n if (!showDlg && !validateType()) {\n return Status.CANCEL_STATUS;\n }\n XSDFactory factory = XSDSchemaBuildingTools.getXSDFactory();\n boolean anonymous = (typeName == null) || (\"String_Node_Str\".equals(typeName));\n boolean alreadyExists = false;\n XSDComplexTypeDefinition complexType = null;\n XSDParticle subParticle = null;\n XSDParticle groupParticle = null;\n XSDElementDeclaration subElement = null;\n XSDElementDeclaration parent = null;\n if (Util.getParent(decl) instanceof XSDElementDeclaration)\n parent = (XSDElementDeclaration) Util.getParent(decl);\n else if (Util.getParent(decl) instanceof XSDComplexTypeDefinition)\n complexType = (XSDComplexTypeDefinition) Util.getParent(decl);\n if (!anonymous) {\n EList list = schema.getTypeDefinitions();\n String ns = \"String_Node_Str\";\n if (typeName.lastIndexOf(\"String_Node_Str\") != -1) {\n ns = typeName.substring(typeName.lastIndexOf(\"String_Node_Str\") + 3);\n typeName = typeName.substring(0, typeName.lastIndexOf(\"String_Node_Str\"));\n }\n for (Iterator iter = list.iterator(); iter.hasNext(); ) {\n XSDTypeDefinition td = (XSDTypeDefinition) iter.next();\n if ((td.getName().equals(typeName) && (td instanceof XSDComplexTypeDefinition))) {\n alreadyExists = true;\n complexType = (XSDComplexTypeDefinition) td;\n break;\n }\n }\n } else {\n if (parent != null && decl.getTypeDefinition() instanceof XSDComplexTypeDefinition)\n complexType = (XSDComplexTypeDefinition) decl.getTypeDefinition();\n if (complexType != null && complexType.getName() == null) {\n alreadyExists = true;\n }\n if (decl.getTypeDefinition() instanceof XSDSimpleTypeDefinition)\n alreadyExists = false;\n }\n if (complexType != null) {\n XSDParticleImpl partCnt = (XSDParticleImpl) complexType.getContent();\n XSDModelGroupImpl mdlGrp = (XSDModelGroupImpl) partCnt.getTerm();\n if (isChoice)\n mdlGrp.setCompositor(XSDCompositor.CHOICE_LITERAL);\n else if (isAll) {\n mdlGrp.setCompositor(XSDCompositor.ALL_LITERAL);\n } else {\n mdlGrp.setCompositor(XSDCompositor.SEQUENCE_LITERAL);\n }\n if (parent != null)\n parent.updateElement();\n else\n complexType.updateElement();\n }\n if (!alreadyExists) {\n subElement = factory.createXSDElementDeclaration();\n subElement.setName(\"String_Node_Str\");\n subElement.setTypeDefinition(schema.resolveSimpleTypeDefinition(schema.getSchemaForSchemaNamespace(), \"String_Node_Str\"));\n subParticle = factory.createXSDParticle();\n subParticle.setMinOccurs(1);\n subParticle.setMaxOccurs(1);\n subParticle.setContent(subElement);\n subParticle.updateElement();\n XSDModelGroup group = factory.createXSDModelGroup();\n if (isChoice)\n group.setCompositor(XSDCompositor.CHOICE_LITERAL);\n else if (isAll)\n group.setCompositor(XSDCompositor.ALL_LITERAL);\n else\n group.setCompositor(XSDCompositor.SEQUENCE_LITERAL);\n group.getContents().add(0, subParticle);\n group.updateElement();\n complexType = factory.createXSDComplexTypeDefinition();\n if (!anonymous) {\n complexType.setName(typeName);\n schema.getContents().add(complexType);\n }\n complexType.updateElement();\n groupParticle = factory.createXSDParticle();\n groupParticle.setMinOccurs(1);\n groupParticle.setMaxOccurs(1);\n groupParticle.setContent(group);\n groupParticle.updateElement();\n complexType.setContent(groupParticle);\n complexType.updateElement();\n }\n if (anonymous)\n decl.setAnonymousTypeDefinition(complexType);\n else {\n decl.setTypeDefinition(complexType);\n }\n if (isConcept) {\n ArrayList keys = new ArrayList();\n EList list = decl.getIdentityConstraintDefinitions();\n for (Iterator iter = list.iterator(); iter.hasNext(); ) {\n XSDIdentityConstraintDefinition icd = (XSDIdentityConstraintDefinition) iter.next();\n if (icd.getIdentityConstraintCategory().equals(XSDIdentityConstraintCategory.UNIQUE_LITERAL))\n keys.add(icd);\n }\n decl.getIdentityConstraintDefinitions().removeAll(keys);\n XSDElementDeclaration firstDecl = null;\n if (complexType.getContent() instanceof XSDParticle) {\n if (((XSDParticle) complexType.getContent()).getTerm() instanceof XSDModelGroup) {\n XSDModelGroup group = (XSDModelGroup) ((XSDParticle) complexType.getContent()).getTerm();\n EList gpl = group.getContents();\n for (Iterator iter = gpl.iterator(); iter.hasNext(); ) {\n XSDParticle part = (XSDParticle) iter.next();\n if (part.getTerm() instanceof XSDElementDeclaration) {\n firstDecl = (XSDElementDeclaration) part.getTerm();\n break;\n }\n }\n }\n }\n if (firstDecl != null) {\n XSDIdentityConstraintDefinition uniqueKey = factory.createXSDIdentityConstraintDefinition();\n uniqueKey.setIdentityConstraintCategory(XSDIdentityConstraintCategory.UNIQUE_LITERAL);\n uniqueKey.setName(decl.getName());\n XSDXPathDefinition selector = factory.createXSDXPathDefinition();\n selector.setVariety(XSDXPathVariety.SELECTOR_LITERAL);\n selector.setValue(\"String_Node_Str\");\n uniqueKey.setSelector(selector);\n XSDXPathDefinition field = factory.createXSDXPathDefinition();\n field.setVariety(XSDXPathVariety.FIELD_LITERAL);\n field.setValue(firstDecl.getAliasName());\n uniqueKey.getFields().add(field);\n decl.getIdentityConstraintDefinitions().add(uniqueKey);\n }\n }\n decl.updateElement();\n page.refresh();\n declNew = null;\n page.markDirty();\n } catch (Exception e) {\n e.printStackTrace();\n MessageDialog.openError(page.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\" + e.getLocalizedMessage());\n return Status.CANCEL_STATUS;\n }\n return Status.OK_STATUS;\n}\n"
"public void addBody(Body body) throws WingException {\n Division updated = body.addDivision(\"String_Node_Str\", \"String_Node_Str\");\n updated.setHead(T_head);\n updated.addPara(T_para1);\n updated.addPara().addXref(contextPath + \"String_Node_Str\", T_go_home);\n}\n"
"public void testDqDemoComplete() throws Exception {\n Assert.assertTrue(dqResManager instanceof FileResourcesUnityManager);\n Iterator path = dqResManager.getPaths().iterator();\n String firstFilePath = ((Path) path.next()).toPortableString();\n String tempFolderPath = firstFilePath.substring(0, firstFilePath.indexOf(TEMP_FOLDER_SUFFIEX) + TEMP_FOLDER_SUFFIEX.length());\n Assert.assertTrue(new File(tempFolderPath).exists());\n String rootPath = tempFolderPath + File.separator + demoName;\n Assert.assertTrue(new File(rootPath).exists());\n File tempJobsFolder = new File(rootPath + File.separator + processItemPath);\n List<File> demoJobItemFiles = DemoImportTestUtil.collectProjectFilesFromDirectory(tempJobsFolder, FileConstants.ITEM_EXTENSION, true);\n Assert.assertTrue(demoJobItemFiles.size() > 0);\n int currentJobItemsSize = ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.PROCESS).size();\n Assert.assertTrue(currentJobItemsSize > 0);\n Assert.assertEquals(demoJobItemFiles.size(), currentJobItemsSize);\n int currentContextItemsSize = ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.CONTEXT).size();\n Assert.assertTrue(currentContextItemsSize > 0);\n File tempContextItemsFolder = new File(rootPath + File.separator + contextItemPath);\n List<File> demoContextItemsFiles = DemoImportTestUtil.collectProjectFilesFromDirectory(tempContextItemsFolder, FileConstants.ITEM_EXTENSION, true);\n Assert.assertTrue(demoContextItemsFiles.size() > 0);\n Assert.assertEquals(demoContextItemsFiles.size(), currentContextItemsSize);\n int currentConnectionItemsSize = ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.METADATA).size();\n Assert.assertTrue(currentConnectionItemsSize > 0);\n File tempConnItemsFolder = new File(rootPath + File.separator + connectionItemPath);\n List<File> demoConItemsFiles = DemoImportTestUtil.collectProjectFilesFromDirectory(tempConnItemsFolder, FileConstants.ITEM_EXTENSION, true);\n Assert.assertTrue(demoConItemsFiles.size() > 0);\n Assert.assertEquals(demoConItemsFiles.size(), currentConnectionItemsSize);\n int currentRoutineItemsSize = ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.ROUTINES).size();\n Assert.assertTrue(currentRoutineItemsSize > 0);\n int systemRoutineItemsSize = 13;\n File tempRoutineItemsFolder = new File(rootPath + File.separator + routineItemPath);\n List<File> demoRoutineItemsFiles = DemoImportTestUtil.collectProjectFilesFromDirectory(tempRoutineItemsFolder, FileConstants.ITEM_EXTENSION, true);\n Assert.assertTrue(demoRoutineItemsFiles.size() > 0);\n Assert.assertEquals(demoRoutineItemsFiles.size(), currentRoutineItemsSize);\n int currentBusinessItemsSize = ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.BUSINESS_PROCESS).size();\n Assert.assertTrue(currentBusinessItemsSize > 0);\n File tempBusinessItemsFolder = new File(rootPath + File.separator + bussniessProcessPath);\n List<File> demoBusinessItemsFiles = DemoImportTestUtil.collectProjectFilesFromDirectory(tempBusinessItemsFolder, FileConstants.ITEM_EXTENSION, true);\n Assert.assertTrue(demoBusinessItemsFiles.size() > 0);\n Assert.assertEquals(demoBusinessItemsFiles.size(), currentBusinessItemsSize);\n int currentDocItemsSize = ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.DOCUMENTATION).size();\n Assert.assertTrue(currentDocItemsSize > 0);\n File tempDocItemsFolder = new File(rootPath + File.separator + documentionPath);\n List<File> demoDocItemsFiles = DemoImportTestUtil.collectProjectFilesFromDirectory(tempDocItemsFolder, FileConstants.ITEM_EXTENSION, true);\n Assert.assertTrue(demoDocItemsFiles.size() > 0);\n Assert.assertEquals(demoDocItemsFiles.size(), currentDocItemsSize);\n int currentAnaItemsSize = ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.TDQ_ANALYSIS_ELEMENT).size();\n Assert.assertTrue(currentAnaItemsSize > 0);\n File tempAnaItemsFolder = new File(rootPath + File.separator + tdqProfilingAnaPath);\n List<File> demoAnaItemsFiles = DemoImportTestUtil.collectProjectFilesFromDirectory(tempAnaItemsFolder, FileConstants.ANA_EXTENSION, true);\n Assert.assertTrue(demoAnaItemsFiles.size() > 0);\n Assert.assertEquals(demoAnaItemsFiles.size(), currentAnaItemsSize);\n int currentRepItemsSize = ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.TDQ_REPORT_ELEMENT).size();\n Assert.assertTrue(currentRepItemsSize > 0);\n File tempRepItemsFolder = new File(rootPath + File.separator + tdqProfilingRepPath);\n List<File> demoRepItemsFiles = DemoImportTestUtil.collectProjectFilesFromDirectory(tempRepItemsFolder, FileConstants.REP_EXTENSION, true);\n Assert.assertTrue(demoRepItemsFiles.size() > 0);\n Assert.assertEquals(demoRepItemsFiles.size(), currentRepItemsSize);\n int currentRuleSqlItemsSize = ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.TDQ_RULES_SQL).size();\n Assert.assertTrue(currentRuleSqlItemsSize > 0);\n File tempRuleSqlItemsFolder = new File(rootPath + File.separator + tdqLibrariesRuleSqlPath);\n List<File> demoRuleSqlItemsFiles = DemoImportTestUtil.collectProjectFilesFromDirectory(tempRuleSqlItemsFolder, FileConstants.RULE_EXTENSION, true);\n Assert.assertTrue(demoRuleSqlItemsFiles.size() > 0);\n Assert.assertEquals(demoRuleSqlItemsFiles.size(), currentRuleSqlItemsSize);\n int currentPatItemsSize = ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.TDQ_PATTERN_ELEMENT).size();\n Assert.assertTrue(currentPatItemsSize > 0);\n File tempPatItemsFolder = new File(rootPath + File.separator + tdqLibrariesPatternPath);\n List<File> demoPatItemsFiles = DemoImportTestUtil.collectProjectFilesFromDirectory(tempPatItemsFolder, FileConstants.PAT_EXTENSION, true);\n Assert.assertTrue(demoPatItemsFiles.size() > 0);\n Assert.assertEquals(demoPatItemsFiles.size(), currentPatItemsSize);\n}\n"
"private void populateSortedFactRows(StopSign stopSign) throws IOException, DataException {\n prepareSortedStacks();\n int measureCount = dataSet4Aggregation.getMetaInfo().getMeasureInfos().length;\n int factRowCount = 0;\n try {\n while (dataSet4Aggregation.next() && !stopSign.isStopped()) {\n for (int i = 0; i < allSortedFactRows.size(); i++) {\n int[] levelIndex = diskSortedStackWrapper[i].levelIndex;\n if (!dataSet4Aggregation.isDuplicatedRow()) {\n Member[] members = getLevelMembers(levelIndex);\n if (aggregationRow[i] != null) {\n Row4Aggregation popRow = this.mergeRow4Aggregations[i].push(aggregationRow[i]);\n if (popRow != null)\n diskSortedStackWrapper[i].diskSortedStack.push(popRow);\n }\n aggregationRow[i] = new Row4Aggregation();\n aggregationRow[i].setDimPos(dataSet4Aggregation.getDimensionPosition());\n aggregationRow[i].setLevelMembers(members);\n if (aggregationRow[i].getLevelMembers() == null) {\n continue;\n }\n aggregationRow[i].setMeasures(new Object[measureCount]);\n for (int j = 0; j < measureCount; j++) {\n aggregationRow[i].getMeasures()[j] = dataSet4Aggregation.getMeasureValue(j);\n }\n aggregationRow[i].setParameterValues(getParameterValues());\n } else {\n Object[] measures = new Object[measureCount];\n for (int j = 0; j < measureCount; j++) {\n measures[j] = dataSet4Aggregation.getMeasureValue(j);\n }\n aggregationRow[i].addMeasure(measures);\n }\n aggregationRow.setMeasures(new Object[measureCount]);\n for (int j = 0; j < measureCount; j++) {\n aggregationRow.getMeasures()[j] = dataSet4Aggregation.getMeasureValue(j);\n }\n aggregationRow.setParameterValues(getParameterValues());\n diskSortedStackWrapper.diskSortedStack.push(aggregationRow);\n }\n factRowCount++;\n if (maxDataObjectRows > 0 && factRowCount > maxDataObjectRows)\n throw new DataException(ResourceConstants.EXCEED_MAX_DATA_OBJECT_ROWS);\n }\n } catch (BirtException e) {\n throw DataException.wrap(e);\n }\n}\n"
"protected boolean initialize(Vec2i screenSize) {\n this.sm = new SaveManager(\"String_Node_Str\");\n this.lg = new BSPLevelGenerator(configDir);\n RogueGame rg = null;\n try {\n Game g = sm.loadGame();\n if (g instanceof RogueGame)\n rg = (RogueGame) g;\n tm = new CumulativeTurnManager(this, rg, POINTS_PER_TURN);\n this.layers.push(new MainLayer(this, rg, SCREEN_SIZE, \"String_Node_Str\"));\n return true;\n } catch (Exception e) {\n rg = this.makeNewGame();\n this.layers.push(new MainLayer(this, rg, SCREEN_SIZE, \"String_Node_Str\"));\n return true;\n }\n}\n"
"protected final boolean isCurrentlyMatchingNone() {\n return currentMatcher == Matchers.falseMatcher();\n}\n"
"public void showLandInfo(CommandSender sender, String... args) {\n Messaging mess = new Messaging(sender);\n if (args.length == 0) {\n showHelp(sender, \"String_Node_Str\");\n } else {\n Integer id = 0;\n if (args[0].equalsIgnoreCase(\"String_Node_Str\")) {\n if (sender instanceof Player) {\n id = iCoLand.landMgr.getLandId(((Player) sender).getLocation());\n if (id > 0) {\n showSelectLandInfo((CommandSender) sender, id);\n } else {\n mess.send(\"String_Node_Str\");\n }\n } else {\n mess.send(\"String_Node_Str\");\n }\n } else {\n try {\n id = Integer.parseInt(args[0]);\n } catch (NumberFormatException e) {\n id = 0;\n }\n if (id > 0) {\n if (iCoLand.landMgr.landIdExists(id)) {\n showSelectLandInfo((CommandSender) sender, id);\n } else {\n mess.send(\"String_Node_Str\" + id + \"String_Node_Str\");\n }\n } else {\n if (sender instanceof Player)\n showLandInfo((Player) sender, args);\n else\n showHelp(sender, \"String_Node_Str\");\n }\n }\n }\n}\n"
"public final boolean isGlobalThisType() {\n return areIdentical(this, registry.getNativeType(JSTypeNative.GLOBAL_THIS));\n}\n"
"private boolean processPdf417() {\n int i, j, blockCount, loop, offset;\n int[] mccorrection = new int[520];\n int total;\n int c1, c2, c3;\n int[] dummy = new int[35];\n String codebarre;\n int length = inputData.length;\n EncodingMode currentEncodingMode;\n int selectedECCLevel;\n String bin;\n blockIndex = 0;\n blockCount = 0;\n currentEncodingMode = chooseMode(inputData[blockCount]);\n for (i = 0; i < 1000; i++) {\n blockLength[i] = 0;\n }\n do {\n blockType[blockIndex] = currentEncodingMode;\n while ((blockType[blockIndex] == currentEncodingMode) && (blockCount < length)) {\n blockLength[blockIndex]++;\n blockCount++;\n if (blockCount < length) {\n currentEncodingMode = chooseMode(inputData[blockCount]);\n }\n }\n blockIndex++;\n } while (blockCount < length);\n for (i = 0; i < blockIndex; i++) {\n if ((blockType[i] == EncodingMode.NUM) && (blockLength[i] > 44)) {\n for (j = blockIndex + 1; j > (i + 1); j--) {\n blockType[j] = blockType[j - 1];\n blockLength[j] = blockLength[j - 1];\n }\n blockType[i + 1] = blockType[i];\n blockLength[i + 1] = blockLength[i] - 44;\n blockLength[i] = 44;\n blockIndex++;\n }\n }\n pdfSmooth();\n blockCount = 0;\n codeWordCount = 0;\n if (readerInit) {\n codeWords[codeWordCount] = 921;\n codeWordCount++;\n }\n if (eciMode != 3) {\n if (eciMode <= 899) {\n codeWords[codeWordCount] = 927;\n codeWordCount++;\n codeWords[codeWordCount] = eciMode;\n codeWordCount++;\n }\n if ((eciMode >= 900) && (eciMode <= 810899)) {\n codeWords[codeWordCount] = 926;\n codeWordCount++;\n codeWords[codeWordCount] = (eciMode / 900) - 1;\n codeWordCount++;\n codeWords[codeWordCount] = eciMode % 900;\n codeWordCount++;\n }\n if ((eciMode >= 810900) && (eciMode <= 811799)) {\n codeWords[codeWordCount] = 925;\n codeWordCount++;\n codeWords[codeWordCount] = eciMode - 810900;\n codeWordCount++;\n }\n }\n for (i = 0; i < blockIndex; i++) {\n switch(blockType[i]) {\n case TEX:\n boolean firstBlock = (i == 0);\n processText(blockCount, blockLength[i], firstBlock);\n break;\n case BYT:\n EncodingMode lastMode = (i == 0 ? EncodingMode.TEX : blockType[i - 1]);\n processBytes(blockCount, blockLength[i], lastMode);\n break;\n case NUM:\n processNumbers(blockCount, blockLength[i]);\n break;\n default:\n throw new OkapiException(\"String_Node_Str\" + blockType[i]);\n }\n blockCount = blockCount + blockLength[i];\n }\n encodeInfo += \"String_Node_Str\";\n for (i = 0; i < codeWordCount; i++) {\n encodeInfo += Integer.toString(codeWords[i]) + \"String_Node_Str\";\n }\n encodeInfo += \"String_Node_Str\";\n selectedECCLevel = preferredEccLevel;\n if (selectedECCLevel < 0) {\n selectedECCLevel = 6;\n if (codeWordCount <= 863) {\n selectedECCLevel = 5;\n }\n if (codeWordCount <= 320) {\n selectedECCLevel = 4;\n }\n if (codeWordCount <= 160) {\n selectedECCLevel = 3;\n }\n if (codeWordCount <= 40) {\n selectedECCLevel = 2;\n }\n }\n int k = 1 << (selectedECCLevel + 1);\n int dataCodeWordCount = codeWordCount + k + 1;\n if (!validateRows(3, 90) || !validateColumns(1, 30)) {\n return false;\n }\n if (columns != null) {\n if (rows != null) {\n if (columns * rows < dataCodeWordCount) {\n error_msg = \"String_Node_Str\" + rows + \"String_Node_Str\" + columns + \"String_Node_Str\" + dataCodeWordCount + \"String_Node_Str\";\n return false;\n }\n } else {\n rows = (int) Math.ceil(dataCodeWordCount / (double) columns);\n }\n } else {\n if (rows != null) {\n columns = (int) Math.ceil(dataCodeWordCount / (double) rows);\n } else {\n columns = (int) (0.5 + Math.sqrt((dataCodeWordCount - 1) / 3.0));\n rows = (int) Math.ceil(dataCodeWordCount / (double) columns);\n }\n }\n if (!validateRows(3, 90) || !validateColumns(1, 30)) {\n return false;\n }\n int paddingCount = (columns * rows) - codeWordCount - k - 1;\n while (paddingCount > 0) {\n codeWords[codeWordCount] = 900;\n codeWordCount++;\n paddingCount--;\n }\n for (i = codeWordCount; i > 0; i--) {\n codeWords[i] = codeWords[i - 1];\n }\n codeWordCount++;\n codeWords[0] = codeWordCount;\n switch(selectedECCLevel) {\n case 1:\n offset = 2;\n break;\n case 2:\n offset = 6;\n break;\n case 3:\n offset = 14;\n break;\n case 4:\n offset = 30;\n break;\n case 5:\n offset = 62;\n break;\n case 6:\n offset = 126;\n break;\n case 7:\n offset = 254;\n break;\n case 8:\n offset = 510;\n break;\n default:\n offset = 0;\n break;\n }\n for (loop = 0; loop < 520; loop++) {\n mccorrection[loop] = 0;\n }\n for (i = 0; i < codeWordCount; i++) {\n total = (codeWords[i] + mccorrection[k - 1]) % 929;\n for (j = k - 1; j > 0; j--) {\n mccorrection[j] = (mccorrection[j - 1] + 929 - (total * COEFRS[offset + j]) % 929) % 929;\n }\n mccorrection[0] = (929 - (total * COEFRS[offset + j]) % 929) % 929;\n }\n encodeInfo += \"String_Node_Str\" + codeWordCount + \"String_Node_Str\";\n encodeInfo += \"String_Node_Str\" + k + \"String_Node_Str\";\n for (i = k - 1; i >= 0; i--) {\n codeWords[codeWordCount++] = mccorrection[i] != 0 ? 929 - mccorrection[i] : 0;\n }\n if (codeWordCount > 929) {\n error_msg = \"String_Node_Str\" + codeWordCount + \"String_Node_Str\";\n return false;\n }\n c1 = (rows - 1) / 3;\n c2 = (selectedECCLevel * 3) + (rows - 1) % 3;\n c3 = columns - 1;\n readable = \"String_Node_Str\";\n row_count = rows;\n pattern = new String[rows];\n row_height = new int[rows];\n encodeInfo += \"String_Node_Str\" + columns + \"String_Node_Str\" + rows + \"String_Node_Str\";\n for (i = 0; i < rows; i++) {\n for (j = 0; j < columns; j++) {\n dummy[j + 1] = codeWords[i * columns + j];\n }\n k = (i / 3) * 30;\n switch(i % 3) {\n case 0:\n offset = 0;\n dummy[0] = k + c1;\n dummy[columns + 1] = k + c3;\n break;\n case 1:\n offset = 929;\n dummy[0] = k + c2;\n dummy[columns + 1] = k + c1;\n break;\n case 2:\n offset = 1858;\n dummy[0] = k + c3;\n dummy[columns + 1] = k + c2;\n break;\n }\n codebarre = \"String_Node_Str\";\n for (j = 0; j <= columns + 1; j++) {\n if (!(symbolMode == Mode.TRUNCATED && j > columns)) {\n codebarre += CODAGEMC[offset + dummy[j]];\n codebarre += \"String_Node_Str\";\n }\n }\n if (symbolMode != Mode.TRUNCATED) {\n codebarre += \"String_Node_Str\";\n }\n bin = \"String_Node_Str\";\n for (j = 0; j < codebarre.length(); j++) {\n bin += PDF_TTF[positionOf(codebarre.charAt(j), BR_SET)];\n }\n pattern[i] = bin2pat(bin);\n row_height[i] = default_height;\n }\n return true;\n}\n"
"protected static void newPerk() {\n BlockPerk perk = new BlockPerk();\n perks.add(perk);\n updatePerkList();\n}\n"
"public List<CsdlAliasInfo> getAliasInfos() throws ODataException {\n return Arrays.asList(new CsdlAliasInfo().setAlias(SchemaProvider.NAMESPACE_ALIAS).setNamespace(SchemaProvider.NAMESPACE), new CsdlAliasInfo().setAlias(\"String_Node_Str\").setNamespace(TermProvider.CORE_VOCABULARY_NAMESPACE));\n}\n"
"public static boolean isSybase(java.sql.Connection connection) throws SQLException {\n DatabaseMetaData connectionMetadata = connection.getMetaData();\n if (connectionMetadata.getDriverName() != null && connectionMetadata.getDatabaseProductName() != null) {\n for (String keyString : getSybaseDBProductsName()) {\n if (keyString.equals(connectionMetadata.getDatabaseProductName().trim())) {\n return true;\n }\n }\n }\n return result;\n}\n"
"private void showAlbumDetails(Album album) {\n CoordinatorLayout mainLayout = (CoordinatorLayout) artistDetailsActivity.findViewById(R.id.detail_content);\n LayoutInflater inflater = LayoutInflater.from(artistDetailsActivity);\n View albumDetails = inflater.inflate(R.layout.album_popup_info, null);\n TextView tracks = albumDetails.findViewById(R.id.album_popup_tracks);\n TextView title = albumDetails.findViewById(R.id.album_popup_title);\n ImageView cover = albumDetails.findViewById(R.id.album_popup_thumbnail);\n StringBuilder sb = new StringBuilder();\n for (Track track : album.getTracks().getTrack()) {\n long millis = Long.parseLong(track.getDuration());\n String duration = String.format(\"String_Node_Str\", TimeUnit.SECONDS.toMinutes(millis), TimeUnit.SECONDS.toSeconds(millis) - TimeUnit.MINUTES.toSeconds(TimeUnit.SECONDS.toMinutes(millis)));\n sb.append(String.format(\"String_Node_Str\", track.getName(), duration));\n }\n tracks.setText(sb.toString());\n title.setText(album.getName());\n Glide.with(artistDetailsActivity).load(album.getImage().get(Constants.IMAGE_LARGE).getText()).into(cover);\n int width = LinearLayout.LayoutParams.WRAP_CONTENT;\n int height = LinearLayout.LayoutParams.WRAP_CONTENT;\n boolean focusable = true;\n final PopupWindow popupWindow = new PopupWindow(albumDetails, width, height, focusable);\n popupWindow.setAnimationStyle(android.R.style.Animation_Dialog);\n popupWindow.showAtLocation(mainLayout, Gravity.CENTER, 0, 0);\n albumDetails.setOnTouchListener(new View.OnTouchListener() {\n public boolean onTouch(View view, MotionEvent motionEvent) {\n popupWindow.dismiss();\n return true;\n }\n });\n}\n"
"public void editorToolChanged(EditorTools tools) {\n missionRender.selection.clearSelection();\n setupTool(tools);\n}\n"
"protected String _generateFireCode() throws IllegalActionException {\n super._generateFireCode();\n ptolemy.actor.lib.AddSubtract actor = (ptolemy.actor.lib.AddSubtract) getComponent();\n String outputType = getCodeGenerator().codeGenType(actor.output.getType());\n String plusType = getCodeGenerator().codeGenType(actor.plus.getType());\n String minusType = getCodeGenerator().codeGenType(actor.minus.getType());\n boolean minusOnly = !actor.plus.isOutsideConnected();\n ArrayList<String> args = new ArrayList<String>();\n CodeStream codeStream = _templateParser.getCodeStream();\n codeStream.appendCodeBlock(\"String_Node_Str\");\n args.add(\"String_Node_Str\");\n args.add(outputType);\n args.add(plusType);\n for (int i = 0; i < actor.plus.getWidth(); i++) {\n args.set(0, Integer.valueOf(i).toString());\n codeStream.appendCodeBlock(\"String_Node_Str\", args);\n }\n for (int i = minusOnly ? 1 : 0; i < actor.minus.getWidth(); i++) {\n args.set(0, Integer.valueOf(i).toString());\n args.set(2, minusType);\n codeStream.appendCodeBlock(\"String_Node_Str\", args);\n }\n if (actor.output.isOutsideConnected() && actor.output.numberOfSinks() > 0) {\n codeStream.appendCodeBlock(\"String_Node_Str\");\n }\n return processCode(codeStream.toString());\n}\n"
"public void testPointcuts() {\n IProgramElement node = model.getRoot();\n assertNotNull(node);\n IProgramElement aspect = AsmManager.getDefault().getHierarchy().findElementForType(null, \"String_Node_Str\");\n assertNotNull(aspect);\n String ptct = \"String_Node_Str\";\n IProgramElement ptctNode = model.findElementForSignature(aspect, IProgramElement.Kind.POINTCUT, ptct);\n assertNotNull(ptctNode);\n assertEquals(ptctNode.toLabelString(), ptct);\n String params = \"String_Node_Str\";\n IProgramElement paramsNode = model.findElementForSignature(aspect, IProgramElement.Kind.POINTCUT, params);\n assertNotNull(paramsNode);\n assertEquals(paramsNode.toLabelString(), params);\n}\n"
"public int readInt() throws IOException {\n int v = 0;\n v |= (read() << 24);\n v |= (read() << 16);\n v |= (read() << 8);\n v |= (read());\n return v;\n}\n"
"private Report executeOnRepresentation(IndexService index, ModelService model, StorageService storage, List<Representation> list, IndexedPreservationAgent agent) throws PluginException {\n List<String> newRepresentations = new ArrayList<String>();\n String aipId = null;\n for (Representation representation : list) {\n List<File> unchangedFiles = new ArrayList<File>();\n String newRepresentationID = UUID.randomUUID().toString();\n List<File> alteredFiles = new ArrayList<File>();\n List<File> newFiles = new ArrayList<File>();\n aipId = representation.getAipId();\n int state = 1;\n boolean notify = true;\n try {\n LOGGER.debug(\"String_Node_Str\" + representation);\n ClosableIterable<File> allFiles = model.listAllFiles(aipId, representation.getId());\n for (File file : allFiles) {\n logger.debug(\"String_Node_Str\" + file);\n if (!file.isDirectory()) {\n IndexedFile ifile = index.retrieve(IndexedFile.class, IdUtils.getFileId(file));\n String fileMimetype = ifile.getFileFormat().getMimeType();\n String filePronom = ifile.getFileFormat().getPronom();\n String fileFormat = ifile.getId().substring(ifile.getId().lastIndexOf('.') + 1);\n if (((!inputFormat.isEmpty() && fileFormat.equalsIgnoreCase(inputFormat)) || (inputFormat.isEmpty())) && (applicableTo.size() == 0 || (filePronom != null && pronomToExtension.containsKey(filePronom)) || (fileMimetype != null && mimetypeToExtension.containsKey(fileMimetype)) || (applicableTo.contains(fileFormat))) && ifile.getSize() < (maxKbytes * 1024)) {\n if (applicableTo.size() > 0) {\n if (filePronom != null && !filePronom.isEmpty() && !pronomToExtension.get(filePronom).contains(fileFormat)) {\n fileFormat = pronomToExtension.get(filePronom).get(0);\n } else if (fileMimetype != null && !fileMimetype.isEmpty() && !mimetypeToExtension.get(fileMimetype).contains(fileFormat)) {\n fileFormat = mimetypeToExtension.get(fileMimetype).get(0);\n }\n }\n StoragePath fileStoragePath = ModelUtils.getFileStoragePath(file);\n DirectResourceAccess directAccess = storage.getDirectAccess(fileStoragePath);\n logger.debug(\"String_Node_Str\" + fileFormat + \"String_Node_Str\" + outputFormat + \"String_Node_Str\" + file.getId());\n Path pluginResult = executePlugin(directAccess.getPath(), fileFormat);\n if (pluginResult != null) {\n ContentPayload payload = new FSPathContentPayload(pluginResult);\n StoragePath storagePath = ModelUtils.getRepresentationPath(aipId, representation.getId());\n if (!newRepresentations.contains(newRepresentationID)) {\n logger.debug(\"String_Node_Str\" + newRepresentationID + \"String_Node_Str\" + aipId);\n boolean original = false;\n newRepresentations.add(newRepresentationID);\n model.createRepresentation(aipId, newRepresentationID, original, notify);\n StoragePath storagePreservationPath = ModelUtils.getAIPRepresentationPreservationPath(aipId, newRepresentationID);\n model.getStorage().createDirectory(storagePreservationPath);\n }\n String newFileId = file.getId().replaceFirst(\"String_Node_Str\", \"String_Node_Str\" + outputFormat);\n File f = model.createFile(aipId, newRepresentationID, file.getPath(), newFileId, payload, notify);\n alteredFiles.add(file);\n newFiles.add(f);\n IOUtils.closeQuietly(directAccess);\n } else {\n logger.debug(\"String_Node_Str\" + fileFormat + \"String_Node_Str\" + outputFormat + \"String_Node_Str\" + file.getId() + \"String_Node_Str\" + representation.getId() + \"String_Node_Str\" + aipId);\n state = 2;\n }\n } else {\n unchangedFiles.add(file);\n }\n }\n }\n IOUtils.closeQuietly(allFiles);\n if (alteredFiles.size() > 0) {\n for (File f : unchangedFiles) {\n StoragePath fileStoragePath = ModelUtils.getFileStoragePath(f);\n Binary binary = storage.getBinary(fileStoragePath);\n Path uriPath = Paths.get(binary.getContent().getURI());\n ContentPayload payload = new FSPathContentPayload(uriPath);\n model.createFile(f.getAipId(), newRepresentationID, f.getPath(), f.getId(), payload, notify);\n }\n if (!representation.isOriginal()) {\n model.deleteRepresentation(aipId, representation.getId());\n }\n boolean notifyReindex = false;\n AbstractConvertPluginUtils.reIndexingRepresentation(index, model, storage, aipId, newRepresentationID, notifyReindex);\n logger.debug(\"String_Node_Str\" + representation.getId());\n boolean notifyEvent = false;\n createEvent(alteredFiles, newFiles, model.retrieveAIP(aipId), newRepresentationID, model, state, agent, notifyEvent);\n }\n } catch (Throwable e) {\n logger.error(\"String_Node_Str\" + representation.getId() + \"String_Node_Str\" + e.getMessage(), e);\n state = 0;\n }\n }\n try {\n model.notifyAIPUpdated(aipId);\n } catch (RODAException e) {\n logger.error(\"String_Node_Str\", e);\n }\n return new Report();\n}\n"
"public static EdgeGroup getPreviousGroup(List groups, int currentDimensionIndex, int currentLevelIndex) {\n int currentGroup = -1;\n for (int i = 0; i < groups.size(); i++) {\n EdgeGroup gp = groups.get(i);\n if (gp.dimensionIndex == currentDimensionIndex && gp.levelIndex == currentLevelIndex) {\n currentGroup = i;\n break;\n }\n }\n if (currentGroup > 0 && currentGroup < groups.size()) {\n return (EdgeGroup) groups.get(currentGroup - 1);\n }\n return null;\n}\n"
"private void hideSmileLayout() {\n hideView(smilesLayout);\n prepareChatEditText(true);\n}\n"
"private double getJitterMs(StreamDirection streamDirection) {\n return rtpTimeToMs(jitterRTPTimestampUnits[streamDirection.ordinal()]);\n}\n"
"private void saveExternalFile(FtpFileEditorInput input, IDocument doc) throws IOException {\n BufferedOutputStream contentStream = null;\n FTPConnection connection = new FTPConnection();\n connection.saveFile(doc.get().getBytes(), input.getPath(input).toString());\n}\n"
"public int getTargetProgress() throws InvalidContentException {\n return 1;\n}\n"
"public boolean isValid() {\n try {\n Calendar cal = Calendar.getInstance();\n cal.setTime(new Date());\n cal.add(Calendar.MINUTE, -10);\n long leastTenMinutes = cal.getTimeInMillis();\n long signalFlareDate = PreyConfig.getPreyConfig(ctx).getSignalFlareDate();\n PreyLogger.d(\"String_Node_Str\" + signalFlareDate + \"String_Node_Str\" + sdf.format(new Date(signalFlareDate)));\n PreyLogger.d(\"String_Node_Str\" + leastTenMinutes + \"String_Node_Str\" + sdf.format(new Date(leastTenMinutes)));\n if (signalFlareDate == 0 || leastTenMinutes > signalFlareDate) {\n long now = new Date().getTime();\n PreyConfig.getPreyConfig(ctx).setSignalFlareDate(now);\n return true;\n }\n return false;\n } catch (Exception e) {\n return false;\n }\n return false;\n}\n"
"public void execute(OperationRequest operation, OperationContext context, ParticipantId participant) throws InvalidRequestException {\n String capabilitiesHash = OperationUtil.getRequiredParameter(operation, ParamsProperty.CAPABILITIES_HASH);\n ParticipantId robotAccountId = participant;\n AccountData account;\n try {\n account = accountStore.getAccount(robotAccountId);\n } catch (PersistenceException e) {\n LOG.severe(\"String_Node_Str\" + robotAccountId, e);\n context.constructErrorResponse(operation, \"String_Node_Str\");\n return;\n }\n if (account == null || !account.isRobot()) {\n throw new InvalidRequestException(\"String_Node_Str\" + robotAccountId);\n }\n RobotAccountData robotAccountData = account.asRobot();\n RobotCapabilities capabilities = robotAccountData.getCapabilities();\n if (capabilities != null && capabilitiesHash.equals(capabilities.getCapabilitiesHash())) {\n context.constructResponse(operation, Maps.<ParamsProperty, Object>newHashMap());\n return;\n }\n try {\n robotAccountData = connector.fetchCapabilities(robotAccountData, \"String_Node_Str\");\n } catch (CapabilityFetchException e) {\n LOG.fine(\"String_Node_Str\" + account.getId(), e);\n context.constructErrorResponse(operation, \"String_Node_Str\");\n return;\n }\n try {\n accountStore.putAccount(robotAccountData);\n } catch (PersistenceException e) {\n LOG.severe(\"String_Node_Str\" + robotAccountId, e);\n context.constructErrorResponse(operation, \"String_Node_Str\");\n return;\n }\n context.constructResponse(operation, Maps.<ParamsProperty, Object>newHashMap());\n}\n"
"public boolean onActivated(EntityPlayer entityPlayer) {\n if (!this.worldObj.isRemote)\n entityPlayer.openGui(ICBMExplosion.instance, 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);\n return true;\n}\n"
"public void addData(byte[] data, int offset, int len) {\n if ((skipped + available + len) > databuf.length) {\n int desiredSize = ByteQueue.nextTwoPow(available + len);\n if (desiredSize > databuf.length) {\n byte[] tmp = new byte[desiredSize];\n System.arraycopy(databuf, skipped, tmp, 0, available);\n databuf = tmp;\n } else {\n System.arraycopy(databuf, skipped, databuf, 0, available);\n }\n skipped = 0;\n databuf = tmp;\n }\n System.arraycopy(data, offset, databuf, skipped + available, len);\n available += len;\n}\n"
"private void CompiledExprFromTree(String expression, Context context, ScriptOrFnNode tree, List columnExprList) throws BirtException {\n if (tree.getFirstChild() == tree.getLastChild()) {\n if (tree.getFirstChild().getType() == Token.FUNCTION) {\n int index = getFunctionIndex(tree.getFirstChild().getString(), tree);\n compileFunctionNode(tree.getFunctionNode(index), tree, columnExprList);\n } else {\n if (tree.getFirstChild().getType() != Token.EXPR_RESULT && tree.getFirstChild().getType() != Token.EXPR_VOID && tree.getFirstChild().getType() != Token.BLOCK && tree.getFirstChild().getType() != Token.SCRIPT) {\n throw new CoreException(pluginId, ResourceConstants.INVALID_EXPRESSION);\n }\n Node exprNode = tree.getFirstChild();\n processChild(exprNode, tree, columnExprList);\n }\n } else {\n compileComplexExpr(tree, tree, columnExprList);\n }\n}\n"
"public void removeGroup(ContactGroupMsnImpl groupToRemove) {\n if (groupToRemove.getSourceGroup().getGroupId().equals(\"String_Node_Str\"))\n return;\n logger.trace(\"String_Node_Str\" + groupToRemove);\n MsnContact[] contacts = groupToRemove.getSourceGroup().getContacts();\n ModListenerRemoveGroup removedContactsListener = new ModListenerRemoveGroup(contacts.length);\n contactListModManager.addModificationListener(removedContactsListener);\n for (int i = 0; i < contacts.length; i++) {\n logger.trace(\"String_Node_Str\" + contacts[i]);\n msnProvider.getMessenger().removeFriend(contacts[i].getEmail(), groupToRemove.getSourceGroup().getGroupId());\n }\n removedContactsListener.waitForLastEvent(contacts.length * 1000);\n contactListModManager.removeModificationListener(removedContactsListener);\n msnProvider.getMessenger().removeGroup(groupToRemove.getSourceGroup().getGroupId());\n}\n"
"public void startImage(IImageContent image) {\n IStyle style = image.getComputedStyle();\n InlineFlag inlineFlag = getInlineFlag(style);\n String uri = image.getURI();\n String mimeType = image.getMIMEType();\n String extension = image.getExtension();\n String altText = image.getAltText();\n double height = WordUtil.convertImageSize(image.getHeight(), 0, reportDpi);\n int parentWidth = (int) (WordUtil.twipToPt(context.getCurrentWidth()) * reportDpi / 72);\n double width = WordUtil.convertImageSize(image.getWidth(), parentWidth, reportDpi);\n context.addContainer(false);\n if (FlashFile.isFlash(mimeType, uri, extension)) {\n if (altText == null) {\n altText = messageFlashObjectNotSupported;\n }\n wordWriter.drawImage(null, height, width, null, style, inlineFlag, altText, uri);\n return;\n }\n try {\n Image imageInfo = EmitterUtil.parseImage(image, image.getImageSource(), uri, mimeType, extension);\n byte[] data = imageInfo.getData();\n if (data == null || data.length == 0) {\n wordWriter.drawImage(null, 0.0, 0.0, null, style, inlineFlag, altText, uri);\n return;\n }\n int imageFileWidthDpi = imageInfo.getPhysicalWidthDpi() == -1 ? 0 : imageInfo.getPhysicalWidthDpi();\n int imageFileHeightDpi = imageInfo.getPhysicalHeightDpi() == -1 ? 0 : imageInfo.getPhysicalHeightDpi();\n if (image.getHeight() == null) {\n height = WordUtil.convertImageSize(image.getHeight(), imageInfo.getHeight(), PropertyUtil.getImageDpi(image, imageFileHeightDpi, 0));\n }\n if (image.getWidth() == null) {\n width = WordUtil.convertImageSize(image.getWidth(), imageInfo.getWidth(), PropertyUtil.getImageDpi(image, imageFileWidthDpi, 0));\n }\n writeBookmark(image);\n writeToc(image);\n HyperlinkInfo hyper = getHyperlink(image);\n wordWriter.drawImage(data, height, width, hyper, style, inlineFlag, altText, uri);\n } catch (IOException e) {\n logger.log(Level.WARNING, e.getLocalizedMessage());\n wordWriter.drawImage(null, height, width, null, style, inlineFlag, altText, uri);\n }\n}\n"
"public static String getCanonicalText(Element root) {\n StringBuffer buffer = new StringBuffer();\n List frag = OSISUtil.getFragment(root);\n Iterator dit = frag.iterator();\n String sID = null;\n Object data = null;\n Element ele = null;\n while (dit.hasNext()) {\n data = dit.next();\n if (data instanceof Element) {\n ele = (Element) data;\n if (!isCanonical(ele)) {\n continue;\n }\n if (ele.getName().equals(OSISUtil.OSIS_ELEMENT_VERSE)) {\n sID = ele.getAttributeValue(OSISUtil.OSIS_ATTR_SID);\n }\n if (sID != null) {\n getCanonicalContent(ele, sID, dit, buffer);\n } else {\n getCanonicalContent(ele, null, ele.getContent().iterator(), buffer);\n }\n } else if (data instanceof Text) {\n int lastIndex = buffer.length() - 1;\n String text = ((Text) data).getText();\n if (lastIndex >= 0 && !Character.isWhitespace(buffer.charAt(lastIndex)) && !Character.isWhitespace(text.charAt(0))) {\n buffer.append(' ');\n }\n buffer.append(text);\n }\n }\n return buffer.toString().trim();\n}\n"
"private void writeReport(DataOutputStream dos, Report design) throws IOException {\n IOUtil.writeShort(dos, (short) 9);\n IOUtil.writeShort(dos, FIELD_REPORT_VERSION);\n IOUtil.writeString(dos, design.getVersion());\n IOUtil.writeShort(dos, FIELD_REPORT_LOCALE);\n IOUtil.writeString(dos, design.getLocale());\n IOUtil.writeShort(dos, FIELD_REPORT_STYLES);\n writeReportStyles(dos, design);\n IOUtil.writeShort(dos, FIELD_REPORT_USER_PROPERTIES);\n writeExprMap(dos, design.getUserProperties());\n IOUtil.writeShort(dos, FIELD_REPORT_VARIABLE);\n writeReportVariable(dos, design);\n IOUtil.writeShort(dos, FIELD_ON_PAGE_START);\n Expression onPageStart = design.getOnPageStart();\n writeExpression(dos, onPageStart);\n IOUtil.writeShort(dos, FIELD_ON_PAGE_END);\n Expression onPageEnd = design.getOnPageEnd();\n writeExpression(dos, onPageEnd);\n IOUtil.writeShort(dos, FIELD_REPORT_MASTER_PAGES);\n ReportItemWriter writer = new ReportItemWriter(dos);\n writeReportPageSetup(dos, writer, design);\n IOUtil.writeShort(dos, FIELD_REPORT_BODY);\n writeReportBodyContent(dos, writer, design);\n}\n"
"public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) {\n Integer serverPort = event.getEnvironment().getProperty(\"String_Node_Str\", Integer.class);\n Integer managementPort = event.getEnvironment().getProperty(\"String_Node_Str\", Integer.class);\n Integer turbinePort = event.getEnvironment().getProperty(\"String_Node_Str\", Integer.class);\n if (serverPort == null && managementPort == null) {\n return;\n }\n if (serverPort != Integer.valueOf(-1)) {\n Map<String, Object> ports = new HashMap<>();\n if (turbinePort == null) {\n ports.put(\"String_Node_Str\", -1);\n if (serverPort != null) {\n ports.put(\"String_Node_Str\", serverPort);\n }\n } else if (managementPort != null && managementPort != -1 && serverPort == null) {\n ports.put(\"String_Node_Str\", managementPort);\n }\n event.getEnvironment().getPropertySources().addFirst(new MapPropertySource(\"String_Node_Str\", ports));\n }\n}\n"
"public static void main(String[] args) {\n if (args.length != 1) {\n System.err.println(\"String_Node_Str\");\n System.err.println(\"String_Node_Str\" + StaticAnalyser.class.getName() + \"String_Node_Str\");\n System.exit(1);\n }\n G.v().out = System.err;\n Options.v().set_src_prec(Options.src_prec_apk);\n Options.v().set_process_dir(Arrays.asList(args[0]));\n Options.v().set_output_format(Options.output_format_none);\n Options.v().set_force_android_jar(\"String_Node_Str\");\n Options.v().set_allow_phantom_refs(true);\n Options.v().set_whole_program(true);\n PhaseOptions.v().processPhaseOptions(\"String_Node_Str\", \"String_Node_Str\");\n List<Vulnerability> vulnerabilities = new ArrayList<>();\n Pack wjpp = PackManager.v().getPack(\"String_Node_Str\");\n wjpp.add(new Transform(\"String_Node_Str\", new EntryMethodTransformer()));\n AnalysisTransformer transformer = new AnalysisTransformer(new KnownHostnameVerifierAnalyser(vulnerabilities), new HostnameVerifierAnalyser(vulnerabilities), new AbstractVerifierAnalyser(vulnerabilities), new DefaultHostnameVerifierAnalyser(vulnerabilities), new HttpsUrlConnectionAnalyser(vulnerabilities), new TrustManagerAnalyser(vulnerabilities), new SslContextAnalyser(vulnerabilities));\n Pack wjtp = PackManager.v().getPack(\"String_Node_Str\");\n wjtp.add(new Transform(\"String_Node_Str\", transformer));\n Scene.v().loadNecessaryClasses();\n PackManager.v().runPacks();\n for (Vulnerability vulnerability : vulnerabilities) {\n System.out.println(vulnerability.toString());\n }\n}\n"
"public void loadModelicaFile(String fileName, String modelName) throws ConnectException {\n String loggerInfo = null;\n _filePath = _ptIISystemPath + \"String_Node_Str\" + fileName;\n File file = new File(_filePath.toString());\n if (file.exists()) {\n loggerInfo = fileName + \"String_Node_Str\" + _filePath;\n _omcLogger.getInfo(loggerInfo);\n CompilerResult loadFileInteractiveQualifiedResult = sendCommand(\"String_Node_Str\" + _filePath + \"String_Node_Str\");\n if (!loadFileInteractiveQualifiedResult.getFirstResult().isEmpty() && loadFileInteractiveQualifiedResult.getError().isEmpty()) {\n loggerInfo = modelName + \"String_Node_Str\" + _filePath + \"String_Node_Str\";\n _omcLogger.getInfo(loggerInfo);\n } else if (!loadFileInteractiveQualifiedResult.getError().isEmpty()) {\n loggerInfo = loadFileInteractiveQualifiedResult.getError();\n _omcLogger.getInfo(loggerInfo);\n throw new ConnectException(loggerInfo);\n }\n CompilerResult loadModelResult = sendCommand(\"String_Node_Str\");\n if (loadModelResult.getFirstResult().compareTo(\"String_Node_Str\") == 0) {\n loggerInfo = \"String_Node_Str\";\n _omcLogger.getInfo(loggerInfo);\n } else if (!loadModelResult.getError().isEmpty()) {\n loggerInfo = loadModelResult.getError();\n _omcLogger.getInfo(loggerInfo);\n throw new ConnectException(loggerInfo);\n }\n } else {\n throw new ConnectException(\"String_Node_Str\" + _filePath);\n }\n}\n"
"private void showMenuIfPopupTrigger(MouseEvent e) {\n if (e.isPopupTrigger() && showPopupHook(e)) {\n popup.show(component, e.getX() + 3, e.getY() + 3);\n }\n}\n"
"public void testProvidersTable() {\n table.addProvider(mockProviderControl(), \"String_Node_Str\", null, true);\n Assert.assertEquals(1, table.getItems().length);\n table.setContext(ExtDocUtils.getSelection());\n final IJavaElementSelection lastSelection = table.getLastSelection();\n Assert.assertEquals(ExtDocUtils.getSelection(), lastSelection);\n for (final TableItem item : table.getItems()) {\n table.setContentVisible(item, true, true);\n }\n}\n"
"private final int jjMoveNfa_1(int startState, int curPos) {\n int[] nextStates;\n int startsAt = 0;\n jjnewStateCnt = 3;\n int i = 1;\n jjstateSet[0] = startState;\n int kind = 0x7fffffff;\n for (; ; ) {\n if (++jjround == 0x7fffffff)\n ReInitRounds();\n if (curChar < 64) {\n long l = 1L << curChar;\n MatchLoop: do {\n switch(jjstateSet[--i]) {\n case 0:\n if ((0x100002600L & l) != 0L) {\n if (kind > 8)\n kind = 8;\n } else if ((0x600000000000L & l) != 0L) {\n if (kind > 16)\n kind = 16;\n jjCheckNAdd(2);\n }\n break;\n case 1:\n if ((0x600000000000L & l) == 0L)\n break;\n if (kind > 16)\n kind = 16;\n jjCheckNAdd(2);\n break;\n case 2:\n if ((0x3ff600000000000L & l) == 0L)\n break;\n if (kind > 16)\n kind = 16;\n jjCheckNAdd(2);\n break;\n default:\n break;\n }\n } while (i != startsAt);\n } else if (curChar < 128) {\n long l = 1L << (curChar & 077);\n MatchLoop: do {\n switch(jjstateSet[--i]) {\n case 0:\n case 2:\n if ((0x7fffffe87fffffeL & l) == 0L)\n break;\n if (kind > 16)\n kind = 16;\n jjCheckNAdd(2);\n break;\n default:\n break;\n }\n } while (i != startsAt);\n } else {\n int hiByte = (int) (curChar >> 8);\n int i1 = hiByte >> 6;\n long l1 = 1L << (hiByte & 077);\n int i2 = (curChar & 0xff) >> 6;\n long l2 = 1L << (curChar & 077);\n MatchLoop: do {\n switch(jjstateSet[--i]) {\n default:\n break;\n }\n } while (i != startsAt);\n }\n if (kind != 0x7fffffff) {\n jjmatchedKind = kind;\n jjmatchedPos = curPos;\n kind = 0x7fffffff;\n }\n ++curPos;\n if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))\n return curPos;\n try {\n curChar = input_stream.readChar();\n } catch (java.io.IOException e) {\n return curPos;\n }\n }\n}\n"
"public Collection<ProjectVersionReference> getProjectReferences(String repoId, String namespace, String projectId, String projectVersion) {\n File directory = new File(getDirectory(repoId), namespace + \"String_Node_Str\" + projectId + \"String_Node_Str\" + projectVersion);\n Properties properties = readOrCreateProperties(directory, PROJECT_VERSION_METADATA_KEY);\n int numberOfRefs = Integer.parseInt(properties.getProperty(\"String_Node_Str\", \"String_Node_Str\")) + 1;\n List<ProjectVersionReference> references = new ArrayList<ProjectVersionReference>();\n for (int i = 0; i < numberOfRefs; i++) {\n ProjectVersionReference reference = new ProjectVersionReference();\n reference.setProjectId(properties.getProperty(\"String_Node_Str\" + i + \"String_Node_Str\"));\n reference.setNamespace(properties.getProperty(\"String_Node_Str\" + i + \"String_Node_Str\"));\n reference.setProjectVersion(properties.getProperty(\"String_Node_Str\" + i + \"String_Node_Str\"));\n reference.setReferenceType(ProjectVersionReference.ReferenceType.valueOf(properties.getProperty(\"String_Node_Str\" + i + \"String_Node_Str\")));\n references.add(reference);\n }\n return references;\n}\n"
"public Object handleLiteralElement(Element child) {\n String childName = child.getName();\n Properties elementProps;\n ResourceTypeHandler handler = getElementHandler(childName);\n if (handler == null) {\n throw new RuntimeException(\"String_Node_Str\" + elementPath(child));\n }\n String childTypeName = handler.getPrimitiveName();\n if (childTypeName == null) {\n System.err.println(\"String_Node_Str\" + childTypeName);\n return null;\n }\n return handler.handleElement(child, null);\n}\n"
"public boolean HDLTargetSupported(String HDLType, AttributeSet attrs) {\n return HDLType.equals(Settings.VHDL);\n}\n"
"public long addVoucher(String clientID, long expireTime, long voucherSize) {\n ClientVoucherManager clientVoucherManager = openVoucherMap.get(clientID);\n if (clientVoucherManager == null) {\n clientVoucherManager = new ClientVoucherManager(clientID, fileID);\n openVoucherMap.put(clientID, clientVoucherManager);\n }\n blockedSpace += voucherSize;\n clientVoucherManager.addVoucher(expireTime);\n return fileSize + blockedSpace;\n}\n"
"public Resource<?> parse() {\n Resource r = res;\n String tk;\n if (path.startsWith(\"String_Node_Str\")) {\n File homeDir = new File(System.getProperty(\"String_Node_Str\")).getAbsoluteFile();\n if (path.length() == 1) {\n return new DirectoryResource(factory, homeDir);\n } else {\n path = path.substring(1);\n r = new DirectoryResource(factory, homeDir);\n }\n }\n while (cursor < length) {\n switch(path.charAt(cursor++)) {\n case '.':\n if (read() == '.') {\n Resource parent = r.getParent();\n if (parent == null)\n return r;\n r = parent;\n }\n break;\n default:\n if (read() == '.')\n continue;\n boolean first = --cursor == 0;\n tk = capture();\n if (tk.startsWith(\"String_Node_Str\")) {\n if (res == r) {\n r = factory.getResourceFrom(new File(tk));\n cursor++;\n continue;\n } else {\n tk = tk.substring(1);\n }\n }\n Resource child = r.getChild(tk);\n if (child == null) {\n throw new RuntimeException(\"String_Node_Str\" + child);\n }\n r = child;\n break;\n }\n }\n return r;\n}\n"
"public void onEnable() {\n ACPluginManager.setServer(getServer());\n PluginManager pm = getServer().getPluginManager();\n ACPluginListener pL = new ACPluginListener();\n PluginDescriptionFile pdfFile = this.getDescription();\n log.info(\"String_Node_Str\" + pdfFile.getName() + \"String_Node_Str\" + \"String_Node_Str\" + pdfFile.getVersion() + \"String_Node_Str\");\n pm.registerEvent(Event.Type.PLUGIN_ENABLE, pL, Priority.Monitor, this);\n pm.registerEvent(Event.Type.PLUGIN_DISABLE, pL, Priority.Monitor, this);\n worker = ACHelper.getInstance();\n worker.setCoreInstance(this);\n super.onEnable();\n TerminalCommandManager.getInstance().setPerm(this);\n worker.loadInfos();\n permissionLinker.registerAllPermParent();\n ACPlayerListener playerListener = new ACPlayerListener();\n ACEntityListener entityListener = new ACEntityListener();\n pm.registerEvent(Event.Type.PLAYER_INTERACT, playerListener, Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_JOIN, playerListener, Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_TELEPORT, playerListener, Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_RESPAWN, playerListener, Priority.Low, this);\n pm.registerEvent(Event.Type.PLAYER_LOGIN, playerListener, Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_CHAT, playerListener, Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_COMMAND_PREPROCESS, playerListener, Priority.Lowest, this);\n pm.registerEvent(Event.Type.PLAYER_PICKUP_ITEM, playerListener, Priority.Normal, this);\n pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Priority.High, this);\n pm.registerEvent(Event.Type.ENTITY_TARGET, entityListener, Priority.High, this);\n pm.registerEvent(Event.Type.ENTITY_DEATH, entityListener, Priority.Normal, this);\n try {\n pm.registerEvent(Event.Type.FOOD_LEVEL_CHANGE, entityListener, Priority.High, this);\n } catch (Throwable e) {\n if (CommandManager.getInstance().unRegisterCommand(Eternal.class, this))\n CommandManager.getInstance().unRegisterCommand(Feed.class, this);\n ACLogger.info(\"String_Node_Str\");\n }\n pm.registerEvent(Event.Type.SERVER_COMMAND, new ACServerListener(), Priority.Normal, this);\n pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Priority.Highest, this);\n if (worker.getConfBoolean(\"String_Node_Str\"))\n pm.registerEvent(Event.Type.SIGN_CHANGE, blkListener, Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_DAMAGE, blkListener, Priority.Normal, this);\n pm.registerEvent(Event.Type.WEATHER_CHANGE, new ACWeatherListener(), Priority.Normal, this);\n}\n"
"protected Map<String, Double> updateTrustAfterHunt(double foodHunted, double foodReceived) {\n List<String> members = this.getDataModel().getHuntingTeam().getMembers();\n if (members.size() < 2)\n return null;\n String opponentID;\n Map<String, Double> newTrustValue = new HashMap<String, Double>();\n double trust;\n if (members.get(0).equals(this.getId())) {\n opponentID = members.get(1);\n } else {\n opponentID = members.get(0);\n }\n if (this.getDataModel().getTrust(opponentID) != null)\n trust = this.getDataModel().getTrust(opponentID);\n else\n trust = 0;\n if (this.getDataModel().getLastHunted().getName().equals(\"String_Node_Str\")) {\n if (foodHunted == 0) {\n trust = ValueScaler.scale(trust, -1, 0.1);\n } else {\n trust = ValueScaler.scale(trust, 1, 0.1);\n }\n } else {\n trust = ValueScaler.scale(trust, 1, 0);\n }\n System.out.println(trust);\n newTrustValue.put(opponentID, trust);\n return newTrustValue;\n}\n"