content
stringlengths
40
137k
"private void addComponent(CellComponentFactorySPI spi) {\n CellComponentServerState state = spi.getDefaultCellComponentServerState();\n CellID cellID = selectedCell.getCellID();\n CellServerComponentMessage message = CellServerComponentMessage.newAddMessage(cellID, state);\n ResponseMessage response = selectedCell.sendCellMessageAndWait(message);\n if (response == null) {\n LOGGER.warning(\"String_Node_Str\" + selectedCell.getCellID() + \"String_Node_Str\" + selectedCell.getName() + \"String_Node_Str\");\n return;\n }\n if (response instanceof CellServerComponentResponseMessage) {\n setSelectedCell(selectedCell);\n } else if (response instanceof ErrorMessage) {\n LOGGER.log(Level.WARNING, \"String_Node_Str\", ((ErrorMessage) response).getErrorCause());\n }\n}\n"
"protected void configure() {\n bind(DynamicDatasetCache.class).toProvider(DynamicDatasetCacheProvider.class).in(Scopes.SINGLETON);\n bind(DatasetContext.class).to(DynamicDatasetCache.class).in(Scopes.SINGLETON);\n bind(Admin.class).toProvider(AdminProvider.class);\n bind(Transactional.class).toProvider(TransactionalProvider.class);\n install(new FactoryModuleBuilder().implement(AuthorizationContext.class, DefaultAuthorizationContext.class).build(AuthorizationContextFactory.class));\n bind(AuthorizerInstantiator.class).in(Scopes.SINGLETON);\n expose(AuthorizerInstantiator.class);\n bind(PrivilegesManager.class).to(DefaultPrivilegesManager.class);\n expose(PrivilegesManager.class);\n}\n"
"public Collection values(Predicate predicate) {\n checkTransactionState();\n if (predicate == null) {\n throw new NullPointerException(\"String_Node_Str\");\n }\n final MapService service = getService();\n final QueryResultSet queryResultSet = (QueryResultSet) queryInternal(predicate, IterationType.VALUE, false);\n final Set<Object> valueSet = new HashSet<Object>(queryResultSet);\n for (final Map.Entry<Object, TxnValueWrapper> entry : txMap.entrySet()) {\n if (!TxnValueWrapper.Type.REMOVED.equals(entry.getValue().type)) {\n final Object value = entry.getValue().value instanceof Data ? service.toObject(entry.getValue().value) : entry.getValue().value;\n final QueryEntry queryEntry = new QueryEntry(null, service.toData(entry.getKey()), entry.getKey(), value);\n if (predicate.apply(queryEntry)) {\n valueSet.add(entry.getValue().value);\n }\n } else {\n valueSet.remove(entry.getValue().value);\n }\n }\n return valueSet;\n}\n"
"private String getAppName(Apk apk) {\n return ACTIVE_APPS.get(apk.packageName).name;\n}\n"
"public boolean equals(Object o) {\n if (this == o)\n return true;\n if (o == null || getClass() != o.getClass())\n return false;\n Application that = (Application) o;\n if (serviceType != that.serviceType)\n return false;\n if (!name.equals(that.name))\n return false;\n return serviceType.equals(that.serviceType);\n}\n"
"public boolean canModify(Object bean) {\n if (param.getName().equals(\"String_Node_Str\") || param.getName().equals(\"String_Node_Str\")) {\n boolean canModify = super.canModify(bean);\n if (canModify) {\n Map<String, Object> valueMap = (Map<String, Object>) bean;\n List<Map<String, Object>> fullValues = (List<Map<String, Object>>) param.getValue();\n ((ElementParameter) currentParam).setCurrentRow(fullValues.indexOf(valueMap));\n if (currentParam.isReadOnly(element.getElementParameters())) {\n return false;\n }\n } else {\n return false;\n }\n }\n boolean canModify = super.canModify(bean);\n if (canModify) {\n Map<String, Object> valueMap = (Map<String, Object>) bean;\n List<Map<String, Object>> fullValues = (List<Map<String, Object>>) param.getValue();\n ((ElementParameter) currentParam).setCurrentRow(fullValues.indexOf(valueMap));\n if (currentParam.isReadOnly(element.getElementParameters())) {\n return false;\n }\n }\n return canModify;\n}\n"
"protected void executeImpl(Action action, NodeRef actionedUponNodeRef) {\n if (!RecordsManagementModel.TYPE_DISPOSITION_ACTION_DEFINITION.equals(nodeService.getType(actionedUponNodeRef))) {\n return;\n }\n List<QName> changedProps = (List<QName>) action.getParameterValue(CHANGED_PROPERTIES);\n NodeRef dispositionScheduleNode = nodeService.getPrimaryParent(actionedUponNodeRef).getParentRef();\n NodeRef rmContainer = nodeService.getPrimaryParent(dispositionScheduleNode).getParentRef();\n DispositionSchedule dispositionSchedule = dispositionService.getAssociatedDispositionSchedule(rmContainer);\n behaviourFilter.disableBehaviour();\n try {\n List<NodeRef> disposableItems = dispositionService.getDisposableItems(dispositionSchedule);\n for (NodeRef disposableItem : disposableItems) {\n updateDisposableItem(dispositionSchedule, disposableItem, actionedUponNodeRef, changedProps);\n }\n } finally {\n behaviourFilter.enableBehaviour();\n }\n}\n"
"protected void composeImmunizationRecommendationImmunizationRecommendationRecommendationComponentInner(ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent element) throws IOException {\n composeBackbone(element);\n if (element.hasVaccineCode()) {\n openArray(\"String_Node_Str\");\n for (CodeableConcept e : element.getVaccineCode()) composeCodeableConcept(null, e);\n closeArray();\n }\n ;\n if (element.hasTargetDisease()) {\n composeCodeableConcept(\"String_Node_Str\", element.getTargetDisease());\n }\n if (element.hasContraindicatedVaccineCode()) {\n openArray(\"String_Node_Str\");\n for (CodeableConcept e : element.getContraindicatedVaccineCode()) composeCodeableConcept(null, e);\n closeArray();\n }\n ;\n if (element.hasForecastStatus()) {\n composeCodeableConcept(\"String_Node_Str\", element.getForecastStatus());\n }\n if (element.hasForecastReason()) {\n openArray(\"String_Node_Str\");\n for (CodeableConcept e : element.getForecastReason()) composeCodeableConcept(null, e);\n closeArray();\n }\n ;\n if (element.hasDateCriterion()) {\n openArray(\"String_Node_Str\");\n for (ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent e : element.getDateCriterion()) composeImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(null, e);\n closeArray();\n }\n ;\n if (element.hasDescriptionElement()) {\n composeStringCore(\"String_Node_Str\", element.getDescriptionElement(), false);\n composeStringExtras(\"String_Node_Str\", element.getDescriptionElement(), false);\n }\n if (element.hasSeriesElement()) {\n composeStringCore(\"String_Node_Str\", element.getSeriesElement(), false);\n composeStringExtras(\"String_Node_Str\", element.getSeriesElement(), false);\n }\n if (element.hasDoseNumber()) {\n composeType(\"String_Node_Str\", element.getDoseNumber());\n }\n if (element.hasSeriesDosesElement()) {\n composePositiveIntCore(\"String_Node_Str\", element.getSeriesDosesElement(), false);\n composePositiveIntExtras(\"String_Node_Str\", element.getSeriesDosesElement(), false);\n }\n if (element.hasSupportingImmunization()) {\n openArray(\"String_Node_Str\");\n for (Reference e : element.getSupportingImmunization()) composeReference(null, e);\n closeArray();\n }\n ;\n if (element.hasSupportingPatientInformation()) {\n openArray(\"String_Node_Str\");\n for (Reference e : element.getSupportingPatientInformation()) composeReference(null, e);\n closeArray();\n }\n ;\n}\n"
"public Contact getContact() {\n String name = nameTextField.getText();\n String number = numberTextField.getText();\n String operator = operatorComboBox.getSelectedOperatorName();\n if (!multiMode && (StringUtils.isEmpty(name) || StringUtils.isEmpty(number) || StringUtils.isEmpty(operator))) {\n return null;\n } else {\n return new Contact(name, number, operator);\n }\n}\n"
"private void resetArgs(String cmdLine) throws CommandFormatException {\n if (cmdLine != null) {\n parsedCmd.parse(prefix, cmdLine, this, redirection != null);\n setOutputTarget(parsedCmd.getOutputTarget());\n }\n this.cmdLine = cmdLine;\n}\n"
"private void sendDirectory(String dir, RoutingContext context) {\n FileSystem fileSystem = context.vertx().fileSystem();\n HttpServerRequest request = context.request();\n fileSystem.readDir(dir, asyncResult -> {\n if (asyncResult.failed()) {\n context.fail(asyncResult.cause());\n } else {\n String accept = request.headers().get(\"String_Node_Str\");\n if (accept == null) {\n accept = \"String_Node_Str\";\n }\n if (accept.contains(\"String_Node_Str\")) {\n String normalizedDir = dir.substring(webRoot.length());\n if (!normalizedDir.endsWith(\"String_Node_Str\")) {\n normalizedDir += \"String_Node_Str\";\n }\n String file;\n StringBuilder files = new StringBuilder(\"String_Node_Str\");\n List<String> list = asyncResult.result();\n Collections.sort(list);\n for (String s : list) {\n file = s.substring(s.lastIndexOf(File.separatorChar) + 1);\n if (!includeHidden && file.charAt(0) == '.') {\n continue;\n }\n files.append(\"String_Node_Str\");\n files.append(normalizedDir);\n files.append(file);\n files.append(\"String_Node_Str\");\n files.append(file);\n files.append(\"String_Node_Str\");\n files.append(file);\n files.append(\"String_Node_Str\");\n }\n files.append(\"String_Node_Str\");\n int slashPos = 0;\n for (int i = dir.length() - 2; i > 0; i--) {\n if (dir.charAt(i) == '/') {\n slashPos = i;\n break;\n }\n }\n String parent = \"String_Node_Str\" + dir.substring(0, slashPos + 1) + \"String_Node_Str\";\n request.response().putHeader(\"String_Node_Str\", \"String_Node_Str\");\n request.response().end(directoryTemplate(context.vertx()).replace(\"String_Node_Str\", normalizedDir).replace(\"String_Node_Str\", parent).replace(\"String_Node_Str\", files.toString()));\n } else if (accept.contains(\"String_Node_Str\")) {\n String file;\n JsonArray json = new JsonArray();\n for (String s : asyncResult.result()) {\n file = s.substring(s.lastIndexOf('/') + 1);\n if (!includeHidden && file.charAt(0) == '.') {\n continue;\n }\n json.add(file);\n }\n request.response().putHeader(\"String_Node_Str\", \"String_Node_Str\");\n request.response().end(json.encode());\n } else {\n String file;\n StringBuilder buffer = new StringBuilder();\n for (String s : asyncResult.result()) {\n file = s.substring(s.lastIndexOf('/') + 1);\n if (!includeHidden && file.charAt(0) == '.') {\n continue;\n }\n buffer.append(file);\n buffer.append('\\n');\n }\n request.response().putHeader(\"String_Node_Str\", \"String_Node_Str\");\n request.response().end(buffer.toString());\n }\n }\n });\n}\n"
"public void currentTimeUpdated(final TmfTimeSynchSignal signal) {\n if ((signal.getSource() != fTable) && (fTrace != null) && (!fTable.isDisposed())) {\n final TmfDataRequest<ITmfEvent> subRequest = new TmfDataRequest<ITmfEvent>(ITmfEvent.class, 0, 1, ExecutionType.FOREGROUND) {\n\n TmfTimestamp ts = new TmfTimestamp(signal.getCurrentTime());\n public void handleData(TmfEvent event) {\n super.handleData(event);\n }\n public void handleCompleted() {\n super.handleCompleted();\n if (fTrace == null) {\n return;\n }\n ITmfTimestamp timestamp = ts;\n if (timestamp.compareTo(fTrace.getStartTime(), true) == -1) {\n timestamp = fTrace.getStartTime();\n }\n if (timestamp.compareTo(fTrace.getEndTime(), true) == 1) {\n timestamp = fTrace.getEndTime();\n }\n final long rank = fTrace.getRank(timestamp);\n fSelectedRank = rank;\n fTable.getDisplay().asyncExec(new Runnable() {\n public void run() {\n if (fTable.isDisposed()) {\n return;\n }\n int index = (int) rank;\n if (fTable.isDisposed()) {\n return;\n }\n if (fTable.getData(Key.FILTER_OBJ) != null) {\n index = fCache.getFilteredEventIndex(rank) + 1;\n }\n fTable.setSelection(index + 1);\n fRawViewer.selectAndReveal(rank);\n }\n });\n }\n };\n ((ITmfDataProvider<TmfEvent>) fTrace).sendRequest(subRequest);\n }\n}\n"
"private void notifyErrorListeners() {\n Handler handler = new Handler(Looper.getMainLooper());\n for (final ErrorListener listener : errorListeners) {\n if (listener != null) {\n handler.post(new Runnable() {\n public void run() {\n listener.onErrorOccured(error);\n }\n }\n }\n }\n}\n"
"public void appendForeignKeys(ForeignKeyReference[] references) {\n QueryBuilder queryBuilder;\n List<QueryBuilder> queryBuilders = new ArrayList<QueryBuilder>();\n for (ForeignKeyReference foreignKeyReference : references) {\n queryBuilder = new QueryBuilder().appendQuoted(foreignKeyReference.columnName()).appendSpace().appendType(ModelUtils.getClassFromAnnotation(foreignKeyReference));\n queryBuilders.add(queryBuilder);\n }\n appendList(queryBuilders);\n}\n"
"public final void putContent(String content) throws ContentIOException {\n try {\n String encoding = getEncoding();\n byte[] bytes;\n if (encoding == null) {\n bytes = content.getBytes();\n setEncoding(System.getProperty(\"String_Node_Str\"));\n } else {\n bytes = content.getBytes(encoding);\n }\n OutputStream os = getContentOutputStream();\n ByteArrayInputStream is = new ByteArrayInputStream(bytes);\n copyStreams(is, os);\n } catch (IOException e) {\n throw new ContentIOException(\"String_Node_Str\" + \"String_Node_Str\" + this + \"String_Node_Str\" + content.length(), e);\n }\n}\n"
"private void closeAllSchemaFrames(boolean exitAfterClose) {\n Object[][] its = new Object[3][];\n its[0] = schemaWindowMap.keySet().toArray();\n its[1] = mdxWindows.toArray();\n JInternalFrame sf = null;\n try {\n for (int i = 0; i < its.length; i++) {\n for (int j = 0; j < its[i].length; j++) {\n sf = (JInternalFrame) its[i][j];\n if (sf != null) {\n if (sf.getContentPane().getComponent(0) instanceof SchemaExplorer) {\n SchemaExplorer se = (SchemaExplorer) sf.getContentPane().getComponent(0);\n sf.setSelected(true);\n int response = confirmFrameClose(sf, se);\n if (response == 2) {\n return;\n }\n if (response == 3) {\n sf.setClosed(true);\n }\n }\n }\n }\n }\n if (((schemaWindowMap.keySet().size()) == 0) && exitAfterClose) {\n System.exit(0);\n }\n } catch (Exception ex) {\n LOGGER.error(\"String_Node_Str\", ex);\n }\n}\n"
"public StyleEntry createEntry(ContainerSizeInfo sizeInfo, IStyle style) {\n if (style == null) {\n return StyleBuilder.createEmptyStyleEntry();\n }\n StyleEntry entry = initStyle(style, sizeInfo, parent);\n return entry;\n}\n"
"public static void giveLobbyItems(JavaPlugin plugin, Player p) {\n PluginInstance pli = MinigamesAPI.getAPI().getPluginInstance(plugin);\n ItemStack classes_item = new ItemStack(plugin.getConfig().getInt(\"String_Node_Str\"));\n if (classes_item.getType() != Material.AIR) {\n ItemMeta cimeta = classes_item.getItemMeta();\n cimeta.setDisplayName(pli.getMessagesConfig().classes_item);\n classes_item.setItemMeta(cimeta);\n }\n if (!plugin.getConfig().getBoolean(\"String_Node_Str\")) {\n ItemStack exit_item = new ItemStack(plugin.getConfig().getInt(\"String_Node_Str\"));\n if (exit_item.getType() != Material.AIR) {\n ItemMeta exitimeta = exit_item.getItemMeta();\n exitimeta.setDisplayName(pli.getMessagesConfig().exit_item);\n exit_item.setItemMeta(exitimeta);\n }\n p.getInventory().setItem(8, exit_item);\n p.updateInventory();\n }\n ItemStack achievement_item = new ItemStack(plugin.getConfig().getInt(\"String_Node_Str\"));\n if (achievement_item.getType() != Material.AIR) {\n ItemMeta achievement_itemmeta = achievement_item.getItemMeta();\n achievement_itemmeta.setDisplayName(pli.getMessagesConfig().achievement_item);\n achievement_item.setItemMeta(achievement_itemmeta);\n }\n ItemStack shop_item = new ItemStack(plugin.getConfig().getInt(\"String_Node_Str\"));\n if (shop_item.getType() != Material.AIR) {\n ItemMeta shop_itemmeta = shop_item.getItemMeta();\n shop_itemmeta.setDisplayName(pli.getMessagesConfig().shop_item);\n shop_item.setItemMeta(shop_itemmeta);\n }\n if (plugin.getConfig().getBoolean(\"String_Node_Str\")) {\n p.getInventory().addItem(classes_item);\n }\n if (pli.isAchievementGuiEnabled()) {\n p.getInventory().addItem(achievement_item);\n }\n if (plugin.getConfig().getBoolean(\"String_Node_Str\")) {\n p.getInventory().addItem(shop_item);\n }\n p.updateInventory();\n if (plugin.getConfig().getBoolean(\"String_Node_Str\")) {\n ItemStack custom_item0 = new ItemStack(plugin.getConfig().getInt(\"String_Node_Str\"));\n if (custom_item0.getType() != Material.AIR) {\n ItemMeta custom_item0meta = custom_item0.getItemMeta();\n custom_item0meta.setDisplayName(plugin.getConfig().getString(\"String_Node_Str\"));\n custom_item0.setItemMeta(custom_item0meta);\n }\n p.getInventory().addItem(custom_item0);\n p.updateInventory();\n }\n}\n"
"public void deleteAllCache() {\n ImageLoader imageLoader = getImageLoader();\n imageLoader.clearDiskCache();\n imageLoader.clearMemoryCache();\n VideoCache.getInstance().deleteCache();\n String cacheKey = mPref.getString(SettingsActivity.KEY_CACHE_LOC, SettingsActivity.CACHE_LOC_INTERNAL);\n if (SettingsActivity.CACHE_LOC_EXTERNAL.equals(cacheKey)) {\n FileUtil.deleteDirectory(getCacheDir());\n File videoCache = new File(getCacheDir(), \"String_Node_Str\");\n FileUtil.deleteDirectory(videoCache);\n } else if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {\n if (FileUtil.isFileValid(getExternalCacheDir())) {\n File cache = getExternalCacheDir();\n FileUtil.deleteDirectory(cache);\n File videoCache = new File(cache, \"String_Node_Str\");\n FileUtil.deleteDirectory(videoCache);\n }\n }\n}\n"
"private void parseRoot(Tree tree) throws SAXException {\n if (namespaces != null) {\n Map<String, String> namespacePairs = namespaces.getPrefixesToNamespaces();\n Iterator<String> keys = namespacePairs.keySet().iterator();\n while (keys.hasNext()) {\n String nextKey = keys.next();\n contentHandler.startPrefixMapping(nextKey, namespacePairs.get(nextKey));\n }\n }\n if (tree.getType() == JSONLexer.OBJECT) {\n contentHandler.startDocument();\n int children = tree.getChildCount();\n if (children == 0 && unmarshalClass == null) {\n return;\n }\n if (includeRoot) {\n parse((CommonTree) tree.getChild(0));\n } else {\n if (children == 1) {\n CommonTree ct = (CommonTree) tree.getChild(0);\n if (ct != null && ct.getType() == JSONLexer.NULL) {\n contentHandler.setNil(true);\n }\n contentHandler.startElement(Constants.EMPTY_STRING, Constants.EMPTY_STRING, null, attributes.setTree(tree, attributePrefix, namespaces, namespaceSeparator, namespaceAware));\n parse(ct);\n contentHandler.endElement(Constants.EMPTY_STRING, Constants.EMPTY_STRING, null);\n } else {\n contentHandler.startElement(Constants.EMPTY_STRING, Constants.EMPTY_STRING, null, attributes.setTree(tree, attributePrefix, namespaces, namespaceSeparator, namespaceAware));\n for (int x = 0, size = children; x < size; x++) {\n parse((CommonTree) tree.getChild(x));\n }\n contentHandler.endElement(Constants.EMPTY_STRING, Constants.EMPTY_STRING, null);\n }\n contentHandler.endElement(Constants.EMPTY_STRING, Constants.EMPTY_STRING, null);\n }\n contentHandler.endDocument();\n } else if (tree.getType() == JSONLexer.ARRAY) {\n SAXUnmarshallerHandler rootContentHandler = null;\n if (getContentHandler() instanceof SAXUnmarshallerHandler) {\n rootContentHandler = (SAXUnmarshallerHandler) getContentHandler();\n }\n int size = tree.getChildCount();\n List list = new ArrayList(size);\n for (int x = 0; x < size; x++) {\n parseRoot(tree.getChild(x));\n if (getContentHandler() instanceof SAXUnmarshallerHandler) {\n SAXUnmarshallerHandler saxUnmarshallerHandler = (SAXUnmarshallerHandler) contentHandler;\n list.add(saxUnmarshallerHandler.getObject());\n saxUnmarshallerHandler.setObject(null);\n } else if (getContentHandler() instanceof UnmarshalRecord) {\n UnmarshalRecord unmarshalRecord = (UnmarshalRecord) contentHandler;\n Object unmarshalledObject = unmarshalRecord.getCurrentObject();\n if (includeRoot && unmarshalClass != null) {\n if (!(unmarshalledObject instanceof Root)) {\n Root xmlRoot = unmarshalRecord.createRoot();\n xmlRoot.setNamespaceURI(unmarshalRecord.getRootElementNamespaceUri());\n xmlRoot.setLocalName(unmarshalRecord.getLocalName());\n xmlRoot.setObject(unmarshalledObject);\n unmarshalledObject = xmlRoot;\n }\n }\n list.add(unmarshalledObject);\n unmarshalRecord.setCurrentObject(null);\n unmarshalRecord.setRootElementName(null);\n unmarshalRecord.setLocalName(null);\n }\n }\n if (getContentHandler() instanceof SAXUnmarshallerHandler) {\n ((SAXUnmarshallerHandler) getContentHandler()).setObject(list);\n } else if (getContentHandler() instanceof UnmarshalRecord) {\n ((UnmarshalRecord) getContentHandler()).setCurrentObject(list);\n ((UnmarshalRecord) getContentHandler()).setRootElementName(Constants.EMPTY_STRING);\n ((UnmarshalRecord) getContentHandler()).setLocalName(Constants.EMPTY_STRING);\n if (rootContentHandler != null) {\n rootContentHandler.setObject(list);\n }\n }\n }\n}\n"
"protected void copyFromCard(final Card card, final Game game) {\n this.name = card.getName();\n this.abilities.clear();\n if (this.faceDown) {\n for (Ability ability : card.getAbilities()) {\n if (ability.getWorksFaceDown()) {\n this.abilities.add(ability.copy());\n }\n }\n } else {\n this.abilities = card.getAbilities().copy();\n }\n this.abilities.setControllerId(this.controllerId);\n this.abilities.setSourceId(objectId);\n this.cardType.clear();\n this.cardType.addAll(card.getCardType());\n this.color = card.getColor(null).copy();\n this.frameColor = card.getFrameColor(game).copy();\n this.frameStyle = card.getFrameStyle();\n this.manaCost = card.getManaCost().copy();\n if (card instanceof PermanentCard) {\n this.maxLevelCounters = ((PermanentCard) card).maxLevelCounters;\n }\n this.subtype.clear();\n this.subtype.addAll(card.getSubtype(game));\n this.supertype.clear();\n supertype.addAll(card.getSuperType());\n this.expansionSetCode = card.getExpansionSetCode();\n this.rarity = card.getRarity();\n this.cardNumber = card.getCardNumber();\n this.usesVariousArt = card.getUsesVariousArt();\n transformable = card.isTransformable();\n if (transformable) {\n this.nightCard = card.isNightCard();\n if (!this.nightCard) {\n this.secondSideCard = card.getSecondCardFace();\n this.secondSideCardClazz = this.secondSideCard.getClass();\n }\n }\n this.flipCard = card.isFlipCard();\n this.flipCardName = card.getFlipCardName();\n}\n"
"public void connect() {\n if (isConnected()) {\n return;\n }\n try {\n ftpClient = new FTPClient(connectionProperties.getHost(), connectionProperties.getPort(), fConnectionTimeout);\n listener = new LogListener();\n ftpClient.setMessageListener(listener);\n ftpClient.login(connectionProperties.getUsername(), connectionProperties.getPassword());\n ftpClient.setConnectMode(FTPConnectMode.PASV);\n ftpClient.setType(FTPTransferType.ASCII);\n } catch (Exception e) {\n e.printStackTrace();\n }\n}\n"
"public void renderBlock(IBlockRenderer par1, BlockStack par2, RenderBlocks par3) {\n float[] size = par1.getBoundingBoxes(par2.getMeta());\n if (size == null || size.length < 6) {\n size = new float[] { 0, 0, 0, 1, 1, 1 };\n }\n Icon[] textureArray = new Icon[6];\n for (int i = 0; i < 6; i++) {\n Icon blockIcon = par2.getTexture(i);\n if (blockIcon == null || !engine.isTextureRegistered(blockIcon, engine.getTextureMap())) {\n blockIcon = engine.getIconSafe();\n }\n textureArray[i] = blockIcon;\n }\n Tessellator tessellator = Tessellator.instance;\n Block block = par2.getBlock();\n block.setBlockBounds(size[0], size[1], size[2], size[3], size[4], size[5]);\n block.setBlockBoundsForItemRender();\n par3.setRenderBoundsFromBlock(block);\n GL11.glTranslatef(data[0], data[1], data[2]);\n tessellator.startDrawingQuads();\n tessellator.setNormal(0.0F, -1.0F, 0.0F);\n par3.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, textureArray[0]);\n tessellator.draw();\n tessellator.startDrawingQuads();\n tessellator.setNormal(0.0F, 1.0F, 0.0F);\n par3.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, textureArray[0]);\n tessellator.draw();\n tessellator.startDrawingQuads();\n tessellator.setNormal(0.0F, 0.0F, -1.0F);\n par3.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, textureArray[0]);\n tessellator.draw();\n tessellator.startDrawingQuads();\n tessellator.setNormal(0.0F, 0.0F, 1.0F);\n par3.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, textureArray[0]);\n tessellator.draw();\n tessellator.startDrawingQuads();\n tessellator.setNormal(-1.0F, 0.0F, 0.0F);\n par3.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, textureArray[0]);\n tessellator.draw();\n tessellator.startDrawingQuads();\n tessellator.setNormal(1.0F, 0.0F, 0.0F);\n par3.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, textureArray[0]);\n tessellator.draw();\n GL11.glTranslatef(0.5F, 0.5F, 0.5F);\n block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);\n}\n"
"private static void filterSoapResult(final File soapAlignFile, final File soapAlignFilteredFile, final Reporter reporter) throws IOException {\n final BufferedReader readerResults = FileUtils.createBufferedReader(soapAlignFile);\n final BufferedWriter bw = new BufferedWriter(new FileWriter(soapAlignFilteredFile));\n final AlignResult aln = new AlignResult();\n String line = null;\n String lastSequenceId = null;\n while ((line = readerResults.readLine()) != null) {\n final String trimmedLine = line.trim();\n if (\"String_Node_Str\".equals(trimmedLine))\n continue;\n aln.parseResultLine(trimmedLine);\n reporter.incrCounter(COUNTER_GROUP, \"String_Node_Str\", 1);\n final String currentSequenceId = aln.getSequenceId();\n if (aln.getNumberOfHits() == 1) {\n bw.write(line + \"String_Node_Str\");\n reporter.incrCounter(COUNTER_GROUP, Common.SOAP_ALIGNEMENT_WITH_ONLY_ONE_HIT_COUNTER, 1);\n } else if (currentSequenceId != null && (!currentSequenceId.equals(lastSequenceId)))\n reporter.incrCounter(COUNTER_GROUP, \"String_Node_Str\", 1);\n lastSequenceId = currentSequenceId;\n }\n readerResults.close();\n bw.close();\n}\n"
"protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n resp.setContentType(\"String_Node_Str\");\n HttpSession session = req.getSession();\n Credentials credentials = (Credentials) session.getAttribute(InitiateLoginServlet.CREDENTIALS);\n session.setAttribute(\"String_Node_Str\", req.getAttribute(\"String_Node_Str\"));\n if (credentials == null) {\n String token = getTokenCookie(req);\n PortalContainer pContainer = PortalContainer.getInstance();\n ServletContext context = pContainer.getPortalContext();\n if (token != null) {\n AbstractTokenService tokenService = AbstractTokenService.getInstance(CookieTokenService.class);\n credentials = tokenService.validateToken(token, false);\n if (credentials == null) {\n Cookie cookie = new Cookie(InitiateLoginServlet.COOKIE_NAME, \"String_Node_Str\");\n cookie.setPath(req.getContextPath());\n cookie.setMaxAge(0);\n resp.addCookie(cookie);\n context.getRequestDispatcher(\"String_Node_Str\").include(req, resp);\n } else {\n log.debug(\"String_Node_Str\" + token + \"String_Node_Str\" + \"String_Node_Str\");\n sendAuth(resp, credentials.getUsername(), token);\n }\n } else {\n context.getRequestDispatcher(\"String_Node_Str\").include(req, resp);\n return;\n }\n } else {\n req.getSession().removeAttribute(InitiateLoginServlet.CREDENTIALS);\n }\n String token = null;\n for (Cookie cookie : req.getCookies()) {\n if (InitiateLoginServlet.COOKIE_NAME.equals(cookie.getName())) {\n String rememberme = req.getParameter(COOKIE_NAME);\n if (rememberme != null) {\n token = cookie.getValue();\n break;\n }\n }\n }\n if (token == null) {\n TransientTokenService tokenService = AbstractTokenService.getInstance(TransientTokenService.class);\n token = tokenService.createToken(credentials);\n }\n sendAuth(resp, credentials.getUsername(), token);\n}\n"
"public void paint(Graphics g) {\n g.setFont(new Font(\"String_Node_Str\", Font.BOLD, 11));\n for (int i = 0; i < 16; i++) {\n int currentY = height - startY - (15 - i) * (barHeight + whiteSpaceHeight);\n String rank = i + 1 + \"String_Node_Str\";\n if (i < 9)\n rank = \"String_Node_Str\" + rank;\n g.setColor(Color.LIGHT_GRAY);\n g.drawOval(14 - 2, currentY - 1, 19, 19);\n g.drawLine(14 + 18, currentY + 8, 14 + 18 + 16, currentY + 8);\n g.drawLine(14 + 18, currentY + 9, 14 + 18 + 16, currentY + 9);\n g.drawOval(width - 31 - 2, currentY - 1, 19, 19);\n g.drawLine(width - 31 - 2, currentY + 8, width - 31 - 2 - 16, currentY + 8);\n g.drawLine(width - 31 - 2, currentY + 9, width - 31 - 2 - 16, currentY + 9);\n g.setColor(Color.BLACK);\n g.drawString(rank, 14, currentY + 12);\n g.drawString(rank, width - 31, currentY + 12);\n }\n g.drawString(\"String_Node_Str\", 8, centerY - 84);\n g.drawString(\"String_Node_Str\", width - 40, centerY - 84);\n for (int i = 0; i < 22; i++) {\n LinkedList<Book.BookStats> currentBucket = buckets.get(i);\n int currentX = rankingWidth + i * intervalWidth;\n Iterator<Book.BookStats> it = currentBucket.listIterator();\n g.setFont(new Font(\"String_Node_Str\", Font.PLAIN, 9));\n while (it.hasNext()) {\n Book.BookStats stat = it.next();\n int currentY = height - startY - (16 - stat.ranking) * (barHeight + whiteSpaceHeight);\n if (state == State.OVERALL || stat.owner == currentBook)\n g.setColor(stat.owner.colour);\n else\n g.setColor(new Color(224, 224, 224));\n g.fillRect(currentX, currentY, intervalWidth / 2, barHeight);\n if (stat.next != null && stat.week + 1 == stat.next.week) {\n int nextY = height - startY - (16 - stat.next.ranking) * (barHeight + whiteSpaceHeight);\n int[] y = { currentY, nextY, nextY + barHeight, currentY + barHeight };\n int[] x = { currentX + intervalWidth / 2, currentX + intervalWidth, currentX + intervalWidth, currentX + intervalWidth / 2 };\n g.fillPolygon(x, y, 4);\n }\n if (stat.isFirst && (state == State.OVERALL || currentBook == stat.owner)) {\n g.setColor(Color.WHITE);\n if (stat.owner.title.length() < 8)\n g.drawString(stat.owner.title, currentX + 2, currentY + 12);\n else\n g.drawString(stat.owner.title.substring(0, 8) + \"String_Node_Str\", currentX + 2, currentY + 12);\n }\n if (state == State.DETAIL && stat.owner == currentBook) {\n g.setFont(new Font(\"String_Node_Str\", Font.BOLD, 11));\n g.setColor(Color.BLACK);\n if (stat.ranking < 10)\n g.drawString(stat.ranking + \"String_Node_Str\", currentX + intervalWidth / 4 - 4, currentY - 4);\n else\n g.drawString(stat.ranking + \"String_Node_Str\", currentX + intervalWidth / 4 - 8, currentY - 4);\n }\n }\n g.setFont(new Font(\"String_Node_Str\", Font.BOLD, 11));\n g.setColor(Color.BLACK);\n g.drawString(\"String_Node_Str\" + (i + 1), currentX, height - 32);\n if (bookColour != null) {\n int xOffset = (int) ((ScrollPane) (this.getParent())).getScrollPosition().getX() + 400 - 150;\n FontMetrics metric = getFontMetrics(g.getFont());\n int stringWidth = metric.stringWidth(bookName);\n g.clearRect(0, height - 20, width, 22);\n g.setColor(Color.GRAY);\n g.fillRect(xOffset + 2, height - 20 + 2, 300, 20);\n g.setColor(bookColour);\n g.fillRect(xOffset, height - 20, 300, 20);\n g.setColor(Color.WHITE);\n g.drawString(bookName, xOffset + (300 - stringWidth) / 2, height - 17 + 11);\n if (state == state.DETAIL) {\n int windowOffsetX = xOffset - 245;\n int windowOffsetY = 15;\n int windowWidth = 400;\n int windowHeight = 150;\n FontMetrics fmet;\n Font heading = new Font(\"String_Node_Str\", Font.BOLD, 16);\n fmet = getFontMetrics(heading);\n g.setFont(heading);\n g.clearRect(0, 0, width, windowHeight + 25);\n String title = currentBook.title;\n String author = currentBook.author;\n String desc = currentBook.description;\n g.setColor(Color.GRAY);\n g.fillRect(windowOffsetX + 2, windowOffsetY + 2, windowWidth, windowHeight);\n g.setColor(bookColour);\n g.fillRect(windowOffsetX, windowOffsetY, windowWidth, windowHeight);\n g.setColor(Color.WHITE);\n g.drawImage(currentBook.novelPic, windowOffsetX + (windowWidth * 2 / 3) + 30, 20, 90, 135, this);\n g.drawImage(currentBook.tagPic, xOffset + 250, 5, 210, 180, this);\n int headingWidth = (fmet.stringWidth(title));\n if (headingWidth < windowWidth) {\n windowOffsetY += 20;\n g.drawString(title, windowOffsetX + (windowWidth / 2) - (headingWidth / 2), windowOffsetY);\n } else {\n String title1 = title.substring(0, title.length() / 2);\n int title1Width = (fmet.stringWidth(title1));\n String title2 = title.substring(title.length() / 2);\n int title12Width = (fmet.stringWidth(title2));\n windowOffsetY += 15;\n g.drawString(title1, windowOffsetX + (windowWidth / 2) - (title1Width / 2), windowOffsetY);\n windowOffsetY += 15;\n g.drawString(title2, windowOffsetX + (windowWidth / 2) - (title12Width / 2), windowOffsetY);\n }\n g.setFont(new Font(\"String_Node_Str\", Font.ITALIC, 14));\n fmet = getFontMetrics(new Font(\"String_Node_Str\", Font.ITALIC, 14));\n windowOffsetY += 15;\n g.drawString(author, windowOffsetX + (windowWidth / 2) - (fmet.stringWidth(author)) / 2, windowOffsetY);\n g.setFont(new Font(\"String_Node_Str\", Font.ITALIC, 10));\n fmet = getFontMetrics(new Font(\"String_Node_Str\", Font.ITALIC, 10));\n windowOffsetY += 20;\n int descwidth = fmet.stringWidth(desc);\n if (descwidth < (windowWidth * 2) / 3) {\n g.drawString(desc, windowOffsetX + (windowWidth / 3) - (descwidth / 2), windowOffsetY);\n } else if (descwidth / 2 < (windowWidth * 2) / 3) {\n String desc1 = desc.substring(0, desc.length() / 2);\n String desc2 = desc.substring(desc.length() / 2);\n g.drawString(desc1, windowOffsetX + (windowWidth / 3) - (fmet.stringWidth(desc1)) / 2, windowOffsetY);\n windowOffsetY += 10;\n g.drawString(desc2, windowOffsetX + (windowWidth / 3) - (fmet.stringWidth(desc2)) / 2, windowOffsetY);\n } else {\n String desc1 = desc.substring(0, desc.length() / 3);\n String desc2 = desc.substring(desc.length() / 3, desc.length() * 2 / 3);\n String desc3 = desc.substring(desc.length() * 2 / 3);\n g.drawString(desc1, windowOffsetX + (windowWidth / 3) - (fmet.stringWidth(desc1)) / 2, windowOffsetY);\n windowOffsetY += 10;\n g.drawString(desc2, windowOffsetX + (windowWidth / 3) - (fmet.stringWidth(desc2)) / 2, windowOffsetY);\n windowOffsetY += 10;\n g.drawString(desc3, windowOffsetX + (windowWidth / 3) - (fmet.stringWidth(desc3)) / 2, windowOffsetY);\n }\n }\n } else {\n g.clearRect(0, height - 20, width, 22);\n }\n }\n}\n"
"void reportEvent(UsageEvents.Event event, long deviceUsageTime) {\n if (DEBUG) {\n Slog.d(TAG, mLogPrefix + \"String_Node_Str\" + event.mPackage + \"String_Node_Str\" + event.mTimeStamp + \"String_Node_Str\" + eventToString(event.mEventType));\n }\n if (event.mTimeStamp >= mDailyExpiryDate.getTimeInMillis()) {\n rolloverStats(event.mTimeStamp, deviceUsageTime);\n }\n final IntervalStats currentDailyStats = mCurrentStats[UsageStatsManager.INTERVAL_DAILY];\n final Configuration newFullConfig = event.mConfiguration;\n if (event.mEventType == UsageEvents.Event.CONFIGURATION_CHANGE && currentDailyStats.activeConfiguration != null) {\n event.mConfiguration = Configuration.generateDelta(currentDailyStats.activeConfiguration, newFullConfig);\n }\n if (currentDailyStats.events == null) {\n currentDailyStats.events = new TimeSparseArray<>();\n }\n if (event.mEventType != UsageEvents.Event.SYSTEM_INTERACTION) {\n currentDailyStats.events.put(event.mTimeStamp, event);\n }\n for (IntervalStats stats : mCurrentStats) {\n if (event.mEventType == UsageEvents.Event.CONFIGURATION_CHANGE) {\n stats.updateConfigurationStats(newFullConfig, event.mTimeStamp);\n } else {\n stats.update(event.mPackage, event.mTimeStamp, event.mEventType);\n stats.updateBeginIdleTime(event.mPackage, deviceUsageTime);\n }\n }\n if (event.mEventType != Event.CONFIGURATION_CHANGE) {\n mAppIdleRollingWindow.update(event.mPackage, event.mTimeStamp, event.mEventType);\n mAppIdleRollingWindow.updateBeginIdleTime(event.mPackage, deviceUsageTime);\n }\n notifyStatsChanged();\n}\n"
"public void configure(final OETLProcessor iProcessor, final ODocument iConfiguration, final OBasicCommandContext iContext) {\n super.configure(iProcessor, iConfiguration, iContext);\n if (iConfiguration.containsField(\"String_Node_Str\"))\n separator = iConfiguration.field(\"String_Node_Str\").toString().charAt(0);\n if (iConfiguration.containsField(\"String_Node_Str\"))\n columnsOnFirstLine = (Boolean) iConfiguration.field(\"String_Node_Str\");\n if (iConfiguration.containsField(\"String_Node_Str\")) {\n final List<String> columns = iConfiguration.field(\"String_Node_Str\");\n columnNames = new ArrayList<String>(columns.size());\n columnTypes = new ArrayList<OType>(columns.size());\n for (String c : columns) {\n final String[] parts = c.split(\"String_Node_Str\");\n columnNames.add(parts[0]);\n if (parts.length > 1)\n columnTypes.add(OType.valueOf(parts[1].toUpperCase()));\n else\n columnTypes.add(OType.ANY);\n }\n }\n if (iConfiguration.containsField(\"String_Node_Str\"))\n skipFrom = ((Number) iConfiguration.field(\"String_Node_Str\")).longValue();\n if (iConfiguration.containsField(\"String_Node_Str\"))\n skipTo = ((Number) iConfiguration.field(\"String_Node_Str\")).longValue();\n if (iConfiguration.containsField(\"String_Node_Str\"))\n nullValue = iConfiguration.field(\"String_Node_Str\");\n if (iConfiguration.containsField(\"String_Node_Str\"))\n stringCharacter = iConfiguration.field(\"String_Node_Str\").toString().charAt(0);\n}\n"
"private void updateState(boolean uploadForever) {\n seedRatioLabel.setEnabled(!uploadForever);\n seedRatioSpinner.setEnabled(!uploadForever);\n seedTimeLabel.setEnabled(!uploadForever);\n seedTimeSpinner.setEnabled(!uploadForever);\n}\n"
"public static <T extends Node> T evaluateNodeXPath(Element root, String expr, XPathPrefixResolver resolver) {\n return (T) evaluateNodeXPath_(root, expr, resolver);\n}\n"
"private Object getGenericRepositoryValue(GenericConnection connection, String value, IMetadataTable table) {\n if (connection == null) {\n return null;\n }\n String serialized = connection.getCompProperties();\n if (serialized != null) {\n Deserialized fromSerialized = ComponentProperties.fromSerialized(serialized);\n if (fromSerialized != null) {\n ComponentProperties componentProperties = fromSerialized.properties;\n String tableName = null;\n if (IComponentConstants.SCHEMA.equals(value)) {\n if (table != null) {\n tableName = table.getTableName();\n if (tableName != null) {\n return table.getId() + \"String_Node_Str\" + tableName;\n }\n }\n } else if (IComponentConstants.MODULENAME.equals(value)) {\n if (ComponentsUtils.getGenericPropertyValue(componentProperties, value) != null) {\n return ComponentsUtils.getGenericPropertyValue(componentProperties, value);\n } else {\n if (table != null) {\n tableName = table.getTableName();\n if (tableName == null) {\n tableName = table.getLabel();\n }\n return tableName;\n }\n }\n } else if (IComponentConstants.QUERYMODE.equals(value)) {\n if (ComponentsUtils.getGenericPropertyValue(componentProperties, value) != null) {\n return ComponentsUtils.getGenericPropertyValue(componentProperties, value);\n } else {\n return IComponentConstants.QUERY_QUERY;\n }\n } else if (IComponentConstants.OUTPUTACTION.equals(value)) {\n if (ComponentsUtils.getGenericPropertyValue(componentProperties, value) != null) {\n return ComponentsUtils.getGenericPropertyValue(componentProperties, value);\n } else {\n return IComponentConstants.ACTION_INSERT;\n }\n } else {\n return ComponentsUtils.getGenericPropertyValue(componentProperties, value);\n }\n }\n }\n return null;\n}\n"
"void invalidateOnRefresh(TypeOracle typeOracle) {\n if (!isTypeOracleBuilderFirstTime()) {\n changedFiles.addAll(generatedCupLocations);\n addDependentsToChangedFiles();\n for (Iterator iter = changedFiles.iterator(); iter.hasNext(); ) {\n String location = (String) iter.next();\n CompilationUnitProvider cup = (CompilationUnitProvider) getCupsByLocation().get(location);\n unitsByCup.remove(location);\n Util.invokeInaccessableMethod(TypeOracle.class, \"String_Node_Str\", new Class[] { CompilationUnitProvider.class }, typeOracle, new Object[] { cup });\n }\n astCompiler.invalidateChangedFiles(changedFiles, invalidatedTypes);\n } else {\n becomeTypeOracleNotFirstTime();\n }\n}\n"
"public void load(final Object input, OCommandContext context) {\n if (input == null)\n return;\n if (input instanceof OrientVertex) {\n final OrientVertex v = (OrientVertex) input;\n if (clusterName != null)\n v.save(clusterName);\n else\n v.save();\n } else if (input instanceof ODocument) {\n final ODocument doc = (ODocument) input;\n if (className != null)\n doc.setClassName(className);\n if (clusterName != null)\n doc.save(clusterName);\n else\n doc.save();\n }\n progress.incrementAndGet();\n if (batchCommit > 0) {\n if (batchCounter > batchCommit) {\n if (dbType == DB_TYPE.DOCUMENT) {\n final ODatabaseDocumentTx documentDatabase = pipeline.getDocumentDatabase();\n documentDatabase.commit();\n documentDatabase.begin();\n } else {\n pipeline.getGraphDatabase().commit();\n }\n batchCounter = 0;\n } else\n batchCounter++;\n }\n}\n"
"public void webServicePaybox(ActionRequest request, ActionResponse response) throws Exception {\n Context context = request.getContext();\n PaymentVoucherPayboxService paymentVoucherPayboxService = Beans.get(PaymentVoucherPayboxService.class);\n String idPaymentVoucher = (String) context.get(\"String_Node_Str\");\n String operation = (String) context.get(\"String_Node_Str\");\n String signature = (String) context.get(\"String_Node_Str\");\n if (idPaymentVoucher != null && operation != null && signature != null) {\n LOG.debug(\"String_Node_Str\" + idPaymentVoucher);\n PaymentVoucher paymentVoucher = paymentVoucherPayboxService.find(Long.parseLong(idPaymentVoucher));\n LOG.debug(\"String_Node_Str\" + paymentVoucher);\n boolean verified = false;\n if (paymentVoucher != null && paymentVoucher.getCompany() != null && !paymentVoucher.getPayboxPaidOk()) {\n List<String> varList = new ArrayList<String>();\n String retourVars = paymentVoucher.getCompany().getAccountConfig().getPayboxConfig().getPayboxRetour();\n String[] retours = retourVars.split(\"String_Node_Str\");\n varList.add(\"String_Node_Str\" + idPaymentVoucher);\n LOG.debug(\"String_Node_Str\" + idPaymentVoucher);\n varList.add(\"String_Node_Str\" + operation);\n LOG.debug(\"String_Node_Str\" + operation);\n for (int i = 0; i < retours.length - 1; i++) {\n String variableName = retours[i].split(\"String_Node_Str\")[0];\n String varValue = (String) context.get(variableName);\n String varBuilt = variableName + \"String_Node_Str\" + varValue;\n LOG.debug(varBuilt);\n if (varValue != null) {\n varList.add(varBuilt);\n }\n }\n verified = Beans.get(PayboxService.class).checkPaybox(signature, varList, paymentVoucher.getCompany());\n LOG.debug(\"String_Node_Str\", verified);\n }\n if (verified) {\n if (operation.equals(\"String_Node_Str\") && (String) context.get(\"String_Node_Str\") != null && (String) context.get(\"String_Node_Str\") != null) {\n paymentVoucherPayboxService.authorizeConfirmPaymentVoucher(paymentVoucher, (String) context.get(\"String_Node_Str\"), (String) context.get(\"String_Node_Str\"));\n response.setFlash(I18n.get(IExceptionMessage.PAYBOX_6));\n LOG.debug(\"String_Node_Str\");\n } else if (operation == \"String_Node_Str\") {\n response.setFlash(I18n.get(IExceptionMessage.PAYBOX_7));\n LOG.debug(\"String_Node_Str\");\n } else if (operation == \"String_Node_Str\") {\n response.setFlash(I18n.get(IExceptionMessage.PAYBOX_8));\n LOG.debug(\"String_Node_Str\");\n }\n } else {\n response.setFlash(I18n.get(IExceptionMessage.PAYBOX_9));\n LOG.debug(\"String_Node_Str\");\n }\n }\n}\n"
"private static List<ColumnConfig> createRemindersGridColumns() {\n final DateTimeFormat format = DateUtils.DATE_SHORT;\n final Date now = new Date();\n final ColumnConfig iconColumn = new ColumnConfig();\n iconColumn.setId(\"String_Node_Str\");\n iconColumn.setHeaderHtml(\"String_Node_Str\");\n iconColumn.setWidth(16);\n iconColumn.setResizable(false);\n iconColumn.setRenderer(new GridCellRenderer<ReminderDTO>() {\n public Object render(final ReminderDTO model, final String property, final ColumnData config, final int rowIndex, final int colIndex, final ListStore<ReminderDTO> store, final Grid<ReminderDTO> grid) {\n if (DateUtils.DAY_COMPARATOR.compare(now, model.getExpectedDate()) > 0) {\n return IconImageBundle.ICONS.overdueReminder().createImage();\n } else {\n return IconImageBundle.ICONS.openedReminder().createImage();\n }\n }\n });\n final ColumnConfig labelColumn = new ColumnConfig();\n labelColumn.setId(ReminderDTO.LABEL);\n labelColumn.setHeaderHtml(I18N.CONSTANTS.monitoredPointLabel());\n labelColumn.setWidth(100);\n final ColumnConfig expectedDateColumn = new ColumnConfig();\n expectedDateColumn.setId(ReminderDTO.EXPECTED_DATE);\n expectedDateColumn.setHeaderHtml(I18N.CONSTANTS.monitoredPointExpectedDate());\n expectedDateColumn.setWidth(60);\n expectedDateColumn.setDateTimeFormat(format);\n expectedDateColumn.setRenderer(new GridCellRenderer<ReminderDTO>() {\n public Object render(final ReminderDTO model, final String property, final ColumnData config, final int rowIndex, final int colIndex, final ListStore<ReminderDTO> store, final Grid<ReminderDTO> grid) {\n final Label label = new Label(format.format(model.getExpectedDate()));\n if (!model.isCompleted() && DateUtils.DAY_COMPARATOR.compare(now, model.getExpectedDate()) > 0) {\n label.addStyleName(EXPECTED_DATE_LABEL_STYLE);\n }\n return label;\n }\n });\n return Arrays.asList(new ColumnConfig[] { iconColumn, labelColumn, projectNameColumn, projectCodeColumn, expectedDateColumn });\n}\n"
"public void run() {\n try {\n System.getProperties().put(\"String_Node_Str\", user);\n System.getProperties().put(\"String_Node_Str\", passwordStr);\n System.getProperties().put(\"String_Node_Str\", namespace);\n System.getProperties().put(\"String_Node_Str\", String.valueOf(port));\n SimpleAccumuloFetch.main(new String[] {});\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n}\n"
"public List<FetchResult> fetchRowBatch(String table, List<Selector> selectors) throws BlurException, TException {\n Map<Integer, FetchResult> resultMap = new TreeMap<Integer, FetchResult>();\n Map<Integer, Integer> requestMapping = new HashMap<Integer, Integer>();\n List<Selector> selectorRequest = new ArrayList<Selector>();\n for (int i = 0; i < selectors.size(); i++) {\n Selector selector = selectors.get(i);\n Selector copy = new Selector(selector);\n ThriftCacheKey<Selector> key = _thriftCache.getKey(table, getShards(table), copy, Selector.class);\n FetchResult fetchResult = _thriftCache.get(key, FetchResult.class);\n if (fetchResult != null) {\n resultMap.put(i, fetchResult);\n } else {\n int index = selectorRequest.size();\n requestMapping.put(index, i);\n selectorRequest.add(selector);\n }\n }\n if (selectorRequest.size() != 0) {\n List<FetchResult> missingResults = super.fetchRowBatch(table, selectorRequest);\n for (int i = 0; i < missingResults.size(); i++) {\n Selector selector = selectorRequest.get(i);\n FetchResult fetchResult = missingResults.get(i);\n ThriftCacheKey<Selector> key = _thriftCache.getKey(table, new Selector(selector), Selector.class);\n _thriftCache.put(key, fetchResult);\n int originalIndex = requestMapping.get(i);\n resultMap.put(originalIndex, fetchResult);\n }\n }\n return toList(resultMap);\n}\n"
"public final OccupyerPlace addSoldier(IBuildingOccupyableMovable soldier) {\n OccupyerPlace freePosition = findFreePositionFor(soldier.getSoldierType());\n emptyPlaces.remove(freePosition);\n currentlyCommingSoldiers[freePosition.getType().ordinal()]--;\n TowerOccupier towerOccupier = new TowerOccupier(freePosition, soldier);\n occupiers.add(towerOccupier);\n occupyAreaIfNeeded();\n soldier.setSelected(super.isSelected());\n addInformableMapObject(towerOccupier, true);\n return freePosition;\n}\n"
"public static final void checkConstructorModifiers(final int modifiers) {\n if ((modifiers & ~(PUBLIC_MOD | PROTECTED_MOD | PRIVATE_MOD)) != 0) {\n throw new RuntimeException(\"String_Node_Str\" + toString(modifiers));\n }\n}\n"
"protected IContextInformation computeContextInformation() {\n if (hasParameters() && (fProposal.getKind() == CompletionProposal.METHOD_REF || fProposal.getKind() == CompletionProposal.CONSTRUCTOR_INVOCATION)) {\n return new ProposalContextInformation(fProposal);\n }\n return super.computeContextInformation();\n}\n"
"public ExpandableView getChildAtPosition(float touchX, float touchY) {\n final int count = getChildCount();\n for (int childIdx = 0; childIdx < count; childIdx++) {\n ExpandableView slidingChild = (ExpandableView) getChildAt(childIdx);\n if (slidingChild.getVisibility() == GONE || slidingChild instanceof StackScrollerDecorView || slidingChild == mSpeedBumpView) {\n continue;\n }\n float childTop = slidingChild.getTranslationY();\n float top = childTop + slidingChild.getClipTopAmount();\n float bottom = childTop + slidingChild.getActualHeight();\n int left = 0;\n int right = getWidth();\n if (touchY >= top && touchY <= bottom && touchX >= left && touchX <= right) {\n return slidingChild;\n }\n }\n return null;\n}\n"
"protected void removeObserver() {\n getNetworkSynchronizer().onRemoved();\n}\n"
"private void mockForGetChildren() throws Exception {\n IResource[] res = new IResource[3];\n for (int i = 0; i < 3; i++) {\n IFile fe = mock(IFile.class);\n when(fe.getFullPath()).thenReturn(new Path(\"String_Node_Str\"));\n res[i] = fe;\n }\n PowerMockito.mockStatic(ReportUtils.class);\n IFile repFile = mock(IFile.class);\n when(ReportUtils.getReportGeneratedDocs(repFile)).thenReturn(res);\n PowerMockito.mockStatic(ResourceFileMap.class);\n when(ResourceFileMap.findCorrespondingFile(report)).thenReturn(repFile);\n PowerMockito.mockStatic(ProjectManager.class);\n ProjectManager projManager = mock(ProjectManager.class);\n when(projManager.getProjectNode(\"String_Node_Str\")).thenReturn(null);\n PowerMockito.mockStatic(CoreRuntimePlugin.class);\n CoreRuntimePlugin coreRunPlugin = mock(CoreRuntimePlugin.class);\n when(CoreRuntimePlugin.getInstance()).thenReturn(coreRunPlugin).thenReturn(coreRunPlugin).thenReturn(coreRunPlugin);\n when(ProjectManager.getInstance()).thenReturn(projManager).thenReturn(projManager).thenReturn(projManager);\n}\n"
"public void handleReceived(ClientConnection connection) {\n PlayerCloseWindowEvent event = new PlayerCloseWindowEvent(TridentServer.getInstance().getWindow(this.id));\n TridentServer.getInstance().getEventManager().call(event);\n if (event.isIgnored()) {\n }\n}\n"
"public void send(int channelindex, Token token, double delay) throws InvalidStateException, IllegalActionException {\n if (delay < -1.0) {\n throw new IllegalActionException(this, \"String_Node_Str\" + \"String_Node_Str\");\n }\n Receiver[][] farRec;\n try {\n workspace().getReadAccess();\n if (!isOutput()) {\n throw new IllegalActionException(this, \"String_Node_Str\" + \"String_Node_Str\");\n }\n if (channelindex >= getWidth() || channelindex < 0) {\n throw new IllegalActionException(this, \"String_Node_Str\");\n }\n farRec = (ODReceiver[][]) getRemoteReceivers();\n if (farRec == null || farRec[channelindex] == null)\n return;\n } finally {\n workspace().doneReading();\n }\n for (int j = 0; j < farRec[channelindex].length; j++) {\n double currentTime = ((ODActor) getContainer()).getCurrentTime();\n farRec[channelindex][j].put(token, currentTime + delay);\n }\n}\n"
"List<Field> findAllTargetInstanceFieldsInTestedClassHierarchy(Class<?> testedClass) {\n requireDIAnnotation = false;\n List<Field> targetFields = new ArrayList<Field>();\n Class<?> classWithFields = testedClass;\n do {\n Field[] fields = classWithFields.getDeclaredFields();\n for (Field field : fields) {\n if (isEligibleForInjection(field)) {\n targetFields.add(field);\n }\n }\n classWithFields = classWithFields.getSuperclass();\n } while (isClassFromSameModuleOrSystemAsTestedClass(classWithFields) || isServlet(classWithFields));\n return targetFields;\n}\n"
"public void init(RichTextArea textArea, Config config) {\n super.init(textArea, config);\n saveRegistration(textArea.addKeyDownHandler(this));\n saveRegistration(textArea.addKeyPressHandler(this));\n saveRegistration(textArea.addKeyUpHandler(this));\n getTextArea().getCommandManager().addCommandListener(this);\n bodyNode = textArea.getDocument().getBody();\n Tree t = Converter.fromNativeToCustom(Element.as(bodyNode));\n clientJupiter = new ClientJupiterAlg(new TreeDocument(t));\n clientJupiter.setEditingSessionId(Integer.parseInt(config.getParameter(RtApi.DOCUMENT_ID)));\n clientJupiter.setCommunicationService(CommunicationService.ServiceHelper.getCommunicationService());\n clientJupiter.setCallback(new ClientCallback.TreeClientCallback(textArea.getDocument().getBody()));\n clientJupiter.connect();\n customizeActionListeners();\n}\n"
"private synchronized void zoom(int nbClicks) {\n fScrollCounter = null;\n long requestedRange = (nbClicks > 0) ? Math.round(ZOOM_FACTOR * fRangeDuration) : (long) Math.ceil(fRangeDuration * (1.0 / ZOOM_FACTOR));\n long requestedStart = validateStart(fRangeStartTime + (long) ((fRangeDuration - requestedRange) / 2));\n long requestedEnd = validateEnd(requestedStart, requestedStart + requestedRange);\n requestedStart = validateStart(requestedEnd - requestedRange);\n fHistogram.updateTimeRange(requestedStart, requestedEnd);\n}\n"
"public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object value, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext) {\n if (null == value) {\n return false;\n }\n boolean wasXMLRoot = false;\n XPathFragment xmlRootFragment = null;\n Object originalValue = value;\n Descriptor descriptor;\n ObjectBuilder objectBuilder;\n CoreAbstractSession childSession;\n Marshaller marshaller = marshalRecord.getMarshaller();\n XPathFragment rootFragment;\n if (xmlAnyCollectionMapping.usesXMLRoot() && (value instanceof Root)) {\n xmlRootFragment = new XPathFragment();\n xmlRootFragment.setNamespaceAware(marshalRecord.isNamespaceAware());\n wasXMLRoot = true;\n value = ((Root) value).getObject();\n if (null == value) {\n return false;\n }\n }\n UnmarshalKeepAsElementPolicy keepAsElementPolicy = xmlAnyCollectionMapping.getKeepAsElementPolicy();\n if (value instanceof String) {\n marshalSimpleValue(xmlRootFragment, marshalRecord, originalValue, object, value, session, namespaceResolver);\n } else if (null != keepAsElementPolicy && (keepAsElementPolicy.isKeepUnknownAsElement() || keepAsElementPolicy.isKeepAllAsElement()) && value instanceof org.w3c.dom.Node) {\n marshalRecord.node((org.w3c.dom.Node) value, marshalRecord.getNamespaceResolver());\n } else {\n try {\n childSession = marshaller.getXMLContext().getSession(value);\n } catch (XMLMarshalException e) {\n marshalSimpleValue(xmlRootFragment, marshalRecord, originalValue, object, value, session, namespaceResolver);\n return true;\n }\n descriptor = (Descriptor) childSession.getDescriptor(value);\n objectBuilder = (ObjectBuilder) descriptor.getObjectBuilder();\n List extraNamespaces = objectBuilder.addExtraNamespacesToNamespaceResolver(descriptor, marshalRecord, session, true, true);\n if (wasXMLRoot) {\n Namespace generatedNamespace = setupFragment(((Root) originalValue), xmlRootFragment, marshalRecord);\n if (generatedNamespace != null) {\n if (extraNamespaces == null) {\n extraNamespaces = new java.util.ArrayList();\n }\n extraNamespaces.add(generatedNamespace);\n }\n }\n String defaultRootElementString = descriptor.getDefaultRootElement();\n if (!wasXMLRoot && (defaultRootElementString == null)) {\n AbstractSessionLog.getLog().log(SessionLog.WARNING, \"String_Node_Str\", new Object[] { Helper.getShortClassName(this.getClass()), descriptor });\n } else {\n marshalRecord.beforeContainmentMarshal(value);\n if (xmlRootFragment != null) {\n rootFragment = xmlRootFragment;\n } else {\n rootFragment = new XPathFragment(defaultRootElementString);\n if (rootFragment.getNamespaceURI() == null) {\n String uri = descriptor.getNonNullNamespaceResolver().resolveNamespacePrefix(rootFragment.getPrefix());\n rootFragment.setNamespaceURI(uri);\n }\n }\n if (!wasXMLRoot) {\n marshalRecord.setLeafElementType(descriptor.getDefaultRootElementType());\n }\n getXPathNode().startElement(marshalRecord, rootFragment, object, childSession, marshalRecord.getNamespaceResolver(), objectBuilder, value);\n writeExtraNamespaces(extraNamespaces, marshalRecord, session);\n objectBuilder.addXsiTypeAndClassIndicatorIfRequired(marshalRecord, descriptor, descriptor, (Field) xmlAnyCollectionMapping.getField(), originalValue, value, wasXMLRoot, false);\n objectBuilder.buildRow(marshalRecord, value, session, marshaller, null);\n marshalRecord.afterContainmentMarshal(object, value);\n marshalRecord.endElement(rootFragment, namespaceResolver);\n objectBuilder.removeExtraNamespacesFromNamespaceResolver(marshalRecord, extraNamespaces, session);\n }\n }\n return true;\n}\n"
"public void equals_otherObject() {\n Assert.assertNotEquals(this.rolePrincipal, \"String_Node_Str\");\n}\n"
"private String formatPath(String path) {\n String formattedPath = null;\n if (path != null) {\n formattedPath = (path.startsWith(\"String_Node_Str\") ? path : \"String_Node_Str\" + path);\n formattedPath = (path.endsWith(\"String_Node_Str\") ? formattedPath : formattedPath + \"String_Node_Str\");\n }\n return formattedPath;\n}\n"
"public void updateEntity() {\n super.updateEntity();\n if (!worldObj.isRemote) {\n if (pairedGate == null) {\n Vector3 thisVector = new Vector3(this);\n Vector3 foundVector = null;\n for (int i = 0; i < 4; i = i + 90) {\n MovingObjectPosition mop = thisVector.rayTraceBlocks(worldObj, i, 0, false, 10);\n foundVector = new Vector3(mop);\n TileEntity tile = worldObj.getBlockTileEntity(foundVector.intX(), foundVector.intY(), foundVector.intZ());\n if (tile != null) {\n this.pairedGate = (TileLaserGate) tile;\n this.pairedGate.pairedGate = this;\n }\n }\n }\n }\n}\n"
"public boolean evaluate(Object o) {\n Field f = fieldDef.getJavaField();\n Object oVal;\n try {\n oVal = f.get(o);\n } catch (IllegalArgumentException e) {\n throw new JDOFatalInternalException(\"String_Node_Str\" + fieldDef.getName() + \"String_Node_Str\" + o.getClass().getName() + \"String_Node_Str\" + f.getDeclaringClass().getName(), e);\n } catch (IllegalAccessException e) {\n throw new JDOFatalInternalException(\"String_Node_Str\" + fieldDef.getName(), e);\n }\n Object qVal = getValue();\n if (oVal == null && qVal == QueryParser.NULL) {\n return true;\n } else if (qVal != QueryParser.NULL && oVal != null) {\n if (qVal.equals(oVal) && (op == COMP_OP.EQ || op == COMP_OP.LE || op == COMP_OP.AE)) {\n return true;\n }\n if (qVal instanceof Comparable) {\n Comparable qComp = (Comparable) qVal;\n int res = qComp.compareTo(oVal);\n if (res == 1 && (op == COMP_OP.LE || op == COMP_OP.L || op == COMP_OP.NE)) {\n return true;\n } else if (res == -1 && (op == COMP_OP.AE || op == COMP_OP.A || op == COMP_OP.NE)) {\n return true;\n }\n }\n }\n return false;\n}\n"
"protected void onDetachedFromWindowInternal() {\n if (mPreDrawRegistered) {\n getViewTreeObserver().removeOnPreDrawListener(this);\n mPreDrawListenerDetached = true;\n }\n resetResolvedDrawables();\n if (mEditor != null)\n mEditor.onDetachedFromWindow();\n super.onDetachedFromWindowInternal();\n}\n"
"public StartPAOSResponse sendStartPAOS(StartPAOS message) throws DispatcherException, PAOSException {\n Object msg = message;\n String hostname = endpoint.getHost();\n int port = endpoint.getPort();\n if (port == -1) {\n port = endpoint.getDefaultPort();\n }\n String resource = endpoint.getFile();\n try {\n while (true) {\n Socket socket = ProxySettings.getDefault().getSocket(hostname, port);\n StreamHttpClientConnection conn;\n try {\n conn = createTlsConnection(hostname, port, ProtocolVersion.TLSv11);\n } catch (IOException ex) {\n logger.error(\"String_Node_Str\", ex);\n conn = createTlsConnection(hostname, port, ProtocolVersion.TLSv10);\n }\n HttpContext ctx = new BasicHttpContext();\n HttpRequestExecutor httpexecutor = new HttpRequestExecutor();\n DefaultConnectionReuseStrategy reuse = new DefaultConnectionReuseStrategy();\n boolean isReusable;\n do {\n BasicHttpEntityEnclosingRequest req = new BasicHttpEntityEnclosingRequest(\"String_Node_Str\", resource);\n req.setParams(conn.getParams());\n HttpRequestHelper.setDefaultHeader(req, hostname);\n String reqMsgStr = createPAOSResponse(msg);\n req.setHeader(ECardConstants.HEADER_KEY_PAOS, ECardConstants.HEADER_VALUE_PAOS);\n req.setHeader(\"String_Node_Str\", \"String_Node_Str\");\n ContentType reqContentType = ContentType.create(\"String_Node_Str\", \"String_Node_Str\");\n StringEntity reqMsg = new StringEntity(reqMsgStr, reqContentType);\n req.setEntity(reqMsg);\n req.setHeader(reqMsg.getContentType());\n req.setHeader(\"String_Node_Str\", Long.toString(reqMsg.getContentLength()));\n HttpResponse response = httpexecutor.execute(req, conn, ctx);\n int statusCode = response.getStatusLine().getStatusCode();\n checkHTTPStatusCode(msg, statusCode);\n conn.receiveResponseEntity(response);\n HttpEntity entity = response.getEntity();\n Object requestObj = processPAOSRequest(entity.getContent());\n if (requestObj instanceof StartPAOSResponse) {\n StartPAOSResponse startPAOSResponse = (StartPAOSResponse) requestObj;\n WSHelper.checkResult(startPAOSResponse);\n return startPAOSResponse;\n }\n msg = dispatcher.deliver(requestObj);\n isReusable = reuse.keepAlive(response, ctx);\n } while (isReusable);\n }\n } catch (HttpException ex) {\n throw new PAOSException(\"String_Node_Str\", ex);\n } catch (IOException ex) {\n throw new PAOSException(ex);\n } catch (SOAPException ex) {\n throw new PAOSException(\"String_Node_Str\", ex);\n } catch (URISyntaxException ex) {\n throw new PAOSException(\"String_Node_Str\", ex);\n } catch (MarshallingTypeException ex) {\n throw new DispatcherException(\"String_Node_Str\", ex);\n } catch (InvocationTargetException ex) {\n throw new DispatcherException(\"String_Node_Str\", ex);\n } catch (TransformerException ex) {\n throw new DispatcherException(ex);\n } catch (WSException ex) {\n throw new PAOSException(ex);\n }\n}\n"
"private void readMeta() {\n Chunk header = readChunkHeader(rootChunkStart);\n lastChunkId = header.id;\n chunks.put(header.id, header);\n meta.setRootPos(header.metaRootPos, -1);\n String s = meta.get(\"String_Node_Str\" + lastChunkId);\n Chunk h2 = Chunk.fromString(s);\n h2.start = header.start;\n h2.length = header.length;\n h2.metaRootPos = header.metaRootPos;\n h2.pageCount = header.pageCount;\n h2.pageCountLive = header.pageCountLive;\n h2.maxLength = header.maxLength;\n h2.maxLengthLive = header.maxLengthLive;\n chunks.put(header.id, h2);\n for (Iterator<String> it = meta.keyIterator(\"String_Node_Str\"); it.hasNext(); ) {\n s = it.next();\n if (!s.startsWith(\"String_Node_Str\")) {\n break;\n }\n Chunk c = Chunk.fromString(s);\n if (c.id == header.id) {\n c.start = header.start;\n c.length = header.length;\n c.metaRootPos = header.metaRootPos;\n c.pageCount = header.pageCount;\n c.pageCountLive = header.pageCountLive;\n c.maxLength = header.maxLength;\n c.maxLengthLive = header.maxLengthLive;\n }\n lastChunkId = Math.max(c.id, lastChunkId);\n chunks.put(c.id, c);\n if (c.pageCountLive == 0) {\n registerFreePage(currentVersion, c.id, 0, 0);\n }\n }\n for (Chunk c : chunks.values()) {\n if (c.start == Long.MAX_VALUE) {\n continue;\n }\n int len = MathUtils.roundUpInt(c.length, BLOCK_SIZE) + BLOCK_SIZE;\n fileStore.markUsed(c.start, len);\n }\n}\n"
"public Control createControl(final Composite subComposite, final IElementParameter param, final int numInRow, final int nbInRow, final int top, final Control lastControl) {\n this.curParameter = param;\n this.paramFieldType = param.getFieldType();\n int nbLines = param.getNbLines();\n DecoratedField dField = new DecoratedField(subComposite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.WRAP, new SelectAllTextControlCreator());\n if (param.isRequired()) {\n FieldDecoration decoration = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_REQUIRED);\n dField.addFieldDecoration(decoration, SWT.RIGHT | SWT.TOP, false);\n }\n Control cLayout = dField.getLayoutControl();\n Text text = (Text) dField.getControl();\n editionControlHelper.register(param.getName(), text);\n FormData d = (FormData) text.getLayoutData();\n if (getAdditionalHeightSize() != 0) {\n nbLines += this.getAdditionalHeightSize() / text.getLineHeight();\n }\n d.height = text.getLineHeight() * nbLines;\n FormData data;\n text.getParent().setSize(subComposite.getSize().x, text.getLineHeight() * nbLines);\n cLayout.setBackground(subComposite.getBackground());\n if (!(text instanceof Text)) {\n text.setEnabled(!param.isReadOnly());\n } else {\n text.setEditable(!param.isReadOnly() && !param.isRepositoryValueUsed());\n }\n IPreferenceStore preferenceStore = CorePlugin.getDefault().getPreferenceStore();\n String fontType = preferenceStore.getString(TalendDesignerPrefConstants.MEMO_TEXT_FONT);\n FontData fontData = new FontData(fontType);\n Font font = new Font(null, fontData);\n addResourceDisposeListener(text, font);\n text.setFont(font);\n if (elem instanceof Node) {\n text.setToolTipText(VARIABLE_TOOLTIP + param.getVariableName());\n }\n addDragAndDropTarget(text);\n CLabel labelLabel = getWidgetFactory().createCLabel(subComposite, param.getDisplayName());\n data = new FormData();\n if (lastControl != null) {\n data.left = new FormAttachment(lastControl, 0);\n } else {\n data.left = new FormAttachment((((numInRow - 1) * MAX_PERCENT) / nbInRow), 0);\n }\n data.top = new FormAttachment(0, top);\n labelLabel.setLayoutData(data);\n if (numInRow != 1) {\n labelLabel.setAlignment(SWT.RIGHT);\n }\n data = new FormData();\n int currentLabelWidth = STANDARD_LABEL_WIDTH;\n GC gc = new GC(labelLabel);\n Point labelSize = gc.stringExtent(param.getDisplayName());\n gc.dispose();\n if ((labelSize.x + ITabbedPropertyConstants.HSPACE) > currentLabelWidth) {\n currentLabelWidth = labelSize.x + ITabbedPropertyConstants.HSPACE;\n }\n if (numInRow == 1) {\n if (lastControl != null) {\n data.left = new FormAttachment(lastControl, currentLabelWidth);\n } else {\n data.left = new FormAttachment(0, currentLabelWidth);\n }\n } else {\n data.left = new FormAttachment(labelLabel, 0, SWT.RIGHT);\n }\n data.right = new FormAttachment((numInRow * MAX_PERCENT) / nbInRow, 0);\n data.top = new FormAttachment(0, top);\n cLayout.setLayoutData(data);\n hashCurControls.put(param.getName(), text);\n Point initialSize = dField.getLayoutControl().computeSize(SWT.DEFAULT, SWT.DEFAULT);\n dynamicProperty.setCurRowSize(initialSize.y + ITabbedPropertyConstants.VSPACE);\n return null;\n}\n"
"private void initializeApplicationNameAndModuleName() {\n String jpaModuleName = (String) getDatabaseSession().getProperty(WEBLOGIC_MODULENAME_PROPERTY);\n String jpaApplicationName = (String) getDatabaseSession().getProperty(WEBLOGIC_APPLICATIONNAME_PROPERTY);\n if (jpaModuleName != null) {\n this.moduleName = jpaModuleName;\n } else {\n jpaModuleName = getNameFromWeblogic(WLS_MODULE_NAME_GET_METHOD_NAME);\n if (null != jpaModuleName && jpaModuleName.indexOf(\"String_Node_Str\") != -1) {\n this.moduleName = jpaModuleName.substring(jpaModuleName.indexOf(\"String_Node_Str\") + 1);\n } else {\n this.moduleName = jpaModuleName;\n }\n }\n if (jpaApplicationName != null) {\n this.applicationName = jpaApplicationName;\n } else {\n jpaApplicationName = getNameFromWeblogic(WLS_APPLICATION_NAME_GET_METHOD_NAME);\n if (null == jpaApplicationName) {\n jpaApplicationName = super.getApplicationName();\n }\n if (null != jpaApplicationName && jpaApplicationName.indexOf(\"String_Node_Str\") > -1) {\n this.applicationName = jpaApplicationName.substring(jpaApplicationName.indexOf(\"String_Node_Str\") + 1);\n } else {\n this.applicationName = jpaApplicationName;\n }\n }\n if (null == this.applicationName) {\n this.applicationName = DEFAULT_SERVER_NAME_AND_VERSION;\n }\n if (null == this.moduleName) {\n this.moduleName = DEFAULT_SERVER_NAME_AND_VERSION;\n }\n AbstractSessionLog.getLog().log(SessionLog.FINEST, \"String_Node_Str\", getDatabaseSession().getName(), this.applicationName);\n AbstractSessionLog.getLog().log(SessionLog.FINEST, \"String_Node_Str\", getDatabaseSession().getName(), this.moduleName);\n}\n"
"public static RedisPoolProperty initByIdFromConfig(String id) {\n RedisPoolProperty property = new RedisPoolProperty();\n String pre = id + Configs.SEPARATE;\n List<String> lists = MythReflect.getFieldByClass(RedisPoolProperty.class);\n Map<String, Object> map = new HashMap<>();\n MythProperties config = null;\n try {\n config = PropertyFile.getProperties(Configs.propertyFile);\n for (String field : lists) {\n map.put(field, config.getString(pre + field));\n }\n property = (RedisPoolProperty) MythReflect.setFieldsValue(property, map);\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n return property;\n}\n"
"public void startup() {\n if (torod == null) {\n Config config = new Config();\n config.getBackend().as(AbstractPostgres.class).setPassword(\"String_Node_Str\");\n TestService testService = ToroDbStandaloneTestUtil.createInjectors(config, Clock.systemDefaultZone());\n torod = testService.getInjector().getInstance(TorodServer.class);\n torod.startAsync();\n torod.awaitRunning();\n }\n}\n"
"public void onPageRequest(PageRequest request) {\n setPageTitle(I18N.CONSTANTS.contactsExport());\n}\n"
"public void execute(Event<UILinkActivityComposer> event) throws Exception {\n WebuiRequestContext requestContext = event.getRequestContext();\n UILinkActivityComposer uiComposerLinkExtension = event.getSource();\n uiComposerLinkExtension.clearLinkShare();\n uiComposerLinkExtension.setLinkInfoDisplayed(false);\n uiComposerLinkExtension.setDisplayed(false);\n uiComposerLinkExtension.setReadyForPostingActivity(false);\n event.getRequestContext().addUIComponentToUpdateByAjax(uiComposerLinkExtension);\n}\n"
"private List<SelectItem> replaceSelectList(List<SelectItem> selectItemList) throws VerdictDBDbmsException {\n List<SelectItem> newSelectItemList = new ArrayList<>();\n for (SelectItem sel : selectItemList) {\n if (!(sel instanceof AliasedColumn) && !(sel instanceof AsteriskColumn)) {\n if (sel instanceof BaseColumn) {\n sel = replaceBaseColumn((BaseColumn) sel);\n colNameAndColAlias.put(((BaseColumn) sel).getColumnName(), ((BaseColumn) sel).getColumnName());\n newSelectItemList.add(new AliasedColumn((BaseColumn) sel, ((BaseColumn) sel).getColumnName()));\n } else if (sel instanceof ColumnOp) {\n sel = replaceFilter((ColumnOp) sel);\n if (((ColumnOp) sel).getOpType().equals(\"String_Node_Str\")) {\n newSelectItemList.add(new AliasedColumn((ColumnOp) sel, \"String_Node_Str\" + itemID++));\n } else if (((ColumnOp) sel).getOpType().equals(\"String_Node_Str\")) {\n newSelectItemList.add(new AliasedColumn((ColumnOp) sel, \"String_Node_Str\" + itemID++));\n } else if (((ColumnOp) sel).getOpType().equals(\"String_Node_Str\")) {\n newSelectItemList.add(new AliasedColumn((ColumnOp) sel, \"String_Node_Str\" + itemID++));\n } else if (((ColumnOp) sel).getOpType().equals(\"String_Node_Str\")) {\n newSelectItemList.add(new AliasedColumn((ColumnOp) sel, \"String_Node_Str\" + itemID++));\n } else {\n newSelectItemList.add(new AliasedColumn((ColumnOp) sel, \"String_Node_Str\" + itemID++));\n }\n }\n } else {\n if (sel instanceof AliasedColumn) {\n ((AliasedColumn) sel).setColumn(replaceFilter(((AliasedColumn) sel).getColumn()));\n }\n newSelectItemList.add(sel);\n if (sel instanceof AliasedColumn && ((AliasedColumn) sel).getColumn() instanceof BaseColumn) {\n colNameAndColAlias.put(((BaseColumn) ((AliasedColumn) sel).getColumn()).getColumnName(), ((AliasedColumn) sel).getAliasName());\n }\n }\n }\n return newSelectItemList;\n}\n"
"private void runPlugins(final BPELPlan buildPlan, final PropertyMap map) {\n for (final BPELScopeActivity templatePlan : buildPlan.getTemplateBuildPlans()) {\n final BPELPlanContext context = new BPELPlanContext(templatePlan, map, buildPlan.getServiceTemplate());\n if (templatePlan.getNodeTemplate() != null) {\n if (isRunning(context, templatePlan.getNodeTemplate())) {\n BPELBuildProcessBuilder.LOG.debug(\"String_Node_Str\" + templatePlan.getNodeTemplate().getId() + \"String_Node_Str\");\n for (final IPlanBuilderPostPhasePlugin postPhasePlugin : this.pluginRegistry.getPostPlugins()) {\n if (postPhasePlugin.canHandle(templatePlan.getNodeTemplate())) {\n postPhasePlugin.handle(context, templatePlan.getNodeTemplate());\n }\n }\n continue;\n }\n final AbstractNodeTemplate nodeTemplate = templatePlan.getNodeTemplate();\n BPELBuildProcessBuilder.LOG.debug(\"String_Node_Str\" + nodeTemplate.getId());\n final IPlanBuilderTypePlugin plugin = this.findTypePlugin(nodeTemplate);\n if (plugin == null) {\n BPELBuildProcessBuilder.LOG.debug(\"String_Node_Str\", nodeTemplate.getId());\n final OperationChain chain = BPELScopeBuilder.createOperationChain(nodeTemplate);\n if (chain == null) {\n BPELBuildProcessBuilder.LOG.warn(\"String_Node_Str\", nodeTemplate.getId());\n } else {\n BPELBuildProcessBuilder.LOG.debug(\"String_Node_Str\", nodeTemplate.getId());\n chain.executeIAProvisioning(context);\n chain.executeDAProvisioning(context);\n chain.executeOperationProvisioning(context, this.opNames);\n }\n } else {\n BPELBuildProcessBuilder.LOG.info(\"String_Node_Str\", nodeTemplate.getId());\n plugin.handle(context);\n }\n for (final IPlanBuilderPostPhasePlugin postPhasePlugin : this.pluginRegistry.getPostPlugins()) {\n if (postPhasePlugin.canHandle(nodeTemplate)) {\n postPhasePlugin.handle(context, nodeTemplate);\n }\n }\n } else {\n final AbstractRelationshipTemplate relationshipTemplate = templatePlan.getRelationshipTemplate();\n if (!canGenericPluginHandle(relationshipTemplate)) {\n BPELBuildProcessBuilder.LOG.debug(\"String_Node_Str\", relationshipTemplate.getId());\n final OperationChain sourceChain = BPELScopeBuilder.createOperationChain(relationshipTemplate, true);\n final OperationChain targetChain = BPELScopeBuilder.createOperationChain(relationshipTemplate, false);\n if (targetChain != null) {\n BPELBuildProcessBuilder.LOG.warn(\"String_Node_Str\", relationshipTemplate.getId());\n targetChain.executeIAProvisioning(context);\n targetChain.executeOperationProvisioning(context, this.opNames);\n }\n if (sourceChain != null) {\n BPELBuildProcessBuilder.LOG.warn(\"String_Node_Str\", relationshipTemplate.getId());\n sourceChain.executeIAProvisioning(context);\n sourceChain.executeOperationProvisioning(context, this.opNames);\n }\n } else {\n BPELBuildProcessBuilder.LOG.info(\"String_Node_Str\", relationshipTemplate.getId());\n handleWithTypePlugin(context, relationshipTemplate);\n }\n for (final IPlanBuilderPostPhasePlugin postPhasePlugin : this.pluginRegistry.getPostPlugins()) {\n if (postPhasePlugin.canHandle(relationshipTemplate)) {\n postPhasePlugin.handle(context, relationshipTemplate);\n }\n }\n }\n }\n}\n"
"public void removeChangeListener(ChangeListener change) {\n if (_changeListeners == null) {\n return;\n }\n _changeListeners.remove(listener);\n}\n"
"private static String convertBytes2String(byte[] bytearr) throws UTFDataFormatException {\n int utflen = bytearr.length;\n char[] chararr = new char[utflen];\n int c;\n int chararr_count = 0;\n while (count < utflen) {\n c = (int) bytearr[count] & 0xff;\n if (c > 127)\n break;\n count++;\n chararr[chararr_count++] = (char) c;\n }\n while (count < utflen) {\n c = (int) bytearr[count] & 0xff;\n switch(c >> 4) {\n case 0:\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n case 6:\n case 7:\n count++;\n chararr[chararr_count++] = (char) c;\n break;\n case 12:\n case 13:\n count += 2;\n if (count > utflen)\n throw new UTFDataFormatException(\"String_Node_Str\");\n char2 = (int) bytearr[count - 1];\n if ((char2 & 0xC0) != 0x80)\n throw new UTFDataFormatException(\"String_Node_Str\" + count);\n chararr[chararr_count++] = (char) (((c & 0x1F) << 6) | (char2 & 0x3F));\n break;\n case 14:\n count += 3;\n if (count > utflen)\n throw new UTFDataFormatException(\"String_Node_Str\");\n char2 = (int) bytearr[count - 2];\n char3 = (int) bytearr[count - 1];\n if (((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80))\n throw new UTFDataFormatException(\"String_Node_Str\" + (count - 1));\n chararr[chararr_count++] = (char) (((c & 0x0F) << 12) | ((char2 & 0x3F) << 6) | ((char3 & 0x3F) << 0));\n break;\n default:\n throw new UTFDataFormatException(\"String_Node_Str\" + count);\n }\n }\n return new String(chararr, 0, chararr_count);\n}\n"
"public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {\n ContentAssistant assistant = (ContentAssistant) super.getContentAssistant(sourceViewer);\n String contentType = GroovyPartitionScanner.GROOVY_MULTILINE_STRINGS;\n assistant.setContentAssistProcessor(new JavaCompletionProcessor(getEditor(), assistant, contentType), contentType);\n IContentAssistProcessor processor = assistant.getContentAssistProcessor(IDocument.DEFAULT_CONTENT_TYPE);\n List<CompletionProposalCategory> categories = (List<CompletionProposalCategory>) ReflectionUtils.getPrivateField(ContentAssistProcessor.class, \"String_Node_Str\", processor);\n List<CompletionProposalCategory> newCategories = new ArrayList<CompletionProposalCategory>(categories.size() - 1);\n for (CompletionProposalCategory category : categories) {\n if (!JAVA_CONTENT_ASSIST.matcher(category.getId()).matches()) {\n newCategories.add(category);\n }\n }\n ReflectionUtils.setPrivateField(ContentAssistProcessor.class, \"String_Node_Str\", processor, newCategories);\n return assistant;\n}\n"
"private View getCampaignContentItemView(NewsItem newsItem, View convertView, ViewGroup parent) {\n if (convertView == null) {\n convertView = View.inflate(getContext(), R.layout.item_campaign_news, null);\n }\n TextView tvUserName = (TextView) convertView.findViewById(R.id.tvUserName);\n tvUserName.setText(\"String_Node_Str\");\n TextView tvShortMessage = (TextView) convertView.findViewById(R.id.tvShortMessage);\n tvShortMessage.setText(\"String_Node_Str\");\n return convertView;\n}\n"
"private Rectangle prepareCleanStatus(Point nodeLocation, Dimension nodeSize) {\n Rectangle statusRectangle = null;\n Rectangle breakpointRectangle, warningRectangle, infoRectangle, validationRuleRectangle, collapseRectangle;\n int status = node.getStatus();\n if ((status & Process.BREAKPOINT_STATUS) != 0) {\n breakpointLocation.x = nodeLocation.x - breakpointSize.width;\n breakpointLocation.y = nodeLocation.y - breakpointSize.height;\n breakpointRectangle = new Rectangle(breakpointLocation, breakpointSize);\n statusRectangle = breakpointRectangle;\n }\n if ((status & Process.ERROR_STATUS) != 0) {\n errorLocation.x = nodeLocation.x + nodeSize.width;\n errorLocation.y = nodeLocation.y - errorSize.height;\n errorRectangle = new Rectangle(errorLocation, errorSize);\n if (statusRectangle == null) {\n statusRectangle = errorRectangle;\n } else {\n statusRectangle.union(errorRectangle);\n }\n }\n if ((status & Process.WARNING_STATUS) != 0) {\n warningLocation.x = nodeLocation.x + nodeSize.width;\n warningLocation.y = nodeLocation.y - warningSize.height;\n warningRectangle = new Rectangle(warningLocation, warningSize);\n if (statusRectangle == null) {\n statusRectangle = warningRectangle;\n } else {\n statusRectangle.union(warningRectangle);\n }\n }\n if (this instanceof JobletContainer) {\n Dimension collapseSize = new Dimension(20, 20);\n collapseLocation.x = nodeLocation.x;\n collapseLocation.y = nodeLocation.y - collapseSize.height;\n collapseRectangle = new Rectangle(collapseLocation, collapseSize);\n if (statusRectangle == null) {\n statusRectangle = collapseRectangle;\n } else {\n statusRectangle.union(collapseRectangle);\n }\n }\n if ((status & Process.INFO_STATUS) != 0) {\n infoLocation.x = nodeLocation.x + nodeSize.width;\n infoLocation.y = nodeLocation.y - infoSize.height;\n infoRectangle = new Rectangle(infoLocation, infoSize);\n if (statusRectangle == null) {\n statusRectangle = infoRectangle;\n } else {\n statusRectangle.union(infoRectangle);\n }\n }\n if ((status & Process.VALIDATION_RULE_STATUS) != 0) {\n validationRuleLocation.x = nodeLocation.x + nodeSize.width / 2 + nodeSize.width / 4;\n validationRuleLocation.y = nodeLocation.y - validationRuleSize.height / 2;\n validationRuleRectangle = new Rectangle(validationRuleLocation, validationRuleSize);\n if (statusRectangle == null) {\n statusRectangle = validationRuleRectangle;\n } else {\n statusRectangle.union(validationRuleRectangle);\n }\n }\n if (node.isErrorFlag()) {\n markLocation.x = nodeLocation.x - nodeSize.width / 2;\n markLocation.y = nodeLocation.y;\n errorMarkLocation.x = nodeLocation.x - (errorMarkSize.width - nodeSize.width) / 2;\n errorMarkLocation.y = markLocation.y - errorMarkSize.height;\n errorMarkRectangle = new Rectangle(errorMarkLocation, errorMarkSize);\n if (statusRectangle == null) {\n statusRectangle = errorMarkRectangle;\n } else {\n statusRectangle.union(errorMarkRectangle);\n }\n }\n return statusRectangle;\n}\n"
"private void start() {\n Log.d(LOGTAG, \"String_Node_Str\");\n if (mRequest == null || mView == null || mDownloaderTask != null)\n return;\n mExecuteDownloadHandler.post(mExecuteDownloadTask);\n}\n"
"protected boolean isUpToDate(FTPClient ftp, File localFile, String remoteFile) throws IOException, BuildException {\n log(\"String_Node_Str\" + remoteFile, Project.MSG_VERBOSE);\n FTPFile[] files = ftp.listFiles(remoteFile);\n if (files == null || files.length == 0) {\n if (action == SEND_FILES) {\n log(\"String_Node_Str\" + remoteFile + \"String_Node_Str\", Project.MSG_VERBOSE);\n return false;\n } else {\n throw new BuildException(\"String_Node_Str\" + ftp.getReplyString());\n }\n }\n long remoteTimestamp = files[0].getTimestamp().getTime().getTime();\n long localTimestamp = localFile.lastModified();\n long adjustedRemoteTimestamp = remoteTimestamp + this.timeDiffMillis + this.granularityMillis;\n StringBuffer msg;\n synchronized (TIMESTAMP_LOGGING_SDF) {\n msg = new StringBuffer(\"String_Node_Str\").append(TIMESTAMP_LOGGING_SDF.format(new Date(localTimestamp))).append(\"String_Node_Str\");\n }\n log(msg.toString(), Project.MSG_VERBOSE);\n msg = new StringBuffer(\"String_Node_Str\").append(TIMESTAMP_LOGGING_SDF.format(new Date(adjustedRemoteTimestamp))).append(\"String_Node_Str\");\n if (remoteTimestamp != adjustedRemoteTimestamp) {\n msg.append(\"String_Node_Str\").append(TIMESTAMP_LOGGING_SDF.format(new Date(remoteTimestamp))).append(\"String_Node_Str\");\n }\n log(msg.toString(), Project.MSG_VERBOSE);\n if (this.action == SEND_FILES) {\n return adjustedRemoteTimestamp >= localTimestamp;\n } else {\n return localTimestamp >= adjustedRemoteTimestamp;\n }\n}\n"
"public static String getJobVersion(Property property) {\n if (property != null) {\n ProjectManager pManager = ProjectManager.getInstance();\n Project currentProject = pManager.getCurrentProject();\n String version = jobInfo.getJobVersion();\n if (FLAG_VERSION_WITH_CLASSIFIER) {\n if (pManager.isInCurrentMainProject(property)) {\n if (currentProject != null) {\n version = version + '-' + currentProject.getTechnicalLabel();\n }\n } else {\n org.talend.core.model.properties.Project project = pManager.getProject(property);\n if (project != null) {\n version = version + '-' + currentProject.getTechnicalLabel() + '-' + project.getTechnicalLabel();\n }\n }\n }\n return version;\n }\n return null;\n}\n"
"public static Pair<ManagedObjectReference, String> prepareGuestNetwork(String vSwitchName, HostMO hostMo, String vlanId, Integer networkRateMbps, Integer networkRateMulticastMbps, long timeOutMs, boolean syncPeerHosts) throws Exception {\n HostVirtualSwitch vSwitch;\n vSwitch = hostMo.getHostVirtualSwitchByName(vSwitchName);\n if (vSwitch == null) {\n String msg = \"String_Node_Str\";\n s_logger.error(msg);\n throw new Exception(msg);\n }\n boolean createGCTag = false;\n String networkName;\n Integer vid = null;\n if (vlanId != null && !UNTAGGED_VLAN_NAME.equalsIgnoreCase(vlanId)) {\n createGCTag = true;\n vid = Integer.parseInt(vlanId);\n }\n networkName = composeCloudNetworkName(\"String_Node_Str\", vlanId, networkRateMbps, vSwitchName);\n HostNetworkTrafficShapingPolicy shapingPolicy = null;\n if (networkRateMbps != null && networkRateMbps.intValue() > 0) {\n shapingPolicy = new HostNetworkTrafficShapingPolicy();\n shapingPolicy.setEnabled(true);\n shapingPolicy.setAverageBandwidth((long) networkRateMbps.intValue() * 1024L * 1024L);\n shapingPolicy.setPeakBandwidth((long) (shapingPolicy.getAverageBandwidth() * 1.5));\n shapingPolicy.setBurstSize(5 * shapingPolicy.getAverageBandwidth() / 8);\n }\n if (!hostMo.hasPortGroup(vSwitch, networkName)) {\n hostMo.createPortGroup(vSwitch, networkName, vid, shapingPolicy);\n } else {\n HostPortGroupSpec spec = hostMo.getPortGroupSpec(networkName);\n if (!isSpecMatch(spec, vid, shapingPolicy)) {\n hostMo.updatePortGroup(vSwitch, networkName, vid, shapingPolicy);\n bWaitPortGroupReady = true;\n }\n }\n ManagedObjectReference morNetwork = waitForNetworkReady(hostMo, networkName, timeOutMs);\n if (morNetwork == null) {\n String msg = \"String_Node_Str\" + networkName;\n s_logger.error(msg);\n throw new Exception(msg);\n }\n if (createGCTag) {\n NetworkMO networkMo = new NetworkMO(hostMo.getContext(), morNetwork);\n networkMo.setCustomFieldValue(CustomFieldConstants.CLOUD_GC, \"String_Node_Str\");\n }\n if (syncPeerHosts) {\n ManagedObjectReference morParent = hostMo.getParentMor();\n if (morParent != null && morParent.getType().equals(\"String_Node_Str\")) {\n GlobalLock lock = GlobalLock.getInternLock(\"String_Node_Str\" + morParent.get_value());\n try {\n if (lock.lock(DEFAULT_LOCK_TIMEOUT_SECONDS)) {\n try {\n ManagedObjectReference[] hosts = (ManagedObjectReference[]) hostMo.getContext().getServiceUtil().getDynamicProperty(morParent, \"String_Node_Str\");\n if (hosts != null) {\n for (ManagedObjectReference otherHost : hosts) {\n if (!otherHost.get_value().equals(hostMo.getMor().get_value())) {\n HostMO otherHostMo = new HostMO(hostMo.getContext(), otherHost);\n try {\n if (s_logger.isDebugEnabled())\n s_logger.debug(\"String_Node_Str\" + vlanId + \"String_Node_Str\" + otherHostMo.getHostName());\n prepareGuestNetwork(vSwitchName, otherHostMo, vlanId, networkRateMbps, networkRateMulticastMbps, timeOutMs, false);\n } catch (Exception e) {\n s_logger.warn(\"String_Node_Str\" + vlanId + \"String_Node_Str\" + otherHostMo.getHostName());\n }\n }\n }\n }\n } finally {\n lock.unlock();\n }\n } else {\n s_logger.warn(\"String_Node_Str\" + vlanId);\n }\n } finally {\n lock.releaseRef();\n }\n }\n }\n s_logger.info(\"String_Node_Str\" + networkName + \"String_Node_Str\" + vSwitchName);\n return new Pair<ManagedObjectReference, String>(morNetwork, networkName);\n}\n"
"private String configureEvaluation(Class<?> interface1, Class<?> scriptHelperClass, CtMethod method, String body, CtClass returnType) throws NotFoundException {\n String scriptHelperClassname = scriptHelperClass.getName();\n String returnTypeName = returnType.getName();\n if (!returnTypeName.equals(Void.class.getName()) && !returnTypeName.equals(void.class.getName())) {\n if (returnTypeName.equals(Boolean.class.getName()) || returnTypeName.equals(boolean.class.getName()))\n body = body.replace(\"String_Node_Str\", \"String_Node_Str\" + scriptHelperClassname + \"String_Node_Str\");\n else if (returnTypeName.equals(Integer.class.getName()) || returnTypeName.equals(int.class.getName()) || returnTypeName.equals(Short.class.getName()) || returnTypeName.equals(short.class.getName()))\n body = body.replace(\"String_Node_Str\", \"String_Node_Str\" + scriptHelperClassname + \"String_Node_Str\");\n else if (returnTypeName.equals(Double.class.getName()) || returnTypeName.equals(double.class.getName()))\n body = body.replace(\"String_Node_Str\", \"String_Node_Str\" + scriptHelperClassname + \"String_Node_Str\");\n else if (returnTypeName.equals(Float.class.getName()) || returnTypeName.equals(float.class.getName()))\n body = body.replace(\"String_Node_Str\", \"String_Node_Str\" + scriptHelperClassname + \"String_Node_Str\");\n else if (returnTypeName.equals(String.class.getName()))\n body = body.replace(\"String_Node_Str\", \"String_Node_Str\" + scriptHelperClassname + \"String_Node_Str\");\n else\n body = createBodyForReference(interface1, scriptHelperClass, method, body, returnType);\n } else\n body = body.replace(\"String_Node_Str\", scriptHelperClass.getName() + \"String_Node_Str\");\n return body;\n}\n"
"private static boolean isPctEncodedUnescaped(char character) {\n String hex = Integer.toHexString(character);\n char[] aschar = hex.toCharArray();\n if (aschar[0] == '%') {\n if (aschar[1] == '2') {\n return aschar[2] != '2' && isHexDigit(aschar[2]);\n } else if (aschar[1] == '5') {\n return aschar[2] != 'C' && isHexDigit(aschar[2]);\n } else if (isHexDigit(aschar[1])) {\n return isHexDigit(aschar[2]);\n }\n }\n return false;\n}\n"
"private static Cartridge read(FileContents fileCont) {\n InputStream stream = null;\n String fileName = \"String_Node_Str\";\n try {\n fileName = fileCont.getName();\n stream = fileCont.getInputStream();\n System.out.println(\"String_Node_Str\" + fileName);\n stream.close();\n return CartridgeLoader.load(stream, fileName);\n } catch (Exception ex) {\n System.out.println(\"String_Node_Str\" + fileName + \"String_Node_Str\" + ex);\n } finally {\n if (stream != null)\n try {\n stream.close();\n } catch (IOException e) {\n }\n }\n return null;\n}\n"
"public void render(Canvas canvas, Camera camera, float alpha) {\n if (flagImg != null) {\n Vector2f cameraPos = camera.getRenderPosition(alpha);\n Vector2f flagPos = pos;\n if (carrier != null && carrier.isAlive()) {\n flagPos = carrier.getEntity().getRenderPos(alpha);\n }\n float x = (flagPos.x - cameraPos.x);\n float y = (flagPos.y - cameraPos.y);\n flagImg.setPosition(x, y);\n canvas.drawSprite(flagImg);\n }\n}\n"
"public void testBrazilLanguage() {\n final AIConfiguration config = new AIConfiguration(getPtBrAccessToken(), getSubscriptionKey(), AIConfiguration.SupportedLanguages.PortugueseBrazil, AIConfiguration.RecognitionEngine.System);\n updateConfig(config);\n try {\n final AIDataService aiDataService = new AIDataService(Robolectric.application, config);\n final AIRequest aiRequest = new AIRequest();\n aiRequest.setQuery(\"String_Node_Str\");\n final AIResponse aiResponse = makeRequest(aiDataService, aiRequest);\n assertFalse(TextUtils.isEmpty(aiResponse.getResult().getResolvedQuery()));\n assertEquals(\"String_Node_Str\", aiResponse.getResult().getAction());\n assertEquals(\"String_Node_Str\", aiResponse.getResult().getFulfillment().getSpeech());\n } catch (final AIServiceException e) {\n e.printStackTrace();\n assertTrue(e.getMessage(), false);\n }\n}\n"
"public void visit(NodeTraversal t, Node n, Node parent) {\n if (parent == null) {\n return;\n }\n if (parent.isScript()) {\n if (NodeUtil.isFunctionDeclaration(n)) {\n String functionName = NodeUtil.getName(n);\n if (isTestFunction(functionName)) {\n exportTestFunctionAsSymbol(functionName, n, parent);\n }\n } else if (isNameDeclaredFunction(n)) {\n Node functionNode = n.getFirstFirstChild();\n String functionName = NodeUtil.getName(functionNode);\n if (isTestFunction(functionName)) {\n exportTestFunctionAsSymbol(functionName, n, parent);\n }\n } else if (n.isClass()) {\n exportClass(parent, n);\n }\n } else if (NodeUtil.isExprAssign(parent) && !n.getLastChild().isAssign()) {\n Node grandparent = parent.getParent();\n if (grandparent != null && grandparent.isScript()) {\n Node firstChild = n.getFirstChild();\n Node lastChild = n.getLastChild();\n String nodeName = firstChild.getQualifiedName();\n if (lastChild.isFunction()) {\n if (isTestFunction(nodeName)) {\n if (n.getFirstChild().isName()) {\n exportTestFunctionAsSymbol(nodeName, parent, grandparent);\n } else {\n exportTestFunctionAsProperty(nodeName, parent, n, grandparent);\n }\n }\n }\n }\n } else if (n.isObjectLit() && isCallTargetQName(n.getParent(), \"String_Node_Str\")) {\n for (Node c : n.children()) {\n if (c.isStringKey() && !c.isQuotedString()) {\n c.setQuotedString();\n compiler.reportChangeToEnclosingScope(c);\n } else if (c.isMemberFunctionDef()) {\n rewriteMemberDefInObjLit(c, n);\n }\n }\n }\n}\n"
"public void initParameters() {\n if (sourceProducts != null && sourceProducts.length > 0) {\n final MetadataElement absRoot = AbstractMetadata.getAbstractedMetadata(sourceProducts[0]);\n final String acquisitionMode = absRoot.getAttributeString(AbstractMetadata.ACQUISITION_MODE);\n subswathCombo.removeAllItems();\n if (acquisitionMode.equals(\"String_Node_Str\")) {\n subswathCombo.addItem(\"String_Node_Str\");\n subswathCombo.addItem(\"String_Node_Str\");\n subswathCombo.addItem(\"String_Node_Str\");\n } else if (acquisitionMode.equals(\"String_Node_Str\")) {\n subswathCombo.addItem(\"String_Node_Str\");\n subswathCombo.addItem(\"String_Node_Str\");\n subswathCombo.addItem(\"String_Node_Str\");\n subswathCombo.addItem(\"String_Node_Str\");\n subswathCombo.addItem(\"String_Node_Str\");\n }\n String subswath = (String) paramMap.get(\"String_Node_Str\");\n if (subswath == null) {\n subswath = acquisitionMode + '1';\n }\n subswathCombo.setSelectedItem(subswath);\n OperatorUIUtils.initParamList(polList, Sentinel1Utils.getProductPolarizations(absRoot), (String[]) paramMap.get(\"String_Node_Str\"));\n }\n}\n"
"public void testProbeIsLimited() throws Exception {\n drainAll();\n QueryRequest request = QueryRequest.createQuery(\"String_Node_Str\");\n request.setTTL((byte) 1);\n ULTRAPEER_2.send(request);\n ULTRAPEER_2.flush();\n QueryRequest reqRecvd = (QueryRequest) LEAF.receive(TIMEOUT);\n assertTrue(reqRecvd.getQuery().equals(\"String_Node_Str\"));\n assertTrue(Arrays.equals(request.getGUID(), reqRecvd.getGUID()));\n try {\n ULTRAPEER_1.receive(TIMEOUT);\n assertTrue(false);\n } catch (InterruptedIOException expected) {\n }\n Thread.sleep(2 * 1000);\n request.setTTL((byte) 3);\n ULTRAPEER_2.send(request);\n ULTRAPEER_2.flush();\n try {\n LEAF.receive(TIMEOUT);\n assertTrue(false);\n } catch (InterruptedIOException expected) {\n }\n reqRecvd = getFirstQueryRequest(ULTRAPEER_1);\n assertTrue(reqRecvd != null);\n assertTrue(reqRecvd.getQuery().equals(\"String_Node_Str\"));\n assertTrue(Arrays.equals(request.getGUID(), reqRecvd.getGUID()));\n assertEquals(reqRecvd.getHops(), (byte) 1);\n Thread.sleep(2 * 1000);\n request.setTTL((byte) 4);\n ULTRAPEER_2.send(request);\n ULTRAPEER_2.flush();\n try {\n reqRecvd = (QueryRequest) LEAF.receive(TIMEOUT);\n } catch (InterruptedIOException expected) {\n }\n try {\n ULTRAPEER_1.receive(TIMEOUT);\n assertTrue(false);\n } catch (InterruptedIOException expected) {\n }\n}\n"
"private DBMap<Object, List<Object>> initValueForDBMap(String dbName) {\n return new DBMap<Object, List<Object>>(ResourceManager.getMapDBFilePath(), ResourceManager.getMapDBFileName(this), ResourceManager.getMapDBCatalogName(this, dbName));\n}\n"
"private void update(UpdateContext context, Object entity, MutableStateTrackable updatableProxy) {\n if (!rootUpdateAllowed && entity == null) {\n throw new IllegalArgumentException(\"String_Node_Str\" + updatableProxy.getClass().getName() + \"String_Node_Str\");\n }\n DirtyAttributeFlusher<?, Object, Object> flusher = (DirtyAttributeFlusher<?, Object, Object>) (DirtyAttributeFlusher) getNestedDirtyFlusher(context, updatableProxy, (DirtyAttributeFlusher) null);\n if (flusher == null) {\n return;\n }\n try {\n if (flushStrategy == FlushStrategy.ENTITY || !flusher.supportsQueryFlush()) {\n flusher.flushEntity(context, entity, updatableProxy, updatableProxy);\n } else {\n Query query = createUpdateQuery(context, updatableProxy, flusher);\n flusher.flushQuery(context, null, query, updatableProxy, updatableProxy);\n if (query != null) {\n int updated = query.executeUpdate();\n if (updated != 1) {\n throw new OptimisticLockException(entity, updatableProxy);\n }\n }\n }\n } finally {\n context.getInitialStateResetter().addUpdatedView(updatableProxy);\n }\n}\n"
"public List<VolumeVO> searchForVolumes(ListVolumesCmd cmd) {\n Account caller = UserContext.current().getCaller();\n Long domainId = cmd.getDomainId();\n String accountName = cmd.getAccountName();\n List<Long> permittedAccounts = new ArrayList<Long>();\n boolean isAdmin = false;\n Boolean isRecursive = cmd.isRecursive();\n Long projectId = cmd.getProjectId();\n if (isRecursive == null) {\n isRecursive = false;\n }\n if ((caller == null) || isAdmin(caller.getType())) {\n isAdmin = true;\n if (domainId != null) {\n if ((caller != null) && !_domainDao.isChildDomain(caller.getDomainId(), domainId)) {\n throw new PermissionDeniedException(\"String_Node_Str\" + domainId + \"String_Node_Str\");\n }\n if (accountName != null) {\n Account userAccount = _accountDao.findActiveAccount(accountName, domainId);\n if (userAccount != null) {\n permittedAccounts.add(userAccount.getId());\n } else {\n throw new InvalidParameterValueException(\"String_Node_Str\" + accountName + \"String_Node_Str\" + domainId);\n }\n }\n } else {\n domainId = ((caller == null) ? DomainVO.ROOT_DOMAIN : caller.getDomainId());\n isRecursive = true;\n }\n } else {\n permittedAccounts.add(caller.getId());\n }\n if (projectId != null) {\n permittedAccounts.clear();\n Project project = _projectMgr.getProject(projectId);\n if (project == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + projectId);\n }\n if (!_projectMgr.canAccessProjectAccount(caller, project.getProjectAccountId())) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + caller + \"String_Node_Str\" + projectId);\n }\n permittedAccounts.add(project.getProjectAccountId());\n } else if (caller.getType() == Account.ACCOUNT_TYPE_NORMAL) {\n permittedAccounts.addAll(_projectMgr.listPermittedProjectAccounts(caller.getId()));\n }\n Filter searchFilter = new Filter(VolumeVO.class, \"String_Node_Str\", false, cmd.getStartIndex(), cmd.getPageSizeVal());\n Object id = cmd.getId();\n Long vmInstanceId = cmd.getVirtualMachineId();\n Object name = cmd.getVolumeName();\n Object keyword = cmd.getKeyword();\n Object type = cmd.getType();\n Object zoneId = cmd.getZoneId();\n Object pod = null;\n if (isAdmin) {\n zone = cmd.getZoneId();\n pod = cmd.getPodId();\n } else {\n domainId = null;\n }\n SearchBuilder<VolumeVO> sb = _volumeDao.createSearchBuilder();\n sb.and(\"String_Node_Str\", sb.entity().getName(), SearchCriteria.Op.LIKE);\n sb.and(\"String_Node_Str\", sb.entity().getId(), SearchCriteria.Op.EQ);\n sb.and(\"String_Node_Str\", sb.entity().getAccountId(), SearchCriteria.Op.IN);\n sb.and(\"String_Node_Str\", sb.entity().getVolumeType(), SearchCriteria.Op.LIKE);\n sb.and(\"String_Node_Str\", sb.entity().getInstanceId(), SearchCriteria.Op.EQ);\n sb.and(\"String_Node_Str\", sb.entity().getDataCenterId(), SearchCriteria.Op.EQ);\n sb.and(\"String_Node_Str\", sb.entity().getPodId(), SearchCriteria.Op.EQ);\n sb.and(\"String_Node_Str\", sb.entity().getState(), SearchCriteria.Op.NEQ);\n SearchBuilder<DiskOfferingVO> diskOfferingSearch = _diskOfferingDao.createSearchBuilder();\n diskOfferingSearch.and(\"String_Node_Str\", diskOfferingSearch.entity().getSystemUse(), SearchCriteria.Op.NEQ);\n sb.join(\"String_Node_Str\", diskOfferingSearch, sb.entity().getDiskOfferingId(), diskOfferingSearch.entity().getId(), JoinBuilder.JoinType.LEFTOUTER);\n if (((permittedAccounts.isEmpty()) && (domainId != null) && isRecursive)) {\n SearchBuilder<DomainVO> domainSearch = _domainDao.createSearchBuilder();\n domainSearch.and(\"String_Node_Str\", domainSearch.entity().getPath(), SearchCriteria.Op.LIKE);\n sb.join(\"String_Node_Str\", domainSearch, sb.entity().getDomainId(), domainSearch.entity().getId(), JoinBuilder.JoinType.INNER);\n } else if ((permittedAccounts.isEmpty()) && (domainId != null) && !isRecursive) {\n SearchBuilder<DomainVO> domainSearch = _domainDao.createSearchBuilder();\n domainSearch.and(\"String_Node_Str\", domainSearch.entity().getPath(), SearchCriteria.Op.EQ);\n sb.join(\"String_Node_Str\", domainSearch, sb.entity().getDomainId(), domainSearch.entity().getId(), JoinBuilder.JoinType.INNER);\n }\n SearchBuilder<VMInstanceVO> vmSearch = _vmInstanceDao.createSearchBuilder();\n vmSearch.and(\"String_Node_Str\", vmSearch.entity().getType(), SearchCriteria.Op.NIN);\n vmSearch.or(\"String_Node_Str\", vmSearch.entity().getType(), SearchCriteria.Op.NULL);\n sb.join(\"String_Node_Str\", vmSearch, sb.entity().getInstanceId(), vmSearch.entity().getId(), JoinBuilder.JoinType.LEFTOUTER);\n SearchCriteria<VolumeVO> sc = sb.create();\n if (keyword != null) {\n SearchCriteria<VolumeVO> ssc = _volumeDao.createSearchCriteria();\n ssc.addOr(\"String_Node_Str\", SearchCriteria.Op.LIKE, \"String_Node_Str\" + keyword + \"String_Node_Str\");\n ssc.addOr(\"String_Node_Str\", SearchCriteria.Op.LIKE, \"String_Node_Str\" + keyword + \"String_Node_Str\");\n sc.addAnd(\"String_Node_Str\", SearchCriteria.Op.SC, ssc);\n }\n if (name != null) {\n sc.setParameters(\"String_Node_Str\", \"String_Node_Str\" + name + \"String_Node_Str\");\n }\n if (id != null) {\n sc.setParameters(\"String_Node_Str\", id);\n }\n if (!permittedAccounts.isEmpty()) {\n sc.setParameters(\"String_Node_Str\", permittedAccounts.toArray());\n sc.setJoinParameters(\"String_Node_Str\", \"String_Node_Str\", 1);\n } else if (domainId != null) {\n DomainVO domain = _domainDao.findById(domainId);\n if (isRecursive) {\n sc.setJoinParameters(\"String_Node_Str\", \"String_Node_Str\", domain.getPath() + \"String_Node_Str\");\n } else {\n sc.setJoinParameters(\"String_Node_Str\", \"String_Node_Str\", domain.getPath());\n }\n }\n if (type != null) {\n sc.setParameters(\"String_Node_Str\", \"String_Node_Str\" + type + \"String_Node_Str\");\n }\n if (vmInstanceId != null) {\n sc.setParameters(\"String_Node_Str\", vmInstanceId);\n }\n if (zone != null) {\n sc.setParameters(\"String_Node_Str\", zone);\n }\n if (pod != null) {\n sc.setParameters(\"String_Node_Str\", pod);\n }\n sc.setJoinParameters(\"String_Node_Str\", \"String_Node_Str\", VirtualMachine.Type.ConsoleProxy, VirtualMachine.Type.SecondaryStorageVm, VirtualMachine.Type.DomainRouter);\n sc.setParameters(\"String_Node_Str\", Volume.State.Destroy);\n return _volumeDao.search(sc, searchFilter);\n}\n"
"protected void refreshAttributesOnClose() {\n dbFile = ((MongoRepository) repository).getGridFS().findOne(getId());\n if (dbFile == null)\n throw new KurentoException(\"String_Node_Str\" + getId());\n state = State.STORED;\n attributes.setContentLength(dbFile.getLength());\n}\n"
"void initAnimation(GLHierarchicalTreeMap parentView, GLTreeMap beginMainView, GLTreeMap endMainView, Vector<GLTreeMap> beginThumbnails, Vector<GLTreeMap> endThumbnails, int direction) {\n this.beginMainView = beginMainView;\n this.endMainView = endMainView;\n this.beginThumbnails = beginThumbnails;\n this.endThumbnails = endThumbnails;\n this.direcetion = direction;\n this.parentView = parentView;\n startTime = Calendar.getInstance().getTimeInMillis();\n parentView.thumbnailTreemapViews = beginThumbnails;\n calcData();\n zoomStage = 0;\n}\n"
"private void saveFile(Uri uri, File file) {\n if (debug)\n Log.i(TAG, \"String_Node_Str\" + uri + \"String_Node_Str\" + file);\n Cursor c = getContentResolver().query(uri, new String[] { Notes.ENCRYPTED, Notes.NOTE }, null, null, null);\n if (c != null && c.getCount() > 0) {\n c.moveToFirst();\n long encrypted = c.getLong(0);\n String note = c.getString(1);\n if (encrypted == 0) {\n Log.d(TAG, \"String_Node_Str\");\n writeToFile(file, note);\n } else {\n Log.d(TAG, \"String_Node_Str\");\n }\n } else {\n Log.e(TAG, \"String_Node_Str\" + uri);\n }\n}\n"
"public void run() {\n try {\n final int nCols = grid.getCols();\n final int nRows = grid.getRows();\n final int nbrValues = nRows * nCols;\n do {\n String str = queue.take();\n if (EOF.equals(str)) {\n if (counter != nbrValues) {\n throw new IOException(\"String_Node_Str\");\n }\n break;\n }\n StringTokenizer tokenizer = new StringTokenizer(str, \"String_Node_Str\");\n while (tokenizer.hasMoreTokens() && !Thread.currentThread().isInterrupted() && producerConsumerException == null) {\n int col = counter % nCols;\n int row = counter / nCols;\n ++counter;\n if (counter > nbrValues) {\n throw new IOException(\"String_Node_Str\");\n }\n String token = tokenizer.nextToken();\n try {\n float v = Float.parseFloat(token);\n grid.setValue(v == noDataValue ? Float.NaN : v, col, row);\n } catch (NumberFormatException exc) {\n throw new IllegalArgumentException(\"String_Node_Str\" + token + \"String_Node_Str\", exc);\n }\n }\n if (progressIndicator != null) {\n int row = counter / nCols;\n int perc = (int) (100d * row / nRows);\n if (!progressIndicator.progress(perc)) {\n counter = nbrValues;\n break;\n }\n }\n } while (counter < nbrValues && !Thread.currentThread().isInterrupted() && producerConsumerException == null);\n } catch (Throwable ex) {\n producerConsumerException = ex;\n }\n}\n"
"public void assignToLoadBalancer(AssignToLoadBalancerRuleCmd cmd) throws NetworkRuleConflictException {\n Long loadBalancerId = cmd.getLoadBalancerId();\n Long instanceIdParam = cmd.getVirtualMachineId();\n List<Long> instanceIds = cmd.getVirtualMachineIds();\n if ((instanceIdParam == null) && (instanceIds == null)) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + loadBalancerId + \"String_Node_Str\");\n }\n if ((instanceIds == null) && (instanceIdParam != null)) {\n instanceIds = new ArrayList<Long>();\n instanceIds.add(instanceIdParam);\n }\n LoadBalancerVO loadBalancer = _loadBalancerDao.findById(loadBalancerId);\n if (loadBalancer == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + loadBalancerId + \"String_Node_Str\");\n }\n DomainRouterVO syncObject = _routerMgr.getRouter(loadBalancer.getIpAddress());\n if (syncObject == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + loadBalancerId + \"String_Node_Str\" + loadBalancer.getIpAddress());\n } else {\n cmd.synchronizeCommand(\"String_Node_Str\", syncObject.getId());\n }\n Account account = UserContext.current().getAccount();\n if (account != null) {\n if ((account.getType() == Account.ACCOUNT_TYPE_DOMAIN_ADMIN) || (account.getType() == Account.ACCOUNT_TYPE_READ_ONLY_ADMIN)) {\n if (!_domainDao.isChildDomain(account.getDomainId(), loadBalancer.getDomainId())) {\n throw new PermissionDeniedException(\"String_Node_Str\" + loadBalancerId + \"String_Node_Str\");\n }\n } else if (account.getId() != loadBalancer.getAccountId()) {\n throw new PermissionDeniedException(\"String_Node_Str\" + loadBalancerId + \"String_Node_Str\");\n }\n }\n Transaction txn = Transaction.currentTxn();\n List<FirewallRuleVO> firewallRulesToApply = new ArrayList<FirewallRuleVO>();\n long accountId = 0;\n DomainRouterVO router = null;\n List<LoadBalancerVMMapVO> mappedInstances = _loadBalancerVMMapDao.listByLoadBalancerId(loadBalancerId, false);\n Set<Long> mappedInstanceIds = new HashSet<Long>();\n if (mappedInstances != null) {\n for (LoadBalancerVMMapVO mappedInstance : mappedInstances) {\n mappedInstanceIds.add(Long.valueOf(mappedInstance.getInstanceId()));\n }\n }\n List<Long> finalInstanceIds = new ArrayList<Long>();\n for (Long instanceId : instanceIds) {\n if (mappedInstanceIds.contains(instanceId)) {\n continue;\n } else {\n finalInstanceIds.add(instanceId);\n }\n UserVmVO userVm = _vmDao.findById(instanceId);\n if (userVm == null) {\n s_logger.warn(\"String_Node_Str\" + instanceId);\n throw new InvalidParameterValueException(\"String_Node_Str\" + instanceId);\n } else {\n ServiceOfferingVO offering = _serviceOfferingDao.findById(userVm.getServiceOfferingId());\n if ((offering == null) || !GuestIpType.Virtualized.equals(offering.getGuestIpType())) {\n _loadBalancerVMMapDao.remove(loadBalancerId, instanceIds, Boolean.TRUE);\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + userVm.toString() + \"String_Node_Str\" + loadBalancerId + \"String_Node_Str\" + ((offering == null) ? \"String_Node_Str\" : offering.getGuestIpType()) + \"String_Node_Str\");\n }\n throw new InvalidParameterValueException(\"String_Node_Str\" + userVm.toString() + \"String_Node_Str\" + loadBalancerId + \"String_Node_Str\" + ((offering == null) ? \"String_Node_Str\" : offering.getGuestIpType()) + \"String_Node_Str\");\n }\n }\n if (accountId == 0) {\n accountId = userVm.getAccountId();\n } else if (accountId != userVm.getAccountId()) {\n s_logger.warn(\"String_Node_Str\" + userVm.getHostName() + \"String_Node_Str\" + userVm.getId() + \"String_Node_Str\" + userVm.getAccountId() + \"String_Node_Str\" + accountId);\n throw new InvalidParameterValueException(\"String_Node_Str\" + userVm.getHostName() + \"String_Node_Str\" + userVm.getId() + \"String_Node_Str\" + userVm.getAccountId() + \"String_Node_Str\" + accountId);\n }\n DomainRouterVO nextRouter = null;\n if (userVm.getDomainRouterId() != null)\n nextRouter = _routerMgr.getRouter(userVm.getDomainRouterId());\n if (nextRouter == null) {\n s_logger.warn(\"String_Node_Str\" + userVm.getDomainRouterId() + \"String_Node_Str\" + instanceId);\n throw new InvalidParameterValueException(\"String_Node_Str\" + userVm.getDomainRouterId() + \"String_Node_Str\" + instanceId);\n }\n if (router == null) {\n router = nextRouter;\n if (router.getAccountId() != loadBalancer.getAccountId()) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + userVm.getHostName() + \"String_Node_Str\" + userVm.getId() + \"String_Node_Str\" + loadBalancer.getName() + \"String_Node_Str\" + loadBalancer.getAccountId() + \"String_Node_Str\");\n }\n } else if (router.getId() != nextRouter.getId()) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + userVm.getHostName() + \"String_Node_Str\" + userVm.getId() + \"String_Node_Str\" + nextRouter.getHostName() + \"String_Node_Str\" + router.getHostName());\n }\n String ipAddress = loadBalancer.getIpAddress();\n String privateIpAddress = userVm.getGuestIpAddress();\n List<FirewallRuleVO> existingRulesOnPubIp = _rulesDao.listIPForwarding(ipAddress);\n if (existingRulesOnPubIp != null) {\n for (FirewallRuleVO fwRule : existingRulesOnPubIp) {\n if (!((fwRule.isForwarding() == false) && (fwRule.getGroupId() != null) && (fwRule.getGroupId() == loadBalancer.getId().longValue()))) {\n if (fwRule.getPublicPort().equals(loadBalancer.getPublicPort())) {\n throw new NetworkRuleConflictException(\"String_Node_Str\" + ipAddress + \"String_Node_Str\" + loadBalancer.getPublicPort() + \"String_Node_Str\" + loadBalancer.getName() + \"String_Node_Str\" + loadBalancer.getId() + \"String_Node_Str\" + userVm.getHostName() + \"String_Node_Str\");\n }\n } else if (fwRule.getPrivateIpAddress().equals(privateIpAddress) && fwRule.getPrivatePort().equals(loadBalancer.getPrivatePort()) && fwRule.isEnabled()) {\n continue;\n }\n }\n }\n FirewallRuleVO newFwRule = new FirewallRuleVO();\n newFwRule.setAlgorithm(loadBalancer.getAlgorithm());\n newFwRule.setEnabled(true);\n newFwRule.setForwarding(false);\n newFwRule.setPrivatePort(loadBalancer.getPrivatePort());\n newFwRule.setPublicPort(loadBalancer.getPublicPort());\n newFwRule.setPublicIpAddress(loadBalancer.getIpAddress());\n newFwRule.setPrivateIpAddress(userVm.getGuestIpAddress());\n newFwRule.setGroupId(loadBalancer.getId());\n firewallRulesToApply.add(newFwRule);\n }\n if (firewallRulesToApply.isEmpty()) {\n return;\n }\n IPAddressVO ipAddr = _ipAddressDao.findById(loadBalancer.getIpAddress());\n List<IPAddressVO> ipAddrs = listPublicIpAddressesInVirtualNetwork(accountId, ipAddr.getDataCenterId(), null);\n for (IPAddressVO ipv : ipAddrs) {\n List<FirewallRuleVO> rules = _rulesDao.listIPForwarding(ipv.getAddress(), false);\n firewallRulesToApply.addAll(rules);\n }\n txn.start();\n List<FirewallRuleVO> updatedRules = null;\n if (router.getState().equals(State.Starting)) {\n updatedRules = firewallRulesToApply;\n } else {\n updatedRules = updateFirewallRules(loadBalancer.getIpAddress(), firewallRulesToApply, router);\n }\n String description;\n String type = EventTypes.EVENT_NET_RULE_ADD;\n String ruleName = \"String_Node_Str\";\n String level = EventVO.LEVEL_INFO;\n LoadBalancerVO loadBalancerLock = null;\n try {\n loadBalancerLock = _loadBalancerDao.acquireInLockTable(loadBalancerId);\n if (loadBalancerLock == null) {\n s_logger.warn(\"String_Node_Str\" + loadBalancerId + \"String_Node_Str\");\n }\n if ((updatedRules != null) && (updatedRules.size() == firewallRulesToApply.size())) {\n for (Long addedInstanceId : finalInstanceIds) {\n LoadBalancerVMMapVO mappedVM = new LoadBalancerVMMapVO(loadBalancerId, addedInstanceId);\n _loadBalancerVMMapDao.persist(mappedVM);\n }\n for (FirewallRuleVO updatedRule : updatedRules) {\n if (updatedRule.getId() == null) {\n _rulesDao.persist(updatedRule);\n description = \"String_Node_Str\" + ruleName + \"String_Node_Str\" + updatedRule.getPublicIpAddress() + \"String_Node_Str\" + updatedRule.getPublicPort() + \"String_Node_Str\" + updatedRule.getPrivateIpAddress() + \"String_Node_Str\" + updatedRule.getPrivatePort() + \"String_Node_Str\" + \"String_Node_Str\" + updatedRule.getProtocol();\n EventUtils.saveEvent(UserContext.current().getUserId(), loadBalancer.getAccountId(), level, type, description);\n }\n }\n } else {\n _loadBalancerVMMapDao.remove(loadBalancerId, instanceIds, null);\n txn.commit();\n s_logger.warn(\"String_Node_Str\" + loadBalancer.getName() + \"String_Node_Str\" + loadBalancerId + \"String_Node_Str\" + StringUtils.join(instanceIds, \"String_Node_Str\"));\n throw new CloudRuntimeException(\"String_Node_Str\" + loadBalancer.getName() + \"String_Node_Str\" + loadBalancerId + \"String_Node_Str\" + StringUtils.join(instanceIds, \"String_Node_Str\"));\n }\n } finally {\n if (loadBalancerLock != null) {\n _loadBalancerDao.releaseFromLockTable(loadBalancerId);\n }\n }\n}\n"
"protected void onBlockAdded(IMultiblockPart part) {\n if (part instanceof TileEntityReactorAccessPort) {\n attachedAccessPorts.add((TileEntityReactorAccessPort) part);\n }\n if (part instanceof TileEntityReactorControlRod) {\n TileEntityReactorControlRod controlRod = (TileEntityReactorControlRod) part;\n attachedControlRods.add(controlRod);\n if (controlRod.getCachedFuel() != null) {\n fuelContainer.addFuel(controlRod.getCachedFuel());\n worldObj.markTileEntityChunkModified(controlRod.xCoord, controlRod.yCoord, controlRod.zCoord, controlRod);\n }\n }\n if (part instanceof TileEntityReactorPowerTap) {\n attachedPowerTaps.add((TileEntityReactorPowerTap) part);\n }\n if (part instanceof TileEntityReactorPart) {\n TileEntityReactorPart reactorPart = (TileEntityReactorPart) part;\n if (BlockReactorPart.isController(reactorPart.getBlockMetadata())) {\n attachedControllers.add(reactorPart);\n }\n }\n if (part instanceof ITickableMultiblockPart) {\n attachedTickables.add((ITickableMultiblockPart) part);\n }\n if (part instanceof TileEntityReactorFuelRod) {\n TileEntityReactorFuelRod fuelRod = (TileEntityReactorFuelRod) part;\n attachedFuelRods.add(fuelRod);\n currentFuelRod = attachedFuelRods.iterator();\n if (worldObj.isRemote) {\n worldObj.markBlockForUpdate(fuelRod.xCoord, fuelRod.yCoord, fuelRod.zCoord);\n }\n }\n if (part instanceof TileEntityReactorCoolantPort) {\n attachedCoolantPorts.add((TileEntityReactorCoolantPort) part);\n }\n}\n"
"protected void doSearchAction() {\n try {\n String param = txt_search.getText();\n Search search = new Search(param, false);\n if (chk_srestrict.isSelected()) {\n Passage restrict = PassageFactory.createPassage(txt_srestrict.getText());\n search.setRestriction(restrict);\n }\n Bible version = (Bible) mdl_versn.getSelectedBookMetaData().getBook();\n Passage ref = version.findPassage(search);\n txt_passg.setText(ref.getName());\n updateDisplay();\n setDefaultName(param);\n } catch (Exception ex) {\n Reporter.informUser(this, ex);\n }\n}\n"
"public Keys getKeys() {\n ECKey key = new ECKey();\n byte[] address = key.getPubKey();\n byte[] privateKey = key.getPrivKeyBytes();\n String addressAsStringWithPrivate = key.toStringWithPrivate(MainNetParams.get()).toString();\n return new Keys().setAddress(address).setAddressAsString(addressAsString).setPrivateKey(privateKey).setAddressAsStringWithPrivate(addressAsStringWithPrivate);\n}\n"
"public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) {\n ItemStack itemstack = null;\n Slot slot = (Slot) inventorySlots.get(par2);\n if (slot != null && slot.getHasStack()) {\n ItemStack itemstack1 = slot.getStack();\n itemstack = itemstack1.copy();\n if (par2 < 27) {\n if (!this.mergeItemStack(itemstack1, 27, 63, true)) {\n return null;\n }\n } else if (!this.mergeItemStack(itemstack1, 0, 27, false)) {\n return null;\n }\n if (itemstack1.stackSize == 0) {\n slot.putStack((ItemStack) null);\n } else {\n slot.onSlotChanged();\n }\n if (itemstack1.stackSize == itemstack.stackSize) {\n return null;\n }\n slot.onPickupFromSlot(par1EntityPlayer, itemstack1);\n }\n return itemstack;\n}\n"
"protected void addWhereCondition() {\n markDirty();\n RoleWhereCondition wc = new RoleWhereCondition();\n wc.setLeftPath(wcLeftText.getText());\n wc.setOperator(wcOperatorCombo.getText());\n wc.setRightValueOrPath(wcRightText.getText());\n wc.setPredicate(wcPredicateCombo.getText());\n ArrayList<RoleWhereCondition> wcList = (ArrayList<RoleWhereCondition>) conditionViewer.getViewer().getInput();\n wcList.add(wc);\n LinkedHashSet<String> parameters = new LinkedHashSet<String>();\n for (Iterator iter = wcList.iterator(); iter.hasNext(); ) {\n RoleWhereCondition wswc = (RoleWhereCondition) iter.next();\n parameters.add(wswc.toString());\n }\n String instanceName = ((InstanceLine) ((IStructuredSelection) instancesViewer.getSelection()).getFirstElement()).getInstanceName();\n role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).setParameters(parameters);\n wcListViewer.setInput(wcList);\n markDirty();\n}\n"
"public void creeperDropEvent(LivingDropsEvent evt) {\n if (evt.entityLiving instanceof EntityCreeper) {\n if (CREEPER_DROP_SULFER) {\n evt.entityLiving.dropItem(this.itemSulfurDust.itemID, 1 + evt.entityLiving.worldObj.rand.nextInt(6));\n }\n }\n}\n"
"public void onAnimationUpdate(ValueAnimator animation) {\n int value = (int) animation.getAnimatedValue();\n tempShadowRadius = value;\n invalidate();\n}\n"
"protected InformationLossDefault evaluateInternal(final Node node, final IHashGroupify g) {\n int groups = 0;\n int tuples = 0;\n boolean suppressed = false;\n HashGroupifyEntry m = g.getFirstEntry();\n while (m != null) {\n if (m.count > 0) {\n tuples += m.count;\n groups += m.isNotOutlier ? 1 : 0;\n suppressed |= !m.isNotOutlier;\n }\n } else {\n size = g.size();\n }\n final double value = total / size;\n return new InformationLossDefault(value);\n}\n"
"public void start(CoprocessorEnvironment e) throws IOException {\n if (e instanceof RegionCoprocessorEnvironment) {\n RegionCoprocessorEnvironment env = (RegionCoprocessorEnvironment) e;\n HTableDescriptor tableDesc = env.getRegion().getTableDesc();\n String hbaseNamespacePrefix = tableDesc.getValue(Constants.Dataset.TABLE_PREFIX);\n this.sysConfigTablePrefix = HTableNameConverter.getSysConfigTablePrefix(hbaseNamespacePrefix);\n this.cConfCacheSupplier = new CConfigurationCacheSupplier(env.getConfiguration(), sysConfigTablePrefix);\n this.cConfCache = cConfCacheSupplier.get();\n }\n super.start(e);\n}\n"
"public BasicMapReduceContext build(CConfiguration conf, MapReduceMetrics.TaskType type, String runId, long logicalStartTime, String workflowBatch, Arguments runtimeArguments, Transaction tx, ClassLoader classLoader, URI programLocation, String inputDataSetName, List<Split> inputSplits, String outputDataSetName) {\n Injector injector = createInjector();\n LocationFactory locationFactory = injector.getInstance(LocationFactory.class);\n Program program;\n try {\n program = loadProgram(programLocation, locationFactory);\n if (workflowBatch != null) {\n MapReduceSpecification mapReduceSpec = program.getSpecification().getMapReduce().get(workflowBatch);\n Preconditions.checkArgument(mapReduceSpec != null, \"String_Node_Str\", workflowBatch);\n program = new WorkflowMapReduceProgram(program, mapReduceSpec);\n }\n } catch (IOException e) {\n LOG.error(\"String_Node_Str\" + programLocation);\n throw Throwables.propagate(e);\n }\n DataSetAccessor dataSetAccessor = injector.getInstance(DataSetAccessor.class);\n DataFabric dataFabric = new DataFabric2Impl(locationFactory, dataSetAccessor);\n DataSetInstantiator dataSetContext = new DataSetInstantiator(dataFabric, classLoader);\n dataSetContext.setDataSets(program.getSpecification().getDataSets().values());\n MetricsCollectionService metricsCollectionService = (type == null) ? null : injector.getInstance(MetricsCollectionService.class);\n Map<String, DataSet> dataSets = DataSets.createDataSets(dataSetContext, program.getSpecification().getDataSets().keySet());\n MapReduceSpecification spec = program.getSpecification().getMapReduce().get(program.getName());\n BasicMapReduceContext context = new BasicMapReduceContext(program, type, RunIds.fromString(runId), runtimeArguments, dataSets, spec, dataSetContext.getTransactionAware(), logicalStartTime, workflowBatch, metricsCollectionService);\n if (type == MapReduceMetrics.TaskType.Mapper) {\n dataSetContext.setMetricsCollector(metricsCollectionService, context.getSystemMapperMetrics());\n } else if (type == MapReduceMetrics.TaskType.Reducer) {\n dataSetContext.setMetricsCollector(context.getSystemReducerMetrics());\n }\n for (TransactionAware txAware : dataSetContext.getTransactionAware()) {\n txAware.startTx(tx);\n }\n if (inputDataSetName != null && inputSplits != null) {\n context.setInput((BatchReadable) context.getDataSet(inputDataSetName), inputSplits);\n }\n if (outputDataSetName != null) {\n context.setOutput((BatchWritable) context.getDataSet(outputDataSetName));\n }\n LogAppenderInitializer logAppenderInitializer = injector.getInstance(LogAppenderInitializer.class);\n logAppenderInitializer.initialize();\n return context;\n}\n"
"private void computeOptimizedItinerary() {\n int positionNbr = 4;\n ArrayList<ISPosition> pos = new ArrayList<ISPosition>();\n for (int i = 0; i < positionNbr; i++) {\n double x = Math.random() * 50;\n double y = Math.random() * 50;\n if (mMaps.size() > 1 && i > positionNbr / 2) {\n ISMap otherMap = null;\n for (ISMap map : mMaps) {\n if (map.getId() != mCurrentMap.getId()) {\n otherMap = map;\n break;\n }\n }\n if (otherMap != null) {\n ISPosition p = new ISPosition(otherMap.getId(), x, y);\n pos.add(p);\n }\n } else {\n ISPosition p = new ISPosition(mCurrentMap.getId(), x, y);\n pos.add(p);\n }\n }\n if (mItineraryProvider != null) {\n mItineraryProvider.requestOptimizedItinerary(pos, ISItineraryProvider.ISEOptimizationMode.NearestNeighbourShortestPath, true, false, this, false);\n }\n}\n"