content stringlengths 40 137k |
|---|
"public void receiveRPCElement(RPCElement element) {\n isReceived = true;\n}\n"
|
"public void testSinglePacketSerialization() {\n final byte[] sourceBuf = new byte[512];\n for (int i = 0; i < sourceBuf.length; ++i) {\n sourceBuf[i] = (byte) (i % 23);\n }\n final byte[] targetBuf = new byte[8192];\n final MultiPacketOutputStream mpos = new MultiPacketOutputStream(targetBuf);\n try {\n mpos.write(sourceBuf);\n } catch (IOException ioe) {\n fail(StringUtils.stringifyException(ioe));\n }\n final DatagramPacket[] packets = mpos.createPackets(TEST_REMOTE_ADDRESS);\n assertNotNull(packets);\n assertEquals(1, packets.length);\n final int offset = packets[0].getOffset();\n final int length = packets[0].getLength();\n assertEquals(0, offset);\n assertEquals(sourceBuf.length + RPCMessage.METADATA_SIZE, length);\n final byte[] packetBuf = packets[0].getData();\n for (int i = offset; i < (offset + length - RPCMessage.METADATA_SIZE); ++i) {\n assertEquals((byte) (i % 23), packetBuf[i]);\n }\n assertEquals(0, packetBuf[offset + length - RPCMessage.METADATA_SIZE]);\n assertEquals(0, packetBuf[offset + length - RPCMessage.METADATA_SIZE + 1]);\n assertEquals(1, packetBuf[offset + length - RPCMessage.METADATA_SIZE + 2]);\n assertEquals(0, packetBuf[offset + length - RPCMessage.METADATA_SIZE + 3]);\n}\n"
|
"protected Dialog onCreateDialog(int id) {\n AlertDialog.Builder mBuilder = new AlertDialog.Builder(this);\n Dialog mDialog = null;\n switch(id) {\n case NO_FILES_DIALOG:\n mBuilder.setMessage(R.string.disclaimer_ui_dialog_no_files).setCancelable(false).setPositiveButton(R.string.misc_dialog_yes_button, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n showMapActivity(null);\n }\n }).setNegativeButton(R.string.misc_dialog_no_button, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n mDialog = mBuilder.create();\n break;\n case MANY_FILES_DIALOG:\n mFileNames = new CharSequence[mapDataInfoList.size()];\n for (int i = 0; i < mapDataInfoList.size(); i++) {\n MapDataInfo mInfo = mapDataInfoList.get(i);\n mFile = new File(mInfo.getFileName());\n mFileNames[i] = mFile.getName();\n }\n mBuilder.setTitle(R.string.disclaimer_ui_dialog_many_files_title).setCancelable(false).setItems(mFileNames, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int item) {\n showMapActivity(mFileNames[item].toString());\n }\n });\n mDialog = mBuilder.create();\n break;\n case NO_SERVAL_DIALOG:\n mBuilder.setMessage(R.string.disclaimer_ui_dialog_no_serval).setCancelable(false).setPositiveButton(R.string.misc_dialog_ok_button, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n mDialog = mBuilder.create();\n break;\n default:\n mDialog = null;\n }\n return mDialog;\n}\n"
|
"public void handleEvent(Event event) {\n if (Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.CHARACTERS_PRESENT || Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.PHONE) {\n return;\n }\n TooltipUpdateThread.cancelThreads = true;\n if (item != null) {\n if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() != DialogueNodeType.INVENTORY) {\n Main.mainController.openInventory();\n }\n if (Main.game.getDialogueFlags().values.contains(DialogueFlagValue.quickTrade)) {\n switch(InventoryDialogue.getNPCInventoryInteraction()) {\n case COMBAT:\n break;\n case FULL_MANAGEMENT:\n break;\n case SEX:\n break;\n case TRADING:\n break;\n case CHARACTER_CREATION:\n break;\n }\n } else {\n InventoryDialogue.setOwner(owner);\n InventoryDialogue.setItem(item);\n InventoryDialogue.setBuyBackIndex(buyBackIndex);\n Main.game.setResponseTab(1);\n Main.game.setContent(new Response(\"String_Node_Str\", \"String_Node_Str\", InventoryDialogue.ITEM_INVENTORY));\n }\n } else if (clothing != null) {\n if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() != DialogueNodeType.INVENTORY) {\n Main.mainController.openInventory();\n }\n InventoryDialogue.setOwner(owner);\n InventoryDialogue.setClothing(clothing);\n InventoryDialogue.setBuyBackIndex(buyBackIndex);\n Main.game.setResponseTab(1);\n Main.game.setContent(new Response(\"String_Node_Str\", \"String_Node_Str\", InventoryDialogue.CLOTHING_INVENTORY));\n } else if (weapon != null) {\n if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() != DialogueNodeType.INVENTORY) {\n Main.mainController.openInventory();\n }\n InventoryDialogue.setOwner(owner);\n InventoryDialogue.setWeapon(weapon);\n InventoryDialogue.setBuyBackIndex(buyBackIndex);\n Main.game.setResponseTab(1);\n Main.game.setContent(new Response(\"String_Node_Str\", \"String_Node_Str\", InventoryDialogue.WEAPON_INVENTORY));\n } else if (clothingEquipped != null) {\n if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() != DialogueNodeType.INVENTORY) {\n Main.mainController.openInventory();\n }\n InventoryDialogue.setOwner(owner);\n InventoryDialogue.setClothing(clothingEquipped);\n InventoryDialogue.setBuyBackIndex(buyBackIndex);\n Main.game.setResponseTab(1);\n Main.game.setContent(new Response(\"String_Node_Str\", \"String_Node_Str\", InventoryDialogue.CLOTHING_EQUIPPED));\n } else if (weaponEquipped != null) {\n if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() != DialogueNodeType.INVENTORY) {\n Main.mainController.openInventory();\n }\n InventoryDialogue.setOwner(owner);\n InventoryDialogue.setWeapon(weaponEquipped);\n InventoryDialogue.setBuyBackIndex(buyBackIndex);\n Main.game.setResponseTab(1);\n Main.game.setContent(new Response(\"String_Node_Str\", \"String_Node_Str\", InventoryDialogue.WEAPON_EQUIPPED));\n }\n Main.mainController.getTooltip().hide();\n}\n"
|
"private static String encodeParam(String value) {\n if (!ApiServer.isEncodeApiResponse()) {\n return value;\n }\n try {\n return new URLEncoder().encode(value).replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n } catch (Exception e) {\n s_logger.warn(\"String_Node_Str\" + value, e);\n }\n return value;\n}\n"
|
"public void WitherExplosion(EntityExplodeEvent e) {\n if (debug) {\n plugin.getLogger().info(e.getEventName());\n }\n if (e.getEntity() == null || !IslandGuard.inWorld(e.getEntity())) {\n return;\n }\n if (e.getEntityType() == EntityType.WITHER || e.getEntityType() == EntityType.WITHER_SKULL) {\n if (witherSpawnInfo.containsKey(e.getEntity().getUniqueId())) {\n if (!witherSpawnInfo.get(e.getEntity().getUniqueId()).inIslandSpace(e.getLocation())) {\n e.blockList().clear();\n e.setCancelled(true);\n }\n }\n }\n}\n"
|
"private void collect(BatchResult batchResult, Path p, int maxAmbigiousWordCount, int resultLimit) throws IOException {\n LinkedHashSet<String> sentences = getSentences(p);\n List<List<String>> group = group(new ArrayList<>(sentences), 5000);\n for (List<String> strings : group) {\n LinkedHashSet<String> toProcess = getAccpetableSentences(strings);\n Log.info(\"String_Node_Str\", batchResult.acceptedSentences.size());\n Log.info(morphology.getCache().toString());\n for (String sentence : toProcess) {\n ResultSentence r = ruleBasedDisambiguator.disambiguate(sentence);\n if (r.ambiguousWordCount() > maxAmbigiousWordCount) {\n continue;\n }\n if (r.zeroAnalysisCount() > 0) {\n continue;\n }\n if (r.allIgnoredCount() > 0) {\n Log.warn(\"String_Node_Str\", r.sentence);\n continue;\n }\n boolean sentenceOk = true;\n for (WordAnalysis an : r.sentenceAnalysis) {\n boolean ok = true;\n for (Predicate<WordAnalysis> predicate : acceptWordPredicates) {\n if (!predicate.test(an)) {\n ok = false;\n break;\n }\n }\n if (!ok) {\n batchResult.ignoredSentences.add(sentence);\n sentenceOk = false;\n break;\n }\n }\n if (sentenceOk) {\n batchResult.acceptedSentences.add(sentence);\n batchResult.results.add(r);\n if (resultLimit > 0 && batchResult.results.size() > resultLimit) {\n return;\n }\n }\n }\n }\n}\n"
|
"private boolean createChildNode(HL7TreeNode node) {\n if (node.getColumn() != null) {\n if (!MessageDialog.openConfirm(xmlViewer.getControl().getShell(), \"String_Node_Str\", \"String_Node_Str\" + node.getLabel() + \"String_Node_Str\")) {\n return false;\n }\n node.setColumn(null);\n }\n String label = \"String_Node_Str\";\n final String nodeLabel = node.getLabel() + \"String_Node_Str\";\n while (!StringUtil.validateLabelForXML(label)) {\n IInputValidator validator = new IInputValidator() {\n public String isValid(String newText) {\n if (newText != null) {\n String text = newText.trim();\n for (HL7TreeNode children : node.getChildren()) {\n if (text.equals(children.getLabel())) {\n return \"String_Node_Str\";\n }\n }\n }\n return null;\n }\n };\n InputDialog dialog = new InputDialog(null, \"String_Node_Str\", \"String_Node_Str\", nodeLabel, validator) {\n\n protected void okPressed() {\n String eleName = this.getValue();\n super.okPressed();\n }\n };\n dialog.setErrorMessage(\"String_Node_Str\");\n int status = dialog.open();\n if (status == InputDialog.OK) {\n label = dialog.getValue().trim();\n }\n if (status == InputDialog.CANCEL) {\n return false;\n }\n }\n HL7TreeNode child = new Element(label);\n if (node.getRow() == null || node.getRow().equals(\"String_Node_Str\")) {\n if (hl7ui != null && hl7ui.gethl7Manager() instanceof HL7OutputManager) {\n child.setRow(((HL7OutputManager) hl7ui.gethl7Manager()).getCurrentSchema(false));\n }\n } else {\n child.setRow(node.getRow());\n }\n node.addChild(child);\n this.xmlViewer.refresh();\n this.xmlViewer.expandAll();\n return true;\n}\n"
|
"public void b_() {\n super.b_();\n if (y == 0.0F && x == 0.0F) {\n float f1 = MathHelper.a(s * s + u * u);\n x = v = (float) ((Math.atan2(s, u) * 180D) / 3.1415927410125732D);\n y = w = (float) ((Math.atan2(t, f1) * 180D) / 3.1415927410125732D);\n }\n if (a > 0) {\n a--;\n }\n if (ak) {\n int i = l.a(c, d, e);\n if (i != f) {\n ak = false;\n s *= W.nextFloat() * 0.2F;\n t *= W.nextFloat() * 0.2F;\n u *= W.nextFloat() * 0.2F;\n al = 0;\n am = 0;\n } else {\n al++;\n if (al == 1200) {\n q();\n }\n return;\n }\n } else {\n am++;\n }\n Vec3D vec3d = Vec3D.b(p, q, r);\n Vec3D vec3d1 = Vec3D.b(p + s, q + t, r + u);\n MovingObjectPosition movingobjectposition = l.a(vec3d, vec3d1);\n vec3d = Vec3D.b(p, q, r);\n vec3d1 = Vec3D.b(p + s, q + t, r + u);\n if (movingobjectposition != null) {\n vec3d1 = Vec3D.b(movingobjectposition.f.a, movingobjectposition.f.b, movingobjectposition.f.c);\n }\n Entity entity = null;\n List list = l.b(((Entity) (this)), z.a(s, t, u).b(1.0D, 1.0D, 1.0D));\n double d1 = 0.0D;\n for (int j = 0; j < list.size(); j++) {\n Entity entity1 = (Entity) list.get(j);\n if (!entity1.c_() || entity1 == b && am < 5) {\n continue;\n }\n float f5 = 0.3F;\n AxisAlignedBB axisalignedbb = entity1.z.b(f5, f5, f5);\n MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1);\n if (movingobjectposition1 == null) {\n continue;\n }\n double d2 = vec3d.a(movingobjectposition1.f);\n if (d2 < d1 || d1 == 0.0D) {\n entity = entity1;\n d1 = d2;\n }\n }\n if (entity != null) {\n movingobjectposition = new MovingObjectPosition(entity);\n }\n if (movingobjectposition != null) {\n if (movingobjectposition.g != null) {\n boolean bounce;\n if (entity instanceof EntityLiving) {\n CraftServer server = ((WorldServer) this.l).getServer();\n org.bukkit.entity.Entity shooter = null;\n if ((EntityLiving) b != null) {\n shooter = new org.bukkit.craftbukkit.entity.CraftLivingEntity(server, b);\n } else if ((Entity) b != null) {\n shooter = (org.bukkit.entity.Entity) b.getBukkitEntity();\n }\n EntityDamageByProjectileEvent edbpe = new EntityDamageByProjectileEvent(shooter, entity.getBukkitEntity(), this.getBukkitEntity(), EntityDamageEvent.DamageCause.ENTITY_ATTACK, 4);\n server.getPluginManager().callEvent(edbpe);\n if (!edbpe.isCancelled()) {\n bounce = !movingobjectposition.g.a(((Entity) (b)), edbpe.getDamage());\n } else {\n bounce = edbpe.getBounce();\n }\n } else {\n bounce = !movingobjectposition.g.a(((Entity) (b)), 4);\n }\n if (!bounce) {\n l.a(((Entity) (this)), \"String_Node_Str\", 1.0F, 1.2F / (W.nextFloat() * 0.2F + 0.9F));\n q();\n } else {\n s *= -0.10000000149011612D;\n t *= -0.10000000149011612D;\n u *= -0.10000000149011612D;\n v += 180F;\n x += 180F;\n am = 0;\n }\n } else {\n c = movingobjectposition.b;\n d = movingobjectposition.c;\n e = movingobjectposition.d;\n f = l.a(c, d, e);\n s = (float) (movingobjectposition.f.a - p);\n t = (float) (movingobjectposition.f.b - q);\n u = (float) (movingobjectposition.f.c - r);\n float f2 = MathHelper.a(s * s + t * t + u * u);\n p -= (s / (double) f2) * 0.05000000074505806D;\n q -= (t / (double) f2) * 0.05000000074505806D;\n r -= (u / (double) f2) * 0.05000000074505806D;\n l.a(((Entity) (this)), \"String_Node_Str\", 1.0F, 1.2F / (W.nextFloat() * 0.2F + 0.9F));\n ak = true;\n a = 7;\n }\n }\n p += s;\n q += t;\n r += u;\n float f3 = MathHelper.a(s * s + u * u);\n v = (float) ((Math.atan2(s, u) * 180D) / 3.1415927410125732D);\n for (w = (float) ((Math.atan2(t, f3) * 180D) / 3.1415927410125732D); w - y < -180F; y -= 360F) {\n ;\n }\n for (; w - y >= 180F; y += 360F) {\n ;\n }\n for (; v - x < -180F; x -= 360F) {\n ;\n }\n for (; v - x >= 180F; x += 360F) {\n ;\n }\n w = y + (w - y) * 0.2F;\n v = x + (v - x) * 0.2F;\n float f4 = 0.99F;\n float f6 = 0.03F;\n if (v()) {\n for (int k = 0; k < 4; k++) {\n float f7 = 0.25F;\n l.a(\"String_Node_Str\", p - s * (double) f7, q - t * (double) f7, r - u * (double) f7, s, t, u);\n }\n f4 = 0.8F;\n }\n s *= f4;\n t *= f4;\n u *= f4;\n t -= f6;\n a(p, q, r);\n}\n"
|
"protected Object wrap(Object entity) {\n if ((entity != null) && (PersistenceWeavedRest.class.isAssignableFrom(entity.getClass()))) {\n if (!doesExist(null, entity)) {\n return entity;\n }\n ClassDescriptor descriptor = getJAXBDescriptorForClass(entity.getClass());\n if (entity instanceof FetchGroupTracker) {\n FetchGroup fetchGroup = new FetchGroup();\n for (DatabaseMapping mapping : descriptor.getMappings()) {\n if (!(mapping instanceof XMLInverseReferenceMapping)) {\n fetchGroup.addAttribute(mapping.getAttributeName());\n }\n }\n (new FetchGroupManager()).setObjectFetchGroup(entity, fetchGroup, null);\n ((FetchGroupTracker) entity)._persistence_setSession(JpaHelper.getDatabaseSession(getEmf()));\n } else if (descriptor.hasRelationships()) {\n for (DatabaseMapping mapping : descriptor.getMappings()) {\n if (mapping instanceof XMLInverseReferenceMapping) {\n JPARSLogger.fine(\"String_Node_Str\", new Object[] { DataStorage.get(DataStorage.REQUEST_ID) });\n throw JPARSException.invalidConfiguration(Status.INTERNAL_SERVER_ERROR.getStatusCode());\n }\n }\n }\n }\n return entity;\n}\n"
|
"public void readData(ObjectDataInput in) throws IOException {\n super.readData(in);\n expression = in.readUTF();\n}\n"
|
"public void drawBackgroundImage(String imageURI, float x, float y, float width, float height, float positionX, float positionY, int repeat) throws IOException {\n URL url = new URL(imageURI);\n InputStream imageStream = null;\n try {\n imageStream = url.openStream();\n Image image = ImageIO.read(imageStream);\n ImageIcon imageIcon = new ImageIcon(image);\n if (imageHeight == 0 || imageWidth == 0) {\n imageSize = new Position(imageIcon.getIconWidth(), imageIcon.getIconHeight());\n } else {\n imageSize = new Position(imageWidth, imageHeight);\n }\n Position areaPosition = new Position(x, y);\n Position areaSize = new Position(width, height);\n Position imagePosition = new Position(x + positionX, y + positionY);\n BackgroundImageLayout layout = new BackgroundImageLayout(areaPosition, areaSize, imagePosition, imageSize);\n Collection positions = layout.getImagePositions(repeat);\n gSave();\n setColor(Color.WHITE);\n out.println(\"String_Node_Str\");\n drawRawRect(x, y, width, height);\n out.println(\"String_Node_Str\");\n Iterator iterator = positions.iterator();\n while (iterator.hasNext()) {\n Position position = (Position) iterator.next();\n drawImage(imageURI, image, position.getX(), position.getY(), imageSize.getX(), imageSize.getY());\n }\n gRestore();\n } finally {\n if (imageStream != null) {\n imageStream.close();\n imageStream = null;\n }\n }\n}\n"
|
"public void spawnUnit(float x, float y) {\n for (int i = 0; i < 10; ++i) {\n float angle = MathUtils.randInRange(0, 2 * MathUtils.PI);\n float xVel = MathUtils.randInRange(25.f, 50.f) * FloatMath.cos(angle);\n float yVel = MathUtils.randInRange(25.f, 50.f) * FloatMath.sin(angle);\n BBTHSimulation.PARTICLES.createParticle().circle().velocity(xVel, yVel).shrink(0.1f, 0.15f).radius(3.0f).position(x, y).color(team.getRandomShade());\n }\n Unit newUnit = null;\n if (_combo != 0 && _combo % BBTHSimulation.UBER_UNIT_THRESHOLD == 0) {\n newUnit = UnitType.UBER.createUnit(unitManager, team, paint, BBTHSimulation.PARTICLES);\n } else {\n newUnit = selector.getUnitType().createUnit(unitManager, team, paint);\n }\n newUnit.setPosition(x, y);\n if (team == Team.SERVER) {\n newUnit.setVelocity(BBTHSimulation.randInRange(30, 70), MathUtils.PI / 2.f);\n } else {\n newUnit.setVelocity(BBTHSimulation.randInRange(30, 70), -MathUtils.PI / 2.f);\n }\n aiController.addEntity(newUnit);\n units.add(newUnit);\n}\n"
|
"public void execute(Event<UIIFrameEditMode> event) throws Exception {\n UIIFrameEditMode uiForm = event.getSource();\n String url = uiForm.getUIStringInput(FIELD_URL).getValue();\n if (url == null || url.length() == 0) {\n UIIFramePortlet uiPortlet = uiForm.getParent();\n Object[] args = { uiForm.getLabel(uiForm.getUIStringInput(FIELD_URL).getId()) };\n uiPortlet.addMessage(new ApplicationMessage(\"String_Node_Str\", args));\n uiForm.getUIStringInput(FIELD_URL).setValue(uiPortlet.getURL());\n return;\n }\n try {\n new URL(url);\n PortletRequestContext pcontext = (PortletRequestContext) WebuiRequestContext.getCurrentInstance();\n PortletPreferences pref = pcontext.getRequest().getPreferences();\n pref.setValue(\"String_Node_Str\", event.getSource().getUIStringInput(FIELD_URL).getValue());\n pref.store();\n pcontext.setApplicationMode(PortletMode.VIEW);\n } catch (Exception e) {\n Object[] args = { FIELD_URL, \"String_Node_Str\" };\n throw new MessageException(new ApplicationMessage(\"String_Node_Str\", args));\n }\n}\n"
|
"private InputStream getStream(String URL, Boolean CheckPNG) {\n boolean success = false;\n File cacheFile = new File(CACHE_DIR, MD5(URL));\n boolean alreadyCached = false;\n if (cacheFile.exists() && cacheFile.length() > 1) {\n alreadyCached = true;\n logger.info(\"String_Node_Str\" + cacheFile.lastModified() + \"String_Node_Str\" + cacheFile.length() + \"String_Node_Str\");\n }\n try {\n URL U = new URL(URL);\n C = (HttpURLConnection) U.openConnection();\n C.setReadTimeout(15000);\n C.setDoInput(true);\n C.setDoOutput(false);\n C.connect();\n logger.info(\"String_Node_Str\" + C.getResponseCode());\n int respcode = C.getResponseCode() / 100;\n if (respcode != 4 && respcode != 5) {\n if (alreadyCached && C.getLastModified() == cacheFile.lastModified()) {\n logger.info(\"String_Node_Str\");\n return getStreamFromCache(cacheFile);\n }\n if (C.getContentLength() <= 0) {\n return null;\n }\n InputStream IS = new BufferedInputStream(C.getInputStream());\n if (!CheckPNG) {\n success = true;\n saveToCache(IS, cacheFile);\n return IS;\n }\n IS.mark(C.getContentLength() + 10);\n byte[] ib = new byte[4];\n IS.read(ib);\n if (ib[1] == (byte) 'P' && ib[2] == (byte) 'N' && ib[3] == (byte) 'G') {\n IS.reset();\n success = true;\n saveToCache(IS, cacheFile);\n return IS;\n }\n }\n } catch (Exception ex) {\n success = false;\n logger.log(Level.WARNING, ex.getMessage());\n if (alreadyCached)\n return getStreamFromCache(cacheFile);\n } finally {\n if (!success)\n disconnect();\n }\n return null;\n}\n"
|
"public HashMap<RestrictionEffect, HashSet<Ability>> getApplicableRestrictionEffects(Permanent permanent, Game game) {\n HashMap<RestrictionEffect, HashSet<Ability>> effects = new HashMap<RestrictionEffect, HashSet<Ability>>();\n for (RestrictionEffect effect : restrictionEffects) {\n HashSet<Ability> abilities = restrictionEffects.getAbility(effect.getId());\n HashSet<Ability> applicableAbilities = new HashSet<Ability>();\n for (Ability ability : abilities) {\n if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, ability instanceof MageSingleton ? permanent : null, false)) {\n if (effect.applies(permanent, ability, game)) {\n applicableAbilities.add(ability);\n }\n }\n }\n if (!applicableAbilities.isEmpty()) {\n effects.put(effect, abilities);\n }\n }\n return effects;\n}\n"
|
"public void testSendMessageWithGroupRelatedPropertiesSet() throws Exception {\n try (TestAmqpPeer testPeer = new TestAmqpPeer(testFixture.getAvailablePort())) {\n Connection connection = testFixture.establishConnecton(testPeer);\n testPeer.expectBegin(true);\n testPeer.expectSenderAttach();\n Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);\n String queueName = \"String_Node_Str\";\n Queue queue = session.createQueue(queueName);\n MessageProducer producer = session.createProducer(queue);\n MessageHeaderSectionMatcher headersMatcher = new MessageHeaderSectionMatcher(true).withDurable(equalTo(true));\n MessageAnnotationsSectionMatcher msgAnnotationsMatcher = new MessageAnnotationsSectionMatcher(true);\n String expectedGroupId = \"String_Node_Str\";\n int expectedGroupSeq = 1;\n String expectedReplyToGroupId = \"String_Node_Str\";\n MessagePropertiesSectionMatcher propsMatcher = new MessagePropertiesSectionMatcher(true);\n propsMatcher.withGroupId(equalTo(expectedGroupId));\n propsMatcher.withReplyToGroupId(equalTo(expectedReplyToGroupId));\n propsMatcher.withGroupSequence(equalTo(UnsignedInteger.valueOf(expectedGroupSeq)));\n TransferPayloadCompositeMatcher messageMatcher = new TransferPayloadCompositeMatcher();\n messageMatcher.setHeadersMatcher(headersMatcher);\n messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);\n messageMatcher.setPropertiesMatcher(propsMatcher);\n messageMatcher.setMessageContentMatcher(new EncodedAmqpValueMatcher(null));\n testPeer.expectTransfer(messageMatcher);\n Message message = session.createTextMessage();\n message.setStringProperty(JmsClientProperties.JMSXGROUPID, expectedGroupId);\n message.setIntProperty(JmsClientProperties.JMSXGROUPSEQ, expectedGroupSeq);\n message.setStringProperty(AmqpMessageSupport.JMS_AMQP_REPLY_TO_GROUP_ID, expectedReplyToGroupId);\n producer.send(message);\n testPeer.waitForAllHandlersToComplete(1000);\n }\n}\n"
|
"public void testAMKeystoreGenerated() throws Exception {\n File keystoreFile = new File(secDir, SliderKeys.KEYSTORE_FILE_NAME);\n Assert.assertTrue(\"String_Node_Str\" + keystoreFile, keystoreFile.exists());\n InputStream is = null;\n try {\n is = new FileInputStream(keystoreFile);\n KeyStore keystore = KeyStore.getInstance(\"String_Node_Str\");\n String password = SecurityUtils.getKeystorePass();\n keystore.load(is, password.toCharArray());\n Certificate certificate = keystore.getCertificate(keystore.aliases().nextElement());\n Assert.assertNotNull(certificate);\n if (certificate instanceof X509Certificate) {\n X509Certificate x509cert = (X509Certificate) certificate;\n Principal principal = x509cert.getSubjectDN();\n String subjectDn = principal.getName();\n Assert.assertEquals(\"String_Node_Str\", \"String_Node_Str\", subjectDn);\n principal = x509cert.getIssuerDN();\n String issuerDn = principal.getName();\n Assert.assertEquals(\"String_Node_Str\", \"String_Node_Str\" + InetAddress.getLocalHost().getHostName(), issuerDn);\n }\n } finally {\n if (null != is) {\n is.close();\n }\n }\n}\n"
|
"void noteStartWakeLocked(WakeLock wl, WorkSource ws) {\n if (wl.monitorType >= 0) {\n long origId = Binder.clearCallingIdentity();\n try {\n if (ws != null) {\n mBatteryStats.noteStartWakelockFromSource(ws, wl.pid, wl.tag, wl.monitorType);\n } else {\n mBatteryStats.noteStartWakelock(wl.uid, wl.pid, wl.tag, wl.monitorType);\n }\n } catch (RemoteException e) {\n } finally {\n Binder.restoreCallingIdentity(origId);\n }\n } catch (RemoteException e) {\n }\n}\n"
|
"public Result executeQuery(String queryString) {\n Connection connection = getConnection();\n queryString = upgradeQuery(queryString);\n Query query = connection.parseQuery(queryString);\n final Result result = connection.execute(query);\n if (MondrianProperties.instance().TestExpDependencies.booleanValue()) {\n assertResultValid(result);\n }\n return result;\n}\n"
|
"private void preprocessCodes(List<Code> codeTable) {\n int maxPrefixLength = 0;\n for (Code c : codeTable) {\n maxPrefixLength = Math.max(maxPrefixLength, c.prefixLength);\n }\n int[] lenCount = new int[maxPrefixLength + 1];\n for (Code c : codeTable) {\n lenCount[c.prefixLength]++;\n }\n int curCode;\n int[] firstCode = new int[lenCount.length + 1];\n lenCount[0] = 0;\n for (int curLen = 1; curLen <= lenCount.length; curLen++) {\n firstCode[curLen] = (firstCode[curLen - 1] + (lenCount[curLen - 1]) << 1);\n curCode = firstCode[curLen];\n for (Code code : codeTable) {\n if (code.prefixLength == curLen) {\n code.code = curCode;\n curCode++;\n }\n }\n }\n if (JBIG2ImageReader.DEBUG)\n System.out.println(codeTableToString(codeTable));\n}\n"
|
"protected Control createCustomArea(Composite parent) {\n if (exceptionString == null || exceptionString.isEmpty()) {\n StringWriter stringWriter = new StringWriter();\n ex.printStackTrace(new PrintWriter(stringWriter));\n exceptionString = stringWriter.toString();\n }\n ExpandableComposite errorComposite = new ExpandableComposite(parent, ExpandableComposite.COMPACT);\n errorComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, true, 1, 1));\n errorComposite.setText(Messages.getString(\"String_Node_Str\"));\n errorComposite.addExpansionListener(new IExpansionListener() {\n public void expansionStateChanged(ExpansionEvent e) {\n int delta = 300;\n if (!e.getState()) {\n delta = -delta;\n }\n Point shellSize = getShell().getSize();\n Point newSize = new Point(shellSize.x, shellSize.y + delta);\n getShell().setSize(newSize);\n }\n public void expansionStateChanging(ExpansionEvent e) {\n }\n });\n Text text = new Text(errorComposite, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);\n text.setText(exceptionString);\n text.setEditable(false);\n errorComposite.setClient(text);\n return errorComposite;\n}\n"
|
"private static Deque<RefType> superclassPath(RefType t, RefType anchor) {\n Deque<RefType> r = new ArrayDeque<RefType>();\n r.addFirst(t);\n if (t.getSootClass().isPhantom() && anchor != null) {\n r.addFirst(anchor);\n return r;\n }\n SootClass sc = t.getSootClass();\n while (sc.hasSuperclass()) {\n sc = sc.getSuperclass();\n r.addFirst(sc.getType());\n if (sc.isPhantom() && anchor != null) {\n r.addFirst(anchor);\n break;\n }\n }\n return r;\n}\n"
|
"public void handleReply() throws IOException {\n final long id = protocol.receiveVarint();\n final Result result = pending.get(id);\n if (result == null) {\n return;\n }\n result.timeout = protocol.receiveBoolean();\n if (!result.timeout) {\n final boolean success = protocol.receiveBoolean();\n if (success) {\n result.reply = protocol.receiveBinary();\n } else {\n result.error = protocol.receiveString();\n }\n }\n synchronized (result) {\n result.notify();\n }\n}\n"
|
"private XSDSimpleTypeDefinition getCurSelectedCustomBaseType() {\n IStructuredSelection selection = (IStructuredSelection) comboCustomTypes.getSelection();\n if (selection == null || selection.isEmpty()) {\n return null;\n XSDSimpleTypeDefinition curSelectedCustomBaseType = xsdSimpleType.getSchema().resolveSimpleTypeDefinition(xsdSimpleType.getSchema().getSchemaForSchemaNamespace(), (String) selection.getFirstElement());\n if (!xsdSimpleType.getSchema().getTypeDefinitions().contains(curSelectedCustomBaseType))\n return xsdSimpleType.getSchema().resolveSimpleTypeDefinition(xsdSimpleType.getSchema().getSchemaForSchemaNamespace(), \"String_Node_Str\");\n return curSelectedCustomBaseType;\n}\n"
|
"public void invalidUrlCallBack() {\n CallbackImpl c = new CallbackImpl();\n c.addPathItem(\"String_Node_Str\", pathItem);\n vh.resetResults();\n validator.validate(vh, context, c);\n Assert.assertEquals(\"String_Node_Str\" + vh, 1, vh.getEventsSize());\n String message = vh.getResult().getEvents().get(0).message;\n if (!message.contains(\"String_Node_Str\"))\n Assert.fail(\"String_Node_Str\" + vh);\n}\n"
|
"public void handle(SetCommand request) {\n String key = null;\n try {\n key = URLDecoder.decode(request.getKey(), \"String_Node_Str\");\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n String mapName = \"String_Node_Str\";\n int index = key.indexOf(':');\n if (index != -1) {\n mapName = key.substring(0, index);\n key = key.substring(index + 1);\n }\n Object value = new MemcacheEntry(key, request.getValue(), request.getFlag());\n int ttl = textCommandService.getAdjustedTTLSeconds(request.getExpiration());\n textCommandService.incrementSetCount();\n if (SET == request.getType()) {\n request.setResponse(STORED);\n if (request.shouldReply()) {\n textCommandService.sendResponse(request);\n }\n textCommandService.put(mapName, key, value, ttl);\n } else if (ADD == request.getType()) {\n boolean added = (textCommandService.putIfAbsent(mapName, key, value, ttl) == null);\n if (added) {\n request.setResponse(STORED);\n } else {\n request.setResponse(NOT_STORED);\n }\n if (request.shouldReply()) {\n textCommandService.sendResponse(request);\n }\n } else if (REPLACE == request.getType()) {\n boolean replaced = (textCommandService.replace(mapName, key, value) != null);\n if (replaced) {\n request.setResponse(STORED);\n } else {\n request.setResponse(NOT_STORED);\n }\n if (request.shouldReply()) {\n textCommandService.sendResponse(request);\n }\n }\n}\n"
|
"List<Match> findMatches(ScreenRegion screenRegion, String text) {\n logger.debug(\"String_Node_Str\" + text + \"String_Node_Str\");\n ScreenRegion snapshot = screenRegion.snapshot();\n List<TextMatch> candidateMatches = findCandidateMatches(snapshot, text, getMinScore(), true);\n sortCandidateMatchesByScore(candidateMatches);\n candidateMatches = removeOverlappedMatches(candidateMatches);\n updateFontModelWeights(candidateMatches);\n sortFontModelsByWeight();\n explainer.step(visualize(snapshot.capture(), candidateMatches), \"String_Node_Str\" + text + \"String_Node_Str\");\n return candidateMatches;\n}\n"
|
"public Message sendByEmail(Message message) throws MessagingException, IOException {\n MailAccount mailAccount = message.getMailAccount();\n if (mailAccount == null) {\n return message;\n }\n log.debug(\"String_Node_Str\");\n com.axelor.mail.MailAccount account = new SmtpAccount(mailAccount.getHost(), mailAccount.getPort().toString(), mailAccount.getLogin(), mailAccount.getPassword(), mailAccountService.getSmtpSecurity(mailAccount));\n List<String> replytoRecipients = this.getEmailAddresses(message.getReplyToEmailAddressSet()), toRecipients = this.getEmailAddresses(message.getToEmailAddressSet()), ccRecipients = this.getEmailAddresses(message.getCcEmailAddressSet()), bccRecipients = this.getEmailAddresses(message.getBccEmailAddressSet());\n MailSender sender = new MailSender(account);\n MailBuilder mailBuilder = sender.compose();\n mailBuilder.subject(message.getSubject());\n if (message.getFromEmailAddress() != null) {\n LOG.debug(\"String_Node_Str\", message.getFromEmailAddress().getAddress());\n mailBuilder.from(message.getFromEmailAddress().getAddress());\n }\n if (replytoRecipients != null && !replytoRecipients.isEmpty()) {\n mailBuilder.replyTo(Joiner.on(\"String_Node_Str\").join(toRecipients));\n }\n if (toRecipients != null && !toRecipients.isEmpty()) {\n mailBuilder.to(Joiner.on(\"String_Node_Str\").join(toRecipients));\n }\n if (ccRecipients != null && !ccRecipients.isEmpty()) {\n mailBuilder.cc(Joiner.on(\"String_Node_Str\").join(ccRecipients));\n }\n if (bccRecipients != null && !bccRecipients.isEmpty()) {\n mailBuilder.bcc(Joiner.on(\"String_Node_Str\").join(bccRecipients));\n }\n if (!Strings.isNullOrEmpty(message.getContent())) {\n mailBuilder.html(message.getContent());\n }\n for (MetaAttachment metaAttachment : getMetaAttachments(message)) {\n MetaFile metaFile = metaAttachment.getMetaFile();\n mailBuilder.attach(metaFile.getFileName(), MetaFiles.getPath(metaFile).toString());\n }\n mailBuilder.send();\n message.setSentByEmail(true);\n message.setStatusSelect(MessageRepository.STATUS_SENT);\n message.setSentDateT(LocalDateTime.now());\n return save(message);\n}\n"
|
"private Set<String> getAllPlaceHolders(String fileContent, String encoding, String beginToken, String endToken) {\n Pattern pattern = RegExpUtils.getDefaultPattern(beginToken, endToken);\n Matcher matcher = getPlaceHolderMatcher(fileContent, pattern, encoding, beginToken, endToken);\n Set<String> result = new TreeSet<String>();\n while (matcher.find()) {\n String placeHolder = matcher.group(1);\n result.add(placeHolder);\n }\n return result;\n}\n"
|
"private void writeWals() throws IOException {\n List<Integer> procStates = shuffleProcWriteSequence();\n TestProcedure[] procs = new TestProcedure[numProcs + 1];\n int numProcsPerWal = numWals > 0 ? procStates.size() / numWals : Integer.MAX_VALUE;\n long startTime = currentTimeMillis();\n long lastTime = startTime;\n for (int i = 0; i < procStates.size(); ++i) {\n int procId = procStates.get(i);\n if (procId < 0) {\n store.delete(procs[-procId].getProcId());\n procs[-procId] = null;\n } else if (procs[procId] == null) {\n procs[procId] = new TestProcedure(procId, 0);\n procs[procId].setData(serializedState);\n store.insert(procs[procId], null);\n } else {\n store.update(procs[procId]);\n }\n if (i > 0 && i % numProcsPerWal == 0) {\n long currentTime = currentTimeMillis();\n System.out.println(\"String_Node_Str\" + (currentTime - lastTime) / 1000.0f + \"String_Node_Str\");\n store.rollWriterForTesting();\n lastTime = currentTime;\n }\n }\n long timeTaken = currentTimeMillis() - startTime;\n System.out.println(\"String_Node_Str\" + numProcs + \"String_Node_Str\" + StringUtils.humanTimeDiff(timeTaken) + \"String_Node_Str\");\n}\n"
|
"private String[][] getGridView(boolean selectedOnly, boolean isData) {\n TableModel cellsModel = getDeepModel();\n if (cellsModel != null) {\n int minRow = 0;\n int maxRow = view.getRowCount();\n int columnCount = view.getColumnCount();\n String[][] res = new String[maxRow][columnCount];\n ListSelectionModel rowSelecter = getRowsSelectionModel();\n for (int row = minRow; row < maxRow; row++) {\n if (selectedOnly) {\n if (rowSelecter.isSelectedIndex(row)) {\n res[row] = transformRow(row, selectedOnly, isData);\n }\n } else {\n res[row] = transformRow(row, selectedOnly, isData);\n }\n }\n return res;\n } else {\n return new String[0][0];\n }\n}\n"
|
"protected void onHandleIntent(Intent intent) {\n boolean downloadFavIconsExclusive = intent.getBooleanExtra(DOWNLOAD_FAVICONS_EXCLUSIVE, false);\n DatabaseConnectionOrm dbConn = new DatabaseConnectionOrm(this);\n Notification notify = BuildNotification();\n List<Feed> feedList = dbConn.getListOfFeeds();\n FavIconHandler favIconHandler = new FavIconHandler(this);\n for (Feed feed : feedList) {\n favIconHandler.PreCacheFavIcon(feed);\n }\n if (!downloadFavIconsExclusive) {\n long lastId = intent.getLongExtra(LAST_ITEM_ID, 0);\n List<RssItem> rssItemList = dbConn.getAllItemsWithIdHigher(lastId);\n List<String> links = new ArrayList<String>();\n for (RssItem rssItem : rssItemList) {\n String body = rssItem.getBody();\n links.addAll(ImageHandler.getImageLinksFromText(body));\n }\n maxCount = links.size();\n if (maxCount > 0)\n notificationManager.notify(NOTIFICATION_ID, notify);\n for (String link : links) new GetImageAsyncTask(link, imgDownloadFinished, 999, FileUtils.getPathImageCache(this), this, null).execute();\n }\n}\n"
|
"public static File getTempDirecory(final String prefix, final String suffix) {\n return getTempDirectory(prefix, suffix);\n}\n"
|
"public Vector<TreeReference> evalNodeset(DataInstance model, EvaluationContext evalContext) {\n if (expr instanceof XPathPathExpr) {\n return ((XPathPathExpr) expr).eval(model, evalContext).getReferences();\n } else {\n throw new FatalException(\"String_Node_Str\");\n }\n}\n"
|
"public boolean checkTrigger(GameEvent event, Game game) {\n if (event.getType() == GameEvent.EventType.SPELL_CAST) {\n Spell spell = game.getStack().getSpell(event.getTargetId());\n if (spell != null && game.getOpponents(super.getControllerId()).contains(spell.getControllerId()) && game.getActivePlayerId().equals(super.getControllerId())) {\n return true;\n }\n }\n if (event.getType() == GameEvent.EventType.ZONE_CHANGE && getSourceId().equals(event.getTargetId())) {\n ZoneChangeEvent zce = (ZoneChangeEvent) event;\n return zce.getFromZone().equals(Zone.BATTLEFIELD) && zce.getToZone().equals(Zone.GRAVEYARD);\n }\n return false;\n}\n"
|
"public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {\n if (getCurrentObject() == null) {\n initializeRecord(atts);\n }\n if ((null != xPathNode.getXPathFragment() && xPathNode.getXPathFragment().nameIsText()) || xpathNodeIsMixedContent) {\n xpathNodeIsMixedContent = false;\n NodeValue xPathNodeUnmarshalNodeValue = xPathNode.getUnmarshalNodeValue();\n if (null != xPathNodeUnmarshalNodeValue) {\n xPathNodeUnmarshalNodeValue.endElement(xPathFragment, this);\n if (xPathNode.getParent() != null) {\n xPathNode = xPathNode.getParent();\n }\n }\n }\n if (null == rootElementName && null == rootElementLocalName) {\n rootElementLocalName = localName;\n rootElementName = qName;\n rootElementNamespaceUri = namespaceURI;\n schemaLocation = atts.getValue(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_LOCATION);\n noNamespaceSchemaLocation = atts.getValue(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.NO_NS_SCHEMA_LOCATION);\n }\n try {\n if (null != selfRecords) {\n for (int x = 0, selfRecordsSize = selfRecords.size(); x < selfRecordsSize; x++) {\n UnmarshalRecord selfRecord = selfRecords.get(x);\n if (selfRecord == null) {\n getFragmentBuilder().startElement(namespaceURI, localName, qName, atts);\n } else {\n selfRecord.startElement(namespaceURI, localName, qName, atts);\n }\n }\n }\n if (unmappedLevel != -1 && unmappedLevel <= levelIndex) {\n levelIndex++;\n return;\n }\n XPathNode node = getNonAttributeXPathNode(namespaceURI, localName, qName, atts);\n if (null == node) {\n NodeValue parentNodeValue = xPathNode.getUnmarshalNodeValue();\n if ((null == xPathNode.getXPathFragment()) && (parentNodeValue != null)) {\n XPathFragment parentFragment = new XPathFragment();\n if (namespaceURI != null && namespaceURI.length() == 0) {\n parentFragment.setLocalName(qName);\n parentFragment.setNamespaceURI(null);\n } else {\n parentFragment.setLocalName(localName);\n parentFragment.setNamespaceURI(namespaceURI);\n }\n if (parentNodeValue.startElement(parentFragment, this, atts)) {\n levelIndex++;\n } else {\n startUnmappedElement(namespaceURI, localName, qName, atts);\n return;\n }\n } else {\n levelIndex++;\n startUnmappedElement(namespaceURI, localName, qName, atts);\n return;\n }\n } else {\n xPathNode = node;\n unmarshalContext.startElement(this);\n levelIndex++;\n isXsiNil = atts.getIndex(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_NIL_ATTRIBUTE) >= 0;\n NodeValue nodeValue = node.getUnmarshalNodeValue();\n if (null != nodeValue) {\n if (!nodeValue.startElement(xPathFragment, this, atts)) {\n startUnmappedElement(namespaceURI, localName, qName, atts);\n return;\n }\n }\n for (int i = 0, size = atts.getLength(); i < size; i++) {\n String attNamespace = atts.getURI(i);\n String attLocalName = atts.getLocalName(i);\n String value = atts.getValue(i);\n NodeValue attributeNodeValue = null;\n if ((attLocalName == null) || (attLocalName.length() == 0)) {\n String qname = atts.getQName(i);\n if ((qname != null) && (qname.length() > 0)) {\n int idx = qname.indexOf(XMLConstants.COLON);\n if (idx > 0) {\n attLocalName = qname.substring(idx + 1, qname.length());\n String attPrefix = qname.substring(0, idx);\n if (attPrefix.equals(XMLConstants.XMLNS)) {\n attNamespace = XMLConstants.XMLNS_URL;\n }\n } else {\n attLocalName = qname;\n if (attLocalName.equals(XMLConstants.XMLNS)) {\n attNamespace = XMLConstants.XMLNS_URL;\n }\n }\n }\n }\n if (this.selfRecords != null) {\n for (int j = 0; j < selfRecords.size(); j++) {\n UnmarshalRecord nestedRecord = selfRecords.get(j);\n if (nestedRecord != null) {\n attributeNodeValue = nestedRecord.getAttributeChildNodeValue(attNamespace, attLocalName);\n if (attributeNodeValue != null) {\n attributeNodeValue.attribute(nestedRecord, attNamespace, attLocalName, value);\n }\n }\n }\n }\n if (attributeNodeValue == null) {\n attributeNodeValue = this.getAttributeChildNodeValue(attNamespace, attLocalName);\n if (attributeNodeValue != null) {\n attributeNodeValue.attribute(this, attNamespace, attLocalName, value);\n } else {\n if (xPathNode.getAnyAttributeNodeValue() != null) {\n xPathNode.getAnyAttributeNodeValue().attribute(this, attNamespace, attLocalName, value);\n }\n }\n }\n }\n }\n } catch (EclipseLinkException e) {\n if ((null == xmlReader) || (null == xmlReader.getErrorHandler())) {\n throw e;\n } else {\n SAXParseException saxParseException = new SAXParseException(null, null, null, 0, 0, e);\n xmlReader.getErrorHandler().error(saxParseException);\n }\n }\n}\n"
|
"private final boolean needsResize() {\n int lengthThreshold = length.get();\n lengthThreshold -= lengthThreshold >> 2;\n return length.get() < maxLength && entries.get() >= lengthThreshold;\n}\n"
|
"public void chat(String message) {\n if (message.length() > 100) {\n kick(\"String_Node_Str\");\n }\n message = message.trim();\n Matcher m = badChatPattern.matcher(message);\n String out = message;\n if (m.find() && !this.canIgnoreRestrictions()) {\n out = message.replaceAll(m.group(), \"String_Node_Str\");\n }\n message = out;\n if (message.startsWith(\"String_Node_Str\")) {\n executeCommand(message.split(\"String_Node_Str\"));\n } else {\n if (isMuted()) {\n notice(\"String_Node_Str\");\n } else {\n String format = \"String_Node_Str\" + Colors.WHITE + \"String_Node_Str\";\n String prefix = getPrefix();\n ArrayList<Player> receivers = Canary.getServer().getPlayerList();\n ChatHook hook = new ChatHook(this, getPrefix(), message, \"String_Node_Str\" + Colors.WHITE + \"String_Node_Str\", receivers);\n Canary.hooks().callHook(hook);\n if (hook.isCanceled()) {\n return;\n }\n receivers = hook.getReceiverList();\n String formattedMessage = hook.getFormat().replace(\"String_Node_Str\", hook.getPrefix()).replace(\"String_Node_Str\", getName()).replace(\"String_Node_Str\", getGroup().getName());\n for (Player player : receivers) {\n if ((formattedMessage.length() - 8 + hook.getMessage().length()) >= 100) {\n player.sendMessage(formattedMessage.replace(\"String_Node_Str\", \"String_Node_Str\"));\n player.sendMessage(hook.getMessage());\n } else {\n player.sendMessage(formattedMessage.replace(\"String_Node_Str\", hook.getMessage()));\n }\n }\n Canary.logInfo(TextFormat.removeFormatting(formattedMessage.replace(\"String_Node_Str\", hook.getMessage())));\n }\n }\n}\n"
|
"private boolean ltmHeuristic() {\n if (_visualStm.getCount() >= 1) {\n List<Link> hypothesisChildren = _visualStm.getItem(0).getChildren();\n if (hypothesisChildren.isEmpty())\n return false;\n ListPattern test = hypothesisChildren.get(0).getTest();\n if (test.isEmpty())\n return false;\n Pattern first = test.getItem(0);\n if (first instanceof ItemSquarePattern) {\n ItemSquarePattern ios = (ItemSquarePattern) first;\n _fixationX = ios.getColumn();\n _fixationY = ios.getRow();\n for (Link link : hypothesisChildren) {\n if (link.getTest().size() == 1) {\n if (link.getTest().getItem(0) instanceof ItemSquarePattern) {\n ItemSquarePattern testIos = (ItemSquarePattern) link.getTest().getItem(0);\n if (testIos.getColumn() == _fixationX && testIos.getRow() == _fixationY && testIos.getItem().equals(_currentScene.getItem(_fixationY, _fixationX))) {\n _visualStm.replaceHypothesis(link.getChildNode());\n _lastHeuristic = 1;\n return true;\n }\n }\n }\n }\n }\n }\n return false;\n}\n"
|
"public void dumpControllerStateLocked(PrintWriter pw, int filterUid) {\n pw.println(\"String_Node_Str\");\n Iterator<JobStatus> it = mTrackedTasks.iterator();\n while (it.hasNext()) {\n JobStatus js = it.next();\n if (!js.shouldDump(filterUid)) {\n continue;\n }\n pw.print(\"String_Node_Str\");\n js.printUniqueId(pw);\n pw.print(\"String_Node_Str\");\n UserHandle.formatUid(pw, js.getSourceUid());\n pw.println();\n }\n int N = mObservers.size();\n if (N > 0) {\n pw.println(\"String_Node_Str\");\n for (int i = 0; i < N; i++) {\n ObserverInstance obs = mObservers.valueAt(i);\n int M = obs.mJobs.size();\n boolean shouldDump = false;\n for (int j = 0; j < M; j++) {\n JobInstance inst = obs.mJobs.valueAt(j);\n if (inst.mJobStatus.shouldDump(filterUid)) {\n shouldDump = true;\n break;\n }\n }\n if (!shouldDump) {\n continue;\n }\n pw.print(\"String_Node_Str\");\n JobInfo.TriggerContentUri trigger = mObservers.keyAt(i);\n pw.print(trigger.getUri());\n pw.print(\"String_Node_Str\");\n pw.print(Integer.toHexString(trigger.getFlags()));\n pw.print(\"String_Node_Str\");\n pw.print(System.identityHashCode(obs));\n pw.println(\"String_Node_Str\");\n pw.println(\"String_Node_Str\");\n for (int j = 0; j < M; j++) {\n JobInstance inst = obs.mJobs.valueAt(j);\n pw.print(\"String_Node_Str\");\n inst.mJobStatus.printUniqueId(pw);\n pw.print(\"String_Node_Str\");\n UserHandle.formatUid(pw, inst.mJobStatus.getSourceUid());\n if (inst.mChangedAuthorities != null) {\n pw.println(\"String_Node_Str\");\n if (inst.mTriggerPending) {\n pw.print(\"String_Node_Str\");\n TimeUtils.formatDuration(inst.mJobStatus.getTriggerContentUpdateDelay(), pw);\n pw.print(\"String_Node_Str\");\n TimeUtils.formatDuration(inst.mJobStatus.getTriggerContentMaxDelay(), pw);\n pw.println();\n }\n pw.println(\"String_Node_Str\");\n for (int k = 0; k < inst.mChangedAuthorities.size(); k++) {\n pw.print(\"String_Node_Str\");\n pw.println(inst.mChangedAuthorities.valueAt(k));\n }\n if (inst.mChangedUris != null) {\n pw.println(\"String_Node_Str\");\n for (int k = 0; k < inst.mChangedUris.size(); k++) {\n pw.print(\"String_Node_Str\");\n pw.println(inst.mChangedUris.valueAt(k));\n }\n }\n } else {\n pw.println();\n }\n }\n }\n }\n}\n"
|
"public Object getResult(ReusableBuffer data) {\n final utimensResponse resp = new utimensResponse();\n resp.deserialize(data);\n return null;\n}\n"
|
"void constructorTest() {\n List<FixtureColumn> columns = new ArrayList<>();\n columns.add(new FixtureColumn(\"String_Node_Str\", \"String_Node_Str\"));\n columns.add(new FixtureColumn(\"String_Node_Str\", \"String_Node_Str\"));\n TableSchema tableSchema = new TableSchema(\"String_Node_Str\", columns);\n assertThat(tableSchema.getName()).isEqualTo(\"String_Node_Str\");\n assertThat(tableSchema.getColumns()).isEqualTo(columns);\n}\n"
|
"public static boolean isBrandingChanged() {\n if (!initialized) {\n if (CommonUIPlugin.isFullyHeadless()) {\n isBrandingChanged = false;\n } else {\n IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(IBrandingService.class);\n final String fullProductName = brandingService.getFullProductName();\n Display display = Display.getDefault();\n if (display == null) {\n display = Display.getCurrent();\n }\n display.syncExec(new Runnable() {\n\n public void run() {\n IPreferenceStore preferenceStore = CoreRuntimePlugin.getInstance().getPreferenceStore();\n String oldBrandingName = preferenceStore.getString(LAST_STARTED_PRODUCT);\n if (oldBrandingName == null || oldBrandingName.equals(\"String_Node_Str\") || !oldBrandingName.equals(fullProductName)) {\n isBrandingChanged = true;\n preferenceStore.setValue(LAST_STARTED_PRODUCT, fullProductName);\n }\n }\n });\n }\n }\n initialized = true;\n }\n return isBrandingChanged;\n}\n"
|
"public TypeMirror getType() {\n TypeMirror propertyType = property.getPropertyType();\n MapType mapType = MapTypeUtil.findMapType(propertyType);\n if (mapType != null) {\n propertyType = mapType;\n }\n return propertyType;\n}\n"
|
"public List<Pool> createAndEnrichPools(Pool masterPool, List<Pool> existingPools) {\n List<Pool> pools = new LinkedList<Pool>();\n long calculated = this.calculateQuantity(masterPool.getQuantity() != null ? masterPool.getQuantity() : 1, masterPool.getProduct(), masterPool.getUpstreamPoolId());\n masterPool.setQuantity(calculated);\n String virtOnly = masterPool.getProductAttributeValue(Product.Attributes.VIRT_ONLY);\n if (virtOnly != null && !virtOnly.isEmpty()) {\n masterPool.setAttribute(Pool.Attributes.VIRT_ONLY, virtOnly);\n } else {\n masterPool.removeAttribute(Pool.Attributes.VIRT_ONLY);\n }\n log.info(\"String_Node_Str\", masterPool);\n if (masterPool.getSubscriptionId() != null) {\n if (!hasMasterPool(existingPools)) {\n if (masterPool.getSubscriptionSubKey() != null && masterPool.getSubscriptionSubKey().contentEquals(\"String_Node_Str\")) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n pools.add(masterPool);\n log.info(\"String_Node_Str\", masterPool);\n }\n pools.add(masterPool);\n log.info(\"String_Node_Str\", masterPool);\n }\n Pool bonusPool = createBonusPool(masterPool, existingPools);\n if (bonusPool != null) {\n pools.add(bonusPool);\n }\n return pools;\n}\n"
|
"public Topology createTopologyAsTemplate(String name, String description, String version, String workspace, String fromTopologyId) {\n NameValidationUtils.validate(\"String_Node_Str\", name);\n Csar csar = new Csar(name, StringUtils.isNotBlank(version) ? version : VersionUtil.DEFAULT_VERSION_NAME);\n csar.setWorkspace(workspace);\n csar.setDelegateType(ArchiveDelegateType.CATALOG.toString());\n if (description == null) {\n csar.setDescription(\"String_Node_Str\");\n } else {\n csar.setDescription(\"String_Node_Str\" + description);\n }\n Topology topology;\n if (fromTopologyId != null) {\n topology = alienDAO.findById(Topology.class, fromTopologyId);\n } else {\n topology = new Topology();\n }\n topology.setDescription(description);\n topology.setArchiveName(csar.getName());\n topology.setArchiveVersion(csar.getVersion());\n topology.setWorkspace(csar.getWorkspace());\n csar.setDependencies(topology.getDependencies());\n archiveIndexer.importNewArchive(csar, topology, null);\n return topology;\n}\n"
|
"public ProgramRunner create(ProgramType programType) {\n ProgramRuntimeProvider provider = runtimeProviderLoader.get(programType);\n if (provider != null) {\n LOG.debug(\"String_Node_Str\", provider, programType);\n return provider.createProgramRunner(programType, mode, injector);\n }\n Provider<ProgramRunner> defaultProvider = defaultRunnerProviders.get(programType);\n if (defaultProvider == null) {\n throw new IllegalArgumentException(\"String_Node_Str\" + programType);\n }\n return defaultProvider.get();\n}\n"
|
"private void initializeWithDefault(File aConfigDirectory) {\n try (InputStream theDefaultConfiguration = getClass().getResourceAsStream(\"String_Node_Str\")) {\n if (theDefaultConfiguration != null) {\n loadConfigurationFrom(theDefaultConfiguration);\n } else {\n LOGGER.error(\"String_Node_Str\");\n configuration = new Configuration(aConfigDirectory);\n }\n } catch (Exception e) {\n LOGGER.error(\"String_Node_Str\", e);\n configuration = new Configuration(aConfigDirectory);\n }\n writeConfiguration();\n}\n"
|
"public static CompletionProposal finaliseProposal(int offset, short type, int currentlen, String name, String display, String help) {\n Assert.isNotNull(name, \"String_Node_Str\");\n Assert.isNotNull(display, \"String_Node_Str\");\n Assert.isNotNull(help, \"String_Node_Str\");\n Assert.isTrue(currentlen <= name.length(), \"String_Node_Str\");\n String replacementString = name.substring(currentlen, name.length());\n int insertlen = replacementString.length();\n org.eclipse.swt.graphics.Image img = null;\n switch(type) {\n case ATTRTYPE:\n replacementString += \"String_Node_Str\";\n insertlen += \"String_Node_Str\".length();\n img = CFPluginImages.get(CFPluginImages.ICON_ATTR);\n break;\n case TAGTYPE:\n img = CFPluginImages.get(CFPluginImages.ICON_TAG);\n break;\n case VALUETYPE:\n img = CFPluginImages.get(CFPluginImages.ICON_VALUE);\n break;\n case SCOPETYPE:\n img = CFPluginImages.get(CFPluginImages.ICON_VALUE);\n break;\n case PARAMETERTYPE:\n insertlen = name.length();\n img = CFPluginImages.get(CFPluginImages.ICON_VALUE);\n break;\n }\n CompletionProposal prop = new CompletionProposal(replacementString, offset, 0, insertlen, img, display, null, help);\n return prop;\n}\n"
|
"public void prepareJoinExpressions(AbstractSession session) {\n setIsOuterJoinedAttributeQuery(false);\n Expression lastJoinedAttributeBaseExpression = null;\n List groupedExpressionList = new ArrayList(getJoinedAttributeExpressions().size());\n for (int index = 0; index < getJoinedAttributeExpressions().size(); index++) {\n Expression expression = getJoinedAttributeExpressions().get(index);\n expression = prepareJoinExpression(expression, session);\n lastJoinedAttributeBaseExpression = addExpressionAndBaseToGroupedList(expression, groupedExpressionList, lastJoinedAttributeBaseExpression);\n }\n this.setJoinedAttributeExpressions_(groupedExpressionList);\n for (int index = 0; index < getJoinedMappingExpressions().size(); index++) {\n Expression expression = getJoinedMappingExpressions().get(index);\n prepareJoinExpression(expression, session);\n }\n}\n"
|
"protected VirtualIdentificationVariableFinder getVirtualIdentificationVariableFinder() {\n if (virtualIdentificationVariableFinder == null) {\n virtualIdentificationVariableFinder = new BaseDeclarationIdentificationVariableFinder();\n }\n return virtualIdentificationVariableFinder;\n}\n"
|
"public boolean handle(World world, BlockPos pos, EnumFacing direction, ItemStack stack, EntityPlayer player, IStripesActivator activator) {\n int pipesToTry = 8;\n int pipeWireColor = stack.getItemDamage();\n Vec3 p = Utils.convert(pos);\n while (pipesToTry > 0) {\n p.moveBackwards(1.0);\n TileEntity tile = world.getTileEntity((int) p.x, (int) p.y, (int) p.z);\n if (tile instanceof TileGenericPipe) {\n TileGenericPipe pipeTile = (TileGenericPipe) tile;\n if (!pipeTile.pipe.wireSet[pipeWireColor]) {\n pipeTile.pipe.wireSet[pipeWireColor] = true;\n pipeTile.pipe.signalStrength[pipeWireColor] = 0;\n pipeTile.pipe.updateSignalState();\n pipeTile.scheduleRenderUpdate();\n world.notifyBlocksOfNeighborChange(pipeTile.xCoord, pipeTile.yCoord, pipeTile.zCoord, pipeTile.getBlock());\n return true;\n } else {\n pipesToTry--;\n continue;\n }\n } else {\n break;\n }\n }\n return false;\n}\n"
|
"void loadSceneAssets() {\n SKTextureAtlas atlas = new SKTextureAtlas(\"String_Node_Str\");\n sharedProjectileSparkEmitter = APAUtils.getEmitterNodeByName(\"String_Node_Str\");\n sharedSpawnEmitter = APAUtils.getEmitterNodeByName(\"String_Node_Str\");\n sharedSmallTree = new APATree(new NSArray<SKSpriteNode>(SKSpriteNode.create(atlas.getTexture(\"String_Node_Str\")), SKSpriteNode.create(atlas.getTexture(\"String_Node_Str\")), SKSpriteNode.create(atlas.getTexture(\"String_Node_Str\"))), 25.0);\n sharedBigTree = new APATree(new NSArray<SKSpriteNode>(SKSpriteNode.create(atlas.getTexture(\"String_Node_Str\")), SKSpriteNode.create(atlas.getTexture(\"String_Node_Str\")), SKSpriteNode.create(atlas.getTexture(\"String_Node_Str\"))), 150.0);\n sharedBigTree.setFadesAlpha(true);\n sharedLeafEmitterA = APAUtils.getEmitterNodeByName(\"String_Node_Str\");\n sharedLeafEmitterB = APAUtils.getEmitterNodeByName(\"String_Node_Str\");\n loadWorldTiles();\n APAArcher.loadSharedAssets();\n APABoss.loadSharedAssets();\n APACave.loadSharedAssets();\n APAGoblin.loadSharedAssets();\n APAHeroCharacter.loadSharedAssets();\n APAWarrior.loadSharedAssets();\n}\n"
|
"public static void setUpBeforeClass() throws Exception {\n utility = new HBaseZKTestingUtility();\n utility.startMiniZKCluster();\n conf = utility.getConfiguration();\n conf.setBoolean(HConstants.REPLICATION_BULKLOAD_ENABLE_KEY, true);\n zkw = utility.getZooKeeperWatcher();\n String replicationZNodeName = conf.get(\"String_Node_Str\", \"String_Node_Str\");\n replicationZNode = ZNodePaths.joinZNode(zkw.getZNodePaths().baseZNode, replicationZNodeName);\n KEY_ONE = initPeerClusterState(\"String_Node_Str\");\n KEY_TWO = initPeerClusterState(\"String_Node_Str\");\n}\n"
|
"public void insertMessageAfterStart(String chatString) {\n Element root = this.document.getDefaultRootElement();\n try {\n this.document.insertBeforeStart(root.getElement(0), chatString);\n } catch (BadLocationException e) {\n logger.error(\"String_Node_Str\", e);\n } catch (IOException e) {\n logger.error(\"String_Node_Str\", e);\n }\n if (!isHistory)\n this.ensureDocumentSize();\n this.scrollToBottom();\n}\n"
|
"private void clearLocals() {\n catchVariableIndex = 0;\n}\n"
|
"private void addPagingListener(Paginal pgi) {\n if (_pgListener == null)\n _pgListener = new PGListener();\n pgi.addEventListener(ZulEvents.ON_PAGING, _pgListener);\n if (_pgImpListener == null)\n _pgImpListener = new SerializableEventListener<Event>() {\n public void onEvent(Event event) {\n if (_rows != null && _model != null && inPagingMold()) {\n final Paginal pgi = getPaginal();\n int pgsz = pgi.getPageSize();\n final int ofs = pgi.getActivePage() * pgsz;\n if (_rod) {\n getDataLoader().syncModel(ofs, pgsz);\n }\n postOnPagingInitRender();\n }\n if (getModel() != null || getPagingPosition().equals(\"String_Node_Str\"))\n invalidate();\n else if (_rows != null) {\n _rows.invalidate();\n if (_frozen != null)\n _frozen.invalidate();\n }\n }\n };\n pgi.addEventListener(\"String_Node_Str\", _pgImpListener);\n}\n"
|
"public ValuesWriter getValuesWriter(ColumnDescriptor path, int initialSizePerCol) {\n switch(path.getType()) {\n case BOOLEAN:\n if (writerVersion == WriterVersion.PARQUET_1_0) {\n return new BooleanPlainValuesWriter();\n } else if (writerVersion == WriterVersion.PARQUET_2_0) {\n return new RunLengthBitPackingHybridValuesWriter(1, initialSizePerCol);\n }\n break;\n case BINARY:\n if (enableDictionary) {\n return new PlainBinaryDictionaryValuesWriter(dictionaryPageSizeThreshold, initialSizePerCol);\n } else {\n if (writerVersion == WriterVersion.PARQUET_1_0) {\n return new PlainValuesWriter(initialSizePerCol);\n } else if (writerVersion == WriterVersion.PARQUET_2_0) {\n return new DeltaByteArrayWriter(initialSizePerCol);\n }\n }\n break;\n case INT32:\n if (enableDictionary) {\n return new PlainIntegerDictionaryValuesWriter(dictionaryPageSizeThreshold, initialSizePerCol);\n } else {\n if (writerVersion == WriterVersion.PARQUET_1_0) {\n return new PlainValuesWriter(initialSizePerCol);\n } else if (writerVersion == WriterVersion.PARQUET_2_0) {\n return new DeltaBinaryPackingValuesWriter(initialSizePerCol);\n }\n }\n break;\n case INT64:\n if (enableDictionary) {\n return new PlainLongDictionaryValuesWriter(dictionaryPageSizeThreshold, initialSizePerCol);\n } else {\n return new PlainValuesWriter(initialSizePerCol);\n }\n case INT96:\n if (enableDictionary) {\n return new PlainFixedLenArrayDictionaryValuesWriter(dictionaryPageSizeThreshold, initialSizePerCol, 12);\n } else {\n return new FixedLenByteArrayPlainValuesWriter(12, initialSizePerCol);\n }\n case DOUBLE:\n if (enableDictionary) {\n return new PlainDoubleDictionaryValuesWriter(dictionaryPageSizeThreshold, initialSizePerCol);\n } else {\n return new PlainValuesWriter(initialSizePerCol);\n }\n case FLOAT:\n if (enableDictionary) {\n return new PlainFloatDictionaryValuesWriter(dictionaryPageSizeThreshold, initialSizePerCol);\n } else {\n return new PlainValuesWriter(initialSizePerCol);\n }\n case FIXED_LEN_BYTE_ARRAY:\n return new FixedLenByteArrayPlainValuesWriter(path.getTypeLength(), initialSizePerCol);\n default:\n return new PlainValuesWriter(initialSizePerCol);\n }\n return null;\n}\n"
|
"public static void setupTest() throws Exception {\n tmpDir = \"String_Node_Str\" + System.getProperty(\"String_Node_Str\");\n String textTemplate = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n String text = String.format(textTemplate, tmpDir, tmpDir);\n String fileName = tmpDir + \"String_Node_Str\";\n filePath = new Path(fileName);\n FileSystem fs = filePath.getFileSystem(config);\n FSDataOutputStream outStream = fs.create(filePath, true);\n OutputStreamWriter writer = null;\n writer = new OutputStreamWriter(outStream);\n writer.write(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n writer.close();\n RangerConfiguration config = RangerConfiguration.getInstance();\n config.addResource(filePath);\n tagStore = TagFileStore.getInstance();\n tagStore.init();\n ServiceStore svcStore;\n svcStore = new ServiceFileStore();\n svcStore.init();\n tagStore.setServiceStore(svcStore);\n validator = new TagValidator();\n validator.setTagStore(tagStore);\n gsonBuilder = new GsonBuilder().setDateFormat(\"String_Node_Str\").setPrettyPrinting().create();\n InputStream inStream = TestTagStore.class.getResourceAsStream(serviceDefJsonFile);\n InputStreamReader reader = new InputStreamReader(inStream);\n serviceDef = gsonBuilder.fromJson(reader, RangerServiceDef.class);\n service = svcStore.createService(new RangerService(serviceDef.getName(), serviceName, serviceName, null, null));\n reader.close();\n inStream.close();\n}\n"
|
"public <T> T convert(Object source, Class<T> target) throws Exception {\n Preconditions.checkArgument(source == null || source.getClass().equals(String.class));\n Preconditions.checkArgument(target.isArray());\n Preconditions.checkArgument(target.getComponentType().isPrimitive());\n final FieldType arrayType = FieldType.forBinding(target);\n Preconditions.checkState(arrayType.getBinding().isArray());\n final List<String> list = Splitter.on(';').omitEmptyStrings().trimResults().splitToList((CharSequence) source);\n final int length = list.size();\n Object array = Array.newInstance(target.getComponentType(), length);\n for (int i = 0; i < length; i++) {\n String val = list.get(i);\n switch(arrayType) {\n case BOOLEAN_ARRAY:\n Array.setBoolean(array, i, Boolean.parseBoolean(val));\n break;\n case BYTE_ARRAY:\n Array.setByte(array, i, Byte.parseByte(val));\n break;\n case SHORT_ARRAY:\n Array.setShort(array, i, Short.parseShort(val));\n break;\n case INTEGER_ARRAY:\n Array.setInt(array, i, Integer.parseInt(val));\n break;\n case LONG_ARRAY:\n Array.setLong(array, i, Long.parseLong(val));\n break;\n case FLOAT_ARRAY:\n Array.setFloat(array, i, Float.parseFloat(val));\n break;\n case DOUBLE_ARRAY:\n Array.setDouble(array, i, Double.parseDouble(val));\n break;\n default:\n throw new IllegalArgumentException();\n }\n }\n return (T) array;\n}\n"
|
"public void recordResourceReferences(ResourceFolderType folderType, Node node, Resource from) {\n short nodeType = node.getNodeType();\n if (nodeType == Node.ELEMENT_NODE) {\n Element element = (Element) node;\n if (from != null) {\n NamedNodeMap attributes = element.getAttributes();\n for (int i = 0, n = attributes.getLength(); i < n; i++) {\n Attr attr = (Attr) attributes.item(i);\n if (TOOLS_URI.equals(attr.getNamespaceURI())) {\n recordToolsAttributes(attr);\n continue;\n }\n String value = attr.getValue();\n if (!(value.startsWith(PREFIX_RESOURCE_REF) || value.startsWith(PREFIX_THEME_REF))) {\n continue;\n }\n ResourceUrl url = ResourceUrl.parse(value);\n if (url != null && !url.framework) {\n Resource resource;\n if (url.create) {\n resource = declareResource(url.type, url.name, attr);\n from.addReference(resource);\n } else {\n resource = addResource(url.type, url.name, null);\n from.addReference(resource);\n }\n }\n }\n }\n }\n}\n"
|
"public static boolean acceptMagnetAndUpdateAutoConnection(WiresConnection connection, boolean isHead, WiresShape headS, WiresShape tailS, WiresMagnet currentMagnet) {\n WiresConnector connector = connection.getConnector();\n boolean accept = true;\n final boolean isAuto = connection.isAutoConnection();\n if (!isAuto) {\n if (isHead) {\n accept = accept && connector.getConnectionAcceptor().acceptHead(connection, currentMagnet);\n } else {\n accept = accept && connector.getConnectionAcceptor().acceptTail(connection, currentMagnet);\n }\n if (accept) {\n connection.setMagnet(currentMagnet);\n }\n }\n if (accept) {\n accept = accept && connector.updateForAutoConnections(headS, tailS);\n connector.updateForCenterConnection();\n }\n return accept;\n}\n"
|
"public void resolveTypes(MarkerList markers, IContext context) {\n for (int i = 0; i < this.parameterCount; i++) {\n IParameter param = this.parameters[i];\n if (param.getType() == Types.UNKNOWN) {\n param.setType(null);\n param.resolveTypes(markers, context);\n param.setType(Types.UNKNOWN);\n } else {\n param.resolveTypes(markers, context);\n }\n }\n this.value.resolveTypes(markers, new CombiningContext(this, context));\n}\n"
|
"private void tryClickNLoad(CryptedLink cryptedLink) {\n if (this.isClickNLoadEnabled() && OPEN_CLICK_N_LOAD >= 0 && OPEN_CLICK_N_LOAD <= 25) {\n try {\n JDUtilities.acquireUserIO_Semaphore();\n } catch (InterruptedException e1) {\n return;\n }\n if (OPEN_CLICK_N_LOAD < 0)\n return;\n boolean open = JDUtilities.getGUI().showConfirmDialog(JDLocale.LF(\"String_Node_Str\", \"String_Node_Str\", this.getHost()));\n if (open) {\n try {\n JLinkButton.openURL(cryptedLink.getCryptedUrl());\n OPEN_CLICK_N_LOAD++;\n } catch (Exception e) {\n open = false;\n }\n }\n if (!open) {\n OPEN_CLICK_N_LOAD = -1;\n }\n JDUtilities.releaseUserIO_Semaphore();\n }\n}\n"
|
"private void goToNearestOrigin() {\n double leftDays = mCurrentOrigin.x / (mWidthPerDay + mColumnGap);\n if (mCurrentFlingDirection != Direction.NONE) {\n leftDays = Math.round(leftDays);\n } else if (mCurrentScrollDirection == Direction.LEFT) {\n leftDays = Math.floor(leftDays);\n } else if (mCurrentScrollDirection == Direction.RIGHT) {\n leftDays = Math.ceil(leftDays);\n } else {\n leftDays = Math.round(leftDays);\n }\n int nearestOrigin = (int) (mCurrentOrigin.x - leftDays * (mWidthPerDay + mColumnGap));\n if (nearestOrigin != 0) {\n mScroller.forceFinished(true);\n mScroller.startScroll((int) mCurrentOrigin.x, (int) mCurrentOrigin.y, -nearestOrigin, 0, 50);\n ViewCompat.postInvalidateOnAnimation(WeekView.this);\n }\n mCurrentScrollDirection = mCurrentFlingDirection = Direction.NONE;\n}\n"
|
"public BigInteger distance(Identifier<BigInteger> id) {\n BigInteger dest = ((ChordIdentifier) id).getId();\n if (this.id.compareTo(dest) == -1) {\n return dest.subtract(this.id);\n } else {\n return this.idSpace.getModulus().subtract(this.id).add(dest);\n }\n}\n"
|
"private void populateSuggestedLabel(List<String> addedLabels, Optional<String> suggestion) {\n if (hasNewSuggestion(addedLabels, suggestion)) {\n assignedLabels.getChildren().add(processSuggestedLabel(suggestion.get()));\n }\n}\n"
|
"private RoutineItem createRoutine(IPath path, String label, File initFile, String name) {\n Property property = PropertiesFactory.eINSTANCE.createProperty();\n property.setAuthor(((RepositoryContext) CorePlugin.getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY)).getUser());\n property.setVersion(VersionUtils.DEFAULT_VERSION);\n property.setStatusCode(\"String_Node_Str\");\n property.setLabel(label);\n final RoutineItem routineItem = PropertiesFactory.eINSTANCE.createRoutineItem();\n routineItem.setProperty(property);\n ByteArray byteArray = PropertiesFactory.eINSTANCE.createByteArray();\n InputStream stream = null;\n try {\n stream = initFile.toURL().openStream();\n byte[] innerContent = new byte[stream.available()];\n stream.read(innerContent);\n byteArray.setInnerContent(innerContent);\n } catch (IOException e) {\n ExceptionHandler.process(e);\n } finally {\n if (stream != null) {\n try {\n stream.close();\n } catch (IOException e) {\n }\n }\n }\n String routineContent = new String(byteArray.getInnerContent());\n routineContent = chanageRoutinesPackage(routineContent, name);\n byteArray.setInnerContent(routineContent.getBytes());\n routineItem.setContent(byteArray);\n IProxyRepositoryFactory repositoryFactory = ProxyRepositoryFactory.getInstance();\n try {\n property.setId(repositoryFactory.getNextId());\n repositoryFactory.createParentFoldersRecursively(ERepositoryObjectType.getItemType(routineItem), path);\n repositoryFactory.create(routineItem, path);\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n }\n if (routineItem.eResource() != null)\n addWsdlNeedLib(routineItem);\n return routineItem;\n}\n"
|
"public void moveFolder(ERepositoryObjectType type, IPath sourcePath, IPath targetPath) throws PersistenceException {\n if (RepositoryConstants.isSystemFolder(sourcePath.toString()) || RepositoryConstants.isSystemFolder(targetPath.toString())) {\n return;\n }\n Project project = getRepositoryContext().getProject();\n IProject fsProject = ResourceModelUtils.getProject(project);\n String completeOldPath = ERepositoryObjectType.getFolderName(type) + IPath.SEPARATOR + sourcePath.toString();\n String completeNewPath;\n if (targetPath.equals(\"String_Node_Str\")) {\n completeNewPath = ERepositoryObjectType.getFolderName(type) + IPath.SEPARATOR + sourcePath.lastSegment();\n } else {\n completeNewPath = ERepositoryObjectType.getFolderName(type) + IPath.SEPARATOR + targetPath.toString() + IPath.SEPARATOR + sourcePath.lastSegment();\n }\n if (completeNewPath.equals(completeOldPath)) {\n return;\n }\n IFolder folder = ResourceUtils.getFolder(fsProject, completeOldPath, false);\n FolderHelper folderHelper = getFolderHelper(getRepositoryContext().getProject().getEmfProject());\n FolderItem emfFolder = folderHelper.getFolder(completeOldPath);\n if (emfFolder == null && (type == ERepositoryObjectType.JOB_DOC || type == ERepositoryObjectType.JOBLET_DOC)) {\n IPath path = new Path(sourcePath.toString());\n ProxyRepositoryFactory.getInstance().createParentFoldersRecursively(project, type, path);\n emfFolder = folderHelper.getFolder(completeOldPath);\n }\n createFolder(getRepositoryContext().getProject(), type, targetPath, emfFolder.getProperty().getLabel());\n FolderItem newFolder = folderHelper.getFolder(completeNewPath);\n Item[] childrens = (Item[]) emfFolder.getChildren().toArray();\n for (int i = 0; i < childrens.length; i++) {\n if (childrens[i] instanceof FolderItem) {\n FolderItem children = (FolderItem) childrens[i];\n moveFolder(type, sourcePath.append(children.getProperty().getLabel()), targetPath.append(emfFolder.getProperty().getLabel()));\n } else {\n moveOldContentToNewFolder(project, completeNewPath, emfFolder, newFolder, childrens[i]);\n }\n }\n List<IRepositoryViewObject> serializableFromFolder = getSerializableFromFolder(project, folder, null, type, true, true, true, false);\n for (IRepositoryViewObject object : serializableFromFolder) {\n List<Resource> affectedResources = xmiResourceManager.getAffectedResources(object.getProperty());\n for (Resource resource : affectedResources) {\n IPath path = getPhysicalProject(project).getFullPath().append(completeNewPath).append(resource.getURI().lastSegment());\n xmiResourceManager.moveResource(resource, path);\n }\n }\n deleteFolder(getRepositoryContext().getProject(), type, sourcePath);\n xmiResourceManager.saveResource(getRepositoryContext().getProject().getEmfProject().eResource());\n}\n"
|
"public void run() {\n while (true) {\n updateInfWorld();\n if (Helper.getInstance().getTime() - daylightTimer > 120000) {\n daylight -= 0.2;\n if (daylight <= 0.4f) {\n daylight = 1.0f;\n }\n daylightTimer = Helper.getInstance().getTime();\n updateAllChunks();\n }\n }\n}\n"
|
"public SqlDatabaseImpl withTags(Map<String, String> tags) {\n this.inner().withTags(new HashMap<>(tags));\n return this;\n}\n"
|
"public boolean apply(Game game, Ability source, Ability abilityToModify) {\n CardUtil.increaseCost(abilityToModify, 1);\n return true;\n}\n"
|
"public Object getRelatedOrNull(Object object, IRelationTypeSide relationType) {\n Object related = null;\n ArtifactReadable artifact = atsServer.getArtifact(object);\n if (artifact != null) {\n try {\n related = artifact.getRelated(relationType).getAtMostOneOrNull();\n } catch (ArtifactDoesNotExist ex) {\n }\n }\n return related;\n}\n"
|
"private void buildCoefficientPyramid() {\n int fullWidth;\n int fullHeight;\n double[] fullDual = new double[width * height];\n int halfWidth = width;\n int halfHeight = height;\n basicToCardinal2D(coefficient, fullDual, width, height, 7);\n for (int depth = 1; ((depth <= pyramidDepth) && (!t.isInterrupted())); depth++) {\n IJ.showStatus(\"String_Node_Str\");\n IJ.showProgress((double) depth / (pyramidDepth + extraSteps));\n fullWidth = halfWidth;\n fullHeight = halfHeight;\n halfWidth /= 2;\n halfHeight /= 2;\n if (fullWidth <= BSplineModel.min_image_size || fullHeight <= BSplineModel.min_image_size) {\n if (this.bSubsampledOutput)\n IJ.log(\"String_Node_Str\" + fullWidth + \"String_Node_Str\" + fullHeight);\n cpyramid.push(fullDual);\n cpyramid.push(new Integer(fullHeight));\n cpyramid.push(new Integer(fullWidth));\n halfWidth *= 2;\n halfHeight *= 2;\n continue;\n }\n final double[] halfDual = getHalfDual2D(fullDual, fullWidth, fullHeight);\n final double[] halfCoefficient = getBasicFromCardinal2D(halfDual, halfWidth, halfHeight, 7);\n if (depth >= extraSteps) {\n if (this.bSubsampledOutput)\n IJ.log(\"String_Node_Str\" + halfWidth + \"String_Node_Str\" + halfHeight);\n cpyramid.push(halfCoefficient);\n cpyramid.push(new Integer(halfHeight));\n cpyramid.push(new Integer(halfWidth));\n }\n fullDual = halfDual;\n if (this.bSubsampledOutput && halfWidth == this.subWidth) {\n this.subCoeffs = halfCoefficient;\n }\n }\n smallestWidth = halfWidth;\n smallestHeight = halfHeight;\n currentDepth = pyramidDepth + 1;\n}\n"
|
"void setBeanAndRegisterBeanSameNodes(Component comp, Object val, Binding binding, String path, boolean autoConvert, Object rawval, List loadOnSaveInfos) {\n Object orgVal = null;\n Object bean = null;\n BindingNode currentNode = _pathTree;\n boolean refChanged = false;\n String beanid = null;\n final List nodeids = parseExpression(path, \"String_Node_Str\");\n final List nodes = new ArrayList(nodeids.size());\n final Iterator it = nodeids.iterator();\n if (it != null && it.hasNext()) {\n beanid = (String) it.next();\n currentNode = (BindingNode) currentNode.getKidNode(beanid);\n if (currentNode == null) {\n throw new UiException(\"String_Node_Str\" + path);\n }\n nodes.add(currentNode);\n bean = lookupBean(comp, beanid);\n } else {\n throw new UiException(\"String_Node_Str\" + path);\n }\n if (!it.hasNext()) {\n orgVal = bean;\n if (Objects.equals(orgVal, val)) {\n return;\n }\n if (existsBean(beanid)) {\n setBean(beanid, val);\n } else if (!setZScriptVariable(comp, beanid, val)) {\n final Object owner = comp.getSpaceOwner();\n if (owner instanceof Page) {\n ((Page) owner).setAttribute(beanid, val);\n } else {\n ((Component) owner).setAttribute(beanid, val, true);\n }\n }\n refChanged = true;\n } else {\n if (bean == null) {\n return;\n }\n int sz = nodeids.size() - 2;\n for (; bean != null && it.hasNext() && sz > 0; --sz) {\n beanid = (String) it.next();\n currentNode = (BindingNode) currentNode.getKidNode(beanid);\n if (currentNode == null) {\n throw new UiException(\"String_Node_Str\" + path);\n }\n nodes.add(currentNode);\n try {\n bean = Fields.get(bean, beanid);\n } catch (NoSuchMethodException ex) {\n if (bean instanceof Map) {\n bean = ((Map) bean).get(beanid);\n } else {\n throw UiException.Aide.wrap(ex);\n }\n }\n }\n if (bean == null) {\n return;\n }\n beanid = (String) it.next();\n try {\n orgVal = Fields.get(bean, beanid);\n if (Objects.equals(orgVal, val)) {\n return;\n }\n Fields.set(bean, beanid, val, autoConvert);\n } catch (NoSuchMethodException ex) {\n if (bean instanceof Map) {\n ((Map) bean).put(beanid, val);\n } else {\n throw UiException.Aide.wrap(ex);\n }\n } catch (ModificationException ex) {\n throw UiException.Aide.wrap(ex);\n }\n if (!isPrimitive(val) && !isPrimitive(orgVal)) {\n currentNode = (BindingNode) currentNode.getKidNode(beanid);\n if (currentNode == null) {\n throw new UiException(\"String_Node_Str\" + path);\n }\n nodes.add(currentNode);\n bean = orgVal;\n refChanged = true;\n }\n }\n if (val != null) {\n if (refChanged && !binding.isLoadable() && binding.isSavable()) {\n registerBeanNode(val, currentNode);\n }\n if (rawval instanceof Component) {\n Binding varbinding = getBinding((Component) rawval, \"String_Node_Str\");\n if (varbinding != null) {\n registerBeanNode(val, currentNode);\n getBeanAndRegisterBeanSameNodes((Component) rawval, varbinding.getExpression());\n }\n }\n }\n if (!comp.isListenerAvailable(\"String_Node_Str\", true)) {\n comp.addEventListener(\"String_Node_Str\", _listener);\n }\n Object[] loadOnSaveInfo = new Object[] { this, currentNode, binding, (refChanged ? val : bean), Boolean.valueOf(refChanged), nodes, comp };\n if (loadOnSaveInfos != null) {\n loadOnSaveInfos.add(loadOnSaveInfo);\n } else {\n Events.postEvent(new Event(\"String_Node_Str\", comp, loadOnSaveInfo));\n }\n}\n"
|
"public void populate(LiveOperations liveOperations) {\n for (Queue<WaitingOperation> queue : mapWaitingOps.values()) {\n for (WaitingOperation waitingOperation : queue) {\n Operation operation = waitingOperation.getOperation();\n liveOperations.add(operation.getCallerAddress(), operation.getCallId());\n }\n }\n}\n"
|
"private void loadMediaPackages(HashMap<SdInstallArgs, String> processCids, int[] uidArr, HashSet<String> removeCids) {\n ArrayList<String> pkgList = new ArrayList<String>();\n Set<SdInstallArgs> keys = processCids.keySet();\n boolean doGc = false;\n for (SdInstallArgs args : keys) {\n String codePath = processCids.get(args);\n if (DEBUG_SD_INSTALL)\n Log.i(TAG, \"String_Node_Str\" + args.cid);\n int retCode = PackageManager.INSTALL_FAILED_CONTAINER_ERROR;\n try {\n if (args.doPreInstall(PackageManager.INSTALL_SUCCEEDED) != PackageManager.INSTALL_SUCCEEDED) {\n Slog.e(TAG, \"String_Node_Str\" + args.cid + \"String_Node_Str\");\n continue;\n }\n if (codePath == null || !codePath.equals(args.getCodePath())) {\n Slog.e(TAG, \"String_Node_Str\" + args.cid + \"String_Node_Str\" + args.getCodePath() + \"String_Node_Str\" + codePath);\n continue;\n }\n int parseFlags = PackageParser.PARSE_CHATTY | PackageParser.PARSE_ON_SDCARD | mDefParseFlags;\n doGc = true;\n synchronized (mInstallLock) {\n final PackageParser.Package pkg = scanPackageLI(new File(codePath), parseFlags, 0);\n if (pkg != null) {\n synchronized (mPackages) {\n retCode = PackageManager.INSTALL_SUCCEEDED;\n pkgList.add(pkg.packageName);\n args.doPostInstall(PackageManager.INSTALL_SUCCEEDED);\n }\n } else {\n Slog.i(TAG, \"String_Node_Str\" + codePath + \"String_Node_Str\");\n }\n }\n } finally {\n if (retCode != PackageManager.INSTALL_SUCCEEDED) {\n removeCids.add(args.cid);\n }\n }\n }\n synchronized (mPackages) {\n final boolean regrantPermissions = mSettings.mExternalSdkPlatform != mSdkVersion;\n if (regrantPermissions)\n Slog.i(TAG, \"String_Node_Str\" + mSettings.mExternalSdkPlatform + \"String_Node_Str\" + mSdkVersion + \"String_Node_Str\");\n mSettings.mExternalSdkPlatform = mSdkVersion;\n updatePermissionsLP(null, null, true, regrantPermissions);\n mSettings.writeLP();\n }\n if (pkgList.size() > 0) {\n sendResourcesChangedBroadcast(true, pkgList, uidArr);\n }\n if (doGc) {\n Runtime.getRuntime().gc();\n }\n if (removeCids != null) {\n for (String cid : removeCids) {\n Log.w(TAG, \"String_Node_Str\" + cid + \"String_Node_Str\");\n }\n }\n}\n"
|
"public URL getFileURL(File file) throws MalformedURLException {\n return new URL(toURI(file.getAbsolutePath()));\n}\n"
|
"private void addSmartSenseRecipe(Stack stack, Set<HostGroup> hostGroups) {\n try {\n Cluster cluster = stack.getCluster();\n String blueprintText = cluster.getBlueprint().getBlueprintText();\n if (smartSenseConfigProvider.smartSenseIsConfigurable(blueprintText)) {\n for (HostGroup hostGroup : hostGroups) {\n if (isComponentPresent(blueprintText, \"String_Node_Str\", hostGroup)) {\n String script = FileReaderUtils.readFileFromClasspath(\"String_Node_Str\");\n RecipeScript recipeScript = new RecipeScript(script, POST_CLUSTER_INSTALL);\n Recipe recipe = recipeBuilder.buildRecipes(\"String_Node_Str\", Collections.singletonList(recipeScript)).get(0);\n hostGroup.addRecipe(recipe);\n break;\n }\n }\n }\n } catch (IOException e) {\n LOGGER.warn(\"String_Node_Str\", e);\n }\n}\n"
|
"public ExosuitSlot getSlot() {\n return ExosuitSlot.BODY_TANK;\n}\n"
|
"public Tree call() {\n int n = x.length;\n int k = smile.math.Math.max(y) + 1;\n int[] samples = new int[n];\n if (subsample == 1.0) {\n for (int l = 0; l < k; l++) {\n int nj = 0;\n ArrayList<Integer> cj = new ArrayList<>();\n for (int i = 0; i < n; i++) {\n if (y[i] == l) {\n cj.add(i);\n nj++;\n }\n }\n int size = nj / classWeight[l];\n for (int i = 0; i < size; i++) {\n int xi = Math.randomInt(nj);\n samples[cj.get(xi)] += 1;\n }\n }\n } else {\n int[] perm = new int[n];\n for (int i = 0; i < n; i++) {\n perm[i] = i;\n }\n Math.permutate(perm);\n int[] nc = new int[k];\n for (int i = 0; i < n; i++) {\n nc[y[i]]++;\n }\n for (int l = 0; l < k; l++) {\n int subj = (int) Math.round(nc[l] * subsample / classWeight[l]);\n int count = 0;\n for (int i = 0; i < n && count < subj; i++) {\n int xi = perm[i];\n if (y[xi] == l) {\n samples[xi] += 1;\n count++;\n }\n }\n }\n }\n DecisionTree tree = new DecisionTree(attributes, x, y, maxNodes, nodeSize, mtry, rule, samples.clone(), order);\n int oob = 0;\n int correct = 0;\n for (int i = 0; i < n; i++) {\n if (samples[i] == 0) {\n oob++;\n int p = tree.predict(x[i]);\n if (p == y[i])\n correct++;\n synchronized (prediction[i]) {\n prediction[i][p]++;\n }\n }\n }\n double accuracy = 1.0;\n if (oob != 0) {\n accuracy = (double) correct / oob;\n logger.info(\"String_Node_Str\", oob, String.format(\"String_Node_Str\", 100 * accuracy));\n } else {\n logger.error(\"String_Node_Str\");\n }\n return new Tree(tree, accuracy);\n}\n"
|
"protected void doRun() {\n if (ProxyRepositoryFactory.getInstance().isUserReadOnlyOnCurrentProject()) {\n return;\n }\n final TreeViewer repositoryTreeView = CorePlugin.getDefault().getRepositoryService().getRepositoryTreeView();\n if (repositoryTreeView != null) {\n repositoryTreeView.getTree().setFocus();\n }\n ISelection selection = this.getSelection();\n if (toolbarAction == true) {\n IRepositoryView repositoryView = RepositoryView.show();\n selection = (IStructuredSelection) repositoryView.getViewer().getSelection();\n }\n if (selection instanceof IStructuredSelection) {\n RepositoryNode rNode = null;\n if (((IStructuredSelection) selection).getFirstElement() instanceof RepositoryNode) {\n rNode = (RepositoryNode) ((IStructuredSelection) selection).getFirstElement();\n }\n ImportItemWizard wizard = new ImportItemWizard(null);\n IWorkbench workbench = this.getViewPart().getViewSite().getWorkbenchWindow().getWorkbench();\n wizard.setWindowTitle(IMPORT_ITEM);\n wizard.init(workbench, (IStructuredSelection) selection);\n Shell activeShell = Display.getCurrent().getActiveShell();\n WizardDialog dialog = new WizardDialog(activeShell, wizard);\n if (dialog.open() == Window.OK) {\n refresh();\n if (wizard.isNeedToRefreshPalette()) {\n ComponentUtilities.updatePalette();\n }\n }\n }\n}\n"
|
"public KVMPhysicalDisk getPhysicalDisk(String volumeUuid, KVMStoragePool pool) {\n LibvirtStoragePool libvirtPool = (LibvirtStoragePool) pool;\n try {\n StorageVol vol = getVolume(libvirtPool.getPool(), volumeUuid);\n KVMPhysicalDisk disk;\n LibvirtStorageVolumeDef voldef = getStorageVolumeDef(libvirtPool.getPool().getConnect(), vol);\n disk = new KVMPhysicalDisk(vol.getPath(), vol.getName(), pool);\n disk.setSize(vol.getInfo().allocation);\n disk.setVirtualSize(vol.getInfo().capacity);\n if (pool.getType() == StoragePoolType.RBD) {\n disk.setFormat(PhysicalDiskFormat.RAW);\n } else if (voldef.getFormat() == null) {\n File diskDir = new File(disk.getPath());\n if (diskDir.exists() && diskDir.isDirectory()) {\n disk.setFormat(PhysicalDiskFormat.DIR);\n } else if (volumeUuid.endsWith(\"String_Node_Str\") || volumeUuid.endsWith((\"String_Node_Str\"))) {\n disk.setFormat(PhysicalDiskFormat.TAR);\n } else if (volumeUuid.endsWith(\"String_Node_Str\") || volumeUuid.endsWith((\"String_Node_Str\"))) {\n disk.setFormat(PhysicalDiskFormat.RAW);\n } else {\n disk.setFormat(pool.getDefaultFormat());\n }\n } else if (voldef.getFormat() == LibvirtStorageVolumeDef.volFormat.QCOW2) {\n disk.setFormat(PhysicalDiskFormat.QCOW2);\n } else if (voldef.getFormat() == LibvirtStorageVolumeDef.volFormat.RAW) {\n disk.setFormat(PhysicalDiskFormat.RAW);\n }\n return disk;\n } catch (LibvirtException e) {\n s_logger.debug(\"String_Node_Str\", e);\n throw new CloudRuntimeException(e.toString());\n }\n}\n"
|
"public boolean checkSchema(TdSchema schema) {\n EObject container = schema.eContainer();\n if (container != null) {\n TdCatalog catalog = SwitchHelpers.CATALOG_SWITCH.doSwitch(container);\n if (catalog != null) {\n try {\n connection.setCatalog(catalog.getName());\n DatabaseContentRetriever.getCatalogs(connection);\n List<TdSchema> schemas = null;\n if (connection.getMetaData().getDriverName().equals(DatabaseConstant.MSSQL_DRIVER_NAME_JDBC2_0)) {\n schemas = DatabaseContentRetriever.getMSSQLSchemas(connection).get(catalog.getName());\n } else if (ConnectionUtils.isPostgresql(connection)) {\n schemas = DatabaseContentRetriever.getSchemas(connection).get(null);\n } else {\n schemas = DatabaseContentRetriever.getSchemas(connection).get(catalog.getName());\n }\n if (schemas != null) {\n for (TdSchema tdSchema : schemas) {\n if (tdSchema.getName().equals(schema.getName()))\n return true;\n }\n }\n return false;\n } catch (SQLException e) {\n log.error(e);\n }\n }\n }\n return checkSchemaByName(schema.getName());\n}\n"
|
"public void testConversionOfCardInfo() throws Exception {\n WSMarshaller m = new AndroidMarshaller();\n Object o = m.unmarshal(m.str2doc(npaCif));\n if (!(o instanceof CardInfo)) {\n throw new Exception(\"String_Node_Str\");\n }\n CardInfo cardInfo = (CardInfo) o;\n assertEquals(\"String_Node_Str\", cardInfo.getCardType().getObjectIdentifier());\n assertEquals(new byte[] { 0x3F, 0x00 }, cardInfo.getApplicationCapabilities().getImplicitlySelectedApplication());\n assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().size(), 3);\n assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getApplicationName(), \"String_Node_Str\");\n assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getRequirementLevel(), BasicRequirementsType.PERSONALIZATION_MANDATORY);\n assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().size(), 40);\n assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().get(0).getCardApplicationServiceName(), \"String_Node_Str\");\n assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().get(0).getAction().getAPIAccessEntryPoint(), APIAccessEntryPointName.INITIALIZE);\n assertTrue(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().get(0).getSecurityCondition().isAlways());\n assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().get(39).getAction().getAuthorizationServiceAction(), AuthorizationServiceActionName.ACL_MODIFY);\n assertFalse(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().get(39).getSecurityCondition().isNever());\n assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getDIDInfo().get(0).getRequirementLevel(), BasicRequirementsType.PERSONALIZATION_MANDATORY);\n assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getDIDInfo().get(0).getDIDACL().getAccessRule().get(0).getCardApplicationServiceName(), \"String_Node_Str\");\n assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(1).getDataSetInfo().get(0).getRequirementLevel(), BasicRequirementsType.PERSONALIZATION_MANDATORY);\n assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(1).getDataSetInfo().get(0).getDataSetACL().getAccessRule().get(0).getCardApplicationServiceName(), \"String_Node_Str\");\n for (DataSetInfoType dataSetInfo : cardInfo.getApplicationCapabilities().getCardApplication().get(2).getDataSetInfo()) {\n if (dataSetInfo.getDataSetName().equals(\"String_Node_Str\")) {\n assertEquals(dataSetInfo.getLocalDataSetName().get(0).getLang(), \"String_Node_Str\");\n assertEquals(dataSetInfo.getLocalDataSetName().get(0).getValue(), \"String_Node_Str\");\n }\n }\n o = m.unmarshal(m.str2doc(egkCif));\n if (!(o instanceof CardInfo)) {\n throw new Exception(\"String_Node_Str\");\n }\n cardInfo = (CardInfo) o;\n assertEquals(\"String_Node_Str\", cardInfo.getCardType().getObjectIdentifier());\n CardApplicationType cardApplicationESIGN = cardInfo.getApplicationCapabilities().getCardApplication().get(2);\n DIDInfoType didInfo = cardApplicationESIGN.getDIDInfo().get(2);\n DifferentialIdentityType differentialIdentity = didInfo.getDifferentialIdentity();\n assertEquals(differentialIdentity.getDIDName(), \"String_Node_Str\");\n assertEquals(differentialIdentity.getDIDProtocol(), \"String_Node_Str\");\n CryptoMarkerType cryptoMarkerType = new CryptoMarkerType(differentialIdentity.getDIDMarker().getCryptoMarker());\n assertEquals(cryptoMarkerType.getProtocol(), \"String_Node_Str\");\n assertEquals(cryptoMarkerType.getAlgorithmInfo().getSupportedOperations().get(0), \"String_Node_Str\");\n}\n"
|
"public void validate(UIFormInput uiInput) throws Exception {\n if (uiInput.getValue() == null || ((String) uiInput.getValue()).trim().length() == 0)\n return;\n UIComponent uiComponent = (UIComponent) uiInput;\n UIForm uiForm = uiComponent.getAncestorOfType(UIForm.class);\n String label;\n try {\n label = uiForm.getLabel(uiInput.getName());\n } catch (Exception e) {\n label = uiInput.getName();\n label = label.trim();\n if (label.charAt(label.length() - 1) == ':')\n label = label.substring(0, label.length() - 1);\n String s = (String) uiInput.getValue();\n boolean error = false;\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (Character.isDigit(c) || (s.charAt(0) == '-' && i == 0)) {\n error = true;\n continue;\n }\n error = false;\n Object[] args = { label, uiInput.getBindingField() };\n throw new MessageException(new ApplicationMessage(\"String_Node_Str\", args, ApplicationMessage.WARNING));\n }\n if (error) {\n int num = Integer.parseInt(s);\n if (min_ > num || max_ < num) {\n Object[] args = { label, min_.toString(), max_.toString() };\n throw new MessageException(new ApplicationMessage(\"String_Node_Str\", args, ApplicationMessage.WARNING));\n }\n }\n}\n"
|
"private boolean onRow(int aggrIndex, int startingGroupLevel, int endingGroupLevel, boolean populateValue) throws DataException {\n IAggrInfo aggrInfo = getAggrInfo(aggrIndex);\n Accumulator acc = null;\n boolean newGroup = false;\n IParameterDefn[] argDefs = aggrInfo.getAggregation().getParameterDefn();\n if (startingGroupLevel <= aggrInfo.getGroupLevel()) {\n acc = accumulatorManagers[aggrIndex].next();\n acc.start();\n newGroup = true;\n } else {\n acc = accumulatorManagers[aggrIndex].getCurrentAccumulator();\n }\n boolean accepted = true;\n if (aggrInfo.getFilter() != null) {\n try {\n Object filterResult = ExprEvaluateUtil.evaluateValue(aggrInfo.getFilter(), this.populator.getCache().getCurrentIndex(), this.populator.getCache().getCurrentResult(), this.populator.getQuery().getExprProcessor().getScope());\n if (filterResult == null)\n accepted = true;\n else\n accepted = DataTypeUtil.toBoolean(filterResult).booleanValue();\n } catch (BirtException e) {\n if (invalidAggrMsg == null)\n invalidAggrMsg = new HashMap();\n invalidAggrMsg.put(new Integer(aggrIndex), e);\n return false;\n }\n }\n if (aggrInfo.getCalcualteLevel() > 0) {\n if (startingGroupLevel > aggrInfo.getCalcualteLevel())\n accepted = false;\n }\n if (accepted) {\n final IBaseExpression[] arguments = aggrInfo.getArgument();\n if (!isFunctionCount(aggrInfo) && arguments == null) {\n DataException e = new DataException(ResourceConstants.INVALID_AGGR_PARAMETER, aggrInfo.getName());\n wrapException(aggrIndex, e);\n return false;\n }\n try {\n for (int i = 0; i < argDefs.length; i++) {\n if (argDefs[i].isOptional()) {\n optionalAgrsNum++;\n }\n if (aggrInfo.getArgument() == null || i >= arguments.length + optionalAgrsNum) {\n throw new DataException(ResourceConstants.AGGREGATION_ARGUMENT_ERROR, new Object[] { argDefs[i].getName(), aggrInfo.getName() });\n }\n if (isEmptyScriptExpression(aggrInfo)) {\n aggrArgs[aggrIndex] = null;\n } else {\n evaluateArgsValue(aggrIndex, aggrInfo, i);\n }\n }\n if (argDefs.length != aggrInfo.getArgument().length) {\n DataException e = new DataException(ResourceConstants.INVALID_AGGR_PARAMETER, aggrInfo.getName());\n wrapException(aggrIndex, e);\n return false;\n }\n acc.onRow(aggrArgs[aggrIndex]);\n newGroup = false;\n } catch (DataException e) {\n wrapException(aggrIndex, e);\n return false;\n }\n }\n boolean isRunning = (aggrInfo.getAggregation().getType() == IAggrFunction.RUNNING_AGGR);\n if (isRunning && populateValue) {\n Object value = acc.getValue();\n currentRoundAggrValue[aggrIndex].add(value);\n }\n if (endingGroupLevel <= aggrInfo.getGroupLevel()) {\n acc.finish();\n if ((!isRunning) && populateValue) {\n Object value = acc.getValue();\n currentRoundAggrValue[aggrIndex].add(value);\n }\n }\n return true;\n}\n"
|
"public static void writeJSONString(Object value, Appendable out, JSONStyle compression) throws IOException {\n if (value == null) {\n out.append(\"String_Node_Str\");\n return;\n }\n if (value instanceof String) {\n if (!compression.mustProtectValue((String) value))\n out.append((String) value);\n else {\n out.append('\"');\n escape((String) value, out, compression);\n out.append('\"');\n }\n return;\n }\n if (value instanceof Number) {\n if (value instanceof Double) {\n if (((Double) value).isInfinite())\n out.append(\"String_Node_Str\");\n else\n out.append(value.toString());\n } else if (value instanceof Float) {\n if (((Float) value).isInfinite())\n out.append(\"String_Node_Str\");\n else\n out.append(value.toString());\n } else {\n out.append(value.toString());\n }\n return;\n }\n if (value instanceof Boolean) {\n out.append(value.toString());\n } else if ((value instanceof JSONStreamAware)) {\n if (value instanceof JSONStreamAwareEx)\n ((JSONStreamAwareEx) value).writeJSONString(out, compression);\n else\n ((JSONStreamAware) value).writeJSONString(out);\n } else if ((value instanceof JSONAware)) {\n if ((value instanceof JSONAwareEx))\n out.append(((JSONAwareEx) value).toJSONString(compression));\n else\n out.append(((JSONAware) value).toJSONString());\n } else if (value instanceof Map<?, ?>) {\n JSONObject.writeJSON((Map<String, Object>) value, out, compression);\n } else if (value instanceof Iterable<?>) {\n JSONArray.writeJSONString((Iterable<Object>) value, out, compression);\n } else if (value instanceof Date) {\n JSONValue.writeJSONString(value.toString(), out, compression);\n } else if (value instanceof Enum<?>) {\n String s = ((Enum) value).name();\n if (!compression.mustProtectValue(s))\n out.append(s);\n else {\n out.append('\"');\n escape(s, out, compression);\n out.append('\"');\n }\n return;\n } else if (value.getClass().isArray()) {\n Class<?> arrayClz = value.getClass();\n Class<?> c = arrayClz.getComponentType();\n out.append('[');\n boolean needSep = false;\n if (c.isPrimitive()) {\n if (c == int.class) {\n for (int b : ((int[]) value)) {\n if (needSep)\n out.append(',');\n else\n needSep = true;\n out.append(Integer.toString(b));\n }\n } else if (c == short.class) {\n for (int b : ((short[]) value)) {\n if (needSep)\n out.append(',');\n else\n needSep = true;\n appendInt(b, out);\n }\n } else if (c == byte.class) {\n for (int b : ((byte[]) value)) {\n if (needSep)\n out.append(',');\n else\n needSep = true;\n appendInt(b, out);\n }\n } else if (c == long.class) {\n for (long b : ((long[]) value)) {\n if (needSep)\n out.append(',');\n else\n needSep = true;\n if (b < 0) {\n out.append('-');\n b = -b;\n }\n do {\n out.append(DIGITS[(int) (b % 10)]);\n b = b / 10;\n } while (b > 0);\n }\n } else if (c == float.class) {\n for (float b : ((float[]) value)) {\n if (needSep)\n out.append(',');\n else\n needSep = true;\n out.append(Float.toString((float) b));\n }\n } else if (c == double.class) {\n for (double b : ((double[]) value)) {\n if (needSep)\n out.append(',');\n else\n needSep = true;\n out.append(Double.toString((double) b));\n }\n } else if (c == boolean.class) {\n for (boolean b : ((boolean[]) value)) {\n if (needSep)\n out.append(',');\n else\n needSep = true;\n if (b)\n out.append(\"String_Node_Str\");\n else\n out.append(\"String_Node_Str\");\n }\n }\n } else {\n for (Object o : ((Object[]) value)) {\n if (needSep)\n out.append(',');\n else\n needSep = true;\n writeJSONString(o, out, compression);\n }\n }\n out.append(']');\n } else {\n try {\n Class<?> cls = value.getClass();\n boolean needSep = false;\n Field[] fields = cls.getDeclaredFields();\n out.append('{');\n for (Field field : fields) {\n int m = field.getModifiers();\n if ((m & (Modifier.STATIC | Modifier.TRANSIENT | Modifier.FINAL)) > 0)\n continue;\n Object v = null;\n if ((m & Modifier.PUBLIC) > 0) {\n v = field.get(value);\n } else {\n String g = JSONUtil.getGetterName(field.getName());\n Method mtd = null;\n try {\n mtd = cls.getDeclaredMethod(g);\n } catch (Exception e) {\n }\n if (mtd == null) {\n Class<?> c2 = field.getType();\n if (c2 == Boolean.TYPE || c2 == Boolean.class) {\n g = JSONUtil.getIsName(field.getName());\n mtd = cls.getDeclaredMethod(g);\n }\n }\n if (mtd == null)\n continue;\n v = mtd.invoke(value);\n }\n if (needSep)\n out.append(',');\n else\n needSep = true;\n JSONObject.writeJSONKV(field.getName(), v, out, compression);\n }\n out.append('}');\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }\n}\n"
|
"public BundleContext getProxyServiceFactoryBundleContext(EndpointDescription endpointDescription) {\n String edId = endpointDescription.getId();\n Bundle proxyBundle = null;\n final BundleContext bc = getContext();\n if (bc != null)\n for (Bundle b : bc.getBundles()) if (b.getSymbolicName().equals(edId)) {\n proxyBundle = b;\n break;\n }\n if (proxyBundle == null) {\n final Manifest mf = new Manifest();\n final Attributes attr = mf.getMainAttributes();\n attr.putValue(\"String_Node_Str\", \"String_Node_Str\");\n attr.putValue(\"String_Node_Str\", \"String_Node_Str\");\n attr.putValue(\"String_Node_Str\", new StringBuffer(RSA_PROXY_PREFIX).append(edId).toString());\n attr.putValue(\"String_Node_Str\", \"String_Node_Str\");\n attr.putValue(\"String_Node_Str\", \"String_Node_Str\");\n final ByteArrayOutputStream bout = new ByteArrayOutputStream();\n try {\n final JarOutputStream out = new JarOutputStream(bout, mf);\n out.flush();\n out.finish();\n out.close();\n proxyBundle = bc.installBundle(edId, new ByteArrayInputStream(bout.toByteArray()));\n } catch (Throwable t) {\n LogUtility.logError(\"String_Node_Str\", DebugOptions.REMOTE_SERVICE_ADMIN, Activator.class, \"String_Node_Str\", t);\n }\n }\n if (proxyBundle != null && proxyBundle.getState() != Bundle.ACTIVE) {\n try {\n proxyBundle.start();\n } catch (BundleException e) {\n LogUtility.logError(\"String_Node_Str\", DebugOptions.REMOTE_SERVICE_ADMIN, Activator.class, \"String_Node_Str\" + proxyBundle.getSymbolicName(), e);\n }\n }\n return (proxyBundle != null) ? proxyBundle.getBundleContext() : proxyServiceFactoryBundleContext;\n}\n"
|
"public int runWithoutHelp(final CommandRunnerParams params) throws IOException, InterruptedException {\n final ImmutableSet<BuildTarget> targets = FluentIterable.from(getArgumentsFormattedAsBuildTargets(params.getBuckConfig())).transform(new Function<String, BuildTarget>() {\n public BuildTarget apply(String input) {\n return BuildTargetParser.INSTANCE.parse(input, BuildTargetPatternParser.fullyQualified(), params.getCell().getCellRoots());\n }\n }).toSet();\n if (targets.isEmpty()) {\n params.getBuckEventBus().post(ConsoleEvent.severe(\"String_Node_Str\"));\n return 1;\n }\n TargetGraph targetGraph;\n try (CommandThreadManager pool = new CommandThreadManager(\"String_Node_Str\", params.getBuckConfig().getWorkQueueExecutionOrder(), getConcurrencyLimit(params.getBuckConfig()))) {\n targetGraph = params.getParser().buildTargetGraph(params.getBuckEventBus(), params.getCell(), getEnableProfiling(), pool.getExecutor(), targets);\n } catch (BuildFileParseException | BuildTargetException e) {\n params.getBuckEventBus().post(ConsoleEvent.severe(MoreExceptions.getHumanReadableOrLocalizedMessage(e)));\n return 1;\n }\n TargetGraphTransformer targetGraphTransformer = new TargetGraphToActionGraph(params.getBuckEventBus(), new BuildTargetNodeToBuildRuleTransformer());\n try {\n if (shouldGenerateDotOutput()) {\n return printDotOutput(params, targetGraph);\n } else if (shouldGenerateJsonOutput()) {\n return printJsonClasspath(params, targetGraph, targetGraphTransformer, targets);\n } else {\n return printClasspath(params, targetGraph, targetGraphTransformer, targets);\n }\n } catch (NoSuchBuildTargetException e) {\n throw new HumanReadableException(e.getHumanReadableErrorMessage());\n }\n}\n"
|
"public static void convertToRoadBelief(MultivariateGaussian belief, PathEdge edge) {\n Preconditions.checkArgument(belief.getInputDimensionality() == 2 || belief.getInputDimensionality() == 4);\n if (belief.getInputDimensionality() == 2)\n return;\n Preconditions.checkArgument(edge != PathEdge.getEmptyPathEdge());\n final Vector m = belief.getMean().clone();\n final Matrix C = belief.getCovariance().clone();\n final Coordinate latlonCurrentPos = GeoUtils.convertToLatLon(Og.times(m));\n LinearLocation lineLocation = edge.getInferredEdge().getLocationIndexedLine().project(GeoUtils.reverseCoordinates(latlonCurrentPos));\n LineSegment lineSegment = lineLocation.getSegment(edge.getInferredEdge().getGeometry());\n final double distanceToStartOfSegment = GeoUtils.getAngleDegreesInMeters(edge.getInferredEdge().getLengthIndexedLine().indexOf(lineSegment.p0));\n Entry<Matrix, Vector> projPair = StandardRoadTrackingFilter.posVelProjectionPair(lineSegment, distanceToStartOfSegment);\n final Vector projMean = projPair.getKey().transpose().times(m.minus(projPair.getValue()));\n final Matrix projCov = projPair.getKey().transpose().times(C).times(projPair.getKey());\n belief.setMean(projMean);\n belief.setCovariance(projCov);\n}\n"
|
"public boolean isType(IType type) {\n if (!type.isArrayType()) {\n IClass iclass = type.getTheClass();\n return iclass == Types.OBJECT_CLASS || iclass.getAnnotation(ARRAY_CONVERTIBLE) != null;\n }\n if (this.valueCount == 0) {\n return true;\n }\n IType type1 = type.getElementType();\n for (int i = 0; i < this.valueCount; i++) {\n if (!this.values[i].isType(type1)) {\n return false;\n }\n }\n return true;\n}\n"
|
"public AxisAlignedBB getRenderBoundingBox() {\n return AxisAlignedBB.getBoundingBox(this.xCoord, this.yCoord, this.zCoord, this.xCoord + 1, this.yCoord + 5, this.zCoord + 1);\n}\n"
|
"private static Config createConfig(Field f, Object instance, String name, IsConfig anotation, String group) {\n Class c = f.getType();\n if (Config.class.isAssignableFrom(c)) {\n return newFromConfig(f, instance);\n } else if (WritableValue.class.isAssignableFrom(c) || ReadOnlyProperty.class.isAssignableFrom(c)) {\n return newFromProperty(f, instance, name, anotation, group);\n else {\n try {\n noFinal(f);\n f.setAccessible(true);\n MethodHandle getter = methodLookup.unreflectGetter(f);\n MethodHandle setter = methodLookup.unreflectSetter(f);\n return new FieldConfig(name, anotation, instance, group, getter, setter);\n } catch (IllegalAccessException e) {\n throw new RuntimeException(\"String_Node_Str\" + f.getName() + \"String_Node_Str\" + e.getMessage());\n }\n }\n}\n"
|
"public static ModelElement[] getALLElements(boolean withSystem) {\n List<ModelElement> allElement = ResourceFileMap.getAll();\n return allElement.toArray(new ModelElement[allElement.size()]);\n}\n"
|
"public Commands fullSync(final long clusterId, Map<String, Pair<String, State>> newStates) {\n Commands commands = new Commands(OnError.Continue);\n Map<Long, AgentVmInfo> infos = convertToInfos(newStates);\n List<VMInstanceVO> vms = _vmDao.listByClusterId(clusterId);\n for (VMInstanceVO vm : vms) {\n AgentVmInfo info = infos.remove(vm.getId());\n }\n for (final AgentVmInfo left : infos.values()) {\n s_logger.warn(\"String_Node_Str\" + left.name);\n commands.addCommand(cleanup(left.name));\n }\n return commands;\n}\n"
|
"private static Iterator customThemeNames() {\n return getThemeNames(FileFactory.getFile(getCustomThemesFolder().getAbsolutePath()));\n}\n"
|
"public void fire() throws IllegalActionException {\n Time environmentTime = _getEnvironmentTime();\n Director director = getDirector();\n boolean inModalModel = false;\n if (director instanceof FSMDirector) {\n inModalModel = true;\n director.setModelTime(environmentTime);\n }\n readInputs();\n _lastChosenTransitions.clear();\n _transitionRefinementsToPostfire.clear();\n _stateRefinementsToPostfire.clear();\n List<Transition> transitionList = _currentState.preemptiveTransitionList();\n _chooseTransitions(transitionList, false);\n if (_lastChosenTransitions.size() > 0) {\n if (inModalModel) {\n director.setModelTime(environmentTime);\n }\n TypedActor[] refinements = _currentState.getRefinement();\n if (refinements != null) {\n for (Actor refinementActor : refinements) {\n if (refinementActor instanceof CompositeActor) {\n CompositeActor refinement = (CompositeActor) refinementActor;\n for (IOPort refinementPort : ((List<IOPort>) refinement.outputPortList())) {\n for (int i = 0; i < refinementPort.getWidth(); i++) {\n if (!refinementPort.isKnown(i)) {\n if (_debugging) {\n _debug(\"String_Node_Str\" + refinementPort.getName() + \"String_Node_Str\" + i);\n }\n refinementPort.sendClear(i);\n }\n }\n }\n }\n }\n }\n readOutputsFromRefinement();\n } else {\n if (!foundUnknown()) {\n Actor[] stateRefinements = _currentState.getRefinement();\n if (stateRefinements != null) {\n for (int i = 0; i < stateRefinements.length; ++i) {\n if (_stopRequested || _disabledRefinements.contains(stateRefinements[i])) {\n break;\n }\n _setTimeForRefinement(stateRefinements[i]);\n if (stateRefinements[i].prefire()) {\n if (_debugging) {\n _debug(\"String_Node_Str\", stateRefinements[i].getName());\n }\n stateRefinements[i].fire();\n _stateRefinementsToPostfire.add(stateRefinements[i]);\n }\n }\n }\n if (inModalModel) {\n director.setModelTime(environmentTime);\n }\n readOutputsFromRefinement();\n transitionList = _currentState.nonpreemptiveTransitionList();\n _chooseTransitions(transitionList, false);\n }\n }\n _assertAbsentOutputs(this);\n}\n"
|
"private void openChatFailure(Screen host, MessageModel message) {\n Logger.log(\"String_Node_Str\", \"String_Node_Str\" + message.getMessage());\n MessageController<MessageModel> error = new MessageController<MessageModel>(message);\n host.getViewContext().getPrimaryRoute().execute(error);\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.